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        let protocol_name =
1054            <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1055        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1056    }
1057
1058    pub fn into_channel(self) -> fidl::Channel {
1059        self.client.into_channel()
1060    }
1061
1062    /// Waits until an event arrives and returns it. It is safe for other
1063    /// threads to make concurrent requests while waiting for an event.
1064    pub fn wait_for_event(
1065        &self,
1066        deadline: zx::MonotonicInstant,
1067    ) -> Result<ComponentControllerEvent, fidl::Error> {
1068        ComponentControllerEvent::decode(self.client.wait_for_event(deadline)?)
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        let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1357        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1358    }
1359
1360    pub fn into_channel(self) -> fidl::Channel {
1361        self.client.into_channel()
1362    }
1363
1364    /// Waits until an event arrives and returns it. It is safe for other
1365    /// threads to make concurrent requests while waiting for an event.
1366    pub fn wait_for_event(
1367        &self,
1368        deadline: zx::MonotonicInstant,
1369    ) -> Result<ProtocolEvent, fidl::Error> {
1370        ProtocolEvent::decode(self.client.wait_for_event(deadline)?)
1371    }
1372}
1373
1374#[cfg(target_os = "fuchsia")]
1375impl From<ProtocolSynchronousProxy> for zx::NullableHandle {
1376    fn from(value: ProtocolSynchronousProxy) -> Self {
1377        value.into_channel().into()
1378    }
1379}
1380
1381#[cfg(target_os = "fuchsia")]
1382impl From<fidl::Channel> for ProtocolSynchronousProxy {
1383    fn from(value: fidl::Channel) -> Self {
1384        Self::new(value)
1385    }
1386}
1387
1388#[cfg(target_os = "fuchsia")]
1389impl fidl::endpoints::FromClient for ProtocolSynchronousProxy {
1390    type Protocol = ProtocolMarker;
1391
1392    fn from_client(value: fidl::endpoints::ClientEnd<ProtocolMarker>) -> Self {
1393        Self::new(value.into_channel())
1394    }
1395}
1396
1397#[derive(Debug, Clone)]
1398pub struct ProtocolProxy {
1399    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1400}
1401
1402impl fidl::endpoints::Proxy for ProtocolProxy {
1403    type Protocol = ProtocolMarker;
1404
1405    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1406        Self::new(inner)
1407    }
1408
1409    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1410        self.client.into_channel().map_err(|client| Self { client })
1411    }
1412
1413    fn as_channel(&self) -> &::fidl::AsyncChannel {
1414        self.client.as_channel()
1415    }
1416}
1417
1418impl ProtocolProxy {
1419    /// Create a new Proxy for test.conformance/Protocol.
1420    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1421        let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1422        Self { client: fidl::client::Client::new(channel, protocol_name) }
1423    }
1424
1425    /// Get a Stream of events from the remote end of the protocol.
1426    ///
1427    /// # Panics
1428    ///
1429    /// Panics if the event stream was already taken.
1430    pub fn take_event_stream(&self) -> ProtocolEventStream {
1431        ProtocolEventStream { event_receiver: self.client.take_event_receiver() }
1432    }
1433}
1434
1435impl ProtocolProxyInterface for ProtocolProxy {}
1436
1437pub struct ProtocolEventStream {
1438    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1439}
1440
1441impl std::marker::Unpin for ProtocolEventStream {}
1442
1443impl futures::stream::FusedStream for ProtocolEventStream {
1444    fn is_terminated(&self) -> bool {
1445        self.event_receiver.is_terminated()
1446    }
1447}
1448
1449impl futures::Stream for ProtocolEventStream {
1450    type Item = Result<ProtocolEvent, fidl::Error>;
1451
1452    fn poll_next(
1453        mut self: std::pin::Pin<&mut Self>,
1454        cx: &mut std::task::Context<'_>,
1455    ) -> std::task::Poll<Option<Self::Item>> {
1456        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1457            &mut self.event_receiver,
1458            cx
1459        )?) {
1460            Some(buf) => std::task::Poll::Ready(Some(ProtocolEvent::decode(buf))),
1461            None => std::task::Poll::Ready(None),
1462        }
1463    }
1464}
1465
1466#[derive(Debug)]
1467pub enum ProtocolEvent {}
1468
1469impl ProtocolEvent {
1470    /// Decodes a message buffer as a [`ProtocolEvent`].
1471    fn decode(
1472        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1473    ) -> Result<ProtocolEvent, fidl::Error> {
1474        let (bytes, _handles) = buf.split_mut();
1475        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1476        debug_assert_eq!(tx_header.tx_id, 0);
1477        match tx_header.ordinal {
1478            _ => Err(fidl::Error::UnknownOrdinal {
1479                ordinal: tx_header.ordinal,
1480                protocol_name: <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1481            }),
1482        }
1483    }
1484}
1485
1486/// A Stream of incoming requests for test.conformance/Protocol.
1487pub struct ProtocolRequestStream {
1488    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1489    is_terminated: bool,
1490}
1491
1492impl std::marker::Unpin for ProtocolRequestStream {}
1493
1494impl futures::stream::FusedStream for ProtocolRequestStream {
1495    fn is_terminated(&self) -> bool {
1496        self.is_terminated
1497    }
1498}
1499
1500impl fidl::endpoints::RequestStream for ProtocolRequestStream {
1501    type Protocol = ProtocolMarker;
1502    type ControlHandle = ProtocolControlHandle;
1503
1504    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1505        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1506    }
1507
1508    fn control_handle(&self) -> Self::ControlHandle {
1509        ProtocolControlHandle { inner: self.inner.clone() }
1510    }
1511
1512    fn into_inner(
1513        self,
1514    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1515    {
1516        (self.inner, self.is_terminated)
1517    }
1518
1519    fn from_inner(
1520        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1521        is_terminated: bool,
1522    ) -> Self {
1523        Self { inner, is_terminated }
1524    }
1525}
1526
1527impl futures::Stream for ProtocolRequestStream {
1528    type Item = Result<ProtocolRequest, fidl::Error>;
1529
1530    fn poll_next(
1531        mut self: std::pin::Pin<&mut Self>,
1532        cx: &mut std::task::Context<'_>,
1533    ) -> std::task::Poll<Option<Self::Item>> {
1534        let this = &mut *self;
1535        if this.inner.check_shutdown(cx) {
1536            this.is_terminated = true;
1537            return std::task::Poll::Ready(None);
1538        }
1539        if this.is_terminated {
1540            panic!("polled ProtocolRequestStream after completion");
1541        }
1542        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1543            |bytes, handles| {
1544                match this.inner.channel().read_etc(cx, bytes, handles) {
1545                    std::task::Poll::Ready(Ok(())) => {}
1546                    std::task::Poll::Pending => return std::task::Poll::Pending,
1547                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1548                        this.is_terminated = true;
1549                        return std::task::Poll::Ready(None);
1550                    }
1551                    std::task::Poll::Ready(Err(e)) => {
1552                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1553                            e.into(),
1554                        ))));
1555                    }
1556                }
1557
1558                // A message has been received from the channel
1559                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1560
1561                std::task::Poll::Ready(Some(match header.ordinal {
1562                    _ => Err(fidl::Error::UnknownOrdinal {
1563                        ordinal: header.ordinal,
1564                        protocol_name:
1565                            <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1566                    }),
1567                }))
1568            },
1569        )
1570    }
1571}
1572
1573#[derive(Debug)]
1574pub enum ProtocolRequest {}
1575
1576impl ProtocolRequest {
1577    /// Name of the method defined in FIDL
1578    pub fn method_name(&self) -> &'static str {
1579        match *self {}
1580    }
1581}
1582
1583#[derive(Debug, Clone)]
1584pub struct ProtocolControlHandle {
1585    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1586}
1587
1588impl fidl::endpoints::ControlHandle for ProtocolControlHandle {
1589    fn shutdown(&self) {
1590        self.inner.shutdown()
1591    }
1592
1593    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1594        self.inner.shutdown_with_epitaph(status)
1595    }
1596
1597    fn is_closed(&self) -> bool {
1598        self.inner.channel().is_closed()
1599    }
1600    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1601        self.inner.channel().on_closed()
1602    }
1603
1604    #[cfg(target_os = "fuchsia")]
1605    fn signal_peer(
1606        &self,
1607        clear_mask: zx::Signals,
1608        set_mask: zx::Signals,
1609    ) -> Result<(), zx_status::Status> {
1610        use fidl::Peered;
1611        self.inner.channel().signal_peer(clear_mask, set_mask)
1612    }
1613}
1614
1615impl ProtocolControlHandle {}
1616
1617mod internal {
1618    use super::*;
1619
1620    impl fidl::encoding::ResourceTypeMarker for AlternatingHandlesAndFailures {
1621        type Borrowed<'a> = &'a mut Self;
1622        fn take_or_borrow<'a>(
1623            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1624        ) -> Self::Borrowed<'a> {
1625            value
1626        }
1627    }
1628
1629    unsafe impl fidl::encoding::TypeMarker for AlternatingHandlesAndFailures {
1630        type Owned = Self;
1631
1632        #[inline(always)]
1633        fn inline_align(_context: fidl::encoding::Context) -> usize {
1634            8
1635        }
1636
1637        #[inline(always)]
1638        fn inline_size(_context: fidl::encoding::Context) -> usize {
1639            56
1640        }
1641    }
1642
1643    unsafe impl
1644        fidl::encoding::Encode<
1645            AlternatingHandlesAndFailures,
1646            fidl::encoding::DefaultFuchsiaResourceDialect,
1647        > for &mut AlternatingHandlesAndFailures
1648    {
1649        #[inline]
1650        unsafe fn encode(
1651            self,
1652            encoder: &mut fidl::encoding::Encoder<
1653                '_,
1654                fidl::encoding::DefaultFuchsiaResourceDialect,
1655            >,
1656            offset: usize,
1657            _depth: fidl::encoding::Depth,
1658        ) -> fidl::Result<()> {
1659            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1660            // Delegate to tuple encoding.
1661            fidl::encoding::Encode::<
1662                AlternatingHandlesAndFailures,
1663                fidl::encoding::DefaultFuchsiaResourceDialect,
1664            >::encode(
1665                (
1666                    <fidl::encoding::HandleType<
1667                        fidl::NullableHandle,
1668                        { fidl::ObjectType::NONE.into_raw() },
1669                        2147483648,
1670                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1671                        &mut self.h1
1672                    ),
1673                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1674                        &self.failure_trigger1,
1675                    ),
1676                    <fidl::encoding::HandleType<
1677                        fidl::NullableHandle,
1678                        { fidl::ObjectType::NONE.into_raw() },
1679                        2147483648,
1680                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1681                        &mut self.h2
1682                    ),
1683                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1684                        &self.failure_trigger2,
1685                    ),
1686                    <fidl::encoding::HandleType<
1687                        fidl::NullableHandle,
1688                        { fidl::ObjectType::NONE.into_raw() },
1689                        2147483648,
1690                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1691                        &mut self.h3
1692                    ),
1693                ),
1694                encoder,
1695                offset,
1696                _depth,
1697            )
1698        }
1699    }
1700    unsafe impl<
1701        T0: fidl::encoding::Encode<
1702                fidl::encoding::HandleType<
1703                    fidl::NullableHandle,
1704                    { fidl::ObjectType::NONE.into_raw() },
1705                    2147483648,
1706                >,
1707                fidl::encoding::DefaultFuchsiaResourceDialect,
1708            >,
1709        T1: fidl::encoding::Encode<
1710                fidl::encoding::BoundedString<1>,
1711                fidl::encoding::DefaultFuchsiaResourceDialect,
1712            >,
1713        T2: fidl::encoding::Encode<
1714                fidl::encoding::HandleType<
1715                    fidl::NullableHandle,
1716                    { fidl::ObjectType::NONE.into_raw() },
1717                    2147483648,
1718                >,
1719                fidl::encoding::DefaultFuchsiaResourceDialect,
1720            >,
1721        T3: fidl::encoding::Encode<
1722                fidl::encoding::BoundedString<1>,
1723                fidl::encoding::DefaultFuchsiaResourceDialect,
1724            >,
1725        T4: fidl::encoding::Encode<
1726                fidl::encoding::HandleType<
1727                    fidl::NullableHandle,
1728                    { fidl::ObjectType::NONE.into_raw() },
1729                    2147483648,
1730                >,
1731                fidl::encoding::DefaultFuchsiaResourceDialect,
1732            >,
1733    >
1734        fidl::encoding::Encode<
1735            AlternatingHandlesAndFailures,
1736            fidl::encoding::DefaultFuchsiaResourceDialect,
1737        > for (T0, T1, T2, T3, T4)
1738    {
1739        #[inline]
1740        unsafe fn encode(
1741            self,
1742            encoder: &mut fidl::encoding::Encoder<
1743                '_,
1744                fidl::encoding::DefaultFuchsiaResourceDialect,
1745            >,
1746            offset: usize,
1747            depth: fidl::encoding::Depth,
1748        ) -> fidl::Result<()> {
1749            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1750            // Zero out padding regions. There's no need to apply masks
1751            // because the unmasked parts will be overwritten by fields.
1752            unsafe {
1753                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1754                (ptr as *mut u64).write_unaligned(0);
1755            }
1756            unsafe {
1757                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1758                (ptr as *mut u64).write_unaligned(0);
1759            }
1760            unsafe {
1761                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
1762                (ptr as *mut u64).write_unaligned(0);
1763            }
1764            // Write the fields.
1765            self.0.encode(encoder, offset + 0, depth)?;
1766            self.1.encode(encoder, offset + 8, depth)?;
1767            self.2.encode(encoder, offset + 24, depth)?;
1768            self.3.encode(encoder, offset + 32, depth)?;
1769            self.4.encode(encoder, offset + 48, depth)?;
1770            Ok(())
1771        }
1772    }
1773
1774    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1775        for AlternatingHandlesAndFailures
1776    {
1777        #[inline(always)]
1778        fn new_empty() -> Self {
1779            Self {
1780                h1: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1781                failure_trigger1: fidl::new_empty!(
1782                    fidl::encoding::BoundedString<1>,
1783                    fidl::encoding::DefaultFuchsiaResourceDialect
1784                ),
1785                h2: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1786                failure_trigger2: fidl::new_empty!(
1787                    fidl::encoding::BoundedString<1>,
1788                    fidl::encoding::DefaultFuchsiaResourceDialect
1789                ),
1790                h3: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1791            }
1792        }
1793
1794        #[inline]
1795        unsafe fn decode(
1796            &mut self,
1797            decoder: &mut fidl::encoding::Decoder<
1798                '_,
1799                fidl::encoding::DefaultFuchsiaResourceDialect,
1800            >,
1801            offset: usize,
1802            _depth: fidl::encoding::Depth,
1803        ) -> fidl::Result<()> {
1804            decoder.debug_check_bounds::<Self>(offset);
1805            // Verify that padding bytes are zero.
1806            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1807            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1808            let mask = 0xffffffff00000000u64;
1809            let maskedval = padval & mask;
1810            if maskedval != 0 {
1811                return Err(fidl::Error::NonZeroPadding {
1812                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1813                });
1814            }
1815            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1816            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1817            let mask = 0xffffffff00000000u64;
1818            let maskedval = padval & mask;
1819            if maskedval != 0 {
1820                return Err(fidl::Error::NonZeroPadding {
1821                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1822                });
1823            }
1824            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
1825            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1826            let mask = 0xffffffff00000000u64;
1827            let maskedval = padval & mask;
1828            if maskedval != 0 {
1829                return Err(fidl::Error::NonZeroPadding {
1830                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
1831                });
1832            }
1833            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h1, decoder, offset + 0, _depth)?;
1834            fidl::decode!(
1835                fidl::encoding::BoundedString<1>,
1836                fidl::encoding::DefaultFuchsiaResourceDialect,
1837                &mut self.failure_trigger1,
1838                decoder,
1839                offset + 8,
1840                _depth
1841            )?;
1842            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h2, decoder, offset + 24, _depth)?;
1843            fidl::decode!(
1844                fidl::encoding::BoundedString<1>,
1845                fidl::encoding::DefaultFuchsiaResourceDialect,
1846                &mut self.failure_trigger2,
1847                decoder,
1848                offset + 32,
1849                _depth
1850            )?;
1851            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h3, decoder, offset + 48, _depth)?;
1852            Ok(())
1853        }
1854    }
1855
1856    impl fidl::encoding::ResourceTypeMarker for ArrayOfArrayOfNonnullableHandles {
1857        type Borrowed<'a> = &'a mut Self;
1858        fn take_or_borrow<'a>(
1859            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1860        ) -> Self::Borrowed<'a> {
1861            value
1862        }
1863    }
1864
1865    unsafe impl fidl::encoding::TypeMarker for ArrayOfArrayOfNonnullableHandles {
1866        type Owned = Self;
1867
1868        #[inline(always)]
1869        fn inline_align(_context: fidl::encoding::Context) -> usize {
1870            4
1871        }
1872
1873        #[inline(always)]
1874        fn inline_size(_context: fidl::encoding::Context) -> usize {
1875            48
1876        }
1877    }
1878
1879    unsafe impl
1880        fidl::encoding::Encode<
1881            ArrayOfArrayOfNonnullableHandles,
1882            fidl::encoding::DefaultFuchsiaResourceDialect,
1883        > for &mut ArrayOfArrayOfNonnullableHandles
1884    {
1885        #[inline]
1886        unsafe fn encode(
1887            self,
1888            encoder: &mut fidl::encoding::Encoder<
1889                '_,
1890                fidl::encoding::DefaultFuchsiaResourceDialect,
1891            >,
1892            offset: usize,
1893            _depth: fidl::encoding::Depth,
1894        ) -> fidl::Result<()> {
1895            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1896            // Delegate to tuple encoding.
1897            fidl::encoding::Encode::<
1898                ArrayOfArrayOfNonnullableHandles,
1899                fidl::encoding::DefaultFuchsiaResourceDialect,
1900            >::encode(
1901                (<fidl::encoding::Array<
1902                    fidl::encoding::Array<
1903                        fidl::encoding::HandleType<
1904                            fidl::NullableHandle,
1905                            { fidl::ObjectType::NONE.into_raw() },
1906                            2147483648,
1907                        >,
1908                        3,
1909                    >,
1910                    4,
1911                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1912                    &mut self.handles
1913                ),),
1914                encoder,
1915                offset,
1916                _depth,
1917            )
1918        }
1919    }
1920    unsafe impl<
1921        T0: fidl::encoding::Encode<
1922                fidl::encoding::Array<
1923                    fidl::encoding::Array<
1924                        fidl::encoding::HandleType<
1925                            fidl::NullableHandle,
1926                            { fidl::ObjectType::NONE.into_raw() },
1927                            2147483648,
1928                        >,
1929                        3,
1930                    >,
1931                    4,
1932                >,
1933                fidl::encoding::DefaultFuchsiaResourceDialect,
1934            >,
1935    >
1936        fidl::encoding::Encode<
1937            ArrayOfArrayOfNonnullableHandles,
1938            fidl::encoding::DefaultFuchsiaResourceDialect,
1939        > for (T0,)
1940    {
1941        #[inline]
1942        unsafe fn encode(
1943            self,
1944            encoder: &mut fidl::encoding::Encoder<
1945                '_,
1946                fidl::encoding::DefaultFuchsiaResourceDialect,
1947            >,
1948            offset: usize,
1949            depth: fidl::encoding::Depth,
1950        ) -> fidl::Result<()> {
1951            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1952            // Zero out padding regions. There's no need to apply masks
1953            // because the unmasked parts will be overwritten by fields.
1954            // Write the fields.
1955            self.0.encode(encoder, offset + 0, depth)?;
1956            Ok(())
1957        }
1958    }
1959
1960    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1961        for ArrayOfArrayOfNonnullableHandles
1962    {
1963        #[inline(always)]
1964        fn new_empty() -> Self {
1965            Self {
1966                handles: fidl::new_empty!(
1967                    fidl::encoding::Array<
1968                        fidl::encoding::Array<
1969                            fidl::encoding::HandleType<
1970                                fidl::NullableHandle,
1971                                { fidl::ObjectType::NONE.into_raw() },
1972                                2147483648,
1973                            >,
1974                            3,
1975                        >,
1976                        4,
1977                    >,
1978                    fidl::encoding::DefaultFuchsiaResourceDialect
1979                ),
1980            }
1981        }
1982
1983        #[inline]
1984        unsafe fn decode(
1985            &mut self,
1986            decoder: &mut fidl::encoding::Decoder<
1987                '_,
1988                fidl::encoding::DefaultFuchsiaResourceDialect,
1989            >,
1990            offset: usize,
1991            _depth: fidl::encoding::Depth,
1992        ) -> fidl::Result<()> {
1993            decoder.debug_check_bounds::<Self>(offset);
1994            // Verify that padding bytes are zero.
1995            fidl::decode!(
1996                fidl::encoding::Array<
1997                    fidl::encoding::Array<
1998                        fidl::encoding::HandleType<
1999                            fidl::NullableHandle,
2000                            { fidl::ObjectType::NONE.into_raw() },
2001                            2147483648,
2002                        >,
2003                        3,
2004                    >,
2005                    4,
2006                >,
2007                fidl::encoding::DefaultFuchsiaResourceDialect,
2008                &mut self.handles,
2009                decoder,
2010                offset + 0,
2011                _depth
2012            )?;
2013            Ok(())
2014        }
2015    }
2016
2017    impl fidl::encoding::ResourceTypeMarker for ArrayOfHandles {
2018        type Borrowed<'a> = &'a mut Self;
2019        fn take_or_borrow<'a>(
2020            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2021        ) -> Self::Borrowed<'a> {
2022            value
2023        }
2024    }
2025
2026    unsafe impl fidl::encoding::TypeMarker for ArrayOfHandles {
2027        type Owned = Self;
2028
2029        #[inline(always)]
2030        fn inline_align(_context: fidl::encoding::Context) -> usize {
2031            4
2032        }
2033
2034        #[inline(always)]
2035        fn inline_size(_context: fidl::encoding::Context) -> usize {
2036            12
2037        }
2038    }
2039
2040    unsafe impl
2041        fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2042        for &mut ArrayOfHandles
2043    {
2044        #[inline]
2045        unsafe fn encode(
2046            self,
2047            encoder: &mut fidl::encoding::Encoder<
2048                '_,
2049                fidl::encoding::DefaultFuchsiaResourceDialect,
2050            >,
2051            offset: usize,
2052            _depth: fidl::encoding::Depth,
2053        ) -> fidl::Result<()> {
2054            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2055            // Delegate to tuple encoding.
2056            fidl::encoding::Encode::<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2057                (
2058                    <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),
2059                ),
2060                encoder, offset, _depth
2061            )
2062        }
2063    }
2064    unsafe impl<
2065        T0: fidl::encoding::Encode<
2066                fidl::encoding::Array<
2067                    fidl::encoding::HandleType<
2068                        fidl::NullableHandle,
2069                        { fidl::ObjectType::NONE.into_raw() },
2070                        2147483648,
2071                    >,
2072                    3,
2073                >,
2074                fidl::encoding::DefaultFuchsiaResourceDialect,
2075            >,
2076    > fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2077        for (T0,)
2078    {
2079        #[inline]
2080        unsafe fn encode(
2081            self,
2082            encoder: &mut fidl::encoding::Encoder<
2083                '_,
2084                fidl::encoding::DefaultFuchsiaResourceDialect,
2085            >,
2086            offset: usize,
2087            depth: fidl::encoding::Depth,
2088        ) -> fidl::Result<()> {
2089            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2090            // Zero out padding regions. There's no need to apply masks
2091            // because the unmasked parts will be overwritten by fields.
2092            // Write the fields.
2093            self.0.encode(encoder, offset + 0, depth)?;
2094            Ok(())
2095        }
2096    }
2097
2098    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2099        for ArrayOfHandles
2100    {
2101        #[inline(always)]
2102        fn new_empty() -> Self {
2103            Self {
2104                a: fidl::new_empty!(
2105                    fidl::encoding::Array<
2106                        fidl::encoding::HandleType<
2107                            fidl::NullableHandle,
2108                            { fidl::ObjectType::NONE.into_raw() },
2109                            2147483648,
2110                        >,
2111                        3,
2112                    >,
2113                    fidl::encoding::DefaultFuchsiaResourceDialect
2114                ),
2115            }
2116        }
2117
2118        #[inline]
2119        unsafe fn decode(
2120            &mut self,
2121            decoder: &mut fidl::encoding::Decoder<
2122                '_,
2123                fidl::encoding::DefaultFuchsiaResourceDialect,
2124            >,
2125            offset: usize,
2126            _depth: fidl::encoding::Depth,
2127        ) -> fidl::Result<()> {
2128            decoder.debug_check_bounds::<Self>(offset);
2129            // Verify that padding bytes are zero.
2130            fidl::decode!(
2131                fidl::encoding::Array<
2132                    fidl::encoding::HandleType<
2133                        fidl::NullableHandle,
2134                        { fidl::ObjectType::NONE.into_raw() },
2135                        2147483648,
2136                    >,
2137                    3,
2138                >,
2139                fidl::encoding::DefaultFuchsiaResourceDialect,
2140                &mut self.a,
2141                decoder,
2142                offset + 0,
2143                _depth
2144            )?;
2145            Ok(())
2146        }
2147    }
2148
2149    impl fidl::encoding::ResourceTypeMarker for ArrayOfNonnullableHandles {
2150        type Borrowed<'a> = &'a mut Self;
2151        fn take_or_borrow<'a>(
2152            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2153        ) -> Self::Borrowed<'a> {
2154            value
2155        }
2156    }
2157
2158    unsafe impl fidl::encoding::TypeMarker for ArrayOfNonnullableHandles {
2159        type Owned = Self;
2160
2161        #[inline(always)]
2162        fn inline_align(_context: fidl::encoding::Context) -> usize {
2163            4
2164        }
2165
2166        #[inline(always)]
2167        fn inline_size(_context: fidl::encoding::Context) -> usize {
2168            16
2169        }
2170    }
2171
2172    unsafe impl
2173        fidl::encoding::Encode<
2174            ArrayOfNonnullableHandles,
2175            fidl::encoding::DefaultFuchsiaResourceDialect,
2176        > for &mut ArrayOfNonnullableHandles
2177    {
2178        #[inline]
2179        unsafe fn encode(
2180            self,
2181            encoder: &mut fidl::encoding::Encoder<
2182                '_,
2183                fidl::encoding::DefaultFuchsiaResourceDialect,
2184            >,
2185            offset: usize,
2186            _depth: fidl::encoding::Depth,
2187        ) -> fidl::Result<()> {
2188            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2189            // Delegate to tuple encoding.
2190            fidl::encoding::Encode::<
2191                ArrayOfNonnullableHandles,
2192                fidl::encoding::DefaultFuchsiaResourceDialect,
2193            >::encode(
2194                (<fidl::encoding::Array<
2195                    fidl::encoding::HandleType<
2196                        fidl::NullableHandle,
2197                        { fidl::ObjectType::NONE.into_raw() },
2198                        2147483648,
2199                    >,
2200                    4,
2201                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2202                    &mut self.handles
2203                ),),
2204                encoder,
2205                offset,
2206                _depth,
2207            )
2208        }
2209    }
2210    unsafe impl<
2211        T0: fidl::encoding::Encode<
2212                fidl::encoding::Array<
2213                    fidl::encoding::HandleType<
2214                        fidl::NullableHandle,
2215                        { fidl::ObjectType::NONE.into_raw() },
2216                        2147483648,
2217                    >,
2218                    4,
2219                >,
2220                fidl::encoding::DefaultFuchsiaResourceDialect,
2221            >,
2222    >
2223        fidl::encoding::Encode<
2224            ArrayOfNonnullableHandles,
2225            fidl::encoding::DefaultFuchsiaResourceDialect,
2226        > for (T0,)
2227    {
2228        #[inline]
2229        unsafe fn encode(
2230            self,
2231            encoder: &mut fidl::encoding::Encoder<
2232                '_,
2233                fidl::encoding::DefaultFuchsiaResourceDialect,
2234            >,
2235            offset: usize,
2236            depth: fidl::encoding::Depth,
2237        ) -> fidl::Result<()> {
2238            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2239            // Zero out padding regions. There's no need to apply masks
2240            // because the unmasked parts will be overwritten by fields.
2241            // Write the fields.
2242            self.0.encode(encoder, offset + 0, depth)?;
2243            Ok(())
2244        }
2245    }
2246
2247    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2248        for ArrayOfNonnullableHandles
2249    {
2250        #[inline(always)]
2251        fn new_empty() -> Self {
2252            Self {
2253                handles: fidl::new_empty!(
2254                    fidl::encoding::Array<
2255                        fidl::encoding::HandleType<
2256                            fidl::NullableHandle,
2257                            { fidl::ObjectType::NONE.into_raw() },
2258                            2147483648,
2259                        >,
2260                        4,
2261                    >,
2262                    fidl::encoding::DefaultFuchsiaResourceDialect
2263                ),
2264            }
2265        }
2266
2267        #[inline]
2268        unsafe fn decode(
2269            &mut self,
2270            decoder: &mut fidl::encoding::Decoder<
2271                '_,
2272                fidl::encoding::DefaultFuchsiaResourceDialect,
2273            >,
2274            offset: usize,
2275            _depth: fidl::encoding::Depth,
2276        ) -> fidl::Result<()> {
2277            decoder.debug_check_bounds::<Self>(offset);
2278            // Verify that padding bytes are zero.
2279            fidl::decode!(
2280                fidl::encoding::Array<
2281                    fidl::encoding::HandleType<
2282                        fidl::NullableHandle,
2283                        { fidl::ObjectType::NONE.into_raw() },
2284                        2147483648,
2285                    >,
2286                    4,
2287                >,
2288                fidl::encoding::DefaultFuchsiaResourceDialect,
2289                &mut self.handles,
2290                decoder,
2291                offset + 0,
2292                _depth
2293            )?;
2294            Ok(())
2295        }
2296    }
2297
2298    impl fidl::encoding::ResourceTypeMarker for ArrayOfNullableHandles {
2299        type Borrowed<'a> = &'a mut Self;
2300        fn take_or_borrow<'a>(
2301            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2302        ) -> Self::Borrowed<'a> {
2303            value
2304        }
2305    }
2306
2307    unsafe impl fidl::encoding::TypeMarker for ArrayOfNullableHandles {
2308        type Owned = Self;
2309
2310        #[inline(always)]
2311        fn inline_align(_context: fidl::encoding::Context) -> usize {
2312            4
2313        }
2314
2315        #[inline(always)]
2316        fn inline_size(_context: fidl::encoding::Context) -> usize {
2317            20
2318        }
2319    }
2320
2321    unsafe impl
2322        fidl::encoding::Encode<
2323            ArrayOfNullableHandles,
2324            fidl::encoding::DefaultFuchsiaResourceDialect,
2325        > for &mut ArrayOfNullableHandles
2326    {
2327        #[inline]
2328        unsafe fn encode(
2329            self,
2330            encoder: &mut fidl::encoding::Encoder<
2331                '_,
2332                fidl::encoding::DefaultFuchsiaResourceDialect,
2333            >,
2334            offset: usize,
2335            _depth: fidl::encoding::Depth,
2336        ) -> fidl::Result<()> {
2337            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2338            // Delegate to tuple encoding.
2339            fidl::encoding::Encode::<
2340                ArrayOfNullableHandles,
2341                fidl::encoding::DefaultFuchsiaResourceDialect,
2342            >::encode(
2343                (<fidl::encoding::Array<
2344                    fidl::encoding::Optional<
2345                        fidl::encoding::HandleType<
2346                            fidl::NullableHandle,
2347                            { fidl::ObjectType::NONE.into_raw() },
2348                            2147483648,
2349                        >,
2350                    >,
2351                    5,
2352                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2353                    &mut self.handles
2354                ),),
2355                encoder,
2356                offset,
2357                _depth,
2358            )
2359        }
2360    }
2361    unsafe impl<
2362        T0: fidl::encoding::Encode<
2363                fidl::encoding::Array<
2364                    fidl::encoding::Optional<
2365                        fidl::encoding::HandleType<
2366                            fidl::NullableHandle,
2367                            { fidl::ObjectType::NONE.into_raw() },
2368                            2147483648,
2369                        >,
2370                    >,
2371                    5,
2372                >,
2373                fidl::encoding::DefaultFuchsiaResourceDialect,
2374            >,
2375    >
2376        fidl::encoding::Encode<
2377            ArrayOfNullableHandles,
2378            fidl::encoding::DefaultFuchsiaResourceDialect,
2379        > for (T0,)
2380    {
2381        #[inline]
2382        unsafe fn encode(
2383            self,
2384            encoder: &mut fidl::encoding::Encoder<
2385                '_,
2386                fidl::encoding::DefaultFuchsiaResourceDialect,
2387            >,
2388            offset: usize,
2389            depth: fidl::encoding::Depth,
2390        ) -> fidl::Result<()> {
2391            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2392            // Zero out padding regions. There's no need to apply masks
2393            // because the unmasked parts will be overwritten by fields.
2394            // Write the fields.
2395            self.0.encode(encoder, offset + 0, depth)?;
2396            Ok(())
2397        }
2398    }
2399
2400    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2401        for ArrayOfNullableHandles
2402    {
2403        #[inline(always)]
2404        fn new_empty() -> Self {
2405            Self {
2406                handles: fidl::new_empty!(
2407                    fidl::encoding::Array<
2408                        fidl::encoding::Optional<
2409                            fidl::encoding::HandleType<
2410                                fidl::NullableHandle,
2411                                { fidl::ObjectType::NONE.into_raw() },
2412                                2147483648,
2413                            >,
2414                        >,
2415                        5,
2416                    >,
2417                    fidl::encoding::DefaultFuchsiaResourceDialect
2418                ),
2419            }
2420        }
2421
2422        #[inline]
2423        unsafe fn decode(
2424            &mut self,
2425            decoder: &mut fidl::encoding::Decoder<
2426                '_,
2427                fidl::encoding::DefaultFuchsiaResourceDialect,
2428            >,
2429            offset: usize,
2430            _depth: fidl::encoding::Depth,
2431        ) -> fidl::Result<()> {
2432            decoder.debug_check_bounds::<Self>(offset);
2433            // Verify that padding bytes are zero.
2434            fidl::decode!(
2435                fidl::encoding::Array<
2436                    fidl::encoding::Optional<
2437                        fidl::encoding::HandleType<
2438                            fidl::NullableHandle,
2439                            { fidl::ObjectType::NONE.into_raw() },
2440                            2147483648,
2441                        >,
2442                    >,
2443                    5,
2444                >,
2445                fidl::encoding::DefaultFuchsiaResourceDialect,
2446                &mut self.handles,
2447                decoder,
2448                offset + 0,
2449                _depth
2450            )?;
2451            Ok(())
2452        }
2453    }
2454
2455    impl fidl::encoding::ResourceTypeMarker for ArrayOfOptionalHandles {
2456        type Borrowed<'a> = &'a mut Self;
2457        fn take_or_borrow<'a>(
2458            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2459        ) -> Self::Borrowed<'a> {
2460            value
2461        }
2462    }
2463
2464    unsafe impl fidl::encoding::TypeMarker for ArrayOfOptionalHandles {
2465        type Owned = Self;
2466
2467        #[inline(always)]
2468        fn inline_align(_context: fidl::encoding::Context) -> usize {
2469            4
2470        }
2471
2472        #[inline(always)]
2473        fn inline_size(_context: fidl::encoding::Context) -> usize {
2474            12
2475        }
2476    }
2477
2478    unsafe impl
2479        fidl::encoding::Encode<
2480            ArrayOfOptionalHandles,
2481            fidl::encoding::DefaultFuchsiaResourceDialect,
2482        > for &mut ArrayOfOptionalHandles
2483    {
2484        #[inline]
2485        unsafe fn encode(
2486            self,
2487            encoder: &mut fidl::encoding::Encoder<
2488                '_,
2489                fidl::encoding::DefaultFuchsiaResourceDialect,
2490            >,
2491            offset: usize,
2492            _depth: fidl::encoding::Depth,
2493        ) -> fidl::Result<()> {
2494            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2495            // Delegate to tuple encoding.
2496            fidl::encoding::Encode::<
2497                ArrayOfOptionalHandles,
2498                fidl::encoding::DefaultFuchsiaResourceDialect,
2499            >::encode(
2500                (<fidl::encoding::Array<
2501                    fidl::encoding::Optional<
2502                        fidl::encoding::HandleType<
2503                            fidl::NullableHandle,
2504                            { fidl::ObjectType::NONE.into_raw() },
2505                            2147483648,
2506                        >,
2507                    >,
2508                    3,
2509                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2510                    &mut self.a
2511                ),),
2512                encoder,
2513                offset,
2514                _depth,
2515            )
2516        }
2517    }
2518    unsafe impl<
2519        T0: fidl::encoding::Encode<
2520                fidl::encoding::Array<
2521                    fidl::encoding::Optional<
2522                        fidl::encoding::HandleType<
2523                            fidl::NullableHandle,
2524                            { fidl::ObjectType::NONE.into_raw() },
2525                            2147483648,
2526                        >,
2527                    >,
2528                    3,
2529                >,
2530                fidl::encoding::DefaultFuchsiaResourceDialect,
2531            >,
2532    >
2533        fidl::encoding::Encode<
2534            ArrayOfOptionalHandles,
2535            fidl::encoding::DefaultFuchsiaResourceDialect,
2536        > for (T0,)
2537    {
2538        #[inline]
2539        unsafe fn encode(
2540            self,
2541            encoder: &mut fidl::encoding::Encoder<
2542                '_,
2543                fidl::encoding::DefaultFuchsiaResourceDialect,
2544            >,
2545            offset: usize,
2546            depth: fidl::encoding::Depth,
2547        ) -> fidl::Result<()> {
2548            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2549            // Zero out padding regions. There's no need to apply masks
2550            // because the unmasked parts will be overwritten by fields.
2551            // Write the fields.
2552            self.0.encode(encoder, offset + 0, depth)?;
2553            Ok(())
2554        }
2555    }
2556
2557    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2558        for ArrayOfOptionalHandles
2559    {
2560        #[inline(always)]
2561        fn new_empty() -> Self {
2562            Self {
2563                a: fidl::new_empty!(
2564                    fidl::encoding::Array<
2565                        fidl::encoding::Optional<
2566                            fidl::encoding::HandleType<
2567                                fidl::NullableHandle,
2568                                { fidl::ObjectType::NONE.into_raw() },
2569                                2147483648,
2570                            >,
2571                        >,
2572                        3,
2573                    >,
2574                    fidl::encoding::DefaultFuchsiaResourceDialect
2575                ),
2576            }
2577        }
2578
2579        #[inline]
2580        unsafe fn decode(
2581            &mut self,
2582            decoder: &mut fidl::encoding::Decoder<
2583                '_,
2584                fidl::encoding::DefaultFuchsiaResourceDialect,
2585            >,
2586            offset: usize,
2587            _depth: fidl::encoding::Depth,
2588        ) -> fidl::Result<()> {
2589            decoder.debug_check_bounds::<Self>(offset);
2590            // Verify that padding bytes are zero.
2591            fidl::decode!(
2592                fidl::encoding::Array<
2593                    fidl::encoding::Optional<
2594                        fidl::encoding::HandleType<
2595                            fidl::NullableHandle,
2596                            { fidl::ObjectType::NONE.into_raw() },
2597                            2147483648,
2598                        >,
2599                    >,
2600                    3,
2601                >,
2602                fidl::encoding::DefaultFuchsiaResourceDialect,
2603                &mut self.a,
2604                decoder,
2605                offset + 0,
2606                _depth
2607            )?;
2608            Ok(())
2609        }
2610    }
2611
2612    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2613        type Borrowed<'a> = &'a mut Self;
2614        fn take_or_borrow<'a>(
2615            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2616        ) -> Self::Borrowed<'a> {
2617            value
2618        }
2619    }
2620
2621    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2622        type Owned = Self;
2623
2624        #[inline(always)]
2625        fn inline_align(_context: fidl::encoding::Context) -> usize {
2626            8
2627        }
2628
2629        #[inline(always)]
2630        fn inline_size(_context: fidl::encoding::Context) -> usize {
2631            16
2632        }
2633    }
2634
2635    unsafe impl
2636        fidl::encoding::Encode<
2637            ArrayOfVectorOfEventInStructWithDefaultRights,
2638            fidl::encoding::DefaultFuchsiaResourceDialect,
2639        > for &mut ArrayOfVectorOfEventInStructWithDefaultRights
2640    {
2641        #[inline]
2642        unsafe fn encode(
2643            self,
2644            encoder: &mut fidl::encoding::Encoder<
2645                '_,
2646                fidl::encoding::DefaultFuchsiaResourceDialect,
2647            >,
2648            offset: usize,
2649            _depth: fidl::encoding::Depth,
2650        ) -> fidl::Result<()> {
2651            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2652            // Delegate to tuple encoding.
2653            fidl::encoding::Encode::<
2654                ArrayOfVectorOfEventInStructWithDefaultRights,
2655                fidl::encoding::DefaultFuchsiaResourceDialect,
2656            >::encode(
2657                (<fidl::encoding::Array<
2658                    fidl::encoding::Vector<
2659                        fidl::encoding::HandleType<
2660                            fidl::Event,
2661                            { fidl::ObjectType::EVENT.into_raw() },
2662                            53251,
2663                        >,
2664                        1,
2665                    >,
2666                    1,
2667                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2668                    &mut self.h
2669                ),),
2670                encoder,
2671                offset,
2672                _depth,
2673            )
2674        }
2675    }
2676    unsafe impl<
2677        T0: fidl::encoding::Encode<
2678                fidl::encoding::Array<
2679                    fidl::encoding::Vector<
2680                        fidl::encoding::HandleType<
2681                            fidl::Event,
2682                            { fidl::ObjectType::EVENT.into_raw() },
2683                            53251,
2684                        >,
2685                        1,
2686                    >,
2687                    1,
2688                >,
2689                fidl::encoding::DefaultFuchsiaResourceDialect,
2690            >,
2691    >
2692        fidl::encoding::Encode<
2693            ArrayOfVectorOfEventInStructWithDefaultRights,
2694            fidl::encoding::DefaultFuchsiaResourceDialect,
2695        > for (T0,)
2696    {
2697        #[inline]
2698        unsafe fn encode(
2699            self,
2700            encoder: &mut fidl::encoding::Encoder<
2701                '_,
2702                fidl::encoding::DefaultFuchsiaResourceDialect,
2703            >,
2704            offset: usize,
2705            depth: fidl::encoding::Depth,
2706        ) -> fidl::Result<()> {
2707            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2708            // Zero out padding regions. There's no need to apply masks
2709            // because the unmasked parts will be overwritten by fields.
2710            // Write the fields.
2711            self.0.encode(encoder, offset + 0, depth)?;
2712            Ok(())
2713        }
2714    }
2715
2716    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2717        for ArrayOfVectorOfEventInStructWithDefaultRights
2718    {
2719        #[inline(always)]
2720        fn new_empty() -> Self {
2721            Self {
2722                h: fidl::new_empty!(
2723                    fidl::encoding::Array<
2724                        fidl::encoding::Vector<
2725                            fidl::encoding::HandleType<
2726                                fidl::Event,
2727                                { fidl::ObjectType::EVENT.into_raw() },
2728                                53251,
2729                            >,
2730                            1,
2731                        >,
2732                        1,
2733                    >,
2734                    fidl::encoding::DefaultFuchsiaResourceDialect
2735                ),
2736            }
2737        }
2738
2739        #[inline]
2740        unsafe fn decode(
2741            &mut self,
2742            decoder: &mut fidl::encoding::Decoder<
2743                '_,
2744                fidl::encoding::DefaultFuchsiaResourceDialect,
2745            >,
2746            offset: usize,
2747            _depth: fidl::encoding::Depth,
2748        ) -> fidl::Result<()> {
2749            decoder.debug_check_bounds::<Self>(offset);
2750            // Verify that padding bytes are zero.
2751            fidl::decode!(
2752                fidl::encoding::Array<
2753                    fidl::encoding::Vector<
2754                        fidl::encoding::HandleType<
2755                            fidl::Event,
2756                            { fidl::ObjectType::EVENT.into_raw() },
2757                            53251,
2758                        >,
2759                        1,
2760                    >,
2761                    1,
2762                >,
2763                fidl::encoding::DefaultFuchsiaResourceDialect,
2764                &mut self.h,
2765                decoder,
2766                offset + 0,
2767                _depth
2768            )?;
2769            Ok(())
2770        }
2771    }
2772
2773    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2774        type Borrowed<'a> = &'a mut Self;
2775        fn take_or_borrow<'a>(
2776            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2777        ) -> Self::Borrowed<'a> {
2778            value
2779        }
2780    }
2781
2782    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2783        type Owned = Self;
2784
2785        #[inline(always)]
2786        fn inline_align(_context: fidl::encoding::Context) -> usize {
2787            8
2788        }
2789
2790        #[inline(always)]
2791        fn inline_size(_context: fidl::encoding::Context) -> usize {
2792            16
2793        }
2794    }
2795
2796    unsafe impl
2797        fidl::encoding::Encode<
2798            ArrayOfVectorOfEventInStructWithReducedRights,
2799            fidl::encoding::DefaultFuchsiaResourceDialect,
2800        > for &mut ArrayOfVectorOfEventInStructWithReducedRights
2801    {
2802        #[inline]
2803        unsafe fn encode(
2804            self,
2805            encoder: &mut fidl::encoding::Encoder<
2806                '_,
2807                fidl::encoding::DefaultFuchsiaResourceDialect,
2808            >,
2809            offset: usize,
2810            _depth: fidl::encoding::Depth,
2811        ) -> fidl::Result<()> {
2812            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2813            // Delegate to tuple encoding.
2814            fidl::encoding::Encode::<
2815                ArrayOfVectorOfEventInStructWithReducedRights,
2816                fidl::encoding::DefaultFuchsiaResourceDialect,
2817            >::encode(
2818                (<fidl::encoding::Array<
2819                    fidl::encoding::Vector<
2820                        fidl::encoding::HandleType<
2821                            fidl::Event,
2822                            { fidl::ObjectType::EVENT.into_raw() },
2823                            49155,
2824                        >,
2825                        1,
2826                    >,
2827                    1,
2828                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2829                    &mut self.h
2830                ),),
2831                encoder,
2832                offset,
2833                _depth,
2834            )
2835        }
2836    }
2837    unsafe impl<
2838        T0: fidl::encoding::Encode<
2839                fidl::encoding::Array<
2840                    fidl::encoding::Vector<
2841                        fidl::encoding::HandleType<
2842                            fidl::Event,
2843                            { fidl::ObjectType::EVENT.into_raw() },
2844                            49155,
2845                        >,
2846                        1,
2847                    >,
2848                    1,
2849                >,
2850                fidl::encoding::DefaultFuchsiaResourceDialect,
2851            >,
2852    >
2853        fidl::encoding::Encode<
2854            ArrayOfVectorOfEventInStructWithReducedRights,
2855            fidl::encoding::DefaultFuchsiaResourceDialect,
2856        > for (T0,)
2857    {
2858        #[inline]
2859        unsafe fn encode(
2860            self,
2861            encoder: &mut fidl::encoding::Encoder<
2862                '_,
2863                fidl::encoding::DefaultFuchsiaResourceDialect,
2864            >,
2865            offset: usize,
2866            depth: fidl::encoding::Depth,
2867        ) -> fidl::Result<()> {
2868            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2869            // Zero out padding regions. There's no need to apply masks
2870            // because the unmasked parts will be overwritten by fields.
2871            // Write the fields.
2872            self.0.encode(encoder, offset + 0, depth)?;
2873            Ok(())
2874        }
2875    }
2876
2877    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2878        for ArrayOfVectorOfEventInStructWithReducedRights
2879    {
2880        #[inline(always)]
2881        fn new_empty() -> Self {
2882            Self {
2883                h: fidl::new_empty!(
2884                    fidl::encoding::Array<
2885                        fidl::encoding::Vector<
2886                            fidl::encoding::HandleType<
2887                                fidl::Event,
2888                                { fidl::ObjectType::EVENT.into_raw() },
2889                                49155,
2890                            >,
2891                            1,
2892                        >,
2893                        1,
2894                    >,
2895                    fidl::encoding::DefaultFuchsiaResourceDialect
2896                ),
2897            }
2898        }
2899
2900        #[inline]
2901        unsafe fn decode(
2902            &mut self,
2903            decoder: &mut fidl::encoding::Decoder<
2904                '_,
2905                fidl::encoding::DefaultFuchsiaResourceDialect,
2906            >,
2907            offset: usize,
2908            _depth: fidl::encoding::Depth,
2909        ) -> fidl::Result<()> {
2910            decoder.debug_check_bounds::<Self>(offset);
2911            // Verify that padding bytes are zero.
2912            fidl::decode!(
2913                fidl::encoding::Array<
2914                    fidl::encoding::Vector<
2915                        fidl::encoding::HandleType<
2916                            fidl::Event,
2917                            { fidl::ObjectType::EVENT.into_raw() },
2918                            49155,
2919                        >,
2920                        1,
2921                    >,
2922                    1,
2923                >,
2924                fidl::encoding::DefaultFuchsiaResourceDialect,
2925                &mut self.h,
2926                decoder,
2927                offset + 0,
2928                _depth
2929            )?;
2930            Ok(())
2931        }
2932    }
2933
2934    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2935        type Borrowed<'a> = &'a mut Self;
2936        fn take_or_borrow<'a>(
2937            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2938        ) -> Self::Borrowed<'a> {
2939            value
2940        }
2941    }
2942
2943    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2944        type Owned = Self;
2945
2946        #[inline(always)]
2947        fn inline_align(_context: fidl::encoding::Context) -> usize {
2948            8
2949        }
2950
2951        #[inline(always)]
2952        fn inline_size(_context: fidl::encoding::Context) -> usize {
2953            16
2954        }
2955    }
2956
2957    unsafe impl
2958        fidl::encoding::Encode<
2959            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
2960            fidl::encoding::DefaultFuchsiaResourceDialect,
2961        > for &mut ArrayOfVectorOfEventInTableWithDefaultRightsStruct
2962    {
2963        #[inline]
2964        unsafe fn encode(
2965            self,
2966            encoder: &mut fidl::encoding::Encoder<
2967                '_,
2968                fidl::encoding::DefaultFuchsiaResourceDialect,
2969            >,
2970            offset: usize,
2971            _depth: fidl::encoding::Depth,
2972        ) -> fidl::Result<()> {
2973            encoder
2974                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
2975            // Delegate to tuple encoding.
2976            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2977                (
2978                    <ArrayOfVectorOfEventInTableWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
2979                ),
2980                encoder, offset, _depth
2981            )
2982        }
2983    }
2984    unsafe impl<
2985        T0: fidl::encoding::Encode<
2986                ArrayOfVectorOfEventInTableWithDefaultRights,
2987                fidl::encoding::DefaultFuchsiaResourceDialect,
2988            >,
2989    >
2990        fidl::encoding::Encode<
2991            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
2992            fidl::encoding::DefaultFuchsiaResourceDialect,
2993        > for (T0,)
2994    {
2995        #[inline]
2996        unsafe fn encode(
2997            self,
2998            encoder: &mut fidl::encoding::Encoder<
2999                '_,
3000                fidl::encoding::DefaultFuchsiaResourceDialect,
3001            >,
3002            offset: usize,
3003            depth: fidl::encoding::Depth,
3004        ) -> fidl::Result<()> {
3005            encoder
3006                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
3007            // Zero out padding regions. There's no need to apply masks
3008            // because the unmasked parts will be overwritten by fields.
3009            // Write the fields.
3010            self.0.encode(encoder, offset + 0, depth)?;
3011            Ok(())
3012        }
3013    }
3014
3015    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3016        for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
3017    {
3018        #[inline(always)]
3019        fn new_empty() -> Self {
3020            Self {
3021                t: fidl::new_empty!(
3022                    ArrayOfVectorOfEventInTableWithDefaultRights,
3023                    fidl::encoding::DefaultFuchsiaResourceDialect
3024                ),
3025            }
3026        }
3027
3028        #[inline]
3029        unsafe fn decode(
3030            &mut self,
3031            decoder: &mut fidl::encoding::Decoder<
3032                '_,
3033                fidl::encoding::DefaultFuchsiaResourceDialect,
3034            >,
3035            offset: usize,
3036            _depth: fidl::encoding::Depth,
3037        ) -> fidl::Result<()> {
3038            decoder.debug_check_bounds::<Self>(offset);
3039            // Verify that padding bytes are zero.
3040            fidl::decode!(
3041                ArrayOfVectorOfEventInTableWithDefaultRights,
3042                fidl::encoding::DefaultFuchsiaResourceDialect,
3043                &mut self.t,
3044                decoder,
3045                offset + 0,
3046                _depth
3047            )?;
3048            Ok(())
3049        }
3050    }
3051
3052    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3053        type Borrowed<'a> = &'a mut Self;
3054        fn take_or_borrow<'a>(
3055            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3056        ) -> Self::Borrowed<'a> {
3057            value
3058        }
3059    }
3060
3061    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3062        type Owned = Self;
3063
3064        #[inline(always)]
3065        fn inline_align(_context: fidl::encoding::Context) -> usize {
3066            8
3067        }
3068
3069        #[inline(always)]
3070        fn inline_size(_context: fidl::encoding::Context) -> usize {
3071            16
3072        }
3073    }
3074
3075    unsafe impl
3076        fidl::encoding::Encode<
3077            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3078            fidl::encoding::DefaultFuchsiaResourceDialect,
3079        > for &mut ArrayOfVectorOfEventInTableWithReducedRightsStruct
3080    {
3081        #[inline]
3082        unsafe fn encode(
3083            self,
3084            encoder: &mut fidl::encoding::Encoder<
3085                '_,
3086                fidl::encoding::DefaultFuchsiaResourceDialect,
3087            >,
3088            offset: usize,
3089            _depth: fidl::encoding::Depth,
3090        ) -> fidl::Result<()> {
3091            encoder
3092                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3093            // Delegate to tuple encoding.
3094            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3095                (
3096                    <ArrayOfVectorOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
3097                ),
3098                encoder, offset, _depth
3099            )
3100        }
3101    }
3102    unsafe impl<
3103        T0: fidl::encoding::Encode<
3104                ArrayOfVectorOfEventInTableWithReducedRights,
3105                fidl::encoding::DefaultFuchsiaResourceDialect,
3106            >,
3107    >
3108        fidl::encoding::Encode<
3109            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3110            fidl::encoding::DefaultFuchsiaResourceDialect,
3111        > for (T0,)
3112    {
3113        #[inline]
3114        unsafe fn encode(
3115            self,
3116            encoder: &mut fidl::encoding::Encoder<
3117                '_,
3118                fidl::encoding::DefaultFuchsiaResourceDialect,
3119            >,
3120            offset: usize,
3121            depth: fidl::encoding::Depth,
3122        ) -> fidl::Result<()> {
3123            encoder
3124                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3125            // Zero out padding regions. There's no need to apply masks
3126            // because the unmasked parts will be overwritten by fields.
3127            // Write the fields.
3128            self.0.encode(encoder, offset + 0, depth)?;
3129            Ok(())
3130        }
3131    }
3132
3133    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3134        for ArrayOfVectorOfEventInTableWithReducedRightsStruct
3135    {
3136        #[inline(always)]
3137        fn new_empty() -> Self {
3138            Self {
3139                t: fidl::new_empty!(
3140                    ArrayOfVectorOfEventInTableWithReducedRights,
3141                    fidl::encoding::DefaultFuchsiaResourceDialect
3142                ),
3143            }
3144        }
3145
3146        #[inline]
3147        unsafe fn decode(
3148            &mut self,
3149            decoder: &mut fidl::encoding::Decoder<
3150                '_,
3151                fidl::encoding::DefaultFuchsiaResourceDialect,
3152            >,
3153            offset: usize,
3154            _depth: fidl::encoding::Depth,
3155        ) -> fidl::Result<()> {
3156            decoder.debug_check_bounds::<Self>(offset);
3157            // Verify that padding bytes are zero.
3158            fidl::decode!(
3159                ArrayOfVectorOfEventInTableWithReducedRights,
3160                fidl::encoding::DefaultFuchsiaResourceDialect,
3161                &mut self.t,
3162                decoder,
3163                offset + 0,
3164                _depth
3165            )?;
3166            Ok(())
3167        }
3168    }
3169
3170    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3171        type Borrowed<'a> = &'a mut Self;
3172        fn take_or_borrow<'a>(
3173            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3174        ) -> Self::Borrowed<'a> {
3175            value
3176        }
3177    }
3178
3179    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3180        type Owned = Self;
3181
3182        #[inline(always)]
3183        fn inline_align(_context: fidl::encoding::Context) -> usize {
3184            8
3185        }
3186
3187        #[inline(always)]
3188        fn inline_size(_context: fidl::encoding::Context) -> usize {
3189            16
3190        }
3191    }
3192
3193    unsafe impl
3194        fidl::encoding::Encode<
3195            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3196            fidl::encoding::DefaultFuchsiaResourceDialect,
3197        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3198    {
3199        #[inline]
3200        unsafe fn encode(
3201            self,
3202            encoder: &mut fidl::encoding::Encoder<
3203                '_,
3204                fidl::encoding::DefaultFuchsiaResourceDialect,
3205            >,
3206            offset: usize,
3207            _depth: fidl::encoding::Depth,
3208        ) -> fidl::Result<()> {
3209            encoder
3210                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3211            // Delegate to tuple encoding.
3212            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3213                (
3214                    <ArrayOfVectorOfEventInUnionWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3215                ),
3216                encoder, offset, _depth
3217            )
3218        }
3219    }
3220    unsafe impl<
3221        T0: fidl::encoding::Encode<
3222                ArrayOfVectorOfEventInUnionWithDefaultRights,
3223                fidl::encoding::DefaultFuchsiaResourceDialect,
3224            >,
3225    >
3226        fidl::encoding::Encode<
3227            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3228            fidl::encoding::DefaultFuchsiaResourceDialect,
3229        > for (T0,)
3230    {
3231        #[inline]
3232        unsafe fn encode(
3233            self,
3234            encoder: &mut fidl::encoding::Encoder<
3235                '_,
3236                fidl::encoding::DefaultFuchsiaResourceDialect,
3237            >,
3238            offset: usize,
3239            depth: fidl::encoding::Depth,
3240        ) -> fidl::Result<()> {
3241            encoder
3242                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3243            // Zero out padding regions. There's no need to apply masks
3244            // because the unmasked parts will be overwritten by fields.
3245            // Write the fields.
3246            self.0.encode(encoder, offset + 0, depth)?;
3247            Ok(())
3248        }
3249    }
3250
3251    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3252        for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3253    {
3254        #[inline(always)]
3255        fn new_empty() -> Self {
3256            Self {
3257                u: fidl::new_empty!(
3258                    ArrayOfVectorOfEventInUnionWithDefaultRights,
3259                    fidl::encoding::DefaultFuchsiaResourceDialect
3260                ),
3261            }
3262        }
3263
3264        #[inline]
3265        unsafe fn decode(
3266            &mut self,
3267            decoder: &mut fidl::encoding::Decoder<
3268                '_,
3269                fidl::encoding::DefaultFuchsiaResourceDialect,
3270            >,
3271            offset: usize,
3272            _depth: fidl::encoding::Depth,
3273        ) -> fidl::Result<()> {
3274            decoder.debug_check_bounds::<Self>(offset);
3275            // Verify that padding bytes are zero.
3276            fidl::decode!(
3277                ArrayOfVectorOfEventInUnionWithDefaultRights,
3278                fidl::encoding::DefaultFuchsiaResourceDialect,
3279                &mut self.u,
3280                decoder,
3281                offset + 0,
3282                _depth
3283            )?;
3284            Ok(())
3285        }
3286    }
3287
3288    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3289        type Borrowed<'a> = &'a mut Self;
3290        fn take_or_borrow<'a>(
3291            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3292        ) -> Self::Borrowed<'a> {
3293            value
3294        }
3295    }
3296
3297    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3298        type Owned = Self;
3299
3300        #[inline(always)]
3301        fn inline_align(_context: fidl::encoding::Context) -> usize {
3302            8
3303        }
3304
3305        #[inline(always)]
3306        fn inline_size(_context: fidl::encoding::Context) -> usize {
3307            16
3308        }
3309    }
3310
3311    unsafe impl
3312        fidl::encoding::Encode<
3313            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3314            fidl::encoding::DefaultFuchsiaResourceDialect,
3315        > for &mut ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3316    {
3317        #[inline]
3318        unsafe fn encode(
3319            self,
3320            encoder: &mut fidl::encoding::Encoder<
3321                '_,
3322                fidl::encoding::DefaultFuchsiaResourceDialect,
3323            >,
3324            offset: usize,
3325            _depth: fidl::encoding::Depth,
3326        ) -> fidl::Result<()> {
3327            encoder
3328                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3329            // Delegate to tuple encoding.
3330            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3331                (
3332                    <ArrayOfVectorOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3333                ),
3334                encoder, offset, _depth
3335            )
3336        }
3337    }
3338    unsafe impl<
3339        T0: fidl::encoding::Encode<
3340                ArrayOfVectorOfEventInUnionWithReducedRights,
3341                fidl::encoding::DefaultFuchsiaResourceDialect,
3342            >,
3343    >
3344        fidl::encoding::Encode<
3345            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3346            fidl::encoding::DefaultFuchsiaResourceDialect,
3347        > for (T0,)
3348    {
3349        #[inline]
3350        unsafe fn encode(
3351            self,
3352            encoder: &mut fidl::encoding::Encoder<
3353                '_,
3354                fidl::encoding::DefaultFuchsiaResourceDialect,
3355            >,
3356            offset: usize,
3357            depth: fidl::encoding::Depth,
3358        ) -> fidl::Result<()> {
3359            encoder
3360                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3361            // Zero out padding regions. There's no need to apply masks
3362            // because the unmasked parts will be overwritten by fields.
3363            // Write the fields.
3364            self.0.encode(encoder, offset + 0, depth)?;
3365            Ok(())
3366        }
3367    }
3368
3369    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3370        for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3371    {
3372        #[inline(always)]
3373        fn new_empty() -> Self {
3374            Self {
3375                u: fidl::new_empty!(
3376                    ArrayOfVectorOfEventInUnionWithReducedRights,
3377                    fidl::encoding::DefaultFuchsiaResourceDialect
3378                ),
3379            }
3380        }
3381
3382        #[inline]
3383        unsafe fn decode(
3384            &mut self,
3385            decoder: &mut fidl::encoding::Decoder<
3386                '_,
3387                fidl::encoding::DefaultFuchsiaResourceDialect,
3388            >,
3389            offset: usize,
3390            _depth: fidl::encoding::Depth,
3391        ) -> fidl::Result<()> {
3392            decoder.debug_check_bounds::<Self>(offset);
3393            // Verify that padding bytes are zero.
3394            fidl::decode!(
3395                ArrayOfVectorOfEventInUnionWithReducedRights,
3396                fidl::encoding::DefaultFuchsiaResourceDialect,
3397                &mut self.u,
3398                decoder,
3399                offset + 0,
3400                _depth
3401            )?;
3402            Ok(())
3403        }
3404    }
3405
3406    impl fidl::encoding::ResourceTypeMarker for Bounded32NonnullableVectorOfHandles {
3407        type Borrowed<'a> = &'a mut Self;
3408        fn take_or_borrow<'a>(
3409            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3410        ) -> Self::Borrowed<'a> {
3411            value
3412        }
3413    }
3414
3415    unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfHandles {
3416        type Owned = Self;
3417
3418        #[inline(always)]
3419        fn inline_align(_context: fidl::encoding::Context) -> usize {
3420            8
3421        }
3422
3423        #[inline(always)]
3424        fn inline_size(_context: fidl::encoding::Context) -> usize {
3425            16
3426        }
3427    }
3428
3429    unsafe impl
3430        fidl::encoding::Encode<
3431            Bounded32NonnullableVectorOfHandles,
3432            fidl::encoding::DefaultFuchsiaResourceDialect,
3433        > for &mut Bounded32NonnullableVectorOfHandles
3434    {
3435        #[inline]
3436        unsafe fn encode(
3437            self,
3438            encoder: &mut fidl::encoding::Encoder<
3439                '_,
3440                fidl::encoding::DefaultFuchsiaResourceDialect,
3441            >,
3442            offset: usize,
3443            _depth: fidl::encoding::Depth,
3444        ) -> fidl::Result<()> {
3445            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3446            // Delegate to tuple encoding.
3447            fidl::encoding::Encode::<
3448                Bounded32NonnullableVectorOfHandles,
3449                fidl::encoding::DefaultFuchsiaResourceDialect,
3450            >::encode(
3451                (<fidl::encoding::Vector<
3452                    fidl::encoding::HandleType<
3453                        fidl::NullableHandle,
3454                        { fidl::ObjectType::NONE.into_raw() },
3455                        2147483648,
3456                    >,
3457                    32,
3458                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3459                    &mut self.vh0
3460                ),),
3461                encoder,
3462                offset,
3463                _depth,
3464            )
3465        }
3466    }
3467    unsafe impl<
3468        T0: fidl::encoding::Encode<
3469                fidl::encoding::Vector<
3470                    fidl::encoding::HandleType<
3471                        fidl::NullableHandle,
3472                        { fidl::ObjectType::NONE.into_raw() },
3473                        2147483648,
3474                    >,
3475                    32,
3476                >,
3477                fidl::encoding::DefaultFuchsiaResourceDialect,
3478            >,
3479    >
3480        fidl::encoding::Encode<
3481            Bounded32NonnullableVectorOfHandles,
3482            fidl::encoding::DefaultFuchsiaResourceDialect,
3483        > for (T0,)
3484    {
3485        #[inline]
3486        unsafe fn encode(
3487            self,
3488            encoder: &mut fidl::encoding::Encoder<
3489                '_,
3490                fidl::encoding::DefaultFuchsiaResourceDialect,
3491            >,
3492            offset: usize,
3493            depth: fidl::encoding::Depth,
3494        ) -> fidl::Result<()> {
3495            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3496            // Zero out padding regions. There's no need to apply masks
3497            // because the unmasked parts will be overwritten by fields.
3498            // Write the fields.
3499            self.0.encode(encoder, offset + 0, depth)?;
3500            Ok(())
3501        }
3502    }
3503
3504    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3505        for Bounded32NonnullableVectorOfHandles
3506    {
3507        #[inline(always)]
3508        fn new_empty() -> Self {
3509            Self {
3510                vh0: fidl::new_empty!(
3511                    fidl::encoding::Vector<
3512                        fidl::encoding::HandleType<
3513                            fidl::NullableHandle,
3514                            { fidl::ObjectType::NONE.into_raw() },
3515                            2147483648,
3516                        >,
3517                        32,
3518                    >,
3519                    fidl::encoding::DefaultFuchsiaResourceDialect
3520                ),
3521            }
3522        }
3523
3524        #[inline]
3525        unsafe fn decode(
3526            &mut self,
3527            decoder: &mut fidl::encoding::Decoder<
3528                '_,
3529                fidl::encoding::DefaultFuchsiaResourceDialect,
3530            >,
3531            offset: usize,
3532            _depth: fidl::encoding::Depth,
3533        ) -> fidl::Result<()> {
3534            decoder.debug_check_bounds::<Self>(offset);
3535            // Verify that padding bytes are zero.
3536            fidl::decode!(
3537                fidl::encoding::Vector<
3538                    fidl::encoding::HandleType<
3539                        fidl::NullableHandle,
3540                        { fidl::ObjectType::NONE.into_raw() },
3541                        2147483648,
3542                    >,
3543                    32,
3544                >,
3545                fidl::encoding::DefaultFuchsiaResourceDialect,
3546                &mut self.vh0,
3547                decoder,
3548                offset + 0,
3549                _depth
3550            )?;
3551            Ok(())
3552        }
3553    }
3554
3555    impl fidl::encoding::ResourceTypeMarker for Bounded32NullableVectorOfHandles {
3556        type Borrowed<'a> = &'a mut Self;
3557        fn take_or_borrow<'a>(
3558            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3559        ) -> Self::Borrowed<'a> {
3560            value
3561        }
3562    }
3563
3564    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfHandles {
3565        type Owned = Self;
3566
3567        #[inline(always)]
3568        fn inline_align(_context: fidl::encoding::Context) -> usize {
3569            8
3570        }
3571
3572        #[inline(always)]
3573        fn inline_size(_context: fidl::encoding::Context) -> usize {
3574            16
3575        }
3576    }
3577
3578    unsafe impl
3579        fidl::encoding::Encode<
3580            Bounded32NullableVectorOfHandles,
3581            fidl::encoding::DefaultFuchsiaResourceDialect,
3582        > for &mut Bounded32NullableVectorOfHandles
3583    {
3584        #[inline]
3585        unsafe fn encode(
3586            self,
3587            encoder: &mut fidl::encoding::Encoder<
3588                '_,
3589                fidl::encoding::DefaultFuchsiaResourceDialect,
3590            >,
3591            offset: usize,
3592            _depth: fidl::encoding::Depth,
3593        ) -> fidl::Result<()> {
3594            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3595            // Delegate to tuple encoding.
3596            fidl::encoding::Encode::<
3597                Bounded32NullableVectorOfHandles,
3598                fidl::encoding::DefaultFuchsiaResourceDialect,
3599            >::encode(
3600                (<fidl::encoding::Optional<
3601                    fidl::encoding::Vector<
3602                        fidl::encoding::HandleType<
3603                            fidl::NullableHandle,
3604                            { fidl::ObjectType::NONE.into_raw() },
3605                            2147483648,
3606                        >,
3607                        32,
3608                    >,
3609                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3610                    &mut self.vh0
3611                ),),
3612                encoder,
3613                offset,
3614                _depth,
3615            )
3616        }
3617    }
3618    unsafe impl<
3619        T0: fidl::encoding::Encode<
3620                fidl::encoding::Optional<
3621                    fidl::encoding::Vector<
3622                        fidl::encoding::HandleType<
3623                            fidl::NullableHandle,
3624                            { fidl::ObjectType::NONE.into_raw() },
3625                            2147483648,
3626                        >,
3627                        32,
3628                    >,
3629                >,
3630                fidl::encoding::DefaultFuchsiaResourceDialect,
3631            >,
3632    >
3633        fidl::encoding::Encode<
3634            Bounded32NullableVectorOfHandles,
3635            fidl::encoding::DefaultFuchsiaResourceDialect,
3636        > for (T0,)
3637    {
3638        #[inline]
3639        unsafe fn encode(
3640            self,
3641            encoder: &mut fidl::encoding::Encoder<
3642                '_,
3643                fidl::encoding::DefaultFuchsiaResourceDialect,
3644            >,
3645            offset: usize,
3646            depth: fidl::encoding::Depth,
3647        ) -> fidl::Result<()> {
3648            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3649            // Zero out padding regions. There's no need to apply masks
3650            // because the unmasked parts will be overwritten by fields.
3651            // Write the fields.
3652            self.0.encode(encoder, offset + 0, depth)?;
3653            Ok(())
3654        }
3655    }
3656
3657    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3658        for Bounded32NullableVectorOfHandles
3659    {
3660        #[inline(always)]
3661        fn new_empty() -> Self {
3662            Self {
3663                vh0: fidl::new_empty!(
3664                    fidl::encoding::Optional<
3665                        fidl::encoding::Vector<
3666                            fidl::encoding::HandleType<
3667                                fidl::NullableHandle,
3668                                { fidl::ObjectType::NONE.into_raw() },
3669                                2147483648,
3670                            >,
3671                            32,
3672                        >,
3673                    >,
3674                    fidl::encoding::DefaultFuchsiaResourceDialect
3675                ),
3676            }
3677        }
3678
3679        #[inline]
3680        unsafe fn decode(
3681            &mut self,
3682            decoder: &mut fidl::encoding::Decoder<
3683                '_,
3684                fidl::encoding::DefaultFuchsiaResourceDialect,
3685            >,
3686            offset: usize,
3687            _depth: fidl::encoding::Depth,
3688        ) -> fidl::Result<()> {
3689            decoder.debug_check_bounds::<Self>(offset);
3690            // Verify that padding bytes are zero.
3691            fidl::decode!(
3692                fidl::encoding::Optional<
3693                    fidl::encoding::Vector<
3694                        fidl::encoding::HandleType<
3695                            fidl::NullableHandle,
3696                            { fidl::ObjectType::NONE.into_raw() },
3697                            2147483648,
3698                        >,
3699                        32,
3700                    >,
3701                >,
3702                fidl::encoding::DefaultFuchsiaResourceDialect,
3703                &mut self.vh0,
3704                decoder,
3705                offset + 0,
3706                _depth
3707            )?;
3708            Ok(())
3709        }
3710    }
3711
3712    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleHandle {
3713        type Borrowed<'a> = &'a mut Self;
3714        fn take_or_borrow<'a>(
3715            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3716        ) -> Self::Borrowed<'a> {
3717            value
3718        }
3719    }
3720
3721    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleHandle {
3722        type Owned = Self;
3723
3724        #[inline(always)]
3725        fn inline_align(_context: fidl::encoding::Context) -> usize {
3726            8
3727        }
3728
3729        #[inline(always)]
3730        fn inline_size(_context: fidl::encoding::Context) -> usize {
3731            8
3732        }
3733    }
3734
3735    unsafe impl
3736        fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3737        for &mut BoxOfSingleHandle
3738    {
3739        #[inline]
3740        unsafe fn encode(
3741            self,
3742            encoder: &mut fidl::encoding::Encoder<
3743                '_,
3744                fidl::encoding::DefaultFuchsiaResourceDialect,
3745            >,
3746            offset: usize,
3747            _depth: fidl::encoding::Depth,
3748        ) -> fidl::Result<()> {
3749            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3750            // Delegate to tuple encoding.
3751            fidl::encoding::Encode::<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3752                (
3753                    <fidl::encoding::Boxed<SingleHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3754                ),
3755                encoder, offset, _depth
3756            )
3757        }
3758    }
3759    unsafe impl<
3760        T0: fidl::encoding::Encode<
3761                fidl::encoding::Boxed<SingleHandle>,
3762                fidl::encoding::DefaultFuchsiaResourceDialect,
3763            >,
3764    > fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3765        for (T0,)
3766    {
3767        #[inline]
3768        unsafe fn encode(
3769            self,
3770            encoder: &mut fidl::encoding::Encoder<
3771                '_,
3772                fidl::encoding::DefaultFuchsiaResourceDialect,
3773            >,
3774            offset: usize,
3775            depth: fidl::encoding::Depth,
3776        ) -> fidl::Result<()> {
3777            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3778            // Zero out padding regions. There's no need to apply masks
3779            // because the unmasked parts will be overwritten by fields.
3780            // Write the fields.
3781            self.0.encode(encoder, offset + 0, depth)?;
3782            Ok(())
3783        }
3784    }
3785
3786    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3787        for BoxOfSingleHandle
3788    {
3789        #[inline(always)]
3790        fn new_empty() -> Self {
3791            Self {
3792                b: fidl::new_empty!(
3793                    fidl::encoding::Boxed<SingleHandle>,
3794                    fidl::encoding::DefaultFuchsiaResourceDialect
3795                ),
3796            }
3797        }
3798
3799        #[inline]
3800        unsafe fn decode(
3801            &mut self,
3802            decoder: &mut fidl::encoding::Decoder<
3803                '_,
3804                fidl::encoding::DefaultFuchsiaResourceDialect,
3805            >,
3806            offset: usize,
3807            _depth: fidl::encoding::Depth,
3808        ) -> fidl::Result<()> {
3809            decoder.debug_check_bounds::<Self>(offset);
3810            // Verify that padding bytes are zero.
3811            fidl::decode!(
3812                fidl::encoding::Boxed<SingleHandle>,
3813                fidl::encoding::DefaultFuchsiaResourceDialect,
3814                &mut self.b,
3815                decoder,
3816                offset + 0,
3817                _depth
3818            )?;
3819            Ok(())
3820        }
3821    }
3822
3823    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleOptionalHandle {
3824        type Borrowed<'a> = &'a mut Self;
3825        fn take_or_borrow<'a>(
3826            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3827        ) -> Self::Borrowed<'a> {
3828            value
3829        }
3830    }
3831
3832    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleOptionalHandle {
3833        type Owned = Self;
3834
3835        #[inline(always)]
3836        fn inline_align(_context: fidl::encoding::Context) -> usize {
3837            8
3838        }
3839
3840        #[inline(always)]
3841        fn inline_size(_context: fidl::encoding::Context) -> usize {
3842            8
3843        }
3844    }
3845
3846    unsafe impl
3847        fidl::encoding::Encode<
3848            BoxOfSingleOptionalHandle,
3849            fidl::encoding::DefaultFuchsiaResourceDialect,
3850        > for &mut BoxOfSingleOptionalHandle
3851    {
3852        #[inline]
3853        unsafe fn encode(
3854            self,
3855            encoder: &mut fidl::encoding::Encoder<
3856                '_,
3857                fidl::encoding::DefaultFuchsiaResourceDialect,
3858            >,
3859            offset: usize,
3860            _depth: fidl::encoding::Depth,
3861        ) -> fidl::Result<()> {
3862            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3863            // Delegate to tuple encoding.
3864            fidl::encoding::Encode::<BoxOfSingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3865                (
3866                    <fidl::encoding::Boxed<SingleOptionalHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3867                ),
3868                encoder, offset, _depth
3869            )
3870        }
3871    }
3872    unsafe impl<
3873        T0: fidl::encoding::Encode<
3874                fidl::encoding::Boxed<SingleOptionalHandle>,
3875                fidl::encoding::DefaultFuchsiaResourceDialect,
3876            >,
3877    >
3878        fidl::encoding::Encode<
3879            BoxOfSingleOptionalHandle,
3880            fidl::encoding::DefaultFuchsiaResourceDialect,
3881        > for (T0,)
3882    {
3883        #[inline]
3884        unsafe fn encode(
3885            self,
3886            encoder: &mut fidl::encoding::Encoder<
3887                '_,
3888                fidl::encoding::DefaultFuchsiaResourceDialect,
3889            >,
3890            offset: usize,
3891            depth: fidl::encoding::Depth,
3892        ) -> fidl::Result<()> {
3893            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3894            // Zero out padding regions. There's no need to apply masks
3895            // because the unmasked parts will be overwritten by fields.
3896            // Write the fields.
3897            self.0.encode(encoder, offset + 0, depth)?;
3898            Ok(())
3899        }
3900    }
3901
3902    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3903        for BoxOfSingleOptionalHandle
3904    {
3905        #[inline(always)]
3906        fn new_empty() -> Self {
3907            Self {
3908                b: fidl::new_empty!(
3909                    fidl::encoding::Boxed<SingleOptionalHandle>,
3910                    fidl::encoding::DefaultFuchsiaResourceDialect
3911                ),
3912            }
3913        }
3914
3915        #[inline]
3916        unsafe fn decode(
3917            &mut self,
3918            decoder: &mut fidl::encoding::Decoder<
3919                '_,
3920                fidl::encoding::DefaultFuchsiaResourceDialect,
3921            >,
3922            offset: usize,
3923            _depth: fidl::encoding::Depth,
3924        ) -> fidl::Result<()> {
3925            decoder.debug_check_bounds::<Self>(offset);
3926            // Verify that padding bytes are zero.
3927            fidl::decode!(
3928                fidl::encoding::Boxed<SingleOptionalHandle>,
3929                fidl::encoding::DefaultFuchsiaResourceDialect,
3930                &mut self.b,
3931                decoder,
3932                offset + 0,
3933                _depth
3934            )?;
3935            Ok(())
3936        }
3937    }
3938
3939    impl fidl::encoding::ResourceTypeMarker for CreateComponentRequest {
3940        type Borrowed<'a> = &'a mut Self;
3941        fn take_or_borrow<'a>(
3942            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3943        ) -> Self::Borrowed<'a> {
3944            value
3945        }
3946    }
3947
3948    unsafe impl fidl::encoding::TypeMarker for CreateComponentRequest {
3949        type Owned = Self;
3950
3951        #[inline(always)]
3952        fn inline_align(_context: fidl::encoding::Context) -> usize {
3953            8
3954        }
3955
3956        #[inline(always)]
3957        fn inline_size(_context: fidl::encoding::Context) -> usize {
3958            80
3959        }
3960    }
3961
3962    unsafe impl
3963        fidl::encoding::Encode<
3964            CreateComponentRequest,
3965            fidl::encoding::DefaultFuchsiaResourceDialect,
3966        > for &mut CreateComponentRequest
3967    {
3968        #[inline]
3969        unsafe fn encode(
3970            self,
3971            encoder: &mut fidl::encoding::Encoder<
3972                '_,
3973                fidl::encoding::DefaultFuchsiaResourceDialect,
3974            >,
3975            offset: usize,
3976            _depth: fidl::encoding::Depth,
3977        ) -> fidl::Result<()> {
3978            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
3979            // Delegate to tuple encoding.
3980            fidl::encoding::Encode::<
3981                CreateComponentRequest,
3982                fidl::encoding::DefaultFuchsiaResourceDialect,
3983            >::encode(
3984                (
3985                    <LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3986                        &mut self.launch_info,
3987                    ),
3988                    <fidl::encoding::Optional<
3989                        fidl::encoding::Endpoint<
3990                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
3991                        >,
3992                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3993                        &mut self.controller
3994                    ),
3995                ),
3996                encoder,
3997                offset,
3998                _depth,
3999            )
4000        }
4001    }
4002    unsafe impl<
4003        T0: fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>,
4004        T1: fidl::encoding::Encode<
4005                fidl::encoding::Optional<
4006                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4007                >,
4008                fidl::encoding::DefaultFuchsiaResourceDialect,
4009            >,
4010    >
4011        fidl::encoding::Encode<
4012            CreateComponentRequest,
4013            fidl::encoding::DefaultFuchsiaResourceDialect,
4014        > for (T0, T1)
4015    {
4016        #[inline]
4017        unsafe fn encode(
4018            self,
4019            encoder: &mut fidl::encoding::Encoder<
4020                '_,
4021                fidl::encoding::DefaultFuchsiaResourceDialect,
4022            >,
4023            offset: usize,
4024            depth: fidl::encoding::Depth,
4025        ) -> fidl::Result<()> {
4026            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4027            // Zero out padding regions. There's no need to apply masks
4028            // because the unmasked parts will be overwritten by fields.
4029            unsafe {
4030                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
4031                (ptr as *mut u64).write_unaligned(0);
4032            }
4033            // Write the fields.
4034            self.0.encode(encoder, offset + 0, depth)?;
4035            self.1.encode(encoder, offset + 72, depth)?;
4036            Ok(())
4037        }
4038    }
4039
4040    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4041        for CreateComponentRequest
4042    {
4043        #[inline(always)]
4044        fn new_empty() -> Self {
4045            Self {
4046                launch_info: fidl::new_empty!(
4047                    LaunchInfo,
4048                    fidl::encoding::DefaultFuchsiaResourceDialect
4049                ),
4050                controller: fidl::new_empty!(
4051                    fidl::encoding::Optional<
4052                        fidl::encoding::Endpoint<
4053                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4054                        >,
4055                    >,
4056                    fidl::encoding::DefaultFuchsiaResourceDialect
4057                ),
4058            }
4059        }
4060
4061        #[inline]
4062        unsafe fn decode(
4063            &mut self,
4064            decoder: &mut fidl::encoding::Decoder<
4065                '_,
4066                fidl::encoding::DefaultFuchsiaResourceDialect,
4067            >,
4068            offset: usize,
4069            _depth: fidl::encoding::Depth,
4070        ) -> fidl::Result<()> {
4071            decoder.debug_check_bounds::<Self>(offset);
4072            // Verify that padding bytes are zero.
4073            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
4074            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4075            let mask = 0xffffffff00000000u64;
4076            let maskedval = padval & mask;
4077            if maskedval != 0 {
4078                return Err(fidl::Error::NonZeroPadding {
4079                    padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
4080                });
4081            }
4082            fidl::decode!(
4083                LaunchInfo,
4084                fidl::encoding::DefaultFuchsiaResourceDialect,
4085                &mut self.launch_info,
4086                decoder,
4087                offset + 0,
4088                _depth
4089            )?;
4090            fidl::decode!(
4091                fidl::encoding::Optional<
4092                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4093                >,
4094                fidl::encoding::DefaultFuchsiaResourceDialect,
4095                &mut self.controller,
4096                decoder,
4097                offset + 72,
4098                _depth
4099            )?;
4100            Ok(())
4101        }
4102    }
4103
4104    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTableStruct {
4105        type Borrowed<'a> = &'a mut Self;
4106        fn take_or_borrow<'a>(
4107            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4108        ) -> Self::Borrowed<'a> {
4109            value
4110        }
4111    }
4112
4113    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTableStruct {
4114        type Owned = Self;
4115
4116        #[inline(always)]
4117        fn inline_align(_context: fidl::encoding::Context) -> usize {
4118            8
4119        }
4120
4121        #[inline(always)]
4122        fn inline_size(_context: fidl::encoding::Context) -> usize {
4123            16
4124        }
4125    }
4126
4127    unsafe impl
4128        fidl::encoding::Encode<
4129            EmptyResourceTableStruct,
4130            fidl::encoding::DefaultFuchsiaResourceDialect,
4131        > for &mut EmptyResourceTableStruct
4132    {
4133        #[inline]
4134        unsafe fn encode(
4135            self,
4136            encoder: &mut fidl::encoding::Encoder<
4137                '_,
4138                fidl::encoding::DefaultFuchsiaResourceDialect,
4139            >,
4140            offset: usize,
4141            _depth: fidl::encoding::Depth,
4142        ) -> fidl::Result<()> {
4143            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4144            // Delegate to tuple encoding.
4145            fidl::encoding::Encode::<
4146                EmptyResourceTableStruct,
4147                fidl::encoding::DefaultFuchsiaResourceDialect,
4148            >::encode(
4149                (<EmptyResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4150                    &mut self.table,
4151                ),),
4152                encoder,
4153                offset,
4154                _depth,
4155            )
4156        }
4157    }
4158    unsafe impl<
4159        T0: fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4160    >
4161        fidl::encoding::Encode<
4162            EmptyResourceTableStruct,
4163            fidl::encoding::DefaultFuchsiaResourceDialect,
4164        > for (T0,)
4165    {
4166        #[inline]
4167        unsafe fn encode(
4168            self,
4169            encoder: &mut fidl::encoding::Encoder<
4170                '_,
4171                fidl::encoding::DefaultFuchsiaResourceDialect,
4172            >,
4173            offset: usize,
4174            depth: fidl::encoding::Depth,
4175        ) -> fidl::Result<()> {
4176            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4177            // Zero out padding regions. There's no need to apply masks
4178            // because the unmasked parts will be overwritten by fields.
4179            // Write the fields.
4180            self.0.encode(encoder, offset + 0, depth)?;
4181            Ok(())
4182        }
4183    }
4184
4185    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4186        for EmptyResourceTableStruct
4187    {
4188        #[inline(always)]
4189        fn new_empty() -> Self {
4190            Self {
4191                table: fidl::new_empty!(
4192                    EmptyResourceTable,
4193                    fidl::encoding::DefaultFuchsiaResourceDialect
4194                ),
4195            }
4196        }
4197
4198        #[inline]
4199        unsafe fn decode(
4200            &mut self,
4201            decoder: &mut fidl::encoding::Decoder<
4202                '_,
4203                fidl::encoding::DefaultFuchsiaResourceDialect,
4204            >,
4205            offset: usize,
4206            _depth: fidl::encoding::Depth,
4207        ) -> fidl::Result<()> {
4208            decoder.debug_check_bounds::<Self>(offset);
4209            // Verify that padding bytes are zero.
4210            fidl::decode!(
4211                EmptyResourceTable,
4212                fidl::encoding::DefaultFuchsiaResourceDialect,
4213                &mut self.table,
4214                decoder,
4215                offset + 0,
4216                _depth
4217            )?;
4218            Ok(())
4219        }
4220    }
4221
4222    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnionStruct {
4223        type Borrowed<'a> = &'a mut Self;
4224        fn take_or_borrow<'a>(
4225            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4226        ) -> Self::Borrowed<'a> {
4227            value
4228        }
4229    }
4230
4231    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnionStruct {
4232        type Owned = Self;
4233
4234        #[inline(always)]
4235        fn inline_align(_context: fidl::encoding::Context) -> usize {
4236            8
4237        }
4238
4239        #[inline(always)]
4240        fn inline_size(_context: fidl::encoding::Context) -> usize {
4241            16
4242        }
4243    }
4244
4245    unsafe impl
4246        fidl::encoding::Encode<
4247            EnvelopeInliningTestUnionStruct,
4248            fidl::encoding::DefaultFuchsiaResourceDialect,
4249        > for &mut EnvelopeInliningTestUnionStruct
4250    {
4251        #[inline]
4252        unsafe fn encode(
4253            self,
4254            encoder: &mut fidl::encoding::Encoder<
4255                '_,
4256                fidl::encoding::DefaultFuchsiaResourceDialect,
4257            >,
4258            offset: usize,
4259            _depth: fidl::encoding::Depth,
4260        ) -> fidl::Result<()> {
4261            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4262            // Delegate to tuple encoding.
4263            fidl::encoding::Encode::<EnvelopeInliningTestUnionStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4264                (
4265                    <EnvelopeInliningTestUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
4266                ),
4267                encoder, offset, _depth
4268            )
4269        }
4270    }
4271    unsafe impl<
4272        T0: fidl::encoding::Encode<
4273                EnvelopeInliningTestUnion,
4274                fidl::encoding::DefaultFuchsiaResourceDialect,
4275            >,
4276    >
4277        fidl::encoding::Encode<
4278            EnvelopeInliningTestUnionStruct,
4279            fidl::encoding::DefaultFuchsiaResourceDialect,
4280        > for (T0,)
4281    {
4282        #[inline]
4283        unsafe fn encode(
4284            self,
4285            encoder: &mut fidl::encoding::Encoder<
4286                '_,
4287                fidl::encoding::DefaultFuchsiaResourceDialect,
4288            >,
4289            offset: usize,
4290            depth: fidl::encoding::Depth,
4291        ) -> fidl::Result<()> {
4292            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4293            // Zero out padding regions. There's no need to apply masks
4294            // because the unmasked parts will be overwritten by fields.
4295            // Write the fields.
4296            self.0.encode(encoder, offset + 0, depth)?;
4297            Ok(())
4298        }
4299    }
4300
4301    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4302        for EnvelopeInliningTestUnionStruct
4303    {
4304        #[inline(always)]
4305        fn new_empty() -> Self {
4306            Self {
4307                u: fidl::new_empty!(
4308                    EnvelopeInliningTestUnion,
4309                    fidl::encoding::DefaultFuchsiaResourceDialect
4310                ),
4311            }
4312        }
4313
4314        #[inline]
4315        unsafe fn decode(
4316            &mut self,
4317            decoder: &mut fidl::encoding::Decoder<
4318                '_,
4319                fidl::encoding::DefaultFuchsiaResourceDialect,
4320            >,
4321            offset: usize,
4322            _depth: fidl::encoding::Depth,
4323        ) -> fidl::Result<()> {
4324            decoder.debug_check_bounds::<Self>(offset);
4325            // Verify that padding bytes are zero.
4326            fidl::decode!(
4327                EnvelopeInliningTestUnion,
4328                fidl::encoding::DefaultFuchsiaResourceDialect,
4329                &mut self.u,
4330                decoder,
4331                offset + 0,
4332                _depth
4333            )?;
4334            Ok(())
4335        }
4336    }
4337
4338    impl fidl::encoding::ResourceTypeMarker for EventWithDefaultRights {
4339        type Borrowed<'a> = &'a mut Self;
4340        fn take_or_borrow<'a>(
4341            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4342        ) -> Self::Borrowed<'a> {
4343            value
4344        }
4345    }
4346
4347    unsafe impl fidl::encoding::TypeMarker for EventWithDefaultRights {
4348        type Owned = Self;
4349
4350        #[inline(always)]
4351        fn inline_align(_context: fidl::encoding::Context) -> usize {
4352            4
4353        }
4354
4355        #[inline(always)]
4356        fn inline_size(_context: fidl::encoding::Context) -> usize {
4357            4
4358        }
4359    }
4360
4361    unsafe impl
4362        fidl::encoding::Encode<
4363            EventWithDefaultRights,
4364            fidl::encoding::DefaultFuchsiaResourceDialect,
4365        > for &mut EventWithDefaultRights
4366    {
4367        #[inline]
4368        unsafe fn encode(
4369            self,
4370            encoder: &mut fidl::encoding::Encoder<
4371                '_,
4372                fidl::encoding::DefaultFuchsiaResourceDialect,
4373            >,
4374            offset: usize,
4375            _depth: fidl::encoding::Depth,
4376        ) -> fidl::Result<()> {
4377            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4378            // Delegate to tuple encoding.
4379            fidl::encoding::Encode::<
4380                EventWithDefaultRights,
4381                fidl::encoding::DefaultFuchsiaResourceDialect,
4382            >::encode(
4383                (<fidl::encoding::HandleType<
4384                    fidl::Event,
4385                    { fidl::ObjectType::EVENT.into_raw() },
4386                    53251,
4387                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4388                    &mut self.h
4389                ),),
4390                encoder,
4391                offset,
4392                _depth,
4393            )
4394        }
4395    }
4396    unsafe impl<
4397        T0: fidl::encoding::Encode<
4398                fidl::encoding::HandleType<
4399                    fidl::Event,
4400                    { fidl::ObjectType::EVENT.into_raw() },
4401                    53251,
4402                >,
4403                fidl::encoding::DefaultFuchsiaResourceDialect,
4404            >,
4405    >
4406        fidl::encoding::Encode<
4407            EventWithDefaultRights,
4408            fidl::encoding::DefaultFuchsiaResourceDialect,
4409        > for (T0,)
4410    {
4411        #[inline]
4412        unsafe fn encode(
4413            self,
4414            encoder: &mut fidl::encoding::Encoder<
4415                '_,
4416                fidl::encoding::DefaultFuchsiaResourceDialect,
4417            >,
4418            offset: usize,
4419            depth: fidl::encoding::Depth,
4420        ) -> fidl::Result<()> {
4421            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4422            // Zero out padding regions. There's no need to apply masks
4423            // because the unmasked parts will be overwritten by fields.
4424            // Write the fields.
4425            self.0.encode(encoder, offset + 0, depth)?;
4426            Ok(())
4427        }
4428    }
4429
4430    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4431        for EventWithDefaultRights
4432    {
4433        #[inline(always)]
4434        fn new_empty() -> Self {
4435            Self {
4436                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect),
4437            }
4438        }
4439
4440        #[inline]
4441        unsafe fn decode(
4442            &mut self,
4443            decoder: &mut fidl::encoding::Decoder<
4444                '_,
4445                fidl::encoding::DefaultFuchsiaResourceDialect,
4446            >,
4447            offset: usize,
4448            _depth: fidl::encoding::Depth,
4449        ) -> fidl::Result<()> {
4450            decoder.debug_check_bounds::<Self>(offset);
4451            // Verify that padding bytes are zero.
4452            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4453            Ok(())
4454        }
4455    }
4456
4457    impl fidl::encoding::ResourceTypeMarker for EventWithReducedRights {
4458        type Borrowed<'a> = &'a mut Self;
4459        fn take_or_borrow<'a>(
4460            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4461        ) -> Self::Borrowed<'a> {
4462            value
4463        }
4464    }
4465
4466    unsafe impl fidl::encoding::TypeMarker for EventWithReducedRights {
4467        type Owned = Self;
4468
4469        #[inline(always)]
4470        fn inline_align(_context: fidl::encoding::Context) -> usize {
4471            4
4472        }
4473
4474        #[inline(always)]
4475        fn inline_size(_context: fidl::encoding::Context) -> usize {
4476            4
4477        }
4478    }
4479
4480    unsafe impl
4481        fidl::encoding::Encode<
4482            EventWithReducedRights,
4483            fidl::encoding::DefaultFuchsiaResourceDialect,
4484        > for &mut EventWithReducedRights
4485    {
4486        #[inline]
4487        unsafe fn encode(
4488            self,
4489            encoder: &mut fidl::encoding::Encoder<
4490                '_,
4491                fidl::encoding::DefaultFuchsiaResourceDialect,
4492            >,
4493            offset: usize,
4494            _depth: fidl::encoding::Depth,
4495        ) -> fidl::Result<()> {
4496            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4497            // Delegate to tuple encoding.
4498            fidl::encoding::Encode::<
4499                EventWithReducedRights,
4500                fidl::encoding::DefaultFuchsiaResourceDialect,
4501            >::encode(
4502                (<fidl::encoding::HandleType<
4503                    fidl::Event,
4504                    { fidl::ObjectType::EVENT.into_raw() },
4505                    49155,
4506                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4507                    &mut self.h
4508                ),),
4509                encoder,
4510                offset,
4511                _depth,
4512            )
4513        }
4514    }
4515    unsafe impl<
4516        T0: fidl::encoding::Encode<
4517                fidl::encoding::HandleType<
4518                    fidl::Event,
4519                    { fidl::ObjectType::EVENT.into_raw() },
4520                    49155,
4521                >,
4522                fidl::encoding::DefaultFuchsiaResourceDialect,
4523            >,
4524    >
4525        fidl::encoding::Encode<
4526            EventWithReducedRights,
4527            fidl::encoding::DefaultFuchsiaResourceDialect,
4528        > for (T0,)
4529    {
4530        #[inline]
4531        unsafe fn encode(
4532            self,
4533            encoder: &mut fidl::encoding::Encoder<
4534                '_,
4535                fidl::encoding::DefaultFuchsiaResourceDialect,
4536            >,
4537            offset: usize,
4538            depth: fidl::encoding::Depth,
4539        ) -> fidl::Result<()> {
4540            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4541            // Zero out padding regions. There's no need to apply masks
4542            // because the unmasked parts will be overwritten by fields.
4543            // Write the fields.
4544            self.0.encode(encoder, offset + 0, depth)?;
4545            Ok(())
4546        }
4547    }
4548
4549    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4550        for EventWithReducedRights
4551    {
4552        #[inline(always)]
4553        fn new_empty() -> Self {
4554            Self {
4555                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
4556            }
4557        }
4558
4559        #[inline]
4560        unsafe fn decode(
4561            &mut self,
4562            decoder: &mut fidl::encoding::Decoder<
4563                '_,
4564                fidl::encoding::DefaultFuchsiaResourceDialect,
4565            >,
4566            offset: usize,
4567            _depth: fidl::encoding::Depth,
4568        ) -> fidl::Result<()> {
4569            decoder.debug_check_bounds::<Self>(offset);
4570            // Verify that padding bytes are zero.
4571            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4572            Ok(())
4573        }
4574    }
4575
4576    impl fidl::encoding::ResourceTypeMarker for FidlvizDemo {
4577        type Borrowed<'a> = &'a mut Self;
4578        fn take_or_borrow<'a>(
4579            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4580        ) -> Self::Borrowed<'a> {
4581            value
4582        }
4583    }
4584
4585    unsafe impl fidl::encoding::TypeMarker for FidlvizDemo {
4586        type Owned = Self;
4587
4588        #[inline(always)]
4589        fn inline_align(_context: fidl::encoding::Context) -> usize {
4590            8
4591        }
4592
4593        #[inline(always)]
4594        fn inline_size(_context: fidl::encoding::Context) -> usize {
4595            248
4596        }
4597    }
4598
4599    unsafe impl fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4600        for &mut FidlvizDemo
4601    {
4602        #[inline]
4603        unsafe fn encode(
4604            self,
4605            encoder: &mut fidl::encoding::Encoder<
4606                '_,
4607                fidl::encoding::DefaultFuchsiaResourceDialect,
4608            >,
4609            offset: usize,
4610            _depth: fidl::encoding::Depth,
4611        ) -> fidl::Result<()> {
4612            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4613            // Delegate to tuple encoding.
4614            fidl::encoding::Encode::<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4615                (
4616                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
4617                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
4618                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
4619                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
4620                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
4621                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
4622                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
4623                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
4624                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
4625                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f10),
4626                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f11),
4627                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f12),
4628                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f13),
4629                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.f14),
4630                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f15),
4631                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f16),
4632                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f17),
4633                    <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f18),
4634                    <fidl::encoding::UnboundedVector<f64> as fidl::encoding::ValueTypeMarker>::borrow(&self.f19),
4635                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f20),
4636                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.f21),
4637                    <FidlvizBits as fidl::encoding::ValueTypeMarker>::borrow(&self.f22),
4638                    <FidlvizEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.f23),
4639                    <FidlvizStruct1 as fidl::encoding::ValueTypeMarker>::borrow(&self.f24),
4640                    <FidlvizStruct2 as fidl::encoding::ValueTypeMarker>::borrow(&self.f25),
4641                    <fidl::encoding::Boxed<FidlvizStruct1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f26),
4642                    <fidl::encoding::Boxed<FidlvizStruct2> as fidl::encoding::ValueTypeMarker>::borrow(&self.f27),
4643                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f28),
4644                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f29),
4645                    <fidl::encoding::OptionalUnion<FidlvizUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.f30),
4646                    <FidlvizUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.f31),
4647                ),
4648                encoder, offset, _depth
4649            )
4650        }
4651    }
4652    unsafe impl<
4653        T0: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4654        T1: fidl::encoding::Encode<i8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4655        T2: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4656        T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4657        T4: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4658        T5: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4659        T6: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4660        T7: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4661        T8: fidl::encoding::Encode<f32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4662        T9: fidl::encoding::Encode<f64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4663        T10: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4664        T11: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4665        T12: fidl::encoding::Encode<
4666                fidl::encoding::UnboundedString,
4667                fidl::encoding::DefaultFuchsiaResourceDialect,
4668            >,
4669        T13: fidl::encoding::Encode<
4670                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4671                fidl::encoding::DefaultFuchsiaResourceDialect,
4672            >,
4673        T14: fidl::encoding::Encode<
4674                fidl::encoding::UnboundedString,
4675                fidl::encoding::DefaultFuchsiaResourceDialect,
4676            >,
4677        T15: fidl::encoding::Encode<
4678                fidl::encoding::Optional<
4679                    fidl::encoding::HandleType<
4680                        fidl::NullableHandle,
4681                        { fidl::ObjectType::NONE.into_raw() },
4682                        2147483648,
4683                    >,
4684                >,
4685                fidl::encoding::DefaultFuchsiaResourceDialect,
4686            >,
4687        T16: fidl::encoding::Encode<
4688                fidl::encoding::HandleType<
4689                    fidl::NullableHandle,
4690                    { fidl::ObjectType::NONE.into_raw() },
4691                    2147483648,
4692                >,
4693                fidl::encoding::DefaultFuchsiaResourceDialect,
4694            >,
4695        T17: fidl::encoding::Encode<
4696                fidl::encoding::Array<u8, 3>,
4697                fidl::encoding::DefaultFuchsiaResourceDialect,
4698            >,
4699        T18: fidl::encoding::Encode<
4700                fidl::encoding::UnboundedVector<f64>,
4701                fidl::encoding::DefaultFuchsiaResourceDialect,
4702            >,
4703        T19: fidl::encoding::Encode<
4704                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4705                fidl::encoding::DefaultFuchsiaResourceDialect,
4706            >,
4707        T20: fidl::encoding::Encode<
4708                fidl::encoding::UnboundedVector<u8>,
4709                fidl::encoding::DefaultFuchsiaResourceDialect,
4710            >,
4711        T21: fidl::encoding::Encode<FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect>,
4712        T22: fidl::encoding::Encode<FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
4713        T23: fidl::encoding::Encode<FidlvizStruct1, fidl::encoding::DefaultFuchsiaResourceDialect>,
4714        T24: fidl::encoding::Encode<FidlvizStruct2, fidl::encoding::DefaultFuchsiaResourceDialect>,
4715        T25: fidl::encoding::Encode<
4716                fidl::encoding::Boxed<FidlvizStruct1>,
4717                fidl::encoding::DefaultFuchsiaResourceDialect,
4718            >,
4719        T26: fidl::encoding::Encode<
4720                fidl::encoding::Boxed<FidlvizStruct2>,
4721                fidl::encoding::DefaultFuchsiaResourceDialect,
4722            >,
4723        T27: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4724        T28: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4725        T29: fidl::encoding::Encode<
4726                fidl::encoding::OptionalUnion<FidlvizUnion>,
4727                fidl::encoding::DefaultFuchsiaResourceDialect,
4728            >,
4729        T30: fidl::encoding::Encode<FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
4730    > fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4731        for (
4732            T0,
4733            T1,
4734            T2,
4735            T3,
4736            T4,
4737            T5,
4738            T6,
4739            T7,
4740            T8,
4741            T9,
4742            T10,
4743            T11,
4744            T12,
4745            T13,
4746            T14,
4747            T15,
4748            T16,
4749            T17,
4750            T18,
4751            T19,
4752            T20,
4753            T21,
4754            T22,
4755            T23,
4756            T24,
4757            T25,
4758            T26,
4759            T27,
4760            T28,
4761            T29,
4762            T30,
4763        )
4764    {
4765        #[inline]
4766        unsafe fn encode(
4767            self,
4768            encoder: &mut fidl::encoding::Encoder<
4769                '_,
4770                fidl::encoding::DefaultFuchsiaResourceDialect,
4771            >,
4772            offset: usize,
4773            depth: fidl::encoding::Depth,
4774        ) -> fidl::Result<()> {
4775            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4776            // Zero out padding regions. There's no need to apply masks
4777            // because the unmasked parts will be overwritten by fields.
4778            unsafe {
4779                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4780                (ptr as *mut u64).write_unaligned(0);
4781            }
4782            unsafe {
4783                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
4784                (ptr as *mut u64).write_unaligned(0);
4785            }
4786            unsafe {
4787                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(152);
4788                (ptr as *mut u64).write_unaligned(0);
4789            }
4790            // Write the fields.
4791            self.0.encode(encoder, offset + 0, depth)?;
4792            self.1.encode(encoder, offset + 1, depth)?;
4793            self.2.encode(encoder, offset + 2, depth)?;
4794            self.3.encode(encoder, offset + 4, depth)?;
4795            self.4.encode(encoder, offset + 8, depth)?;
4796            self.5.encode(encoder, offset + 16, depth)?;
4797            self.6.encode(encoder, offset + 17, depth)?;
4798            self.7.encode(encoder, offset + 18, depth)?;
4799            self.8.encode(encoder, offset + 20, depth)?;
4800            self.9.encode(encoder, offset + 24, depth)?;
4801            self.10.encode(encoder, offset + 32, depth)?;
4802            self.11.encode(encoder, offset + 33, depth)?;
4803            self.12.encode(encoder, offset + 40, depth)?;
4804            self.13.encode(encoder, offset + 56, depth)?;
4805            self.14.encode(encoder, offset + 72, depth)?;
4806            self.15.encode(encoder, offset + 88, depth)?;
4807            self.16.encode(encoder, offset + 92, depth)?;
4808            self.17.encode(encoder, offset + 96, depth)?;
4809            self.18.encode(encoder, offset + 104, depth)?;
4810            self.19.encode(encoder, offset + 120, depth)?;
4811            self.20.encode(encoder, offset + 136, depth)?;
4812            self.21.encode(encoder, offset + 152, depth)?;
4813            self.22.encode(encoder, offset + 153, depth)?;
4814            self.23.encode(encoder, offset + 154, depth)?;
4815            self.24.encode(encoder, offset + 160, depth)?;
4816            self.25.encode(encoder, offset + 168, depth)?;
4817            self.26.encode(encoder, offset + 176, depth)?;
4818            self.27.encode(encoder, offset + 184, depth)?;
4819            self.28.encode(encoder, offset + 200, depth)?;
4820            self.29.encode(encoder, offset + 216, depth)?;
4821            self.30.encode(encoder, offset + 232, depth)?;
4822            Ok(())
4823        }
4824    }
4825
4826    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {
4827        #[inline(always)]
4828        fn new_empty() -> Self {
4829            Self {
4830                f1: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4831                f2: fidl::new_empty!(i8, fidl::encoding::DefaultFuchsiaResourceDialect),
4832                f3: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4833                f4: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4834                f5: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
4835                f6: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4836                f7: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4837                f8: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4838                f9: fidl::new_empty!(f32, fidl::encoding::DefaultFuchsiaResourceDialect),
4839                f10: fidl::new_empty!(f64, fidl::encoding::DefaultFuchsiaResourceDialect),
4840                f11: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4841                f12: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4842                f13: fidl::new_empty!(
4843                    fidl::encoding::UnboundedString,
4844                    fidl::encoding::DefaultFuchsiaResourceDialect
4845                ),
4846                f14: fidl::new_empty!(
4847                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4848                    fidl::encoding::DefaultFuchsiaResourceDialect
4849                ),
4850                f15: fidl::new_empty!(
4851                    fidl::encoding::UnboundedString,
4852                    fidl::encoding::DefaultFuchsiaResourceDialect
4853                ),
4854                f16: fidl::new_empty!(
4855                    fidl::encoding::Optional<
4856                        fidl::encoding::HandleType<
4857                            fidl::NullableHandle,
4858                            { fidl::ObjectType::NONE.into_raw() },
4859                            2147483648,
4860                        >,
4861                    >,
4862                    fidl::encoding::DefaultFuchsiaResourceDialect
4863                ),
4864                f17: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
4865                f18: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
4866                f19: fidl::new_empty!(
4867                    fidl::encoding::UnboundedVector<f64>,
4868                    fidl::encoding::DefaultFuchsiaResourceDialect
4869                ),
4870                f20: fidl::new_empty!(
4871                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4872                    fidl::encoding::DefaultFuchsiaResourceDialect
4873                ),
4874                f21: fidl::new_empty!(
4875                    fidl::encoding::UnboundedVector<u8>,
4876                    fidl::encoding::DefaultFuchsiaResourceDialect
4877                ),
4878                f22: fidl::new_empty!(FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect),
4879                f23: fidl::new_empty!(FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect),
4880                f24: fidl::new_empty!(
4881                    FidlvizStruct1,
4882                    fidl::encoding::DefaultFuchsiaResourceDialect
4883                ),
4884                f25: fidl::new_empty!(
4885                    FidlvizStruct2,
4886                    fidl::encoding::DefaultFuchsiaResourceDialect
4887                ),
4888                f26: fidl::new_empty!(
4889                    fidl::encoding::Boxed<FidlvizStruct1>,
4890                    fidl::encoding::DefaultFuchsiaResourceDialect
4891                ),
4892                f27: fidl::new_empty!(
4893                    fidl::encoding::Boxed<FidlvizStruct2>,
4894                    fidl::encoding::DefaultFuchsiaResourceDialect
4895                ),
4896                f28: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4897                f29: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4898                f30: fidl::new_empty!(
4899                    fidl::encoding::OptionalUnion<FidlvizUnion>,
4900                    fidl::encoding::DefaultFuchsiaResourceDialect
4901                ),
4902                f31: fidl::new_empty!(FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect),
4903            }
4904        }
4905
4906        #[inline]
4907        unsafe fn decode(
4908            &mut self,
4909            decoder: &mut fidl::encoding::Decoder<
4910                '_,
4911                fidl::encoding::DefaultFuchsiaResourceDialect,
4912            >,
4913            offset: usize,
4914            _depth: fidl::encoding::Depth,
4915        ) -> fidl::Result<()> {
4916            decoder.debug_check_bounds::<Self>(offset);
4917            // Verify that padding bytes are zero.
4918            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4919            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4920            let mask = 0xffffffffffff0000u64;
4921            let maskedval = padval & mask;
4922            if maskedval != 0 {
4923                return Err(fidl::Error::NonZeroPadding {
4924                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4925                });
4926            }
4927            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
4928            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4929            let mask = 0xffffffffff000000u64;
4930            let maskedval = padval & mask;
4931            if maskedval != 0 {
4932                return Err(fidl::Error::NonZeroPadding {
4933                    padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
4934                });
4935            }
4936            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(152) };
4937            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4938            let mask = 0xffffffffff000000u64;
4939            let maskedval = padval & mask;
4940            if maskedval != 0 {
4941                return Err(fidl::Error::NonZeroPadding {
4942                    padding_start: offset + 152 + ((mask as u64).trailing_zeros() / 8) as usize,
4943                });
4944            }
4945            fidl::decode!(
4946                u8,
4947                fidl::encoding::DefaultFuchsiaResourceDialect,
4948                &mut self.f1,
4949                decoder,
4950                offset + 0,
4951                _depth
4952            )?;
4953            fidl::decode!(
4954                i8,
4955                fidl::encoding::DefaultFuchsiaResourceDialect,
4956                &mut self.f2,
4957                decoder,
4958                offset + 1,
4959                _depth
4960            )?;
4961            fidl::decode!(
4962                u16,
4963                fidl::encoding::DefaultFuchsiaResourceDialect,
4964                &mut self.f3,
4965                decoder,
4966                offset + 2,
4967                _depth
4968            )?;
4969            fidl::decode!(
4970                u32,
4971                fidl::encoding::DefaultFuchsiaResourceDialect,
4972                &mut self.f4,
4973                decoder,
4974                offset + 4,
4975                _depth
4976            )?;
4977            fidl::decode!(
4978                u64,
4979                fidl::encoding::DefaultFuchsiaResourceDialect,
4980                &mut self.f5,
4981                decoder,
4982                offset + 8,
4983                _depth
4984            )?;
4985            fidl::decode!(
4986                u8,
4987                fidl::encoding::DefaultFuchsiaResourceDialect,
4988                &mut self.f6,
4989                decoder,
4990                offset + 16,
4991                _depth
4992            )?;
4993            fidl::decode!(
4994                u8,
4995                fidl::encoding::DefaultFuchsiaResourceDialect,
4996                &mut self.f7,
4997                decoder,
4998                offset + 17,
4999                _depth
5000            )?;
5001            fidl::decode!(
5002                u16,
5003                fidl::encoding::DefaultFuchsiaResourceDialect,
5004                &mut self.f8,
5005                decoder,
5006                offset + 18,
5007                _depth
5008            )?;
5009            fidl::decode!(
5010                f32,
5011                fidl::encoding::DefaultFuchsiaResourceDialect,
5012                &mut self.f9,
5013                decoder,
5014                offset + 20,
5015                _depth
5016            )?;
5017            fidl::decode!(
5018                f64,
5019                fidl::encoding::DefaultFuchsiaResourceDialect,
5020                &mut self.f10,
5021                decoder,
5022                offset + 24,
5023                _depth
5024            )?;
5025            fidl::decode!(
5026                bool,
5027                fidl::encoding::DefaultFuchsiaResourceDialect,
5028                &mut self.f11,
5029                decoder,
5030                offset + 32,
5031                _depth
5032            )?;
5033            fidl::decode!(
5034                bool,
5035                fidl::encoding::DefaultFuchsiaResourceDialect,
5036                &mut self.f12,
5037                decoder,
5038                offset + 33,
5039                _depth
5040            )?;
5041            fidl::decode!(
5042                fidl::encoding::UnboundedString,
5043                fidl::encoding::DefaultFuchsiaResourceDialect,
5044                &mut self.f13,
5045                decoder,
5046                offset + 40,
5047                _depth
5048            )?;
5049            fidl::decode!(
5050                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5051                fidl::encoding::DefaultFuchsiaResourceDialect,
5052                &mut self.f14,
5053                decoder,
5054                offset + 56,
5055                _depth
5056            )?;
5057            fidl::decode!(
5058                fidl::encoding::UnboundedString,
5059                fidl::encoding::DefaultFuchsiaResourceDialect,
5060                &mut self.f15,
5061                decoder,
5062                offset + 72,
5063                _depth
5064            )?;
5065            fidl::decode!(
5066                fidl::encoding::Optional<
5067                    fidl::encoding::HandleType<
5068                        fidl::NullableHandle,
5069                        { fidl::ObjectType::NONE.into_raw() },
5070                        2147483648,
5071                    >,
5072                >,
5073                fidl::encoding::DefaultFuchsiaResourceDialect,
5074                &mut self.f16,
5075                decoder,
5076                offset + 88,
5077                _depth
5078            )?;
5079            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f17, decoder, offset + 92, _depth)?;
5080            fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f18, decoder, offset + 96, _depth)?;
5081            fidl::decode!(
5082                fidl::encoding::UnboundedVector<f64>,
5083                fidl::encoding::DefaultFuchsiaResourceDialect,
5084                &mut self.f19,
5085                decoder,
5086                offset + 104,
5087                _depth
5088            )?;
5089            fidl::decode!(
5090                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
5091                fidl::encoding::DefaultFuchsiaResourceDialect,
5092                &mut self.f20,
5093                decoder,
5094                offset + 120,
5095                _depth
5096            )?;
5097            fidl::decode!(
5098                fidl::encoding::UnboundedVector<u8>,
5099                fidl::encoding::DefaultFuchsiaResourceDialect,
5100                &mut self.f21,
5101                decoder,
5102                offset + 136,
5103                _depth
5104            )?;
5105            fidl::decode!(
5106                FidlvizBits,
5107                fidl::encoding::DefaultFuchsiaResourceDialect,
5108                &mut self.f22,
5109                decoder,
5110                offset + 152,
5111                _depth
5112            )?;
5113            fidl::decode!(
5114                FidlvizEnum,
5115                fidl::encoding::DefaultFuchsiaResourceDialect,
5116                &mut self.f23,
5117                decoder,
5118                offset + 153,
5119                _depth
5120            )?;
5121            fidl::decode!(
5122                FidlvizStruct1,
5123                fidl::encoding::DefaultFuchsiaResourceDialect,
5124                &mut self.f24,
5125                decoder,
5126                offset + 154,
5127                _depth
5128            )?;
5129            fidl::decode!(
5130                FidlvizStruct2,
5131                fidl::encoding::DefaultFuchsiaResourceDialect,
5132                &mut self.f25,
5133                decoder,
5134                offset + 160,
5135                _depth
5136            )?;
5137            fidl::decode!(
5138                fidl::encoding::Boxed<FidlvizStruct1>,
5139                fidl::encoding::DefaultFuchsiaResourceDialect,
5140                &mut self.f26,
5141                decoder,
5142                offset + 168,
5143                _depth
5144            )?;
5145            fidl::decode!(
5146                fidl::encoding::Boxed<FidlvizStruct2>,
5147                fidl::encoding::DefaultFuchsiaResourceDialect,
5148                &mut self.f27,
5149                decoder,
5150                offset + 176,
5151                _depth
5152            )?;
5153            fidl::decode!(
5154                FidlvizTable,
5155                fidl::encoding::DefaultFuchsiaResourceDialect,
5156                &mut self.f28,
5157                decoder,
5158                offset + 184,
5159                _depth
5160            )?;
5161            fidl::decode!(
5162                FidlvizTable,
5163                fidl::encoding::DefaultFuchsiaResourceDialect,
5164                &mut self.f29,
5165                decoder,
5166                offset + 200,
5167                _depth
5168            )?;
5169            fidl::decode!(
5170                fidl::encoding::OptionalUnion<FidlvizUnion>,
5171                fidl::encoding::DefaultFuchsiaResourceDialect,
5172                &mut self.f30,
5173                decoder,
5174                offset + 216,
5175                _depth
5176            )?;
5177            fidl::decode!(
5178                FidlvizUnion,
5179                fidl::encoding::DefaultFuchsiaResourceDialect,
5180                &mut self.f31,
5181                decoder,
5182                offset + 232,
5183                _depth
5184            )?;
5185            Ok(())
5186        }
5187    }
5188
5189    impl fidl::encoding::ResourceTypeMarker for GoldenHandleBasicRightsStruct {
5190        type Borrowed<'a> = &'a mut Self;
5191        fn take_or_borrow<'a>(
5192            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5193        ) -> Self::Borrowed<'a> {
5194            value
5195        }
5196    }
5197
5198    unsafe impl fidl::encoding::TypeMarker for GoldenHandleBasicRightsStruct {
5199        type Owned = Self;
5200
5201        #[inline(always)]
5202        fn inline_align(_context: fidl::encoding::Context) -> usize {
5203            4
5204        }
5205
5206        #[inline(always)]
5207        fn inline_size(_context: fidl::encoding::Context) -> usize {
5208            4
5209        }
5210    }
5211
5212    unsafe impl
5213        fidl::encoding::Encode<
5214            GoldenHandleBasicRightsStruct,
5215            fidl::encoding::DefaultFuchsiaResourceDialect,
5216        > for &mut GoldenHandleBasicRightsStruct
5217    {
5218        #[inline]
5219        unsafe fn encode(
5220            self,
5221            encoder: &mut fidl::encoding::Encoder<
5222                '_,
5223                fidl::encoding::DefaultFuchsiaResourceDialect,
5224            >,
5225            offset: usize,
5226            _depth: fidl::encoding::Depth,
5227        ) -> fidl::Result<()> {
5228            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5229            // Delegate to tuple encoding.
5230            fidl::encoding::Encode::<
5231                GoldenHandleBasicRightsStruct,
5232                fidl::encoding::DefaultFuchsiaResourceDialect,
5233            >::encode(
5234                (<fidl::encoding::HandleType<
5235                    fidl::Event,
5236                    { fidl::ObjectType::EVENT.into_raw() },
5237                    49155,
5238                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5239                    &mut self.v
5240                ),),
5241                encoder,
5242                offset,
5243                _depth,
5244            )
5245        }
5246    }
5247    unsafe impl<
5248        T0: fidl::encoding::Encode<
5249                fidl::encoding::HandleType<
5250                    fidl::Event,
5251                    { fidl::ObjectType::EVENT.into_raw() },
5252                    49155,
5253                >,
5254                fidl::encoding::DefaultFuchsiaResourceDialect,
5255            >,
5256    >
5257        fidl::encoding::Encode<
5258            GoldenHandleBasicRightsStruct,
5259            fidl::encoding::DefaultFuchsiaResourceDialect,
5260        > for (T0,)
5261    {
5262        #[inline]
5263        unsafe fn encode(
5264            self,
5265            encoder: &mut fidl::encoding::Encoder<
5266                '_,
5267                fidl::encoding::DefaultFuchsiaResourceDialect,
5268            >,
5269            offset: usize,
5270            depth: fidl::encoding::Depth,
5271        ) -> fidl::Result<()> {
5272            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5273            // Zero out padding regions. There's no need to apply masks
5274            // because the unmasked parts will be overwritten by fields.
5275            // Write the fields.
5276            self.0.encode(encoder, offset + 0, depth)?;
5277            Ok(())
5278        }
5279    }
5280
5281    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5282        for GoldenHandleBasicRightsStruct
5283    {
5284        #[inline(always)]
5285        fn new_empty() -> Self {
5286            Self {
5287                v: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
5288            }
5289        }
5290
5291        #[inline]
5292        unsafe fn decode(
5293            &mut self,
5294            decoder: &mut fidl::encoding::Decoder<
5295                '_,
5296                fidl::encoding::DefaultFuchsiaResourceDialect,
5297            >,
5298            offset: usize,
5299            _depth: fidl::encoding::Depth,
5300        ) -> fidl::Result<()> {
5301            decoder.debug_check_bounds::<Self>(offset);
5302            // Verify that padding bytes are zero.
5303            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.v, decoder, offset + 0, _depth)?;
5304            Ok(())
5305        }
5306    }
5307
5308    impl fidl::encoding::ResourceTypeMarker for GoldenNullableHandleStruct {
5309        type Borrowed<'a> = &'a mut Self;
5310        fn take_or_borrow<'a>(
5311            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5312        ) -> Self::Borrowed<'a> {
5313            value
5314        }
5315    }
5316
5317    unsafe impl fidl::encoding::TypeMarker for GoldenNullableHandleStruct {
5318        type Owned = Self;
5319
5320        #[inline(always)]
5321        fn inline_align(_context: fidl::encoding::Context) -> usize {
5322            4
5323        }
5324
5325        #[inline(always)]
5326        fn inline_size(_context: fidl::encoding::Context) -> usize {
5327            4
5328        }
5329    }
5330
5331    unsafe impl
5332        fidl::encoding::Encode<
5333            GoldenNullableHandleStruct,
5334            fidl::encoding::DefaultFuchsiaResourceDialect,
5335        > for &mut GoldenNullableHandleStruct
5336    {
5337        #[inline]
5338        unsafe fn encode(
5339            self,
5340            encoder: &mut fidl::encoding::Encoder<
5341                '_,
5342                fidl::encoding::DefaultFuchsiaResourceDialect,
5343            >,
5344            offset: usize,
5345            _depth: fidl::encoding::Depth,
5346        ) -> fidl::Result<()> {
5347            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5348            // Delegate to tuple encoding.
5349            fidl::encoding::Encode::<
5350                GoldenNullableHandleStruct,
5351                fidl::encoding::DefaultFuchsiaResourceDialect,
5352            >::encode(
5353                (<fidl::encoding::Optional<
5354                    fidl::encoding::HandleType<
5355                        fidl::NullableHandle,
5356                        { fidl::ObjectType::NONE.into_raw() },
5357                        2147483648,
5358                    >,
5359                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5360                    &mut self.v
5361                ),),
5362                encoder,
5363                offset,
5364                _depth,
5365            )
5366        }
5367    }
5368    unsafe impl<
5369        T0: fidl::encoding::Encode<
5370                fidl::encoding::Optional<
5371                    fidl::encoding::HandleType<
5372                        fidl::NullableHandle,
5373                        { fidl::ObjectType::NONE.into_raw() },
5374                        2147483648,
5375                    >,
5376                >,
5377                fidl::encoding::DefaultFuchsiaResourceDialect,
5378            >,
5379    >
5380        fidl::encoding::Encode<
5381            GoldenNullableHandleStruct,
5382            fidl::encoding::DefaultFuchsiaResourceDialect,
5383        > for (T0,)
5384    {
5385        #[inline]
5386        unsafe fn encode(
5387            self,
5388            encoder: &mut fidl::encoding::Encoder<
5389                '_,
5390                fidl::encoding::DefaultFuchsiaResourceDialect,
5391            >,
5392            offset: usize,
5393            depth: fidl::encoding::Depth,
5394        ) -> fidl::Result<()> {
5395            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5396            // Zero out padding regions. There's no need to apply masks
5397            // because the unmasked parts will be overwritten by fields.
5398            // Write the fields.
5399            self.0.encode(encoder, offset + 0, depth)?;
5400            Ok(())
5401        }
5402    }
5403
5404    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5405        for GoldenNullableHandleStruct
5406    {
5407        #[inline(always)]
5408        fn new_empty() -> Self {
5409            Self {
5410                v: fidl::new_empty!(
5411                    fidl::encoding::Optional<
5412                        fidl::encoding::HandleType<
5413                            fidl::NullableHandle,
5414                            { fidl::ObjectType::NONE.into_raw() },
5415                            2147483648,
5416                        >,
5417                    >,
5418                    fidl::encoding::DefaultFuchsiaResourceDialect
5419                ),
5420            }
5421        }
5422
5423        #[inline]
5424        unsafe fn decode(
5425            &mut self,
5426            decoder: &mut fidl::encoding::Decoder<
5427                '_,
5428                fidl::encoding::DefaultFuchsiaResourceDialect,
5429            >,
5430            offset: usize,
5431            _depth: fidl::encoding::Depth,
5432        ) -> fidl::Result<()> {
5433            decoder.debug_check_bounds::<Self>(offset);
5434            // Verify that padding bytes are zero.
5435            fidl::decode!(
5436                fidl::encoding::Optional<
5437                    fidl::encoding::HandleType<
5438                        fidl::NullableHandle,
5439                        { fidl::ObjectType::NONE.into_raw() },
5440                        2147483648,
5441                    >,
5442                >,
5443                fidl::encoding::DefaultFuchsiaResourceDialect,
5444                &mut self.v,
5445                decoder,
5446                offset + 0,
5447                _depth
5448            )?;
5449            Ok(())
5450        }
5451    }
5452
5453    impl fidl::encoding::ResourceTypeMarker for LaunchInfo {
5454        type Borrowed<'a> = &'a mut Self;
5455        fn take_or_borrow<'a>(
5456            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5457        ) -> Self::Borrowed<'a> {
5458            value
5459        }
5460    }
5461
5462    unsafe impl fidl::encoding::TypeMarker for LaunchInfo {
5463        type Owned = Self;
5464
5465        #[inline(always)]
5466        fn inline_align(_context: fidl::encoding::Context) -> usize {
5467            8
5468        }
5469
5470        #[inline(always)]
5471        fn inline_size(_context: fidl::encoding::Context) -> usize {
5472            72
5473        }
5474    }
5475
5476    unsafe impl fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5477        for &mut LaunchInfo
5478    {
5479        #[inline]
5480        unsafe fn encode(
5481            self,
5482            encoder: &mut fidl::encoding::Encoder<
5483                '_,
5484                fidl::encoding::DefaultFuchsiaResourceDialect,
5485            >,
5486            offset: usize,
5487            _depth: fidl::encoding::Depth,
5488        ) -> fidl::Result<()> {
5489            encoder.debug_check_bounds::<LaunchInfo>(offset);
5490            // Delegate to tuple encoding.
5491            fidl::encoding::Encode::<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5492                (
5493                    <fidl::encoding::BoundedString<200> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
5494                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.arguments),
5495                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.out),
5496                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.err),
5497                    <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),
5498                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.flat_namespace),
5499                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.additional_services),
5500                ),
5501                encoder, offset, _depth
5502            )
5503        }
5504    }
5505    unsafe impl<
5506        T0: fidl::encoding::Encode<
5507                fidl::encoding::BoundedString<200>,
5508                fidl::encoding::DefaultFuchsiaResourceDialect,
5509            >,
5510        T1: fidl::encoding::Encode<
5511                fidl::encoding::Optional<
5512                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5513                >,
5514                fidl::encoding::DefaultFuchsiaResourceDialect,
5515            >,
5516        T2: fidl::encoding::Encode<
5517                fidl::encoding::Boxed<TransformerEmptyStruct>,
5518                fidl::encoding::DefaultFuchsiaResourceDialect,
5519            >,
5520        T3: fidl::encoding::Encode<
5521                fidl::encoding::Boxed<TransformerEmptyStruct>,
5522                fidl::encoding::DefaultFuchsiaResourceDialect,
5523            >,
5524        T4: fidl::encoding::Encode<
5525                fidl::encoding::Optional<
5526                    fidl::encoding::HandleType<
5527                        fidl::Channel,
5528                        { fidl::ObjectType::CHANNEL.into_raw() },
5529                        2147483648,
5530                    >,
5531                >,
5532                fidl::encoding::DefaultFuchsiaResourceDialect,
5533            >,
5534        T5: fidl::encoding::Encode<
5535                fidl::encoding::Boxed<TransformerEmptyStruct>,
5536                fidl::encoding::DefaultFuchsiaResourceDialect,
5537            >,
5538        T6: fidl::encoding::Encode<
5539                fidl::encoding::Boxed<TransformerEmptyStruct>,
5540                fidl::encoding::DefaultFuchsiaResourceDialect,
5541            >,
5542    > fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5543        for (T0, T1, T2, T3, T4, T5, T6)
5544    {
5545        #[inline]
5546        unsafe fn encode(
5547            self,
5548            encoder: &mut fidl::encoding::Encoder<
5549                '_,
5550                fidl::encoding::DefaultFuchsiaResourceDialect,
5551            >,
5552            offset: usize,
5553            depth: fidl::encoding::Depth,
5554        ) -> fidl::Result<()> {
5555            encoder.debug_check_bounds::<LaunchInfo>(offset);
5556            // Zero out padding regions. There's no need to apply masks
5557            // because the unmasked parts will be overwritten by fields.
5558            unsafe {
5559                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
5560                (ptr as *mut u64).write_unaligned(0);
5561            }
5562            // Write the fields.
5563            self.0.encode(encoder, offset + 0, depth)?;
5564            self.1.encode(encoder, offset + 16, depth)?;
5565            self.2.encode(encoder, offset + 32, depth)?;
5566            self.3.encode(encoder, offset + 40, depth)?;
5567            self.4.encode(encoder, offset + 48, depth)?;
5568            self.5.encode(encoder, offset + 56, depth)?;
5569            self.6.encode(encoder, offset + 64, depth)?;
5570            Ok(())
5571        }
5572    }
5573
5574    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {
5575        #[inline(always)]
5576        fn new_empty() -> Self {
5577            Self {
5578                url: fidl::new_empty!(
5579                    fidl::encoding::BoundedString<200>,
5580                    fidl::encoding::DefaultFuchsiaResourceDialect
5581                ),
5582                arguments: fidl::new_empty!(
5583                    fidl::encoding::Optional<
5584                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5585                    >,
5586                    fidl::encoding::DefaultFuchsiaResourceDialect
5587                ),
5588                out: fidl::new_empty!(
5589                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5590                    fidl::encoding::DefaultFuchsiaResourceDialect
5591                ),
5592                err: fidl::new_empty!(
5593                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5594                    fidl::encoding::DefaultFuchsiaResourceDialect
5595                ),
5596                directory_request: fidl::new_empty!(
5597                    fidl::encoding::Optional<
5598                        fidl::encoding::HandleType<
5599                            fidl::Channel,
5600                            { fidl::ObjectType::CHANNEL.into_raw() },
5601                            2147483648,
5602                        >,
5603                    >,
5604                    fidl::encoding::DefaultFuchsiaResourceDialect
5605                ),
5606                flat_namespace: fidl::new_empty!(
5607                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5608                    fidl::encoding::DefaultFuchsiaResourceDialect
5609                ),
5610                additional_services: fidl::new_empty!(
5611                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5612                    fidl::encoding::DefaultFuchsiaResourceDialect
5613                ),
5614            }
5615        }
5616
5617        #[inline]
5618        unsafe fn decode(
5619            &mut self,
5620            decoder: &mut fidl::encoding::Decoder<
5621                '_,
5622                fidl::encoding::DefaultFuchsiaResourceDialect,
5623            >,
5624            offset: usize,
5625            _depth: fidl::encoding::Depth,
5626        ) -> fidl::Result<()> {
5627            decoder.debug_check_bounds::<Self>(offset);
5628            // Verify that padding bytes are zero.
5629            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
5630            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5631            let mask = 0xffffffff00000000u64;
5632            let maskedval = padval & mask;
5633            if maskedval != 0 {
5634                return Err(fidl::Error::NonZeroPadding {
5635                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
5636                });
5637            }
5638            fidl::decode!(
5639                fidl::encoding::BoundedString<200>,
5640                fidl::encoding::DefaultFuchsiaResourceDialect,
5641                &mut self.url,
5642                decoder,
5643                offset + 0,
5644                _depth
5645            )?;
5646            fidl::decode!(
5647                fidl::encoding::Optional<
5648                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5649                >,
5650                fidl::encoding::DefaultFuchsiaResourceDialect,
5651                &mut self.arguments,
5652                decoder,
5653                offset + 16,
5654                _depth
5655            )?;
5656            fidl::decode!(
5657                fidl::encoding::Boxed<TransformerEmptyStruct>,
5658                fidl::encoding::DefaultFuchsiaResourceDialect,
5659                &mut self.out,
5660                decoder,
5661                offset + 32,
5662                _depth
5663            )?;
5664            fidl::decode!(
5665                fidl::encoding::Boxed<TransformerEmptyStruct>,
5666                fidl::encoding::DefaultFuchsiaResourceDialect,
5667                &mut self.err,
5668                decoder,
5669                offset + 40,
5670                _depth
5671            )?;
5672            fidl::decode!(
5673                fidl::encoding::Optional<
5674                    fidl::encoding::HandleType<
5675                        fidl::Channel,
5676                        { fidl::ObjectType::CHANNEL.into_raw() },
5677                        2147483648,
5678                    >,
5679                >,
5680                fidl::encoding::DefaultFuchsiaResourceDialect,
5681                &mut self.directory_request,
5682                decoder,
5683                offset + 48,
5684                _depth
5685            )?;
5686            fidl::decode!(
5687                fidl::encoding::Boxed<TransformerEmptyStruct>,
5688                fidl::encoding::DefaultFuchsiaResourceDialect,
5689                &mut self.flat_namespace,
5690                decoder,
5691                offset + 56,
5692                _depth
5693            )?;
5694            fidl::decode!(
5695                fidl::encoding::Boxed<TransformerEmptyStruct>,
5696                fidl::encoding::DefaultFuchsiaResourceDialect,
5697                &mut self.additional_services,
5698                decoder,
5699                offset + 64,
5700                _depth
5701            )?;
5702            Ok(())
5703        }
5704    }
5705
5706    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5707        type Borrowed<'a> = &'a mut Self;
5708        fn take_or_borrow<'a>(
5709            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5710        ) -> Self::Borrowed<'a> {
5711            value
5712        }
5713    }
5714
5715    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5716        type Owned = Self;
5717
5718        #[inline(always)]
5719        fn inline_align(_context: fidl::encoding::Context) -> usize {
5720            8
5721        }
5722
5723        #[inline(always)]
5724        fn inline_size(_context: fidl::encoding::Context) -> usize {
5725            32
5726        }
5727    }
5728
5729    unsafe impl
5730        fidl::encoding::Encode<
5731            MultipleBoundedNonnullableVectorsOfHandles,
5732            fidl::encoding::DefaultFuchsiaResourceDialect,
5733        > for &mut MultipleBoundedNonnullableVectorsOfHandles
5734    {
5735        #[inline]
5736        unsafe fn encode(
5737            self,
5738            encoder: &mut fidl::encoding::Encoder<
5739                '_,
5740                fidl::encoding::DefaultFuchsiaResourceDialect,
5741            >,
5742            offset: usize,
5743            _depth: fidl::encoding::Depth,
5744        ) -> fidl::Result<()> {
5745            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5746            // Delegate to tuple encoding.
5747            fidl::encoding::Encode::<
5748                MultipleBoundedNonnullableVectorsOfHandles,
5749                fidl::encoding::DefaultFuchsiaResourceDialect,
5750            >::encode(
5751                (
5752                    <fidl::encoding::Vector<
5753                        fidl::encoding::HandleType<
5754                            fidl::NullableHandle,
5755                            { fidl::ObjectType::NONE.into_raw() },
5756                            2147483648,
5757                        >,
5758                        2,
5759                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5760                        &mut self.vh0
5761                    ),
5762                    <fidl::encoding::Vector<
5763                        fidl::encoding::HandleType<
5764                            fidl::NullableHandle,
5765                            { fidl::ObjectType::NONE.into_raw() },
5766                            2147483648,
5767                        >,
5768                        32,
5769                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5770                        &mut self.vh1
5771                    ),
5772                ),
5773                encoder,
5774                offset,
5775                _depth,
5776            )
5777        }
5778    }
5779    unsafe impl<
5780        T0: fidl::encoding::Encode<
5781                fidl::encoding::Vector<
5782                    fidl::encoding::HandleType<
5783                        fidl::NullableHandle,
5784                        { fidl::ObjectType::NONE.into_raw() },
5785                        2147483648,
5786                    >,
5787                    2,
5788                >,
5789                fidl::encoding::DefaultFuchsiaResourceDialect,
5790            >,
5791        T1: fidl::encoding::Encode<
5792                fidl::encoding::Vector<
5793                    fidl::encoding::HandleType<
5794                        fidl::NullableHandle,
5795                        { fidl::ObjectType::NONE.into_raw() },
5796                        2147483648,
5797                    >,
5798                    32,
5799                >,
5800                fidl::encoding::DefaultFuchsiaResourceDialect,
5801            >,
5802    >
5803        fidl::encoding::Encode<
5804            MultipleBoundedNonnullableVectorsOfHandles,
5805            fidl::encoding::DefaultFuchsiaResourceDialect,
5806        > for (T0, T1)
5807    {
5808        #[inline]
5809        unsafe fn encode(
5810            self,
5811            encoder: &mut fidl::encoding::Encoder<
5812                '_,
5813                fidl::encoding::DefaultFuchsiaResourceDialect,
5814            >,
5815            offset: usize,
5816            depth: fidl::encoding::Depth,
5817        ) -> fidl::Result<()> {
5818            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5819            // Zero out padding regions. There's no need to apply masks
5820            // because the unmasked parts will be overwritten by fields.
5821            // Write the fields.
5822            self.0.encode(encoder, offset + 0, depth)?;
5823            self.1.encode(encoder, offset + 16, depth)?;
5824            Ok(())
5825        }
5826    }
5827
5828    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5829        for MultipleBoundedNonnullableVectorsOfHandles
5830    {
5831        #[inline(always)]
5832        fn new_empty() -> Self {
5833            Self {
5834                vh0: fidl::new_empty!(
5835                    fidl::encoding::Vector<
5836                        fidl::encoding::HandleType<
5837                            fidl::NullableHandle,
5838                            { fidl::ObjectType::NONE.into_raw() },
5839                            2147483648,
5840                        >,
5841                        2,
5842                    >,
5843                    fidl::encoding::DefaultFuchsiaResourceDialect
5844                ),
5845                vh1: fidl::new_empty!(
5846                    fidl::encoding::Vector<
5847                        fidl::encoding::HandleType<
5848                            fidl::NullableHandle,
5849                            { fidl::ObjectType::NONE.into_raw() },
5850                            2147483648,
5851                        >,
5852                        32,
5853                    >,
5854                    fidl::encoding::DefaultFuchsiaResourceDialect
5855                ),
5856            }
5857        }
5858
5859        #[inline]
5860        unsafe fn decode(
5861            &mut self,
5862            decoder: &mut fidl::encoding::Decoder<
5863                '_,
5864                fidl::encoding::DefaultFuchsiaResourceDialect,
5865            >,
5866            offset: usize,
5867            _depth: fidl::encoding::Depth,
5868        ) -> fidl::Result<()> {
5869            decoder.debug_check_bounds::<Self>(offset);
5870            // Verify that padding bytes are zero.
5871            fidl::decode!(
5872                fidl::encoding::Vector<
5873                    fidl::encoding::HandleType<
5874                        fidl::NullableHandle,
5875                        { fidl::ObjectType::NONE.into_raw() },
5876                        2147483648,
5877                    >,
5878                    2,
5879                >,
5880                fidl::encoding::DefaultFuchsiaResourceDialect,
5881                &mut self.vh0,
5882                decoder,
5883                offset + 0,
5884                _depth
5885            )?;
5886            fidl::decode!(
5887                fidl::encoding::Vector<
5888                    fidl::encoding::HandleType<
5889                        fidl::NullableHandle,
5890                        { fidl::ObjectType::NONE.into_raw() },
5891                        2147483648,
5892                    >,
5893                    32,
5894                >,
5895                fidl::encoding::DefaultFuchsiaResourceDialect,
5896                &mut self.vh1,
5897                decoder,
5898                offset + 16,
5899                _depth
5900            )?;
5901            Ok(())
5902        }
5903    }
5904
5905    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNullableVectorsOfHandles {
5906        type Borrowed<'a> = &'a mut Self;
5907        fn take_or_borrow<'a>(
5908            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5909        ) -> Self::Borrowed<'a> {
5910            value
5911        }
5912    }
5913
5914    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfHandles {
5915        type Owned = Self;
5916
5917        #[inline(always)]
5918        fn inline_align(_context: fidl::encoding::Context) -> usize {
5919            8
5920        }
5921
5922        #[inline(always)]
5923        fn inline_size(_context: fidl::encoding::Context) -> usize {
5924            32
5925        }
5926    }
5927
5928    unsafe impl
5929        fidl::encoding::Encode<
5930            MultipleBoundedNullableVectorsOfHandles,
5931            fidl::encoding::DefaultFuchsiaResourceDialect,
5932        > for &mut MultipleBoundedNullableVectorsOfHandles
5933    {
5934        #[inline]
5935        unsafe fn encode(
5936            self,
5937            encoder: &mut fidl::encoding::Encoder<
5938                '_,
5939                fidl::encoding::DefaultFuchsiaResourceDialect,
5940            >,
5941            offset: usize,
5942            _depth: fidl::encoding::Depth,
5943        ) -> fidl::Result<()> {
5944            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
5945            // Delegate to tuple encoding.
5946            fidl::encoding::Encode::<
5947                MultipleBoundedNullableVectorsOfHandles,
5948                fidl::encoding::DefaultFuchsiaResourceDialect,
5949            >::encode(
5950                (
5951                    <fidl::encoding::Optional<
5952                        fidl::encoding::Vector<
5953                            fidl::encoding::HandleType<
5954                                fidl::NullableHandle,
5955                                { fidl::ObjectType::NONE.into_raw() },
5956                                2147483648,
5957                            >,
5958                            2,
5959                        >,
5960                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5961                        &mut self.vh0
5962                    ),
5963                    <fidl::encoding::Optional<
5964                        fidl::encoding::Vector<
5965                            fidl::encoding::HandleType<
5966                                fidl::NullableHandle,
5967                                { fidl::ObjectType::NONE.into_raw() },
5968                                2147483648,
5969                            >,
5970                            32,
5971                        >,
5972                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5973                        &mut self.vh1
5974                    ),
5975                ),
5976                encoder,
5977                offset,
5978                _depth,
5979            )
5980        }
5981    }
5982    unsafe impl<
5983        T0: fidl::encoding::Encode<
5984                fidl::encoding::Optional<
5985                    fidl::encoding::Vector<
5986                        fidl::encoding::HandleType<
5987                            fidl::NullableHandle,
5988                            { fidl::ObjectType::NONE.into_raw() },
5989                            2147483648,
5990                        >,
5991                        2,
5992                    >,
5993                >,
5994                fidl::encoding::DefaultFuchsiaResourceDialect,
5995            >,
5996        T1: fidl::encoding::Encode<
5997                fidl::encoding::Optional<
5998                    fidl::encoding::Vector<
5999                        fidl::encoding::HandleType<
6000                            fidl::NullableHandle,
6001                            { fidl::ObjectType::NONE.into_raw() },
6002                            2147483648,
6003                        >,
6004                        32,
6005                    >,
6006                >,
6007                fidl::encoding::DefaultFuchsiaResourceDialect,
6008            >,
6009    >
6010        fidl::encoding::Encode<
6011            MultipleBoundedNullableVectorsOfHandles,
6012            fidl::encoding::DefaultFuchsiaResourceDialect,
6013        > for (T0, T1)
6014    {
6015        #[inline]
6016        unsafe fn encode(
6017            self,
6018            encoder: &mut fidl::encoding::Encoder<
6019                '_,
6020                fidl::encoding::DefaultFuchsiaResourceDialect,
6021            >,
6022            offset: usize,
6023            depth: fidl::encoding::Depth,
6024        ) -> fidl::Result<()> {
6025            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
6026            // Zero out padding regions. There's no need to apply masks
6027            // because the unmasked parts will be overwritten by fields.
6028            // Write the fields.
6029            self.0.encode(encoder, offset + 0, depth)?;
6030            self.1.encode(encoder, offset + 16, depth)?;
6031            Ok(())
6032        }
6033    }
6034
6035    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6036        for MultipleBoundedNullableVectorsOfHandles
6037    {
6038        #[inline(always)]
6039        fn new_empty() -> Self {
6040            Self {
6041                vh0: fidl::new_empty!(
6042                    fidl::encoding::Optional<
6043                        fidl::encoding::Vector<
6044                            fidl::encoding::HandleType<
6045                                fidl::NullableHandle,
6046                                { fidl::ObjectType::NONE.into_raw() },
6047                                2147483648,
6048                            >,
6049                            2,
6050                        >,
6051                    >,
6052                    fidl::encoding::DefaultFuchsiaResourceDialect
6053                ),
6054                vh1: fidl::new_empty!(
6055                    fidl::encoding::Optional<
6056                        fidl::encoding::Vector<
6057                            fidl::encoding::HandleType<
6058                                fidl::NullableHandle,
6059                                { fidl::ObjectType::NONE.into_raw() },
6060                                2147483648,
6061                            >,
6062                            32,
6063                        >,
6064                    >,
6065                    fidl::encoding::DefaultFuchsiaResourceDialect
6066                ),
6067            }
6068        }
6069
6070        #[inline]
6071        unsafe fn decode(
6072            &mut self,
6073            decoder: &mut fidl::encoding::Decoder<
6074                '_,
6075                fidl::encoding::DefaultFuchsiaResourceDialect,
6076            >,
6077            offset: usize,
6078            _depth: fidl::encoding::Depth,
6079        ) -> fidl::Result<()> {
6080            decoder.debug_check_bounds::<Self>(offset);
6081            // Verify that padding bytes are zero.
6082            fidl::decode!(
6083                fidl::encoding::Optional<
6084                    fidl::encoding::Vector<
6085                        fidl::encoding::HandleType<
6086                            fidl::NullableHandle,
6087                            { fidl::ObjectType::NONE.into_raw() },
6088                            2147483648,
6089                        >,
6090                        2,
6091                    >,
6092                >,
6093                fidl::encoding::DefaultFuchsiaResourceDialect,
6094                &mut self.vh0,
6095                decoder,
6096                offset + 0,
6097                _depth
6098            )?;
6099            fidl::decode!(
6100                fidl::encoding::Optional<
6101                    fidl::encoding::Vector<
6102                        fidl::encoding::HandleType<
6103                            fidl::NullableHandle,
6104                            { fidl::ObjectType::NONE.into_raw() },
6105                            2147483648,
6106                        >,
6107                        32,
6108                    >,
6109                >,
6110                fidl::encoding::DefaultFuchsiaResourceDialect,
6111                &mut self.vh1,
6112                decoder,
6113                offset + 16,
6114                _depth
6115            )?;
6116            Ok(())
6117        }
6118    }
6119
6120    impl fidl::encoding::ResourceTypeMarker for MultipleHandleSubtypes {
6121        type Borrowed<'a> = &'a mut Self;
6122        fn take_or_borrow<'a>(
6123            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6124        ) -> Self::Borrowed<'a> {
6125            value
6126        }
6127    }
6128
6129    unsafe impl fidl::encoding::TypeMarker for MultipleHandleSubtypes {
6130        type Owned = Self;
6131
6132        #[inline(always)]
6133        fn inline_align(_context: fidl::encoding::Context) -> usize {
6134            4
6135        }
6136
6137        #[inline(always)]
6138        fn inline_size(_context: fidl::encoding::Context) -> usize {
6139            12
6140        }
6141    }
6142
6143    unsafe impl
6144        fidl::encoding::Encode<
6145            MultipleHandleSubtypes,
6146            fidl::encoding::DefaultFuchsiaResourceDialect,
6147        > for &mut MultipleHandleSubtypes
6148    {
6149        #[inline]
6150        unsafe fn encode(
6151            self,
6152            encoder: &mut fidl::encoding::Encoder<
6153                '_,
6154                fidl::encoding::DefaultFuchsiaResourceDialect,
6155            >,
6156            offset: usize,
6157            _depth: fidl::encoding::Depth,
6158        ) -> fidl::Result<()> {
6159            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6160            // Delegate to tuple encoding.
6161            fidl::encoding::Encode::<
6162                MultipleHandleSubtypes,
6163                fidl::encoding::DefaultFuchsiaResourceDialect,
6164            >::encode(
6165                (
6166                    <fidl::encoding::HandleType<
6167                        fidl::NullableHandle,
6168                        { fidl::ObjectType::NONE.into_raw() },
6169                        2147483648,
6170                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6171                        &mut self.untyped
6172                    ),
6173                    <fidl::encoding::HandleType<
6174                        fidl::Event,
6175                        { fidl::ObjectType::EVENT.into_raw() },
6176                        2147483648,
6177                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6178                        &mut self.event
6179                    ),
6180                    <fidl::encoding::HandleType<
6181                        fidl::Channel,
6182                        { fidl::ObjectType::CHANNEL.into_raw() },
6183                        2147483648,
6184                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6185                        &mut self.channel
6186                    ),
6187                ),
6188                encoder,
6189                offset,
6190                _depth,
6191            )
6192        }
6193    }
6194    unsafe impl<
6195        T0: fidl::encoding::Encode<
6196                fidl::encoding::HandleType<
6197                    fidl::NullableHandle,
6198                    { fidl::ObjectType::NONE.into_raw() },
6199                    2147483648,
6200                >,
6201                fidl::encoding::DefaultFuchsiaResourceDialect,
6202            >,
6203        T1: fidl::encoding::Encode<
6204                fidl::encoding::HandleType<
6205                    fidl::Event,
6206                    { fidl::ObjectType::EVENT.into_raw() },
6207                    2147483648,
6208                >,
6209                fidl::encoding::DefaultFuchsiaResourceDialect,
6210            >,
6211        T2: fidl::encoding::Encode<
6212                fidl::encoding::HandleType<
6213                    fidl::Channel,
6214                    { fidl::ObjectType::CHANNEL.into_raw() },
6215                    2147483648,
6216                >,
6217                fidl::encoding::DefaultFuchsiaResourceDialect,
6218            >,
6219    >
6220        fidl::encoding::Encode<
6221            MultipleHandleSubtypes,
6222            fidl::encoding::DefaultFuchsiaResourceDialect,
6223        > for (T0, T1, T2)
6224    {
6225        #[inline]
6226        unsafe fn encode(
6227            self,
6228            encoder: &mut fidl::encoding::Encoder<
6229                '_,
6230                fidl::encoding::DefaultFuchsiaResourceDialect,
6231            >,
6232            offset: usize,
6233            depth: fidl::encoding::Depth,
6234        ) -> fidl::Result<()> {
6235            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6236            // Zero out padding regions. There's no need to apply masks
6237            // because the unmasked parts will be overwritten by fields.
6238            // Write the fields.
6239            self.0.encode(encoder, offset + 0, depth)?;
6240            self.1.encode(encoder, offset + 4, depth)?;
6241            self.2.encode(encoder, offset + 8, depth)?;
6242            Ok(())
6243        }
6244    }
6245
6246    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6247        for MultipleHandleSubtypes
6248    {
6249        #[inline(always)]
6250        fn new_empty() -> Self {
6251            Self {
6252                untyped: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6253                event: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6254                channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6255            }
6256        }
6257
6258        #[inline]
6259        unsafe fn decode(
6260            &mut self,
6261            decoder: &mut fidl::encoding::Decoder<
6262                '_,
6263                fidl::encoding::DefaultFuchsiaResourceDialect,
6264            >,
6265            offset: usize,
6266            _depth: fidl::encoding::Depth,
6267        ) -> fidl::Result<()> {
6268            decoder.debug_check_bounds::<Self>(offset);
6269            // Verify that padding bytes are zero.
6270            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.untyped, decoder, offset + 0, _depth)?;
6271            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.event, decoder, offset + 4, _depth)?;
6272            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 8, _depth)?;
6273            Ok(())
6274        }
6275    }
6276
6277    impl fidl::encoding::ResourceTypeMarker for MultipleNonnullableHandles {
6278        type Borrowed<'a> = &'a mut Self;
6279        fn take_or_borrow<'a>(
6280            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6281        ) -> Self::Borrowed<'a> {
6282            value
6283        }
6284    }
6285
6286    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableHandles {
6287        type Owned = Self;
6288
6289        #[inline(always)]
6290        fn inline_align(_context: fidl::encoding::Context) -> usize {
6291            8
6292        }
6293
6294        #[inline(always)]
6295        fn inline_size(_context: fidl::encoding::Context) -> usize {
6296            32
6297        }
6298    }
6299
6300    unsafe impl
6301        fidl::encoding::Encode<
6302            MultipleNonnullableHandles,
6303            fidl::encoding::DefaultFuchsiaResourceDialect,
6304        > for &mut MultipleNonnullableHandles
6305    {
6306        #[inline]
6307        unsafe fn encode(
6308            self,
6309            encoder: &mut fidl::encoding::Encoder<
6310                '_,
6311                fidl::encoding::DefaultFuchsiaResourceDialect,
6312            >,
6313            offset: usize,
6314            _depth: fidl::encoding::Depth,
6315        ) -> fidl::Result<()> {
6316            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6317            // Delegate to tuple encoding.
6318            fidl::encoding::Encode::<
6319                MultipleNonnullableHandles,
6320                fidl::encoding::DefaultFuchsiaResourceDialect,
6321            >::encode(
6322                (
6323                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6324                    <fidl::encoding::HandleType<
6325                        fidl::NullableHandle,
6326                        { fidl::ObjectType::NONE.into_raw() },
6327                        2147483648,
6328                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6329                        &mut self.handle0
6330                    ),
6331                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6332                    <fidl::encoding::HandleType<
6333                        fidl::Channel,
6334                        { fidl::ObjectType::CHANNEL.into_raw() },
6335                        2147483648,
6336                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6337                        &mut self.handle1
6338                    ),
6339                    <fidl::encoding::HandleType<
6340                        fidl::Event,
6341                        { fidl::ObjectType::EVENT.into_raw() },
6342                        2147483648,
6343                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6344                        &mut self.handle2
6345                    ),
6346                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6347                ),
6348                encoder,
6349                offset,
6350                _depth,
6351            )
6352        }
6353    }
6354    unsafe impl<
6355        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6356        T1: fidl::encoding::Encode<
6357                fidl::encoding::HandleType<
6358                    fidl::NullableHandle,
6359                    { fidl::ObjectType::NONE.into_raw() },
6360                    2147483648,
6361                >,
6362                fidl::encoding::DefaultFuchsiaResourceDialect,
6363            >,
6364        T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6365        T3: fidl::encoding::Encode<
6366                fidl::encoding::HandleType<
6367                    fidl::Channel,
6368                    { fidl::ObjectType::CHANNEL.into_raw() },
6369                    2147483648,
6370                >,
6371                fidl::encoding::DefaultFuchsiaResourceDialect,
6372            >,
6373        T4: fidl::encoding::Encode<
6374                fidl::encoding::HandleType<
6375                    fidl::Event,
6376                    { fidl::ObjectType::EVENT.into_raw() },
6377                    2147483648,
6378                >,
6379                fidl::encoding::DefaultFuchsiaResourceDialect,
6380            >,
6381        T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6382    >
6383        fidl::encoding::Encode<
6384            MultipleNonnullableHandles,
6385            fidl::encoding::DefaultFuchsiaResourceDialect,
6386        > for (T0, T1, T2, T3, T4, T5)
6387    {
6388        #[inline]
6389        unsafe fn encode(
6390            self,
6391            encoder: &mut fidl::encoding::Encoder<
6392                '_,
6393                fidl::encoding::DefaultFuchsiaResourceDialect,
6394            >,
6395            offset: usize,
6396            depth: fidl::encoding::Depth,
6397        ) -> fidl::Result<()> {
6398            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6399            // Zero out padding regions. There's no need to apply masks
6400            // because the unmasked parts will be overwritten by fields.
6401            // Write the fields.
6402            self.0.encode(encoder, offset + 0, depth)?;
6403            self.1.encode(encoder, offset + 4, depth)?;
6404            self.2.encode(encoder, offset + 8, depth)?;
6405            self.3.encode(encoder, offset + 16, depth)?;
6406            self.4.encode(encoder, offset + 20, depth)?;
6407            self.5.encode(encoder, offset + 24, depth)?;
6408            Ok(())
6409        }
6410    }
6411
6412    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6413        for MultipleNonnullableHandles
6414    {
6415        #[inline(always)]
6416        fn new_empty() -> Self {
6417            Self {
6418                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6419                handle0: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6420                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6421                handle1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6422                handle2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6423                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6424            }
6425        }
6426
6427        #[inline]
6428        unsafe fn decode(
6429            &mut self,
6430            decoder: &mut fidl::encoding::Decoder<
6431                '_,
6432                fidl::encoding::DefaultFuchsiaResourceDialect,
6433            >,
6434            offset: usize,
6435            _depth: fidl::encoding::Depth,
6436        ) -> fidl::Result<()> {
6437            decoder.debug_check_bounds::<Self>(offset);
6438            // Verify that padding bytes are zero.
6439            fidl::decode!(
6440                u32,
6441                fidl::encoding::DefaultFuchsiaResourceDialect,
6442                &mut self.data0,
6443                decoder,
6444                offset + 0,
6445                _depth
6446            )?;
6447            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle0, decoder, offset + 4, _depth)?;
6448            fidl::decode!(
6449                u64,
6450                fidl::encoding::DefaultFuchsiaResourceDialect,
6451                &mut self.data1,
6452                decoder,
6453                offset + 8,
6454                _depth
6455            )?;
6456            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle1, decoder, offset + 16, _depth)?;
6457            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle2, decoder, offset + 20, _depth)?;
6458            fidl::decode!(
6459                u64,
6460                fidl::encoding::DefaultFuchsiaResourceDialect,
6461                &mut self.data2,
6462                decoder,
6463                offset + 24,
6464                _depth
6465            )?;
6466            Ok(())
6467        }
6468    }
6469
6470    impl fidl::encoding::ResourceTypeMarker for MultipleNullableHandles {
6471        type Borrowed<'a> = &'a mut Self;
6472        fn take_or_borrow<'a>(
6473            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6474        ) -> Self::Borrowed<'a> {
6475            value
6476        }
6477    }
6478
6479    unsafe impl fidl::encoding::TypeMarker for MultipleNullableHandles {
6480        type Owned = Self;
6481
6482        #[inline(always)]
6483        fn inline_align(_context: fidl::encoding::Context) -> usize {
6484            8
6485        }
6486
6487        #[inline(always)]
6488        fn inline_size(_context: fidl::encoding::Context) -> usize {
6489            32
6490        }
6491    }
6492
6493    unsafe impl
6494        fidl::encoding::Encode<
6495            MultipleNullableHandles,
6496            fidl::encoding::DefaultFuchsiaResourceDialect,
6497        > for &mut MultipleNullableHandles
6498    {
6499        #[inline]
6500        unsafe fn encode(
6501            self,
6502            encoder: &mut fidl::encoding::Encoder<
6503                '_,
6504                fidl::encoding::DefaultFuchsiaResourceDialect,
6505            >,
6506            offset: usize,
6507            _depth: fidl::encoding::Depth,
6508        ) -> fidl::Result<()> {
6509            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6510            // Delegate to tuple encoding.
6511            fidl::encoding::Encode::<
6512                MultipleNullableHandles,
6513                fidl::encoding::DefaultFuchsiaResourceDialect,
6514            >::encode(
6515                (
6516                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6517                    <fidl::encoding::Optional<
6518                        fidl::encoding::HandleType<
6519                            fidl::NullableHandle,
6520                            { fidl::ObjectType::NONE.into_raw() },
6521                            2147483648,
6522                        >,
6523                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6524                        &mut self.handle0
6525                    ),
6526                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6527                    <fidl::encoding::Optional<
6528                        fidl::encoding::HandleType<
6529                            fidl::Channel,
6530                            { fidl::ObjectType::CHANNEL.into_raw() },
6531                            2147483648,
6532                        >,
6533                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6534                        &mut self.handle1
6535                    ),
6536                    <fidl::encoding::Optional<
6537                        fidl::encoding::HandleType<
6538                            fidl::Event,
6539                            { fidl::ObjectType::EVENT.into_raw() },
6540                            2147483648,
6541                        >,
6542                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6543                        &mut self.handle2
6544                    ),
6545                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6546                ),
6547                encoder,
6548                offset,
6549                _depth,
6550            )
6551        }
6552    }
6553    unsafe impl<
6554        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6555        T1: fidl::encoding::Encode<
6556                fidl::encoding::Optional<
6557                    fidl::encoding::HandleType<
6558                        fidl::NullableHandle,
6559                        { fidl::ObjectType::NONE.into_raw() },
6560                        2147483648,
6561                    >,
6562                >,
6563                fidl::encoding::DefaultFuchsiaResourceDialect,
6564            >,
6565        T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6566        T3: fidl::encoding::Encode<
6567                fidl::encoding::Optional<
6568                    fidl::encoding::HandleType<
6569                        fidl::Channel,
6570                        { fidl::ObjectType::CHANNEL.into_raw() },
6571                        2147483648,
6572                    >,
6573                >,
6574                fidl::encoding::DefaultFuchsiaResourceDialect,
6575            >,
6576        T4: fidl::encoding::Encode<
6577                fidl::encoding::Optional<
6578                    fidl::encoding::HandleType<
6579                        fidl::Event,
6580                        { fidl::ObjectType::EVENT.into_raw() },
6581                        2147483648,
6582                    >,
6583                >,
6584                fidl::encoding::DefaultFuchsiaResourceDialect,
6585            >,
6586        T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6587    >
6588        fidl::encoding::Encode<
6589            MultipleNullableHandles,
6590            fidl::encoding::DefaultFuchsiaResourceDialect,
6591        > for (T0, T1, T2, T3, T4, T5)
6592    {
6593        #[inline]
6594        unsafe fn encode(
6595            self,
6596            encoder: &mut fidl::encoding::Encoder<
6597                '_,
6598                fidl::encoding::DefaultFuchsiaResourceDialect,
6599            >,
6600            offset: usize,
6601            depth: fidl::encoding::Depth,
6602        ) -> fidl::Result<()> {
6603            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6604            // Zero out padding regions. There's no need to apply masks
6605            // because the unmasked parts will be overwritten by fields.
6606            // Write the fields.
6607            self.0.encode(encoder, offset + 0, depth)?;
6608            self.1.encode(encoder, offset + 4, depth)?;
6609            self.2.encode(encoder, offset + 8, depth)?;
6610            self.3.encode(encoder, offset + 16, depth)?;
6611            self.4.encode(encoder, offset + 20, depth)?;
6612            self.5.encode(encoder, offset + 24, depth)?;
6613            Ok(())
6614        }
6615    }
6616
6617    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6618        for MultipleNullableHandles
6619    {
6620        #[inline(always)]
6621        fn new_empty() -> Self {
6622            Self {
6623                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6624                handle0: fidl::new_empty!(
6625                    fidl::encoding::Optional<
6626                        fidl::encoding::HandleType<
6627                            fidl::NullableHandle,
6628                            { fidl::ObjectType::NONE.into_raw() },
6629                            2147483648,
6630                        >,
6631                    >,
6632                    fidl::encoding::DefaultFuchsiaResourceDialect
6633                ),
6634                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6635                handle1: fidl::new_empty!(
6636                    fidl::encoding::Optional<
6637                        fidl::encoding::HandleType<
6638                            fidl::Channel,
6639                            { fidl::ObjectType::CHANNEL.into_raw() },
6640                            2147483648,
6641                        >,
6642                    >,
6643                    fidl::encoding::DefaultFuchsiaResourceDialect
6644                ),
6645                handle2: fidl::new_empty!(
6646                    fidl::encoding::Optional<
6647                        fidl::encoding::HandleType<
6648                            fidl::Event,
6649                            { fidl::ObjectType::EVENT.into_raw() },
6650                            2147483648,
6651                        >,
6652                    >,
6653                    fidl::encoding::DefaultFuchsiaResourceDialect
6654                ),
6655                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6656            }
6657        }
6658
6659        #[inline]
6660        unsafe fn decode(
6661            &mut self,
6662            decoder: &mut fidl::encoding::Decoder<
6663                '_,
6664                fidl::encoding::DefaultFuchsiaResourceDialect,
6665            >,
6666            offset: usize,
6667            _depth: fidl::encoding::Depth,
6668        ) -> fidl::Result<()> {
6669            decoder.debug_check_bounds::<Self>(offset);
6670            // Verify that padding bytes are zero.
6671            fidl::decode!(
6672                u32,
6673                fidl::encoding::DefaultFuchsiaResourceDialect,
6674                &mut self.data0,
6675                decoder,
6676                offset + 0,
6677                _depth
6678            )?;
6679            fidl::decode!(
6680                fidl::encoding::Optional<
6681                    fidl::encoding::HandleType<
6682                        fidl::NullableHandle,
6683                        { fidl::ObjectType::NONE.into_raw() },
6684                        2147483648,
6685                    >,
6686                >,
6687                fidl::encoding::DefaultFuchsiaResourceDialect,
6688                &mut self.handle0,
6689                decoder,
6690                offset + 4,
6691                _depth
6692            )?;
6693            fidl::decode!(
6694                u64,
6695                fidl::encoding::DefaultFuchsiaResourceDialect,
6696                &mut self.data1,
6697                decoder,
6698                offset + 8,
6699                _depth
6700            )?;
6701            fidl::decode!(
6702                fidl::encoding::Optional<
6703                    fidl::encoding::HandleType<
6704                        fidl::Channel,
6705                        { fidl::ObjectType::CHANNEL.into_raw() },
6706                        2147483648,
6707                    >,
6708                >,
6709                fidl::encoding::DefaultFuchsiaResourceDialect,
6710                &mut self.handle1,
6711                decoder,
6712                offset + 16,
6713                _depth
6714            )?;
6715            fidl::decode!(
6716                fidl::encoding::Optional<
6717                    fidl::encoding::HandleType<
6718                        fidl::Event,
6719                        { fidl::ObjectType::EVENT.into_raw() },
6720                        2147483648,
6721                    >,
6722                >,
6723                fidl::encoding::DefaultFuchsiaResourceDialect,
6724                &mut self.handle2,
6725                decoder,
6726                offset + 20,
6727                _depth
6728            )?;
6729            fidl::decode!(
6730                u64,
6731                fidl::encoding::DefaultFuchsiaResourceDialect,
6732                &mut self.data2,
6733                decoder,
6734                offset + 24,
6735                _depth
6736            )?;
6737            Ok(())
6738        }
6739    }
6740
6741    impl fidl::encoding::ResourceTypeMarker for NonnullableHandle {
6742        type Borrowed<'a> = &'a mut Self;
6743        fn take_or_borrow<'a>(
6744            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6745        ) -> Self::Borrowed<'a> {
6746            value
6747        }
6748    }
6749
6750    unsafe impl fidl::encoding::TypeMarker for NonnullableHandle {
6751        type Owned = Self;
6752
6753        #[inline(always)]
6754        fn inline_align(_context: fidl::encoding::Context) -> usize {
6755            4
6756        }
6757
6758        #[inline(always)]
6759        fn inline_size(_context: fidl::encoding::Context) -> usize {
6760            4
6761        }
6762    }
6763
6764    unsafe impl
6765        fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6766        for &mut NonnullableHandle
6767    {
6768        #[inline]
6769        unsafe fn encode(
6770            self,
6771            encoder: &mut fidl::encoding::Encoder<
6772                '_,
6773                fidl::encoding::DefaultFuchsiaResourceDialect,
6774            >,
6775            offset: usize,
6776            _depth: fidl::encoding::Depth,
6777        ) -> fidl::Result<()> {
6778            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6779            // Delegate to tuple encoding.
6780            fidl::encoding::Encode::<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6781                (
6782                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
6783                ),
6784                encoder, offset, _depth
6785            )
6786        }
6787    }
6788    unsafe impl<
6789        T0: fidl::encoding::Encode<
6790                fidl::encoding::HandleType<
6791                    fidl::NullableHandle,
6792                    { fidl::ObjectType::NONE.into_raw() },
6793                    2147483648,
6794                >,
6795                fidl::encoding::DefaultFuchsiaResourceDialect,
6796            >,
6797    > fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6798        for (T0,)
6799    {
6800        #[inline]
6801        unsafe fn encode(
6802            self,
6803            encoder: &mut fidl::encoding::Encoder<
6804                '_,
6805                fidl::encoding::DefaultFuchsiaResourceDialect,
6806            >,
6807            offset: usize,
6808            depth: fidl::encoding::Depth,
6809        ) -> fidl::Result<()> {
6810            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6811            // Zero out padding regions. There's no need to apply masks
6812            // because the unmasked parts will be overwritten by fields.
6813            // Write the fields.
6814            self.0.encode(encoder, offset + 0, depth)?;
6815            Ok(())
6816        }
6817    }
6818
6819    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6820        for NonnullableHandle
6821    {
6822        #[inline(always)]
6823        fn new_empty() -> Self {
6824            Self {
6825                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6826            }
6827        }
6828
6829        #[inline]
6830        unsafe fn decode(
6831            &mut self,
6832            decoder: &mut fidl::encoding::Decoder<
6833                '_,
6834                fidl::encoding::DefaultFuchsiaResourceDialect,
6835            >,
6836            offset: usize,
6837            _depth: fidl::encoding::Depth,
6838        ) -> fidl::Result<()> {
6839            decoder.debug_check_bounds::<Self>(offset);
6840            // Verify that padding bytes are zero.
6841            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
6842            Ok(())
6843        }
6844    }
6845
6846    impl fidl::encoding::ResourceTypeMarker for NonnullableHandleArray {
6847        type Borrowed<'a> = &'a mut Self;
6848        fn take_or_borrow<'a>(
6849            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6850        ) -> Self::Borrowed<'a> {
6851            value
6852        }
6853    }
6854
6855    unsafe impl fidl::encoding::TypeMarker for NonnullableHandleArray {
6856        type Owned = Self;
6857
6858        #[inline(always)]
6859        fn inline_align(_context: fidl::encoding::Context) -> usize {
6860            4
6861        }
6862
6863        #[inline(always)]
6864        fn inline_size(_context: fidl::encoding::Context) -> usize {
6865            16
6866        }
6867    }
6868
6869    unsafe impl
6870        fidl::encoding::Encode<
6871            NonnullableHandleArray,
6872            fidl::encoding::DefaultFuchsiaResourceDialect,
6873        > for &mut NonnullableHandleArray
6874    {
6875        #[inline]
6876        unsafe fn encode(
6877            self,
6878            encoder: &mut fidl::encoding::Encoder<
6879                '_,
6880                fidl::encoding::DefaultFuchsiaResourceDialect,
6881            >,
6882            offset: usize,
6883            _depth: fidl::encoding::Depth,
6884        ) -> fidl::Result<()> {
6885            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6886            // Delegate to tuple encoding.
6887            fidl::encoding::Encode::<
6888                NonnullableHandleArray,
6889                fidl::encoding::DefaultFuchsiaResourceDialect,
6890            >::encode(
6891                (<fidl::encoding::Array<
6892                    fidl::encoding::HandleType<
6893                        fidl::NullableHandle,
6894                        { fidl::ObjectType::NONE.into_raw() },
6895                        2147483648,
6896                    >,
6897                    4,
6898                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6899                    &mut self.handles
6900                ),),
6901                encoder,
6902                offset,
6903                _depth,
6904            )
6905        }
6906    }
6907    unsafe impl<
6908        T0: fidl::encoding::Encode<
6909                fidl::encoding::Array<
6910                    fidl::encoding::HandleType<
6911                        fidl::NullableHandle,
6912                        { fidl::ObjectType::NONE.into_raw() },
6913                        2147483648,
6914                    >,
6915                    4,
6916                >,
6917                fidl::encoding::DefaultFuchsiaResourceDialect,
6918            >,
6919    >
6920        fidl::encoding::Encode<
6921            NonnullableHandleArray,
6922            fidl::encoding::DefaultFuchsiaResourceDialect,
6923        > for (T0,)
6924    {
6925        #[inline]
6926        unsafe fn encode(
6927            self,
6928            encoder: &mut fidl::encoding::Encoder<
6929                '_,
6930                fidl::encoding::DefaultFuchsiaResourceDialect,
6931            >,
6932            offset: usize,
6933            depth: fidl::encoding::Depth,
6934        ) -> fidl::Result<()> {
6935            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6936            // Zero out padding regions. There's no need to apply masks
6937            // because the unmasked parts will be overwritten by fields.
6938            // Write the fields.
6939            self.0.encode(encoder, offset + 0, depth)?;
6940            Ok(())
6941        }
6942    }
6943
6944    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6945        for NonnullableHandleArray
6946    {
6947        #[inline(always)]
6948        fn new_empty() -> Self {
6949            Self {
6950                handles: fidl::new_empty!(
6951                    fidl::encoding::Array<
6952                        fidl::encoding::HandleType<
6953                            fidl::NullableHandle,
6954                            { fidl::ObjectType::NONE.into_raw() },
6955                            2147483648,
6956                        >,
6957                        4,
6958                    >,
6959                    fidl::encoding::DefaultFuchsiaResourceDialect
6960                ),
6961            }
6962        }
6963
6964        #[inline]
6965        unsafe fn decode(
6966            &mut self,
6967            decoder: &mut fidl::encoding::Decoder<
6968                '_,
6969                fidl::encoding::DefaultFuchsiaResourceDialect,
6970            >,
6971            offset: usize,
6972            _depth: fidl::encoding::Depth,
6973        ) -> fidl::Result<()> {
6974            decoder.debug_check_bounds::<Self>(offset);
6975            // Verify that padding bytes are zero.
6976            fidl::decode!(
6977                fidl::encoding::Array<
6978                    fidl::encoding::HandleType<
6979                        fidl::NullableHandle,
6980                        { fidl::ObjectType::NONE.into_raw() },
6981                        2147483648,
6982                    >,
6983                    4,
6984                >,
6985                fidl::encoding::DefaultFuchsiaResourceDialect,
6986                &mut self.handles,
6987                decoder,
6988                offset + 0,
6989                _depth
6990            )?;
6991            Ok(())
6992        }
6993    }
6994
6995    impl fidl::encoding::ResourceTypeMarker for NullableHandle {
6996        type Borrowed<'a> = &'a mut Self;
6997        fn take_or_borrow<'a>(
6998            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6999        ) -> Self::Borrowed<'a> {
7000            value
7001        }
7002    }
7003
7004    unsafe impl fidl::encoding::TypeMarker for NullableHandle {
7005        type Owned = Self;
7006
7007        #[inline(always)]
7008        fn inline_align(_context: fidl::encoding::Context) -> usize {
7009            4
7010        }
7011
7012        #[inline(always)]
7013        fn inline_size(_context: fidl::encoding::Context) -> usize {
7014            4
7015        }
7016    }
7017
7018    unsafe impl
7019        fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7020        for &mut NullableHandle
7021    {
7022        #[inline]
7023        unsafe fn encode(
7024            self,
7025            encoder: &mut fidl::encoding::Encoder<
7026                '_,
7027                fidl::encoding::DefaultFuchsiaResourceDialect,
7028            >,
7029            offset: usize,
7030            _depth: fidl::encoding::Depth,
7031        ) -> fidl::Result<()> {
7032            encoder.debug_check_bounds::<NullableHandle>(offset);
7033            // Delegate to tuple encoding.
7034            fidl::encoding::Encode::<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7035                (
7036                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7037                ),
7038                encoder, offset, _depth
7039            )
7040        }
7041    }
7042    unsafe impl<
7043        T0: fidl::encoding::Encode<
7044                fidl::encoding::Optional<
7045                    fidl::encoding::HandleType<
7046                        fidl::NullableHandle,
7047                        { fidl::ObjectType::NONE.into_raw() },
7048                        2147483648,
7049                    >,
7050                >,
7051                fidl::encoding::DefaultFuchsiaResourceDialect,
7052            >,
7053    > fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7054        for (T0,)
7055    {
7056        #[inline]
7057        unsafe fn encode(
7058            self,
7059            encoder: &mut fidl::encoding::Encoder<
7060                '_,
7061                fidl::encoding::DefaultFuchsiaResourceDialect,
7062            >,
7063            offset: usize,
7064            depth: fidl::encoding::Depth,
7065        ) -> fidl::Result<()> {
7066            encoder.debug_check_bounds::<NullableHandle>(offset);
7067            // Zero out padding regions. There's no need to apply masks
7068            // because the unmasked parts will be overwritten by fields.
7069            // Write the fields.
7070            self.0.encode(encoder, offset + 0, depth)?;
7071            Ok(())
7072        }
7073    }
7074
7075    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7076        for NullableHandle
7077    {
7078        #[inline(always)]
7079        fn new_empty() -> Self {
7080            Self {
7081                h: fidl::new_empty!(
7082                    fidl::encoding::Optional<
7083                        fidl::encoding::HandleType<
7084                            fidl::NullableHandle,
7085                            { fidl::ObjectType::NONE.into_raw() },
7086                            2147483648,
7087                        >,
7088                    >,
7089                    fidl::encoding::DefaultFuchsiaResourceDialect
7090                ),
7091            }
7092        }
7093
7094        #[inline]
7095        unsafe fn decode(
7096            &mut self,
7097            decoder: &mut fidl::encoding::Decoder<
7098                '_,
7099                fidl::encoding::DefaultFuchsiaResourceDialect,
7100            >,
7101            offset: usize,
7102            _depth: fidl::encoding::Depth,
7103        ) -> fidl::Result<()> {
7104            decoder.debug_check_bounds::<Self>(offset);
7105            // Verify that padding bytes are zero.
7106            fidl::decode!(
7107                fidl::encoding::Optional<
7108                    fidl::encoding::HandleType<
7109                        fidl::NullableHandle,
7110                        { fidl::ObjectType::NONE.into_raw() },
7111                        2147483648,
7112                    >,
7113                >,
7114                fidl::encoding::DefaultFuchsiaResourceDialect,
7115                &mut self.h,
7116                decoder,
7117                offset + 0,
7118                _depth
7119            )?;
7120            Ok(())
7121        }
7122    }
7123
7124    impl fidl::encoding::ResourceTypeMarker for OutOfLineArrayOfNonnullableHandles {
7125        type Borrowed<'a> = &'a mut Self;
7126        fn take_or_borrow<'a>(
7127            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7128        ) -> Self::Borrowed<'a> {
7129            value
7130        }
7131    }
7132
7133    unsafe impl fidl::encoding::TypeMarker for OutOfLineArrayOfNonnullableHandles {
7134        type Owned = Self;
7135
7136        #[inline(always)]
7137        fn inline_align(_context: fidl::encoding::Context) -> usize {
7138            8
7139        }
7140
7141        #[inline(always)]
7142        fn inline_size(_context: fidl::encoding::Context) -> usize {
7143            8
7144        }
7145    }
7146
7147    unsafe impl
7148        fidl::encoding::Encode<
7149            OutOfLineArrayOfNonnullableHandles,
7150            fidl::encoding::DefaultFuchsiaResourceDialect,
7151        > for &mut OutOfLineArrayOfNonnullableHandles
7152    {
7153        #[inline]
7154        unsafe fn encode(
7155            self,
7156            encoder: &mut fidl::encoding::Encoder<
7157                '_,
7158                fidl::encoding::DefaultFuchsiaResourceDialect,
7159            >,
7160            offset: usize,
7161            _depth: fidl::encoding::Depth,
7162        ) -> fidl::Result<()> {
7163            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7164            // Delegate to tuple encoding.
7165            fidl::encoding::Encode::<OutOfLineArrayOfNonnullableHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7166                (
7167                    <fidl::encoding::Boxed<NonnullableHandleArray> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
7168                ),
7169                encoder, offset, _depth
7170            )
7171        }
7172    }
7173    unsafe impl<
7174        T0: fidl::encoding::Encode<
7175                fidl::encoding::Boxed<NonnullableHandleArray>,
7176                fidl::encoding::DefaultFuchsiaResourceDialect,
7177            >,
7178    >
7179        fidl::encoding::Encode<
7180            OutOfLineArrayOfNonnullableHandles,
7181            fidl::encoding::DefaultFuchsiaResourceDialect,
7182        > for (T0,)
7183    {
7184        #[inline]
7185        unsafe fn encode(
7186            self,
7187            encoder: &mut fidl::encoding::Encoder<
7188                '_,
7189                fidl::encoding::DefaultFuchsiaResourceDialect,
7190            >,
7191            offset: usize,
7192            depth: fidl::encoding::Depth,
7193        ) -> fidl::Result<()> {
7194            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7195            // Zero out padding regions. There's no need to apply masks
7196            // because the unmasked parts will be overwritten by fields.
7197            // Write the fields.
7198            self.0.encode(encoder, offset + 0, depth)?;
7199            Ok(())
7200        }
7201    }
7202
7203    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7204        for OutOfLineArrayOfNonnullableHandles
7205    {
7206        #[inline(always)]
7207        fn new_empty() -> Self {
7208            Self {
7209                handles: fidl::new_empty!(
7210                    fidl::encoding::Boxed<NonnullableHandleArray>,
7211                    fidl::encoding::DefaultFuchsiaResourceDialect
7212                ),
7213            }
7214        }
7215
7216        #[inline]
7217        unsafe fn decode(
7218            &mut self,
7219            decoder: &mut fidl::encoding::Decoder<
7220                '_,
7221                fidl::encoding::DefaultFuchsiaResourceDialect,
7222            >,
7223            offset: usize,
7224            _depth: fidl::encoding::Depth,
7225        ) -> fidl::Result<()> {
7226            decoder.debug_check_bounds::<Self>(offset);
7227            // Verify that padding bytes are zero.
7228            fidl::decode!(
7229                fidl::encoding::Boxed<NonnullableHandleArray>,
7230                fidl::encoding::DefaultFuchsiaResourceDialect,
7231                &mut self.handles,
7232                decoder,
7233                offset + 0,
7234                _depth
7235            )?;
7236            Ok(())
7237        }
7238    }
7239
7240    impl fidl::encoding::ResourceTypeMarker for Sandwich6 {
7241        type Borrowed<'a> = &'a mut Self;
7242        fn take_or_borrow<'a>(
7243            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7244        ) -> Self::Borrowed<'a> {
7245            value
7246        }
7247    }
7248
7249    unsafe impl fidl::encoding::TypeMarker for Sandwich6 {
7250        type Owned = Self;
7251
7252        #[inline(always)]
7253        fn inline_align(_context: fidl::encoding::Context) -> usize {
7254            8
7255        }
7256
7257        #[inline(always)]
7258        fn inline_size(_context: fidl::encoding::Context) -> usize {
7259            32
7260        }
7261    }
7262
7263    unsafe impl fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7264        for &mut Sandwich6
7265    {
7266        #[inline]
7267        unsafe fn encode(
7268            self,
7269            encoder: &mut fidl::encoding::Encoder<
7270                '_,
7271                fidl::encoding::DefaultFuchsiaResourceDialect,
7272            >,
7273            offset: usize,
7274            _depth: fidl::encoding::Depth,
7275        ) -> fidl::Result<()> {
7276            encoder.debug_check_bounds::<Sandwich6>(offset);
7277            // Delegate to tuple encoding.
7278            fidl::encoding::Encode::<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7279                (
7280                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
7281                    <UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.the_union),
7282                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
7283                ),
7284                encoder, offset, _depth
7285            )
7286        }
7287    }
7288    unsafe impl<
7289        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7290        T1: fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>,
7291        T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7292    > fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7293        for (T0, T1, T2)
7294    {
7295        #[inline]
7296        unsafe fn encode(
7297            self,
7298            encoder: &mut fidl::encoding::Encoder<
7299                '_,
7300                fidl::encoding::DefaultFuchsiaResourceDialect,
7301            >,
7302            offset: usize,
7303            depth: fidl::encoding::Depth,
7304        ) -> fidl::Result<()> {
7305            encoder.debug_check_bounds::<Sandwich6>(offset);
7306            // Zero out padding regions. There's no need to apply masks
7307            // because the unmasked parts will be overwritten by fields.
7308            unsafe {
7309                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7310                (ptr as *mut u64).write_unaligned(0);
7311            }
7312            unsafe {
7313                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
7314                (ptr as *mut u64).write_unaligned(0);
7315            }
7316            // Write the fields.
7317            self.0.encode(encoder, offset + 0, depth)?;
7318            self.1.encode(encoder, offset + 8, depth)?;
7319            self.2.encode(encoder, offset + 24, depth)?;
7320            Ok(())
7321        }
7322    }
7323
7324    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {
7325        #[inline(always)]
7326        fn new_empty() -> Self {
7327            Self {
7328                before: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7329                the_union: fidl::new_empty!(
7330                    UnionWithVector,
7331                    fidl::encoding::DefaultFuchsiaResourceDialect
7332                ),
7333                after: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7334            }
7335        }
7336
7337        #[inline]
7338        unsafe fn decode(
7339            &mut self,
7340            decoder: &mut fidl::encoding::Decoder<
7341                '_,
7342                fidl::encoding::DefaultFuchsiaResourceDialect,
7343            >,
7344            offset: usize,
7345            _depth: fidl::encoding::Depth,
7346        ) -> fidl::Result<()> {
7347            decoder.debug_check_bounds::<Self>(offset);
7348            // Verify that padding bytes are zero.
7349            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7350            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7351            let mask = 0xffffffff00000000u64;
7352            let maskedval = padval & mask;
7353            if maskedval != 0 {
7354                return Err(fidl::Error::NonZeroPadding {
7355                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7356                });
7357            }
7358            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
7359            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7360            let mask = 0xffffffff00000000u64;
7361            let maskedval = padval & mask;
7362            if maskedval != 0 {
7363                return Err(fidl::Error::NonZeroPadding {
7364                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
7365                });
7366            }
7367            fidl::decode!(
7368                u32,
7369                fidl::encoding::DefaultFuchsiaResourceDialect,
7370                &mut self.before,
7371                decoder,
7372                offset + 0,
7373                _depth
7374            )?;
7375            fidl::decode!(
7376                UnionWithVector,
7377                fidl::encoding::DefaultFuchsiaResourceDialect,
7378                &mut self.the_union,
7379                decoder,
7380                offset + 8,
7381                _depth
7382            )?;
7383            fidl::decode!(
7384                u32,
7385                fidl::encoding::DefaultFuchsiaResourceDialect,
7386                &mut self.after,
7387                decoder,
7388                offset + 24,
7389                _depth
7390            )?;
7391            Ok(())
7392        }
7393    }
7394
7395    impl fidl::encoding::ResourceTypeMarker for ShortStringThenHandle {
7396        type Borrowed<'a> = &'a mut Self;
7397        fn take_or_borrow<'a>(
7398            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7399        ) -> Self::Borrowed<'a> {
7400            value
7401        }
7402    }
7403
7404    unsafe impl fidl::encoding::TypeMarker for ShortStringThenHandle {
7405        type Owned = Self;
7406
7407        #[inline(always)]
7408        fn inline_align(_context: fidl::encoding::Context) -> usize {
7409            8
7410        }
7411
7412        #[inline(always)]
7413        fn inline_size(_context: fidl::encoding::Context) -> usize {
7414            24
7415        }
7416    }
7417
7418    unsafe impl
7419        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7420        for &mut ShortStringThenHandle
7421    {
7422        #[inline]
7423        unsafe fn encode(
7424            self,
7425            encoder: &mut fidl::encoding::Encoder<
7426                '_,
7427                fidl::encoding::DefaultFuchsiaResourceDialect,
7428            >,
7429            offset: usize,
7430            _depth: fidl::encoding::Depth,
7431        ) -> fidl::Result<()> {
7432            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7433            // Delegate to tuple encoding.
7434            fidl::encoding::Encode::<
7435                ShortStringThenHandle,
7436                fidl::encoding::DefaultFuchsiaResourceDialect,
7437            >::encode(
7438                (
7439                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
7440                        &self.s,
7441                    ),
7442                    <fidl::encoding::HandleType<
7443                        fidl::NullableHandle,
7444                        { fidl::ObjectType::NONE.into_raw() },
7445                        2147483648,
7446                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7447                        &mut self.h
7448                    ),
7449                ),
7450                encoder,
7451                offset,
7452                _depth,
7453            )
7454        }
7455    }
7456    unsafe impl<
7457        T0: fidl::encoding::Encode<
7458                fidl::encoding::BoundedString<1>,
7459                fidl::encoding::DefaultFuchsiaResourceDialect,
7460            >,
7461        T1: fidl::encoding::Encode<
7462                fidl::encoding::HandleType<
7463                    fidl::NullableHandle,
7464                    { fidl::ObjectType::NONE.into_raw() },
7465                    2147483648,
7466                >,
7467                fidl::encoding::DefaultFuchsiaResourceDialect,
7468            >,
7469    >
7470        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7471        for (T0, T1)
7472    {
7473        #[inline]
7474        unsafe fn encode(
7475            self,
7476            encoder: &mut fidl::encoding::Encoder<
7477                '_,
7478                fidl::encoding::DefaultFuchsiaResourceDialect,
7479            >,
7480            offset: usize,
7481            depth: fidl::encoding::Depth,
7482        ) -> fidl::Result<()> {
7483            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7484            // Zero out padding regions. There's no need to apply masks
7485            // because the unmasked parts will be overwritten by fields.
7486            unsafe {
7487                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7488                (ptr as *mut u64).write_unaligned(0);
7489            }
7490            // Write the fields.
7491            self.0.encode(encoder, offset + 0, depth)?;
7492            self.1.encode(encoder, offset + 16, depth)?;
7493            Ok(())
7494        }
7495    }
7496
7497    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7498        for ShortStringThenHandle
7499    {
7500        #[inline(always)]
7501        fn new_empty() -> Self {
7502            Self {
7503                s: fidl::new_empty!(
7504                    fidl::encoding::BoundedString<1>,
7505                    fidl::encoding::DefaultFuchsiaResourceDialect
7506                ),
7507                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7508            }
7509        }
7510
7511        #[inline]
7512        unsafe fn decode(
7513            &mut self,
7514            decoder: &mut fidl::encoding::Decoder<
7515                '_,
7516                fidl::encoding::DefaultFuchsiaResourceDialect,
7517            >,
7518            offset: usize,
7519            _depth: fidl::encoding::Depth,
7520        ) -> fidl::Result<()> {
7521            decoder.debug_check_bounds::<Self>(offset);
7522            // Verify that padding bytes are zero.
7523            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7524            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7525            let mask = 0xffffffff00000000u64;
7526            let maskedval = padval & mask;
7527            if maskedval != 0 {
7528                return Err(fidl::Error::NonZeroPadding {
7529                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7530                });
7531            }
7532            fidl::decode!(
7533                fidl::encoding::BoundedString<1>,
7534                fidl::encoding::DefaultFuchsiaResourceDialect,
7535                &mut self.s,
7536                decoder,
7537                offset + 0,
7538                _depth
7539            )?;
7540            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 16, _depth)?;
7541            Ok(())
7542        }
7543    }
7544
7545    impl fidl::encoding::ResourceTypeMarker for SingleHandle {
7546        type Borrowed<'a> = &'a mut Self;
7547        fn take_or_borrow<'a>(
7548            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7549        ) -> Self::Borrowed<'a> {
7550            value
7551        }
7552    }
7553
7554    unsafe impl fidl::encoding::TypeMarker for SingleHandle {
7555        type Owned = Self;
7556
7557        #[inline(always)]
7558        fn inline_align(_context: fidl::encoding::Context) -> usize {
7559            4
7560        }
7561
7562        #[inline(always)]
7563        fn inline_size(_context: fidl::encoding::Context) -> usize {
7564            4
7565        }
7566    }
7567
7568    unsafe impl fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7569        for &mut SingleHandle
7570    {
7571        #[inline]
7572        unsafe fn encode(
7573            self,
7574            encoder: &mut fidl::encoding::Encoder<
7575                '_,
7576                fidl::encoding::DefaultFuchsiaResourceDialect,
7577            >,
7578            offset: usize,
7579            _depth: fidl::encoding::Depth,
7580        ) -> fidl::Result<()> {
7581            encoder.debug_check_bounds::<SingleHandle>(offset);
7582            // Delegate to tuple encoding.
7583            fidl::encoding::Encode::<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7584                (
7585                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7586                ),
7587                encoder, offset, _depth
7588            )
7589        }
7590    }
7591    unsafe impl<
7592        T0: fidl::encoding::Encode<
7593                fidl::encoding::HandleType<
7594                    fidl::NullableHandle,
7595                    { fidl::ObjectType::NONE.into_raw() },
7596                    2147483648,
7597                >,
7598                fidl::encoding::DefaultFuchsiaResourceDialect,
7599            >,
7600    > fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
7601    {
7602        #[inline]
7603        unsafe fn encode(
7604            self,
7605            encoder: &mut fidl::encoding::Encoder<
7606                '_,
7607                fidl::encoding::DefaultFuchsiaResourceDialect,
7608            >,
7609            offset: usize,
7610            depth: fidl::encoding::Depth,
7611        ) -> fidl::Result<()> {
7612            encoder.debug_check_bounds::<SingleHandle>(offset);
7613            // Zero out padding regions. There's no need to apply masks
7614            // because the unmasked parts will be overwritten by fields.
7615            // Write the fields.
7616            self.0.encode(encoder, offset + 0, depth)?;
7617            Ok(())
7618        }
7619    }
7620
7621    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {
7622        #[inline(always)]
7623        fn new_empty() -> Self {
7624            Self {
7625                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7626            }
7627        }
7628
7629        #[inline]
7630        unsafe fn decode(
7631            &mut self,
7632            decoder: &mut fidl::encoding::Decoder<
7633                '_,
7634                fidl::encoding::DefaultFuchsiaResourceDialect,
7635            >,
7636            offset: usize,
7637            _depth: fidl::encoding::Depth,
7638        ) -> fidl::Result<()> {
7639            decoder.debug_check_bounds::<Self>(offset);
7640            // Verify that padding bytes are zero.
7641            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
7642            Ok(())
7643        }
7644    }
7645
7646    impl fidl::encoding::ResourceTypeMarker for SingleOptionalHandle {
7647        type Borrowed<'a> = &'a mut Self;
7648        fn take_or_borrow<'a>(
7649            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7650        ) -> Self::Borrowed<'a> {
7651            value
7652        }
7653    }
7654
7655    unsafe impl fidl::encoding::TypeMarker for SingleOptionalHandle {
7656        type Owned = Self;
7657
7658        #[inline(always)]
7659        fn inline_align(_context: fidl::encoding::Context) -> usize {
7660            4
7661        }
7662
7663        #[inline(always)]
7664        fn inline_size(_context: fidl::encoding::Context) -> usize {
7665            4
7666        }
7667    }
7668
7669    unsafe impl
7670        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7671        for &mut SingleOptionalHandle
7672    {
7673        #[inline]
7674        unsafe fn encode(
7675            self,
7676            encoder: &mut fidl::encoding::Encoder<
7677                '_,
7678                fidl::encoding::DefaultFuchsiaResourceDialect,
7679            >,
7680            offset: usize,
7681            _depth: fidl::encoding::Depth,
7682        ) -> fidl::Result<()> {
7683            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7684            // Delegate to tuple encoding.
7685            fidl::encoding::Encode::<
7686                SingleOptionalHandle,
7687                fidl::encoding::DefaultFuchsiaResourceDialect,
7688            >::encode(
7689                (<fidl::encoding::Optional<
7690                    fidl::encoding::HandleType<
7691                        fidl::NullableHandle,
7692                        { fidl::ObjectType::NONE.into_raw() },
7693                        2147483648,
7694                    >,
7695                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7696                    &mut self.h
7697                ),),
7698                encoder,
7699                offset,
7700                _depth,
7701            )
7702        }
7703    }
7704    unsafe impl<
7705        T0: fidl::encoding::Encode<
7706                fidl::encoding::Optional<
7707                    fidl::encoding::HandleType<
7708                        fidl::NullableHandle,
7709                        { fidl::ObjectType::NONE.into_raw() },
7710                        2147483648,
7711                    >,
7712                >,
7713                fidl::encoding::DefaultFuchsiaResourceDialect,
7714            >,
7715    >
7716        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7717        for (T0,)
7718    {
7719        #[inline]
7720        unsafe fn encode(
7721            self,
7722            encoder: &mut fidl::encoding::Encoder<
7723                '_,
7724                fidl::encoding::DefaultFuchsiaResourceDialect,
7725            >,
7726            offset: usize,
7727            depth: fidl::encoding::Depth,
7728        ) -> fidl::Result<()> {
7729            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7730            // Zero out padding regions. There's no need to apply masks
7731            // because the unmasked parts will be overwritten by fields.
7732            // Write the fields.
7733            self.0.encode(encoder, offset + 0, depth)?;
7734            Ok(())
7735        }
7736    }
7737
7738    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7739        for SingleOptionalHandle
7740    {
7741        #[inline(always)]
7742        fn new_empty() -> Self {
7743            Self {
7744                h: fidl::new_empty!(
7745                    fidl::encoding::Optional<
7746                        fidl::encoding::HandleType<
7747                            fidl::NullableHandle,
7748                            { fidl::ObjectType::NONE.into_raw() },
7749                            2147483648,
7750                        >,
7751                    >,
7752                    fidl::encoding::DefaultFuchsiaResourceDialect
7753                ),
7754            }
7755        }
7756
7757        #[inline]
7758        unsafe fn decode(
7759            &mut self,
7760            decoder: &mut fidl::encoding::Decoder<
7761                '_,
7762                fidl::encoding::DefaultFuchsiaResourceDialect,
7763            >,
7764            offset: usize,
7765            _depth: fidl::encoding::Depth,
7766        ) -> fidl::Result<()> {
7767            decoder.debug_check_bounds::<Self>(offset);
7768            // Verify that padding bytes are zero.
7769            fidl::decode!(
7770                fidl::encoding::Optional<
7771                    fidl::encoding::HandleType<
7772                        fidl::NullableHandle,
7773                        { fidl::ObjectType::NONE.into_raw() },
7774                        2147483648,
7775                    >,
7776                >,
7777                fidl::encoding::DefaultFuchsiaResourceDialect,
7778                &mut self.h,
7779                decoder,
7780                offset + 0,
7781                _depth
7782            )?;
7783            Ok(())
7784        }
7785    }
7786
7787    impl fidl::encoding::ResourceTypeMarker for StructOfEndpoints {
7788        type Borrowed<'a> = &'a mut Self;
7789        fn take_or_borrow<'a>(
7790            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7791        ) -> Self::Borrowed<'a> {
7792            value
7793        }
7794    }
7795
7796    unsafe impl fidl::encoding::TypeMarker for StructOfEndpoints {
7797        type Owned = Self;
7798
7799        #[inline(always)]
7800        fn inline_align(_context: fidl::encoding::Context) -> usize {
7801            4
7802        }
7803
7804        #[inline(always)]
7805        fn inline_size(_context: fidl::encoding::Context) -> usize {
7806            16
7807        }
7808    }
7809
7810    unsafe impl
7811        fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7812        for &mut StructOfEndpoints
7813    {
7814        #[inline]
7815        unsafe fn encode(
7816            self,
7817            encoder: &mut fidl::encoding::Encoder<
7818                '_,
7819                fidl::encoding::DefaultFuchsiaResourceDialect,
7820            >,
7821            offset: usize,
7822            _depth: fidl::encoding::Depth,
7823        ) -> fidl::Result<()> {
7824            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7825            // Delegate to tuple encoding.
7826            fidl::encoding::Encode::<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7827                (
7828                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.client_end),
7829                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_client_end),
7830                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
7831                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_server_end),
7832                ),
7833                encoder, offset, _depth
7834            )
7835        }
7836    }
7837    unsafe impl<
7838        T0: fidl::encoding::Encode<
7839                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7840                fidl::encoding::DefaultFuchsiaResourceDialect,
7841            >,
7842        T1: fidl::encoding::Encode<
7843                fidl::encoding::Optional<
7844                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7845                >,
7846                fidl::encoding::DefaultFuchsiaResourceDialect,
7847            >,
7848        T2: fidl::encoding::Encode<
7849                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7850                fidl::encoding::DefaultFuchsiaResourceDialect,
7851            >,
7852        T3: fidl::encoding::Encode<
7853                fidl::encoding::Optional<
7854                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7855                >,
7856                fidl::encoding::DefaultFuchsiaResourceDialect,
7857            >,
7858    > fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7859        for (T0, T1, T2, T3)
7860    {
7861        #[inline]
7862        unsafe fn encode(
7863            self,
7864            encoder: &mut fidl::encoding::Encoder<
7865                '_,
7866                fidl::encoding::DefaultFuchsiaResourceDialect,
7867            >,
7868            offset: usize,
7869            depth: fidl::encoding::Depth,
7870        ) -> fidl::Result<()> {
7871            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7872            // Zero out padding regions. There's no need to apply masks
7873            // because the unmasked parts will be overwritten by fields.
7874            // Write the fields.
7875            self.0.encode(encoder, offset + 0, depth)?;
7876            self.1.encode(encoder, offset + 4, depth)?;
7877            self.2.encode(encoder, offset + 8, depth)?;
7878            self.3.encode(encoder, offset + 12, depth)?;
7879            Ok(())
7880        }
7881    }
7882
7883    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7884        for StructOfEndpoints
7885    {
7886        #[inline(always)]
7887        fn new_empty() -> Self {
7888            Self {
7889                client_end: fidl::new_empty!(
7890                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7891                    fidl::encoding::DefaultFuchsiaResourceDialect
7892                ),
7893                optional_client_end: fidl::new_empty!(
7894                    fidl::encoding::Optional<
7895                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7896                    >,
7897                    fidl::encoding::DefaultFuchsiaResourceDialect
7898                ),
7899                server_end: fidl::new_empty!(
7900                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7901                    fidl::encoding::DefaultFuchsiaResourceDialect
7902                ),
7903                optional_server_end: fidl::new_empty!(
7904                    fidl::encoding::Optional<
7905                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7906                    >,
7907                    fidl::encoding::DefaultFuchsiaResourceDialect
7908                ),
7909            }
7910        }
7911
7912        #[inline]
7913        unsafe fn decode(
7914            &mut self,
7915            decoder: &mut fidl::encoding::Decoder<
7916                '_,
7917                fidl::encoding::DefaultFuchsiaResourceDialect,
7918            >,
7919            offset: usize,
7920            _depth: fidl::encoding::Depth,
7921        ) -> fidl::Result<()> {
7922            decoder.debug_check_bounds::<Self>(offset);
7923            // Verify that padding bytes are zero.
7924            fidl::decode!(
7925                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7926                fidl::encoding::DefaultFuchsiaResourceDialect,
7927                &mut self.client_end,
7928                decoder,
7929                offset + 0,
7930                _depth
7931            )?;
7932            fidl::decode!(
7933                fidl::encoding::Optional<
7934                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7935                >,
7936                fidl::encoding::DefaultFuchsiaResourceDialect,
7937                &mut self.optional_client_end,
7938                decoder,
7939                offset + 4,
7940                _depth
7941            )?;
7942            fidl::decode!(
7943                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7944                fidl::encoding::DefaultFuchsiaResourceDialect,
7945                &mut self.server_end,
7946                decoder,
7947                offset + 8,
7948                _depth
7949            )?;
7950            fidl::decode!(
7951                fidl::encoding::Optional<
7952                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7953                >,
7954                fidl::encoding::DefaultFuchsiaResourceDialect,
7955                &mut self.optional_server_end,
7956                decoder,
7957                offset + 12,
7958                _depth
7959            )?;
7960            Ok(())
7961        }
7962    }
7963
7964    impl fidl::encoding::ResourceTypeMarker for StructOfOptionalUnionOfHandle {
7965        type Borrowed<'a> = &'a mut Self;
7966        fn take_or_borrow<'a>(
7967            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7968        ) -> Self::Borrowed<'a> {
7969            value
7970        }
7971    }
7972
7973    unsafe impl fidl::encoding::TypeMarker for StructOfOptionalUnionOfHandle {
7974        type Owned = Self;
7975
7976        #[inline(always)]
7977        fn inline_align(_context: fidl::encoding::Context) -> usize {
7978            8
7979        }
7980
7981        #[inline(always)]
7982        fn inline_size(_context: fidl::encoding::Context) -> usize {
7983            16
7984        }
7985    }
7986
7987    unsafe impl
7988        fidl::encoding::Encode<
7989            StructOfOptionalUnionOfHandle,
7990            fidl::encoding::DefaultFuchsiaResourceDialect,
7991        > for &mut StructOfOptionalUnionOfHandle
7992    {
7993        #[inline]
7994        unsafe fn encode(
7995            self,
7996            encoder: &mut fidl::encoding::Encoder<
7997                '_,
7998                fidl::encoding::DefaultFuchsiaResourceDialect,
7999            >,
8000            offset: usize,
8001            _depth: fidl::encoding::Depth,
8002        ) -> fidl::Result<()> {
8003            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8004            // Delegate to tuple encoding.
8005            fidl::encoding::Encode::<StructOfOptionalUnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8006                (
8007                    <fidl::encoding::OptionalUnion<UnionOfHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
8008                ),
8009                encoder, offset, _depth
8010            )
8011        }
8012    }
8013    unsafe impl<
8014        T0: fidl::encoding::Encode<
8015                fidl::encoding::OptionalUnion<UnionOfHandle>,
8016                fidl::encoding::DefaultFuchsiaResourceDialect,
8017            >,
8018    >
8019        fidl::encoding::Encode<
8020            StructOfOptionalUnionOfHandle,
8021            fidl::encoding::DefaultFuchsiaResourceDialect,
8022        > for (T0,)
8023    {
8024        #[inline]
8025        unsafe fn encode(
8026            self,
8027            encoder: &mut fidl::encoding::Encoder<
8028                '_,
8029                fidl::encoding::DefaultFuchsiaResourceDialect,
8030            >,
8031            offset: usize,
8032            depth: fidl::encoding::Depth,
8033        ) -> fidl::Result<()> {
8034            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8035            // Zero out padding regions. There's no need to apply masks
8036            // because the unmasked parts will be overwritten by fields.
8037            // Write the fields.
8038            self.0.encode(encoder, offset + 0, depth)?;
8039            Ok(())
8040        }
8041    }
8042
8043    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8044        for StructOfOptionalUnionOfHandle
8045    {
8046        #[inline(always)]
8047        fn new_empty() -> Self {
8048            Self {
8049                u: fidl::new_empty!(
8050                    fidl::encoding::OptionalUnion<UnionOfHandle>,
8051                    fidl::encoding::DefaultFuchsiaResourceDialect
8052                ),
8053            }
8054        }
8055
8056        #[inline]
8057        unsafe fn decode(
8058            &mut self,
8059            decoder: &mut fidl::encoding::Decoder<
8060                '_,
8061                fidl::encoding::DefaultFuchsiaResourceDialect,
8062            >,
8063            offset: usize,
8064            _depth: fidl::encoding::Depth,
8065        ) -> fidl::Result<()> {
8066            decoder.debug_check_bounds::<Self>(offset);
8067            // Verify that padding bytes are zero.
8068            fidl::decode!(
8069                fidl::encoding::OptionalUnion<UnionOfHandle>,
8070                fidl::encoding::DefaultFuchsiaResourceDialect,
8071                &mut self.u,
8072                decoder,
8073                offset + 0,
8074                _depth
8075            )?;
8076            Ok(())
8077        }
8078    }
8079
8080    impl fidl::encoding::ResourceTypeMarker for StructOfSimpleResourceTable {
8081        type Borrowed<'a> = &'a mut Self;
8082        fn take_or_borrow<'a>(
8083            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8084        ) -> Self::Borrowed<'a> {
8085            value
8086        }
8087    }
8088
8089    unsafe impl fidl::encoding::TypeMarker for StructOfSimpleResourceTable {
8090        type Owned = Self;
8091
8092        #[inline(always)]
8093        fn inline_align(_context: fidl::encoding::Context) -> usize {
8094            8
8095        }
8096
8097        #[inline(always)]
8098        fn inline_size(_context: fidl::encoding::Context) -> usize {
8099            16
8100        }
8101    }
8102
8103    unsafe impl
8104        fidl::encoding::Encode<
8105            StructOfSimpleResourceTable,
8106            fidl::encoding::DefaultFuchsiaResourceDialect,
8107        > for &mut StructOfSimpleResourceTable
8108    {
8109        #[inline]
8110        unsafe fn encode(
8111            self,
8112            encoder: &mut fidl::encoding::Encoder<
8113                '_,
8114                fidl::encoding::DefaultFuchsiaResourceDialect,
8115            >,
8116            offset: usize,
8117            _depth: fidl::encoding::Depth,
8118        ) -> fidl::Result<()> {
8119            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8120            // Delegate to tuple encoding.
8121            fidl::encoding::Encode::<
8122                StructOfSimpleResourceTable,
8123                fidl::encoding::DefaultFuchsiaResourceDialect,
8124            >::encode(
8125                (<SimpleResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8126                    &mut self.table,
8127                ),),
8128                encoder,
8129                offset,
8130                _depth,
8131            )
8132        }
8133    }
8134    unsafe impl<
8135        T0: fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
8136    >
8137        fidl::encoding::Encode<
8138            StructOfSimpleResourceTable,
8139            fidl::encoding::DefaultFuchsiaResourceDialect,
8140        > for (T0,)
8141    {
8142        #[inline]
8143        unsafe fn encode(
8144            self,
8145            encoder: &mut fidl::encoding::Encoder<
8146                '_,
8147                fidl::encoding::DefaultFuchsiaResourceDialect,
8148            >,
8149            offset: usize,
8150            depth: fidl::encoding::Depth,
8151        ) -> fidl::Result<()> {
8152            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8153            // Zero out padding regions. There's no need to apply masks
8154            // because the unmasked parts will be overwritten by fields.
8155            // Write the fields.
8156            self.0.encode(encoder, offset + 0, depth)?;
8157            Ok(())
8158        }
8159    }
8160
8161    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8162        for StructOfSimpleResourceTable
8163    {
8164        #[inline(always)]
8165        fn new_empty() -> Self {
8166            Self {
8167                table: fidl::new_empty!(
8168                    SimpleResourceTable,
8169                    fidl::encoding::DefaultFuchsiaResourceDialect
8170                ),
8171            }
8172        }
8173
8174        #[inline]
8175        unsafe fn decode(
8176            &mut self,
8177            decoder: &mut fidl::encoding::Decoder<
8178                '_,
8179                fidl::encoding::DefaultFuchsiaResourceDialect,
8180            >,
8181            offset: usize,
8182            _depth: fidl::encoding::Depth,
8183        ) -> fidl::Result<()> {
8184            decoder.debug_check_bounds::<Self>(offset);
8185            // Verify that padding bytes are zero.
8186            fidl::decode!(
8187                SimpleResourceTable,
8188                fidl::encoding::DefaultFuchsiaResourceDialect,
8189                &mut self.table,
8190                decoder,
8191                offset + 0,
8192                _depth
8193            )?;
8194            Ok(())
8195        }
8196    }
8197
8198    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandleStruct {
8199        type Borrowed<'a> = &'a mut Self;
8200        fn take_or_borrow<'a>(
8201            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8202        ) -> Self::Borrowed<'a> {
8203            value
8204        }
8205    }
8206
8207    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandleStruct {
8208        type Owned = Self;
8209
8210        #[inline(always)]
8211        fn inline_align(_context: fidl::encoding::Context) -> usize {
8212            8
8213        }
8214
8215        #[inline(always)]
8216        fn inline_size(_context: fidl::encoding::Context) -> usize {
8217            16
8218        }
8219    }
8220
8221    unsafe impl
8222        fidl::encoding::Encode<
8223            TableFieldInlinedHandleStruct,
8224            fidl::encoding::DefaultFuchsiaResourceDialect,
8225        > for &mut TableFieldInlinedHandleStruct
8226    {
8227        #[inline]
8228        unsafe fn encode(
8229            self,
8230            encoder: &mut fidl::encoding::Encoder<
8231                '_,
8232                fidl::encoding::DefaultFuchsiaResourceDialect,
8233            >,
8234            offset: usize,
8235            _depth: fidl::encoding::Depth,
8236        ) -> fidl::Result<()> {
8237            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8238            // Delegate to tuple encoding.
8239            fidl::encoding::Encode::<
8240                TableFieldInlinedHandleStruct,
8241                fidl::encoding::DefaultFuchsiaResourceDialect,
8242            >::encode(
8243                (<TableFieldInlinedHandle as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8244                    &mut self.t,
8245                ),),
8246                encoder,
8247                offset,
8248                _depth,
8249            )
8250        }
8251    }
8252    unsafe impl<
8253        T0: fidl::encoding::Encode<
8254                TableFieldInlinedHandle,
8255                fidl::encoding::DefaultFuchsiaResourceDialect,
8256            >,
8257    >
8258        fidl::encoding::Encode<
8259            TableFieldInlinedHandleStruct,
8260            fidl::encoding::DefaultFuchsiaResourceDialect,
8261        > for (T0,)
8262    {
8263        #[inline]
8264        unsafe fn encode(
8265            self,
8266            encoder: &mut fidl::encoding::Encoder<
8267                '_,
8268                fidl::encoding::DefaultFuchsiaResourceDialect,
8269            >,
8270            offset: usize,
8271            depth: fidl::encoding::Depth,
8272        ) -> fidl::Result<()> {
8273            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8274            // Zero out padding regions. There's no need to apply masks
8275            // because the unmasked parts will be overwritten by fields.
8276            // Write the fields.
8277            self.0.encode(encoder, offset + 0, depth)?;
8278            Ok(())
8279        }
8280    }
8281
8282    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8283        for TableFieldInlinedHandleStruct
8284    {
8285        #[inline(always)]
8286        fn new_empty() -> Self {
8287            Self {
8288                t: fidl::new_empty!(
8289                    TableFieldInlinedHandle,
8290                    fidl::encoding::DefaultFuchsiaResourceDialect
8291                ),
8292            }
8293        }
8294
8295        #[inline]
8296        unsafe fn decode(
8297            &mut self,
8298            decoder: &mut fidl::encoding::Decoder<
8299                '_,
8300                fidl::encoding::DefaultFuchsiaResourceDialect,
8301            >,
8302            offset: usize,
8303            _depth: fidl::encoding::Depth,
8304        ) -> fidl::Result<()> {
8305            decoder.debug_check_bounds::<Self>(offset);
8306            // Verify that padding bytes are zero.
8307            fidl::decode!(
8308                TableFieldInlinedHandle,
8309                fidl::encoding::DefaultFuchsiaResourceDialect,
8310                &mut self.t,
8311                decoder,
8312                offset + 0,
8313                _depth
8314            )?;
8315            Ok(())
8316        }
8317    }
8318
8319    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResourceStruct {
8320        type Borrowed<'a> = &'a mut Self;
8321        fn take_or_borrow<'a>(
8322            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8323        ) -> Self::Borrowed<'a> {
8324            value
8325        }
8326    }
8327
8328    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResourceStruct {
8329        type Owned = Self;
8330
8331        #[inline(always)]
8332        fn inline_align(_context: fidl::encoding::Context) -> usize {
8333            8
8334        }
8335
8336        #[inline(always)]
8337        fn inline_size(_context: fidl::encoding::Context) -> usize {
8338            16
8339        }
8340    }
8341
8342    unsafe impl
8343        fidl::encoding::Encode<
8344            TableFieldUnknownResourceStruct,
8345            fidl::encoding::DefaultFuchsiaResourceDialect,
8346        > for &mut TableFieldUnknownResourceStruct
8347    {
8348        #[inline]
8349        unsafe fn encode(
8350            self,
8351            encoder: &mut fidl::encoding::Encoder<
8352                '_,
8353                fidl::encoding::DefaultFuchsiaResourceDialect,
8354            >,
8355            offset: usize,
8356            _depth: fidl::encoding::Depth,
8357        ) -> fidl::Result<()> {
8358            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8359            // Delegate to tuple encoding.
8360            fidl::encoding::Encode::<TableFieldUnknownResourceStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8361                (
8362                    <TableFieldUnknownResource as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8363                ),
8364                encoder, offset, _depth
8365            )
8366        }
8367    }
8368    unsafe impl<
8369        T0: fidl::encoding::Encode<
8370                TableFieldUnknownResource,
8371                fidl::encoding::DefaultFuchsiaResourceDialect,
8372            >,
8373    >
8374        fidl::encoding::Encode<
8375            TableFieldUnknownResourceStruct,
8376            fidl::encoding::DefaultFuchsiaResourceDialect,
8377        > for (T0,)
8378    {
8379        #[inline]
8380        unsafe fn encode(
8381            self,
8382            encoder: &mut fidl::encoding::Encoder<
8383                '_,
8384                fidl::encoding::DefaultFuchsiaResourceDialect,
8385            >,
8386            offset: usize,
8387            depth: fidl::encoding::Depth,
8388        ) -> fidl::Result<()> {
8389            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8390            // Zero out padding regions. There's no need to apply masks
8391            // because the unmasked parts will be overwritten by fields.
8392            // Write the fields.
8393            self.0.encode(encoder, offset + 0, depth)?;
8394            Ok(())
8395        }
8396    }
8397
8398    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8399        for TableFieldUnknownResourceStruct
8400    {
8401        #[inline(always)]
8402        fn new_empty() -> Self {
8403            Self {
8404                t: fidl::new_empty!(
8405                    TableFieldUnknownResource,
8406                    fidl::encoding::DefaultFuchsiaResourceDialect
8407                ),
8408            }
8409        }
8410
8411        #[inline]
8412        unsafe fn decode(
8413            &mut self,
8414            decoder: &mut fidl::encoding::Decoder<
8415                '_,
8416                fidl::encoding::DefaultFuchsiaResourceDialect,
8417            >,
8418            offset: usize,
8419            _depth: fidl::encoding::Depth,
8420        ) -> fidl::Result<()> {
8421            decoder.debug_check_bounds::<Self>(offset);
8422            // Verify that padding bytes are zero.
8423            fidl::decode!(
8424                TableFieldUnknownResource,
8425                fidl::encoding::DefaultFuchsiaResourceDialect,
8426                &mut self.t,
8427                decoder,
8428                offset + 0,
8429                _depth
8430            )?;
8431            Ok(())
8432        }
8433    }
8434
8435    impl fidl::encoding::ResourceTypeMarker for TableOfEndpoints {
8436        type Borrowed<'a> = &'a mut Self;
8437        fn take_or_borrow<'a>(
8438            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8439        ) -> Self::Borrowed<'a> {
8440            value
8441        }
8442    }
8443
8444    unsafe impl fidl::encoding::TypeMarker for TableOfEndpoints {
8445        type Owned = Self;
8446
8447        #[inline(always)]
8448        fn inline_align(_context: fidl::encoding::Context) -> usize {
8449            8
8450        }
8451
8452        #[inline(always)]
8453        fn inline_size(_context: fidl::encoding::Context) -> usize {
8454            16
8455        }
8456    }
8457
8458    unsafe impl
8459        fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8460        for &mut TableOfEndpoints
8461    {
8462        #[inline]
8463        unsafe fn encode(
8464            self,
8465            encoder: &mut fidl::encoding::Encoder<
8466                '_,
8467                fidl::encoding::DefaultFuchsiaResourceDialect,
8468            >,
8469            offset: usize,
8470            _depth: fidl::encoding::Depth,
8471        ) -> fidl::Result<()> {
8472            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8473            // Delegate to tuple encoding.
8474            fidl::encoding::Encode::<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8475                (
8476                    <TableOfEndpointsTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8477                ),
8478                encoder, offset, _depth
8479            )
8480        }
8481    }
8482    unsafe impl<
8483        T0: fidl::encoding::Encode<
8484                TableOfEndpointsTable,
8485                fidl::encoding::DefaultFuchsiaResourceDialect,
8486            >,
8487    > fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8488        for (T0,)
8489    {
8490        #[inline]
8491        unsafe fn encode(
8492            self,
8493            encoder: &mut fidl::encoding::Encoder<
8494                '_,
8495                fidl::encoding::DefaultFuchsiaResourceDialect,
8496            >,
8497            offset: usize,
8498            depth: fidl::encoding::Depth,
8499        ) -> fidl::Result<()> {
8500            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8501            // Zero out padding regions. There's no need to apply masks
8502            // because the unmasked parts will be overwritten by fields.
8503            // Write the fields.
8504            self.0.encode(encoder, offset + 0, depth)?;
8505            Ok(())
8506        }
8507    }
8508
8509    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8510        for TableOfEndpoints
8511    {
8512        #[inline(always)]
8513        fn new_empty() -> Self {
8514            Self {
8515                t: fidl::new_empty!(
8516                    TableOfEndpointsTable,
8517                    fidl::encoding::DefaultFuchsiaResourceDialect
8518                ),
8519            }
8520        }
8521
8522        #[inline]
8523        unsafe fn decode(
8524            &mut self,
8525            decoder: &mut fidl::encoding::Decoder<
8526                '_,
8527                fidl::encoding::DefaultFuchsiaResourceDialect,
8528            >,
8529            offset: usize,
8530            _depth: fidl::encoding::Depth,
8531        ) -> fidl::Result<()> {
8532            decoder.debug_check_bounds::<Self>(offset);
8533            // Verify that padding bytes are zero.
8534            fidl::decode!(
8535                TableOfEndpointsTable,
8536                fidl::encoding::DefaultFuchsiaResourceDialect,
8537                &mut self.t,
8538                decoder,
8539                offset + 0,
8540                _depth
8541            )?;
8542            Ok(())
8543        }
8544    }
8545
8546    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwichStruct {
8547        type Borrowed<'a> = &'a mut Self;
8548        fn take_or_borrow<'a>(
8549            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8550        ) -> Self::Borrowed<'a> {
8551            value
8552        }
8553    }
8554
8555    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwichStruct {
8556        type Owned = Self;
8557
8558        #[inline(always)]
8559        fn inline_align(_context: fidl::encoding::Context) -> usize {
8560            8
8561        }
8562
8563        #[inline(always)]
8564        fn inline_size(_context: fidl::encoding::Context) -> usize {
8565            16
8566        }
8567    }
8568
8569    unsafe impl
8570        fidl::encoding::Encode<
8571            TableUnionWithVectorReservedSandwichStruct,
8572            fidl::encoding::DefaultFuchsiaResourceDialect,
8573        > for &mut TableUnionWithVectorReservedSandwichStruct
8574    {
8575        #[inline]
8576        unsafe fn encode(
8577            self,
8578            encoder: &mut fidl::encoding::Encoder<
8579                '_,
8580                fidl::encoding::DefaultFuchsiaResourceDialect,
8581            >,
8582            offset: usize,
8583            _depth: fidl::encoding::Depth,
8584        ) -> fidl::Result<()> {
8585            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8586            // Delegate to tuple encoding.
8587            fidl::encoding::Encode::<TableUnionWithVectorReservedSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8588                (
8589                    <TableUnionWithVectorReservedSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8590                ),
8591                encoder, offset, _depth
8592            )
8593        }
8594    }
8595    unsafe impl<
8596        T0: fidl::encoding::Encode<
8597                TableUnionWithVectorReservedSandwich,
8598                fidl::encoding::DefaultFuchsiaResourceDialect,
8599            >,
8600    >
8601        fidl::encoding::Encode<
8602            TableUnionWithVectorReservedSandwichStruct,
8603            fidl::encoding::DefaultFuchsiaResourceDialect,
8604        > for (T0,)
8605    {
8606        #[inline]
8607        unsafe fn encode(
8608            self,
8609            encoder: &mut fidl::encoding::Encoder<
8610                '_,
8611                fidl::encoding::DefaultFuchsiaResourceDialect,
8612            >,
8613            offset: usize,
8614            depth: fidl::encoding::Depth,
8615        ) -> fidl::Result<()> {
8616            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8617            // Zero out padding regions. There's no need to apply masks
8618            // because the unmasked parts will be overwritten by fields.
8619            // Write the fields.
8620            self.0.encode(encoder, offset + 0, depth)?;
8621            Ok(())
8622        }
8623    }
8624
8625    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8626        for TableUnionWithVectorReservedSandwichStruct
8627    {
8628        #[inline(always)]
8629        fn new_empty() -> Self {
8630            Self {
8631                table: fidl::new_empty!(
8632                    TableUnionWithVectorReservedSandwich,
8633                    fidl::encoding::DefaultFuchsiaResourceDialect
8634                ),
8635            }
8636        }
8637
8638        #[inline]
8639        unsafe fn decode(
8640            &mut self,
8641            decoder: &mut fidl::encoding::Decoder<
8642                '_,
8643                fidl::encoding::DefaultFuchsiaResourceDialect,
8644            >,
8645            offset: usize,
8646            _depth: fidl::encoding::Depth,
8647        ) -> fidl::Result<()> {
8648            decoder.debug_check_bounds::<Self>(offset);
8649            // Verify that padding bytes are zero.
8650            fidl::decode!(
8651                TableUnionWithVectorReservedSandwich,
8652                fidl::encoding::DefaultFuchsiaResourceDialect,
8653                &mut self.table,
8654                decoder,
8655                offset + 0,
8656                _depth
8657            )?;
8658            Ok(())
8659        }
8660    }
8661
8662    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwichStruct {
8663        type Borrowed<'a> = &'a mut Self;
8664        fn take_or_borrow<'a>(
8665            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8666        ) -> Self::Borrowed<'a> {
8667            value
8668        }
8669    }
8670
8671    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwichStruct {
8672        type Owned = Self;
8673
8674        #[inline(always)]
8675        fn inline_align(_context: fidl::encoding::Context) -> usize {
8676            8
8677        }
8678
8679        #[inline(always)]
8680        fn inline_size(_context: fidl::encoding::Context) -> usize {
8681            16
8682        }
8683    }
8684
8685    unsafe impl
8686        fidl::encoding::Encode<
8687            TableUnionWithVectorStructSandwichStruct,
8688            fidl::encoding::DefaultFuchsiaResourceDialect,
8689        > for &mut TableUnionWithVectorStructSandwichStruct
8690    {
8691        #[inline]
8692        unsafe fn encode(
8693            self,
8694            encoder: &mut fidl::encoding::Encoder<
8695                '_,
8696                fidl::encoding::DefaultFuchsiaResourceDialect,
8697            >,
8698            offset: usize,
8699            _depth: fidl::encoding::Depth,
8700        ) -> fidl::Result<()> {
8701            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8702            // Delegate to tuple encoding.
8703            fidl::encoding::Encode::<TableUnionWithVectorStructSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8704                (
8705                    <TableUnionWithVectorStructSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8706                ),
8707                encoder, offset, _depth
8708            )
8709        }
8710    }
8711    unsafe impl<
8712        T0: fidl::encoding::Encode<
8713                TableUnionWithVectorStructSandwich,
8714                fidl::encoding::DefaultFuchsiaResourceDialect,
8715            >,
8716    >
8717        fidl::encoding::Encode<
8718            TableUnionWithVectorStructSandwichStruct,
8719            fidl::encoding::DefaultFuchsiaResourceDialect,
8720        > for (T0,)
8721    {
8722        #[inline]
8723        unsafe fn encode(
8724            self,
8725            encoder: &mut fidl::encoding::Encoder<
8726                '_,
8727                fidl::encoding::DefaultFuchsiaResourceDialect,
8728            >,
8729            offset: usize,
8730            depth: fidl::encoding::Depth,
8731        ) -> fidl::Result<()> {
8732            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8733            // Zero out padding regions. There's no need to apply masks
8734            // because the unmasked parts will be overwritten by fields.
8735            // Write the fields.
8736            self.0.encode(encoder, offset + 0, depth)?;
8737            Ok(())
8738        }
8739    }
8740
8741    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8742        for TableUnionWithVectorStructSandwichStruct
8743    {
8744        #[inline(always)]
8745        fn new_empty() -> Self {
8746            Self {
8747                table: fidl::new_empty!(
8748                    TableUnionWithVectorStructSandwich,
8749                    fidl::encoding::DefaultFuchsiaResourceDialect
8750                ),
8751            }
8752        }
8753
8754        #[inline]
8755        unsafe fn decode(
8756            &mut self,
8757            decoder: &mut fidl::encoding::Decoder<
8758                '_,
8759                fidl::encoding::DefaultFuchsiaResourceDialect,
8760            >,
8761            offset: usize,
8762            _depth: fidl::encoding::Depth,
8763        ) -> fidl::Result<()> {
8764            decoder.debug_check_bounds::<Self>(offset);
8765            // Verify that padding bytes are zero.
8766            fidl::decode!(
8767                TableUnionWithVectorStructSandwich,
8768                fidl::encoding::DefaultFuchsiaResourceDialect,
8769                &mut self.table,
8770                decoder,
8771                offset + 0,
8772                _depth
8773            )?;
8774            Ok(())
8775        }
8776    }
8777
8778    impl fidl::encoding::ResourceTypeMarker for TestFlexibleResourceXUnionInStruct {
8779        type Borrowed<'a> = &'a mut Self;
8780        fn take_or_borrow<'a>(
8781            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8782        ) -> Self::Borrowed<'a> {
8783            value
8784        }
8785    }
8786
8787    unsafe impl fidl::encoding::TypeMarker for TestFlexibleResourceXUnionInStruct {
8788        type Owned = Self;
8789
8790        #[inline(always)]
8791        fn inline_align(_context: fidl::encoding::Context) -> usize {
8792            8
8793        }
8794
8795        #[inline(always)]
8796        fn inline_size(_context: fidl::encoding::Context) -> usize {
8797            16
8798        }
8799    }
8800
8801    unsafe impl
8802        fidl::encoding::Encode<
8803            TestFlexibleResourceXUnionInStruct,
8804            fidl::encoding::DefaultFuchsiaResourceDialect,
8805        > for &mut TestFlexibleResourceXUnionInStruct
8806    {
8807        #[inline]
8808        unsafe fn encode(
8809            self,
8810            encoder: &mut fidl::encoding::Encoder<
8811                '_,
8812                fidl::encoding::DefaultFuchsiaResourceDialect,
8813            >,
8814            offset: usize,
8815            _depth: fidl::encoding::Depth,
8816        ) -> fidl::Result<()> {
8817            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8818            // Delegate to tuple encoding.
8819            fidl::encoding::Encode::<
8820                TestFlexibleResourceXUnionInStruct,
8821                fidl::encoding::DefaultFuchsiaResourceDialect,
8822            >::encode(
8823                (<SampleResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8824                    &mut self.xu,
8825                ),),
8826                encoder,
8827                offset,
8828                _depth,
8829            )
8830        }
8831    }
8832    unsafe impl<
8833        T0: fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
8834    >
8835        fidl::encoding::Encode<
8836            TestFlexibleResourceXUnionInStruct,
8837            fidl::encoding::DefaultFuchsiaResourceDialect,
8838        > for (T0,)
8839    {
8840        #[inline]
8841        unsafe fn encode(
8842            self,
8843            encoder: &mut fidl::encoding::Encoder<
8844                '_,
8845                fidl::encoding::DefaultFuchsiaResourceDialect,
8846            >,
8847            offset: usize,
8848            depth: fidl::encoding::Depth,
8849        ) -> fidl::Result<()> {
8850            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8851            // Zero out padding regions. There's no need to apply masks
8852            // because the unmasked parts will be overwritten by fields.
8853            // Write the fields.
8854            self.0.encode(encoder, offset + 0, depth)?;
8855            Ok(())
8856        }
8857    }
8858
8859    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8860        for TestFlexibleResourceXUnionInStruct
8861    {
8862        #[inline(always)]
8863        fn new_empty() -> Self {
8864            Self {
8865                xu: fidl::new_empty!(
8866                    SampleResourceXUnion,
8867                    fidl::encoding::DefaultFuchsiaResourceDialect
8868                ),
8869            }
8870        }
8871
8872        #[inline]
8873        unsafe fn decode(
8874            &mut self,
8875            decoder: &mut fidl::encoding::Decoder<
8876                '_,
8877                fidl::encoding::DefaultFuchsiaResourceDialect,
8878            >,
8879            offset: usize,
8880            _depth: fidl::encoding::Depth,
8881        ) -> fidl::Result<()> {
8882            decoder.debug_check_bounds::<Self>(offset);
8883            // Verify that padding bytes are zero.
8884            fidl::decode!(
8885                SampleResourceXUnion,
8886                fidl::encoding::DefaultFuchsiaResourceDialect,
8887                &mut self.xu,
8888                decoder,
8889                offset + 0,
8890                _depth
8891            )?;
8892            Ok(())
8893        }
8894    }
8895
8896    impl fidl::encoding::ResourceTypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8897        type Borrowed<'a> = &'a mut Self;
8898        fn take_or_borrow<'a>(
8899            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8900        ) -> Self::Borrowed<'a> {
8901            value
8902        }
8903    }
8904
8905    unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8906        type Owned = Self;
8907
8908        #[inline(always)]
8909        fn inline_align(_context: fidl::encoding::Context) -> usize {
8910            8
8911        }
8912
8913        #[inline(always)]
8914        fn inline_size(_context: fidl::encoding::Context) -> usize {
8915            16
8916        }
8917    }
8918
8919    unsafe impl
8920        fidl::encoding::Encode<
8921            TestOptionalFlexibleResourceXUnionInStruct,
8922            fidl::encoding::DefaultFuchsiaResourceDialect,
8923        > for &mut TestOptionalFlexibleResourceXUnionInStruct
8924    {
8925        #[inline]
8926        unsafe fn encode(
8927            self,
8928            encoder: &mut fidl::encoding::Encoder<
8929                '_,
8930                fidl::encoding::DefaultFuchsiaResourceDialect,
8931            >,
8932            offset: usize,
8933            _depth: fidl::encoding::Depth,
8934        ) -> fidl::Result<()> {
8935            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8936            // Delegate to tuple encoding.
8937            fidl::encoding::Encode::<TestOptionalFlexibleResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8938                (
8939                    <fidl::encoding::OptionalUnion<SampleResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
8940                ),
8941                encoder, offset, _depth
8942            )
8943        }
8944    }
8945    unsafe impl<
8946        T0: fidl::encoding::Encode<
8947                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8948                fidl::encoding::DefaultFuchsiaResourceDialect,
8949            >,
8950    >
8951        fidl::encoding::Encode<
8952            TestOptionalFlexibleResourceXUnionInStruct,
8953            fidl::encoding::DefaultFuchsiaResourceDialect,
8954        > for (T0,)
8955    {
8956        #[inline]
8957        unsafe fn encode(
8958            self,
8959            encoder: &mut fidl::encoding::Encoder<
8960                '_,
8961                fidl::encoding::DefaultFuchsiaResourceDialect,
8962            >,
8963            offset: usize,
8964            depth: fidl::encoding::Depth,
8965        ) -> fidl::Result<()> {
8966            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8967            // Zero out padding regions. There's no need to apply masks
8968            // because the unmasked parts will be overwritten by fields.
8969            // Write the fields.
8970            self.0.encode(encoder, offset + 0, depth)?;
8971            Ok(())
8972        }
8973    }
8974
8975    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8976        for TestOptionalFlexibleResourceXUnionInStruct
8977    {
8978        #[inline(always)]
8979        fn new_empty() -> Self {
8980            Self {
8981                xu: fidl::new_empty!(
8982                    fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8983                    fidl::encoding::DefaultFuchsiaResourceDialect
8984                ),
8985            }
8986        }
8987
8988        #[inline]
8989        unsafe fn decode(
8990            &mut self,
8991            decoder: &mut fidl::encoding::Decoder<
8992                '_,
8993                fidl::encoding::DefaultFuchsiaResourceDialect,
8994            >,
8995            offset: usize,
8996            _depth: fidl::encoding::Depth,
8997        ) -> fidl::Result<()> {
8998            decoder.debug_check_bounds::<Self>(offset);
8999            // Verify that padding bytes are zero.
9000            fidl::decode!(
9001                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9002                fidl::encoding::DefaultFuchsiaResourceDialect,
9003                &mut self.xu,
9004                decoder,
9005                offset + 0,
9006                _depth
9007            )?;
9008            Ok(())
9009        }
9010    }
9011
9012    impl fidl::encoding::ResourceTypeMarker for TestOptionalStrictResourceXUnionInStruct {
9013        type Borrowed<'a> = &'a mut Self;
9014        fn take_or_borrow<'a>(
9015            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9016        ) -> Self::Borrowed<'a> {
9017            value
9018        }
9019    }
9020
9021    unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictResourceXUnionInStruct {
9022        type Owned = Self;
9023
9024        #[inline(always)]
9025        fn inline_align(_context: fidl::encoding::Context) -> usize {
9026            8
9027        }
9028
9029        #[inline(always)]
9030        fn inline_size(_context: fidl::encoding::Context) -> usize {
9031            16
9032        }
9033    }
9034
9035    unsafe impl
9036        fidl::encoding::Encode<
9037            TestOptionalStrictResourceXUnionInStruct,
9038            fidl::encoding::DefaultFuchsiaResourceDialect,
9039        > for &mut TestOptionalStrictResourceXUnionInStruct
9040    {
9041        #[inline]
9042        unsafe fn encode(
9043            self,
9044            encoder: &mut fidl::encoding::Encoder<
9045                '_,
9046                fidl::encoding::DefaultFuchsiaResourceDialect,
9047            >,
9048            offset: usize,
9049            _depth: fidl::encoding::Depth,
9050        ) -> fidl::Result<()> {
9051            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9052            // Delegate to tuple encoding.
9053            fidl::encoding::Encode::<TestOptionalStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9054                (
9055                    <fidl::encoding::OptionalUnion<SampleStrictResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9056                ),
9057                encoder, offset, _depth
9058            )
9059        }
9060    }
9061    unsafe impl<
9062        T0: fidl::encoding::Encode<
9063                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9064                fidl::encoding::DefaultFuchsiaResourceDialect,
9065            >,
9066    >
9067        fidl::encoding::Encode<
9068            TestOptionalStrictResourceXUnionInStruct,
9069            fidl::encoding::DefaultFuchsiaResourceDialect,
9070        > for (T0,)
9071    {
9072        #[inline]
9073        unsafe fn encode(
9074            self,
9075            encoder: &mut fidl::encoding::Encoder<
9076                '_,
9077                fidl::encoding::DefaultFuchsiaResourceDialect,
9078            >,
9079            offset: usize,
9080            depth: fidl::encoding::Depth,
9081        ) -> fidl::Result<()> {
9082            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9083            // Zero out padding regions. There's no need to apply masks
9084            // because the unmasked parts will be overwritten by fields.
9085            // Write the fields.
9086            self.0.encode(encoder, offset + 0, depth)?;
9087            Ok(())
9088        }
9089    }
9090
9091    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9092        for TestOptionalStrictResourceXUnionInStruct
9093    {
9094        #[inline(always)]
9095        fn new_empty() -> Self {
9096            Self {
9097                xu: fidl::new_empty!(
9098                    fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9099                    fidl::encoding::DefaultFuchsiaResourceDialect
9100                ),
9101            }
9102        }
9103
9104        #[inline]
9105        unsafe fn decode(
9106            &mut self,
9107            decoder: &mut fidl::encoding::Decoder<
9108                '_,
9109                fidl::encoding::DefaultFuchsiaResourceDialect,
9110            >,
9111            offset: usize,
9112            _depth: fidl::encoding::Depth,
9113        ) -> fidl::Result<()> {
9114            decoder.debug_check_bounds::<Self>(offset);
9115            // Verify that padding bytes are zero.
9116            fidl::decode!(
9117                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9118                fidl::encoding::DefaultFuchsiaResourceDialect,
9119                &mut self.xu,
9120                decoder,
9121                offset + 0,
9122                _depth
9123            )?;
9124            Ok(())
9125        }
9126    }
9127
9128    impl fidl::encoding::ResourceTypeMarker for TestPackageResolverResolveRequest {
9129        type Borrowed<'a> = &'a mut Self;
9130        fn take_or_borrow<'a>(
9131            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9132        ) -> Self::Borrowed<'a> {
9133            value
9134        }
9135    }
9136
9137    unsafe impl fidl::encoding::TypeMarker for TestPackageResolverResolveRequest {
9138        type Owned = Self;
9139
9140        #[inline(always)]
9141        fn inline_align(_context: fidl::encoding::Context) -> usize {
9142            8
9143        }
9144
9145        #[inline(always)]
9146        fn inline_size(_context: fidl::encoding::Context) -> usize {
9147            40
9148        }
9149    }
9150
9151    unsafe impl
9152        fidl::encoding::Encode<
9153            TestPackageResolverResolveRequest,
9154            fidl::encoding::DefaultFuchsiaResourceDialect,
9155        > for &mut TestPackageResolverResolveRequest
9156    {
9157        #[inline]
9158        unsafe fn encode(
9159            self,
9160            encoder: &mut fidl::encoding::Encoder<
9161                '_,
9162                fidl::encoding::DefaultFuchsiaResourceDialect,
9163            >,
9164            offset: usize,
9165            _depth: fidl::encoding::Depth,
9166        ) -> fidl::Result<()> {
9167            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9168            // Delegate to tuple encoding.
9169            fidl::encoding::Encode::<TestPackageResolverResolveRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9170                (
9171                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),
9172                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.selectors),
9173                    <UpdatePolicy as fidl::encoding::ValueTypeMarker>::borrow(&self.update_policy),
9174                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
9175                ),
9176                encoder, offset, _depth
9177            )
9178        }
9179    }
9180    unsafe impl<
9181        T0: fidl::encoding::Encode<
9182                fidl::encoding::UnboundedString,
9183                fidl::encoding::DefaultFuchsiaResourceDialect,
9184            >,
9185        T1: fidl::encoding::Encode<
9186                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9187                fidl::encoding::DefaultFuchsiaResourceDialect,
9188            >,
9189        T2: fidl::encoding::Encode<UpdatePolicy, fidl::encoding::DefaultFuchsiaResourceDialect>,
9190        T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
9191    >
9192        fidl::encoding::Encode<
9193            TestPackageResolverResolveRequest,
9194            fidl::encoding::DefaultFuchsiaResourceDialect,
9195        > for (T0, T1, T2, T3)
9196    {
9197        #[inline]
9198        unsafe fn encode(
9199            self,
9200            encoder: &mut fidl::encoding::Encoder<
9201                '_,
9202                fidl::encoding::DefaultFuchsiaResourceDialect,
9203            >,
9204            offset: usize,
9205            depth: fidl::encoding::Depth,
9206        ) -> fidl::Result<()> {
9207            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9208            // Zero out padding regions. There's no need to apply masks
9209            // because the unmasked parts will be overwritten by fields.
9210            unsafe {
9211                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9212                (ptr as *mut u64).write_unaligned(0);
9213            }
9214            // Write the fields.
9215            self.0.encode(encoder, offset + 0, depth)?;
9216            self.1.encode(encoder, offset + 16, depth)?;
9217            self.2.encode(encoder, offset + 32, depth)?;
9218            self.3.encode(encoder, offset + 36, depth)?;
9219            Ok(())
9220        }
9221    }
9222
9223    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9224        for TestPackageResolverResolveRequest
9225    {
9226        #[inline(always)]
9227        fn new_empty() -> Self {
9228            Self {
9229                package_url: fidl::new_empty!(
9230                    fidl::encoding::UnboundedString,
9231                    fidl::encoding::DefaultFuchsiaResourceDialect
9232                ),
9233                selectors: fidl::new_empty!(
9234                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9235                    fidl::encoding::DefaultFuchsiaResourceDialect
9236                ),
9237                update_policy: fidl::new_empty!(
9238                    UpdatePolicy,
9239                    fidl::encoding::DefaultFuchsiaResourceDialect
9240                ),
9241                this_should_be_a_handle: fidl::new_empty!(
9242                    u32,
9243                    fidl::encoding::DefaultFuchsiaResourceDialect
9244                ),
9245            }
9246        }
9247
9248        #[inline]
9249        unsafe fn decode(
9250            &mut self,
9251            decoder: &mut fidl::encoding::Decoder<
9252                '_,
9253                fidl::encoding::DefaultFuchsiaResourceDialect,
9254            >,
9255            offset: usize,
9256            _depth: fidl::encoding::Depth,
9257        ) -> fidl::Result<()> {
9258            decoder.debug_check_bounds::<Self>(offset);
9259            // Verify that padding bytes are zero.
9260            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9261            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9262            let mask = 0xffff0000u64;
9263            let maskedval = padval & mask;
9264            if maskedval != 0 {
9265                return Err(fidl::Error::NonZeroPadding {
9266                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9267                });
9268            }
9269            fidl::decode!(
9270                fidl::encoding::UnboundedString,
9271                fidl::encoding::DefaultFuchsiaResourceDialect,
9272                &mut self.package_url,
9273                decoder,
9274                offset + 0,
9275                _depth
9276            )?;
9277            fidl::decode!(
9278                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9279                fidl::encoding::DefaultFuchsiaResourceDialect,
9280                &mut self.selectors,
9281                decoder,
9282                offset + 16,
9283                _depth
9284            )?;
9285            fidl::decode!(
9286                UpdatePolicy,
9287                fidl::encoding::DefaultFuchsiaResourceDialect,
9288                &mut self.update_policy,
9289                decoder,
9290                offset + 32,
9291                _depth
9292            )?;
9293            fidl::decode!(
9294                u32,
9295                fidl::encoding::DefaultFuchsiaResourceDialect,
9296                &mut self.this_should_be_a_handle,
9297                decoder,
9298                offset + 36,
9299                _depth
9300            )?;
9301            Ok(())
9302        }
9303    }
9304
9305    impl fidl::encoding::ResourceTypeMarker for TestStrictResourceXUnionInStruct {
9306        type Borrowed<'a> = &'a mut Self;
9307        fn take_or_borrow<'a>(
9308            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9309        ) -> Self::Borrowed<'a> {
9310            value
9311        }
9312    }
9313
9314    unsafe impl fidl::encoding::TypeMarker for TestStrictResourceXUnionInStruct {
9315        type Owned = Self;
9316
9317        #[inline(always)]
9318        fn inline_align(_context: fidl::encoding::Context) -> usize {
9319            8
9320        }
9321
9322        #[inline(always)]
9323        fn inline_size(_context: fidl::encoding::Context) -> usize {
9324            16
9325        }
9326    }
9327
9328    unsafe impl
9329        fidl::encoding::Encode<
9330            TestStrictResourceXUnionInStruct,
9331            fidl::encoding::DefaultFuchsiaResourceDialect,
9332        > for &mut TestStrictResourceXUnionInStruct
9333    {
9334        #[inline]
9335        unsafe fn encode(
9336            self,
9337            encoder: &mut fidl::encoding::Encoder<
9338                '_,
9339                fidl::encoding::DefaultFuchsiaResourceDialect,
9340            >,
9341            offset: usize,
9342            _depth: fidl::encoding::Depth,
9343        ) -> fidl::Result<()> {
9344            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9345            // Delegate to tuple encoding.
9346            fidl::encoding::Encode::<TestStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9347                (
9348                    <SampleStrictResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9349                ),
9350                encoder, offset, _depth
9351            )
9352        }
9353    }
9354    unsafe impl<
9355        T0: fidl::encoding::Encode<
9356                SampleStrictResourceXUnion,
9357                fidl::encoding::DefaultFuchsiaResourceDialect,
9358            >,
9359    >
9360        fidl::encoding::Encode<
9361            TestStrictResourceXUnionInStruct,
9362            fidl::encoding::DefaultFuchsiaResourceDialect,
9363        > for (T0,)
9364    {
9365        #[inline]
9366        unsafe fn encode(
9367            self,
9368            encoder: &mut fidl::encoding::Encoder<
9369                '_,
9370                fidl::encoding::DefaultFuchsiaResourceDialect,
9371            >,
9372            offset: usize,
9373            depth: fidl::encoding::Depth,
9374        ) -> fidl::Result<()> {
9375            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9376            // Zero out padding regions. There's no need to apply masks
9377            // because the unmasked parts will be overwritten by fields.
9378            // Write the fields.
9379            self.0.encode(encoder, offset + 0, depth)?;
9380            Ok(())
9381        }
9382    }
9383
9384    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9385        for TestStrictResourceXUnionInStruct
9386    {
9387        #[inline(always)]
9388        fn new_empty() -> Self {
9389            Self {
9390                xu: fidl::new_empty!(
9391                    SampleStrictResourceXUnion,
9392                    fidl::encoding::DefaultFuchsiaResourceDialect
9393                ),
9394            }
9395        }
9396
9397        #[inline]
9398        unsafe fn decode(
9399            &mut self,
9400            decoder: &mut fidl::encoding::Decoder<
9401                '_,
9402                fidl::encoding::DefaultFuchsiaResourceDialect,
9403            >,
9404            offset: usize,
9405            _depth: fidl::encoding::Depth,
9406        ) -> fidl::Result<()> {
9407            decoder.debug_check_bounds::<Self>(offset);
9408            // Verify that padding bytes are zero.
9409            fidl::decode!(
9410                SampleStrictResourceXUnion,
9411                fidl::encoding::DefaultFuchsiaResourceDialect,
9412                &mut self.xu,
9413                decoder,
9414                offset + 0,
9415                _depth
9416            )?;
9417            Ok(())
9418        }
9419    }
9420
9421    impl fidl::encoding::ResourceTypeMarker for UnboundedNonnullableVectorOfHandles {
9422        type Borrowed<'a> = &'a mut Self;
9423        fn take_or_borrow<'a>(
9424            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9425        ) -> Self::Borrowed<'a> {
9426            value
9427        }
9428    }
9429
9430    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfHandles {
9431        type Owned = Self;
9432
9433        #[inline(always)]
9434        fn inline_align(_context: fidl::encoding::Context) -> usize {
9435            8
9436        }
9437
9438        #[inline(always)]
9439        fn inline_size(_context: fidl::encoding::Context) -> usize {
9440            16
9441        }
9442    }
9443
9444    unsafe impl
9445        fidl::encoding::Encode<
9446            UnboundedNonnullableVectorOfHandles,
9447            fidl::encoding::DefaultFuchsiaResourceDialect,
9448        > for &mut UnboundedNonnullableVectorOfHandles
9449    {
9450        #[inline]
9451        unsafe fn encode(
9452            self,
9453            encoder: &mut fidl::encoding::Encoder<
9454                '_,
9455                fidl::encoding::DefaultFuchsiaResourceDialect,
9456            >,
9457            offset: usize,
9458            _depth: fidl::encoding::Depth,
9459        ) -> fidl::Result<()> {
9460            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9461            // Delegate to tuple encoding.
9462            fidl::encoding::Encode::<
9463                UnboundedNonnullableVectorOfHandles,
9464                fidl::encoding::DefaultFuchsiaResourceDialect,
9465            >::encode(
9466                (<fidl::encoding::UnboundedVector<
9467                    fidl::encoding::HandleType<
9468                        fidl::NullableHandle,
9469                        { fidl::ObjectType::NONE.into_raw() },
9470                        2147483648,
9471                    >,
9472                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9473                    &mut self.vh0
9474                ),),
9475                encoder,
9476                offset,
9477                _depth,
9478            )
9479        }
9480    }
9481    unsafe impl<
9482        T0: fidl::encoding::Encode<
9483                fidl::encoding::UnboundedVector<
9484                    fidl::encoding::HandleType<
9485                        fidl::NullableHandle,
9486                        { fidl::ObjectType::NONE.into_raw() },
9487                        2147483648,
9488                    >,
9489                >,
9490                fidl::encoding::DefaultFuchsiaResourceDialect,
9491            >,
9492    >
9493        fidl::encoding::Encode<
9494            UnboundedNonnullableVectorOfHandles,
9495            fidl::encoding::DefaultFuchsiaResourceDialect,
9496        > for (T0,)
9497    {
9498        #[inline]
9499        unsafe fn encode(
9500            self,
9501            encoder: &mut fidl::encoding::Encoder<
9502                '_,
9503                fidl::encoding::DefaultFuchsiaResourceDialect,
9504            >,
9505            offset: usize,
9506            depth: fidl::encoding::Depth,
9507        ) -> fidl::Result<()> {
9508            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9509            // Zero out padding regions. There's no need to apply masks
9510            // because the unmasked parts will be overwritten by fields.
9511            // Write the fields.
9512            self.0.encode(encoder, offset + 0, depth)?;
9513            Ok(())
9514        }
9515    }
9516
9517    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9518        for UnboundedNonnullableVectorOfHandles
9519    {
9520        #[inline(always)]
9521        fn new_empty() -> Self {
9522            Self {
9523                vh0: fidl::new_empty!(
9524                    fidl::encoding::UnboundedVector<
9525                        fidl::encoding::HandleType<
9526                            fidl::NullableHandle,
9527                            { fidl::ObjectType::NONE.into_raw() },
9528                            2147483648,
9529                        >,
9530                    >,
9531                    fidl::encoding::DefaultFuchsiaResourceDialect
9532                ),
9533            }
9534        }
9535
9536        #[inline]
9537        unsafe fn decode(
9538            &mut self,
9539            decoder: &mut fidl::encoding::Decoder<
9540                '_,
9541                fidl::encoding::DefaultFuchsiaResourceDialect,
9542            >,
9543            offset: usize,
9544            _depth: fidl::encoding::Depth,
9545        ) -> fidl::Result<()> {
9546            decoder.debug_check_bounds::<Self>(offset);
9547            // Verify that padding bytes are zero.
9548            fidl::decode!(
9549                fidl::encoding::UnboundedVector<
9550                    fidl::encoding::HandleType<
9551                        fidl::NullableHandle,
9552                        { fidl::ObjectType::NONE.into_raw() },
9553                        2147483648,
9554                    >,
9555                >,
9556                fidl::encoding::DefaultFuchsiaResourceDialect,
9557                &mut self.vh0,
9558                decoder,
9559                offset + 0,
9560                _depth
9561            )?;
9562            Ok(())
9563        }
9564    }
9565
9566    impl fidl::encoding::ResourceTypeMarker for UnboundedNullableVectorOfHandles {
9567        type Borrowed<'a> = &'a mut Self;
9568        fn take_or_borrow<'a>(
9569            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9570        ) -> Self::Borrowed<'a> {
9571            value
9572        }
9573    }
9574
9575    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfHandles {
9576        type Owned = Self;
9577
9578        #[inline(always)]
9579        fn inline_align(_context: fidl::encoding::Context) -> usize {
9580            8
9581        }
9582
9583        #[inline(always)]
9584        fn inline_size(_context: fidl::encoding::Context) -> usize {
9585            16
9586        }
9587    }
9588
9589    unsafe impl
9590        fidl::encoding::Encode<
9591            UnboundedNullableVectorOfHandles,
9592            fidl::encoding::DefaultFuchsiaResourceDialect,
9593        > for &mut UnboundedNullableVectorOfHandles
9594    {
9595        #[inline]
9596        unsafe fn encode(
9597            self,
9598            encoder: &mut fidl::encoding::Encoder<
9599                '_,
9600                fidl::encoding::DefaultFuchsiaResourceDialect,
9601            >,
9602            offset: usize,
9603            _depth: fidl::encoding::Depth,
9604        ) -> fidl::Result<()> {
9605            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9606            // Delegate to tuple encoding.
9607            fidl::encoding::Encode::<
9608                UnboundedNullableVectorOfHandles,
9609                fidl::encoding::DefaultFuchsiaResourceDialect,
9610            >::encode(
9611                (<fidl::encoding::Optional<
9612                    fidl::encoding::UnboundedVector<
9613                        fidl::encoding::HandleType<
9614                            fidl::NullableHandle,
9615                            { fidl::ObjectType::NONE.into_raw() },
9616                            2147483648,
9617                        >,
9618                    >,
9619                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9620                    &mut self.vh0
9621                ),),
9622                encoder,
9623                offset,
9624                _depth,
9625            )
9626        }
9627    }
9628    unsafe impl<
9629        T0: fidl::encoding::Encode<
9630                fidl::encoding::Optional<
9631                    fidl::encoding::UnboundedVector<
9632                        fidl::encoding::HandleType<
9633                            fidl::NullableHandle,
9634                            { fidl::ObjectType::NONE.into_raw() },
9635                            2147483648,
9636                        >,
9637                    >,
9638                >,
9639                fidl::encoding::DefaultFuchsiaResourceDialect,
9640            >,
9641    >
9642        fidl::encoding::Encode<
9643            UnboundedNullableVectorOfHandles,
9644            fidl::encoding::DefaultFuchsiaResourceDialect,
9645        > for (T0,)
9646    {
9647        #[inline]
9648        unsafe fn encode(
9649            self,
9650            encoder: &mut fidl::encoding::Encoder<
9651                '_,
9652                fidl::encoding::DefaultFuchsiaResourceDialect,
9653            >,
9654            offset: usize,
9655            depth: fidl::encoding::Depth,
9656        ) -> fidl::Result<()> {
9657            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9658            // Zero out padding regions. There's no need to apply masks
9659            // because the unmasked parts will be overwritten by fields.
9660            // Write the fields.
9661            self.0.encode(encoder, offset + 0, depth)?;
9662            Ok(())
9663        }
9664    }
9665
9666    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9667        for UnboundedNullableVectorOfHandles
9668    {
9669        #[inline(always)]
9670        fn new_empty() -> Self {
9671            Self {
9672                vh0: fidl::new_empty!(
9673                    fidl::encoding::Optional<
9674                        fidl::encoding::UnboundedVector<
9675                            fidl::encoding::HandleType<
9676                                fidl::NullableHandle,
9677                                { fidl::ObjectType::NONE.into_raw() },
9678                                2147483648,
9679                            >,
9680                        >,
9681                    >,
9682                    fidl::encoding::DefaultFuchsiaResourceDialect
9683                ),
9684            }
9685        }
9686
9687        #[inline]
9688        unsafe fn decode(
9689            &mut self,
9690            decoder: &mut fidl::encoding::Decoder<
9691                '_,
9692                fidl::encoding::DefaultFuchsiaResourceDialect,
9693            >,
9694            offset: usize,
9695            _depth: fidl::encoding::Depth,
9696        ) -> fidl::Result<()> {
9697            decoder.debug_check_bounds::<Self>(offset);
9698            // Verify that padding bytes are zero.
9699            fidl::decode!(
9700                fidl::encoding::Optional<
9701                    fidl::encoding::UnboundedVector<
9702                        fidl::encoding::HandleType<
9703                            fidl::NullableHandle,
9704                            { fidl::ObjectType::NONE.into_raw() },
9705                            2147483648,
9706                        >,
9707                    >,
9708                >,
9709                fidl::encoding::DefaultFuchsiaResourceDialect,
9710                &mut self.vh0,
9711                decoder,
9712                offset + 0,
9713                _depth
9714            )?;
9715            Ok(())
9716        }
9717    }
9718
9719    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpoints {
9720        type Borrowed<'a> = &'a mut Self;
9721        fn take_or_borrow<'a>(
9722            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9723        ) -> Self::Borrowed<'a> {
9724            value
9725        }
9726    }
9727
9728    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpoints {
9729        type Owned = Self;
9730
9731        #[inline(always)]
9732        fn inline_align(_context: fidl::encoding::Context) -> usize {
9733            8
9734        }
9735
9736        #[inline(always)]
9737        fn inline_size(_context: fidl::encoding::Context) -> usize {
9738            16
9739        }
9740    }
9741
9742    unsafe impl
9743        fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9744        for &mut UnionOfEndpoints
9745    {
9746        #[inline]
9747        unsafe fn encode(
9748            self,
9749            encoder: &mut fidl::encoding::Encoder<
9750                '_,
9751                fidl::encoding::DefaultFuchsiaResourceDialect,
9752            >,
9753            offset: usize,
9754            _depth: fidl::encoding::Depth,
9755        ) -> fidl::Result<()> {
9756            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9757            // Delegate to tuple encoding.
9758            fidl::encoding::Encode::<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9759                (
9760                    <UnionOfEndpointsUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
9761                ),
9762                encoder, offset, _depth
9763            )
9764        }
9765    }
9766    unsafe impl<
9767        T0: fidl::encoding::Encode<
9768                UnionOfEndpointsUnion,
9769                fidl::encoding::DefaultFuchsiaResourceDialect,
9770            >,
9771    > fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9772        for (T0,)
9773    {
9774        #[inline]
9775        unsafe fn encode(
9776            self,
9777            encoder: &mut fidl::encoding::Encoder<
9778                '_,
9779                fidl::encoding::DefaultFuchsiaResourceDialect,
9780            >,
9781            offset: usize,
9782            depth: fidl::encoding::Depth,
9783        ) -> fidl::Result<()> {
9784            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9785            // Zero out padding regions. There's no need to apply masks
9786            // because the unmasked parts will be overwritten by fields.
9787            // Write the fields.
9788            self.0.encode(encoder, offset + 0, depth)?;
9789            Ok(())
9790        }
9791    }
9792
9793    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9794        for UnionOfEndpoints
9795    {
9796        #[inline(always)]
9797        fn new_empty() -> Self {
9798            Self {
9799                u: fidl::new_empty!(
9800                    UnionOfEndpointsUnion,
9801                    fidl::encoding::DefaultFuchsiaResourceDialect
9802                ),
9803            }
9804        }
9805
9806        #[inline]
9807        unsafe fn decode(
9808            &mut self,
9809            decoder: &mut fidl::encoding::Decoder<
9810                '_,
9811                fidl::encoding::DefaultFuchsiaResourceDialect,
9812            >,
9813            offset: usize,
9814            _depth: fidl::encoding::Depth,
9815        ) -> fidl::Result<()> {
9816            decoder.debug_check_bounds::<Self>(offset);
9817            // Verify that padding bytes are zero.
9818            fidl::decode!(
9819                UnionOfEndpointsUnion,
9820                fidl::encoding::DefaultFuchsiaResourceDialect,
9821                &mut self.u,
9822                decoder,
9823                offset + 0,
9824                _depth
9825            )?;
9826            Ok(())
9827        }
9828    }
9829
9830    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9831        type Borrowed<'a> = &'a mut Self;
9832        fn take_or_borrow<'a>(
9833            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9834        ) -> Self::Borrowed<'a> {
9835            value
9836        }
9837    }
9838
9839    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9840        type Owned = Self;
9841
9842        #[inline(always)]
9843        fn inline_align(_context: fidl::encoding::Context) -> usize {
9844            8
9845        }
9846
9847        #[inline(always)]
9848        fn inline_size(_context: fidl::encoding::Context) -> usize {
9849            16
9850        }
9851    }
9852
9853    unsafe impl
9854        fidl::encoding::Encode<
9855            VectorOfArrayOfEventInStructWithDefaultRights,
9856            fidl::encoding::DefaultFuchsiaResourceDialect,
9857        > for &mut VectorOfArrayOfEventInStructWithDefaultRights
9858    {
9859        #[inline]
9860        unsafe fn encode(
9861            self,
9862            encoder: &mut fidl::encoding::Encoder<
9863                '_,
9864                fidl::encoding::DefaultFuchsiaResourceDialect,
9865            >,
9866            offset: usize,
9867            _depth: fidl::encoding::Depth,
9868        ) -> fidl::Result<()> {
9869            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9870            // Delegate to tuple encoding.
9871            fidl::encoding::Encode::<
9872                VectorOfArrayOfEventInStructWithDefaultRights,
9873                fidl::encoding::DefaultFuchsiaResourceDialect,
9874            >::encode(
9875                (<fidl::encoding::Vector<
9876                    fidl::encoding::Array<
9877                        fidl::encoding::HandleType<
9878                            fidl::Event,
9879                            { fidl::ObjectType::EVENT.into_raw() },
9880                            53251,
9881                        >,
9882                        1,
9883                    >,
9884                    1,
9885                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9886                    &mut self.h
9887                ),),
9888                encoder,
9889                offset,
9890                _depth,
9891            )
9892        }
9893    }
9894    unsafe impl<
9895        T0: fidl::encoding::Encode<
9896                fidl::encoding::Vector<
9897                    fidl::encoding::Array<
9898                        fidl::encoding::HandleType<
9899                            fidl::Event,
9900                            { fidl::ObjectType::EVENT.into_raw() },
9901                            53251,
9902                        >,
9903                        1,
9904                    >,
9905                    1,
9906                >,
9907                fidl::encoding::DefaultFuchsiaResourceDialect,
9908            >,
9909    >
9910        fidl::encoding::Encode<
9911            VectorOfArrayOfEventInStructWithDefaultRights,
9912            fidl::encoding::DefaultFuchsiaResourceDialect,
9913        > for (T0,)
9914    {
9915        #[inline]
9916        unsafe fn encode(
9917            self,
9918            encoder: &mut fidl::encoding::Encoder<
9919                '_,
9920                fidl::encoding::DefaultFuchsiaResourceDialect,
9921            >,
9922            offset: usize,
9923            depth: fidl::encoding::Depth,
9924        ) -> fidl::Result<()> {
9925            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9926            // Zero out padding regions. There's no need to apply masks
9927            // because the unmasked parts will be overwritten by fields.
9928            // Write the fields.
9929            self.0.encode(encoder, offset + 0, depth)?;
9930            Ok(())
9931        }
9932    }
9933
9934    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9935        for VectorOfArrayOfEventInStructWithDefaultRights
9936    {
9937        #[inline(always)]
9938        fn new_empty() -> Self {
9939            Self {
9940                h: fidl::new_empty!(
9941                    fidl::encoding::Vector<
9942                        fidl::encoding::Array<
9943                            fidl::encoding::HandleType<
9944                                fidl::Event,
9945                                { fidl::ObjectType::EVENT.into_raw() },
9946                                53251,
9947                            >,
9948                            1,
9949                        >,
9950                        1,
9951                    >,
9952                    fidl::encoding::DefaultFuchsiaResourceDialect
9953                ),
9954            }
9955        }
9956
9957        #[inline]
9958        unsafe fn decode(
9959            &mut self,
9960            decoder: &mut fidl::encoding::Decoder<
9961                '_,
9962                fidl::encoding::DefaultFuchsiaResourceDialect,
9963            >,
9964            offset: usize,
9965            _depth: fidl::encoding::Depth,
9966        ) -> fidl::Result<()> {
9967            decoder.debug_check_bounds::<Self>(offset);
9968            // Verify that padding bytes are zero.
9969            fidl::decode!(
9970                fidl::encoding::Vector<
9971                    fidl::encoding::Array<
9972                        fidl::encoding::HandleType<
9973                            fidl::Event,
9974                            { fidl::ObjectType::EVENT.into_raw() },
9975                            53251,
9976                        >,
9977                        1,
9978                    >,
9979                    1,
9980                >,
9981                fidl::encoding::DefaultFuchsiaResourceDialect,
9982                &mut self.h,
9983                decoder,
9984                offset + 0,
9985                _depth
9986            )?;
9987            Ok(())
9988        }
9989    }
9990
9991    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
9992        type Borrowed<'a> = &'a mut Self;
9993        fn take_or_borrow<'a>(
9994            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9995        ) -> Self::Borrowed<'a> {
9996            value
9997        }
9998    }
9999
10000    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10001        type Owned = Self;
10002
10003        #[inline(always)]
10004        fn inline_align(_context: fidl::encoding::Context) -> usize {
10005            8
10006        }
10007
10008        #[inline(always)]
10009        fn inline_size(_context: fidl::encoding::Context) -> usize {
10010            16
10011        }
10012    }
10013
10014    unsafe impl
10015        fidl::encoding::Encode<
10016            VectorOfArrayOfEventInStructWithReducedRights,
10017            fidl::encoding::DefaultFuchsiaResourceDialect,
10018        > for &mut VectorOfArrayOfEventInStructWithReducedRights
10019    {
10020        #[inline]
10021        unsafe fn encode(
10022            self,
10023            encoder: &mut fidl::encoding::Encoder<
10024                '_,
10025                fidl::encoding::DefaultFuchsiaResourceDialect,
10026            >,
10027            offset: usize,
10028            _depth: fidl::encoding::Depth,
10029        ) -> fidl::Result<()> {
10030            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10031            // Delegate to tuple encoding.
10032            fidl::encoding::Encode::<
10033                VectorOfArrayOfEventInStructWithReducedRights,
10034                fidl::encoding::DefaultFuchsiaResourceDialect,
10035            >::encode(
10036                (<fidl::encoding::Vector<
10037                    fidl::encoding::Array<
10038                        fidl::encoding::HandleType<
10039                            fidl::Event,
10040                            { fidl::ObjectType::EVENT.into_raw() },
10041                            49155,
10042                        >,
10043                        1,
10044                    >,
10045                    1,
10046                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10047                    &mut self.h
10048                ),),
10049                encoder,
10050                offset,
10051                _depth,
10052            )
10053        }
10054    }
10055    unsafe impl<
10056        T0: fidl::encoding::Encode<
10057                fidl::encoding::Vector<
10058                    fidl::encoding::Array<
10059                        fidl::encoding::HandleType<
10060                            fidl::Event,
10061                            { fidl::ObjectType::EVENT.into_raw() },
10062                            49155,
10063                        >,
10064                        1,
10065                    >,
10066                    1,
10067                >,
10068                fidl::encoding::DefaultFuchsiaResourceDialect,
10069            >,
10070    >
10071        fidl::encoding::Encode<
10072            VectorOfArrayOfEventInStructWithReducedRights,
10073            fidl::encoding::DefaultFuchsiaResourceDialect,
10074        > for (T0,)
10075    {
10076        #[inline]
10077        unsafe fn encode(
10078            self,
10079            encoder: &mut fidl::encoding::Encoder<
10080                '_,
10081                fidl::encoding::DefaultFuchsiaResourceDialect,
10082            >,
10083            offset: usize,
10084            depth: fidl::encoding::Depth,
10085        ) -> fidl::Result<()> {
10086            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10087            // Zero out padding regions. There's no need to apply masks
10088            // because the unmasked parts will be overwritten by fields.
10089            // Write the fields.
10090            self.0.encode(encoder, offset + 0, depth)?;
10091            Ok(())
10092        }
10093    }
10094
10095    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10096        for VectorOfArrayOfEventInStructWithReducedRights
10097    {
10098        #[inline(always)]
10099        fn new_empty() -> Self {
10100            Self {
10101                h: fidl::new_empty!(
10102                    fidl::encoding::Vector<
10103                        fidl::encoding::Array<
10104                            fidl::encoding::HandleType<
10105                                fidl::Event,
10106                                { fidl::ObjectType::EVENT.into_raw() },
10107                                49155,
10108                            >,
10109                            1,
10110                        >,
10111                        1,
10112                    >,
10113                    fidl::encoding::DefaultFuchsiaResourceDialect
10114                ),
10115            }
10116        }
10117
10118        #[inline]
10119        unsafe fn decode(
10120            &mut self,
10121            decoder: &mut fidl::encoding::Decoder<
10122                '_,
10123                fidl::encoding::DefaultFuchsiaResourceDialect,
10124            >,
10125            offset: usize,
10126            _depth: fidl::encoding::Depth,
10127        ) -> fidl::Result<()> {
10128            decoder.debug_check_bounds::<Self>(offset);
10129            // Verify that padding bytes are zero.
10130            fidl::decode!(
10131                fidl::encoding::Vector<
10132                    fidl::encoding::Array<
10133                        fidl::encoding::HandleType<
10134                            fidl::Event,
10135                            { fidl::ObjectType::EVENT.into_raw() },
10136                            49155,
10137                        >,
10138                        1,
10139                    >,
10140                    1,
10141                >,
10142                fidl::encoding::DefaultFuchsiaResourceDialect,
10143                &mut self.h,
10144                decoder,
10145                offset + 0,
10146                _depth
10147            )?;
10148            Ok(())
10149        }
10150    }
10151
10152    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10153        type Borrowed<'a> = &'a mut Self;
10154        fn take_or_borrow<'a>(
10155            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10156        ) -> Self::Borrowed<'a> {
10157            value
10158        }
10159    }
10160
10161    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10162        type Owned = Self;
10163
10164        #[inline(always)]
10165        fn inline_align(_context: fidl::encoding::Context) -> usize {
10166            8
10167        }
10168
10169        #[inline(always)]
10170        fn inline_size(_context: fidl::encoding::Context) -> usize {
10171            16
10172        }
10173    }
10174
10175    unsafe impl
10176        fidl::encoding::Encode<
10177            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10178            fidl::encoding::DefaultFuchsiaResourceDialect,
10179        > for &mut VectorOfArrayOfEventInTableWithReducedRightsStruct
10180    {
10181        #[inline]
10182        unsafe fn encode(
10183            self,
10184            encoder: &mut fidl::encoding::Encoder<
10185                '_,
10186                fidl::encoding::DefaultFuchsiaResourceDialect,
10187            >,
10188            offset: usize,
10189            _depth: fidl::encoding::Depth,
10190        ) -> fidl::Result<()> {
10191            encoder
10192                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10193            // Delegate to tuple encoding.
10194            fidl::encoding::Encode::<VectorOfArrayOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10195                (
10196                    <VectorOfArrayOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
10197                ),
10198                encoder, offset, _depth
10199            )
10200        }
10201    }
10202    unsafe impl<
10203        T0: fidl::encoding::Encode<
10204                VectorOfArrayOfEventInTableWithReducedRights,
10205                fidl::encoding::DefaultFuchsiaResourceDialect,
10206            >,
10207    >
10208        fidl::encoding::Encode<
10209            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10210            fidl::encoding::DefaultFuchsiaResourceDialect,
10211        > for (T0,)
10212    {
10213        #[inline]
10214        unsafe fn encode(
10215            self,
10216            encoder: &mut fidl::encoding::Encoder<
10217                '_,
10218                fidl::encoding::DefaultFuchsiaResourceDialect,
10219            >,
10220            offset: usize,
10221            depth: fidl::encoding::Depth,
10222        ) -> fidl::Result<()> {
10223            encoder
10224                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10225            // Zero out padding regions. There's no need to apply masks
10226            // because the unmasked parts will be overwritten by fields.
10227            // Write the fields.
10228            self.0.encode(encoder, offset + 0, depth)?;
10229            Ok(())
10230        }
10231    }
10232
10233    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10234        for VectorOfArrayOfEventInTableWithReducedRightsStruct
10235    {
10236        #[inline(always)]
10237        fn new_empty() -> Self {
10238            Self {
10239                t: fidl::new_empty!(
10240                    VectorOfArrayOfEventInTableWithReducedRights,
10241                    fidl::encoding::DefaultFuchsiaResourceDialect
10242                ),
10243            }
10244        }
10245
10246        #[inline]
10247        unsafe fn decode(
10248            &mut self,
10249            decoder: &mut fidl::encoding::Decoder<
10250                '_,
10251                fidl::encoding::DefaultFuchsiaResourceDialect,
10252            >,
10253            offset: usize,
10254            _depth: fidl::encoding::Depth,
10255        ) -> fidl::Result<()> {
10256            decoder.debug_check_bounds::<Self>(offset);
10257            // Verify that padding bytes are zero.
10258            fidl::decode!(
10259                VectorOfArrayOfEventInTableWithReducedRights,
10260                fidl::encoding::DefaultFuchsiaResourceDialect,
10261                &mut self.t,
10262                decoder,
10263                offset + 0,
10264                _depth
10265            )?;
10266            Ok(())
10267        }
10268    }
10269
10270    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10271        type Borrowed<'a> = &'a mut Self;
10272        fn take_or_borrow<'a>(
10273            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10274        ) -> Self::Borrowed<'a> {
10275            value
10276        }
10277    }
10278
10279    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10280        type Owned = Self;
10281
10282        #[inline(always)]
10283        fn inline_align(_context: fidl::encoding::Context) -> usize {
10284            8
10285        }
10286
10287        #[inline(always)]
10288        fn inline_size(_context: fidl::encoding::Context) -> usize {
10289            16
10290        }
10291    }
10292
10293    unsafe impl
10294        fidl::encoding::Encode<
10295            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10296            fidl::encoding::DefaultFuchsiaResourceDialect,
10297        > for &mut VectorOfArrayOfEventInUnionWithReducedRightsStruct
10298    {
10299        #[inline]
10300        unsafe fn encode(
10301            self,
10302            encoder: &mut fidl::encoding::Encoder<
10303                '_,
10304                fidl::encoding::DefaultFuchsiaResourceDialect,
10305            >,
10306            offset: usize,
10307            _depth: fidl::encoding::Depth,
10308        ) -> fidl::Result<()> {
10309            encoder
10310                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10311            // Delegate to tuple encoding.
10312            fidl::encoding::Encode::<VectorOfArrayOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10313                (
10314                    <VectorOfArrayOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10315                ),
10316                encoder, offset, _depth
10317            )
10318        }
10319    }
10320    unsafe impl<
10321        T0: fidl::encoding::Encode<
10322                VectorOfArrayOfEventInUnionWithReducedRights,
10323                fidl::encoding::DefaultFuchsiaResourceDialect,
10324            >,
10325    >
10326        fidl::encoding::Encode<
10327            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10328            fidl::encoding::DefaultFuchsiaResourceDialect,
10329        > for (T0,)
10330    {
10331        #[inline]
10332        unsafe fn encode(
10333            self,
10334            encoder: &mut fidl::encoding::Encoder<
10335                '_,
10336                fidl::encoding::DefaultFuchsiaResourceDialect,
10337            >,
10338            offset: usize,
10339            depth: fidl::encoding::Depth,
10340        ) -> fidl::Result<()> {
10341            encoder
10342                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10343            // Zero out padding regions. There's no need to apply masks
10344            // because the unmasked parts will be overwritten by fields.
10345            // Write the fields.
10346            self.0.encode(encoder, offset + 0, depth)?;
10347            Ok(())
10348        }
10349    }
10350
10351    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10352        for VectorOfArrayOfEventInUnionWithReducedRightsStruct
10353    {
10354        #[inline(always)]
10355        fn new_empty() -> Self {
10356            Self {
10357                u: fidl::new_empty!(
10358                    VectorOfArrayOfEventInUnionWithReducedRights,
10359                    fidl::encoding::DefaultFuchsiaResourceDialect
10360                ),
10361            }
10362        }
10363
10364        #[inline]
10365        unsafe fn decode(
10366            &mut self,
10367            decoder: &mut fidl::encoding::Decoder<
10368                '_,
10369                fidl::encoding::DefaultFuchsiaResourceDialect,
10370            >,
10371            offset: usize,
10372            _depth: fidl::encoding::Depth,
10373        ) -> fidl::Result<()> {
10374            decoder.debug_check_bounds::<Self>(offset);
10375            // Verify that padding bytes are zero.
10376            fidl::decode!(
10377                VectorOfArrayOfEventInUnionWithReducedRights,
10378                fidl::encoding::DefaultFuchsiaResourceDialect,
10379                &mut self.u,
10380                decoder,
10381                offset + 0,
10382                _depth
10383            )?;
10384            Ok(())
10385        }
10386    }
10387
10388    impl fidl::encoding::ResourceTypeMarker for VectorOfHandles {
10389        type Borrowed<'a> = &'a mut Self;
10390        fn take_or_borrow<'a>(
10391            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10392        ) -> Self::Borrowed<'a> {
10393            value
10394        }
10395    }
10396
10397    unsafe impl fidl::encoding::TypeMarker for VectorOfHandles {
10398        type Owned = Self;
10399
10400        #[inline(always)]
10401        fn inline_align(_context: fidl::encoding::Context) -> usize {
10402            8
10403        }
10404
10405        #[inline(always)]
10406        fn inline_size(_context: fidl::encoding::Context) -> usize {
10407            16
10408        }
10409    }
10410
10411    unsafe impl
10412        fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10413        for &mut VectorOfHandles
10414    {
10415        #[inline]
10416        unsafe fn encode(
10417            self,
10418            encoder: &mut fidl::encoding::Encoder<
10419                '_,
10420                fidl::encoding::DefaultFuchsiaResourceDialect,
10421            >,
10422            offset: usize,
10423            _depth: fidl::encoding::Depth,
10424        ) -> fidl::Result<()> {
10425            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10426            // Delegate to tuple encoding.
10427            fidl::encoding::Encode::<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10428                (
10429                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.v),
10430                ),
10431                encoder, offset, _depth
10432            )
10433        }
10434    }
10435    unsafe impl<
10436        T0: fidl::encoding::Encode<
10437                fidl::encoding::UnboundedVector<
10438                    fidl::encoding::HandleType<
10439                        fidl::NullableHandle,
10440                        { fidl::ObjectType::NONE.into_raw() },
10441                        2147483648,
10442                    >,
10443                >,
10444                fidl::encoding::DefaultFuchsiaResourceDialect,
10445            >,
10446    > fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10447        for (T0,)
10448    {
10449        #[inline]
10450        unsafe fn encode(
10451            self,
10452            encoder: &mut fidl::encoding::Encoder<
10453                '_,
10454                fidl::encoding::DefaultFuchsiaResourceDialect,
10455            >,
10456            offset: usize,
10457            depth: fidl::encoding::Depth,
10458        ) -> fidl::Result<()> {
10459            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10460            // Zero out padding regions. There's no need to apply masks
10461            // because the unmasked parts will be overwritten by fields.
10462            // Write the fields.
10463            self.0.encode(encoder, offset + 0, depth)?;
10464            Ok(())
10465        }
10466    }
10467
10468    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10469        for VectorOfHandles
10470    {
10471        #[inline(always)]
10472        fn new_empty() -> Self {
10473            Self {
10474                v: fidl::new_empty!(
10475                    fidl::encoding::UnboundedVector<
10476                        fidl::encoding::HandleType<
10477                            fidl::NullableHandle,
10478                            { fidl::ObjectType::NONE.into_raw() },
10479                            2147483648,
10480                        >,
10481                    >,
10482                    fidl::encoding::DefaultFuchsiaResourceDialect
10483                ),
10484            }
10485        }
10486
10487        #[inline]
10488        unsafe fn decode(
10489            &mut self,
10490            decoder: &mut fidl::encoding::Decoder<
10491                '_,
10492                fidl::encoding::DefaultFuchsiaResourceDialect,
10493            >,
10494            offset: usize,
10495            _depth: fidl::encoding::Depth,
10496        ) -> fidl::Result<()> {
10497            decoder.debug_check_bounds::<Self>(offset);
10498            // Verify that padding bytes are zero.
10499            fidl::decode!(
10500                fidl::encoding::UnboundedVector<
10501                    fidl::encoding::HandleType<
10502                        fidl::NullableHandle,
10503                        { fidl::ObjectType::NONE.into_raw() },
10504                        2147483648,
10505                    >,
10506                >,
10507                fidl::encoding::DefaultFuchsiaResourceDialect,
10508                &mut self.v,
10509                decoder,
10510                offset + 0,
10511                _depth
10512            )?;
10513            Ok(())
10514        }
10515    }
10516
10517    impl fidl::encoding::ResourceTypeMarker for VectorOfOptionalHandles {
10518        type Borrowed<'a> = &'a mut Self;
10519        fn take_or_borrow<'a>(
10520            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10521        ) -> Self::Borrowed<'a> {
10522            value
10523        }
10524    }
10525
10526    unsafe impl fidl::encoding::TypeMarker for VectorOfOptionalHandles {
10527        type Owned = Self;
10528
10529        #[inline(always)]
10530        fn inline_align(_context: fidl::encoding::Context) -> usize {
10531            8
10532        }
10533
10534        #[inline(always)]
10535        fn inline_size(_context: fidl::encoding::Context) -> usize {
10536            16
10537        }
10538    }
10539
10540    unsafe impl
10541        fidl::encoding::Encode<
10542            VectorOfOptionalHandles,
10543            fidl::encoding::DefaultFuchsiaResourceDialect,
10544        > for &mut VectorOfOptionalHandles
10545    {
10546        #[inline]
10547        unsafe fn encode(
10548            self,
10549            encoder: &mut fidl::encoding::Encoder<
10550                '_,
10551                fidl::encoding::DefaultFuchsiaResourceDialect,
10552            >,
10553            offset: usize,
10554            _depth: fidl::encoding::Depth,
10555        ) -> fidl::Result<()> {
10556            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10557            // Delegate to tuple encoding.
10558            fidl::encoding::Encode::<
10559                VectorOfOptionalHandles,
10560                fidl::encoding::DefaultFuchsiaResourceDialect,
10561            >::encode(
10562                (<fidl::encoding::UnboundedVector<
10563                    fidl::encoding::Optional<
10564                        fidl::encoding::HandleType<
10565                            fidl::NullableHandle,
10566                            { fidl::ObjectType::NONE.into_raw() },
10567                            2147483648,
10568                        >,
10569                    >,
10570                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10571                    &mut self.v
10572                ),),
10573                encoder,
10574                offset,
10575                _depth,
10576            )
10577        }
10578    }
10579    unsafe impl<
10580        T0: fidl::encoding::Encode<
10581                fidl::encoding::UnboundedVector<
10582                    fidl::encoding::Optional<
10583                        fidl::encoding::HandleType<
10584                            fidl::NullableHandle,
10585                            { fidl::ObjectType::NONE.into_raw() },
10586                            2147483648,
10587                        >,
10588                    >,
10589                >,
10590                fidl::encoding::DefaultFuchsiaResourceDialect,
10591            >,
10592    >
10593        fidl::encoding::Encode<
10594            VectorOfOptionalHandles,
10595            fidl::encoding::DefaultFuchsiaResourceDialect,
10596        > for (T0,)
10597    {
10598        #[inline]
10599        unsafe fn encode(
10600            self,
10601            encoder: &mut fidl::encoding::Encoder<
10602                '_,
10603                fidl::encoding::DefaultFuchsiaResourceDialect,
10604            >,
10605            offset: usize,
10606            depth: fidl::encoding::Depth,
10607        ) -> fidl::Result<()> {
10608            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10609            // Zero out padding regions. There's no need to apply masks
10610            // because the unmasked parts will be overwritten by fields.
10611            // Write the fields.
10612            self.0.encode(encoder, offset + 0, depth)?;
10613            Ok(())
10614        }
10615    }
10616
10617    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10618        for VectorOfOptionalHandles
10619    {
10620        #[inline(always)]
10621        fn new_empty() -> Self {
10622            Self {
10623                v: fidl::new_empty!(
10624                    fidl::encoding::UnboundedVector<
10625                        fidl::encoding::Optional<
10626                            fidl::encoding::HandleType<
10627                                fidl::NullableHandle,
10628                                { fidl::ObjectType::NONE.into_raw() },
10629                                2147483648,
10630                            >,
10631                        >,
10632                    >,
10633                    fidl::encoding::DefaultFuchsiaResourceDialect
10634                ),
10635            }
10636        }
10637
10638        #[inline]
10639        unsafe fn decode(
10640            &mut self,
10641            decoder: &mut fidl::encoding::Decoder<
10642                '_,
10643                fidl::encoding::DefaultFuchsiaResourceDialect,
10644            >,
10645            offset: usize,
10646            _depth: fidl::encoding::Depth,
10647        ) -> fidl::Result<()> {
10648            decoder.debug_check_bounds::<Self>(offset);
10649            // Verify that padding bytes are zero.
10650            fidl::decode!(
10651                fidl::encoding::UnboundedVector<
10652                    fidl::encoding::Optional<
10653                        fidl::encoding::HandleType<
10654                            fidl::NullableHandle,
10655                            { fidl::ObjectType::NONE.into_raw() },
10656                            2147483648,
10657                        >,
10658                    >,
10659                >,
10660                fidl::encoding::DefaultFuchsiaResourceDialect,
10661                &mut self.v,
10662                decoder,
10663                offset + 0,
10664                _depth
10665            )?;
10666            Ok(())
10667        }
10668    }
10669
10670    impl fidl::encoding::ResourceTypeMarker for VectorOfUpTo2Handles {
10671        type Borrowed<'a> = &'a mut Self;
10672        fn take_or_borrow<'a>(
10673            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10674        ) -> Self::Borrowed<'a> {
10675            value
10676        }
10677    }
10678
10679    unsafe impl fidl::encoding::TypeMarker for VectorOfUpTo2Handles {
10680        type Owned = Self;
10681
10682        #[inline(always)]
10683        fn inline_align(_context: fidl::encoding::Context) -> usize {
10684            8
10685        }
10686
10687        #[inline(always)]
10688        fn inline_size(_context: fidl::encoding::Context) -> usize {
10689            16
10690        }
10691    }
10692
10693    unsafe impl
10694        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10695        for &mut VectorOfUpTo2Handles
10696    {
10697        #[inline]
10698        unsafe fn encode(
10699            self,
10700            encoder: &mut fidl::encoding::Encoder<
10701                '_,
10702                fidl::encoding::DefaultFuchsiaResourceDialect,
10703            >,
10704            offset: usize,
10705            _depth: fidl::encoding::Depth,
10706        ) -> fidl::Result<()> {
10707            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10708            // Delegate to tuple encoding.
10709            fidl::encoding::Encode::<
10710                VectorOfUpTo2Handles,
10711                fidl::encoding::DefaultFuchsiaResourceDialect,
10712            >::encode(
10713                (<fidl::encoding::Vector<
10714                    fidl::encoding::HandleType<
10715                        fidl::NullableHandle,
10716                        { fidl::ObjectType::NONE.into_raw() },
10717                        2147483648,
10718                    >,
10719                    2,
10720                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10721                    &mut self.v
10722                ),),
10723                encoder,
10724                offset,
10725                _depth,
10726            )
10727        }
10728    }
10729    unsafe impl<
10730        T0: fidl::encoding::Encode<
10731                fidl::encoding::Vector<
10732                    fidl::encoding::HandleType<
10733                        fidl::NullableHandle,
10734                        { fidl::ObjectType::NONE.into_raw() },
10735                        2147483648,
10736                    >,
10737                    2,
10738                >,
10739                fidl::encoding::DefaultFuchsiaResourceDialect,
10740            >,
10741    >
10742        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10743        for (T0,)
10744    {
10745        #[inline]
10746        unsafe fn encode(
10747            self,
10748            encoder: &mut fidl::encoding::Encoder<
10749                '_,
10750                fidl::encoding::DefaultFuchsiaResourceDialect,
10751            >,
10752            offset: usize,
10753            depth: fidl::encoding::Depth,
10754        ) -> fidl::Result<()> {
10755            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10756            // Zero out padding regions. There's no need to apply masks
10757            // because the unmasked parts will be overwritten by fields.
10758            // Write the fields.
10759            self.0.encode(encoder, offset + 0, depth)?;
10760            Ok(())
10761        }
10762    }
10763
10764    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10765        for VectorOfUpTo2Handles
10766    {
10767        #[inline(always)]
10768        fn new_empty() -> Self {
10769            Self {
10770                v: fidl::new_empty!(
10771                    fidl::encoding::Vector<
10772                        fidl::encoding::HandleType<
10773                            fidl::NullableHandle,
10774                            { fidl::ObjectType::NONE.into_raw() },
10775                            2147483648,
10776                        >,
10777                        2,
10778                    >,
10779                    fidl::encoding::DefaultFuchsiaResourceDialect
10780                ),
10781            }
10782        }
10783
10784        #[inline]
10785        unsafe fn decode(
10786            &mut self,
10787            decoder: &mut fidl::encoding::Decoder<
10788                '_,
10789                fidl::encoding::DefaultFuchsiaResourceDialect,
10790            >,
10791            offset: usize,
10792            _depth: fidl::encoding::Depth,
10793        ) -> fidl::Result<()> {
10794            decoder.debug_check_bounds::<Self>(offset);
10795            // Verify that padding bytes are zero.
10796            fidl::decode!(
10797                fidl::encoding::Vector<
10798                    fidl::encoding::HandleType<
10799                        fidl::NullableHandle,
10800                        { fidl::ObjectType::NONE.into_raw() },
10801                        2147483648,
10802                    >,
10803                    2,
10804                >,
10805                fidl::encoding::DefaultFuchsiaResourceDialect,
10806                &mut self.v,
10807                decoder,
10808                offset + 0,
10809                _depth
10810            )?;
10811            Ok(())
10812        }
10813    }
10814
10815    impl ArrayOfVectorOfEventInTableWithDefaultRights {
10816        #[inline(always)]
10817        fn max_ordinal_present(&self) -> u64 {
10818            if let Some(_) = self.h {
10819                return 1;
10820            }
10821            0
10822        }
10823    }
10824
10825    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10826        type Borrowed<'a> = &'a mut Self;
10827        fn take_or_borrow<'a>(
10828            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10829        ) -> Self::Borrowed<'a> {
10830            value
10831        }
10832    }
10833
10834    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10835        type Owned = Self;
10836
10837        #[inline(always)]
10838        fn inline_align(_context: fidl::encoding::Context) -> usize {
10839            8
10840        }
10841
10842        #[inline(always)]
10843        fn inline_size(_context: fidl::encoding::Context) -> usize {
10844            16
10845        }
10846    }
10847
10848    unsafe impl
10849        fidl::encoding::Encode<
10850            ArrayOfVectorOfEventInTableWithDefaultRights,
10851            fidl::encoding::DefaultFuchsiaResourceDialect,
10852        > for &mut ArrayOfVectorOfEventInTableWithDefaultRights
10853    {
10854        unsafe fn encode(
10855            self,
10856            encoder: &mut fidl::encoding::Encoder<
10857                '_,
10858                fidl::encoding::DefaultFuchsiaResourceDialect,
10859            >,
10860            offset: usize,
10861            mut depth: fidl::encoding::Depth,
10862        ) -> fidl::Result<()> {
10863            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRights>(offset);
10864            // Vector header
10865            let max_ordinal: u64 = self.max_ordinal_present();
10866            encoder.write_num(max_ordinal, offset);
10867            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10868            // Calling encoder.out_of_line_offset(0) is not allowed.
10869            if max_ordinal == 0 {
10870                return Ok(());
10871            }
10872            depth.increment()?;
10873            let envelope_size = 8;
10874            let bytes_len = max_ordinal as usize * envelope_size;
10875            #[allow(unused_variables)]
10876            let offset = encoder.out_of_line_offset(bytes_len);
10877            let mut _prev_end_offset: usize = 0;
10878            if 1 > max_ordinal {
10879                return Ok(());
10880            }
10881
10882            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10883            // are envelope_size bytes.
10884            let cur_offset: usize = (1 - 1) * envelope_size;
10885
10886            // Zero reserved fields.
10887            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10888
10889            // Safety:
10890            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10891            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10892            //   envelope_size bytes, there is always sufficient room.
10893            fidl::encoding::encode_in_envelope_optional::<
10894                fidl::encoding::Array<
10895                    fidl::encoding::Vector<
10896                        fidl::encoding::HandleType<
10897                            fidl::Event,
10898                            { fidl::ObjectType::EVENT.into_raw() },
10899                            53251,
10900                        >,
10901                        1,
10902                    >,
10903                    1,
10904                >,
10905                fidl::encoding::DefaultFuchsiaResourceDialect,
10906            >(
10907                self.h.as_mut().map(
10908                    <fidl::encoding::Array<
10909                        fidl::encoding::Vector<
10910                            fidl::encoding::HandleType<
10911                                fidl::Event,
10912                                { fidl::ObjectType::EVENT.into_raw() },
10913                                53251,
10914                            >,
10915                            1,
10916                        >,
10917                        1,
10918                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10919                ),
10920                encoder,
10921                offset + cur_offset,
10922                depth,
10923            )?;
10924
10925            _prev_end_offset = cur_offset + envelope_size;
10926
10927            Ok(())
10928        }
10929    }
10930
10931    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10932        for ArrayOfVectorOfEventInTableWithDefaultRights
10933    {
10934        #[inline(always)]
10935        fn new_empty() -> Self {
10936            Self::default()
10937        }
10938
10939        unsafe fn decode(
10940            &mut self,
10941            decoder: &mut fidl::encoding::Decoder<
10942                '_,
10943                fidl::encoding::DefaultFuchsiaResourceDialect,
10944            >,
10945            offset: usize,
10946            mut depth: fidl::encoding::Depth,
10947        ) -> fidl::Result<()> {
10948            decoder.debug_check_bounds::<Self>(offset);
10949            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10950                None => return Err(fidl::Error::NotNullable),
10951                Some(len) => len,
10952            };
10953            // Calling decoder.out_of_line_offset(0) is not allowed.
10954            if len == 0 {
10955                return Ok(());
10956            };
10957            depth.increment()?;
10958            let envelope_size = 8;
10959            let bytes_len = len * envelope_size;
10960            let offset = decoder.out_of_line_offset(bytes_len)?;
10961            // Decode the envelope for each type.
10962            let mut _next_ordinal_to_read = 0;
10963            let mut next_offset = offset;
10964            let end_offset = offset + bytes_len;
10965            _next_ordinal_to_read += 1;
10966            if next_offset >= end_offset {
10967                return Ok(());
10968            }
10969
10970            // Decode unknown envelopes for gaps in ordinals.
10971            while _next_ordinal_to_read < 1 {
10972                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10973                _next_ordinal_to_read += 1;
10974                next_offset += envelope_size;
10975            }
10976
10977            let next_out_of_line = decoder.next_out_of_line();
10978            let handles_before = decoder.remaining_handles();
10979            if let Some((inlined, num_bytes, num_handles)) =
10980                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10981            {
10982                let member_inline_size = <fidl::encoding::Array<
10983                    fidl::encoding::Vector<
10984                        fidl::encoding::HandleType<
10985                            fidl::Event,
10986                            { fidl::ObjectType::EVENT.into_raw() },
10987                            53251,
10988                        >,
10989                        1,
10990                    >,
10991                    1,
10992                > as fidl::encoding::TypeMarker>::inline_size(
10993                    decoder.context
10994                );
10995                if inlined != (member_inline_size <= 4) {
10996                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10997                }
10998                let inner_offset;
10999                let mut inner_depth = depth.clone();
11000                if inlined {
11001                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11002                    inner_offset = next_offset;
11003                } else {
11004                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11005                    inner_depth.increment()?;
11006                }
11007                let val_ref = self.h.get_or_insert_with(|| {
11008                    fidl::new_empty!(
11009                        fidl::encoding::Array<
11010                            fidl::encoding::Vector<
11011                                fidl::encoding::HandleType<
11012                                    fidl::Event,
11013                                    { fidl::ObjectType::EVENT.into_raw() },
11014                                    53251,
11015                                >,
11016                                1,
11017                            >,
11018                            1,
11019                        >,
11020                        fidl::encoding::DefaultFuchsiaResourceDialect
11021                    )
11022                });
11023                fidl::decode!(
11024                    fidl::encoding::Array<
11025                        fidl::encoding::Vector<
11026                            fidl::encoding::HandleType<
11027                                fidl::Event,
11028                                { fidl::ObjectType::EVENT.into_raw() },
11029                                53251,
11030                            >,
11031                            1,
11032                        >,
11033                        1,
11034                    >,
11035                    fidl::encoding::DefaultFuchsiaResourceDialect,
11036                    val_ref,
11037                    decoder,
11038                    inner_offset,
11039                    inner_depth
11040                )?;
11041                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11042                {
11043                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11044                }
11045                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11046                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11047                }
11048            }
11049
11050            next_offset += envelope_size;
11051
11052            // Decode the remaining unknown envelopes.
11053            while next_offset < end_offset {
11054                _next_ordinal_to_read += 1;
11055                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11056                next_offset += envelope_size;
11057            }
11058
11059            Ok(())
11060        }
11061    }
11062
11063    impl ArrayOfVectorOfEventInTableWithReducedRights {
11064        #[inline(always)]
11065        fn max_ordinal_present(&self) -> u64 {
11066            if let Some(_) = self.h {
11067                return 1;
11068            }
11069            0
11070        }
11071    }
11072
11073    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11074        type Borrowed<'a> = &'a mut Self;
11075        fn take_or_borrow<'a>(
11076            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11077        ) -> Self::Borrowed<'a> {
11078            value
11079        }
11080    }
11081
11082    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11083        type Owned = Self;
11084
11085        #[inline(always)]
11086        fn inline_align(_context: fidl::encoding::Context) -> usize {
11087            8
11088        }
11089
11090        #[inline(always)]
11091        fn inline_size(_context: fidl::encoding::Context) -> usize {
11092            16
11093        }
11094    }
11095
11096    unsafe impl
11097        fidl::encoding::Encode<
11098            ArrayOfVectorOfEventInTableWithReducedRights,
11099            fidl::encoding::DefaultFuchsiaResourceDialect,
11100        > for &mut ArrayOfVectorOfEventInTableWithReducedRights
11101    {
11102        unsafe fn encode(
11103            self,
11104            encoder: &mut fidl::encoding::Encoder<
11105                '_,
11106                fidl::encoding::DefaultFuchsiaResourceDialect,
11107            >,
11108            offset: usize,
11109            mut depth: fidl::encoding::Depth,
11110        ) -> fidl::Result<()> {
11111            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRights>(offset);
11112            // Vector header
11113            let max_ordinal: u64 = self.max_ordinal_present();
11114            encoder.write_num(max_ordinal, offset);
11115            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11116            // Calling encoder.out_of_line_offset(0) is not allowed.
11117            if max_ordinal == 0 {
11118                return Ok(());
11119            }
11120            depth.increment()?;
11121            let envelope_size = 8;
11122            let bytes_len = max_ordinal as usize * envelope_size;
11123            #[allow(unused_variables)]
11124            let offset = encoder.out_of_line_offset(bytes_len);
11125            let mut _prev_end_offset: usize = 0;
11126            if 1 > max_ordinal {
11127                return Ok(());
11128            }
11129
11130            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11131            // are envelope_size bytes.
11132            let cur_offset: usize = (1 - 1) * envelope_size;
11133
11134            // Zero reserved fields.
11135            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11136
11137            // Safety:
11138            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11139            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11140            //   envelope_size bytes, there is always sufficient room.
11141            fidl::encoding::encode_in_envelope_optional::<
11142                fidl::encoding::Array<
11143                    fidl::encoding::Vector<
11144                        fidl::encoding::HandleType<
11145                            fidl::Event,
11146                            { fidl::ObjectType::EVENT.into_raw() },
11147                            49155,
11148                        >,
11149                        1,
11150                    >,
11151                    1,
11152                >,
11153                fidl::encoding::DefaultFuchsiaResourceDialect,
11154            >(
11155                self.h.as_mut().map(
11156                    <fidl::encoding::Array<
11157                        fidl::encoding::Vector<
11158                            fidl::encoding::HandleType<
11159                                fidl::Event,
11160                                { fidl::ObjectType::EVENT.into_raw() },
11161                                49155,
11162                            >,
11163                            1,
11164                        >,
11165                        1,
11166                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11167                ),
11168                encoder,
11169                offset + cur_offset,
11170                depth,
11171            )?;
11172
11173            _prev_end_offset = cur_offset + envelope_size;
11174
11175            Ok(())
11176        }
11177    }
11178
11179    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11180        for ArrayOfVectorOfEventInTableWithReducedRights
11181    {
11182        #[inline(always)]
11183        fn new_empty() -> Self {
11184            Self::default()
11185        }
11186
11187        unsafe fn decode(
11188            &mut self,
11189            decoder: &mut fidl::encoding::Decoder<
11190                '_,
11191                fidl::encoding::DefaultFuchsiaResourceDialect,
11192            >,
11193            offset: usize,
11194            mut depth: fidl::encoding::Depth,
11195        ) -> fidl::Result<()> {
11196            decoder.debug_check_bounds::<Self>(offset);
11197            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11198                None => return Err(fidl::Error::NotNullable),
11199                Some(len) => len,
11200            };
11201            // Calling decoder.out_of_line_offset(0) is not allowed.
11202            if len == 0 {
11203                return Ok(());
11204            };
11205            depth.increment()?;
11206            let envelope_size = 8;
11207            let bytes_len = len * envelope_size;
11208            let offset = decoder.out_of_line_offset(bytes_len)?;
11209            // Decode the envelope for each type.
11210            let mut _next_ordinal_to_read = 0;
11211            let mut next_offset = offset;
11212            let end_offset = offset + bytes_len;
11213            _next_ordinal_to_read += 1;
11214            if next_offset >= end_offset {
11215                return Ok(());
11216            }
11217
11218            // Decode unknown envelopes for gaps in ordinals.
11219            while _next_ordinal_to_read < 1 {
11220                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11221                _next_ordinal_to_read += 1;
11222                next_offset += envelope_size;
11223            }
11224
11225            let next_out_of_line = decoder.next_out_of_line();
11226            let handles_before = decoder.remaining_handles();
11227            if let Some((inlined, num_bytes, num_handles)) =
11228                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11229            {
11230                let member_inline_size = <fidl::encoding::Array<
11231                    fidl::encoding::Vector<
11232                        fidl::encoding::HandleType<
11233                            fidl::Event,
11234                            { fidl::ObjectType::EVENT.into_raw() },
11235                            49155,
11236                        >,
11237                        1,
11238                    >,
11239                    1,
11240                > as fidl::encoding::TypeMarker>::inline_size(
11241                    decoder.context
11242                );
11243                if inlined != (member_inline_size <= 4) {
11244                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11245                }
11246                let inner_offset;
11247                let mut inner_depth = depth.clone();
11248                if inlined {
11249                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11250                    inner_offset = next_offset;
11251                } else {
11252                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11253                    inner_depth.increment()?;
11254                }
11255                let val_ref = self.h.get_or_insert_with(|| {
11256                    fidl::new_empty!(
11257                        fidl::encoding::Array<
11258                            fidl::encoding::Vector<
11259                                fidl::encoding::HandleType<
11260                                    fidl::Event,
11261                                    { fidl::ObjectType::EVENT.into_raw() },
11262                                    49155,
11263                                >,
11264                                1,
11265                            >,
11266                            1,
11267                        >,
11268                        fidl::encoding::DefaultFuchsiaResourceDialect
11269                    )
11270                });
11271                fidl::decode!(
11272                    fidl::encoding::Array<
11273                        fidl::encoding::Vector<
11274                            fidl::encoding::HandleType<
11275                                fidl::Event,
11276                                { fidl::ObjectType::EVENT.into_raw() },
11277                                49155,
11278                            >,
11279                            1,
11280                        >,
11281                        1,
11282                    >,
11283                    fidl::encoding::DefaultFuchsiaResourceDialect,
11284                    val_ref,
11285                    decoder,
11286                    inner_offset,
11287                    inner_depth
11288                )?;
11289                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11290                {
11291                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11292                }
11293                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11294                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11295                }
11296            }
11297
11298            next_offset += envelope_size;
11299
11300            // Decode the remaining unknown envelopes.
11301            while next_offset < end_offset {
11302                _next_ordinal_to_read += 1;
11303                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11304                next_offset += envelope_size;
11305            }
11306
11307            Ok(())
11308        }
11309    }
11310
11311    impl EmptyResourceTable {
11312        #[inline(always)]
11313        fn max_ordinal_present(&self) -> u64 {
11314            0
11315        }
11316    }
11317
11318    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTable {
11319        type Borrowed<'a> = &'a mut Self;
11320        fn take_or_borrow<'a>(
11321            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11322        ) -> Self::Borrowed<'a> {
11323            value
11324        }
11325    }
11326
11327    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTable {
11328        type Owned = Self;
11329
11330        #[inline(always)]
11331        fn inline_align(_context: fidl::encoding::Context) -> usize {
11332            8
11333        }
11334
11335        #[inline(always)]
11336        fn inline_size(_context: fidl::encoding::Context) -> usize {
11337            16
11338        }
11339    }
11340
11341    unsafe impl
11342        fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11343        for &mut EmptyResourceTable
11344    {
11345        unsafe fn encode(
11346            self,
11347            encoder: &mut fidl::encoding::Encoder<
11348                '_,
11349                fidl::encoding::DefaultFuchsiaResourceDialect,
11350            >,
11351            offset: usize,
11352            mut depth: fidl::encoding::Depth,
11353        ) -> fidl::Result<()> {
11354            encoder.debug_check_bounds::<EmptyResourceTable>(offset);
11355            // Vector header
11356            let max_ordinal: u64 = self.max_ordinal_present();
11357            encoder.write_num(max_ordinal, offset);
11358            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11359            // Calling encoder.out_of_line_offset(0) is not allowed.
11360            if max_ordinal == 0 {
11361                return Ok(());
11362            }
11363            depth.increment()?;
11364            let envelope_size = 8;
11365            let bytes_len = max_ordinal as usize * envelope_size;
11366            #[allow(unused_variables)]
11367            let offset = encoder.out_of_line_offset(bytes_len);
11368            let mut _prev_end_offset: usize = 0;
11369
11370            Ok(())
11371        }
11372    }
11373
11374    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11375        for EmptyResourceTable
11376    {
11377        #[inline(always)]
11378        fn new_empty() -> Self {
11379            Self::default()
11380        }
11381
11382        unsafe fn decode(
11383            &mut self,
11384            decoder: &mut fidl::encoding::Decoder<
11385                '_,
11386                fidl::encoding::DefaultFuchsiaResourceDialect,
11387            >,
11388            offset: usize,
11389            mut depth: fidl::encoding::Depth,
11390        ) -> fidl::Result<()> {
11391            decoder.debug_check_bounds::<Self>(offset);
11392            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11393                None => return Err(fidl::Error::NotNullable),
11394                Some(len) => len,
11395            };
11396            // Calling decoder.out_of_line_offset(0) is not allowed.
11397            if len == 0 {
11398                return Ok(());
11399            };
11400            depth.increment()?;
11401            let envelope_size = 8;
11402            let bytes_len = len * envelope_size;
11403            let offset = decoder.out_of_line_offset(bytes_len)?;
11404            // Decode the envelope for each type.
11405            let mut _next_ordinal_to_read = 0;
11406            let mut next_offset = offset;
11407            let end_offset = offset + bytes_len;
11408
11409            // Decode the remaining unknown envelopes.
11410            while next_offset < end_offset {
11411                _next_ordinal_to_read += 1;
11412                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11413                next_offset += envelope_size;
11414            }
11415
11416            Ok(())
11417        }
11418    }
11419
11420    impl SimpleResourceTable {
11421        #[inline(always)]
11422        fn max_ordinal_present(&self) -> u64 {
11423            if let Some(_) = self.y {
11424                return 5;
11425            }
11426            if let Some(_) = self.x {
11427                return 1;
11428            }
11429            0
11430        }
11431    }
11432
11433    impl fidl::encoding::ResourceTypeMarker for SimpleResourceTable {
11434        type Borrowed<'a> = &'a mut Self;
11435        fn take_or_borrow<'a>(
11436            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11437        ) -> Self::Borrowed<'a> {
11438            value
11439        }
11440    }
11441
11442    unsafe impl fidl::encoding::TypeMarker for SimpleResourceTable {
11443        type Owned = Self;
11444
11445        #[inline(always)]
11446        fn inline_align(_context: fidl::encoding::Context) -> usize {
11447            8
11448        }
11449
11450        #[inline(always)]
11451        fn inline_size(_context: fidl::encoding::Context) -> usize {
11452            16
11453        }
11454    }
11455
11456    unsafe impl
11457        fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11458        for &mut SimpleResourceTable
11459    {
11460        unsafe fn encode(
11461            self,
11462            encoder: &mut fidl::encoding::Encoder<
11463                '_,
11464                fidl::encoding::DefaultFuchsiaResourceDialect,
11465            >,
11466            offset: usize,
11467            mut depth: fidl::encoding::Depth,
11468        ) -> fidl::Result<()> {
11469            encoder.debug_check_bounds::<SimpleResourceTable>(offset);
11470            // Vector header
11471            let max_ordinal: u64 = self.max_ordinal_present();
11472            encoder.write_num(max_ordinal, offset);
11473            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11474            // Calling encoder.out_of_line_offset(0) is not allowed.
11475            if max_ordinal == 0 {
11476                return Ok(());
11477            }
11478            depth.increment()?;
11479            let envelope_size = 8;
11480            let bytes_len = max_ordinal as usize * envelope_size;
11481            #[allow(unused_variables)]
11482            let offset = encoder.out_of_line_offset(bytes_len);
11483            let mut _prev_end_offset: usize = 0;
11484            if 1 > max_ordinal {
11485                return Ok(());
11486            }
11487
11488            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11489            // are envelope_size bytes.
11490            let cur_offset: usize = (1 - 1) * envelope_size;
11491
11492            // Zero reserved fields.
11493            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11494
11495            // Safety:
11496            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11497            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11498            //   envelope_size bytes, there is always sufficient room.
11499            fidl::encoding::encode_in_envelope_optional::<
11500                i64,
11501                fidl::encoding::DefaultFuchsiaResourceDialect,
11502            >(
11503                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11504                encoder,
11505                offset + cur_offset,
11506                depth,
11507            )?;
11508
11509            _prev_end_offset = cur_offset + envelope_size;
11510            if 5 > max_ordinal {
11511                return Ok(());
11512            }
11513
11514            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11515            // are envelope_size bytes.
11516            let cur_offset: usize = (5 - 1) * envelope_size;
11517
11518            // Zero reserved fields.
11519            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11520
11521            // Safety:
11522            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11523            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11524            //   envelope_size bytes, there is always sufficient room.
11525            fidl::encoding::encode_in_envelope_optional::<
11526                i64,
11527                fidl::encoding::DefaultFuchsiaResourceDialect,
11528            >(
11529                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11530                encoder,
11531                offset + cur_offset,
11532                depth,
11533            )?;
11534
11535            _prev_end_offset = cur_offset + envelope_size;
11536
11537            Ok(())
11538        }
11539    }
11540
11541    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11542        for SimpleResourceTable
11543    {
11544        #[inline(always)]
11545        fn new_empty() -> Self {
11546            Self::default()
11547        }
11548
11549        unsafe fn decode(
11550            &mut self,
11551            decoder: &mut fidl::encoding::Decoder<
11552                '_,
11553                fidl::encoding::DefaultFuchsiaResourceDialect,
11554            >,
11555            offset: usize,
11556            mut depth: fidl::encoding::Depth,
11557        ) -> fidl::Result<()> {
11558            decoder.debug_check_bounds::<Self>(offset);
11559            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11560                None => return Err(fidl::Error::NotNullable),
11561                Some(len) => len,
11562            };
11563            // Calling decoder.out_of_line_offset(0) is not allowed.
11564            if len == 0 {
11565                return Ok(());
11566            };
11567            depth.increment()?;
11568            let envelope_size = 8;
11569            let bytes_len = len * envelope_size;
11570            let offset = decoder.out_of_line_offset(bytes_len)?;
11571            // Decode the envelope for each type.
11572            let mut _next_ordinal_to_read = 0;
11573            let mut next_offset = offset;
11574            let end_offset = offset + bytes_len;
11575            _next_ordinal_to_read += 1;
11576            if next_offset >= end_offset {
11577                return Ok(());
11578            }
11579
11580            // Decode unknown envelopes for gaps in ordinals.
11581            while _next_ordinal_to_read < 1 {
11582                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11583                _next_ordinal_to_read += 1;
11584                next_offset += envelope_size;
11585            }
11586
11587            let next_out_of_line = decoder.next_out_of_line();
11588            let handles_before = decoder.remaining_handles();
11589            if let Some((inlined, num_bytes, num_handles)) =
11590                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11591            {
11592                let member_inline_size =
11593                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11594                if inlined != (member_inline_size <= 4) {
11595                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11596                }
11597                let inner_offset;
11598                let mut inner_depth = depth.clone();
11599                if inlined {
11600                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11601                    inner_offset = next_offset;
11602                } else {
11603                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11604                    inner_depth.increment()?;
11605                }
11606                let val_ref = self.x.get_or_insert_with(|| {
11607                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11608                });
11609                fidl::decode!(
11610                    i64,
11611                    fidl::encoding::DefaultFuchsiaResourceDialect,
11612                    val_ref,
11613                    decoder,
11614                    inner_offset,
11615                    inner_depth
11616                )?;
11617                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11618                {
11619                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11620                }
11621                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11622                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11623                }
11624            }
11625
11626            next_offset += envelope_size;
11627            _next_ordinal_to_read += 1;
11628            if next_offset >= end_offset {
11629                return Ok(());
11630            }
11631
11632            // Decode unknown envelopes for gaps in ordinals.
11633            while _next_ordinal_to_read < 5 {
11634                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11635                _next_ordinal_to_read += 1;
11636                next_offset += envelope_size;
11637            }
11638
11639            let next_out_of_line = decoder.next_out_of_line();
11640            let handles_before = decoder.remaining_handles();
11641            if let Some((inlined, num_bytes, num_handles)) =
11642                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11643            {
11644                let member_inline_size =
11645                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11646                if inlined != (member_inline_size <= 4) {
11647                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11648                }
11649                let inner_offset;
11650                let mut inner_depth = depth.clone();
11651                if inlined {
11652                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11653                    inner_offset = next_offset;
11654                } else {
11655                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11656                    inner_depth.increment()?;
11657                }
11658                let val_ref = self.y.get_or_insert_with(|| {
11659                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11660                });
11661                fidl::decode!(
11662                    i64,
11663                    fidl::encoding::DefaultFuchsiaResourceDialect,
11664                    val_ref,
11665                    decoder,
11666                    inner_offset,
11667                    inner_depth
11668                )?;
11669                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11670                {
11671                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11672                }
11673                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11674                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11675                }
11676            }
11677
11678            next_offset += envelope_size;
11679
11680            // Decode the remaining unknown envelopes.
11681            while next_offset < end_offset {
11682                _next_ordinal_to_read += 1;
11683                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11684                next_offset += envelope_size;
11685            }
11686
11687            Ok(())
11688        }
11689    }
11690
11691    impl TableFieldInlinedHandle {
11692        #[inline(always)]
11693        fn max_ordinal_present(&self) -> u64 {
11694            if let Some(_) = self.f {
11695                return 1;
11696            }
11697            0
11698        }
11699    }
11700
11701    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandle {
11702        type Borrowed<'a> = &'a mut Self;
11703        fn take_or_borrow<'a>(
11704            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11705        ) -> Self::Borrowed<'a> {
11706            value
11707        }
11708    }
11709
11710    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandle {
11711        type Owned = Self;
11712
11713        #[inline(always)]
11714        fn inline_align(_context: fidl::encoding::Context) -> usize {
11715            8
11716        }
11717
11718        #[inline(always)]
11719        fn inline_size(_context: fidl::encoding::Context) -> usize {
11720            16
11721        }
11722    }
11723
11724    unsafe impl
11725        fidl::encoding::Encode<
11726            TableFieldInlinedHandle,
11727            fidl::encoding::DefaultFuchsiaResourceDialect,
11728        > for &mut TableFieldInlinedHandle
11729    {
11730        unsafe fn encode(
11731            self,
11732            encoder: &mut fidl::encoding::Encoder<
11733                '_,
11734                fidl::encoding::DefaultFuchsiaResourceDialect,
11735            >,
11736            offset: usize,
11737            mut depth: fidl::encoding::Depth,
11738        ) -> fidl::Result<()> {
11739            encoder.debug_check_bounds::<TableFieldInlinedHandle>(offset);
11740            // Vector header
11741            let max_ordinal: u64 = self.max_ordinal_present();
11742            encoder.write_num(max_ordinal, offset);
11743            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11744            // Calling encoder.out_of_line_offset(0) is not allowed.
11745            if max_ordinal == 0 {
11746                return Ok(());
11747            }
11748            depth.increment()?;
11749            let envelope_size = 8;
11750            let bytes_len = max_ordinal as usize * envelope_size;
11751            #[allow(unused_variables)]
11752            let offset = encoder.out_of_line_offset(bytes_len);
11753            let mut _prev_end_offset: usize = 0;
11754            if 1 > max_ordinal {
11755                return Ok(());
11756            }
11757
11758            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11759            // are envelope_size bytes.
11760            let cur_offset: usize = (1 - 1) * envelope_size;
11761
11762            // Zero reserved fields.
11763            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11764
11765            // Safety:
11766            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11767            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11768            //   envelope_size bytes, there is always sufficient room.
11769            fidl::encoding::encode_in_envelope_optional::<
11770                fidl::encoding::HandleType<
11771                    fidl::Channel,
11772                    { fidl::ObjectType::CHANNEL.into_raw() },
11773                    2147483648,
11774                >,
11775                fidl::encoding::DefaultFuchsiaResourceDialect,
11776            >(
11777                self.f.as_mut().map(
11778                    <fidl::encoding::HandleType<
11779                        fidl::Channel,
11780                        { fidl::ObjectType::CHANNEL.into_raw() },
11781                        2147483648,
11782                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11783                ),
11784                encoder,
11785                offset + cur_offset,
11786                depth,
11787            )?;
11788
11789            _prev_end_offset = cur_offset + envelope_size;
11790
11791            Ok(())
11792        }
11793    }
11794
11795    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11796        for TableFieldInlinedHandle
11797    {
11798        #[inline(always)]
11799        fn new_empty() -> Self {
11800            Self::default()
11801        }
11802
11803        unsafe fn decode(
11804            &mut self,
11805            decoder: &mut fidl::encoding::Decoder<
11806                '_,
11807                fidl::encoding::DefaultFuchsiaResourceDialect,
11808            >,
11809            offset: usize,
11810            mut depth: fidl::encoding::Depth,
11811        ) -> fidl::Result<()> {
11812            decoder.debug_check_bounds::<Self>(offset);
11813            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11814                None => return Err(fidl::Error::NotNullable),
11815                Some(len) => len,
11816            };
11817            // Calling decoder.out_of_line_offset(0) is not allowed.
11818            if len == 0 {
11819                return Ok(());
11820            };
11821            depth.increment()?;
11822            let envelope_size = 8;
11823            let bytes_len = len * envelope_size;
11824            let offset = decoder.out_of_line_offset(bytes_len)?;
11825            // Decode the envelope for each type.
11826            let mut _next_ordinal_to_read = 0;
11827            let mut next_offset = offset;
11828            let end_offset = offset + bytes_len;
11829            _next_ordinal_to_read += 1;
11830            if next_offset >= end_offset {
11831                return Ok(());
11832            }
11833
11834            // Decode unknown envelopes for gaps in ordinals.
11835            while _next_ordinal_to_read < 1 {
11836                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11837                _next_ordinal_to_read += 1;
11838                next_offset += envelope_size;
11839            }
11840
11841            let next_out_of_line = decoder.next_out_of_line();
11842            let handles_before = decoder.remaining_handles();
11843            if let Some((inlined, num_bytes, num_handles)) =
11844                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11845            {
11846                let member_inline_size = <fidl::encoding::HandleType<
11847                    fidl::Channel,
11848                    { fidl::ObjectType::CHANNEL.into_raw() },
11849                    2147483648,
11850                > as fidl::encoding::TypeMarker>::inline_size(
11851                    decoder.context
11852                );
11853                if inlined != (member_inline_size <= 4) {
11854                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11855                }
11856                let inner_offset;
11857                let mut inner_depth = depth.clone();
11858                if inlined {
11859                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11860                    inner_offset = next_offset;
11861                } else {
11862                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11863                    inner_depth.increment()?;
11864                }
11865                let val_ref =
11866                self.f.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
11867                fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11868                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11869                {
11870                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11871                }
11872                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11873                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11874                }
11875            }
11876
11877            next_offset += envelope_size;
11878
11879            // Decode the remaining unknown envelopes.
11880            while next_offset < end_offset {
11881                _next_ordinal_to_read += 1;
11882                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11883                next_offset += envelope_size;
11884            }
11885
11886            Ok(())
11887        }
11888    }
11889
11890    impl TableFieldUnknownResource {
11891        #[inline(always)]
11892        fn max_ordinal_present(&self) -> u64 {
11893            0
11894        }
11895    }
11896
11897    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResource {
11898        type Borrowed<'a> = &'a mut Self;
11899        fn take_or_borrow<'a>(
11900            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11901        ) -> Self::Borrowed<'a> {
11902            value
11903        }
11904    }
11905
11906    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResource {
11907        type Owned = Self;
11908
11909        #[inline(always)]
11910        fn inline_align(_context: fidl::encoding::Context) -> usize {
11911            8
11912        }
11913
11914        #[inline(always)]
11915        fn inline_size(_context: fidl::encoding::Context) -> usize {
11916            16
11917        }
11918    }
11919
11920    unsafe impl
11921        fidl::encoding::Encode<
11922            TableFieldUnknownResource,
11923            fidl::encoding::DefaultFuchsiaResourceDialect,
11924        > for &mut TableFieldUnknownResource
11925    {
11926        unsafe fn encode(
11927            self,
11928            encoder: &mut fidl::encoding::Encoder<
11929                '_,
11930                fidl::encoding::DefaultFuchsiaResourceDialect,
11931            >,
11932            offset: usize,
11933            mut depth: fidl::encoding::Depth,
11934        ) -> fidl::Result<()> {
11935            encoder.debug_check_bounds::<TableFieldUnknownResource>(offset);
11936            // Vector header
11937            let max_ordinal: u64 = self.max_ordinal_present();
11938            encoder.write_num(max_ordinal, offset);
11939            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11940            // Calling encoder.out_of_line_offset(0) is not allowed.
11941            if max_ordinal == 0 {
11942                return Ok(());
11943            }
11944            depth.increment()?;
11945            let envelope_size = 8;
11946            let bytes_len = max_ordinal as usize * envelope_size;
11947            #[allow(unused_variables)]
11948            let offset = encoder.out_of_line_offset(bytes_len);
11949            let mut _prev_end_offset: usize = 0;
11950
11951            Ok(())
11952        }
11953    }
11954
11955    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11956        for TableFieldUnknownResource
11957    {
11958        #[inline(always)]
11959        fn new_empty() -> Self {
11960            Self::default()
11961        }
11962
11963        unsafe fn decode(
11964            &mut self,
11965            decoder: &mut fidl::encoding::Decoder<
11966                '_,
11967                fidl::encoding::DefaultFuchsiaResourceDialect,
11968            >,
11969            offset: usize,
11970            mut depth: fidl::encoding::Depth,
11971        ) -> fidl::Result<()> {
11972            decoder.debug_check_bounds::<Self>(offset);
11973            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11974                None => return Err(fidl::Error::NotNullable),
11975                Some(len) => len,
11976            };
11977            // Calling decoder.out_of_line_offset(0) is not allowed.
11978            if len == 0 {
11979                return Ok(());
11980            };
11981            depth.increment()?;
11982            let envelope_size = 8;
11983            let bytes_len = len * envelope_size;
11984            let offset = decoder.out_of_line_offset(bytes_len)?;
11985            // Decode the envelope for each type.
11986            let mut _next_ordinal_to_read = 0;
11987            let mut next_offset = offset;
11988            let end_offset = offset + bytes_len;
11989
11990            // Decode the remaining unknown envelopes.
11991            while next_offset < end_offset {
11992                _next_ordinal_to_read += 1;
11993                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11994                next_offset += envelope_size;
11995            }
11996
11997            Ok(())
11998        }
11999    }
12000
12001    impl TableOfEndpointsTable {
12002        #[inline(always)]
12003        fn max_ordinal_present(&self) -> u64 {
12004            if let Some(_) = self.server_end {
12005                return 2;
12006            }
12007            if let Some(_) = self.client_end {
12008                return 1;
12009            }
12010            0
12011        }
12012    }
12013
12014    impl fidl::encoding::ResourceTypeMarker for TableOfEndpointsTable {
12015        type Borrowed<'a> = &'a mut Self;
12016        fn take_or_borrow<'a>(
12017            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12018        ) -> Self::Borrowed<'a> {
12019            value
12020        }
12021    }
12022
12023    unsafe impl fidl::encoding::TypeMarker for TableOfEndpointsTable {
12024        type Owned = Self;
12025
12026        #[inline(always)]
12027        fn inline_align(_context: fidl::encoding::Context) -> usize {
12028            8
12029        }
12030
12031        #[inline(always)]
12032        fn inline_size(_context: fidl::encoding::Context) -> usize {
12033            16
12034        }
12035    }
12036
12037    unsafe impl
12038        fidl::encoding::Encode<TableOfEndpointsTable, fidl::encoding::DefaultFuchsiaResourceDialect>
12039        for &mut TableOfEndpointsTable
12040    {
12041        unsafe fn encode(
12042            self,
12043            encoder: &mut fidl::encoding::Encoder<
12044                '_,
12045                fidl::encoding::DefaultFuchsiaResourceDialect,
12046            >,
12047            offset: usize,
12048            mut depth: fidl::encoding::Depth,
12049        ) -> fidl::Result<()> {
12050            encoder.debug_check_bounds::<TableOfEndpointsTable>(offset);
12051            // Vector header
12052            let max_ordinal: u64 = self.max_ordinal_present();
12053            encoder.write_num(max_ordinal, offset);
12054            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12055            // Calling encoder.out_of_line_offset(0) is not allowed.
12056            if max_ordinal == 0 {
12057                return Ok(());
12058            }
12059            depth.increment()?;
12060            let envelope_size = 8;
12061            let bytes_len = max_ordinal as usize * envelope_size;
12062            #[allow(unused_variables)]
12063            let offset = encoder.out_of_line_offset(bytes_len);
12064            let mut _prev_end_offset: usize = 0;
12065            if 1 > max_ordinal {
12066                return Ok(());
12067            }
12068
12069            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12070            // are envelope_size bytes.
12071            let cur_offset: usize = (1 - 1) * envelope_size;
12072
12073            // Zero reserved fields.
12074            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12075
12076            // Safety:
12077            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12078            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12079            //   envelope_size bytes, there is always sufficient room.
12080            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12081            self.client_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12082            encoder, offset + cur_offset, depth
12083        )?;
12084
12085            _prev_end_offset = cur_offset + envelope_size;
12086            if 2 > max_ordinal {
12087                return Ok(());
12088            }
12089
12090            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12091            // are envelope_size bytes.
12092            let cur_offset: usize = (2 - 1) * envelope_size;
12093
12094            // Zero reserved fields.
12095            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12096
12097            // Safety:
12098            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12099            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12100            //   envelope_size bytes, there is always sufficient room.
12101            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12102            self.server_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12103            encoder, offset + cur_offset, depth
12104        )?;
12105
12106            _prev_end_offset = cur_offset + envelope_size;
12107
12108            Ok(())
12109        }
12110    }
12111
12112    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12113        for TableOfEndpointsTable
12114    {
12115        #[inline(always)]
12116        fn new_empty() -> Self {
12117            Self::default()
12118        }
12119
12120        unsafe fn decode(
12121            &mut self,
12122            decoder: &mut fidl::encoding::Decoder<
12123                '_,
12124                fidl::encoding::DefaultFuchsiaResourceDialect,
12125            >,
12126            offset: usize,
12127            mut depth: fidl::encoding::Depth,
12128        ) -> fidl::Result<()> {
12129            decoder.debug_check_bounds::<Self>(offset);
12130            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12131                None => return Err(fidl::Error::NotNullable),
12132                Some(len) => len,
12133            };
12134            // Calling decoder.out_of_line_offset(0) is not allowed.
12135            if len == 0 {
12136                return Ok(());
12137            };
12138            depth.increment()?;
12139            let envelope_size = 8;
12140            let bytes_len = len * envelope_size;
12141            let offset = decoder.out_of_line_offset(bytes_len)?;
12142            // Decode the envelope for each type.
12143            let mut _next_ordinal_to_read = 0;
12144            let mut next_offset = offset;
12145            let end_offset = offset + bytes_len;
12146            _next_ordinal_to_read += 1;
12147            if next_offset >= end_offset {
12148                return Ok(());
12149            }
12150
12151            // Decode unknown envelopes for gaps in ordinals.
12152            while _next_ordinal_to_read < 1 {
12153                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12154                _next_ordinal_to_read += 1;
12155                next_offset += envelope_size;
12156            }
12157
12158            let next_out_of_line = decoder.next_out_of_line();
12159            let handles_before = decoder.remaining_handles();
12160            if let Some((inlined, num_bytes, num_handles)) =
12161                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12162            {
12163                let member_inline_size = <fidl::encoding::Endpoint<
12164                    fidl::endpoints::ClientEnd<ProtocolMarker>,
12165                > as fidl::encoding::TypeMarker>::inline_size(
12166                    decoder.context
12167                );
12168                if inlined != (member_inline_size <= 4) {
12169                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12170                }
12171                let inner_offset;
12172                let mut inner_depth = depth.clone();
12173                if inlined {
12174                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12175                    inner_offset = next_offset;
12176                } else {
12177                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12178                    inner_depth.increment()?;
12179                }
12180                let val_ref = self.client_end.get_or_insert_with(|| {
12181                    fidl::new_empty!(
12182                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12183                        fidl::encoding::DefaultFuchsiaResourceDialect
12184                    )
12185                });
12186                fidl::decode!(
12187                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12188                    fidl::encoding::DefaultFuchsiaResourceDialect,
12189                    val_ref,
12190                    decoder,
12191                    inner_offset,
12192                    inner_depth
12193                )?;
12194                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12195                {
12196                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12197                }
12198                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12199                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12200                }
12201            }
12202
12203            next_offset += envelope_size;
12204            _next_ordinal_to_read += 1;
12205            if next_offset >= end_offset {
12206                return Ok(());
12207            }
12208
12209            // Decode unknown envelopes for gaps in ordinals.
12210            while _next_ordinal_to_read < 2 {
12211                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12212                _next_ordinal_to_read += 1;
12213                next_offset += envelope_size;
12214            }
12215
12216            let next_out_of_line = decoder.next_out_of_line();
12217            let handles_before = decoder.remaining_handles();
12218            if let Some((inlined, num_bytes, num_handles)) =
12219                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12220            {
12221                let member_inline_size = <fidl::encoding::Endpoint<
12222                    fidl::endpoints::ServerEnd<ProtocolMarker>,
12223                > as fidl::encoding::TypeMarker>::inline_size(
12224                    decoder.context
12225                );
12226                if inlined != (member_inline_size <= 4) {
12227                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12228                }
12229                let inner_offset;
12230                let mut inner_depth = depth.clone();
12231                if inlined {
12232                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12233                    inner_offset = next_offset;
12234                } else {
12235                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12236                    inner_depth.increment()?;
12237                }
12238                let val_ref = self.server_end.get_or_insert_with(|| {
12239                    fidl::new_empty!(
12240                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12241                        fidl::encoding::DefaultFuchsiaResourceDialect
12242                    )
12243                });
12244                fidl::decode!(
12245                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12246                    fidl::encoding::DefaultFuchsiaResourceDialect,
12247                    val_ref,
12248                    decoder,
12249                    inner_offset,
12250                    inner_depth
12251                )?;
12252                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12253                {
12254                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12255                }
12256                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12257                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12258                }
12259            }
12260
12261            next_offset += envelope_size;
12262
12263            // Decode the remaining unknown envelopes.
12264            while next_offset < end_offset {
12265                _next_ordinal_to_read += 1;
12266                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12267                next_offset += envelope_size;
12268            }
12269
12270            Ok(())
12271        }
12272    }
12273
12274    impl TableUnionWithVectorReservedSandwich {
12275        #[inline(always)]
12276        fn max_ordinal_present(&self) -> u64 {
12277            if let Some(_) = self.uv {
12278                return 2;
12279            }
12280            0
12281        }
12282    }
12283
12284    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwich {
12285        type Borrowed<'a> = &'a mut Self;
12286        fn take_or_borrow<'a>(
12287            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12288        ) -> Self::Borrowed<'a> {
12289            value
12290        }
12291    }
12292
12293    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwich {
12294        type Owned = Self;
12295
12296        #[inline(always)]
12297        fn inline_align(_context: fidl::encoding::Context) -> usize {
12298            8
12299        }
12300
12301        #[inline(always)]
12302        fn inline_size(_context: fidl::encoding::Context) -> usize {
12303            16
12304        }
12305    }
12306
12307    unsafe impl
12308        fidl::encoding::Encode<
12309            TableUnionWithVectorReservedSandwich,
12310            fidl::encoding::DefaultFuchsiaResourceDialect,
12311        > for &mut TableUnionWithVectorReservedSandwich
12312    {
12313        unsafe fn encode(
12314            self,
12315            encoder: &mut fidl::encoding::Encoder<
12316                '_,
12317                fidl::encoding::DefaultFuchsiaResourceDialect,
12318            >,
12319            offset: usize,
12320            mut depth: fidl::encoding::Depth,
12321        ) -> fidl::Result<()> {
12322            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwich>(offset);
12323            // Vector header
12324            let max_ordinal: u64 = self.max_ordinal_present();
12325            encoder.write_num(max_ordinal, offset);
12326            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12327            // Calling encoder.out_of_line_offset(0) is not allowed.
12328            if max_ordinal == 0 {
12329                return Ok(());
12330            }
12331            depth.increment()?;
12332            let envelope_size = 8;
12333            let bytes_len = max_ordinal as usize * envelope_size;
12334            #[allow(unused_variables)]
12335            let offset = encoder.out_of_line_offset(bytes_len);
12336            let mut _prev_end_offset: usize = 0;
12337            if 2 > max_ordinal {
12338                return Ok(());
12339            }
12340
12341            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12342            // are envelope_size bytes.
12343            let cur_offset: usize = (2 - 1) * envelope_size;
12344
12345            // Zero reserved fields.
12346            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12347
12348            // Safety:
12349            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12350            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12351            //   envelope_size bytes, there is always sufficient room.
12352            fidl::encoding::encode_in_envelope_optional::<
12353                UnionWithVector,
12354                fidl::encoding::DefaultFuchsiaResourceDialect,
12355            >(
12356                self.uv
12357                    .as_mut()
12358                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12359                encoder,
12360                offset + cur_offset,
12361                depth,
12362            )?;
12363
12364            _prev_end_offset = cur_offset + envelope_size;
12365
12366            Ok(())
12367        }
12368    }
12369
12370    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12371        for TableUnionWithVectorReservedSandwich
12372    {
12373        #[inline(always)]
12374        fn new_empty() -> Self {
12375            Self::default()
12376        }
12377
12378        unsafe fn decode(
12379            &mut self,
12380            decoder: &mut fidl::encoding::Decoder<
12381                '_,
12382                fidl::encoding::DefaultFuchsiaResourceDialect,
12383            >,
12384            offset: usize,
12385            mut depth: fidl::encoding::Depth,
12386        ) -> fidl::Result<()> {
12387            decoder.debug_check_bounds::<Self>(offset);
12388            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12389                None => return Err(fidl::Error::NotNullable),
12390                Some(len) => len,
12391            };
12392            // Calling decoder.out_of_line_offset(0) is not allowed.
12393            if len == 0 {
12394                return Ok(());
12395            };
12396            depth.increment()?;
12397            let envelope_size = 8;
12398            let bytes_len = len * envelope_size;
12399            let offset = decoder.out_of_line_offset(bytes_len)?;
12400            // Decode the envelope for each type.
12401            let mut _next_ordinal_to_read = 0;
12402            let mut next_offset = offset;
12403            let end_offset = offset + bytes_len;
12404            _next_ordinal_to_read += 1;
12405            if next_offset >= end_offset {
12406                return Ok(());
12407            }
12408
12409            // Decode unknown envelopes for gaps in ordinals.
12410            while _next_ordinal_to_read < 2 {
12411                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12412                _next_ordinal_to_read += 1;
12413                next_offset += envelope_size;
12414            }
12415
12416            let next_out_of_line = decoder.next_out_of_line();
12417            let handles_before = decoder.remaining_handles();
12418            if let Some((inlined, num_bytes, num_handles)) =
12419                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12420            {
12421                let member_inline_size =
12422                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12423                if inlined != (member_inline_size <= 4) {
12424                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12425                }
12426                let inner_offset;
12427                let mut inner_depth = depth.clone();
12428                if inlined {
12429                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12430                    inner_offset = next_offset;
12431                } else {
12432                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12433                    inner_depth.increment()?;
12434                }
12435                let val_ref = self.uv.get_or_insert_with(|| {
12436                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12437                });
12438                fidl::decode!(
12439                    UnionWithVector,
12440                    fidl::encoding::DefaultFuchsiaResourceDialect,
12441                    val_ref,
12442                    decoder,
12443                    inner_offset,
12444                    inner_depth
12445                )?;
12446                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12447                {
12448                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12449                }
12450                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12451                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12452                }
12453            }
12454
12455            next_offset += envelope_size;
12456
12457            // Decode the remaining unknown envelopes.
12458            while next_offset < end_offset {
12459                _next_ordinal_to_read += 1;
12460                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12461                next_offset += envelope_size;
12462            }
12463
12464            Ok(())
12465        }
12466    }
12467
12468    impl TableUnionWithVectorStructSandwich {
12469        #[inline(always)]
12470        fn max_ordinal_present(&self) -> u64 {
12471            if let Some(_) = self.s2 {
12472                return 3;
12473            }
12474            if let Some(_) = self.uv {
12475                return 2;
12476            }
12477            if let Some(_) = self.s1 {
12478                return 1;
12479            }
12480            0
12481        }
12482    }
12483
12484    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwich {
12485        type Borrowed<'a> = &'a mut Self;
12486        fn take_or_borrow<'a>(
12487            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12488        ) -> Self::Borrowed<'a> {
12489            value
12490        }
12491    }
12492
12493    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwich {
12494        type Owned = Self;
12495
12496        #[inline(always)]
12497        fn inline_align(_context: fidl::encoding::Context) -> usize {
12498            8
12499        }
12500
12501        #[inline(always)]
12502        fn inline_size(_context: fidl::encoding::Context) -> usize {
12503            16
12504        }
12505    }
12506
12507    unsafe impl
12508        fidl::encoding::Encode<
12509            TableUnionWithVectorStructSandwich,
12510            fidl::encoding::DefaultFuchsiaResourceDialect,
12511        > for &mut TableUnionWithVectorStructSandwich
12512    {
12513        unsafe fn encode(
12514            self,
12515            encoder: &mut fidl::encoding::Encoder<
12516                '_,
12517                fidl::encoding::DefaultFuchsiaResourceDialect,
12518            >,
12519            offset: usize,
12520            mut depth: fidl::encoding::Depth,
12521        ) -> fidl::Result<()> {
12522            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwich>(offset);
12523            // Vector header
12524            let max_ordinal: u64 = self.max_ordinal_present();
12525            encoder.write_num(max_ordinal, offset);
12526            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12527            // Calling encoder.out_of_line_offset(0) is not allowed.
12528            if max_ordinal == 0 {
12529                return Ok(());
12530            }
12531            depth.increment()?;
12532            let envelope_size = 8;
12533            let bytes_len = max_ordinal as usize * envelope_size;
12534            #[allow(unused_variables)]
12535            let offset = encoder.out_of_line_offset(bytes_len);
12536            let mut _prev_end_offset: usize = 0;
12537            if 1 > max_ordinal {
12538                return Ok(());
12539            }
12540
12541            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12542            // are envelope_size bytes.
12543            let cur_offset: usize = (1 - 1) * envelope_size;
12544
12545            // Zero reserved fields.
12546            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12547
12548            // Safety:
12549            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12550            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12551            //   envelope_size bytes, there is always sufficient room.
12552            fidl::encoding::encode_in_envelope_optional::<
12553                StructSize3Align1,
12554                fidl::encoding::DefaultFuchsiaResourceDialect,
12555            >(
12556                self.s1
12557                    .as_ref()
12558                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12559                encoder,
12560                offset + cur_offset,
12561                depth,
12562            )?;
12563
12564            _prev_end_offset = cur_offset + envelope_size;
12565            if 2 > max_ordinal {
12566                return Ok(());
12567            }
12568
12569            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12570            // are envelope_size bytes.
12571            let cur_offset: usize = (2 - 1) * envelope_size;
12572
12573            // Zero reserved fields.
12574            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12575
12576            // Safety:
12577            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12578            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12579            //   envelope_size bytes, there is always sufficient room.
12580            fidl::encoding::encode_in_envelope_optional::<
12581                UnionWithVector,
12582                fidl::encoding::DefaultFuchsiaResourceDialect,
12583            >(
12584                self.uv
12585                    .as_mut()
12586                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12587                encoder,
12588                offset + cur_offset,
12589                depth,
12590            )?;
12591
12592            _prev_end_offset = cur_offset + envelope_size;
12593            if 3 > max_ordinal {
12594                return Ok(());
12595            }
12596
12597            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12598            // are envelope_size bytes.
12599            let cur_offset: usize = (3 - 1) * envelope_size;
12600
12601            // Zero reserved fields.
12602            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12603
12604            // Safety:
12605            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12606            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12607            //   envelope_size bytes, there is always sufficient room.
12608            fidl::encoding::encode_in_envelope_optional::<
12609                StructSize3Align1,
12610                fidl::encoding::DefaultFuchsiaResourceDialect,
12611            >(
12612                self.s2
12613                    .as_ref()
12614                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12615                encoder,
12616                offset + cur_offset,
12617                depth,
12618            )?;
12619
12620            _prev_end_offset = cur_offset + envelope_size;
12621
12622            Ok(())
12623        }
12624    }
12625
12626    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12627        for TableUnionWithVectorStructSandwich
12628    {
12629        #[inline(always)]
12630        fn new_empty() -> Self {
12631            Self::default()
12632        }
12633
12634        unsafe fn decode(
12635            &mut self,
12636            decoder: &mut fidl::encoding::Decoder<
12637                '_,
12638                fidl::encoding::DefaultFuchsiaResourceDialect,
12639            >,
12640            offset: usize,
12641            mut depth: fidl::encoding::Depth,
12642        ) -> fidl::Result<()> {
12643            decoder.debug_check_bounds::<Self>(offset);
12644            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12645                None => return Err(fidl::Error::NotNullable),
12646                Some(len) => len,
12647            };
12648            // Calling decoder.out_of_line_offset(0) is not allowed.
12649            if len == 0 {
12650                return Ok(());
12651            };
12652            depth.increment()?;
12653            let envelope_size = 8;
12654            let bytes_len = len * envelope_size;
12655            let offset = decoder.out_of_line_offset(bytes_len)?;
12656            // Decode the envelope for each type.
12657            let mut _next_ordinal_to_read = 0;
12658            let mut next_offset = offset;
12659            let end_offset = offset + bytes_len;
12660            _next_ordinal_to_read += 1;
12661            if next_offset >= end_offset {
12662                return Ok(());
12663            }
12664
12665            // Decode unknown envelopes for gaps in ordinals.
12666            while _next_ordinal_to_read < 1 {
12667                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12668                _next_ordinal_to_read += 1;
12669                next_offset += envelope_size;
12670            }
12671
12672            let next_out_of_line = decoder.next_out_of_line();
12673            let handles_before = decoder.remaining_handles();
12674            if let Some((inlined, num_bytes, num_handles)) =
12675                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12676            {
12677                let member_inline_size =
12678                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12679                if inlined != (member_inline_size <= 4) {
12680                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12681                }
12682                let inner_offset;
12683                let mut inner_depth = depth.clone();
12684                if inlined {
12685                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12686                    inner_offset = next_offset;
12687                } else {
12688                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12689                    inner_depth.increment()?;
12690                }
12691                let val_ref = self.s1.get_or_insert_with(|| {
12692                    fidl::new_empty!(
12693                        StructSize3Align1,
12694                        fidl::encoding::DefaultFuchsiaResourceDialect
12695                    )
12696                });
12697                fidl::decode!(
12698                    StructSize3Align1,
12699                    fidl::encoding::DefaultFuchsiaResourceDialect,
12700                    val_ref,
12701                    decoder,
12702                    inner_offset,
12703                    inner_depth
12704                )?;
12705                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12706                {
12707                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12708                }
12709                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12710                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12711                }
12712            }
12713
12714            next_offset += envelope_size;
12715            _next_ordinal_to_read += 1;
12716            if next_offset >= end_offset {
12717                return Ok(());
12718            }
12719
12720            // Decode unknown envelopes for gaps in ordinals.
12721            while _next_ordinal_to_read < 2 {
12722                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12723                _next_ordinal_to_read += 1;
12724                next_offset += envelope_size;
12725            }
12726
12727            let next_out_of_line = decoder.next_out_of_line();
12728            let handles_before = decoder.remaining_handles();
12729            if let Some((inlined, num_bytes, num_handles)) =
12730                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12731            {
12732                let member_inline_size =
12733                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12734                if inlined != (member_inline_size <= 4) {
12735                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12736                }
12737                let inner_offset;
12738                let mut inner_depth = depth.clone();
12739                if inlined {
12740                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12741                    inner_offset = next_offset;
12742                } else {
12743                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12744                    inner_depth.increment()?;
12745                }
12746                let val_ref = self.uv.get_or_insert_with(|| {
12747                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12748                });
12749                fidl::decode!(
12750                    UnionWithVector,
12751                    fidl::encoding::DefaultFuchsiaResourceDialect,
12752                    val_ref,
12753                    decoder,
12754                    inner_offset,
12755                    inner_depth
12756                )?;
12757                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12758                {
12759                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12760                }
12761                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12762                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12763                }
12764            }
12765
12766            next_offset += envelope_size;
12767            _next_ordinal_to_read += 1;
12768            if next_offset >= end_offset {
12769                return Ok(());
12770            }
12771
12772            // Decode unknown envelopes for gaps in ordinals.
12773            while _next_ordinal_to_read < 3 {
12774                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12775                _next_ordinal_to_read += 1;
12776                next_offset += envelope_size;
12777            }
12778
12779            let next_out_of_line = decoder.next_out_of_line();
12780            let handles_before = decoder.remaining_handles();
12781            if let Some((inlined, num_bytes, num_handles)) =
12782                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12783            {
12784                let member_inline_size =
12785                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12786                if inlined != (member_inline_size <= 4) {
12787                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12788                }
12789                let inner_offset;
12790                let mut inner_depth = depth.clone();
12791                if inlined {
12792                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12793                    inner_offset = next_offset;
12794                } else {
12795                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12796                    inner_depth.increment()?;
12797                }
12798                let val_ref = self.s2.get_or_insert_with(|| {
12799                    fidl::new_empty!(
12800                        StructSize3Align1,
12801                        fidl::encoding::DefaultFuchsiaResourceDialect
12802                    )
12803                });
12804                fidl::decode!(
12805                    StructSize3Align1,
12806                    fidl::encoding::DefaultFuchsiaResourceDialect,
12807                    val_ref,
12808                    decoder,
12809                    inner_offset,
12810                    inner_depth
12811                )?;
12812                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12813                {
12814                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12815                }
12816                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12817                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12818                }
12819            }
12820
12821            next_offset += envelope_size;
12822
12823            // Decode the remaining unknown envelopes.
12824            while next_offset < end_offset {
12825                _next_ordinal_to_read += 1;
12826                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12827                next_offset += envelope_size;
12828            }
12829
12830            Ok(())
12831        }
12832    }
12833
12834    impl VectorOfArrayOfEventInTableWithReducedRights {
12835        #[inline(always)]
12836        fn max_ordinal_present(&self) -> u64 {
12837            if let Some(_) = self.h {
12838                return 1;
12839            }
12840            0
12841        }
12842    }
12843
12844    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12845        type Borrowed<'a> = &'a mut Self;
12846        fn take_or_borrow<'a>(
12847            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12848        ) -> Self::Borrowed<'a> {
12849            value
12850        }
12851    }
12852
12853    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12854        type Owned = Self;
12855
12856        #[inline(always)]
12857        fn inline_align(_context: fidl::encoding::Context) -> usize {
12858            8
12859        }
12860
12861        #[inline(always)]
12862        fn inline_size(_context: fidl::encoding::Context) -> usize {
12863            16
12864        }
12865    }
12866
12867    unsafe impl
12868        fidl::encoding::Encode<
12869            VectorOfArrayOfEventInTableWithReducedRights,
12870            fidl::encoding::DefaultFuchsiaResourceDialect,
12871        > for &mut VectorOfArrayOfEventInTableWithReducedRights
12872    {
12873        unsafe fn encode(
12874            self,
12875            encoder: &mut fidl::encoding::Encoder<
12876                '_,
12877                fidl::encoding::DefaultFuchsiaResourceDialect,
12878            >,
12879            offset: usize,
12880            mut depth: fidl::encoding::Depth,
12881        ) -> fidl::Result<()> {
12882            encoder.debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRights>(offset);
12883            // Vector header
12884            let max_ordinal: u64 = self.max_ordinal_present();
12885            encoder.write_num(max_ordinal, offset);
12886            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12887            // Calling encoder.out_of_line_offset(0) is not allowed.
12888            if max_ordinal == 0 {
12889                return Ok(());
12890            }
12891            depth.increment()?;
12892            let envelope_size = 8;
12893            let bytes_len = max_ordinal as usize * envelope_size;
12894            #[allow(unused_variables)]
12895            let offset = encoder.out_of_line_offset(bytes_len);
12896            let mut _prev_end_offset: usize = 0;
12897            if 1 > max_ordinal {
12898                return Ok(());
12899            }
12900
12901            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12902            // are envelope_size bytes.
12903            let cur_offset: usize = (1 - 1) * envelope_size;
12904
12905            // Zero reserved fields.
12906            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12907
12908            // Safety:
12909            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12910            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12911            //   envelope_size bytes, there is always sufficient room.
12912            fidl::encoding::encode_in_envelope_optional::<
12913                fidl::encoding::Vector<
12914                    fidl::encoding::Array<
12915                        fidl::encoding::HandleType<
12916                            fidl::Event,
12917                            { fidl::ObjectType::EVENT.into_raw() },
12918                            49155,
12919                        >,
12920                        1,
12921                    >,
12922                    1,
12923                >,
12924                fidl::encoding::DefaultFuchsiaResourceDialect,
12925            >(
12926                self.h.as_mut().map(
12927                    <fidl::encoding::Vector<
12928                        fidl::encoding::Array<
12929                            fidl::encoding::HandleType<
12930                                fidl::Event,
12931                                { fidl::ObjectType::EVENT.into_raw() },
12932                                49155,
12933                            >,
12934                            1,
12935                        >,
12936                        1,
12937                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12938                ),
12939                encoder,
12940                offset + cur_offset,
12941                depth,
12942            )?;
12943
12944            _prev_end_offset = cur_offset + envelope_size;
12945
12946            Ok(())
12947        }
12948    }
12949
12950    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12951        for VectorOfArrayOfEventInTableWithReducedRights
12952    {
12953        #[inline(always)]
12954        fn new_empty() -> Self {
12955            Self::default()
12956        }
12957
12958        unsafe fn decode(
12959            &mut self,
12960            decoder: &mut fidl::encoding::Decoder<
12961                '_,
12962                fidl::encoding::DefaultFuchsiaResourceDialect,
12963            >,
12964            offset: usize,
12965            mut depth: fidl::encoding::Depth,
12966        ) -> fidl::Result<()> {
12967            decoder.debug_check_bounds::<Self>(offset);
12968            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12969                None => return Err(fidl::Error::NotNullable),
12970                Some(len) => len,
12971            };
12972            // Calling decoder.out_of_line_offset(0) is not allowed.
12973            if len == 0 {
12974                return Ok(());
12975            };
12976            depth.increment()?;
12977            let envelope_size = 8;
12978            let bytes_len = len * envelope_size;
12979            let offset = decoder.out_of_line_offset(bytes_len)?;
12980            // Decode the envelope for each type.
12981            let mut _next_ordinal_to_read = 0;
12982            let mut next_offset = offset;
12983            let end_offset = offset + bytes_len;
12984            _next_ordinal_to_read += 1;
12985            if next_offset >= end_offset {
12986                return Ok(());
12987            }
12988
12989            // Decode unknown envelopes for gaps in ordinals.
12990            while _next_ordinal_to_read < 1 {
12991                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12992                _next_ordinal_to_read += 1;
12993                next_offset += envelope_size;
12994            }
12995
12996            let next_out_of_line = decoder.next_out_of_line();
12997            let handles_before = decoder.remaining_handles();
12998            if let Some((inlined, num_bytes, num_handles)) =
12999                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13000            {
13001                let member_inline_size = <fidl::encoding::Vector<
13002                    fidl::encoding::Array<
13003                        fidl::encoding::HandleType<
13004                            fidl::Event,
13005                            { fidl::ObjectType::EVENT.into_raw() },
13006                            49155,
13007                        >,
13008                        1,
13009                    >,
13010                    1,
13011                > as fidl::encoding::TypeMarker>::inline_size(
13012                    decoder.context
13013                );
13014                if inlined != (member_inline_size <= 4) {
13015                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13016                }
13017                let inner_offset;
13018                let mut inner_depth = depth.clone();
13019                if inlined {
13020                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13021                    inner_offset = next_offset;
13022                } else {
13023                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13024                    inner_depth.increment()?;
13025                }
13026                let val_ref = self.h.get_or_insert_with(|| {
13027                    fidl::new_empty!(
13028                        fidl::encoding::Vector<
13029                            fidl::encoding::Array<
13030                                fidl::encoding::HandleType<
13031                                    fidl::Event,
13032                                    { fidl::ObjectType::EVENT.into_raw() },
13033                                    49155,
13034                                >,
13035                                1,
13036                            >,
13037                            1,
13038                        >,
13039                        fidl::encoding::DefaultFuchsiaResourceDialect
13040                    )
13041                });
13042                fidl::decode!(
13043                    fidl::encoding::Vector<
13044                        fidl::encoding::Array<
13045                            fidl::encoding::HandleType<
13046                                fidl::Event,
13047                                { fidl::ObjectType::EVENT.into_raw() },
13048                                49155,
13049                            >,
13050                            1,
13051                        >,
13052                        1,
13053                    >,
13054                    fidl::encoding::DefaultFuchsiaResourceDialect,
13055                    val_ref,
13056                    decoder,
13057                    inner_offset,
13058                    inner_depth
13059                )?;
13060                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13061                {
13062                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13063                }
13064                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13065                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13066                }
13067            }
13068
13069            next_offset += envelope_size;
13070
13071            // Decode the remaining unknown envelopes.
13072            while next_offset < end_offset {
13073                _next_ordinal_to_read += 1;
13074                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13075                next_offset += envelope_size;
13076            }
13077
13078            Ok(())
13079        }
13080    }
13081
13082    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13083        type Borrowed<'a> = &'a mut Self;
13084        fn take_or_borrow<'a>(
13085            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13086        ) -> Self::Borrowed<'a> {
13087            value
13088        }
13089    }
13090
13091    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13092        type Owned = Self;
13093
13094        #[inline(always)]
13095        fn inline_align(_context: fidl::encoding::Context) -> usize {
13096            8
13097        }
13098
13099        #[inline(always)]
13100        fn inline_size(_context: fidl::encoding::Context) -> usize {
13101            16
13102        }
13103    }
13104
13105    unsafe impl
13106        fidl::encoding::Encode<
13107            ArrayOfVectorOfEventInUnionWithDefaultRights,
13108            fidl::encoding::DefaultFuchsiaResourceDialect,
13109        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRights
13110    {
13111        #[inline]
13112        unsafe fn encode(
13113            self,
13114            encoder: &mut fidl::encoding::Encoder<
13115                '_,
13116                fidl::encoding::DefaultFuchsiaResourceDialect,
13117            >,
13118            offset: usize,
13119            _depth: fidl::encoding::Depth,
13120        ) -> fidl::Result<()> {
13121            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRights>(offset);
13122            encoder.write_num::<u64>(self.ordinal(), offset);
13123            match self {
13124                ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) => {
13125                    fidl::encoding::encode_in_envelope::<
13126                        fidl::encoding::Array<
13127                            fidl::encoding::Vector<
13128                                fidl::encoding::HandleType<
13129                                    fidl::Event,
13130                                    { fidl::ObjectType::EVENT.into_raw() },
13131                                    53251,
13132                                >,
13133                                1,
13134                            >,
13135                            1,
13136                        >,
13137                        fidl::encoding::DefaultFuchsiaResourceDialect,
13138                    >(
13139                        <fidl::encoding::Array<
13140                            fidl::encoding::Vector<
13141                                fidl::encoding::HandleType<
13142                                    fidl::Event,
13143                                    { fidl::ObjectType::EVENT.into_raw() },
13144                                    53251,
13145                                >,
13146                                1,
13147                            >,
13148                            1,
13149                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13150                            val
13151                        ),
13152                        encoder,
13153                        offset + 8,
13154                        _depth,
13155                    )
13156                }
13157            }
13158        }
13159    }
13160
13161    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13162        for ArrayOfVectorOfEventInUnionWithDefaultRights
13163    {
13164        #[inline(always)]
13165        fn new_empty() -> Self {
13166            Self::H(fidl::new_empty!(
13167                fidl::encoding::Array<
13168                    fidl::encoding::Vector<
13169                        fidl::encoding::HandleType<
13170                            fidl::Event,
13171                            { fidl::ObjectType::EVENT.into_raw() },
13172                            53251,
13173                        >,
13174                        1,
13175                    >,
13176                    1,
13177                >,
13178                fidl::encoding::DefaultFuchsiaResourceDialect
13179            ))
13180        }
13181
13182        #[inline]
13183        unsafe fn decode(
13184            &mut self,
13185            decoder: &mut fidl::encoding::Decoder<
13186                '_,
13187                fidl::encoding::DefaultFuchsiaResourceDialect,
13188            >,
13189            offset: usize,
13190            mut depth: fidl::encoding::Depth,
13191        ) -> fidl::Result<()> {
13192            decoder.debug_check_bounds::<Self>(offset);
13193            #[allow(unused_variables)]
13194            let next_out_of_line = decoder.next_out_of_line();
13195            let handles_before = decoder.remaining_handles();
13196            let (ordinal, inlined, num_bytes, num_handles) =
13197                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13198
13199            let member_inline_size = match ordinal {
13200                1 => <fidl::encoding::Array<
13201                    fidl::encoding::Vector<
13202                        fidl::encoding::HandleType<
13203                            fidl::Event,
13204                            { fidl::ObjectType::EVENT.into_raw() },
13205                            53251,
13206                        >,
13207                        1,
13208                    >,
13209                    1,
13210                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13211                _ => return Err(fidl::Error::UnknownUnionTag),
13212            };
13213
13214            if inlined != (member_inline_size <= 4) {
13215                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13216            }
13217            let _inner_offset;
13218            if inlined {
13219                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13220                _inner_offset = offset + 8;
13221            } else {
13222                depth.increment()?;
13223                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13224            }
13225            match ordinal {
13226                1 => {
13227                    #[allow(irrefutable_let_patterns)]
13228                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(_) = self {
13229                        // Do nothing, read the value into the object
13230                    } else {
13231                        // Initialize `self` to the right variant
13232                        *self = ArrayOfVectorOfEventInUnionWithDefaultRights::H(fidl::new_empty!(
13233                            fidl::encoding::Array<
13234                                fidl::encoding::Vector<
13235                                    fidl::encoding::HandleType<
13236                                        fidl::Event,
13237                                        { fidl::ObjectType::EVENT.into_raw() },
13238                                        53251,
13239                                    >,
13240                                    1,
13241                                >,
13242                                1,
13243                            >,
13244                            fidl::encoding::DefaultFuchsiaResourceDialect
13245                        ));
13246                    }
13247                    #[allow(irrefutable_let_patterns)]
13248                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) = self {
13249                        fidl::decode!(
13250                            fidl::encoding::Array<
13251                                fidl::encoding::Vector<
13252                                    fidl::encoding::HandleType<
13253                                        fidl::Event,
13254                                        { fidl::ObjectType::EVENT.into_raw() },
13255                                        53251,
13256                                    >,
13257                                    1,
13258                                >,
13259                                1,
13260                            >,
13261                            fidl::encoding::DefaultFuchsiaResourceDialect,
13262                            val,
13263                            decoder,
13264                            _inner_offset,
13265                            depth
13266                        )?;
13267                    } else {
13268                        unreachable!()
13269                    }
13270                }
13271                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13272            }
13273            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13274                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13275            }
13276            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13277                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13278            }
13279            Ok(())
13280        }
13281    }
13282
13283    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13284        type Borrowed<'a> = &'a mut Self;
13285        fn take_or_borrow<'a>(
13286            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13287        ) -> Self::Borrowed<'a> {
13288            value
13289        }
13290    }
13291
13292    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13293        type Owned = Self;
13294
13295        #[inline(always)]
13296        fn inline_align(_context: fidl::encoding::Context) -> usize {
13297            8
13298        }
13299
13300        #[inline(always)]
13301        fn inline_size(_context: fidl::encoding::Context) -> usize {
13302            16
13303        }
13304    }
13305
13306    unsafe impl
13307        fidl::encoding::Encode<
13308            ArrayOfVectorOfEventInUnionWithReducedRights,
13309            fidl::encoding::DefaultFuchsiaResourceDialect,
13310        > for &mut ArrayOfVectorOfEventInUnionWithReducedRights
13311    {
13312        #[inline]
13313        unsafe fn encode(
13314            self,
13315            encoder: &mut fidl::encoding::Encoder<
13316                '_,
13317                fidl::encoding::DefaultFuchsiaResourceDialect,
13318            >,
13319            offset: usize,
13320            _depth: fidl::encoding::Depth,
13321        ) -> fidl::Result<()> {
13322            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRights>(offset);
13323            encoder.write_num::<u64>(self.ordinal(), offset);
13324            match self {
13325                ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) => {
13326                    fidl::encoding::encode_in_envelope::<
13327                        fidl::encoding::Array<
13328                            fidl::encoding::Vector<
13329                                fidl::encoding::HandleType<
13330                                    fidl::Event,
13331                                    { fidl::ObjectType::EVENT.into_raw() },
13332                                    49155,
13333                                >,
13334                                1,
13335                            >,
13336                            1,
13337                        >,
13338                        fidl::encoding::DefaultFuchsiaResourceDialect,
13339                    >(
13340                        <fidl::encoding::Array<
13341                            fidl::encoding::Vector<
13342                                fidl::encoding::HandleType<
13343                                    fidl::Event,
13344                                    { fidl::ObjectType::EVENT.into_raw() },
13345                                    49155,
13346                                >,
13347                                1,
13348                            >,
13349                            1,
13350                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13351                            val
13352                        ),
13353                        encoder,
13354                        offset + 8,
13355                        _depth,
13356                    )
13357                }
13358            }
13359        }
13360    }
13361
13362    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13363        for ArrayOfVectorOfEventInUnionWithReducedRights
13364    {
13365        #[inline(always)]
13366        fn new_empty() -> Self {
13367            Self::H(fidl::new_empty!(
13368                fidl::encoding::Array<
13369                    fidl::encoding::Vector<
13370                        fidl::encoding::HandleType<
13371                            fidl::Event,
13372                            { fidl::ObjectType::EVENT.into_raw() },
13373                            49155,
13374                        >,
13375                        1,
13376                    >,
13377                    1,
13378                >,
13379                fidl::encoding::DefaultFuchsiaResourceDialect
13380            ))
13381        }
13382
13383        #[inline]
13384        unsafe fn decode(
13385            &mut self,
13386            decoder: &mut fidl::encoding::Decoder<
13387                '_,
13388                fidl::encoding::DefaultFuchsiaResourceDialect,
13389            >,
13390            offset: usize,
13391            mut depth: fidl::encoding::Depth,
13392        ) -> fidl::Result<()> {
13393            decoder.debug_check_bounds::<Self>(offset);
13394            #[allow(unused_variables)]
13395            let next_out_of_line = decoder.next_out_of_line();
13396            let handles_before = decoder.remaining_handles();
13397            let (ordinal, inlined, num_bytes, num_handles) =
13398                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13399
13400            let member_inline_size = match ordinal {
13401                1 => <fidl::encoding::Array<
13402                    fidl::encoding::Vector<
13403                        fidl::encoding::HandleType<
13404                            fidl::Event,
13405                            { fidl::ObjectType::EVENT.into_raw() },
13406                            49155,
13407                        >,
13408                        1,
13409                    >,
13410                    1,
13411                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13412                _ => return Err(fidl::Error::UnknownUnionTag),
13413            };
13414
13415            if inlined != (member_inline_size <= 4) {
13416                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13417            }
13418            let _inner_offset;
13419            if inlined {
13420                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13421                _inner_offset = offset + 8;
13422            } else {
13423                depth.increment()?;
13424                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13425            }
13426            match ordinal {
13427                1 => {
13428                    #[allow(irrefutable_let_patterns)]
13429                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(_) = self {
13430                        // Do nothing, read the value into the object
13431                    } else {
13432                        // Initialize `self` to the right variant
13433                        *self = ArrayOfVectorOfEventInUnionWithReducedRights::H(fidl::new_empty!(
13434                            fidl::encoding::Array<
13435                                fidl::encoding::Vector<
13436                                    fidl::encoding::HandleType<
13437                                        fidl::Event,
13438                                        { fidl::ObjectType::EVENT.into_raw() },
13439                                        49155,
13440                                    >,
13441                                    1,
13442                                >,
13443                                1,
13444                            >,
13445                            fidl::encoding::DefaultFuchsiaResourceDialect
13446                        ));
13447                    }
13448                    #[allow(irrefutable_let_patterns)]
13449                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) = self {
13450                        fidl::decode!(
13451                            fidl::encoding::Array<
13452                                fidl::encoding::Vector<
13453                                    fidl::encoding::HandleType<
13454                                        fidl::Event,
13455                                        { fidl::ObjectType::EVENT.into_raw() },
13456                                        49155,
13457                                    >,
13458                                    1,
13459                                >,
13460                                1,
13461                            >,
13462                            fidl::encoding::DefaultFuchsiaResourceDialect,
13463                            val,
13464                            decoder,
13465                            _inner_offset,
13466                            depth
13467                        )?;
13468                    } else {
13469                        unreachable!()
13470                    }
13471                }
13472                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13473            }
13474            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13475                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13476            }
13477            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13478                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13479            }
13480            Ok(())
13481        }
13482    }
13483
13484    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnion {
13485        type Borrowed<'a> = &'a mut Self;
13486        fn take_or_borrow<'a>(
13487            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13488        ) -> Self::Borrowed<'a> {
13489            value
13490        }
13491    }
13492
13493    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnion {
13494        type Owned = Self;
13495
13496        #[inline(always)]
13497        fn inline_align(_context: fidl::encoding::Context) -> usize {
13498            8
13499        }
13500
13501        #[inline(always)]
13502        fn inline_size(_context: fidl::encoding::Context) -> usize {
13503            16
13504        }
13505    }
13506
13507    unsafe impl
13508        fidl::encoding::Encode<
13509            EnvelopeInliningTestUnion,
13510            fidl::encoding::DefaultFuchsiaResourceDialect,
13511        > for &mut EnvelopeInliningTestUnion
13512    {
13513        #[inline]
13514        unsafe fn encode(
13515            self,
13516            encoder: &mut fidl::encoding::Encoder<
13517                '_,
13518                fidl::encoding::DefaultFuchsiaResourceDialect,
13519            >,
13520            offset: usize,
13521            _depth: fidl::encoding::Depth,
13522        ) -> fidl::Result<()> {
13523            encoder.debug_check_bounds::<EnvelopeInliningTestUnion>(offset);
13524            encoder.write_num::<u64>(self.ordinal(), offset);
13525            match self {
13526                EnvelopeInliningTestUnion::Small(ref val) => fidl::encoding::encode_in_envelope::<
13527                    u32,
13528                    fidl::encoding::DefaultFuchsiaResourceDialect,
13529                >(
13530                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13531                    encoder,
13532                    offset + 8,
13533                    _depth,
13534                ),
13535                EnvelopeInliningTestUnion::Large(ref val) => fidl::encoding::encode_in_envelope::<
13536                    u64,
13537                    fidl::encoding::DefaultFuchsiaResourceDialect,
13538                >(
13539                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
13540                    encoder,
13541                    offset + 8,
13542                    _depth,
13543                ),
13544                EnvelopeInliningTestUnion::Handle(ref mut val) => {
13545                    fidl::encoding::encode_in_envelope::<
13546                        fidl::encoding::HandleType<
13547                            fidl::NullableHandle,
13548                            { fidl::ObjectType::NONE.into_raw() },
13549                            2147483648,
13550                        >,
13551                        fidl::encoding::DefaultFuchsiaResourceDialect,
13552                    >(
13553                        <fidl::encoding::HandleType<
13554                            fidl::NullableHandle,
13555                            { fidl::ObjectType::NONE.into_raw() },
13556                            2147483648,
13557                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13558                            val
13559                        ),
13560                        encoder,
13561                        offset + 8,
13562                        _depth,
13563                    )
13564                }
13565                EnvelopeInliningTestUnion::__SourceBreaking { .. } => {
13566                    Err(fidl::Error::UnknownUnionTag)
13567                }
13568            }
13569        }
13570    }
13571
13572    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13573        for EnvelopeInliningTestUnion
13574    {
13575        #[inline(always)]
13576        fn new_empty() -> Self {
13577            Self::__SourceBreaking { unknown_ordinal: 0 }
13578        }
13579
13580        #[inline]
13581        unsafe fn decode(
13582            &mut self,
13583            decoder: &mut fidl::encoding::Decoder<
13584                '_,
13585                fidl::encoding::DefaultFuchsiaResourceDialect,
13586            >,
13587            offset: usize,
13588            mut depth: fidl::encoding::Depth,
13589        ) -> fidl::Result<()> {
13590            decoder.debug_check_bounds::<Self>(offset);
13591            #[allow(unused_variables)]
13592            let next_out_of_line = decoder.next_out_of_line();
13593            let handles_before = decoder.remaining_handles();
13594            let (ordinal, inlined, num_bytes, num_handles) =
13595                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13596
13597            let member_inline_size = match ordinal {
13598                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13599                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13600                3 => <fidl::encoding::HandleType<
13601                    fidl::NullableHandle,
13602                    { fidl::ObjectType::NONE.into_raw() },
13603                    2147483648,
13604                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13605                0 => return Err(fidl::Error::UnknownUnionTag),
13606                _ => num_bytes as usize,
13607            };
13608
13609            if inlined != (member_inline_size <= 4) {
13610                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13611            }
13612            let _inner_offset;
13613            if inlined {
13614                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13615                _inner_offset = offset + 8;
13616            } else {
13617                depth.increment()?;
13618                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13619            }
13620            match ordinal {
13621                1 => {
13622                    #[allow(irrefutable_let_patterns)]
13623                    if let EnvelopeInliningTestUnion::Small(_) = self {
13624                        // Do nothing, read the value into the object
13625                    } else {
13626                        // Initialize `self` to the right variant
13627                        *self = EnvelopeInliningTestUnion::Small(fidl::new_empty!(
13628                            u32,
13629                            fidl::encoding::DefaultFuchsiaResourceDialect
13630                        ));
13631                    }
13632                    #[allow(irrefutable_let_patterns)]
13633                    if let EnvelopeInliningTestUnion::Small(ref mut val) = self {
13634                        fidl::decode!(
13635                            u32,
13636                            fidl::encoding::DefaultFuchsiaResourceDialect,
13637                            val,
13638                            decoder,
13639                            _inner_offset,
13640                            depth
13641                        )?;
13642                    } else {
13643                        unreachable!()
13644                    }
13645                }
13646                2 => {
13647                    #[allow(irrefutable_let_patterns)]
13648                    if let EnvelopeInliningTestUnion::Large(_) = self {
13649                        // Do nothing, read the value into the object
13650                    } else {
13651                        // Initialize `self` to the right variant
13652                        *self = EnvelopeInliningTestUnion::Large(fidl::new_empty!(
13653                            u64,
13654                            fidl::encoding::DefaultFuchsiaResourceDialect
13655                        ));
13656                    }
13657                    #[allow(irrefutable_let_patterns)]
13658                    if let EnvelopeInliningTestUnion::Large(ref mut val) = self {
13659                        fidl::decode!(
13660                            u64,
13661                            fidl::encoding::DefaultFuchsiaResourceDialect,
13662                            val,
13663                            decoder,
13664                            _inner_offset,
13665                            depth
13666                        )?;
13667                    } else {
13668                        unreachable!()
13669                    }
13670                }
13671                3 => {
13672                    #[allow(irrefutable_let_patterns)]
13673                    if let EnvelopeInliningTestUnion::Handle(_) = self {
13674                        // Do nothing, read the value into the object
13675                    } else {
13676                        // Initialize `self` to the right variant
13677                        *self = EnvelopeInliningTestUnion::Handle(
13678                            fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13679                        );
13680                    }
13681                    #[allow(irrefutable_let_patterns)]
13682                    if let EnvelopeInliningTestUnion::Handle(ref mut val) = self {
13683                        fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
13684                    } else {
13685                        unreachable!()
13686                    }
13687                }
13688                #[allow(deprecated)]
13689                ordinal => {
13690                    for _ in 0..num_handles {
13691                        decoder.drop_next_handle()?;
13692                    }
13693                    *self =
13694                        EnvelopeInliningTestUnion::__SourceBreaking { unknown_ordinal: ordinal };
13695                }
13696            }
13697            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13698                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13699            }
13700            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13701                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13702            }
13703            Ok(())
13704        }
13705    }
13706
13707    impl fidl::encoding::ResourceTypeMarker for SampleResourceXUnion {
13708        type Borrowed<'a> = &'a mut Self;
13709        fn take_or_borrow<'a>(
13710            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13711        ) -> Self::Borrowed<'a> {
13712            value
13713        }
13714    }
13715
13716    unsafe impl fidl::encoding::TypeMarker for SampleResourceXUnion {
13717        type Owned = Self;
13718
13719        #[inline(always)]
13720        fn inline_align(_context: fidl::encoding::Context) -> usize {
13721            8
13722        }
13723
13724        #[inline(always)]
13725        fn inline_size(_context: fidl::encoding::Context) -> usize {
13726            16
13727        }
13728    }
13729
13730    unsafe impl
13731        fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
13732        for &mut SampleResourceXUnion
13733    {
13734        #[inline]
13735        unsafe fn encode(
13736            self,
13737            encoder: &mut fidl::encoding::Encoder<
13738                '_,
13739                fidl::encoding::DefaultFuchsiaResourceDialect,
13740            >,
13741            offset: usize,
13742            _depth: fidl::encoding::Depth,
13743        ) -> fidl::Result<()> {
13744            encoder.debug_check_bounds::<SampleResourceXUnion>(offset);
13745            encoder.write_num::<u64>(self.ordinal(), offset);
13746            match self {
13747                SampleResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13748                    u32,
13749                    fidl::encoding::DefaultFuchsiaResourceDialect,
13750                >(
13751                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13752                    encoder,
13753                    offset + 8,
13754                    _depth,
13755                ),
13756                SampleResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13757                    SimpleUnion,
13758                    fidl::encoding::DefaultFuchsiaResourceDialect,
13759                >(
13760                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13761                    encoder,
13762                    offset + 8,
13763                    _depth,
13764                ),
13765                SampleResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13766                    SimpleTable,
13767                    fidl::encoding::DefaultFuchsiaResourceDialect,
13768                >(
13769                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13770                    encoder,
13771                    offset + 8,
13772                    _depth,
13773                ),
13774                SampleResourceXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
13775            }
13776        }
13777    }
13778
13779    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13780        for SampleResourceXUnion
13781    {
13782        #[inline(always)]
13783        fn new_empty() -> Self {
13784            Self::__SourceBreaking { unknown_ordinal: 0 }
13785        }
13786
13787        #[inline]
13788        unsafe fn decode(
13789            &mut self,
13790            decoder: &mut fidl::encoding::Decoder<
13791                '_,
13792                fidl::encoding::DefaultFuchsiaResourceDialect,
13793            >,
13794            offset: usize,
13795            mut depth: fidl::encoding::Depth,
13796        ) -> fidl::Result<()> {
13797            decoder.debug_check_bounds::<Self>(offset);
13798            #[allow(unused_variables)]
13799            let next_out_of_line = decoder.next_out_of_line();
13800            let handles_before = decoder.remaining_handles();
13801            let (ordinal, inlined, num_bytes, num_handles) =
13802                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13803
13804            let member_inline_size = match ordinal {
13805                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13806                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13807                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13808                0 => return Err(fidl::Error::UnknownUnionTag),
13809                _ => num_bytes as usize,
13810            };
13811
13812            if inlined != (member_inline_size <= 4) {
13813                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13814            }
13815            let _inner_offset;
13816            if inlined {
13817                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13818                _inner_offset = offset + 8;
13819            } else {
13820                depth.increment()?;
13821                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13822            }
13823            match ordinal {
13824                1 => {
13825                    #[allow(irrefutable_let_patterns)]
13826                    if let SampleResourceXUnion::U(_) = self {
13827                        // Do nothing, read the value into the object
13828                    } else {
13829                        // Initialize `self` to the right variant
13830                        *self = SampleResourceXUnion::U(fidl::new_empty!(
13831                            u32,
13832                            fidl::encoding::DefaultFuchsiaResourceDialect
13833                        ));
13834                    }
13835                    #[allow(irrefutable_let_patterns)]
13836                    if let SampleResourceXUnion::U(ref mut val) = self {
13837                        fidl::decode!(
13838                            u32,
13839                            fidl::encoding::DefaultFuchsiaResourceDialect,
13840                            val,
13841                            decoder,
13842                            _inner_offset,
13843                            depth
13844                        )?;
13845                    } else {
13846                        unreachable!()
13847                    }
13848                }
13849                2 => {
13850                    #[allow(irrefutable_let_patterns)]
13851                    if let SampleResourceXUnion::Su(_) = self {
13852                        // Do nothing, read the value into the object
13853                    } else {
13854                        // Initialize `self` to the right variant
13855                        *self = SampleResourceXUnion::Su(fidl::new_empty!(
13856                            SimpleUnion,
13857                            fidl::encoding::DefaultFuchsiaResourceDialect
13858                        ));
13859                    }
13860                    #[allow(irrefutable_let_patterns)]
13861                    if let SampleResourceXUnion::Su(ref mut val) = self {
13862                        fidl::decode!(
13863                            SimpleUnion,
13864                            fidl::encoding::DefaultFuchsiaResourceDialect,
13865                            val,
13866                            decoder,
13867                            _inner_offset,
13868                            depth
13869                        )?;
13870                    } else {
13871                        unreachable!()
13872                    }
13873                }
13874                3 => {
13875                    #[allow(irrefutable_let_patterns)]
13876                    if let SampleResourceXUnion::St(_) = self {
13877                        // Do nothing, read the value into the object
13878                    } else {
13879                        // Initialize `self` to the right variant
13880                        *self = SampleResourceXUnion::St(fidl::new_empty!(
13881                            SimpleTable,
13882                            fidl::encoding::DefaultFuchsiaResourceDialect
13883                        ));
13884                    }
13885                    #[allow(irrefutable_let_patterns)]
13886                    if let SampleResourceXUnion::St(ref mut val) = self {
13887                        fidl::decode!(
13888                            SimpleTable,
13889                            fidl::encoding::DefaultFuchsiaResourceDialect,
13890                            val,
13891                            decoder,
13892                            _inner_offset,
13893                            depth
13894                        )?;
13895                    } else {
13896                        unreachable!()
13897                    }
13898                }
13899                #[allow(deprecated)]
13900                ordinal => {
13901                    for _ in 0..num_handles {
13902                        decoder.drop_next_handle()?;
13903                    }
13904                    *self = SampleResourceXUnion::__SourceBreaking { unknown_ordinal: ordinal };
13905                }
13906            }
13907            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13908                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13909            }
13910            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13911                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13912            }
13913            Ok(())
13914        }
13915    }
13916
13917    impl fidl::encoding::ResourceTypeMarker for SampleStrictResourceXUnion {
13918        type Borrowed<'a> = &'a mut Self;
13919        fn take_or_borrow<'a>(
13920            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13921        ) -> Self::Borrowed<'a> {
13922            value
13923        }
13924    }
13925
13926    unsafe impl fidl::encoding::TypeMarker for SampleStrictResourceXUnion {
13927        type Owned = Self;
13928
13929        #[inline(always)]
13930        fn inline_align(_context: fidl::encoding::Context) -> usize {
13931            8
13932        }
13933
13934        #[inline(always)]
13935        fn inline_size(_context: fidl::encoding::Context) -> usize {
13936            16
13937        }
13938    }
13939
13940    unsafe impl
13941        fidl::encoding::Encode<
13942            SampleStrictResourceXUnion,
13943            fidl::encoding::DefaultFuchsiaResourceDialect,
13944        > for &mut SampleStrictResourceXUnion
13945    {
13946        #[inline]
13947        unsafe fn encode(
13948            self,
13949            encoder: &mut fidl::encoding::Encoder<
13950                '_,
13951                fidl::encoding::DefaultFuchsiaResourceDialect,
13952            >,
13953            offset: usize,
13954            _depth: fidl::encoding::Depth,
13955        ) -> fidl::Result<()> {
13956            encoder.debug_check_bounds::<SampleStrictResourceXUnion>(offset);
13957            encoder.write_num::<u64>(self.ordinal(), offset);
13958            match self {
13959                SampleStrictResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13960                    u32,
13961                    fidl::encoding::DefaultFuchsiaResourceDialect,
13962                >(
13963                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13964                    encoder,
13965                    offset + 8,
13966                    _depth,
13967                ),
13968                SampleStrictResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13969                    SimpleUnion,
13970                    fidl::encoding::DefaultFuchsiaResourceDialect,
13971                >(
13972                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13973                    encoder,
13974                    offset + 8,
13975                    _depth,
13976                ),
13977                SampleStrictResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13978                    SimpleTable,
13979                    fidl::encoding::DefaultFuchsiaResourceDialect,
13980                >(
13981                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13982                    encoder,
13983                    offset + 8,
13984                    _depth,
13985                ),
13986            }
13987        }
13988    }
13989
13990    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13991        for SampleStrictResourceXUnion
13992    {
13993        #[inline(always)]
13994        fn new_empty() -> Self {
13995            Self::U(fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect))
13996        }
13997
13998        #[inline]
13999        unsafe fn decode(
14000            &mut self,
14001            decoder: &mut fidl::encoding::Decoder<
14002                '_,
14003                fidl::encoding::DefaultFuchsiaResourceDialect,
14004            >,
14005            offset: usize,
14006            mut depth: fidl::encoding::Depth,
14007        ) -> fidl::Result<()> {
14008            decoder.debug_check_bounds::<Self>(offset);
14009            #[allow(unused_variables)]
14010            let next_out_of_line = decoder.next_out_of_line();
14011            let handles_before = decoder.remaining_handles();
14012            let (ordinal, inlined, num_bytes, num_handles) =
14013                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14014
14015            let member_inline_size = match ordinal {
14016                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14017                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14018                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14019                _ => return Err(fidl::Error::UnknownUnionTag),
14020            };
14021
14022            if inlined != (member_inline_size <= 4) {
14023                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14024            }
14025            let _inner_offset;
14026            if inlined {
14027                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14028                _inner_offset = offset + 8;
14029            } else {
14030                depth.increment()?;
14031                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14032            }
14033            match ordinal {
14034                1 => {
14035                    #[allow(irrefutable_let_patterns)]
14036                    if let SampleStrictResourceXUnion::U(_) = self {
14037                        // Do nothing, read the value into the object
14038                    } else {
14039                        // Initialize `self` to the right variant
14040                        *self = SampleStrictResourceXUnion::U(fidl::new_empty!(
14041                            u32,
14042                            fidl::encoding::DefaultFuchsiaResourceDialect
14043                        ));
14044                    }
14045                    #[allow(irrefutable_let_patterns)]
14046                    if let SampleStrictResourceXUnion::U(ref mut val) = self {
14047                        fidl::decode!(
14048                            u32,
14049                            fidl::encoding::DefaultFuchsiaResourceDialect,
14050                            val,
14051                            decoder,
14052                            _inner_offset,
14053                            depth
14054                        )?;
14055                    } else {
14056                        unreachable!()
14057                    }
14058                }
14059                2 => {
14060                    #[allow(irrefutable_let_patterns)]
14061                    if let SampleStrictResourceXUnion::Su(_) = self {
14062                        // Do nothing, read the value into the object
14063                    } else {
14064                        // Initialize `self` to the right variant
14065                        *self = SampleStrictResourceXUnion::Su(fidl::new_empty!(
14066                            SimpleUnion,
14067                            fidl::encoding::DefaultFuchsiaResourceDialect
14068                        ));
14069                    }
14070                    #[allow(irrefutable_let_patterns)]
14071                    if let SampleStrictResourceXUnion::Su(ref mut val) = self {
14072                        fidl::decode!(
14073                            SimpleUnion,
14074                            fidl::encoding::DefaultFuchsiaResourceDialect,
14075                            val,
14076                            decoder,
14077                            _inner_offset,
14078                            depth
14079                        )?;
14080                    } else {
14081                        unreachable!()
14082                    }
14083                }
14084                3 => {
14085                    #[allow(irrefutable_let_patterns)]
14086                    if let SampleStrictResourceXUnion::St(_) = self {
14087                        // Do nothing, read the value into the object
14088                    } else {
14089                        // Initialize `self` to the right variant
14090                        *self = SampleStrictResourceXUnion::St(fidl::new_empty!(
14091                            SimpleTable,
14092                            fidl::encoding::DefaultFuchsiaResourceDialect
14093                        ));
14094                    }
14095                    #[allow(irrefutable_let_patterns)]
14096                    if let SampleStrictResourceXUnion::St(ref mut val) = self {
14097                        fidl::decode!(
14098                            SimpleTable,
14099                            fidl::encoding::DefaultFuchsiaResourceDialect,
14100                            val,
14101                            decoder,
14102                            _inner_offset,
14103                            depth
14104                        )?;
14105                    } else {
14106                        unreachable!()
14107                    }
14108                }
14109                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14110            }
14111            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14112                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14113            }
14114            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14115                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14116            }
14117            Ok(())
14118        }
14119    }
14120
14121    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpointsUnion {
14122        type Borrowed<'a> = &'a mut Self;
14123        fn take_or_borrow<'a>(
14124            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14125        ) -> Self::Borrowed<'a> {
14126            value
14127        }
14128    }
14129
14130    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpointsUnion {
14131        type Owned = Self;
14132
14133        #[inline(always)]
14134        fn inline_align(_context: fidl::encoding::Context) -> usize {
14135            8
14136        }
14137
14138        #[inline(always)]
14139        fn inline_size(_context: fidl::encoding::Context) -> usize {
14140            16
14141        }
14142    }
14143
14144    unsafe impl
14145        fidl::encoding::Encode<UnionOfEndpointsUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14146        for &mut UnionOfEndpointsUnion
14147    {
14148        #[inline]
14149        unsafe fn encode(
14150            self,
14151            encoder: &mut fidl::encoding::Encoder<
14152                '_,
14153                fidl::encoding::DefaultFuchsiaResourceDialect,
14154            >,
14155            offset: usize,
14156            _depth: fidl::encoding::Depth,
14157        ) -> fidl::Result<()> {
14158            encoder.debug_check_bounds::<UnionOfEndpointsUnion>(offset);
14159            encoder.write_num::<u64>(self.ordinal(), offset);
14160            match self {
14161            UnionOfEndpointsUnion::ClientEnd(ref mut val) => {
14162                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14163                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14164                    encoder, offset + 8, _depth
14165                )
14166            }
14167            UnionOfEndpointsUnion::ServerEnd(ref mut val) => {
14168                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14169                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14170                    encoder, offset + 8, _depth
14171                )
14172            }
14173            UnionOfEndpointsUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14174        }
14175        }
14176    }
14177
14178    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14179        for UnionOfEndpointsUnion
14180    {
14181        #[inline(always)]
14182        fn new_empty() -> Self {
14183            Self::__SourceBreaking { unknown_ordinal: 0 }
14184        }
14185
14186        #[inline]
14187        unsafe fn decode(
14188            &mut self,
14189            decoder: &mut fidl::encoding::Decoder<
14190                '_,
14191                fidl::encoding::DefaultFuchsiaResourceDialect,
14192            >,
14193            offset: usize,
14194            mut depth: fidl::encoding::Depth,
14195        ) -> fidl::Result<()> {
14196            decoder.debug_check_bounds::<Self>(offset);
14197            #[allow(unused_variables)]
14198            let next_out_of_line = decoder.next_out_of_line();
14199            let handles_before = decoder.remaining_handles();
14200            let (ordinal, inlined, num_bytes, num_handles) =
14201                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14202
14203            let member_inline_size = match ordinal {
14204            1 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14205            2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14206            0 => return Err(fidl::Error::UnknownUnionTag),
14207            _ => num_bytes as usize,
14208        };
14209
14210            if inlined != (member_inline_size <= 4) {
14211                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14212            }
14213            let _inner_offset;
14214            if inlined {
14215                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14216                _inner_offset = offset + 8;
14217            } else {
14218                depth.increment()?;
14219                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14220            }
14221            match ordinal {
14222                1 => {
14223                    #[allow(irrefutable_let_patterns)]
14224                    if let UnionOfEndpointsUnion::ClientEnd(_) = self {
14225                        // Do nothing, read the value into the object
14226                    } else {
14227                        // Initialize `self` to the right variant
14228                        *self = UnionOfEndpointsUnion::ClientEnd(fidl::new_empty!(
14229                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14230                            fidl::encoding::DefaultFuchsiaResourceDialect
14231                        ));
14232                    }
14233                    #[allow(irrefutable_let_patterns)]
14234                    if let UnionOfEndpointsUnion::ClientEnd(ref mut val) = self {
14235                        fidl::decode!(
14236                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14237                            fidl::encoding::DefaultFuchsiaResourceDialect,
14238                            val,
14239                            decoder,
14240                            _inner_offset,
14241                            depth
14242                        )?;
14243                    } else {
14244                        unreachable!()
14245                    }
14246                }
14247                2 => {
14248                    #[allow(irrefutable_let_patterns)]
14249                    if let UnionOfEndpointsUnion::ServerEnd(_) = self {
14250                        // Do nothing, read the value into the object
14251                    } else {
14252                        // Initialize `self` to the right variant
14253                        *self = UnionOfEndpointsUnion::ServerEnd(fidl::new_empty!(
14254                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14255                            fidl::encoding::DefaultFuchsiaResourceDialect
14256                        ));
14257                    }
14258                    #[allow(irrefutable_let_patterns)]
14259                    if let UnionOfEndpointsUnion::ServerEnd(ref mut val) = self {
14260                        fidl::decode!(
14261                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14262                            fidl::encoding::DefaultFuchsiaResourceDialect,
14263                            val,
14264                            decoder,
14265                            _inner_offset,
14266                            depth
14267                        )?;
14268                    } else {
14269                        unreachable!()
14270                    }
14271                }
14272                #[allow(deprecated)]
14273                ordinal => {
14274                    for _ in 0..num_handles {
14275                        decoder.drop_next_handle()?;
14276                    }
14277                    *self = UnionOfEndpointsUnion::__SourceBreaking { unknown_ordinal: ordinal };
14278                }
14279            }
14280            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14281                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14282            }
14283            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14284                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14285            }
14286            Ok(())
14287        }
14288    }
14289
14290    impl fidl::encoding::ResourceTypeMarker for UnionOfHandle {
14291        type Borrowed<'a> = &'a mut Self;
14292        fn take_or_borrow<'a>(
14293            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14294        ) -> Self::Borrowed<'a> {
14295            value
14296        }
14297    }
14298
14299    unsafe impl fidl::encoding::TypeMarker for UnionOfHandle {
14300        type Owned = Self;
14301
14302        #[inline(always)]
14303        fn inline_align(_context: fidl::encoding::Context) -> usize {
14304            8
14305        }
14306
14307        #[inline(always)]
14308        fn inline_size(_context: fidl::encoding::Context) -> usize {
14309            16
14310        }
14311    }
14312
14313    unsafe impl fidl::encoding::Encode<UnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
14314        for &mut UnionOfHandle
14315    {
14316        #[inline]
14317        unsafe fn encode(
14318            self,
14319            encoder: &mut fidl::encoding::Encoder<
14320                '_,
14321                fidl::encoding::DefaultFuchsiaResourceDialect,
14322            >,
14323            offset: usize,
14324            _depth: fidl::encoding::Depth,
14325        ) -> fidl::Result<()> {
14326            encoder.debug_check_bounds::<UnionOfHandle>(offset);
14327            encoder.write_num::<u64>(self.ordinal(), offset);
14328            match self {
14329                UnionOfHandle::H(ref mut val) => fidl::encoding::encode_in_envelope::<
14330                    fidl::encoding::HandleType<
14331                        fidl::NullableHandle,
14332                        { fidl::ObjectType::NONE.into_raw() },
14333                        2147483648,
14334                    >,
14335                    fidl::encoding::DefaultFuchsiaResourceDialect,
14336                >(
14337                    <fidl::encoding::HandleType<
14338                        fidl::NullableHandle,
14339                        { fidl::ObjectType::NONE.into_raw() },
14340                        2147483648,
14341                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14342                        val
14343                    ),
14344                    encoder,
14345                    offset + 8,
14346                    _depth,
14347                ),
14348            }
14349        }
14350    }
14351
14352    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {
14353        #[inline(always)]
14354        fn new_empty() -> Self {
14355            Self::H(
14356                fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14357            )
14358        }
14359
14360        #[inline]
14361        unsafe fn decode(
14362            &mut self,
14363            decoder: &mut fidl::encoding::Decoder<
14364                '_,
14365                fidl::encoding::DefaultFuchsiaResourceDialect,
14366            >,
14367            offset: usize,
14368            mut depth: fidl::encoding::Depth,
14369        ) -> fidl::Result<()> {
14370            decoder.debug_check_bounds::<Self>(offset);
14371            #[allow(unused_variables)]
14372            let next_out_of_line = decoder.next_out_of_line();
14373            let handles_before = decoder.remaining_handles();
14374            let (ordinal, inlined, num_bytes, num_handles) =
14375                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14376
14377            let member_inline_size = match ordinal {
14378                1 => <fidl::encoding::HandleType<
14379                    fidl::NullableHandle,
14380                    { fidl::ObjectType::NONE.into_raw() },
14381                    2147483648,
14382                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14383                _ => return Err(fidl::Error::UnknownUnionTag),
14384            };
14385
14386            if inlined != (member_inline_size <= 4) {
14387                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14388            }
14389            let _inner_offset;
14390            if inlined {
14391                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14392                _inner_offset = offset + 8;
14393            } else {
14394                depth.increment()?;
14395                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14396            }
14397            match ordinal {
14398                1 => {
14399                    #[allow(irrefutable_let_patterns)]
14400                    if let UnionOfHandle::H(_) = self {
14401                        // Do nothing, read the value into the object
14402                    } else {
14403                        // Initialize `self` to the right variant
14404                        *self = UnionOfHandle::H(
14405                            fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14406                        );
14407                    }
14408                    #[allow(irrefutable_let_patterns)]
14409                    if let UnionOfHandle::H(ref mut val) = self {
14410                        fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14411                    } else {
14412                        unreachable!()
14413                    }
14414                }
14415                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14416            }
14417            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14418                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14419            }
14420            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14421                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14422            }
14423            Ok(())
14424        }
14425    }
14426
14427    impl fidl::encoding::ResourceTypeMarker for UnionWithVector {
14428        type Borrowed<'a> = &'a mut Self;
14429        fn take_or_borrow<'a>(
14430            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14431        ) -> Self::Borrowed<'a> {
14432            value
14433        }
14434    }
14435
14436    unsafe impl fidl::encoding::TypeMarker for UnionWithVector {
14437        type Owned = Self;
14438
14439        #[inline(always)]
14440        fn inline_align(_context: fidl::encoding::Context) -> usize {
14441            8
14442        }
14443
14444        #[inline(always)]
14445        fn inline_size(_context: fidl::encoding::Context) -> usize {
14446            16
14447        }
14448    }
14449
14450    unsafe impl
14451        fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>
14452        for &mut UnionWithVector
14453    {
14454        #[inline]
14455        unsafe fn encode(
14456            self,
14457            encoder: &mut fidl::encoding::Encoder<
14458                '_,
14459                fidl::encoding::DefaultFuchsiaResourceDialect,
14460            >,
14461            offset: usize,
14462            _depth: fidl::encoding::Depth,
14463        ) -> fidl::Result<()> {
14464            encoder.debug_check_bounds::<UnionWithVector>(offset);
14465            encoder.write_num::<u64>(self.ordinal(), offset);
14466            match self {
14467            UnionWithVector::Unused(ref val) => {
14468                fidl::encoding::encode_in_envelope::<u8, fidl::encoding::DefaultFuchsiaResourceDialect>(
14469                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
14470                    encoder, offset + 8, _depth
14471                )
14472            }
14473            UnionWithVector::VectorOfUint8(ref val) => {
14474                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14475                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(val),
14476                    encoder, offset + 8, _depth
14477                )
14478            }
14479            UnionWithVector::S(ref val) => {
14480                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, fidl::encoding::DefaultFuchsiaResourceDialect>(
14481                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
14482                    encoder, offset + 8, _depth
14483                )
14484            }
14485            UnionWithVector::VectorS3A1(ref val) => {
14486                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align1>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14487                    <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::ValueTypeMarker>::borrow(val),
14488                    encoder, offset + 8, _depth
14489                )
14490            }
14491            UnionWithVector::VectorS3A2(ref val) => {
14492                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14493                    <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14494                    encoder, offset + 8, _depth
14495                )
14496            }
14497            UnionWithVector::Handles(ref mut val) => {
14498                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14499                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14500                    encoder, offset + 8, _depth
14501                )
14502            }
14503            UnionWithVector::ArrayS3A1(ref val) => {
14504                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14505                    <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14506                    encoder, offset + 8, _depth
14507                )
14508            }
14509            UnionWithVector::ArrayS3A2(ref val) => {
14510                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14511                    <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14512                    encoder, offset + 8, _depth
14513                )
14514            }
14515            UnionWithVector::VectorUnion(ref val) => {
14516                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<UnionSize8Align4>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14517                    <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(val),
14518                    encoder, offset + 8, _depth
14519                )
14520            }
14521        }
14522        }
14523    }
14524
14525    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14526        for UnionWithVector
14527    {
14528        #[inline(always)]
14529        fn new_empty() -> Self {
14530            Self::Unused(fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect))
14531        }
14532
14533        #[inline]
14534        unsafe fn decode(
14535            &mut self,
14536            decoder: &mut fidl::encoding::Decoder<
14537                '_,
14538                fidl::encoding::DefaultFuchsiaResourceDialect,
14539            >,
14540            offset: usize,
14541            mut depth: fidl::encoding::Depth,
14542        ) -> fidl::Result<()> {
14543            decoder.debug_check_bounds::<Self>(offset);
14544            #[allow(unused_variables)]
14545            let next_out_of_line = decoder.next_out_of_line();
14546            let handles_before = decoder.remaining_handles();
14547            let (ordinal, inlined, num_bytes, num_handles) =
14548                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14549
14550            let member_inline_size = match ordinal {
14551            1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14552            2 => <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14553            3 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14554            4 => <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14555            5 => <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14556            6 => <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14557            7 => <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14558            8 => <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14559            9 => <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14560            _ => return Err(fidl::Error::UnknownUnionTag),
14561        };
14562
14563            if inlined != (member_inline_size <= 4) {
14564                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14565            }
14566            let _inner_offset;
14567            if inlined {
14568                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14569                _inner_offset = offset + 8;
14570            } else {
14571                depth.increment()?;
14572                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14573            }
14574            match ordinal {
14575                1 => {
14576                    #[allow(irrefutable_let_patterns)]
14577                    if let UnionWithVector::Unused(_) = self {
14578                        // Do nothing, read the value into the object
14579                    } else {
14580                        // Initialize `self` to the right variant
14581                        *self = UnionWithVector::Unused(fidl::new_empty!(
14582                            u8,
14583                            fidl::encoding::DefaultFuchsiaResourceDialect
14584                        ));
14585                    }
14586                    #[allow(irrefutable_let_patterns)]
14587                    if let UnionWithVector::Unused(ref mut val) = self {
14588                        fidl::decode!(
14589                            u8,
14590                            fidl::encoding::DefaultFuchsiaResourceDialect,
14591                            val,
14592                            decoder,
14593                            _inner_offset,
14594                            depth
14595                        )?;
14596                    } else {
14597                        unreachable!()
14598                    }
14599                }
14600                2 => {
14601                    #[allow(irrefutable_let_patterns)]
14602                    if let UnionWithVector::VectorOfUint8(_) = self {
14603                        // Do nothing, read the value into the object
14604                    } else {
14605                        // Initialize `self` to the right variant
14606                        *self = UnionWithVector::VectorOfUint8(fidl::new_empty!(
14607                            fidl::encoding::UnboundedVector<u8>,
14608                            fidl::encoding::DefaultFuchsiaResourceDialect
14609                        ));
14610                    }
14611                    #[allow(irrefutable_let_patterns)]
14612                    if let UnionWithVector::VectorOfUint8(ref mut val) = self {
14613                        fidl::decode!(
14614                            fidl::encoding::UnboundedVector<u8>,
14615                            fidl::encoding::DefaultFuchsiaResourceDialect,
14616                            val,
14617                            decoder,
14618                            _inner_offset,
14619                            depth
14620                        )?;
14621                    } else {
14622                        unreachable!()
14623                    }
14624                }
14625                3 => {
14626                    #[allow(irrefutable_let_patterns)]
14627                    if let UnionWithVector::S(_) = self {
14628                        // Do nothing, read the value into the object
14629                    } else {
14630                        // Initialize `self` to the right variant
14631                        *self = UnionWithVector::S(fidl::new_empty!(
14632                            fidl::encoding::UnboundedString,
14633                            fidl::encoding::DefaultFuchsiaResourceDialect
14634                        ));
14635                    }
14636                    #[allow(irrefutable_let_patterns)]
14637                    if let UnionWithVector::S(ref mut val) = self {
14638                        fidl::decode!(
14639                            fidl::encoding::UnboundedString,
14640                            fidl::encoding::DefaultFuchsiaResourceDialect,
14641                            val,
14642                            decoder,
14643                            _inner_offset,
14644                            depth
14645                        )?;
14646                    } else {
14647                        unreachable!()
14648                    }
14649                }
14650                4 => {
14651                    #[allow(irrefutable_let_patterns)]
14652                    if let UnionWithVector::VectorS3A1(_) = self {
14653                        // Do nothing, read the value into the object
14654                    } else {
14655                        // Initialize `self` to the right variant
14656                        *self = UnionWithVector::VectorS3A1(fidl::new_empty!(
14657                            fidl::encoding::UnboundedVector<StructSize3Align1>,
14658                            fidl::encoding::DefaultFuchsiaResourceDialect
14659                        ));
14660                    }
14661                    #[allow(irrefutable_let_patterns)]
14662                    if let UnionWithVector::VectorS3A1(ref mut val) = self {
14663                        fidl::decode!(
14664                            fidl::encoding::UnboundedVector<StructSize3Align1>,
14665                            fidl::encoding::DefaultFuchsiaResourceDialect,
14666                            val,
14667                            decoder,
14668                            _inner_offset,
14669                            depth
14670                        )?;
14671                    } else {
14672                        unreachable!()
14673                    }
14674                }
14675                5 => {
14676                    #[allow(irrefutable_let_patterns)]
14677                    if let UnionWithVector::VectorS3A2(_) = self {
14678                        // Do nothing, read the value into the object
14679                    } else {
14680                        // Initialize `self` to the right variant
14681                        *self = UnionWithVector::VectorS3A2(fidl::new_empty!(
14682                            fidl::encoding::UnboundedVector<StructSize3Align2>,
14683                            fidl::encoding::DefaultFuchsiaResourceDialect
14684                        ));
14685                    }
14686                    #[allow(irrefutable_let_patterns)]
14687                    if let UnionWithVector::VectorS3A2(ref mut val) = self {
14688                        fidl::decode!(
14689                            fidl::encoding::UnboundedVector<StructSize3Align2>,
14690                            fidl::encoding::DefaultFuchsiaResourceDialect,
14691                            val,
14692                            decoder,
14693                            _inner_offset,
14694                            depth
14695                        )?;
14696                    } else {
14697                        unreachable!()
14698                    }
14699                }
14700                6 => {
14701                    #[allow(irrefutable_let_patterns)]
14702                    if let UnionWithVector::Handles(_) = self {
14703                        // Do nothing, read the value into the object
14704                    } else {
14705                        // Initialize `self` to the right variant
14706                        *self = UnionWithVector::Handles(fidl::new_empty!(
14707                            fidl::encoding::UnboundedVector<
14708                                fidl::encoding::HandleType<
14709                                    fidl::NullableHandle,
14710                                    { fidl::ObjectType::NONE.into_raw() },
14711                                    2147483648,
14712                                >,
14713                            >,
14714                            fidl::encoding::DefaultFuchsiaResourceDialect
14715                        ));
14716                    }
14717                    #[allow(irrefutable_let_patterns)]
14718                    if let UnionWithVector::Handles(ref mut val) = self {
14719                        fidl::decode!(
14720                            fidl::encoding::UnboundedVector<
14721                                fidl::encoding::HandleType<
14722                                    fidl::NullableHandle,
14723                                    { fidl::ObjectType::NONE.into_raw() },
14724                                    2147483648,
14725                                >,
14726                            >,
14727                            fidl::encoding::DefaultFuchsiaResourceDialect,
14728                            val,
14729                            decoder,
14730                            _inner_offset,
14731                            depth
14732                        )?;
14733                    } else {
14734                        unreachable!()
14735                    }
14736                }
14737                7 => {
14738                    #[allow(irrefutable_let_patterns)]
14739                    if let UnionWithVector::ArrayS3A1(_) = self {
14740                        // Do nothing, read the value into the object
14741                    } else {
14742                        // Initialize `self` to the right variant
14743                        *self = UnionWithVector::ArrayS3A1(
14744                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14745                        );
14746                    }
14747                    #[allow(irrefutable_let_patterns)]
14748                    if let UnionWithVector::ArrayS3A1(ref mut val) = self {
14749                        fidl::decode!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14750                    } else {
14751                        unreachable!()
14752                    }
14753                }
14754                8 => {
14755                    #[allow(irrefutable_let_patterns)]
14756                    if let UnionWithVector::ArrayS3A2(_) = self {
14757                        // Do nothing, read the value into the object
14758                    } else {
14759                        // Initialize `self` to the right variant
14760                        *self = UnionWithVector::ArrayS3A2(
14761                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14762                        );
14763                    }
14764                    #[allow(irrefutable_let_patterns)]
14765                    if let UnionWithVector::ArrayS3A2(ref mut val) = self {
14766                        fidl::decode!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14767                    } else {
14768                        unreachable!()
14769                    }
14770                }
14771                9 => {
14772                    #[allow(irrefutable_let_patterns)]
14773                    if let UnionWithVector::VectorUnion(_) = self {
14774                        // Do nothing, read the value into the object
14775                    } else {
14776                        // Initialize `self` to the right variant
14777                        *self = UnionWithVector::VectorUnion(fidl::new_empty!(
14778                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
14779                            fidl::encoding::DefaultFuchsiaResourceDialect
14780                        ));
14781                    }
14782                    #[allow(irrefutable_let_patterns)]
14783                    if let UnionWithVector::VectorUnion(ref mut val) = self {
14784                        fidl::decode!(
14785                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
14786                            fidl::encoding::DefaultFuchsiaResourceDialect,
14787                            val,
14788                            decoder,
14789                            _inner_offset,
14790                            depth
14791                        )?;
14792                    } else {
14793                        unreachable!()
14794                    }
14795                }
14796                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14797            }
14798            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14799                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14800            }
14801            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14802                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14803            }
14804            Ok(())
14805        }
14806    }
14807
14808    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14809        type Borrowed<'a> = &'a mut Self;
14810        fn take_or_borrow<'a>(
14811            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14812        ) -> Self::Borrowed<'a> {
14813            value
14814        }
14815    }
14816
14817    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14818        type Owned = Self;
14819
14820        #[inline(always)]
14821        fn inline_align(_context: fidl::encoding::Context) -> usize {
14822            8
14823        }
14824
14825        #[inline(always)]
14826        fn inline_size(_context: fidl::encoding::Context) -> usize {
14827            16
14828        }
14829    }
14830
14831    unsafe impl
14832        fidl::encoding::Encode<
14833            VectorOfArrayOfEventInUnionWithReducedRights,
14834            fidl::encoding::DefaultFuchsiaResourceDialect,
14835        > for &mut VectorOfArrayOfEventInUnionWithReducedRights
14836    {
14837        #[inline]
14838        unsafe fn encode(
14839            self,
14840            encoder: &mut fidl::encoding::Encoder<
14841                '_,
14842                fidl::encoding::DefaultFuchsiaResourceDialect,
14843            >,
14844            offset: usize,
14845            _depth: fidl::encoding::Depth,
14846        ) -> fidl::Result<()> {
14847            encoder.debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRights>(offset);
14848            encoder.write_num::<u64>(self.ordinal(), offset);
14849            match self {
14850                VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) => {
14851                    fidl::encoding::encode_in_envelope::<
14852                        fidl::encoding::Vector<
14853                            fidl::encoding::Array<
14854                                fidl::encoding::HandleType<
14855                                    fidl::Event,
14856                                    { fidl::ObjectType::EVENT.into_raw() },
14857                                    49155,
14858                                >,
14859                                1,
14860                            >,
14861                            1,
14862                        >,
14863                        fidl::encoding::DefaultFuchsiaResourceDialect,
14864                    >(
14865                        <fidl::encoding::Vector<
14866                            fidl::encoding::Array<
14867                                fidl::encoding::HandleType<
14868                                    fidl::Event,
14869                                    { fidl::ObjectType::EVENT.into_raw() },
14870                                    49155,
14871                                >,
14872                                1,
14873                            >,
14874                            1,
14875                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14876                            val
14877                        ),
14878                        encoder,
14879                        offset + 8,
14880                        _depth,
14881                    )
14882                }
14883            }
14884        }
14885    }
14886
14887    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14888        for VectorOfArrayOfEventInUnionWithReducedRights
14889    {
14890        #[inline(always)]
14891        fn new_empty() -> Self {
14892            Self::H(fidl::new_empty!(
14893                fidl::encoding::Vector<
14894                    fidl::encoding::Array<
14895                        fidl::encoding::HandleType<
14896                            fidl::Event,
14897                            { fidl::ObjectType::EVENT.into_raw() },
14898                            49155,
14899                        >,
14900                        1,
14901                    >,
14902                    1,
14903                >,
14904                fidl::encoding::DefaultFuchsiaResourceDialect
14905            ))
14906        }
14907
14908        #[inline]
14909        unsafe fn decode(
14910            &mut self,
14911            decoder: &mut fidl::encoding::Decoder<
14912                '_,
14913                fidl::encoding::DefaultFuchsiaResourceDialect,
14914            >,
14915            offset: usize,
14916            mut depth: fidl::encoding::Depth,
14917        ) -> fidl::Result<()> {
14918            decoder.debug_check_bounds::<Self>(offset);
14919            #[allow(unused_variables)]
14920            let next_out_of_line = decoder.next_out_of_line();
14921            let handles_before = decoder.remaining_handles();
14922            let (ordinal, inlined, num_bytes, num_handles) =
14923                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14924
14925            let member_inline_size = match ordinal {
14926                1 => <fidl::encoding::Vector<
14927                    fidl::encoding::Array<
14928                        fidl::encoding::HandleType<
14929                            fidl::Event,
14930                            { fidl::ObjectType::EVENT.into_raw() },
14931                            49155,
14932                        >,
14933                        1,
14934                    >,
14935                    1,
14936                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14937                _ => return Err(fidl::Error::UnknownUnionTag),
14938            };
14939
14940            if inlined != (member_inline_size <= 4) {
14941                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14942            }
14943            let _inner_offset;
14944            if inlined {
14945                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14946                _inner_offset = offset + 8;
14947            } else {
14948                depth.increment()?;
14949                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14950            }
14951            match ordinal {
14952                1 => {
14953                    #[allow(irrefutable_let_patterns)]
14954                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(_) = self {
14955                        // Do nothing, read the value into the object
14956                    } else {
14957                        // Initialize `self` to the right variant
14958                        *self = VectorOfArrayOfEventInUnionWithReducedRights::H(fidl::new_empty!(
14959                            fidl::encoding::Vector<
14960                                fidl::encoding::Array<
14961                                    fidl::encoding::HandleType<
14962                                        fidl::Event,
14963                                        { fidl::ObjectType::EVENT.into_raw() },
14964                                        49155,
14965                                    >,
14966                                    1,
14967                                >,
14968                                1,
14969                            >,
14970                            fidl::encoding::DefaultFuchsiaResourceDialect
14971                        ));
14972                    }
14973                    #[allow(irrefutable_let_patterns)]
14974                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) = self {
14975                        fidl::decode!(
14976                            fidl::encoding::Vector<
14977                                fidl::encoding::Array<
14978                                    fidl::encoding::HandleType<
14979                                        fidl::Event,
14980                                        { fidl::ObjectType::EVENT.into_raw() },
14981                                        49155,
14982                                    >,
14983                                    1,
14984                                >,
14985                                1,
14986                            >,
14987                            fidl::encoding::DefaultFuchsiaResourceDialect,
14988                            val,
14989                            decoder,
14990                            _inner_offset,
14991                            depth
14992                        )?;
14993                    } else {
14994                        unreachable!()
14995                    }
14996                }
14997                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14998            }
14999            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15000                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15001            }
15002            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15003                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15004            }
15005            Ok(())
15006        }
15007    }
15008}