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::Handle,
17    pub failure_trigger1: String,
18    pub h2: fidl::Handle,
19    pub failure_trigger2: String,
20    pub h3: fidl::Handle,
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::Handle; 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::Handle; 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::Handle; 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::Handle>; 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::Handle>; 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::Handle>,
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::Handle>>,
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::Handle>,
217    pub f17: fidl::Handle,
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::Handle>,
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::Handle>,
272    pub vh1: Vec<fidl::Handle>,
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::Handle>>,
283    pub vh1: Option<Vec<fidl::Handle>>,
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::Handle,
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::Handle,
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::Handle>,
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::Handle,
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::Handle; 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::Handle>,
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::Handle,
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::Handle,
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::Handle>,
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::Handle>,
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::Handle>>,
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::Handle>,
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::Handle>>,
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::Handle>,
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    #[deprecated = "Strict unions should not use `is_unknown`"]
728    #[inline]
729    pub fn is_unknown(&self) -> bool {
730        false
731    }
732}
733
734impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
735    for ArrayOfVectorOfEventInUnionWithDefaultRights
736{
737}
738
739#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
740pub enum ArrayOfVectorOfEventInUnionWithReducedRights {
741    H([Vec<fidl::Event>; 1]),
742}
743
744impl ArrayOfVectorOfEventInUnionWithReducedRights {
745    #[inline]
746    pub fn ordinal(&self) -> u64 {
747        match *self {
748            Self::H(_) => 1,
749        }
750    }
751
752    #[deprecated = "Strict unions should not use `is_unknown`"]
753    #[inline]
754    pub fn is_unknown(&self) -> bool {
755        false
756    }
757}
758
759impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
760    for ArrayOfVectorOfEventInUnionWithReducedRights
761{
762}
763
764#[derive(Debug)]
765pub enum EnvelopeInliningTestUnion {
766    Small(u32),
767    Large(u64),
768    Handle(fidl::Handle),
769    #[doc(hidden)]
770    __SourceBreaking {
771        unknown_ordinal: u64,
772    },
773}
774
775/// Pattern that matches an unknown `EnvelopeInliningTestUnion` member.
776#[macro_export]
777macro_rules! EnvelopeInliningTestUnionUnknown {
778    () => {
779        _
780    };
781}
782
783// Custom PartialEq so that unknown variants are not equal to themselves.
784impl PartialEq for EnvelopeInliningTestUnion {
785    fn eq(&self, other: &Self) -> bool {
786        match (self, other) {
787            (Self::Small(x), Self::Small(y)) => *x == *y,
788            (Self::Large(x), Self::Large(y)) => *x == *y,
789            (Self::Handle(x), Self::Handle(y)) => *x == *y,
790            _ => false,
791        }
792    }
793}
794
795impl EnvelopeInliningTestUnion {
796    #[inline]
797    pub fn ordinal(&self) -> u64 {
798        match *self {
799            Self::Small(_) => 1,
800            Self::Large(_) => 2,
801            Self::Handle(_) => 3,
802            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
803        }
804    }
805
806    #[inline]
807    pub fn unknown_variant_for_testing() -> Self {
808        Self::__SourceBreaking { unknown_ordinal: 0 }
809    }
810
811    #[inline]
812    pub fn is_unknown(&self) -> bool {
813        match self {
814            Self::__SourceBreaking { .. } => true,
815            _ => false,
816        }
817    }
818}
819
820impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EnvelopeInliningTestUnion {}
821
822#[derive(Debug)]
823pub enum SampleResourceXUnion {
824    U(u32),
825    Su(SimpleUnion),
826    St(SimpleTable),
827    #[doc(hidden)]
828    __SourceBreaking {
829        unknown_ordinal: u64,
830    },
831}
832
833/// Pattern that matches an unknown `SampleResourceXUnion` member.
834#[macro_export]
835macro_rules! SampleResourceXUnionUnknown {
836    () => {
837        _
838    };
839}
840
841// Custom PartialEq so that unknown variants are not equal to themselves.
842impl PartialEq for SampleResourceXUnion {
843    fn eq(&self, other: &Self) -> bool {
844        match (self, other) {
845            (Self::U(x), Self::U(y)) => *x == *y,
846            (Self::Su(x), Self::Su(y)) => *x == *y,
847            (Self::St(x), Self::St(y)) => *x == *y,
848            _ => false,
849        }
850    }
851}
852
853impl SampleResourceXUnion {
854    #[inline]
855    pub fn ordinal(&self) -> u64 {
856        match *self {
857            Self::U(_) => 1,
858            Self::Su(_) => 2,
859            Self::St(_) => 3,
860            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
861        }
862    }
863
864    #[inline]
865    pub fn unknown_variant_for_testing() -> Self {
866        Self::__SourceBreaking { unknown_ordinal: 0 }
867    }
868
869    #[inline]
870    pub fn is_unknown(&self) -> bool {
871        match self {
872            Self::__SourceBreaking { .. } => true,
873            _ => false,
874        }
875    }
876}
877
878impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SampleResourceXUnion {}
879
880#[derive(Debug, PartialEq)]
881pub enum SampleStrictResourceXUnion {
882    U(u32),
883    Su(SimpleUnion),
884    St(SimpleTable),
885}
886
887impl SampleStrictResourceXUnion {
888    #[inline]
889    pub fn ordinal(&self) -> u64 {
890        match *self {
891            Self::U(_) => 1,
892            Self::Su(_) => 2,
893            Self::St(_) => 3,
894        }
895    }
896
897    #[deprecated = "Strict unions should not use `is_unknown`"]
898    #[inline]
899    pub fn is_unknown(&self) -> bool {
900        false
901    }
902}
903
904impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
905    for SampleStrictResourceXUnion
906{
907}
908
909#[derive(Debug)]
910pub enum UnionOfEndpointsUnion {
911    ClientEnd(fidl::endpoints::ClientEnd<ProtocolMarker>),
912    ServerEnd(fidl::endpoints::ServerEnd<ProtocolMarker>),
913    #[doc(hidden)]
914    __SourceBreaking {
915        unknown_ordinal: u64,
916    },
917}
918
919/// Pattern that matches an unknown `UnionOfEndpointsUnion` member.
920#[macro_export]
921macro_rules! UnionOfEndpointsUnionUnknown {
922    () => {
923        _
924    };
925}
926
927// Custom PartialEq so that unknown variants are not equal to themselves.
928impl PartialEq for UnionOfEndpointsUnion {
929    fn eq(&self, other: &Self) -> bool {
930        match (self, other) {
931            (Self::ClientEnd(x), Self::ClientEnd(y)) => *x == *y,
932            (Self::ServerEnd(x), Self::ServerEnd(y)) => *x == *y,
933            _ => false,
934        }
935    }
936}
937
938impl UnionOfEndpointsUnion {
939    #[inline]
940    pub fn ordinal(&self) -> u64 {
941        match *self {
942            Self::ClientEnd(_) => 1,
943            Self::ServerEnd(_) => 2,
944            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
945        }
946    }
947
948    #[inline]
949    pub fn unknown_variant_for_testing() -> Self {
950        Self::__SourceBreaking { unknown_ordinal: 0 }
951    }
952
953    #[inline]
954    pub fn is_unknown(&self) -> bool {
955        match self {
956            Self::__SourceBreaking { .. } => true,
957            _ => false,
958        }
959    }
960}
961
962impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpointsUnion {}
963
964#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
965pub enum UnionOfHandle {
966    H(fidl::Handle),
967}
968
969impl UnionOfHandle {
970    #[inline]
971    pub fn ordinal(&self) -> u64 {
972        match *self {
973            Self::H(_) => 1,
974        }
975    }
976
977    #[deprecated = "Strict unions should not use `is_unknown`"]
978    #[inline]
979    pub fn is_unknown(&self) -> bool {
980        false
981    }
982}
983
984impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {}
985
986#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
987pub enum UnionWithVector {
988    Unused(u8),
989    VectorOfUint8(Vec<u8>),
990    S(String),
991    VectorS3A1(Vec<StructSize3Align1>),
992    VectorS3A2(Vec<StructSize3Align2>),
993    Handles(Vec<fidl::Handle>),
994    ArrayS3A1([StructSize3Align1; 2]),
995    ArrayS3A2([StructSize3Align2; 2]),
996    VectorUnion(Vec<UnionSize8Align4>),
997}
998
999impl UnionWithVector {
1000    #[inline]
1001    pub fn ordinal(&self) -> u64 {
1002        match *self {
1003            Self::Unused(_) => 1,
1004            Self::VectorOfUint8(_) => 2,
1005            Self::S(_) => 3,
1006            Self::VectorS3A1(_) => 4,
1007            Self::VectorS3A2(_) => 5,
1008            Self::Handles(_) => 6,
1009            Self::ArrayS3A1(_) => 7,
1010            Self::ArrayS3A2(_) => 8,
1011            Self::VectorUnion(_) => 9,
1012        }
1013    }
1014
1015    #[deprecated = "Strict unions should not use `is_unknown`"]
1016    #[inline]
1017    pub fn is_unknown(&self) -> bool {
1018        false
1019    }
1020}
1021
1022impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionWithVector {}
1023
1024#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1025pub enum VectorOfArrayOfEventInUnionWithReducedRights {
1026    H(Vec<[fidl::Event; 1]>),
1027}
1028
1029impl VectorOfArrayOfEventInUnionWithReducedRights {
1030    #[inline]
1031    pub fn ordinal(&self) -> u64 {
1032        match *self {
1033            Self::H(_) => 1,
1034        }
1035    }
1036
1037    #[deprecated = "Strict unions should not use `is_unknown`"]
1038    #[inline]
1039    pub fn is_unknown(&self) -> bool {
1040        false
1041    }
1042}
1043
1044impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
1045    for VectorOfArrayOfEventInUnionWithReducedRights
1046{
1047}
1048
1049#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1050pub struct ComponentControllerMarker;
1051
1052impl fidl::endpoints::ProtocolMarker for ComponentControllerMarker {
1053    type Proxy = ComponentControllerProxy;
1054    type RequestStream = ComponentControllerRequestStream;
1055    #[cfg(target_os = "fuchsia")]
1056    type SynchronousProxy = ComponentControllerSynchronousProxy;
1057
1058    const DEBUG_NAME: &'static str = "(anonymous) ComponentController";
1059}
1060
1061pub trait ComponentControllerProxyInterface: Send + Sync {}
1062#[derive(Debug)]
1063#[cfg(target_os = "fuchsia")]
1064pub struct ComponentControllerSynchronousProxy {
1065    client: fidl::client::sync::Client,
1066}
1067
1068#[cfg(target_os = "fuchsia")]
1069impl fidl::endpoints::SynchronousProxy for ComponentControllerSynchronousProxy {
1070    type Proxy = ComponentControllerProxy;
1071    type Protocol = ComponentControllerMarker;
1072
1073    fn from_channel(inner: fidl::Channel) -> Self {
1074        Self::new(inner)
1075    }
1076
1077    fn into_channel(self) -> fidl::Channel {
1078        self.client.into_channel()
1079    }
1080
1081    fn as_channel(&self) -> &fidl::Channel {
1082        self.client.as_channel()
1083    }
1084}
1085
1086#[cfg(target_os = "fuchsia")]
1087impl ComponentControllerSynchronousProxy {
1088    pub fn new(channel: fidl::Channel) -> Self {
1089        let protocol_name =
1090            <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1091        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1092    }
1093
1094    pub fn into_channel(self) -> fidl::Channel {
1095        self.client.into_channel()
1096    }
1097
1098    /// Waits until an event arrives and returns it. It is safe for other
1099    /// threads to make concurrent requests while waiting for an event.
1100    pub fn wait_for_event(
1101        &self,
1102        deadline: zx::MonotonicInstant,
1103    ) -> Result<ComponentControllerEvent, fidl::Error> {
1104        ComponentControllerEvent::decode(self.client.wait_for_event(deadline)?)
1105    }
1106}
1107
1108#[cfg(target_os = "fuchsia")]
1109impl From<ComponentControllerSynchronousProxy> for zx::Handle {
1110    fn from(value: ComponentControllerSynchronousProxy) -> Self {
1111        value.into_channel().into()
1112    }
1113}
1114
1115#[cfg(target_os = "fuchsia")]
1116impl From<fidl::Channel> for ComponentControllerSynchronousProxy {
1117    fn from(value: fidl::Channel) -> Self {
1118        Self::new(value)
1119    }
1120}
1121
1122#[derive(Debug, Clone)]
1123pub struct ComponentControllerProxy {
1124    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1125}
1126
1127impl fidl::endpoints::Proxy for ComponentControllerProxy {
1128    type Protocol = ComponentControllerMarker;
1129
1130    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1131        Self::new(inner)
1132    }
1133
1134    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1135        self.client.into_channel().map_err(|client| Self { client })
1136    }
1137
1138    fn as_channel(&self) -> &::fidl::AsyncChannel {
1139        self.client.as_channel()
1140    }
1141}
1142
1143impl ComponentControllerProxy {
1144    /// Create a new Proxy for test.conformance/ComponentController.
1145    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1146        let protocol_name =
1147            <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1148        Self { client: fidl::client::Client::new(channel, protocol_name) }
1149    }
1150
1151    /// Get a Stream of events from the remote end of the protocol.
1152    ///
1153    /// # Panics
1154    ///
1155    /// Panics if the event stream was already taken.
1156    pub fn take_event_stream(&self) -> ComponentControllerEventStream {
1157        ComponentControllerEventStream { event_receiver: self.client.take_event_receiver() }
1158    }
1159}
1160
1161impl ComponentControllerProxyInterface for ComponentControllerProxy {}
1162
1163pub struct ComponentControllerEventStream {
1164    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1165}
1166
1167impl std::marker::Unpin for ComponentControllerEventStream {}
1168
1169impl futures::stream::FusedStream for ComponentControllerEventStream {
1170    fn is_terminated(&self) -> bool {
1171        self.event_receiver.is_terminated()
1172    }
1173}
1174
1175impl futures::Stream for ComponentControllerEventStream {
1176    type Item = Result<ComponentControllerEvent, fidl::Error>;
1177
1178    fn poll_next(
1179        mut self: std::pin::Pin<&mut Self>,
1180        cx: &mut std::task::Context<'_>,
1181    ) -> std::task::Poll<Option<Self::Item>> {
1182        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1183            &mut self.event_receiver,
1184            cx
1185        )?) {
1186            Some(buf) => std::task::Poll::Ready(Some(ComponentControllerEvent::decode(buf))),
1187            None => std::task::Poll::Ready(None),
1188        }
1189    }
1190}
1191
1192#[derive(Debug)]
1193pub enum ComponentControllerEvent {}
1194
1195impl ComponentControllerEvent {
1196    /// Decodes a message buffer as a [`ComponentControllerEvent`].
1197    fn decode(
1198        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1199    ) -> Result<ComponentControllerEvent, fidl::Error> {
1200        let (bytes, _handles) = buf.split_mut();
1201        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1202        debug_assert_eq!(tx_header.tx_id, 0);
1203        match tx_header.ordinal {
1204            _ => Err(fidl::Error::UnknownOrdinal {
1205                ordinal: tx_header.ordinal,
1206                protocol_name:
1207                    <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1208            }),
1209        }
1210    }
1211}
1212
1213/// A Stream of incoming requests for test.conformance/ComponentController.
1214pub struct ComponentControllerRequestStream {
1215    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1216    is_terminated: bool,
1217}
1218
1219impl std::marker::Unpin for ComponentControllerRequestStream {}
1220
1221impl futures::stream::FusedStream for ComponentControllerRequestStream {
1222    fn is_terminated(&self) -> bool {
1223        self.is_terminated
1224    }
1225}
1226
1227impl fidl::endpoints::RequestStream for ComponentControllerRequestStream {
1228    type Protocol = ComponentControllerMarker;
1229    type ControlHandle = ComponentControllerControlHandle;
1230
1231    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1232        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1233    }
1234
1235    fn control_handle(&self) -> Self::ControlHandle {
1236        ComponentControllerControlHandle { inner: self.inner.clone() }
1237    }
1238
1239    fn into_inner(
1240        self,
1241    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1242    {
1243        (self.inner, self.is_terminated)
1244    }
1245
1246    fn from_inner(
1247        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1248        is_terminated: bool,
1249    ) -> Self {
1250        Self { inner, is_terminated }
1251    }
1252}
1253
1254impl futures::Stream for ComponentControllerRequestStream {
1255    type Item = Result<ComponentControllerRequest, fidl::Error>;
1256
1257    fn poll_next(
1258        mut self: std::pin::Pin<&mut Self>,
1259        cx: &mut std::task::Context<'_>,
1260    ) -> std::task::Poll<Option<Self::Item>> {
1261        let this = &mut *self;
1262        if this.inner.check_shutdown(cx) {
1263            this.is_terminated = true;
1264            return std::task::Poll::Ready(None);
1265        }
1266        if this.is_terminated {
1267            panic!("polled ComponentControllerRequestStream after completion");
1268        }
1269        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1270            |bytes, handles| {
1271                match this.inner.channel().read_etc(cx, bytes, handles) {
1272                    std::task::Poll::Ready(Ok(())) => {}
1273                    std::task::Poll::Pending => return std::task::Poll::Pending,
1274                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1275                        this.is_terminated = true;
1276                        return std::task::Poll::Ready(None);
1277                    }
1278                    std::task::Poll::Ready(Err(e)) => {
1279                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1280                            e.into(),
1281                        ))))
1282                    }
1283                }
1284
1285                // A message has been received from the channel
1286                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1287
1288                std::task::Poll::Ready(Some(match header.ordinal {
1289                _ => Err(fidl::Error::UnknownOrdinal {
1290                    ordinal: header.ordinal,
1291                    protocol_name: <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1292                }),
1293            }))
1294            },
1295        )
1296    }
1297}
1298
1299#[derive(Debug)]
1300pub enum ComponentControllerRequest {}
1301
1302impl ComponentControllerRequest {
1303    /// Name of the method defined in FIDL
1304    pub fn method_name(&self) -> &'static str {
1305        match *self {}
1306    }
1307}
1308
1309#[derive(Debug, Clone)]
1310pub struct ComponentControllerControlHandle {
1311    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1312}
1313
1314impl fidl::endpoints::ControlHandle for ComponentControllerControlHandle {
1315    fn shutdown(&self) {
1316        self.inner.shutdown()
1317    }
1318    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1319        self.inner.shutdown_with_epitaph(status)
1320    }
1321
1322    fn is_closed(&self) -> bool {
1323        self.inner.channel().is_closed()
1324    }
1325    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1326        self.inner.channel().on_closed()
1327    }
1328
1329    #[cfg(target_os = "fuchsia")]
1330    fn signal_peer(
1331        &self,
1332        clear_mask: zx::Signals,
1333        set_mask: zx::Signals,
1334    ) -> Result<(), zx_status::Status> {
1335        use fidl::Peered;
1336        self.inner.channel().signal_peer(clear_mask, set_mask)
1337    }
1338}
1339
1340impl ComponentControllerControlHandle {}
1341
1342#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1343pub struct ProtocolMarker;
1344
1345impl fidl::endpoints::ProtocolMarker for ProtocolMarker {
1346    type Proxy = ProtocolProxy;
1347    type RequestStream = ProtocolRequestStream;
1348    #[cfg(target_os = "fuchsia")]
1349    type SynchronousProxy = ProtocolSynchronousProxy;
1350
1351    const DEBUG_NAME: &'static str = "(anonymous) Protocol";
1352}
1353
1354pub trait ProtocolProxyInterface: Send + Sync {}
1355#[derive(Debug)]
1356#[cfg(target_os = "fuchsia")]
1357pub struct ProtocolSynchronousProxy {
1358    client: fidl::client::sync::Client,
1359}
1360
1361#[cfg(target_os = "fuchsia")]
1362impl fidl::endpoints::SynchronousProxy for ProtocolSynchronousProxy {
1363    type Proxy = ProtocolProxy;
1364    type Protocol = ProtocolMarker;
1365
1366    fn from_channel(inner: fidl::Channel) -> Self {
1367        Self::new(inner)
1368    }
1369
1370    fn into_channel(self) -> fidl::Channel {
1371        self.client.into_channel()
1372    }
1373
1374    fn as_channel(&self) -> &fidl::Channel {
1375        self.client.as_channel()
1376    }
1377}
1378
1379#[cfg(target_os = "fuchsia")]
1380impl ProtocolSynchronousProxy {
1381    pub fn new(channel: fidl::Channel) -> Self {
1382        let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1383        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1384    }
1385
1386    pub fn into_channel(self) -> fidl::Channel {
1387        self.client.into_channel()
1388    }
1389
1390    /// Waits until an event arrives and returns it. It is safe for other
1391    /// threads to make concurrent requests while waiting for an event.
1392    pub fn wait_for_event(
1393        &self,
1394        deadline: zx::MonotonicInstant,
1395    ) -> Result<ProtocolEvent, fidl::Error> {
1396        ProtocolEvent::decode(self.client.wait_for_event(deadline)?)
1397    }
1398}
1399
1400#[cfg(target_os = "fuchsia")]
1401impl From<ProtocolSynchronousProxy> for zx::Handle {
1402    fn from(value: ProtocolSynchronousProxy) -> Self {
1403        value.into_channel().into()
1404    }
1405}
1406
1407#[cfg(target_os = "fuchsia")]
1408impl From<fidl::Channel> for ProtocolSynchronousProxy {
1409    fn from(value: fidl::Channel) -> Self {
1410        Self::new(value)
1411    }
1412}
1413
1414#[derive(Debug, Clone)]
1415pub struct ProtocolProxy {
1416    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1417}
1418
1419impl fidl::endpoints::Proxy for ProtocolProxy {
1420    type Protocol = ProtocolMarker;
1421
1422    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1423        Self::new(inner)
1424    }
1425
1426    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1427        self.client.into_channel().map_err(|client| Self { client })
1428    }
1429
1430    fn as_channel(&self) -> &::fidl::AsyncChannel {
1431        self.client.as_channel()
1432    }
1433}
1434
1435impl ProtocolProxy {
1436    /// Create a new Proxy for test.conformance/Protocol.
1437    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1438        let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1439        Self { client: fidl::client::Client::new(channel, protocol_name) }
1440    }
1441
1442    /// Get a Stream of events from the remote end of the protocol.
1443    ///
1444    /// # Panics
1445    ///
1446    /// Panics if the event stream was already taken.
1447    pub fn take_event_stream(&self) -> ProtocolEventStream {
1448        ProtocolEventStream { event_receiver: self.client.take_event_receiver() }
1449    }
1450}
1451
1452impl ProtocolProxyInterface for ProtocolProxy {}
1453
1454pub struct ProtocolEventStream {
1455    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1456}
1457
1458impl std::marker::Unpin for ProtocolEventStream {}
1459
1460impl futures::stream::FusedStream for ProtocolEventStream {
1461    fn is_terminated(&self) -> bool {
1462        self.event_receiver.is_terminated()
1463    }
1464}
1465
1466impl futures::Stream for ProtocolEventStream {
1467    type Item = Result<ProtocolEvent, fidl::Error>;
1468
1469    fn poll_next(
1470        mut self: std::pin::Pin<&mut Self>,
1471        cx: &mut std::task::Context<'_>,
1472    ) -> std::task::Poll<Option<Self::Item>> {
1473        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1474            &mut self.event_receiver,
1475            cx
1476        )?) {
1477            Some(buf) => std::task::Poll::Ready(Some(ProtocolEvent::decode(buf))),
1478            None => std::task::Poll::Ready(None),
1479        }
1480    }
1481}
1482
1483#[derive(Debug)]
1484pub enum ProtocolEvent {}
1485
1486impl ProtocolEvent {
1487    /// Decodes a message buffer as a [`ProtocolEvent`].
1488    fn decode(
1489        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1490    ) -> Result<ProtocolEvent, fidl::Error> {
1491        let (bytes, _handles) = buf.split_mut();
1492        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1493        debug_assert_eq!(tx_header.tx_id, 0);
1494        match tx_header.ordinal {
1495            _ => Err(fidl::Error::UnknownOrdinal {
1496                ordinal: tx_header.ordinal,
1497                protocol_name: <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1498            }),
1499        }
1500    }
1501}
1502
1503/// A Stream of incoming requests for test.conformance/Protocol.
1504pub struct ProtocolRequestStream {
1505    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1506    is_terminated: bool,
1507}
1508
1509impl std::marker::Unpin for ProtocolRequestStream {}
1510
1511impl futures::stream::FusedStream for ProtocolRequestStream {
1512    fn is_terminated(&self) -> bool {
1513        self.is_terminated
1514    }
1515}
1516
1517impl fidl::endpoints::RequestStream for ProtocolRequestStream {
1518    type Protocol = ProtocolMarker;
1519    type ControlHandle = ProtocolControlHandle;
1520
1521    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1522        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1523    }
1524
1525    fn control_handle(&self) -> Self::ControlHandle {
1526        ProtocolControlHandle { inner: self.inner.clone() }
1527    }
1528
1529    fn into_inner(
1530        self,
1531    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1532    {
1533        (self.inner, self.is_terminated)
1534    }
1535
1536    fn from_inner(
1537        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1538        is_terminated: bool,
1539    ) -> Self {
1540        Self { inner, is_terminated }
1541    }
1542}
1543
1544impl futures::Stream for ProtocolRequestStream {
1545    type Item = Result<ProtocolRequest, fidl::Error>;
1546
1547    fn poll_next(
1548        mut self: std::pin::Pin<&mut Self>,
1549        cx: &mut std::task::Context<'_>,
1550    ) -> std::task::Poll<Option<Self::Item>> {
1551        let this = &mut *self;
1552        if this.inner.check_shutdown(cx) {
1553            this.is_terminated = true;
1554            return std::task::Poll::Ready(None);
1555        }
1556        if this.is_terminated {
1557            panic!("polled ProtocolRequestStream after completion");
1558        }
1559        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1560            |bytes, handles| {
1561                match this.inner.channel().read_etc(cx, bytes, handles) {
1562                    std::task::Poll::Ready(Ok(())) => {}
1563                    std::task::Poll::Pending => return std::task::Poll::Pending,
1564                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1565                        this.is_terminated = true;
1566                        return std::task::Poll::Ready(None);
1567                    }
1568                    std::task::Poll::Ready(Err(e)) => {
1569                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1570                            e.into(),
1571                        ))))
1572                    }
1573                }
1574
1575                // A message has been received from the channel
1576                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1577
1578                std::task::Poll::Ready(Some(match header.ordinal {
1579                    _ => Err(fidl::Error::UnknownOrdinal {
1580                        ordinal: header.ordinal,
1581                        protocol_name:
1582                            <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1583                    }),
1584                }))
1585            },
1586        )
1587    }
1588}
1589
1590#[derive(Debug)]
1591pub enum ProtocolRequest {}
1592
1593impl ProtocolRequest {
1594    /// Name of the method defined in FIDL
1595    pub fn method_name(&self) -> &'static str {
1596        match *self {}
1597    }
1598}
1599
1600#[derive(Debug, Clone)]
1601pub struct ProtocolControlHandle {
1602    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1603}
1604
1605impl fidl::endpoints::ControlHandle for ProtocolControlHandle {
1606    fn shutdown(&self) {
1607        self.inner.shutdown()
1608    }
1609    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1610        self.inner.shutdown_with_epitaph(status)
1611    }
1612
1613    fn is_closed(&self) -> bool {
1614        self.inner.channel().is_closed()
1615    }
1616    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1617        self.inner.channel().on_closed()
1618    }
1619
1620    #[cfg(target_os = "fuchsia")]
1621    fn signal_peer(
1622        &self,
1623        clear_mask: zx::Signals,
1624        set_mask: zx::Signals,
1625    ) -> Result<(), zx_status::Status> {
1626        use fidl::Peered;
1627        self.inner.channel().signal_peer(clear_mask, set_mask)
1628    }
1629}
1630
1631impl ProtocolControlHandle {}
1632
1633mod internal {
1634    use super::*;
1635
1636    impl fidl::encoding::ResourceTypeMarker for AlternatingHandlesAndFailures {
1637        type Borrowed<'a> = &'a mut Self;
1638        fn take_or_borrow<'a>(
1639            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1640        ) -> Self::Borrowed<'a> {
1641            value
1642        }
1643    }
1644
1645    unsafe impl fidl::encoding::TypeMarker for AlternatingHandlesAndFailures {
1646        type Owned = Self;
1647
1648        #[inline(always)]
1649        fn inline_align(_context: fidl::encoding::Context) -> usize {
1650            8
1651        }
1652
1653        #[inline(always)]
1654        fn inline_size(_context: fidl::encoding::Context) -> usize {
1655            56
1656        }
1657    }
1658
1659    unsafe impl
1660        fidl::encoding::Encode<
1661            AlternatingHandlesAndFailures,
1662            fidl::encoding::DefaultFuchsiaResourceDialect,
1663        > for &mut AlternatingHandlesAndFailures
1664    {
1665        #[inline]
1666        unsafe fn encode(
1667            self,
1668            encoder: &mut fidl::encoding::Encoder<
1669                '_,
1670                fidl::encoding::DefaultFuchsiaResourceDialect,
1671            >,
1672            offset: usize,
1673            _depth: fidl::encoding::Depth,
1674        ) -> fidl::Result<()> {
1675            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1676            // Delegate to tuple encoding.
1677            fidl::encoding::Encode::<
1678                AlternatingHandlesAndFailures,
1679                fidl::encoding::DefaultFuchsiaResourceDialect,
1680            >::encode(
1681                (
1682                    <fidl::encoding::HandleType<
1683                        fidl::Handle,
1684                        { fidl::ObjectType::NONE.into_raw() },
1685                        2147483648,
1686                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1687                        &mut self.h1
1688                    ),
1689                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1690                        &self.failure_trigger1,
1691                    ),
1692                    <fidl::encoding::HandleType<
1693                        fidl::Handle,
1694                        { fidl::ObjectType::NONE.into_raw() },
1695                        2147483648,
1696                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1697                        &mut self.h2
1698                    ),
1699                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1700                        &self.failure_trigger2,
1701                    ),
1702                    <fidl::encoding::HandleType<
1703                        fidl::Handle,
1704                        { fidl::ObjectType::NONE.into_raw() },
1705                        2147483648,
1706                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1707                        &mut self.h3
1708                    ),
1709                ),
1710                encoder,
1711                offset,
1712                _depth,
1713            )
1714        }
1715    }
1716    unsafe impl<
1717            T0: fidl::encoding::Encode<
1718                fidl::encoding::HandleType<
1719                    fidl::Handle,
1720                    { fidl::ObjectType::NONE.into_raw() },
1721                    2147483648,
1722                >,
1723                fidl::encoding::DefaultFuchsiaResourceDialect,
1724            >,
1725            T1: fidl::encoding::Encode<
1726                fidl::encoding::BoundedString<1>,
1727                fidl::encoding::DefaultFuchsiaResourceDialect,
1728            >,
1729            T2: fidl::encoding::Encode<
1730                fidl::encoding::HandleType<
1731                    fidl::Handle,
1732                    { fidl::ObjectType::NONE.into_raw() },
1733                    2147483648,
1734                >,
1735                fidl::encoding::DefaultFuchsiaResourceDialect,
1736            >,
1737            T3: fidl::encoding::Encode<
1738                fidl::encoding::BoundedString<1>,
1739                fidl::encoding::DefaultFuchsiaResourceDialect,
1740            >,
1741            T4: fidl::encoding::Encode<
1742                fidl::encoding::HandleType<
1743                    fidl::Handle,
1744                    { fidl::ObjectType::NONE.into_raw() },
1745                    2147483648,
1746                >,
1747                fidl::encoding::DefaultFuchsiaResourceDialect,
1748            >,
1749        >
1750        fidl::encoding::Encode<
1751            AlternatingHandlesAndFailures,
1752            fidl::encoding::DefaultFuchsiaResourceDialect,
1753        > for (T0, T1, T2, T3, T4)
1754    {
1755        #[inline]
1756        unsafe fn encode(
1757            self,
1758            encoder: &mut fidl::encoding::Encoder<
1759                '_,
1760                fidl::encoding::DefaultFuchsiaResourceDialect,
1761            >,
1762            offset: usize,
1763            depth: fidl::encoding::Depth,
1764        ) -> fidl::Result<()> {
1765            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1766            // Zero out padding regions. There's no need to apply masks
1767            // because the unmasked parts will be overwritten by fields.
1768            unsafe {
1769                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1770                (ptr as *mut u64).write_unaligned(0);
1771            }
1772            unsafe {
1773                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1774                (ptr as *mut u64).write_unaligned(0);
1775            }
1776            unsafe {
1777                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
1778                (ptr as *mut u64).write_unaligned(0);
1779            }
1780            // Write the fields.
1781            self.0.encode(encoder, offset + 0, depth)?;
1782            self.1.encode(encoder, offset + 8, depth)?;
1783            self.2.encode(encoder, offset + 24, depth)?;
1784            self.3.encode(encoder, offset + 32, depth)?;
1785            self.4.encode(encoder, offset + 48, depth)?;
1786            Ok(())
1787        }
1788    }
1789
1790    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1791        for AlternatingHandlesAndFailures
1792    {
1793        #[inline(always)]
1794        fn new_empty() -> Self {
1795            Self {
1796                h1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1797                failure_trigger1: fidl::new_empty!(
1798                    fidl::encoding::BoundedString<1>,
1799                    fidl::encoding::DefaultFuchsiaResourceDialect
1800                ),
1801                h2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1802                failure_trigger2: fidl::new_empty!(
1803                    fidl::encoding::BoundedString<1>,
1804                    fidl::encoding::DefaultFuchsiaResourceDialect
1805                ),
1806                h3: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1807            }
1808        }
1809
1810        #[inline]
1811        unsafe fn decode(
1812            &mut self,
1813            decoder: &mut fidl::encoding::Decoder<
1814                '_,
1815                fidl::encoding::DefaultFuchsiaResourceDialect,
1816            >,
1817            offset: usize,
1818            _depth: fidl::encoding::Depth,
1819        ) -> fidl::Result<()> {
1820            decoder.debug_check_bounds::<Self>(offset);
1821            // Verify that padding bytes are zero.
1822            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1823            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1824            let mask = 0xffffffff00000000u64;
1825            let maskedval = padval & mask;
1826            if maskedval != 0 {
1827                return Err(fidl::Error::NonZeroPadding {
1828                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1829                });
1830            }
1831            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1832            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1833            let mask = 0xffffffff00000000u64;
1834            let maskedval = padval & mask;
1835            if maskedval != 0 {
1836                return Err(fidl::Error::NonZeroPadding {
1837                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1838                });
1839            }
1840            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
1841            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1842            let mask = 0xffffffff00000000u64;
1843            let maskedval = padval & mask;
1844            if maskedval != 0 {
1845                return Err(fidl::Error::NonZeroPadding {
1846                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
1847                });
1848            }
1849            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h1, decoder, offset + 0, _depth)?;
1850            fidl::decode!(
1851                fidl::encoding::BoundedString<1>,
1852                fidl::encoding::DefaultFuchsiaResourceDialect,
1853                &mut self.failure_trigger1,
1854                decoder,
1855                offset + 8,
1856                _depth
1857            )?;
1858            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h2, decoder, offset + 24, _depth)?;
1859            fidl::decode!(
1860                fidl::encoding::BoundedString<1>,
1861                fidl::encoding::DefaultFuchsiaResourceDialect,
1862                &mut self.failure_trigger2,
1863                decoder,
1864                offset + 32,
1865                _depth
1866            )?;
1867            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h3, decoder, offset + 48, _depth)?;
1868            Ok(())
1869        }
1870    }
1871
1872    impl fidl::encoding::ResourceTypeMarker for ArrayOfArrayOfNonnullableHandles {
1873        type Borrowed<'a> = &'a mut Self;
1874        fn take_or_borrow<'a>(
1875            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1876        ) -> Self::Borrowed<'a> {
1877            value
1878        }
1879    }
1880
1881    unsafe impl fidl::encoding::TypeMarker for ArrayOfArrayOfNonnullableHandles {
1882        type Owned = Self;
1883
1884        #[inline(always)]
1885        fn inline_align(_context: fidl::encoding::Context) -> usize {
1886            4
1887        }
1888
1889        #[inline(always)]
1890        fn inline_size(_context: fidl::encoding::Context) -> usize {
1891            48
1892        }
1893    }
1894
1895    unsafe impl
1896        fidl::encoding::Encode<
1897            ArrayOfArrayOfNonnullableHandles,
1898            fidl::encoding::DefaultFuchsiaResourceDialect,
1899        > for &mut ArrayOfArrayOfNonnullableHandles
1900    {
1901        #[inline]
1902        unsafe fn encode(
1903            self,
1904            encoder: &mut fidl::encoding::Encoder<
1905                '_,
1906                fidl::encoding::DefaultFuchsiaResourceDialect,
1907            >,
1908            offset: usize,
1909            _depth: fidl::encoding::Depth,
1910        ) -> fidl::Result<()> {
1911            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1912            // Delegate to tuple encoding.
1913            fidl::encoding::Encode::<
1914                ArrayOfArrayOfNonnullableHandles,
1915                fidl::encoding::DefaultFuchsiaResourceDialect,
1916            >::encode(
1917                (<fidl::encoding::Array<
1918                    fidl::encoding::Array<
1919                        fidl::encoding::HandleType<
1920                            fidl::Handle,
1921                            { fidl::ObjectType::NONE.into_raw() },
1922                            2147483648,
1923                        >,
1924                        3,
1925                    >,
1926                    4,
1927                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1928                    &mut self.handles
1929                ),),
1930                encoder,
1931                offset,
1932                _depth,
1933            )
1934        }
1935    }
1936    unsafe impl<
1937            T0: fidl::encoding::Encode<
1938                fidl::encoding::Array<
1939                    fidl::encoding::Array<
1940                        fidl::encoding::HandleType<
1941                            fidl::Handle,
1942                            { fidl::ObjectType::NONE.into_raw() },
1943                            2147483648,
1944                        >,
1945                        3,
1946                    >,
1947                    4,
1948                >,
1949                fidl::encoding::DefaultFuchsiaResourceDialect,
1950            >,
1951        >
1952        fidl::encoding::Encode<
1953            ArrayOfArrayOfNonnullableHandles,
1954            fidl::encoding::DefaultFuchsiaResourceDialect,
1955        > for (T0,)
1956    {
1957        #[inline]
1958        unsafe fn encode(
1959            self,
1960            encoder: &mut fidl::encoding::Encoder<
1961                '_,
1962                fidl::encoding::DefaultFuchsiaResourceDialect,
1963            >,
1964            offset: usize,
1965            depth: fidl::encoding::Depth,
1966        ) -> fidl::Result<()> {
1967            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1968            // Zero out padding regions. There's no need to apply masks
1969            // because the unmasked parts will be overwritten by fields.
1970            // Write the fields.
1971            self.0.encode(encoder, offset + 0, depth)?;
1972            Ok(())
1973        }
1974    }
1975
1976    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1977        for ArrayOfArrayOfNonnullableHandles
1978    {
1979        #[inline(always)]
1980        fn new_empty() -> Self {
1981            Self {
1982                handles: fidl::new_empty!(
1983                    fidl::encoding::Array<
1984                        fidl::encoding::Array<
1985                            fidl::encoding::HandleType<
1986                                fidl::Handle,
1987                                { fidl::ObjectType::NONE.into_raw() },
1988                                2147483648,
1989                            >,
1990                            3,
1991                        >,
1992                        4,
1993                    >,
1994                    fidl::encoding::DefaultFuchsiaResourceDialect
1995                ),
1996            }
1997        }
1998
1999        #[inline]
2000        unsafe fn decode(
2001            &mut self,
2002            decoder: &mut fidl::encoding::Decoder<
2003                '_,
2004                fidl::encoding::DefaultFuchsiaResourceDialect,
2005            >,
2006            offset: usize,
2007            _depth: fidl::encoding::Depth,
2008        ) -> fidl::Result<()> {
2009            decoder.debug_check_bounds::<Self>(offset);
2010            // Verify that padding bytes are zero.
2011            fidl::decode!(
2012                fidl::encoding::Array<
2013                    fidl::encoding::Array<
2014                        fidl::encoding::HandleType<
2015                            fidl::Handle,
2016                            { fidl::ObjectType::NONE.into_raw() },
2017                            2147483648,
2018                        >,
2019                        3,
2020                    >,
2021                    4,
2022                >,
2023                fidl::encoding::DefaultFuchsiaResourceDialect,
2024                &mut self.handles,
2025                decoder,
2026                offset + 0,
2027                _depth
2028            )?;
2029            Ok(())
2030        }
2031    }
2032
2033    impl fidl::encoding::ResourceTypeMarker for ArrayOfHandles {
2034        type Borrowed<'a> = &'a mut Self;
2035        fn take_or_borrow<'a>(
2036            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2037        ) -> Self::Borrowed<'a> {
2038            value
2039        }
2040    }
2041
2042    unsafe impl fidl::encoding::TypeMarker for ArrayOfHandles {
2043        type Owned = Self;
2044
2045        #[inline(always)]
2046        fn inline_align(_context: fidl::encoding::Context) -> usize {
2047            4
2048        }
2049
2050        #[inline(always)]
2051        fn inline_size(_context: fidl::encoding::Context) -> usize {
2052            12
2053        }
2054    }
2055
2056    unsafe impl
2057        fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2058        for &mut ArrayOfHandles
2059    {
2060        #[inline]
2061        unsafe fn encode(
2062            self,
2063            encoder: &mut fidl::encoding::Encoder<
2064                '_,
2065                fidl::encoding::DefaultFuchsiaResourceDialect,
2066            >,
2067            offset: usize,
2068            _depth: fidl::encoding::Depth,
2069        ) -> fidl::Result<()> {
2070            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2071            // Delegate to tuple encoding.
2072            fidl::encoding::Encode::<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2073                (
2074                    <fidl::encoding::Array<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.a),
2075                ),
2076                encoder, offset, _depth
2077            )
2078        }
2079    }
2080    unsafe impl<
2081            T0: fidl::encoding::Encode<
2082                fidl::encoding::Array<
2083                    fidl::encoding::HandleType<
2084                        fidl::Handle,
2085                        { fidl::ObjectType::NONE.into_raw() },
2086                        2147483648,
2087                    >,
2088                    3,
2089                >,
2090                fidl::encoding::DefaultFuchsiaResourceDialect,
2091            >,
2092        > fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2093        for (T0,)
2094    {
2095        #[inline]
2096        unsafe fn encode(
2097            self,
2098            encoder: &mut fidl::encoding::Encoder<
2099                '_,
2100                fidl::encoding::DefaultFuchsiaResourceDialect,
2101            >,
2102            offset: usize,
2103            depth: fidl::encoding::Depth,
2104        ) -> fidl::Result<()> {
2105            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2106            // Zero out padding regions. There's no need to apply masks
2107            // because the unmasked parts will be overwritten by fields.
2108            // Write the fields.
2109            self.0.encode(encoder, offset + 0, depth)?;
2110            Ok(())
2111        }
2112    }
2113
2114    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2115        for ArrayOfHandles
2116    {
2117        #[inline(always)]
2118        fn new_empty() -> Self {
2119            Self {
2120                a: fidl::new_empty!(
2121                    fidl::encoding::Array<
2122                        fidl::encoding::HandleType<
2123                            fidl::Handle,
2124                            { fidl::ObjectType::NONE.into_raw() },
2125                            2147483648,
2126                        >,
2127                        3,
2128                    >,
2129                    fidl::encoding::DefaultFuchsiaResourceDialect
2130                ),
2131            }
2132        }
2133
2134        #[inline]
2135        unsafe fn decode(
2136            &mut self,
2137            decoder: &mut fidl::encoding::Decoder<
2138                '_,
2139                fidl::encoding::DefaultFuchsiaResourceDialect,
2140            >,
2141            offset: usize,
2142            _depth: fidl::encoding::Depth,
2143        ) -> fidl::Result<()> {
2144            decoder.debug_check_bounds::<Self>(offset);
2145            // Verify that padding bytes are zero.
2146            fidl::decode!(
2147                fidl::encoding::Array<
2148                    fidl::encoding::HandleType<
2149                        fidl::Handle,
2150                        { fidl::ObjectType::NONE.into_raw() },
2151                        2147483648,
2152                    >,
2153                    3,
2154                >,
2155                fidl::encoding::DefaultFuchsiaResourceDialect,
2156                &mut self.a,
2157                decoder,
2158                offset + 0,
2159                _depth
2160            )?;
2161            Ok(())
2162        }
2163    }
2164
2165    impl fidl::encoding::ResourceTypeMarker for ArrayOfNonnullableHandles {
2166        type Borrowed<'a> = &'a mut Self;
2167        fn take_or_borrow<'a>(
2168            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2169        ) -> Self::Borrowed<'a> {
2170            value
2171        }
2172    }
2173
2174    unsafe impl fidl::encoding::TypeMarker for ArrayOfNonnullableHandles {
2175        type Owned = Self;
2176
2177        #[inline(always)]
2178        fn inline_align(_context: fidl::encoding::Context) -> usize {
2179            4
2180        }
2181
2182        #[inline(always)]
2183        fn inline_size(_context: fidl::encoding::Context) -> usize {
2184            16
2185        }
2186    }
2187
2188    unsafe impl
2189        fidl::encoding::Encode<
2190            ArrayOfNonnullableHandles,
2191            fidl::encoding::DefaultFuchsiaResourceDialect,
2192        > for &mut ArrayOfNonnullableHandles
2193    {
2194        #[inline]
2195        unsafe fn encode(
2196            self,
2197            encoder: &mut fidl::encoding::Encoder<
2198                '_,
2199                fidl::encoding::DefaultFuchsiaResourceDialect,
2200            >,
2201            offset: usize,
2202            _depth: fidl::encoding::Depth,
2203        ) -> fidl::Result<()> {
2204            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2205            // Delegate to tuple encoding.
2206            fidl::encoding::Encode::<
2207                ArrayOfNonnullableHandles,
2208                fidl::encoding::DefaultFuchsiaResourceDialect,
2209            >::encode(
2210                (<fidl::encoding::Array<
2211                    fidl::encoding::HandleType<
2212                        fidl::Handle,
2213                        { fidl::ObjectType::NONE.into_raw() },
2214                        2147483648,
2215                    >,
2216                    4,
2217                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2218                    &mut self.handles
2219                ),),
2220                encoder,
2221                offset,
2222                _depth,
2223            )
2224        }
2225    }
2226    unsafe impl<
2227            T0: fidl::encoding::Encode<
2228                fidl::encoding::Array<
2229                    fidl::encoding::HandleType<
2230                        fidl::Handle,
2231                        { fidl::ObjectType::NONE.into_raw() },
2232                        2147483648,
2233                    >,
2234                    4,
2235                >,
2236                fidl::encoding::DefaultFuchsiaResourceDialect,
2237            >,
2238        >
2239        fidl::encoding::Encode<
2240            ArrayOfNonnullableHandles,
2241            fidl::encoding::DefaultFuchsiaResourceDialect,
2242        > for (T0,)
2243    {
2244        #[inline]
2245        unsafe fn encode(
2246            self,
2247            encoder: &mut fidl::encoding::Encoder<
2248                '_,
2249                fidl::encoding::DefaultFuchsiaResourceDialect,
2250            >,
2251            offset: usize,
2252            depth: fidl::encoding::Depth,
2253        ) -> fidl::Result<()> {
2254            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2255            // Zero out padding regions. There's no need to apply masks
2256            // because the unmasked parts will be overwritten by fields.
2257            // Write the fields.
2258            self.0.encode(encoder, offset + 0, depth)?;
2259            Ok(())
2260        }
2261    }
2262
2263    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2264        for ArrayOfNonnullableHandles
2265    {
2266        #[inline(always)]
2267        fn new_empty() -> Self {
2268            Self {
2269                handles: fidl::new_empty!(
2270                    fidl::encoding::Array<
2271                        fidl::encoding::HandleType<
2272                            fidl::Handle,
2273                            { fidl::ObjectType::NONE.into_raw() },
2274                            2147483648,
2275                        >,
2276                        4,
2277                    >,
2278                    fidl::encoding::DefaultFuchsiaResourceDialect
2279                ),
2280            }
2281        }
2282
2283        #[inline]
2284        unsafe fn decode(
2285            &mut self,
2286            decoder: &mut fidl::encoding::Decoder<
2287                '_,
2288                fidl::encoding::DefaultFuchsiaResourceDialect,
2289            >,
2290            offset: usize,
2291            _depth: fidl::encoding::Depth,
2292        ) -> fidl::Result<()> {
2293            decoder.debug_check_bounds::<Self>(offset);
2294            // Verify that padding bytes are zero.
2295            fidl::decode!(
2296                fidl::encoding::Array<
2297                    fidl::encoding::HandleType<
2298                        fidl::Handle,
2299                        { fidl::ObjectType::NONE.into_raw() },
2300                        2147483648,
2301                    >,
2302                    4,
2303                >,
2304                fidl::encoding::DefaultFuchsiaResourceDialect,
2305                &mut self.handles,
2306                decoder,
2307                offset + 0,
2308                _depth
2309            )?;
2310            Ok(())
2311        }
2312    }
2313
2314    impl fidl::encoding::ResourceTypeMarker for ArrayOfNullableHandles {
2315        type Borrowed<'a> = &'a mut Self;
2316        fn take_or_borrow<'a>(
2317            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2318        ) -> Self::Borrowed<'a> {
2319            value
2320        }
2321    }
2322
2323    unsafe impl fidl::encoding::TypeMarker for ArrayOfNullableHandles {
2324        type Owned = Self;
2325
2326        #[inline(always)]
2327        fn inline_align(_context: fidl::encoding::Context) -> usize {
2328            4
2329        }
2330
2331        #[inline(always)]
2332        fn inline_size(_context: fidl::encoding::Context) -> usize {
2333            20
2334        }
2335    }
2336
2337    unsafe impl
2338        fidl::encoding::Encode<
2339            ArrayOfNullableHandles,
2340            fidl::encoding::DefaultFuchsiaResourceDialect,
2341        > for &mut ArrayOfNullableHandles
2342    {
2343        #[inline]
2344        unsafe fn encode(
2345            self,
2346            encoder: &mut fidl::encoding::Encoder<
2347                '_,
2348                fidl::encoding::DefaultFuchsiaResourceDialect,
2349            >,
2350            offset: usize,
2351            _depth: fidl::encoding::Depth,
2352        ) -> fidl::Result<()> {
2353            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2354            // Delegate to tuple encoding.
2355            fidl::encoding::Encode::<
2356                ArrayOfNullableHandles,
2357                fidl::encoding::DefaultFuchsiaResourceDialect,
2358            >::encode(
2359                (<fidl::encoding::Array<
2360                    fidl::encoding::Optional<
2361                        fidl::encoding::HandleType<
2362                            fidl::Handle,
2363                            { fidl::ObjectType::NONE.into_raw() },
2364                            2147483648,
2365                        >,
2366                    >,
2367                    5,
2368                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2369                    &mut self.handles
2370                ),),
2371                encoder,
2372                offset,
2373                _depth,
2374            )
2375        }
2376    }
2377    unsafe impl<
2378            T0: fidl::encoding::Encode<
2379                fidl::encoding::Array<
2380                    fidl::encoding::Optional<
2381                        fidl::encoding::HandleType<
2382                            fidl::Handle,
2383                            { fidl::ObjectType::NONE.into_raw() },
2384                            2147483648,
2385                        >,
2386                    >,
2387                    5,
2388                >,
2389                fidl::encoding::DefaultFuchsiaResourceDialect,
2390            >,
2391        >
2392        fidl::encoding::Encode<
2393            ArrayOfNullableHandles,
2394            fidl::encoding::DefaultFuchsiaResourceDialect,
2395        > for (T0,)
2396    {
2397        #[inline]
2398        unsafe fn encode(
2399            self,
2400            encoder: &mut fidl::encoding::Encoder<
2401                '_,
2402                fidl::encoding::DefaultFuchsiaResourceDialect,
2403            >,
2404            offset: usize,
2405            depth: fidl::encoding::Depth,
2406        ) -> fidl::Result<()> {
2407            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2408            // Zero out padding regions. There's no need to apply masks
2409            // because the unmasked parts will be overwritten by fields.
2410            // Write the fields.
2411            self.0.encode(encoder, offset + 0, depth)?;
2412            Ok(())
2413        }
2414    }
2415
2416    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2417        for ArrayOfNullableHandles
2418    {
2419        #[inline(always)]
2420        fn new_empty() -> Self {
2421            Self {
2422                handles: fidl::new_empty!(
2423                    fidl::encoding::Array<
2424                        fidl::encoding::Optional<
2425                            fidl::encoding::HandleType<
2426                                fidl::Handle,
2427                                { fidl::ObjectType::NONE.into_raw() },
2428                                2147483648,
2429                            >,
2430                        >,
2431                        5,
2432                    >,
2433                    fidl::encoding::DefaultFuchsiaResourceDialect
2434                ),
2435            }
2436        }
2437
2438        #[inline]
2439        unsafe fn decode(
2440            &mut self,
2441            decoder: &mut fidl::encoding::Decoder<
2442                '_,
2443                fidl::encoding::DefaultFuchsiaResourceDialect,
2444            >,
2445            offset: usize,
2446            _depth: fidl::encoding::Depth,
2447        ) -> fidl::Result<()> {
2448            decoder.debug_check_bounds::<Self>(offset);
2449            // Verify that padding bytes are zero.
2450            fidl::decode!(
2451                fidl::encoding::Array<
2452                    fidl::encoding::Optional<
2453                        fidl::encoding::HandleType<
2454                            fidl::Handle,
2455                            { fidl::ObjectType::NONE.into_raw() },
2456                            2147483648,
2457                        >,
2458                    >,
2459                    5,
2460                >,
2461                fidl::encoding::DefaultFuchsiaResourceDialect,
2462                &mut self.handles,
2463                decoder,
2464                offset + 0,
2465                _depth
2466            )?;
2467            Ok(())
2468        }
2469    }
2470
2471    impl fidl::encoding::ResourceTypeMarker for ArrayOfOptionalHandles {
2472        type Borrowed<'a> = &'a mut Self;
2473        fn take_or_borrow<'a>(
2474            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2475        ) -> Self::Borrowed<'a> {
2476            value
2477        }
2478    }
2479
2480    unsafe impl fidl::encoding::TypeMarker for ArrayOfOptionalHandles {
2481        type Owned = Self;
2482
2483        #[inline(always)]
2484        fn inline_align(_context: fidl::encoding::Context) -> usize {
2485            4
2486        }
2487
2488        #[inline(always)]
2489        fn inline_size(_context: fidl::encoding::Context) -> usize {
2490            12
2491        }
2492    }
2493
2494    unsafe impl
2495        fidl::encoding::Encode<
2496            ArrayOfOptionalHandles,
2497            fidl::encoding::DefaultFuchsiaResourceDialect,
2498        > for &mut ArrayOfOptionalHandles
2499    {
2500        #[inline]
2501        unsafe fn encode(
2502            self,
2503            encoder: &mut fidl::encoding::Encoder<
2504                '_,
2505                fidl::encoding::DefaultFuchsiaResourceDialect,
2506            >,
2507            offset: usize,
2508            _depth: fidl::encoding::Depth,
2509        ) -> fidl::Result<()> {
2510            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2511            // Delegate to tuple encoding.
2512            fidl::encoding::Encode::<
2513                ArrayOfOptionalHandles,
2514                fidl::encoding::DefaultFuchsiaResourceDialect,
2515            >::encode(
2516                (<fidl::encoding::Array<
2517                    fidl::encoding::Optional<
2518                        fidl::encoding::HandleType<
2519                            fidl::Handle,
2520                            { fidl::ObjectType::NONE.into_raw() },
2521                            2147483648,
2522                        >,
2523                    >,
2524                    3,
2525                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2526                    &mut self.a
2527                ),),
2528                encoder,
2529                offset,
2530                _depth,
2531            )
2532        }
2533    }
2534    unsafe impl<
2535            T0: fidl::encoding::Encode<
2536                fidl::encoding::Array<
2537                    fidl::encoding::Optional<
2538                        fidl::encoding::HandleType<
2539                            fidl::Handle,
2540                            { fidl::ObjectType::NONE.into_raw() },
2541                            2147483648,
2542                        >,
2543                    >,
2544                    3,
2545                >,
2546                fidl::encoding::DefaultFuchsiaResourceDialect,
2547            >,
2548        >
2549        fidl::encoding::Encode<
2550            ArrayOfOptionalHandles,
2551            fidl::encoding::DefaultFuchsiaResourceDialect,
2552        > for (T0,)
2553    {
2554        #[inline]
2555        unsafe fn encode(
2556            self,
2557            encoder: &mut fidl::encoding::Encoder<
2558                '_,
2559                fidl::encoding::DefaultFuchsiaResourceDialect,
2560            >,
2561            offset: usize,
2562            depth: fidl::encoding::Depth,
2563        ) -> fidl::Result<()> {
2564            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2565            // Zero out padding regions. There's no need to apply masks
2566            // because the unmasked parts will be overwritten by fields.
2567            // Write the fields.
2568            self.0.encode(encoder, offset + 0, depth)?;
2569            Ok(())
2570        }
2571    }
2572
2573    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2574        for ArrayOfOptionalHandles
2575    {
2576        #[inline(always)]
2577        fn new_empty() -> Self {
2578            Self {
2579                a: fidl::new_empty!(
2580                    fidl::encoding::Array<
2581                        fidl::encoding::Optional<
2582                            fidl::encoding::HandleType<
2583                                fidl::Handle,
2584                                { fidl::ObjectType::NONE.into_raw() },
2585                                2147483648,
2586                            >,
2587                        >,
2588                        3,
2589                    >,
2590                    fidl::encoding::DefaultFuchsiaResourceDialect
2591                ),
2592            }
2593        }
2594
2595        #[inline]
2596        unsafe fn decode(
2597            &mut self,
2598            decoder: &mut fidl::encoding::Decoder<
2599                '_,
2600                fidl::encoding::DefaultFuchsiaResourceDialect,
2601            >,
2602            offset: usize,
2603            _depth: fidl::encoding::Depth,
2604        ) -> fidl::Result<()> {
2605            decoder.debug_check_bounds::<Self>(offset);
2606            // Verify that padding bytes are zero.
2607            fidl::decode!(
2608                fidl::encoding::Array<
2609                    fidl::encoding::Optional<
2610                        fidl::encoding::HandleType<
2611                            fidl::Handle,
2612                            { fidl::ObjectType::NONE.into_raw() },
2613                            2147483648,
2614                        >,
2615                    >,
2616                    3,
2617                >,
2618                fidl::encoding::DefaultFuchsiaResourceDialect,
2619                &mut self.a,
2620                decoder,
2621                offset + 0,
2622                _depth
2623            )?;
2624            Ok(())
2625        }
2626    }
2627
2628    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2629        type Borrowed<'a> = &'a mut Self;
2630        fn take_or_borrow<'a>(
2631            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2632        ) -> Self::Borrowed<'a> {
2633            value
2634        }
2635    }
2636
2637    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2638        type Owned = Self;
2639
2640        #[inline(always)]
2641        fn inline_align(_context: fidl::encoding::Context) -> usize {
2642            8
2643        }
2644
2645        #[inline(always)]
2646        fn inline_size(_context: fidl::encoding::Context) -> usize {
2647            16
2648        }
2649    }
2650
2651    unsafe impl
2652        fidl::encoding::Encode<
2653            ArrayOfVectorOfEventInStructWithDefaultRights,
2654            fidl::encoding::DefaultFuchsiaResourceDialect,
2655        > for &mut ArrayOfVectorOfEventInStructWithDefaultRights
2656    {
2657        #[inline]
2658        unsafe fn encode(
2659            self,
2660            encoder: &mut fidl::encoding::Encoder<
2661                '_,
2662                fidl::encoding::DefaultFuchsiaResourceDialect,
2663            >,
2664            offset: usize,
2665            _depth: fidl::encoding::Depth,
2666        ) -> fidl::Result<()> {
2667            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2668            // Delegate to tuple encoding.
2669            fidl::encoding::Encode::<
2670                ArrayOfVectorOfEventInStructWithDefaultRights,
2671                fidl::encoding::DefaultFuchsiaResourceDialect,
2672            >::encode(
2673                (<fidl::encoding::Array<
2674                    fidl::encoding::Vector<
2675                        fidl::encoding::HandleType<
2676                            fidl::Event,
2677                            { fidl::ObjectType::EVENT.into_raw() },
2678                            53251,
2679                        >,
2680                        1,
2681                    >,
2682                    1,
2683                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2684                    &mut self.h
2685                ),),
2686                encoder,
2687                offset,
2688                _depth,
2689            )
2690        }
2691    }
2692    unsafe impl<
2693            T0: fidl::encoding::Encode<
2694                fidl::encoding::Array<
2695                    fidl::encoding::Vector<
2696                        fidl::encoding::HandleType<
2697                            fidl::Event,
2698                            { fidl::ObjectType::EVENT.into_raw() },
2699                            53251,
2700                        >,
2701                        1,
2702                    >,
2703                    1,
2704                >,
2705                fidl::encoding::DefaultFuchsiaResourceDialect,
2706            >,
2707        >
2708        fidl::encoding::Encode<
2709            ArrayOfVectorOfEventInStructWithDefaultRights,
2710            fidl::encoding::DefaultFuchsiaResourceDialect,
2711        > for (T0,)
2712    {
2713        #[inline]
2714        unsafe fn encode(
2715            self,
2716            encoder: &mut fidl::encoding::Encoder<
2717                '_,
2718                fidl::encoding::DefaultFuchsiaResourceDialect,
2719            >,
2720            offset: usize,
2721            depth: fidl::encoding::Depth,
2722        ) -> fidl::Result<()> {
2723            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2724            // Zero out padding regions. There's no need to apply masks
2725            // because the unmasked parts will be overwritten by fields.
2726            // Write the fields.
2727            self.0.encode(encoder, offset + 0, depth)?;
2728            Ok(())
2729        }
2730    }
2731
2732    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2733        for ArrayOfVectorOfEventInStructWithDefaultRights
2734    {
2735        #[inline(always)]
2736        fn new_empty() -> Self {
2737            Self {
2738                h: fidl::new_empty!(
2739                    fidl::encoding::Array<
2740                        fidl::encoding::Vector<
2741                            fidl::encoding::HandleType<
2742                                fidl::Event,
2743                                { fidl::ObjectType::EVENT.into_raw() },
2744                                53251,
2745                            >,
2746                            1,
2747                        >,
2748                        1,
2749                    >,
2750                    fidl::encoding::DefaultFuchsiaResourceDialect
2751                ),
2752            }
2753        }
2754
2755        #[inline]
2756        unsafe fn decode(
2757            &mut self,
2758            decoder: &mut fidl::encoding::Decoder<
2759                '_,
2760                fidl::encoding::DefaultFuchsiaResourceDialect,
2761            >,
2762            offset: usize,
2763            _depth: fidl::encoding::Depth,
2764        ) -> fidl::Result<()> {
2765            decoder.debug_check_bounds::<Self>(offset);
2766            // Verify that padding bytes are zero.
2767            fidl::decode!(
2768                fidl::encoding::Array<
2769                    fidl::encoding::Vector<
2770                        fidl::encoding::HandleType<
2771                            fidl::Event,
2772                            { fidl::ObjectType::EVENT.into_raw() },
2773                            53251,
2774                        >,
2775                        1,
2776                    >,
2777                    1,
2778                >,
2779                fidl::encoding::DefaultFuchsiaResourceDialect,
2780                &mut self.h,
2781                decoder,
2782                offset + 0,
2783                _depth
2784            )?;
2785            Ok(())
2786        }
2787    }
2788
2789    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2790        type Borrowed<'a> = &'a mut Self;
2791        fn take_or_borrow<'a>(
2792            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2793        ) -> Self::Borrowed<'a> {
2794            value
2795        }
2796    }
2797
2798    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2799        type Owned = Self;
2800
2801        #[inline(always)]
2802        fn inline_align(_context: fidl::encoding::Context) -> usize {
2803            8
2804        }
2805
2806        #[inline(always)]
2807        fn inline_size(_context: fidl::encoding::Context) -> usize {
2808            16
2809        }
2810    }
2811
2812    unsafe impl
2813        fidl::encoding::Encode<
2814            ArrayOfVectorOfEventInStructWithReducedRights,
2815            fidl::encoding::DefaultFuchsiaResourceDialect,
2816        > for &mut ArrayOfVectorOfEventInStructWithReducedRights
2817    {
2818        #[inline]
2819        unsafe fn encode(
2820            self,
2821            encoder: &mut fidl::encoding::Encoder<
2822                '_,
2823                fidl::encoding::DefaultFuchsiaResourceDialect,
2824            >,
2825            offset: usize,
2826            _depth: fidl::encoding::Depth,
2827        ) -> fidl::Result<()> {
2828            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2829            // Delegate to tuple encoding.
2830            fidl::encoding::Encode::<
2831                ArrayOfVectorOfEventInStructWithReducedRights,
2832                fidl::encoding::DefaultFuchsiaResourceDialect,
2833            >::encode(
2834                (<fidl::encoding::Array<
2835                    fidl::encoding::Vector<
2836                        fidl::encoding::HandleType<
2837                            fidl::Event,
2838                            { fidl::ObjectType::EVENT.into_raw() },
2839                            49155,
2840                        >,
2841                        1,
2842                    >,
2843                    1,
2844                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2845                    &mut self.h
2846                ),),
2847                encoder,
2848                offset,
2849                _depth,
2850            )
2851        }
2852    }
2853    unsafe impl<
2854            T0: fidl::encoding::Encode<
2855                fidl::encoding::Array<
2856                    fidl::encoding::Vector<
2857                        fidl::encoding::HandleType<
2858                            fidl::Event,
2859                            { fidl::ObjectType::EVENT.into_raw() },
2860                            49155,
2861                        >,
2862                        1,
2863                    >,
2864                    1,
2865                >,
2866                fidl::encoding::DefaultFuchsiaResourceDialect,
2867            >,
2868        >
2869        fidl::encoding::Encode<
2870            ArrayOfVectorOfEventInStructWithReducedRights,
2871            fidl::encoding::DefaultFuchsiaResourceDialect,
2872        > for (T0,)
2873    {
2874        #[inline]
2875        unsafe fn encode(
2876            self,
2877            encoder: &mut fidl::encoding::Encoder<
2878                '_,
2879                fidl::encoding::DefaultFuchsiaResourceDialect,
2880            >,
2881            offset: usize,
2882            depth: fidl::encoding::Depth,
2883        ) -> fidl::Result<()> {
2884            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2885            // Zero out padding regions. There's no need to apply masks
2886            // because the unmasked parts will be overwritten by fields.
2887            // Write the fields.
2888            self.0.encode(encoder, offset + 0, depth)?;
2889            Ok(())
2890        }
2891    }
2892
2893    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2894        for ArrayOfVectorOfEventInStructWithReducedRights
2895    {
2896        #[inline(always)]
2897        fn new_empty() -> Self {
2898            Self {
2899                h: fidl::new_empty!(
2900                    fidl::encoding::Array<
2901                        fidl::encoding::Vector<
2902                            fidl::encoding::HandleType<
2903                                fidl::Event,
2904                                { fidl::ObjectType::EVENT.into_raw() },
2905                                49155,
2906                            >,
2907                            1,
2908                        >,
2909                        1,
2910                    >,
2911                    fidl::encoding::DefaultFuchsiaResourceDialect
2912                ),
2913            }
2914        }
2915
2916        #[inline]
2917        unsafe fn decode(
2918            &mut self,
2919            decoder: &mut fidl::encoding::Decoder<
2920                '_,
2921                fidl::encoding::DefaultFuchsiaResourceDialect,
2922            >,
2923            offset: usize,
2924            _depth: fidl::encoding::Depth,
2925        ) -> fidl::Result<()> {
2926            decoder.debug_check_bounds::<Self>(offset);
2927            // Verify that padding bytes are zero.
2928            fidl::decode!(
2929                fidl::encoding::Array<
2930                    fidl::encoding::Vector<
2931                        fidl::encoding::HandleType<
2932                            fidl::Event,
2933                            { fidl::ObjectType::EVENT.into_raw() },
2934                            49155,
2935                        >,
2936                        1,
2937                    >,
2938                    1,
2939                >,
2940                fidl::encoding::DefaultFuchsiaResourceDialect,
2941                &mut self.h,
2942                decoder,
2943                offset + 0,
2944                _depth
2945            )?;
2946            Ok(())
2947        }
2948    }
2949
2950    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2951        type Borrowed<'a> = &'a mut Self;
2952        fn take_or_borrow<'a>(
2953            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2954        ) -> Self::Borrowed<'a> {
2955            value
2956        }
2957    }
2958
2959    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2960        type Owned = Self;
2961
2962        #[inline(always)]
2963        fn inline_align(_context: fidl::encoding::Context) -> usize {
2964            8
2965        }
2966
2967        #[inline(always)]
2968        fn inline_size(_context: fidl::encoding::Context) -> usize {
2969            16
2970        }
2971    }
2972
2973    unsafe impl
2974        fidl::encoding::Encode<
2975            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
2976            fidl::encoding::DefaultFuchsiaResourceDialect,
2977        > for &mut ArrayOfVectorOfEventInTableWithDefaultRightsStruct
2978    {
2979        #[inline]
2980        unsafe fn encode(
2981            self,
2982            encoder: &mut fidl::encoding::Encoder<
2983                '_,
2984                fidl::encoding::DefaultFuchsiaResourceDialect,
2985            >,
2986            offset: usize,
2987            _depth: fidl::encoding::Depth,
2988        ) -> fidl::Result<()> {
2989            encoder
2990                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
2991            // Delegate to tuple encoding.
2992            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2993                (
2994                    <ArrayOfVectorOfEventInTableWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
2995                ),
2996                encoder, offset, _depth
2997            )
2998        }
2999    }
3000    unsafe impl<
3001            T0: fidl::encoding::Encode<
3002                ArrayOfVectorOfEventInTableWithDefaultRights,
3003                fidl::encoding::DefaultFuchsiaResourceDialect,
3004            >,
3005        >
3006        fidl::encoding::Encode<
3007            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
3008            fidl::encoding::DefaultFuchsiaResourceDialect,
3009        > for (T0,)
3010    {
3011        #[inline]
3012        unsafe fn encode(
3013            self,
3014            encoder: &mut fidl::encoding::Encoder<
3015                '_,
3016                fidl::encoding::DefaultFuchsiaResourceDialect,
3017            >,
3018            offset: usize,
3019            depth: fidl::encoding::Depth,
3020        ) -> fidl::Result<()> {
3021            encoder
3022                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
3023            // Zero out padding regions. There's no need to apply masks
3024            // because the unmasked parts will be overwritten by fields.
3025            // Write the fields.
3026            self.0.encode(encoder, offset + 0, depth)?;
3027            Ok(())
3028        }
3029    }
3030
3031    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3032        for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
3033    {
3034        #[inline(always)]
3035        fn new_empty() -> Self {
3036            Self {
3037                t: fidl::new_empty!(
3038                    ArrayOfVectorOfEventInTableWithDefaultRights,
3039                    fidl::encoding::DefaultFuchsiaResourceDialect
3040                ),
3041            }
3042        }
3043
3044        #[inline]
3045        unsafe fn decode(
3046            &mut self,
3047            decoder: &mut fidl::encoding::Decoder<
3048                '_,
3049                fidl::encoding::DefaultFuchsiaResourceDialect,
3050            >,
3051            offset: usize,
3052            _depth: fidl::encoding::Depth,
3053        ) -> fidl::Result<()> {
3054            decoder.debug_check_bounds::<Self>(offset);
3055            // Verify that padding bytes are zero.
3056            fidl::decode!(
3057                ArrayOfVectorOfEventInTableWithDefaultRights,
3058                fidl::encoding::DefaultFuchsiaResourceDialect,
3059                &mut self.t,
3060                decoder,
3061                offset + 0,
3062                _depth
3063            )?;
3064            Ok(())
3065        }
3066    }
3067
3068    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3069        type Borrowed<'a> = &'a mut Self;
3070        fn take_or_borrow<'a>(
3071            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3072        ) -> Self::Borrowed<'a> {
3073            value
3074        }
3075    }
3076
3077    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3078        type Owned = Self;
3079
3080        #[inline(always)]
3081        fn inline_align(_context: fidl::encoding::Context) -> usize {
3082            8
3083        }
3084
3085        #[inline(always)]
3086        fn inline_size(_context: fidl::encoding::Context) -> usize {
3087            16
3088        }
3089    }
3090
3091    unsafe impl
3092        fidl::encoding::Encode<
3093            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3094            fidl::encoding::DefaultFuchsiaResourceDialect,
3095        > for &mut ArrayOfVectorOfEventInTableWithReducedRightsStruct
3096    {
3097        #[inline]
3098        unsafe fn encode(
3099            self,
3100            encoder: &mut fidl::encoding::Encoder<
3101                '_,
3102                fidl::encoding::DefaultFuchsiaResourceDialect,
3103            >,
3104            offset: usize,
3105            _depth: fidl::encoding::Depth,
3106        ) -> fidl::Result<()> {
3107            encoder
3108                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3109            // Delegate to tuple encoding.
3110            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3111                (
3112                    <ArrayOfVectorOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
3113                ),
3114                encoder, offset, _depth
3115            )
3116        }
3117    }
3118    unsafe impl<
3119            T0: fidl::encoding::Encode<
3120                ArrayOfVectorOfEventInTableWithReducedRights,
3121                fidl::encoding::DefaultFuchsiaResourceDialect,
3122            >,
3123        >
3124        fidl::encoding::Encode<
3125            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3126            fidl::encoding::DefaultFuchsiaResourceDialect,
3127        > for (T0,)
3128    {
3129        #[inline]
3130        unsafe fn encode(
3131            self,
3132            encoder: &mut fidl::encoding::Encoder<
3133                '_,
3134                fidl::encoding::DefaultFuchsiaResourceDialect,
3135            >,
3136            offset: usize,
3137            depth: fidl::encoding::Depth,
3138        ) -> fidl::Result<()> {
3139            encoder
3140                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3141            // Zero out padding regions. There's no need to apply masks
3142            // because the unmasked parts will be overwritten by fields.
3143            // Write the fields.
3144            self.0.encode(encoder, offset + 0, depth)?;
3145            Ok(())
3146        }
3147    }
3148
3149    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3150        for ArrayOfVectorOfEventInTableWithReducedRightsStruct
3151    {
3152        #[inline(always)]
3153        fn new_empty() -> Self {
3154            Self {
3155                t: fidl::new_empty!(
3156                    ArrayOfVectorOfEventInTableWithReducedRights,
3157                    fidl::encoding::DefaultFuchsiaResourceDialect
3158                ),
3159            }
3160        }
3161
3162        #[inline]
3163        unsafe fn decode(
3164            &mut self,
3165            decoder: &mut fidl::encoding::Decoder<
3166                '_,
3167                fidl::encoding::DefaultFuchsiaResourceDialect,
3168            >,
3169            offset: usize,
3170            _depth: fidl::encoding::Depth,
3171        ) -> fidl::Result<()> {
3172            decoder.debug_check_bounds::<Self>(offset);
3173            // Verify that padding bytes are zero.
3174            fidl::decode!(
3175                ArrayOfVectorOfEventInTableWithReducedRights,
3176                fidl::encoding::DefaultFuchsiaResourceDialect,
3177                &mut self.t,
3178                decoder,
3179                offset + 0,
3180                _depth
3181            )?;
3182            Ok(())
3183        }
3184    }
3185
3186    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3187        type Borrowed<'a> = &'a mut Self;
3188        fn take_or_borrow<'a>(
3189            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3190        ) -> Self::Borrowed<'a> {
3191            value
3192        }
3193    }
3194
3195    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3196        type Owned = Self;
3197
3198        #[inline(always)]
3199        fn inline_align(_context: fidl::encoding::Context) -> usize {
3200            8
3201        }
3202
3203        #[inline(always)]
3204        fn inline_size(_context: fidl::encoding::Context) -> usize {
3205            16
3206        }
3207    }
3208
3209    unsafe impl
3210        fidl::encoding::Encode<
3211            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3212            fidl::encoding::DefaultFuchsiaResourceDialect,
3213        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3214    {
3215        #[inline]
3216        unsafe fn encode(
3217            self,
3218            encoder: &mut fidl::encoding::Encoder<
3219                '_,
3220                fidl::encoding::DefaultFuchsiaResourceDialect,
3221            >,
3222            offset: usize,
3223            _depth: fidl::encoding::Depth,
3224        ) -> fidl::Result<()> {
3225            encoder
3226                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3227            // Delegate to tuple encoding.
3228            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3229                (
3230                    <ArrayOfVectorOfEventInUnionWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3231                ),
3232                encoder, offset, _depth
3233            )
3234        }
3235    }
3236    unsafe impl<
3237            T0: fidl::encoding::Encode<
3238                ArrayOfVectorOfEventInUnionWithDefaultRights,
3239                fidl::encoding::DefaultFuchsiaResourceDialect,
3240            >,
3241        >
3242        fidl::encoding::Encode<
3243            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3244            fidl::encoding::DefaultFuchsiaResourceDialect,
3245        > for (T0,)
3246    {
3247        #[inline]
3248        unsafe fn encode(
3249            self,
3250            encoder: &mut fidl::encoding::Encoder<
3251                '_,
3252                fidl::encoding::DefaultFuchsiaResourceDialect,
3253            >,
3254            offset: usize,
3255            depth: fidl::encoding::Depth,
3256        ) -> fidl::Result<()> {
3257            encoder
3258                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3259            // Zero out padding regions. There's no need to apply masks
3260            // because the unmasked parts will be overwritten by fields.
3261            // Write the fields.
3262            self.0.encode(encoder, offset + 0, depth)?;
3263            Ok(())
3264        }
3265    }
3266
3267    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3268        for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3269    {
3270        #[inline(always)]
3271        fn new_empty() -> Self {
3272            Self {
3273                u: fidl::new_empty!(
3274                    ArrayOfVectorOfEventInUnionWithDefaultRights,
3275                    fidl::encoding::DefaultFuchsiaResourceDialect
3276                ),
3277            }
3278        }
3279
3280        #[inline]
3281        unsafe fn decode(
3282            &mut self,
3283            decoder: &mut fidl::encoding::Decoder<
3284                '_,
3285                fidl::encoding::DefaultFuchsiaResourceDialect,
3286            >,
3287            offset: usize,
3288            _depth: fidl::encoding::Depth,
3289        ) -> fidl::Result<()> {
3290            decoder.debug_check_bounds::<Self>(offset);
3291            // Verify that padding bytes are zero.
3292            fidl::decode!(
3293                ArrayOfVectorOfEventInUnionWithDefaultRights,
3294                fidl::encoding::DefaultFuchsiaResourceDialect,
3295                &mut self.u,
3296                decoder,
3297                offset + 0,
3298                _depth
3299            )?;
3300            Ok(())
3301        }
3302    }
3303
3304    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3305        type Borrowed<'a> = &'a mut Self;
3306        fn take_or_borrow<'a>(
3307            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3308        ) -> Self::Borrowed<'a> {
3309            value
3310        }
3311    }
3312
3313    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3314        type Owned = Self;
3315
3316        #[inline(always)]
3317        fn inline_align(_context: fidl::encoding::Context) -> usize {
3318            8
3319        }
3320
3321        #[inline(always)]
3322        fn inline_size(_context: fidl::encoding::Context) -> usize {
3323            16
3324        }
3325    }
3326
3327    unsafe impl
3328        fidl::encoding::Encode<
3329            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3330            fidl::encoding::DefaultFuchsiaResourceDialect,
3331        > for &mut ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3332    {
3333        #[inline]
3334        unsafe fn encode(
3335            self,
3336            encoder: &mut fidl::encoding::Encoder<
3337                '_,
3338                fidl::encoding::DefaultFuchsiaResourceDialect,
3339            >,
3340            offset: usize,
3341            _depth: fidl::encoding::Depth,
3342        ) -> fidl::Result<()> {
3343            encoder
3344                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3345            // Delegate to tuple encoding.
3346            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3347                (
3348                    <ArrayOfVectorOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3349                ),
3350                encoder, offset, _depth
3351            )
3352        }
3353    }
3354    unsafe impl<
3355            T0: fidl::encoding::Encode<
3356                ArrayOfVectorOfEventInUnionWithReducedRights,
3357                fidl::encoding::DefaultFuchsiaResourceDialect,
3358            >,
3359        >
3360        fidl::encoding::Encode<
3361            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3362            fidl::encoding::DefaultFuchsiaResourceDialect,
3363        > for (T0,)
3364    {
3365        #[inline]
3366        unsafe fn encode(
3367            self,
3368            encoder: &mut fidl::encoding::Encoder<
3369                '_,
3370                fidl::encoding::DefaultFuchsiaResourceDialect,
3371            >,
3372            offset: usize,
3373            depth: fidl::encoding::Depth,
3374        ) -> fidl::Result<()> {
3375            encoder
3376                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3377            // Zero out padding regions. There's no need to apply masks
3378            // because the unmasked parts will be overwritten by fields.
3379            // Write the fields.
3380            self.0.encode(encoder, offset + 0, depth)?;
3381            Ok(())
3382        }
3383    }
3384
3385    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3386        for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3387    {
3388        #[inline(always)]
3389        fn new_empty() -> Self {
3390            Self {
3391                u: fidl::new_empty!(
3392                    ArrayOfVectorOfEventInUnionWithReducedRights,
3393                    fidl::encoding::DefaultFuchsiaResourceDialect
3394                ),
3395            }
3396        }
3397
3398        #[inline]
3399        unsafe fn decode(
3400            &mut self,
3401            decoder: &mut fidl::encoding::Decoder<
3402                '_,
3403                fidl::encoding::DefaultFuchsiaResourceDialect,
3404            >,
3405            offset: usize,
3406            _depth: fidl::encoding::Depth,
3407        ) -> fidl::Result<()> {
3408            decoder.debug_check_bounds::<Self>(offset);
3409            // Verify that padding bytes are zero.
3410            fidl::decode!(
3411                ArrayOfVectorOfEventInUnionWithReducedRights,
3412                fidl::encoding::DefaultFuchsiaResourceDialect,
3413                &mut self.u,
3414                decoder,
3415                offset + 0,
3416                _depth
3417            )?;
3418            Ok(())
3419        }
3420    }
3421
3422    impl fidl::encoding::ResourceTypeMarker for Bounded32NonnullableVectorOfHandles {
3423        type Borrowed<'a> = &'a mut Self;
3424        fn take_or_borrow<'a>(
3425            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3426        ) -> Self::Borrowed<'a> {
3427            value
3428        }
3429    }
3430
3431    unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfHandles {
3432        type Owned = Self;
3433
3434        #[inline(always)]
3435        fn inline_align(_context: fidl::encoding::Context) -> usize {
3436            8
3437        }
3438
3439        #[inline(always)]
3440        fn inline_size(_context: fidl::encoding::Context) -> usize {
3441            16
3442        }
3443    }
3444
3445    unsafe impl
3446        fidl::encoding::Encode<
3447            Bounded32NonnullableVectorOfHandles,
3448            fidl::encoding::DefaultFuchsiaResourceDialect,
3449        > for &mut Bounded32NonnullableVectorOfHandles
3450    {
3451        #[inline]
3452        unsafe fn encode(
3453            self,
3454            encoder: &mut fidl::encoding::Encoder<
3455                '_,
3456                fidl::encoding::DefaultFuchsiaResourceDialect,
3457            >,
3458            offset: usize,
3459            _depth: fidl::encoding::Depth,
3460        ) -> fidl::Result<()> {
3461            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3462            // Delegate to tuple encoding.
3463            fidl::encoding::Encode::<
3464                Bounded32NonnullableVectorOfHandles,
3465                fidl::encoding::DefaultFuchsiaResourceDialect,
3466            >::encode(
3467                (<fidl::encoding::Vector<
3468                    fidl::encoding::HandleType<
3469                        fidl::Handle,
3470                        { fidl::ObjectType::NONE.into_raw() },
3471                        2147483648,
3472                    >,
3473                    32,
3474                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3475                    &mut self.vh0
3476                ),),
3477                encoder,
3478                offset,
3479                _depth,
3480            )
3481        }
3482    }
3483    unsafe impl<
3484            T0: fidl::encoding::Encode<
3485                fidl::encoding::Vector<
3486                    fidl::encoding::HandleType<
3487                        fidl::Handle,
3488                        { fidl::ObjectType::NONE.into_raw() },
3489                        2147483648,
3490                    >,
3491                    32,
3492                >,
3493                fidl::encoding::DefaultFuchsiaResourceDialect,
3494            >,
3495        >
3496        fidl::encoding::Encode<
3497            Bounded32NonnullableVectorOfHandles,
3498            fidl::encoding::DefaultFuchsiaResourceDialect,
3499        > for (T0,)
3500    {
3501        #[inline]
3502        unsafe fn encode(
3503            self,
3504            encoder: &mut fidl::encoding::Encoder<
3505                '_,
3506                fidl::encoding::DefaultFuchsiaResourceDialect,
3507            >,
3508            offset: usize,
3509            depth: fidl::encoding::Depth,
3510        ) -> fidl::Result<()> {
3511            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3512            // Zero out padding regions. There's no need to apply masks
3513            // because the unmasked parts will be overwritten by fields.
3514            // Write the fields.
3515            self.0.encode(encoder, offset + 0, depth)?;
3516            Ok(())
3517        }
3518    }
3519
3520    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3521        for Bounded32NonnullableVectorOfHandles
3522    {
3523        #[inline(always)]
3524        fn new_empty() -> Self {
3525            Self {
3526                vh0: fidl::new_empty!(
3527                    fidl::encoding::Vector<
3528                        fidl::encoding::HandleType<
3529                            fidl::Handle,
3530                            { fidl::ObjectType::NONE.into_raw() },
3531                            2147483648,
3532                        >,
3533                        32,
3534                    >,
3535                    fidl::encoding::DefaultFuchsiaResourceDialect
3536                ),
3537            }
3538        }
3539
3540        #[inline]
3541        unsafe fn decode(
3542            &mut self,
3543            decoder: &mut fidl::encoding::Decoder<
3544                '_,
3545                fidl::encoding::DefaultFuchsiaResourceDialect,
3546            >,
3547            offset: usize,
3548            _depth: fidl::encoding::Depth,
3549        ) -> fidl::Result<()> {
3550            decoder.debug_check_bounds::<Self>(offset);
3551            // Verify that padding bytes are zero.
3552            fidl::decode!(
3553                fidl::encoding::Vector<
3554                    fidl::encoding::HandleType<
3555                        fidl::Handle,
3556                        { fidl::ObjectType::NONE.into_raw() },
3557                        2147483648,
3558                    >,
3559                    32,
3560                >,
3561                fidl::encoding::DefaultFuchsiaResourceDialect,
3562                &mut self.vh0,
3563                decoder,
3564                offset + 0,
3565                _depth
3566            )?;
3567            Ok(())
3568        }
3569    }
3570
3571    impl fidl::encoding::ResourceTypeMarker for Bounded32NullableVectorOfHandles {
3572        type Borrowed<'a> = &'a mut Self;
3573        fn take_or_borrow<'a>(
3574            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3575        ) -> Self::Borrowed<'a> {
3576            value
3577        }
3578    }
3579
3580    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfHandles {
3581        type Owned = Self;
3582
3583        #[inline(always)]
3584        fn inline_align(_context: fidl::encoding::Context) -> usize {
3585            8
3586        }
3587
3588        #[inline(always)]
3589        fn inline_size(_context: fidl::encoding::Context) -> usize {
3590            16
3591        }
3592    }
3593
3594    unsafe impl
3595        fidl::encoding::Encode<
3596            Bounded32NullableVectorOfHandles,
3597            fidl::encoding::DefaultFuchsiaResourceDialect,
3598        > for &mut Bounded32NullableVectorOfHandles
3599    {
3600        #[inline]
3601        unsafe fn encode(
3602            self,
3603            encoder: &mut fidl::encoding::Encoder<
3604                '_,
3605                fidl::encoding::DefaultFuchsiaResourceDialect,
3606            >,
3607            offset: usize,
3608            _depth: fidl::encoding::Depth,
3609        ) -> fidl::Result<()> {
3610            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3611            // Delegate to tuple encoding.
3612            fidl::encoding::Encode::<
3613                Bounded32NullableVectorOfHandles,
3614                fidl::encoding::DefaultFuchsiaResourceDialect,
3615            >::encode(
3616                (<fidl::encoding::Optional<
3617                    fidl::encoding::Vector<
3618                        fidl::encoding::HandleType<
3619                            fidl::Handle,
3620                            { fidl::ObjectType::NONE.into_raw() },
3621                            2147483648,
3622                        >,
3623                        32,
3624                    >,
3625                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3626                    &mut self.vh0
3627                ),),
3628                encoder,
3629                offset,
3630                _depth,
3631            )
3632        }
3633    }
3634    unsafe impl<
3635            T0: fidl::encoding::Encode<
3636                fidl::encoding::Optional<
3637                    fidl::encoding::Vector<
3638                        fidl::encoding::HandleType<
3639                            fidl::Handle,
3640                            { fidl::ObjectType::NONE.into_raw() },
3641                            2147483648,
3642                        >,
3643                        32,
3644                    >,
3645                >,
3646                fidl::encoding::DefaultFuchsiaResourceDialect,
3647            >,
3648        >
3649        fidl::encoding::Encode<
3650            Bounded32NullableVectorOfHandles,
3651            fidl::encoding::DefaultFuchsiaResourceDialect,
3652        > for (T0,)
3653    {
3654        #[inline]
3655        unsafe fn encode(
3656            self,
3657            encoder: &mut fidl::encoding::Encoder<
3658                '_,
3659                fidl::encoding::DefaultFuchsiaResourceDialect,
3660            >,
3661            offset: usize,
3662            depth: fidl::encoding::Depth,
3663        ) -> fidl::Result<()> {
3664            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3665            // Zero out padding regions. There's no need to apply masks
3666            // because the unmasked parts will be overwritten by fields.
3667            // Write the fields.
3668            self.0.encode(encoder, offset + 0, depth)?;
3669            Ok(())
3670        }
3671    }
3672
3673    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3674        for Bounded32NullableVectorOfHandles
3675    {
3676        #[inline(always)]
3677        fn new_empty() -> Self {
3678            Self {
3679                vh0: fidl::new_empty!(
3680                    fidl::encoding::Optional<
3681                        fidl::encoding::Vector<
3682                            fidl::encoding::HandleType<
3683                                fidl::Handle,
3684                                { fidl::ObjectType::NONE.into_raw() },
3685                                2147483648,
3686                            >,
3687                            32,
3688                        >,
3689                    >,
3690                    fidl::encoding::DefaultFuchsiaResourceDialect
3691                ),
3692            }
3693        }
3694
3695        #[inline]
3696        unsafe fn decode(
3697            &mut self,
3698            decoder: &mut fidl::encoding::Decoder<
3699                '_,
3700                fidl::encoding::DefaultFuchsiaResourceDialect,
3701            >,
3702            offset: usize,
3703            _depth: fidl::encoding::Depth,
3704        ) -> fidl::Result<()> {
3705            decoder.debug_check_bounds::<Self>(offset);
3706            // Verify that padding bytes are zero.
3707            fidl::decode!(
3708                fidl::encoding::Optional<
3709                    fidl::encoding::Vector<
3710                        fidl::encoding::HandleType<
3711                            fidl::Handle,
3712                            { fidl::ObjectType::NONE.into_raw() },
3713                            2147483648,
3714                        >,
3715                        32,
3716                    >,
3717                >,
3718                fidl::encoding::DefaultFuchsiaResourceDialect,
3719                &mut self.vh0,
3720                decoder,
3721                offset + 0,
3722                _depth
3723            )?;
3724            Ok(())
3725        }
3726    }
3727
3728    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleHandle {
3729        type Borrowed<'a> = &'a mut Self;
3730        fn take_or_borrow<'a>(
3731            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3732        ) -> Self::Borrowed<'a> {
3733            value
3734        }
3735    }
3736
3737    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleHandle {
3738        type Owned = Self;
3739
3740        #[inline(always)]
3741        fn inline_align(_context: fidl::encoding::Context) -> usize {
3742            8
3743        }
3744
3745        #[inline(always)]
3746        fn inline_size(_context: fidl::encoding::Context) -> usize {
3747            8
3748        }
3749    }
3750
3751    unsafe impl
3752        fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3753        for &mut BoxOfSingleHandle
3754    {
3755        #[inline]
3756        unsafe fn encode(
3757            self,
3758            encoder: &mut fidl::encoding::Encoder<
3759                '_,
3760                fidl::encoding::DefaultFuchsiaResourceDialect,
3761            >,
3762            offset: usize,
3763            _depth: fidl::encoding::Depth,
3764        ) -> fidl::Result<()> {
3765            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3766            // Delegate to tuple encoding.
3767            fidl::encoding::Encode::<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3768                (
3769                    <fidl::encoding::Boxed<SingleHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3770                ),
3771                encoder, offset, _depth
3772            )
3773        }
3774    }
3775    unsafe impl<
3776            T0: fidl::encoding::Encode<
3777                fidl::encoding::Boxed<SingleHandle>,
3778                fidl::encoding::DefaultFuchsiaResourceDialect,
3779            >,
3780        >
3781        fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3782        for (T0,)
3783    {
3784        #[inline]
3785        unsafe fn encode(
3786            self,
3787            encoder: &mut fidl::encoding::Encoder<
3788                '_,
3789                fidl::encoding::DefaultFuchsiaResourceDialect,
3790            >,
3791            offset: usize,
3792            depth: fidl::encoding::Depth,
3793        ) -> fidl::Result<()> {
3794            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3795            // Zero out padding regions. There's no need to apply masks
3796            // because the unmasked parts will be overwritten by fields.
3797            // Write the fields.
3798            self.0.encode(encoder, offset + 0, depth)?;
3799            Ok(())
3800        }
3801    }
3802
3803    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3804        for BoxOfSingleHandle
3805    {
3806        #[inline(always)]
3807        fn new_empty() -> Self {
3808            Self {
3809                b: fidl::new_empty!(
3810                    fidl::encoding::Boxed<SingleHandle>,
3811                    fidl::encoding::DefaultFuchsiaResourceDialect
3812                ),
3813            }
3814        }
3815
3816        #[inline]
3817        unsafe fn decode(
3818            &mut self,
3819            decoder: &mut fidl::encoding::Decoder<
3820                '_,
3821                fidl::encoding::DefaultFuchsiaResourceDialect,
3822            >,
3823            offset: usize,
3824            _depth: fidl::encoding::Depth,
3825        ) -> fidl::Result<()> {
3826            decoder.debug_check_bounds::<Self>(offset);
3827            // Verify that padding bytes are zero.
3828            fidl::decode!(
3829                fidl::encoding::Boxed<SingleHandle>,
3830                fidl::encoding::DefaultFuchsiaResourceDialect,
3831                &mut self.b,
3832                decoder,
3833                offset + 0,
3834                _depth
3835            )?;
3836            Ok(())
3837        }
3838    }
3839
3840    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleOptionalHandle {
3841        type Borrowed<'a> = &'a mut Self;
3842        fn take_or_borrow<'a>(
3843            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3844        ) -> Self::Borrowed<'a> {
3845            value
3846        }
3847    }
3848
3849    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleOptionalHandle {
3850        type Owned = Self;
3851
3852        #[inline(always)]
3853        fn inline_align(_context: fidl::encoding::Context) -> usize {
3854            8
3855        }
3856
3857        #[inline(always)]
3858        fn inline_size(_context: fidl::encoding::Context) -> usize {
3859            8
3860        }
3861    }
3862
3863    unsafe impl
3864        fidl::encoding::Encode<
3865            BoxOfSingleOptionalHandle,
3866            fidl::encoding::DefaultFuchsiaResourceDialect,
3867        > for &mut BoxOfSingleOptionalHandle
3868    {
3869        #[inline]
3870        unsafe fn encode(
3871            self,
3872            encoder: &mut fidl::encoding::Encoder<
3873                '_,
3874                fidl::encoding::DefaultFuchsiaResourceDialect,
3875            >,
3876            offset: usize,
3877            _depth: fidl::encoding::Depth,
3878        ) -> fidl::Result<()> {
3879            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3880            // Delegate to tuple encoding.
3881            fidl::encoding::Encode::<BoxOfSingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3882                (
3883                    <fidl::encoding::Boxed<SingleOptionalHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3884                ),
3885                encoder, offset, _depth
3886            )
3887        }
3888    }
3889    unsafe impl<
3890            T0: fidl::encoding::Encode<
3891                fidl::encoding::Boxed<SingleOptionalHandle>,
3892                fidl::encoding::DefaultFuchsiaResourceDialect,
3893            >,
3894        >
3895        fidl::encoding::Encode<
3896            BoxOfSingleOptionalHandle,
3897            fidl::encoding::DefaultFuchsiaResourceDialect,
3898        > for (T0,)
3899    {
3900        #[inline]
3901        unsafe fn encode(
3902            self,
3903            encoder: &mut fidl::encoding::Encoder<
3904                '_,
3905                fidl::encoding::DefaultFuchsiaResourceDialect,
3906            >,
3907            offset: usize,
3908            depth: fidl::encoding::Depth,
3909        ) -> fidl::Result<()> {
3910            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3911            // Zero out padding regions. There's no need to apply masks
3912            // because the unmasked parts will be overwritten by fields.
3913            // Write the fields.
3914            self.0.encode(encoder, offset + 0, depth)?;
3915            Ok(())
3916        }
3917    }
3918
3919    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3920        for BoxOfSingleOptionalHandle
3921    {
3922        #[inline(always)]
3923        fn new_empty() -> Self {
3924            Self {
3925                b: fidl::new_empty!(
3926                    fidl::encoding::Boxed<SingleOptionalHandle>,
3927                    fidl::encoding::DefaultFuchsiaResourceDialect
3928                ),
3929            }
3930        }
3931
3932        #[inline]
3933        unsafe fn decode(
3934            &mut self,
3935            decoder: &mut fidl::encoding::Decoder<
3936                '_,
3937                fidl::encoding::DefaultFuchsiaResourceDialect,
3938            >,
3939            offset: usize,
3940            _depth: fidl::encoding::Depth,
3941        ) -> fidl::Result<()> {
3942            decoder.debug_check_bounds::<Self>(offset);
3943            // Verify that padding bytes are zero.
3944            fidl::decode!(
3945                fidl::encoding::Boxed<SingleOptionalHandle>,
3946                fidl::encoding::DefaultFuchsiaResourceDialect,
3947                &mut self.b,
3948                decoder,
3949                offset + 0,
3950                _depth
3951            )?;
3952            Ok(())
3953        }
3954    }
3955
3956    impl fidl::encoding::ResourceTypeMarker for CreateComponentRequest {
3957        type Borrowed<'a> = &'a mut Self;
3958        fn take_or_borrow<'a>(
3959            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3960        ) -> Self::Borrowed<'a> {
3961            value
3962        }
3963    }
3964
3965    unsafe impl fidl::encoding::TypeMarker for CreateComponentRequest {
3966        type Owned = Self;
3967
3968        #[inline(always)]
3969        fn inline_align(_context: fidl::encoding::Context) -> usize {
3970            8
3971        }
3972
3973        #[inline(always)]
3974        fn inline_size(_context: fidl::encoding::Context) -> usize {
3975            80
3976        }
3977    }
3978
3979    unsafe impl
3980        fidl::encoding::Encode<
3981            CreateComponentRequest,
3982            fidl::encoding::DefaultFuchsiaResourceDialect,
3983        > for &mut CreateComponentRequest
3984    {
3985        #[inline]
3986        unsafe fn encode(
3987            self,
3988            encoder: &mut fidl::encoding::Encoder<
3989                '_,
3990                fidl::encoding::DefaultFuchsiaResourceDialect,
3991            >,
3992            offset: usize,
3993            _depth: fidl::encoding::Depth,
3994        ) -> fidl::Result<()> {
3995            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
3996            // Delegate to tuple encoding.
3997            fidl::encoding::Encode::<
3998                CreateComponentRequest,
3999                fidl::encoding::DefaultFuchsiaResourceDialect,
4000            >::encode(
4001                (
4002                    <LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4003                        &mut self.launch_info,
4004                    ),
4005                    <fidl::encoding::Optional<
4006                        fidl::encoding::Endpoint<
4007                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4008                        >,
4009                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4010                        &mut self.controller
4011                    ),
4012                ),
4013                encoder,
4014                offset,
4015                _depth,
4016            )
4017        }
4018    }
4019    unsafe impl<
4020            T0: fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>,
4021            T1: fidl::encoding::Encode<
4022                fidl::encoding::Optional<
4023                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4024                >,
4025                fidl::encoding::DefaultFuchsiaResourceDialect,
4026            >,
4027        >
4028        fidl::encoding::Encode<
4029            CreateComponentRequest,
4030            fidl::encoding::DefaultFuchsiaResourceDialect,
4031        > for (T0, T1)
4032    {
4033        #[inline]
4034        unsafe fn encode(
4035            self,
4036            encoder: &mut fidl::encoding::Encoder<
4037                '_,
4038                fidl::encoding::DefaultFuchsiaResourceDialect,
4039            >,
4040            offset: usize,
4041            depth: fidl::encoding::Depth,
4042        ) -> fidl::Result<()> {
4043            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4044            // Zero out padding regions. There's no need to apply masks
4045            // because the unmasked parts will be overwritten by fields.
4046            unsafe {
4047                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
4048                (ptr as *mut u64).write_unaligned(0);
4049            }
4050            // Write the fields.
4051            self.0.encode(encoder, offset + 0, depth)?;
4052            self.1.encode(encoder, offset + 72, depth)?;
4053            Ok(())
4054        }
4055    }
4056
4057    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4058        for CreateComponentRequest
4059    {
4060        #[inline(always)]
4061        fn new_empty() -> Self {
4062            Self {
4063                launch_info: fidl::new_empty!(
4064                    LaunchInfo,
4065                    fidl::encoding::DefaultFuchsiaResourceDialect
4066                ),
4067                controller: fidl::new_empty!(
4068                    fidl::encoding::Optional<
4069                        fidl::encoding::Endpoint<
4070                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4071                        >,
4072                    >,
4073                    fidl::encoding::DefaultFuchsiaResourceDialect
4074                ),
4075            }
4076        }
4077
4078        #[inline]
4079        unsafe fn decode(
4080            &mut self,
4081            decoder: &mut fidl::encoding::Decoder<
4082                '_,
4083                fidl::encoding::DefaultFuchsiaResourceDialect,
4084            >,
4085            offset: usize,
4086            _depth: fidl::encoding::Depth,
4087        ) -> fidl::Result<()> {
4088            decoder.debug_check_bounds::<Self>(offset);
4089            // Verify that padding bytes are zero.
4090            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
4091            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4092            let mask = 0xffffffff00000000u64;
4093            let maskedval = padval & mask;
4094            if maskedval != 0 {
4095                return Err(fidl::Error::NonZeroPadding {
4096                    padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
4097                });
4098            }
4099            fidl::decode!(
4100                LaunchInfo,
4101                fidl::encoding::DefaultFuchsiaResourceDialect,
4102                &mut self.launch_info,
4103                decoder,
4104                offset + 0,
4105                _depth
4106            )?;
4107            fidl::decode!(
4108                fidl::encoding::Optional<
4109                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4110                >,
4111                fidl::encoding::DefaultFuchsiaResourceDialect,
4112                &mut self.controller,
4113                decoder,
4114                offset + 72,
4115                _depth
4116            )?;
4117            Ok(())
4118        }
4119    }
4120
4121    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTableStruct {
4122        type Borrowed<'a> = &'a mut Self;
4123        fn take_or_borrow<'a>(
4124            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4125        ) -> Self::Borrowed<'a> {
4126            value
4127        }
4128    }
4129
4130    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTableStruct {
4131        type Owned = Self;
4132
4133        #[inline(always)]
4134        fn inline_align(_context: fidl::encoding::Context) -> usize {
4135            8
4136        }
4137
4138        #[inline(always)]
4139        fn inline_size(_context: fidl::encoding::Context) -> usize {
4140            16
4141        }
4142    }
4143
4144    unsafe impl
4145        fidl::encoding::Encode<
4146            EmptyResourceTableStruct,
4147            fidl::encoding::DefaultFuchsiaResourceDialect,
4148        > for &mut EmptyResourceTableStruct
4149    {
4150        #[inline]
4151        unsafe fn encode(
4152            self,
4153            encoder: &mut fidl::encoding::Encoder<
4154                '_,
4155                fidl::encoding::DefaultFuchsiaResourceDialect,
4156            >,
4157            offset: usize,
4158            _depth: fidl::encoding::Depth,
4159        ) -> fidl::Result<()> {
4160            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4161            // Delegate to tuple encoding.
4162            fidl::encoding::Encode::<
4163                EmptyResourceTableStruct,
4164                fidl::encoding::DefaultFuchsiaResourceDialect,
4165            >::encode(
4166                (<EmptyResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4167                    &mut self.table,
4168                ),),
4169                encoder,
4170                offset,
4171                _depth,
4172            )
4173        }
4174    }
4175    unsafe impl<
4176            T0: fidl::encoding::Encode<
4177                EmptyResourceTable,
4178                fidl::encoding::DefaultFuchsiaResourceDialect,
4179            >,
4180        >
4181        fidl::encoding::Encode<
4182            EmptyResourceTableStruct,
4183            fidl::encoding::DefaultFuchsiaResourceDialect,
4184        > for (T0,)
4185    {
4186        #[inline]
4187        unsafe fn encode(
4188            self,
4189            encoder: &mut fidl::encoding::Encoder<
4190                '_,
4191                fidl::encoding::DefaultFuchsiaResourceDialect,
4192            >,
4193            offset: usize,
4194            depth: fidl::encoding::Depth,
4195        ) -> fidl::Result<()> {
4196            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4197            // Zero out padding regions. There's no need to apply masks
4198            // because the unmasked parts will be overwritten by fields.
4199            // Write the fields.
4200            self.0.encode(encoder, offset + 0, depth)?;
4201            Ok(())
4202        }
4203    }
4204
4205    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4206        for EmptyResourceTableStruct
4207    {
4208        #[inline(always)]
4209        fn new_empty() -> Self {
4210            Self {
4211                table: fidl::new_empty!(
4212                    EmptyResourceTable,
4213                    fidl::encoding::DefaultFuchsiaResourceDialect
4214                ),
4215            }
4216        }
4217
4218        #[inline]
4219        unsafe fn decode(
4220            &mut self,
4221            decoder: &mut fidl::encoding::Decoder<
4222                '_,
4223                fidl::encoding::DefaultFuchsiaResourceDialect,
4224            >,
4225            offset: usize,
4226            _depth: fidl::encoding::Depth,
4227        ) -> fidl::Result<()> {
4228            decoder.debug_check_bounds::<Self>(offset);
4229            // Verify that padding bytes are zero.
4230            fidl::decode!(
4231                EmptyResourceTable,
4232                fidl::encoding::DefaultFuchsiaResourceDialect,
4233                &mut self.table,
4234                decoder,
4235                offset + 0,
4236                _depth
4237            )?;
4238            Ok(())
4239        }
4240    }
4241
4242    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnionStruct {
4243        type Borrowed<'a> = &'a mut Self;
4244        fn take_or_borrow<'a>(
4245            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4246        ) -> Self::Borrowed<'a> {
4247            value
4248        }
4249    }
4250
4251    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnionStruct {
4252        type Owned = Self;
4253
4254        #[inline(always)]
4255        fn inline_align(_context: fidl::encoding::Context) -> usize {
4256            8
4257        }
4258
4259        #[inline(always)]
4260        fn inline_size(_context: fidl::encoding::Context) -> usize {
4261            16
4262        }
4263    }
4264
4265    unsafe impl
4266        fidl::encoding::Encode<
4267            EnvelopeInliningTestUnionStruct,
4268            fidl::encoding::DefaultFuchsiaResourceDialect,
4269        > for &mut EnvelopeInliningTestUnionStruct
4270    {
4271        #[inline]
4272        unsafe fn encode(
4273            self,
4274            encoder: &mut fidl::encoding::Encoder<
4275                '_,
4276                fidl::encoding::DefaultFuchsiaResourceDialect,
4277            >,
4278            offset: usize,
4279            _depth: fidl::encoding::Depth,
4280        ) -> fidl::Result<()> {
4281            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4282            // Delegate to tuple encoding.
4283            fidl::encoding::Encode::<EnvelopeInliningTestUnionStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4284                (
4285                    <EnvelopeInliningTestUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
4286                ),
4287                encoder, offset, _depth
4288            )
4289        }
4290    }
4291    unsafe impl<
4292            T0: fidl::encoding::Encode<
4293                EnvelopeInliningTestUnion,
4294                fidl::encoding::DefaultFuchsiaResourceDialect,
4295            >,
4296        >
4297        fidl::encoding::Encode<
4298            EnvelopeInliningTestUnionStruct,
4299            fidl::encoding::DefaultFuchsiaResourceDialect,
4300        > for (T0,)
4301    {
4302        #[inline]
4303        unsafe fn encode(
4304            self,
4305            encoder: &mut fidl::encoding::Encoder<
4306                '_,
4307                fidl::encoding::DefaultFuchsiaResourceDialect,
4308            >,
4309            offset: usize,
4310            depth: fidl::encoding::Depth,
4311        ) -> fidl::Result<()> {
4312            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4313            // Zero out padding regions. There's no need to apply masks
4314            // because the unmasked parts will be overwritten by fields.
4315            // Write the fields.
4316            self.0.encode(encoder, offset + 0, depth)?;
4317            Ok(())
4318        }
4319    }
4320
4321    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4322        for EnvelopeInliningTestUnionStruct
4323    {
4324        #[inline(always)]
4325        fn new_empty() -> Self {
4326            Self {
4327                u: fidl::new_empty!(
4328                    EnvelopeInliningTestUnion,
4329                    fidl::encoding::DefaultFuchsiaResourceDialect
4330                ),
4331            }
4332        }
4333
4334        #[inline]
4335        unsafe fn decode(
4336            &mut self,
4337            decoder: &mut fidl::encoding::Decoder<
4338                '_,
4339                fidl::encoding::DefaultFuchsiaResourceDialect,
4340            >,
4341            offset: usize,
4342            _depth: fidl::encoding::Depth,
4343        ) -> fidl::Result<()> {
4344            decoder.debug_check_bounds::<Self>(offset);
4345            // Verify that padding bytes are zero.
4346            fidl::decode!(
4347                EnvelopeInliningTestUnion,
4348                fidl::encoding::DefaultFuchsiaResourceDialect,
4349                &mut self.u,
4350                decoder,
4351                offset + 0,
4352                _depth
4353            )?;
4354            Ok(())
4355        }
4356    }
4357
4358    impl fidl::encoding::ResourceTypeMarker for EventWithDefaultRights {
4359        type Borrowed<'a> = &'a mut Self;
4360        fn take_or_borrow<'a>(
4361            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4362        ) -> Self::Borrowed<'a> {
4363            value
4364        }
4365    }
4366
4367    unsafe impl fidl::encoding::TypeMarker for EventWithDefaultRights {
4368        type Owned = Self;
4369
4370        #[inline(always)]
4371        fn inline_align(_context: fidl::encoding::Context) -> usize {
4372            4
4373        }
4374
4375        #[inline(always)]
4376        fn inline_size(_context: fidl::encoding::Context) -> usize {
4377            4
4378        }
4379    }
4380
4381    unsafe impl
4382        fidl::encoding::Encode<
4383            EventWithDefaultRights,
4384            fidl::encoding::DefaultFuchsiaResourceDialect,
4385        > for &mut EventWithDefaultRights
4386    {
4387        #[inline]
4388        unsafe fn encode(
4389            self,
4390            encoder: &mut fidl::encoding::Encoder<
4391                '_,
4392                fidl::encoding::DefaultFuchsiaResourceDialect,
4393            >,
4394            offset: usize,
4395            _depth: fidl::encoding::Depth,
4396        ) -> fidl::Result<()> {
4397            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4398            // Delegate to tuple encoding.
4399            fidl::encoding::Encode::<
4400                EventWithDefaultRights,
4401                fidl::encoding::DefaultFuchsiaResourceDialect,
4402            >::encode(
4403                (<fidl::encoding::HandleType<
4404                    fidl::Event,
4405                    { fidl::ObjectType::EVENT.into_raw() },
4406                    53251,
4407                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4408                    &mut self.h
4409                ),),
4410                encoder,
4411                offset,
4412                _depth,
4413            )
4414        }
4415    }
4416    unsafe impl<
4417            T0: fidl::encoding::Encode<
4418                fidl::encoding::HandleType<
4419                    fidl::Event,
4420                    { fidl::ObjectType::EVENT.into_raw() },
4421                    53251,
4422                >,
4423                fidl::encoding::DefaultFuchsiaResourceDialect,
4424            >,
4425        >
4426        fidl::encoding::Encode<
4427            EventWithDefaultRights,
4428            fidl::encoding::DefaultFuchsiaResourceDialect,
4429        > for (T0,)
4430    {
4431        #[inline]
4432        unsafe fn encode(
4433            self,
4434            encoder: &mut fidl::encoding::Encoder<
4435                '_,
4436                fidl::encoding::DefaultFuchsiaResourceDialect,
4437            >,
4438            offset: usize,
4439            depth: fidl::encoding::Depth,
4440        ) -> fidl::Result<()> {
4441            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4442            // Zero out padding regions. There's no need to apply masks
4443            // because the unmasked parts will be overwritten by fields.
4444            // Write the fields.
4445            self.0.encode(encoder, offset + 0, depth)?;
4446            Ok(())
4447        }
4448    }
4449
4450    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4451        for EventWithDefaultRights
4452    {
4453        #[inline(always)]
4454        fn new_empty() -> Self {
4455            Self {
4456                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect),
4457            }
4458        }
4459
4460        #[inline]
4461        unsafe fn decode(
4462            &mut self,
4463            decoder: &mut fidl::encoding::Decoder<
4464                '_,
4465                fidl::encoding::DefaultFuchsiaResourceDialect,
4466            >,
4467            offset: usize,
4468            _depth: fidl::encoding::Depth,
4469        ) -> fidl::Result<()> {
4470            decoder.debug_check_bounds::<Self>(offset);
4471            // Verify that padding bytes are zero.
4472            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4473            Ok(())
4474        }
4475    }
4476
4477    impl fidl::encoding::ResourceTypeMarker for EventWithReducedRights {
4478        type Borrowed<'a> = &'a mut Self;
4479        fn take_or_borrow<'a>(
4480            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4481        ) -> Self::Borrowed<'a> {
4482            value
4483        }
4484    }
4485
4486    unsafe impl fidl::encoding::TypeMarker for EventWithReducedRights {
4487        type Owned = Self;
4488
4489        #[inline(always)]
4490        fn inline_align(_context: fidl::encoding::Context) -> usize {
4491            4
4492        }
4493
4494        #[inline(always)]
4495        fn inline_size(_context: fidl::encoding::Context) -> usize {
4496            4
4497        }
4498    }
4499
4500    unsafe impl
4501        fidl::encoding::Encode<
4502            EventWithReducedRights,
4503            fidl::encoding::DefaultFuchsiaResourceDialect,
4504        > for &mut EventWithReducedRights
4505    {
4506        #[inline]
4507        unsafe fn encode(
4508            self,
4509            encoder: &mut fidl::encoding::Encoder<
4510                '_,
4511                fidl::encoding::DefaultFuchsiaResourceDialect,
4512            >,
4513            offset: usize,
4514            _depth: fidl::encoding::Depth,
4515        ) -> fidl::Result<()> {
4516            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4517            // Delegate to tuple encoding.
4518            fidl::encoding::Encode::<
4519                EventWithReducedRights,
4520                fidl::encoding::DefaultFuchsiaResourceDialect,
4521            >::encode(
4522                (<fidl::encoding::HandleType<
4523                    fidl::Event,
4524                    { fidl::ObjectType::EVENT.into_raw() },
4525                    49155,
4526                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4527                    &mut self.h
4528                ),),
4529                encoder,
4530                offset,
4531                _depth,
4532            )
4533        }
4534    }
4535    unsafe impl<
4536            T0: fidl::encoding::Encode<
4537                fidl::encoding::HandleType<
4538                    fidl::Event,
4539                    { fidl::ObjectType::EVENT.into_raw() },
4540                    49155,
4541                >,
4542                fidl::encoding::DefaultFuchsiaResourceDialect,
4543            >,
4544        >
4545        fidl::encoding::Encode<
4546            EventWithReducedRights,
4547            fidl::encoding::DefaultFuchsiaResourceDialect,
4548        > for (T0,)
4549    {
4550        #[inline]
4551        unsafe fn encode(
4552            self,
4553            encoder: &mut fidl::encoding::Encoder<
4554                '_,
4555                fidl::encoding::DefaultFuchsiaResourceDialect,
4556            >,
4557            offset: usize,
4558            depth: fidl::encoding::Depth,
4559        ) -> fidl::Result<()> {
4560            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4561            // Zero out padding regions. There's no need to apply masks
4562            // because the unmasked parts will be overwritten by fields.
4563            // Write the fields.
4564            self.0.encode(encoder, offset + 0, depth)?;
4565            Ok(())
4566        }
4567    }
4568
4569    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4570        for EventWithReducedRights
4571    {
4572        #[inline(always)]
4573        fn new_empty() -> Self {
4574            Self {
4575                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
4576            }
4577        }
4578
4579        #[inline]
4580        unsafe fn decode(
4581            &mut self,
4582            decoder: &mut fidl::encoding::Decoder<
4583                '_,
4584                fidl::encoding::DefaultFuchsiaResourceDialect,
4585            >,
4586            offset: usize,
4587            _depth: fidl::encoding::Depth,
4588        ) -> fidl::Result<()> {
4589            decoder.debug_check_bounds::<Self>(offset);
4590            // Verify that padding bytes are zero.
4591            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4592            Ok(())
4593        }
4594    }
4595
4596    impl fidl::encoding::ResourceTypeMarker for FidlvizDemo {
4597        type Borrowed<'a> = &'a mut Self;
4598        fn take_or_borrow<'a>(
4599            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4600        ) -> Self::Borrowed<'a> {
4601            value
4602        }
4603    }
4604
4605    unsafe impl fidl::encoding::TypeMarker for FidlvizDemo {
4606        type Owned = Self;
4607
4608        #[inline(always)]
4609        fn inline_align(_context: fidl::encoding::Context) -> usize {
4610            8
4611        }
4612
4613        #[inline(always)]
4614        fn inline_size(_context: fidl::encoding::Context) -> usize {
4615            248
4616        }
4617    }
4618
4619    unsafe impl fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4620        for &mut FidlvizDemo
4621    {
4622        #[inline]
4623        unsafe fn encode(
4624            self,
4625            encoder: &mut fidl::encoding::Encoder<
4626                '_,
4627                fidl::encoding::DefaultFuchsiaResourceDialect,
4628            >,
4629            offset: usize,
4630            _depth: fidl::encoding::Depth,
4631        ) -> fidl::Result<()> {
4632            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4633            // Delegate to tuple encoding.
4634            fidl::encoding::Encode::<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4635                (
4636                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
4637                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
4638                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
4639                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
4640                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
4641                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
4642                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
4643                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
4644                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
4645                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f10),
4646                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f11),
4647                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f12),
4648                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f13),
4649                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.f14),
4650                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f15),
4651                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f16),
4652                    <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f17),
4653                    <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f18),
4654                    <fidl::encoding::UnboundedVector<f64> as fidl::encoding::ValueTypeMarker>::borrow(&self.f19),
4655                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f20),
4656                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.f21),
4657                    <FidlvizBits as fidl::encoding::ValueTypeMarker>::borrow(&self.f22),
4658                    <FidlvizEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.f23),
4659                    <FidlvizStruct1 as fidl::encoding::ValueTypeMarker>::borrow(&self.f24),
4660                    <FidlvizStruct2 as fidl::encoding::ValueTypeMarker>::borrow(&self.f25),
4661                    <fidl::encoding::Boxed<FidlvizStruct1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f26),
4662                    <fidl::encoding::Boxed<FidlvizStruct2> as fidl::encoding::ValueTypeMarker>::borrow(&self.f27),
4663                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f28),
4664                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f29),
4665                    <fidl::encoding::OptionalUnion<FidlvizUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.f30),
4666                    <FidlvizUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.f31),
4667                ),
4668                encoder, offset, _depth
4669            )
4670        }
4671    }
4672    unsafe impl<
4673            T0: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4674            T1: fidl::encoding::Encode<i8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4675            T2: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4676            T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4677            T4: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4678            T5: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4679            T6: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4680            T7: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4681            T8: fidl::encoding::Encode<f32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4682            T9: fidl::encoding::Encode<f64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4683            T10: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4684            T11: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4685            T12: fidl::encoding::Encode<
4686                fidl::encoding::UnboundedString,
4687                fidl::encoding::DefaultFuchsiaResourceDialect,
4688            >,
4689            T13: fidl::encoding::Encode<
4690                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4691                fidl::encoding::DefaultFuchsiaResourceDialect,
4692            >,
4693            T14: fidl::encoding::Encode<
4694                fidl::encoding::UnboundedString,
4695                fidl::encoding::DefaultFuchsiaResourceDialect,
4696            >,
4697            T15: fidl::encoding::Encode<
4698                fidl::encoding::Optional<
4699                    fidl::encoding::HandleType<
4700                        fidl::Handle,
4701                        { fidl::ObjectType::NONE.into_raw() },
4702                        2147483648,
4703                    >,
4704                >,
4705                fidl::encoding::DefaultFuchsiaResourceDialect,
4706            >,
4707            T16: fidl::encoding::Encode<
4708                fidl::encoding::HandleType<
4709                    fidl::Handle,
4710                    { fidl::ObjectType::NONE.into_raw() },
4711                    2147483648,
4712                >,
4713                fidl::encoding::DefaultFuchsiaResourceDialect,
4714            >,
4715            T17: fidl::encoding::Encode<
4716                fidl::encoding::Array<u8, 3>,
4717                fidl::encoding::DefaultFuchsiaResourceDialect,
4718            >,
4719            T18: fidl::encoding::Encode<
4720                fidl::encoding::UnboundedVector<f64>,
4721                fidl::encoding::DefaultFuchsiaResourceDialect,
4722            >,
4723            T19: fidl::encoding::Encode<
4724                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4725                fidl::encoding::DefaultFuchsiaResourceDialect,
4726            >,
4727            T20: fidl::encoding::Encode<
4728                fidl::encoding::UnboundedVector<u8>,
4729                fidl::encoding::DefaultFuchsiaResourceDialect,
4730            >,
4731            T21: fidl::encoding::Encode<FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect>,
4732            T22: fidl::encoding::Encode<FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
4733            T23: fidl::encoding::Encode<FidlvizStruct1, fidl::encoding::DefaultFuchsiaResourceDialect>,
4734            T24: fidl::encoding::Encode<FidlvizStruct2, fidl::encoding::DefaultFuchsiaResourceDialect>,
4735            T25: fidl::encoding::Encode<
4736                fidl::encoding::Boxed<FidlvizStruct1>,
4737                fidl::encoding::DefaultFuchsiaResourceDialect,
4738            >,
4739            T26: fidl::encoding::Encode<
4740                fidl::encoding::Boxed<FidlvizStruct2>,
4741                fidl::encoding::DefaultFuchsiaResourceDialect,
4742            >,
4743            T27: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4744            T28: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4745            T29: fidl::encoding::Encode<
4746                fidl::encoding::OptionalUnion<FidlvizUnion>,
4747                fidl::encoding::DefaultFuchsiaResourceDialect,
4748            >,
4749            T30: fidl::encoding::Encode<FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
4750        > fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4751        for (
4752            T0,
4753            T1,
4754            T2,
4755            T3,
4756            T4,
4757            T5,
4758            T6,
4759            T7,
4760            T8,
4761            T9,
4762            T10,
4763            T11,
4764            T12,
4765            T13,
4766            T14,
4767            T15,
4768            T16,
4769            T17,
4770            T18,
4771            T19,
4772            T20,
4773            T21,
4774            T22,
4775            T23,
4776            T24,
4777            T25,
4778            T26,
4779            T27,
4780            T28,
4781            T29,
4782            T30,
4783        )
4784    {
4785        #[inline]
4786        unsafe fn encode(
4787            self,
4788            encoder: &mut fidl::encoding::Encoder<
4789                '_,
4790                fidl::encoding::DefaultFuchsiaResourceDialect,
4791            >,
4792            offset: usize,
4793            depth: fidl::encoding::Depth,
4794        ) -> fidl::Result<()> {
4795            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4796            // Zero out padding regions. There's no need to apply masks
4797            // because the unmasked parts will be overwritten by fields.
4798            unsafe {
4799                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4800                (ptr as *mut u64).write_unaligned(0);
4801            }
4802            unsafe {
4803                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
4804                (ptr as *mut u64).write_unaligned(0);
4805            }
4806            unsafe {
4807                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(152);
4808                (ptr as *mut u64).write_unaligned(0);
4809            }
4810            // Write the fields.
4811            self.0.encode(encoder, offset + 0, depth)?;
4812            self.1.encode(encoder, offset + 1, depth)?;
4813            self.2.encode(encoder, offset + 2, depth)?;
4814            self.3.encode(encoder, offset + 4, depth)?;
4815            self.4.encode(encoder, offset + 8, depth)?;
4816            self.5.encode(encoder, offset + 16, depth)?;
4817            self.6.encode(encoder, offset + 17, depth)?;
4818            self.7.encode(encoder, offset + 18, depth)?;
4819            self.8.encode(encoder, offset + 20, depth)?;
4820            self.9.encode(encoder, offset + 24, depth)?;
4821            self.10.encode(encoder, offset + 32, depth)?;
4822            self.11.encode(encoder, offset + 33, depth)?;
4823            self.12.encode(encoder, offset + 40, depth)?;
4824            self.13.encode(encoder, offset + 56, depth)?;
4825            self.14.encode(encoder, offset + 72, depth)?;
4826            self.15.encode(encoder, offset + 88, depth)?;
4827            self.16.encode(encoder, offset + 92, depth)?;
4828            self.17.encode(encoder, offset + 96, depth)?;
4829            self.18.encode(encoder, offset + 104, depth)?;
4830            self.19.encode(encoder, offset + 120, depth)?;
4831            self.20.encode(encoder, offset + 136, depth)?;
4832            self.21.encode(encoder, offset + 152, depth)?;
4833            self.22.encode(encoder, offset + 153, depth)?;
4834            self.23.encode(encoder, offset + 154, depth)?;
4835            self.24.encode(encoder, offset + 160, depth)?;
4836            self.25.encode(encoder, offset + 168, depth)?;
4837            self.26.encode(encoder, offset + 176, depth)?;
4838            self.27.encode(encoder, offset + 184, depth)?;
4839            self.28.encode(encoder, offset + 200, depth)?;
4840            self.29.encode(encoder, offset + 216, depth)?;
4841            self.30.encode(encoder, offset + 232, depth)?;
4842            Ok(())
4843        }
4844    }
4845
4846    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {
4847        #[inline(always)]
4848        fn new_empty() -> Self {
4849            Self {
4850                f1: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4851                f2: fidl::new_empty!(i8, fidl::encoding::DefaultFuchsiaResourceDialect),
4852                f3: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4853                f4: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4854                f5: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
4855                f6: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4856                f7: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4857                f8: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4858                f9: fidl::new_empty!(f32, fidl::encoding::DefaultFuchsiaResourceDialect),
4859                f10: fidl::new_empty!(f64, fidl::encoding::DefaultFuchsiaResourceDialect),
4860                f11: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4861                f12: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4862                f13: fidl::new_empty!(
4863                    fidl::encoding::UnboundedString,
4864                    fidl::encoding::DefaultFuchsiaResourceDialect
4865                ),
4866                f14: fidl::new_empty!(
4867                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4868                    fidl::encoding::DefaultFuchsiaResourceDialect
4869                ),
4870                f15: fidl::new_empty!(
4871                    fidl::encoding::UnboundedString,
4872                    fidl::encoding::DefaultFuchsiaResourceDialect
4873                ),
4874                f16: fidl::new_empty!(
4875                    fidl::encoding::Optional<
4876                        fidl::encoding::HandleType<
4877                            fidl::Handle,
4878                            { fidl::ObjectType::NONE.into_raw() },
4879                            2147483648,
4880                        >,
4881                    >,
4882                    fidl::encoding::DefaultFuchsiaResourceDialect
4883                ),
4884                f17: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
4885                f18: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
4886                f19: fidl::new_empty!(
4887                    fidl::encoding::UnboundedVector<f64>,
4888                    fidl::encoding::DefaultFuchsiaResourceDialect
4889                ),
4890                f20: fidl::new_empty!(
4891                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4892                    fidl::encoding::DefaultFuchsiaResourceDialect
4893                ),
4894                f21: fidl::new_empty!(
4895                    fidl::encoding::UnboundedVector<u8>,
4896                    fidl::encoding::DefaultFuchsiaResourceDialect
4897                ),
4898                f22: fidl::new_empty!(FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect),
4899                f23: fidl::new_empty!(FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect),
4900                f24: fidl::new_empty!(
4901                    FidlvizStruct1,
4902                    fidl::encoding::DefaultFuchsiaResourceDialect
4903                ),
4904                f25: fidl::new_empty!(
4905                    FidlvizStruct2,
4906                    fidl::encoding::DefaultFuchsiaResourceDialect
4907                ),
4908                f26: fidl::new_empty!(
4909                    fidl::encoding::Boxed<FidlvizStruct1>,
4910                    fidl::encoding::DefaultFuchsiaResourceDialect
4911                ),
4912                f27: fidl::new_empty!(
4913                    fidl::encoding::Boxed<FidlvizStruct2>,
4914                    fidl::encoding::DefaultFuchsiaResourceDialect
4915                ),
4916                f28: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4917                f29: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4918                f30: fidl::new_empty!(
4919                    fidl::encoding::OptionalUnion<FidlvizUnion>,
4920                    fidl::encoding::DefaultFuchsiaResourceDialect
4921                ),
4922                f31: fidl::new_empty!(FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect),
4923            }
4924        }
4925
4926        #[inline]
4927        unsafe fn decode(
4928            &mut self,
4929            decoder: &mut fidl::encoding::Decoder<
4930                '_,
4931                fidl::encoding::DefaultFuchsiaResourceDialect,
4932            >,
4933            offset: usize,
4934            _depth: fidl::encoding::Depth,
4935        ) -> fidl::Result<()> {
4936            decoder.debug_check_bounds::<Self>(offset);
4937            // Verify that padding bytes are zero.
4938            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4939            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4940            let mask = 0xffffffffffff0000u64;
4941            let maskedval = padval & mask;
4942            if maskedval != 0 {
4943                return Err(fidl::Error::NonZeroPadding {
4944                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4945                });
4946            }
4947            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
4948            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4949            let mask = 0xffffffffff000000u64;
4950            let maskedval = padval & mask;
4951            if maskedval != 0 {
4952                return Err(fidl::Error::NonZeroPadding {
4953                    padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
4954                });
4955            }
4956            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(152) };
4957            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4958            let mask = 0xffffffffff000000u64;
4959            let maskedval = padval & mask;
4960            if maskedval != 0 {
4961                return Err(fidl::Error::NonZeroPadding {
4962                    padding_start: offset + 152 + ((mask as u64).trailing_zeros() / 8) as usize,
4963                });
4964            }
4965            fidl::decode!(
4966                u8,
4967                fidl::encoding::DefaultFuchsiaResourceDialect,
4968                &mut self.f1,
4969                decoder,
4970                offset + 0,
4971                _depth
4972            )?;
4973            fidl::decode!(
4974                i8,
4975                fidl::encoding::DefaultFuchsiaResourceDialect,
4976                &mut self.f2,
4977                decoder,
4978                offset + 1,
4979                _depth
4980            )?;
4981            fidl::decode!(
4982                u16,
4983                fidl::encoding::DefaultFuchsiaResourceDialect,
4984                &mut self.f3,
4985                decoder,
4986                offset + 2,
4987                _depth
4988            )?;
4989            fidl::decode!(
4990                u32,
4991                fidl::encoding::DefaultFuchsiaResourceDialect,
4992                &mut self.f4,
4993                decoder,
4994                offset + 4,
4995                _depth
4996            )?;
4997            fidl::decode!(
4998                u64,
4999                fidl::encoding::DefaultFuchsiaResourceDialect,
5000                &mut self.f5,
5001                decoder,
5002                offset + 8,
5003                _depth
5004            )?;
5005            fidl::decode!(
5006                u8,
5007                fidl::encoding::DefaultFuchsiaResourceDialect,
5008                &mut self.f6,
5009                decoder,
5010                offset + 16,
5011                _depth
5012            )?;
5013            fidl::decode!(
5014                u8,
5015                fidl::encoding::DefaultFuchsiaResourceDialect,
5016                &mut self.f7,
5017                decoder,
5018                offset + 17,
5019                _depth
5020            )?;
5021            fidl::decode!(
5022                u16,
5023                fidl::encoding::DefaultFuchsiaResourceDialect,
5024                &mut self.f8,
5025                decoder,
5026                offset + 18,
5027                _depth
5028            )?;
5029            fidl::decode!(
5030                f32,
5031                fidl::encoding::DefaultFuchsiaResourceDialect,
5032                &mut self.f9,
5033                decoder,
5034                offset + 20,
5035                _depth
5036            )?;
5037            fidl::decode!(
5038                f64,
5039                fidl::encoding::DefaultFuchsiaResourceDialect,
5040                &mut self.f10,
5041                decoder,
5042                offset + 24,
5043                _depth
5044            )?;
5045            fidl::decode!(
5046                bool,
5047                fidl::encoding::DefaultFuchsiaResourceDialect,
5048                &mut self.f11,
5049                decoder,
5050                offset + 32,
5051                _depth
5052            )?;
5053            fidl::decode!(
5054                bool,
5055                fidl::encoding::DefaultFuchsiaResourceDialect,
5056                &mut self.f12,
5057                decoder,
5058                offset + 33,
5059                _depth
5060            )?;
5061            fidl::decode!(
5062                fidl::encoding::UnboundedString,
5063                fidl::encoding::DefaultFuchsiaResourceDialect,
5064                &mut self.f13,
5065                decoder,
5066                offset + 40,
5067                _depth
5068            )?;
5069            fidl::decode!(
5070                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5071                fidl::encoding::DefaultFuchsiaResourceDialect,
5072                &mut self.f14,
5073                decoder,
5074                offset + 56,
5075                _depth
5076            )?;
5077            fidl::decode!(
5078                fidl::encoding::UnboundedString,
5079                fidl::encoding::DefaultFuchsiaResourceDialect,
5080                &mut self.f15,
5081                decoder,
5082                offset + 72,
5083                _depth
5084            )?;
5085            fidl::decode!(
5086                fidl::encoding::Optional<
5087                    fidl::encoding::HandleType<
5088                        fidl::Handle,
5089                        { fidl::ObjectType::NONE.into_raw() },
5090                        2147483648,
5091                    >,
5092                >,
5093                fidl::encoding::DefaultFuchsiaResourceDialect,
5094                &mut self.f16,
5095                decoder,
5096                offset + 88,
5097                _depth
5098            )?;
5099            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f17, decoder, offset + 92, _depth)?;
5100            fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f18, decoder, offset + 96, _depth)?;
5101            fidl::decode!(
5102                fidl::encoding::UnboundedVector<f64>,
5103                fidl::encoding::DefaultFuchsiaResourceDialect,
5104                &mut self.f19,
5105                decoder,
5106                offset + 104,
5107                _depth
5108            )?;
5109            fidl::decode!(
5110                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
5111                fidl::encoding::DefaultFuchsiaResourceDialect,
5112                &mut self.f20,
5113                decoder,
5114                offset + 120,
5115                _depth
5116            )?;
5117            fidl::decode!(
5118                fidl::encoding::UnboundedVector<u8>,
5119                fidl::encoding::DefaultFuchsiaResourceDialect,
5120                &mut self.f21,
5121                decoder,
5122                offset + 136,
5123                _depth
5124            )?;
5125            fidl::decode!(
5126                FidlvizBits,
5127                fidl::encoding::DefaultFuchsiaResourceDialect,
5128                &mut self.f22,
5129                decoder,
5130                offset + 152,
5131                _depth
5132            )?;
5133            fidl::decode!(
5134                FidlvizEnum,
5135                fidl::encoding::DefaultFuchsiaResourceDialect,
5136                &mut self.f23,
5137                decoder,
5138                offset + 153,
5139                _depth
5140            )?;
5141            fidl::decode!(
5142                FidlvizStruct1,
5143                fidl::encoding::DefaultFuchsiaResourceDialect,
5144                &mut self.f24,
5145                decoder,
5146                offset + 154,
5147                _depth
5148            )?;
5149            fidl::decode!(
5150                FidlvizStruct2,
5151                fidl::encoding::DefaultFuchsiaResourceDialect,
5152                &mut self.f25,
5153                decoder,
5154                offset + 160,
5155                _depth
5156            )?;
5157            fidl::decode!(
5158                fidl::encoding::Boxed<FidlvizStruct1>,
5159                fidl::encoding::DefaultFuchsiaResourceDialect,
5160                &mut self.f26,
5161                decoder,
5162                offset + 168,
5163                _depth
5164            )?;
5165            fidl::decode!(
5166                fidl::encoding::Boxed<FidlvizStruct2>,
5167                fidl::encoding::DefaultFuchsiaResourceDialect,
5168                &mut self.f27,
5169                decoder,
5170                offset + 176,
5171                _depth
5172            )?;
5173            fidl::decode!(
5174                FidlvizTable,
5175                fidl::encoding::DefaultFuchsiaResourceDialect,
5176                &mut self.f28,
5177                decoder,
5178                offset + 184,
5179                _depth
5180            )?;
5181            fidl::decode!(
5182                FidlvizTable,
5183                fidl::encoding::DefaultFuchsiaResourceDialect,
5184                &mut self.f29,
5185                decoder,
5186                offset + 200,
5187                _depth
5188            )?;
5189            fidl::decode!(
5190                fidl::encoding::OptionalUnion<FidlvizUnion>,
5191                fidl::encoding::DefaultFuchsiaResourceDialect,
5192                &mut self.f30,
5193                decoder,
5194                offset + 216,
5195                _depth
5196            )?;
5197            fidl::decode!(
5198                FidlvizUnion,
5199                fidl::encoding::DefaultFuchsiaResourceDialect,
5200                &mut self.f31,
5201                decoder,
5202                offset + 232,
5203                _depth
5204            )?;
5205            Ok(())
5206        }
5207    }
5208
5209    impl fidl::encoding::ResourceTypeMarker for GoldenHandleBasicRightsStruct {
5210        type Borrowed<'a> = &'a mut Self;
5211        fn take_or_borrow<'a>(
5212            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5213        ) -> Self::Borrowed<'a> {
5214            value
5215        }
5216    }
5217
5218    unsafe impl fidl::encoding::TypeMarker for GoldenHandleBasicRightsStruct {
5219        type Owned = Self;
5220
5221        #[inline(always)]
5222        fn inline_align(_context: fidl::encoding::Context) -> usize {
5223            4
5224        }
5225
5226        #[inline(always)]
5227        fn inline_size(_context: fidl::encoding::Context) -> usize {
5228            4
5229        }
5230    }
5231
5232    unsafe impl
5233        fidl::encoding::Encode<
5234            GoldenHandleBasicRightsStruct,
5235            fidl::encoding::DefaultFuchsiaResourceDialect,
5236        > for &mut GoldenHandleBasicRightsStruct
5237    {
5238        #[inline]
5239        unsafe fn encode(
5240            self,
5241            encoder: &mut fidl::encoding::Encoder<
5242                '_,
5243                fidl::encoding::DefaultFuchsiaResourceDialect,
5244            >,
5245            offset: usize,
5246            _depth: fidl::encoding::Depth,
5247        ) -> fidl::Result<()> {
5248            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5249            // Delegate to tuple encoding.
5250            fidl::encoding::Encode::<
5251                GoldenHandleBasicRightsStruct,
5252                fidl::encoding::DefaultFuchsiaResourceDialect,
5253            >::encode(
5254                (<fidl::encoding::HandleType<
5255                    fidl::Event,
5256                    { fidl::ObjectType::EVENT.into_raw() },
5257                    49155,
5258                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5259                    &mut self.v
5260                ),),
5261                encoder,
5262                offset,
5263                _depth,
5264            )
5265        }
5266    }
5267    unsafe impl<
5268            T0: fidl::encoding::Encode<
5269                fidl::encoding::HandleType<
5270                    fidl::Event,
5271                    { fidl::ObjectType::EVENT.into_raw() },
5272                    49155,
5273                >,
5274                fidl::encoding::DefaultFuchsiaResourceDialect,
5275            >,
5276        >
5277        fidl::encoding::Encode<
5278            GoldenHandleBasicRightsStruct,
5279            fidl::encoding::DefaultFuchsiaResourceDialect,
5280        > for (T0,)
5281    {
5282        #[inline]
5283        unsafe fn encode(
5284            self,
5285            encoder: &mut fidl::encoding::Encoder<
5286                '_,
5287                fidl::encoding::DefaultFuchsiaResourceDialect,
5288            >,
5289            offset: usize,
5290            depth: fidl::encoding::Depth,
5291        ) -> fidl::Result<()> {
5292            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5293            // Zero out padding regions. There's no need to apply masks
5294            // because the unmasked parts will be overwritten by fields.
5295            // Write the fields.
5296            self.0.encode(encoder, offset + 0, depth)?;
5297            Ok(())
5298        }
5299    }
5300
5301    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5302        for GoldenHandleBasicRightsStruct
5303    {
5304        #[inline(always)]
5305        fn new_empty() -> Self {
5306            Self {
5307                v: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
5308            }
5309        }
5310
5311        #[inline]
5312        unsafe fn decode(
5313            &mut self,
5314            decoder: &mut fidl::encoding::Decoder<
5315                '_,
5316                fidl::encoding::DefaultFuchsiaResourceDialect,
5317            >,
5318            offset: usize,
5319            _depth: fidl::encoding::Depth,
5320        ) -> fidl::Result<()> {
5321            decoder.debug_check_bounds::<Self>(offset);
5322            // Verify that padding bytes are zero.
5323            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.v, decoder, offset + 0, _depth)?;
5324            Ok(())
5325        }
5326    }
5327
5328    impl fidl::encoding::ResourceTypeMarker for GoldenNullableHandleStruct {
5329        type Borrowed<'a> = &'a mut Self;
5330        fn take_or_borrow<'a>(
5331            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5332        ) -> Self::Borrowed<'a> {
5333            value
5334        }
5335    }
5336
5337    unsafe impl fidl::encoding::TypeMarker for GoldenNullableHandleStruct {
5338        type Owned = Self;
5339
5340        #[inline(always)]
5341        fn inline_align(_context: fidl::encoding::Context) -> usize {
5342            4
5343        }
5344
5345        #[inline(always)]
5346        fn inline_size(_context: fidl::encoding::Context) -> usize {
5347            4
5348        }
5349    }
5350
5351    unsafe impl
5352        fidl::encoding::Encode<
5353            GoldenNullableHandleStruct,
5354            fidl::encoding::DefaultFuchsiaResourceDialect,
5355        > for &mut GoldenNullableHandleStruct
5356    {
5357        #[inline]
5358        unsafe fn encode(
5359            self,
5360            encoder: &mut fidl::encoding::Encoder<
5361                '_,
5362                fidl::encoding::DefaultFuchsiaResourceDialect,
5363            >,
5364            offset: usize,
5365            _depth: fidl::encoding::Depth,
5366        ) -> fidl::Result<()> {
5367            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5368            // Delegate to tuple encoding.
5369            fidl::encoding::Encode::<
5370                GoldenNullableHandleStruct,
5371                fidl::encoding::DefaultFuchsiaResourceDialect,
5372            >::encode(
5373                (<fidl::encoding::Optional<
5374                    fidl::encoding::HandleType<
5375                        fidl::Handle,
5376                        { fidl::ObjectType::NONE.into_raw() },
5377                        2147483648,
5378                    >,
5379                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5380                    &mut self.v
5381                ),),
5382                encoder,
5383                offset,
5384                _depth,
5385            )
5386        }
5387    }
5388    unsafe impl<
5389            T0: fidl::encoding::Encode<
5390                fidl::encoding::Optional<
5391                    fidl::encoding::HandleType<
5392                        fidl::Handle,
5393                        { fidl::ObjectType::NONE.into_raw() },
5394                        2147483648,
5395                    >,
5396                >,
5397                fidl::encoding::DefaultFuchsiaResourceDialect,
5398            >,
5399        >
5400        fidl::encoding::Encode<
5401            GoldenNullableHandleStruct,
5402            fidl::encoding::DefaultFuchsiaResourceDialect,
5403        > for (T0,)
5404    {
5405        #[inline]
5406        unsafe fn encode(
5407            self,
5408            encoder: &mut fidl::encoding::Encoder<
5409                '_,
5410                fidl::encoding::DefaultFuchsiaResourceDialect,
5411            >,
5412            offset: usize,
5413            depth: fidl::encoding::Depth,
5414        ) -> fidl::Result<()> {
5415            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5416            // Zero out padding regions. There's no need to apply masks
5417            // because the unmasked parts will be overwritten by fields.
5418            // Write the fields.
5419            self.0.encode(encoder, offset + 0, depth)?;
5420            Ok(())
5421        }
5422    }
5423
5424    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5425        for GoldenNullableHandleStruct
5426    {
5427        #[inline(always)]
5428        fn new_empty() -> Self {
5429            Self {
5430                v: fidl::new_empty!(
5431                    fidl::encoding::Optional<
5432                        fidl::encoding::HandleType<
5433                            fidl::Handle,
5434                            { fidl::ObjectType::NONE.into_raw() },
5435                            2147483648,
5436                        >,
5437                    >,
5438                    fidl::encoding::DefaultFuchsiaResourceDialect
5439                ),
5440            }
5441        }
5442
5443        #[inline]
5444        unsafe fn decode(
5445            &mut self,
5446            decoder: &mut fidl::encoding::Decoder<
5447                '_,
5448                fidl::encoding::DefaultFuchsiaResourceDialect,
5449            >,
5450            offset: usize,
5451            _depth: fidl::encoding::Depth,
5452        ) -> fidl::Result<()> {
5453            decoder.debug_check_bounds::<Self>(offset);
5454            // Verify that padding bytes are zero.
5455            fidl::decode!(
5456                fidl::encoding::Optional<
5457                    fidl::encoding::HandleType<
5458                        fidl::Handle,
5459                        { fidl::ObjectType::NONE.into_raw() },
5460                        2147483648,
5461                    >,
5462                >,
5463                fidl::encoding::DefaultFuchsiaResourceDialect,
5464                &mut self.v,
5465                decoder,
5466                offset + 0,
5467                _depth
5468            )?;
5469            Ok(())
5470        }
5471    }
5472
5473    impl fidl::encoding::ResourceTypeMarker for LaunchInfo {
5474        type Borrowed<'a> = &'a mut Self;
5475        fn take_or_borrow<'a>(
5476            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5477        ) -> Self::Borrowed<'a> {
5478            value
5479        }
5480    }
5481
5482    unsafe impl fidl::encoding::TypeMarker for LaunchInfo {
5483        type Owned = Self;
5484
5485        #[inline(always)]
5486        fn inline_align(_context: fidl::encoding::Context) -> usize {
5487            8
5488        }
5489
5490        #[inline(always)]
5491        fn inline_size(_context: fidl::encoding::Context) -> usize {
5492            72
5493        }
5494    }
5495
5496    unsafe impl fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5497        for &mut LaunchInfo
5498    {
5499        #[inline]
5500        unsafe fn encode(
5501            self,
5502            encoder: &mut fidl::encoding::Encoder<
5503                '_,
5504                fidl::encoding::DefaultFuchsiaResourceDialect,
5505            >,
5506            offset: usize,
5507            _depth: fidl::encoding::Depth,
5508        ) -> fidl::Result<()> {
5509            encoder.debug_check_bounds::<LaunchInfo>(offset);
5510            // Delegate to tuple encoding.
5511            fidl::encoding::Encode::<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5512                (
5513                    <fidl::encoding::BoundedString<200> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
5514                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.arguments),
5515                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.out),
5516                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.err),
5517                    <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),
5518                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.flat_namespace),
5519                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.additional_services),
5520                ),
5521                encoder, offset, _depth
5522            )
5523        }
5524    }
5525    unsafe impl<
5526            T0: fidl::encoding::Encode<
5527                fidl::encoding::BoundedString<200>,
5528                fidl::encoding::DefaultFuchsiaResourceDialect,
5529            >,
5530            T1: fidl::encoding::Encode<
5531                fidl::encoding::Optional<
5532                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5533                >,
5534                fidl::encoding::DefaultFuchsiaResourceDialect,
5535            >,
5536            T2: fidl::encoding::Encode<
5537                fidl::encoding::Boxed<TransformerEmptyStruct>,
5538                fidl::encoding::DefaultFuchsiaResourceDialect,
5539            >,
5540            T3: fidl::encoding::Encode<
5541                fidl::encoding::Boxed<TransformerEmptyStruct>,
5542                fidl::encoding::DefaultFuchsiaResourceDialect,
5543            >,
5544            T4: fidl::encoding::Encode<
5545                fidl::encoding::Optional<
5546                    fidl::encoding::HandleType<
5547                        fidl::Channel,
5548                        { fidl::ObjectType::CHANNEL.into_raw() },
5549                        2147483648,
5550                    >,
5551                >,
5552                fidl::encoding::DefaultFuchsiaResourceDialect,
5553            >,
5554            T5: fidl::encoding::Encode<
5555                fidl::encoding::Boxed<TransformerEmptyStruct>,
5556                fidl::encoding::DefaultFuchsiaResourceDialect,
5557            >,
5558            T6: fidl::encoding::Encode<
5559                fidl::encoding::Boxed<TransformerEmptyStruct>,
5560                fidl::encoding::DefaultFuchsiaResourceDialect,
5561            >,
5562        > fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5563        for (T0, T1, T2, T3, T4, T5, T6)
5564    {
5565        #[inline]
5566        unsafe fn encode(
5567            self,
5568            encoder: &mut fidl::encoding::Encoder<
5569                '_,
5570                fidl::encoding::DefaultFuchsiaResourceDialect,
5571            >,
5572            offset: usize,
5573            depth: fidl::encoding::Depth,
5574        ) -> fidl::Result<()> {
5575            encoder.debug_check_bounds::<LaunchInfo>(offset);
5576            // Zero out padding regions. There's no need to apply masks
5577            // because the unmasked parts will be overwritten by fields.
5578            unsafe {
5579                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
5580                (ptr as *mut u64).write_unaligned(0);
5581            }
5582            // Write the fields.
5583            self.0.encode(encoder, offset + 0, depth)?;
5584            self.1.encode(encoder, offset + 16, depth)?;
5585            self.2.encode(encoder, offset + 32, depth)?;
5586            self.3.encode(encoder, offset + 40, depth)?;
5587            self.4.encode(encoder, offset + 48, depth)?;
5588            self.5.encode(encoder, offset + 56, depth)?;
5589            self.6.encode(encoder, offset + 64, depth)?;
5590            Ok(())
5591        }
5592    }
5593
5594    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {
5595        #[inline(always)]
5596        fn new_empty() -> Self {
5597            Self {
5598                url: fidl::new_empty!(
5599                    fidl::encoding::BoundedString<200>,
5600                    fidl::encoding::DefaultFuchsiaResourceDialect
5601                ),
5602                arguments: fidl::new_empty!(
5603                    fidl::encoding::Optional<
5604                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5605                    >,
5606                    fidl::encoding::DefaultFuchsiaResourceDialect
5607                ),
5608                out: fidl::new_empty!(
5609                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5610                    fidl::encoding::DefaultFuchsiaResourceDialect
5611                ),
5612                err: fidl::new_empty!(
5613                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5614                    fidl::encoding::DefaultFuchsiaResourceDialect
5615                ),
5616                directory_request: fidl::new_empty!(
5617                    fidl::encoding::Optional<
5618                        fidl::encoding::HandleType<
5619                            fidl::Channel,
5620                            { fidl::ObjectType::CHANNEL.into_raw() },
5621                            2147483648,
5622                        >,
5623                    >,
5624                    fidl::encoding::DefaultFuchsiaResourceDialect
5625                ),
5626                flat_namespace: fidl::new_empty!(
5627                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5628                    fidl::encoding::DefaultFuchsiaResourceDialect
5629                ),
5630                additional_services: fidl::new_empty!(
5631                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5632                    fidl::encoding::DefaultFuchsiaResourceDialect
5633                ),
5634            }
5635        }
5636
5637        #[inline]
5638        unsafe fn decode(
5639            &mut self,
5640            decoder: &mut fidl::encoding::Decoder<
5641                '_,
5642                fidl::encoding::DefaultFuchsiaResourceDialect,
5643            >,
5644            offset: usize,
5645            _depth: fidl::encoding::Depth,
5646        ) -> fidl::Result<()> {
5647            decoder.debug_check_bounds::<Self>(offset);
5648            // Verify that padding bytes are zero.
5649            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
5650            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5651            let mask = 0xffffffff00000000u64;
5652            let maskedval = padval & mask;
5653            if maskedval != 0 {
5654                return Err(fidl::Error::NonZeroPadding {
5655                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
5656                });
5657            }
5658            fidl::decode!(
5659                fidl::encoding::BoundedString<200>,
5660                fidl::encoding::DefaultFuchsiaResourceDialect,
5661                &mut self.url,
5662                decoder,
5663                offset + 0,
5664                _depth
5665            )?;
5666            fidl::decode!(
5667                fidl::encoding::Optional<
5668                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5669                >,
5670                fidl::encoding::DefaultFuchsiaResourceDialect,
5671                &mut self.arguments,
5672                decoder,
5673                offset + 16,
5674                _depth
5675            )?;
5676            fidl::decode!(
5677                fidl::encoding::Boxed<TransformerEmptyStruct>,
5678                fidl::encoding::DefaultFuchsiaResourceDialect,
5679                &mut self.out,
5680                decoder,
5681                offset + 32,
5682                _depth
5683            )?;
5684            fidl::decode!(
5685                fidl::encoding::Boxed<TransformerEmptyStruct>,
5686                fidl::encoding::DefaultFuchsiaResourceDialect,
5687                &mut self.err,
5688                decoder,
5689                offset + 40,
5690                _depth
5691            )?;
5692            fidl::decode!(
5693                fidl::encoding::Optional<
5694                    fidl::encoding::HandleType<
5695                        fidl::Channel,
5696                        { fidl::ObjectType::CHANNEL.into_raw() },
5697                        2147483648,
5698                    >,
5699                >,
5700                fidl::encoding::DefaultFuchsiaResourceDialect,
5701                &mut self.directory_request,
5702                decoder,
5703                offset + 48,
5704                _depth
5705            )?;
5706            fidl::decode!(
5707                fidl::encoding::Boxed<TransformerEmptyStruct>,
5708                fidl::encoding::DefaultFuchsiaResourceDialect,
5709                &mut self.flat_namespace,
5710                decoder,
5711                offset + 56,
5712                _depth
5713            )?;
5714            fidl::decode!(
5715                fidl::encoding::Boxed<TransformerEmptyStruct>,
5716                fidl::encoding::DefaultFuchsiaResourceDialect,
5717                &mut self.additional_services,
5718                decoder,
5719                offset + 64,
5720                _depth
5721            )?;
5722            Ok(())
5723        }
5724    }
5725
5726    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5727        type Borrowed<'a> = &'a mut Self;
5728        fn take_or_borrow<'a>(
5729            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5730        ) -> Self::Borrowed<'a> {
5731            value
5732        }
5733    }
5734
5735    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5736        type Owned = Self;
5737
5738        #[inline(always)]
5739        fn inline_align(_context: fidl::encoding::Context) -> usize {
5740            8
5741        }
5742
5743        #[inline(always)]
5744        fn inline_size(_context: fidl::encoding::Context) -> usize {
5745            32
5746        }
5747    }
5748
5749    unsafe impl
5750        fidl::encoding::Encode<
5751            MultipleBoundedNonnullableVectorsOfHandles,
5752            fidl::encoding::DefaultFuchsiaResourceDialect,
5753        > for &mut MultipleBoundedNonnullableVectorsOfHandles
5754    {
5755        #[inline]
5756        unsafe fn encode(
5757            self,
5758            encoder: &mut fidl::encoding::Encoder<
5759                '_,
5760                fidl::encoding::DefaultFuchsiaResourceDialect,
5761            >,
5762            offset: usize,
5763            _depth: fidl::encoding::Depth,
5764        ) -> fidl::Result<()> {
5765            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5766            // Delegate to tuple encoding.
5767            fidl::encoding::Encode::<
5768                MultipleBoundedNonnullableVectorsOfHandles,
5769                fidl::encoding::DefaultFuchsiaResourceDialect,
5770            >::encode(
5771                (
5772                    <fidl::encoding::Vector<
5773                        fidl::encoding::HandleType<
5774                            fidl::Handle,
5775                            { fidl::ObjectType::NONE.into_raw() },
5776                            2147483648,
5777                        >,
5778                        2,
5779                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5780                        &mut self.vh0
5781                    ),
5782                    <fidl::encoding::Vector<
5783                        fidl::encoding::HandleType<
5784                            fidl::Handle,
5785                            { fidl::ObjectType::NONE.into_raw() },
5786                            2147483648,
5787                        >,
5788                        32,
5789                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5790                        &mut self.vh1
5791                    ),
5792                ),
5793                encoder,
5794                offset,
5795                _depth,
5796            )
5797        }
5798    }
5799    unsafe impl<
5800            T0: fidl::encoding::Encode<
5801                fidl::encoding::Vector<
5802                    fidl::encoding::HandleType<
5803                        fidl::Handle,
5804                        { fidl::ObjectType::NONE.into_raw() },
5805                        2147483648,
5806                    >,
5807                    2,
5808                >,
5809                fidl::encoding::DefaultFuchsiaResourceDialect,
5810            >,
5811            T1: fidl::encoding::Encode<
5812                fidl::encoding::Vector<
5813                    fidl::encoding::HandleType<
5814                        fidl::Handle,
5815                        { fidl::ObjectType::NONE.into_raw() },
5816                        2147483648,
5817                    >,
5818                    32,
5819                >,
5820                fidl::encoding::DefaultFuchsiaResourceDialect,
5821            >,
5822        >
5823        fidl::encoding::Encode<
5824            MultipleBoundedNonnullableVectorsOfHandles,
5825            fidl::encoding::DefaultFuchsiaResourceDialect,
5826        > for (T0, T1)
5827    {
5828        #[inline]
5829        unsafe fn encode(
5830            self,
5831            encoder: &mut fidl::encoding::Encoder<
5832                '_,
5833                fidl::encoding::DefaultFuchsiaResourceDialect,
5834            >,
5835            offset: usize,
5836            depth: fidl::encoding::Depth,
5837        ) -> fidl::Result<()> {
5838            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5839            // Zero out padding regions. There's no need to apply masks
5840            // because the unmasked parts will be overwritten by fields.
5841            // Write the fields.
5842            self.0.encode(encoder, offset + 0, depth)?;
5843            self.1.encode(encoder, offset + 16, depth)?;
5844            Ok(())
5845        }
5846    }
5847
5848    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5849        for MultipleBoundedNonnullableVectorsOfHandles
5850    {
5851        #[inline(always)]
5852        fn new_empty() -> Self {
5853            Self {
5854                vh0: fidl::new_empty!(
5855                    fidl::encoding::Vector<
5856                        fidl::encoding::HandleType<
5857                            fidl::Handle,
5858                            { fidl::ObjectType::NONE.into_raw() },
5859                            2147483648,
5860                        >,
5861                        2,
5862                    >,
5863                    fidl::encoding::DefaultFuchsiaResourceDialect
5864                ),
5865                vh1: fidl::new_empty!(
5866                    fidl::encoding::Vector<
5867                        fidl::encoding::HandleType<
5868                            fidl::Handle,
5869                            { fidl::ObjectType::NONE.into_raw() },
5870                            2147483648,
5871                        >,
5872                        32,
5873                    >,
5874                    fidl::encoding::DefaultFuchsiaResourceDialect
5875                ),
5876            }
5877        }
5878
5879        #[inline]
5880        unsafe fn decode(
5881            &mut self,
5882            decoder: &mut fidl::encoding::Decoder<
5883                '_,
5884                fidl::encoding::DefaultFuchsiaResourceDialect,
5885            >,
5886            offset: usize,
5887            _depth: fidl::encoding::Depth,
5888        ) -> fidl::Result<()> {
5889            decoder.debug_check_bounds::<Self>(offset);
5890            // Verify that padding bytes are zero.
5891            fidl::decode!(
5892                fidl::encoding::Vector<
5893                    fidl::encoding::HandleType<
5894                        fidl::Handle,
5895                        { fidl::ObjectType::NONE.into_raw() },
5896                        2147483648,
5897                    >,
5898                    2,
5899                >,
5900                fidl::encoding::DefaultFuchsiaResourceDialect,
5901                &mut self.vh0,
5902                decoder,
5903                offset + 0,
5904                _depth
5905            )?;
5906            fidl::decode!(
5907                fidl::encoding::Vector<
5908                    fidl::encoding::HandleType<
5909                        fidl::Handle,
5910                        { fidl::ObjectType::NONE.into_raw() },
5911                        2147483648,
5912                    >,
5913                    32,
5914                >,
5915                fidl::encoding::DefaultFuchsiaResourceDialect,
5916                &mut self.vh1,
5917                decoder,
5918                offset + 16,
5919                _depth
5920            )?;
5921            Ok(())
5922        }
5923    }
5924
5925    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNullableVectorsOfHandles {
5926        type Borrowed<'a> = &'a mut Self;
5927        fn take_or_borrow<'a>(
5928            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5929        ) -> Self::Borrowed<'a> {
5930            value
5931        }
5932    }
5933
5934    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfHandles {
5935        type Owned = Self;
5936
5937        #[inline(always)]
5938        fn inline_align(_context: fidl::encoding::Context) -> usize {
5939            8
5940        }
5941
5942        #[inline(always)]
5943        fn inline_size(_context: fidl::encoding::Context) -> usize {
5944            32
5945        }
5946    }
5947
5948    unsafe impl
5949        fidl::encoding::Encode<
5950            MultipleBoundedNullableVectorsOfHandles,
5951            fidl::encoding::DefaultFuchsiaResourceDialect,
5952        > for &mut MultipleBoundedNullableVectorsOfHandles
5953    {
5954        #[inline]
5955        unsafe fn encode(
5956            self,
5957            encoder: &mut fidl::encoding::Encoder<
5958                '_,
5959                fidl::encoding::DefaultFuchsiaResourceDialect,
5960            >,
5961            offset: usize,
5962            _depth: fidl::encoding::Depth,
5963        ) -> fidl::Result<()> {
5964            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
5965            // Delegate to tuple encoding.
5966            fidl::encoding::Encode::<
5967                MultipleBoundedNullableVectorsOfHandles,
5968                fidl::encoding::DefaultFuchsiaResourceDialect,
5969            >::encode(
5970                (
5971                    <fidl::encoding::Optional<
5972                        fidl::encoding::Vector<
5973                            fidl::encoding::HandleType<
5974                                fidl::Handle,
5975                                { fidl::ObjectType::NONE.into_raw() },
5976                                2147483648,
5977                            >,
5978                            2,
5979                        >,
5980                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5981                        &mut self.vh0
5982                    ),
5983                    <fidl::encoding::Optional<
5984                        fidl::encoding::Vector<
5985                            fidl::encoding::HandleType<
5986                                fidl::Handle,
5987                                { fidl::ObjectType::NONE.into_raw() },
5988                                2147483648,
5989                            >,
5990                            32,
5991                        >,
5992                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5993                        &mut self.vh1
5994                    ),
5995                ),
5996                encoder,
5997                offset,
5998                _depth,
5999            )
6000        }
6001    }
6002    unsafe impl<
6003            T0: fidl::encoding::Encode<
6004                fidl::encoding::Optional<
6005                    fidl::encoding::Vector<
6006                        fidl::encoding::HandleType<
6007                            fidl::Handle,
6008                            { fidl::ObjectType::NONE.into_raw() },
6009                            2147483648,
6010                        >,
6011                        2,
6012                    >,
6013                >,
6014                fidl::encoding::DefaultFuchsiaResourceDialect,
6015            >,
6016            T1: fidl::encoding::Encode<
6017                fidl::encoding::Optional<
6018                    fidl::encoding::Vector<
6019                        fidl::encoding::HandleType<
6020                            fidl::Handle,
6021                            { fidl::ObjectType::NONE.into_raw() },
6022                            2147483648,
6023                        >,
6024                        32,
6025                    >,
6026                >,
6027                fidl::encoding::DefaultFuchsiaResourceDialect,
6028            >,
6029        >
6030        fidl::encoding::Encode<
6031            MultipleBoundedNullableVectorsOfHandles,
6032            fidl::encoding::DefaultFuchsiaResourceDialect,
6033        > for (T0, T1)
6034    {
6035        #[inline]
6036        unsafe fn encode(
6037            self,
6038            encoder: &mut fidl::encoding::Encoder<
6039                '_,
6040                fidl::encoding::DefaultFuchsiaResourceDialect,
6041            >,
6042            offset: usize,
6043            depth: fidl::encoding::Depth,
6044        ) -> fidl::Result<()> {
6045            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
6046            // Zero out padding regions. There's no need to apply masks
6047            // because the unmasked parts will be overwritten by fields.
6048            // Write the fields.
6049            self.0.encode(encoder, offset + 0, depth)?;
6050            self.1.encode(encoder, offset + 16, depth)?;
6051            Ok(())
6052        }
6053    }
6054
6055    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6056        for MultipleBoundedNullableVectorsOfHandles
6057    {
6058        #[inline(always)]
6059        fn new_empty() -> Self {
6060            Self {
6061                vh0: fidl::new_empty!(
6062                    fidl::encoding::Optional<
6063                        fidl::encoding::Vector<
6064                            fidl::encoding::HandleType<
6065                                fidl::Handle,
6066                                { fidl::ObjectType::NONE.into_raw() },
6067                                2147483648,
6068                            >,
6069                            2,
6070                        >,
6071                    >,
6072                    fidl::encoding::DefaultFuchsiaResourceDialect
6073                ),
6074                vh1: fidl::new_empty!(
6075                    fidl::encoding::Optional<
6076                        fidl::encoding::Vector<
6077                            fidl::encoding::HandleType<
6078                                fidl::Handle,
6079                                { fidl::ObjectType::NONE.into_raw() },
6080                                2147483648,
6081                            >,
6082                            32,
6083                        >,
6084                    >,
6085                    fidl::encoding::DefaultFuchsiaResourceDialect
6086                ),
6087            }
6088        }
6089
6090        #[inline]
6091        unsafe fn decode(
6092            &mut self,
6093            decoder: &mut fidl::encoding::Decoder<
6094                '_,
6095                fidl::encoding::DefaultFuchsiaResourceDialect,
6096            >,
6097            offset: usize,
6098            _depth: fidl::encoding::Depth,
6099        ) -> fidl::Result<()> {
6100            decoder.debug_check_bounds::<Self>(offset);
6101            // Verify that padding bytes are zero.
6102            fidl::decode!(
6103                fidl::encoding::Optional<
6104                    fidl::encoding::Vector<
6105                        fidl::encoding::HandleType<
6106                            fidl::Handle,
6107                            { fidl::ObjectType::NONE.into_raw() },
6108                            2147483648,
6109                        >,
6110                        2,
6111                    >,
6112                >,
6113                fidl::encoding::DefaultFuchsiaResourceDialect,
6114                &mut self.vh0,
6115                decoder,
6116                offset + 0,
6117                _depth
6118            )?;
6119            fidl::decode!(
6120                fidl::encoding::Optional<
6121                    fidl::encoding::Vector<
6122                        fidl::encoding::HandleType<
6123                            fidl::Handle,
6124                            { fidl::ObjectType::NONE.into_raw() },
6125                            2147483648,
6126                        >,
6127                        32,
6128                    >,
6129                >,
6130                fidl::encoding::DefaultFuchsiaResourceDialect,
6131                &mut self.vh1,
6132                decoder,
6133                offset + 16,
6134                _depth
6135            )?;
6136            Ok(())
6137        }
6138    }
6139
6140    impl fidl::encoding::ResourceTypeMarker for MultipleHandleSubtypes {
6141        type Borrowed<'a> = &'a mut Self;
6142        fn take_or_borrow<'a>(
6143            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6144        ) -> Self::Borrowed<'a> {
6145            value
6146        }
6147    }
6148
6149    unsafe impl fidl::encoding::TypeMarker for MultipleHandleSubtypes {
6150        type Owned = Self;
6151
6152        #[inline(always)]
6153        fn inline_align(_context: fidl::encoding::Context) -> usize {
6154            4
6155        }
6156
6157        #[inline(always)]
6158        fn inline_size(_context: fidl::encoding::Context) -> usize {
6159            12
6160        }
6161    }
6162
6163    unsafe impl
6164        fidl::encoding::Encode<
6165            MultipleHandleSubtypes,
6166            fidl::encoding::DefaultFuchsiaResourceDialect,
6167        > for &mut MultipleHandleSubtypes
6168    {
6169        #[inline]
6170        unsafe fn encode(
6171            self,
6172            encoder: &mut fidl::encoding::Encoder<
6173                '_,
6174                fidl::encoding::DefaultFuchsiaResourceDialect,
6175            >,
6176            offset: usize,
6177            _depth: fidl::encoding::Depth,
6178        ) -> fidl::Result<()> {
6179            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6180            // Delegate to tuple encoding.
6181            fidl::encoding::Encode::<
6182                MultipleHandleSubtypes,
6183                fidl::encoding::DefaultFuchsiaResourceDialect,
6184            >::encode(
6185                (
6186                    <fidl::encoding::HandleType<
6187                        fidl::Handle,
6188                        { fidl::ObjectType::NONE.into_raw() },
6189                        2147483648,
6190                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6191                        &mut self.untyped
6192                    ),
6193                    <fidl::encoding::HandleType<
6194                        fidl::Event,
6195                        { fidl::ObjectType::EVENT.into_raw() },
6196                        2147483648,
6197                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6198                        &mut self.event
6199                    ),
6200                    <fidl::encoding::HandleType<
6201                        fidl::Channel,
6202                        { fidl::ObjectType::CHANNEL.into_raw() },
6203                        2147483648,
6204                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6205                        &mut self.channel
6206                    ),
6207                ),
6208                encoder,
6209                offset,
6210                _depth,
6211            )
6212        }
6213    }
6214    unsafe impl<
6215            T0: fidl::encoding::Encode<
6216                fidl::encoding::HandleType<
6217                    fidl::Handle,
6218                    { fidl::ObjectType::NONE.into_raw() },
6219                    2147483648,
6220                >,
6221                fidl::encoding::DefaultFuchsiaResourceDialect,
6222            >,
6223            T1: fidl::encoding::Encode<
6224                fidl::encoding::HandleType<
6225                    fidl::Event,
6226                    { fidl::ObjectType::EVENT.into_raw() },
6227                    2147483648,
6228                >,
6229                fidl::encoding::DefaultFuchsiaResourceDialect,
6230            >,
6231            T2: fidl::encoding::Encode<
6232                fidl::encoding::HandleType<
6233                    fidl::Channel,
6234                    { fidl::ObjectType::CHANNEL.into_raw() },
6235                    2147483648,
6236                >,
6237                fidl::encoding::DefaultFuchsiaResourceDialect,
6238            >,
6239        >
6240        fidl::encoding::Encode<
6241            MultipleHandleSubtypes,
6242            fidl::encoding::DefaultFuchsiaResourceDialect,
6243        > for (T0, T1, T2)
6244    {
6245        #[inline]
6246        unsafe fn encode(
6247            self,
6248            encoder: &mut fidl::encoding::Encoder<
6249                '_,
6250                fidl::encoding::DefaultFuchsiaResourceDialect,
6251            >,
6252            offset: usize,
6253            depth: fidl::encoding::Depth,
6254        ) -> fidl::Result<()> {
6255            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6256            // Zero out padding regions. There's no need to apply masks
6257            // because the unmasked parts will be overwritten by fields.
6258            // Write the fields.
6259            self.0.encode(encoder, offset + 0, depth)?;
6260            self.1.encode(encoder, offset + 4, depth)?;
6261            self.2.encode(encoder, offset + 8, depth)?;
6262            Ok(())
6263        }
6264    }
6265
6266    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6267        for MultipleHandleSubtypes
6268    {
6269        #[inline(always)]
6270        fn new_empty() -> Self {
6271            Self {
6272                untyped: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6273                event: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6274                channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6275            }
6276        }
6277
6278        #[inline]
6279        unsafe fn decode(
6280            &mut self,
6281            decoder: &mut fidl::encoding::Decoder<
6282                '_,
6283                fidl::encoding::DefaultFuchsiaResourceDialect,
6284            >,
6285            offset: usize,
6286            _depth: fidl::encoding::Depth,
6287        ) -> fidl::Result<()> {
6288            decoder.debug_check_bounds::<Self>(offset);
6289            // Verify that padding bytes are zero.
6290            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.untyped, decoder, offset + 0, _depth)?;
6291            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.event, decoder, offset + 4, _depth)?;
6292            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 8, _depth)?;
6293            Ok(())
6294        }
6295    }
6296
6297    impl fidl::encoding::ResourceTypeMarker for MultipleNonnullableHandles {
6298        type Borrowed<'a> = &'a mut Self;
6299        fn take_or_borrow<'a>(
6300            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6301        ) -> Self::Borrowed<'a> {
6302            value
6303        }
6304    }
6305
6306    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableHandles {
6307        type Owned = Self;
6308
6309        #[inline(always)]
6310        fn inline_align(_context: fidl::encoding::Context) -> usize {
6311            8
6312        }
6313
6314        #[inline(always)]
6315        fn inline_size(_context: fidl::encoding::Context) -> usize {
6316            32
6317        }
6318    }
6319
6320    unsafe impl
6321        fidl::encoding::Encode<
6322            MultipleNonnullableHandles,
6323            fidl::encoding::DefaultFuchsiaResourceDialect,
6324        > for &mut MultipleNonnullableHandles
6325    {
6326        #[inline]
6327        unsafe fn encode(
6328            self,
6329            encoder: &mut fidl::encoding::Encoder<
6330                '_,
6331                fidl::encoding::DefaultFuchsiaResourceDialect,
6332            >,
6333            offset: usize,
6334            _depth: fidl::encoding::Depth,
6335        ) -> fidl::Result<()> {
6336            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6337            // Delegate to tuple encoding.
6338            fidl::encoding::Encode::<
6339                MultipleNonnullableHandles,
6340                fidl::encoding::DefaultFuchsiaResourceDialect,
6341            >::encode(
6342                (
6343                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6344                    <fidl::encoding::HandleType<
6345                        fidl::Handle,
6346                        { fidl::ObjectType::NONE.into_raw() },
6347                        2147483648,
6348                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6349                        &mut self.handle0
6350                    ),
6351                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6352                    <fidl::encoding::HandleType<
6353                        fidl::Channel,
6354                        { fidl::ObjectType::CHANNEL.into_raw() },
6355                        2147483648,
6356                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6357                        &mut self.handle1
6358                    ),
6359                    <fidl::encoding::HandleType<
6360                        fidl::Event,
6361                        { fidl::ObjectType::EVENT.into_raw() },
6362                        2147483648,
6363                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6364                        &mut self.handle2
6365                    ),
6366                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6367                ),
6368                encoder,
6369                offset,
6370                _depth,
6371            )
6372        }
6373    }
6374    unsafe impl<
6375            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6376            T1: fidl::encoding::Encode<
6377                fidl::encoding::HandleType<
6378                    fidl::Handle,
6379                    { fidl::ObjectType::NONE.into_raw() },
6380                    2147483648,
6381                >,
6382                fidl::encoding::DefaultFuchsiaResourceDialect,
6383            >,
6384            T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6385            T3: fidl::encoding::Encode<
6386                fidl::encoding::HandleType<
6387                    fidl::Channel,
6388                    { fidl::ObjectType::CHANNEL.into_raw() },
6389                    2147483648,
6390                >,
6391                fidl::encoding::DefaultFuchsiaResourceDialect,
6392            >,
6393            T4: fidl::encoding::Encode<
6394                fidl::encoding::HandleType<
6395                    fidl::Event,
6396                    { fidl::ObjectType::EVENT.into_raw() },
6397                    2147483648,
6398                >,
6399                fidl::encoding::DefaultFuchsiaResourceDialect,
6400            >,
6401            T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6402        >
6403        fidl::encoding::Encode<
6404            MultipleNonnullableHandles,
6405            fidl::encoding::DefaultFuchsiaResourceDialect,
6406        > for (T0, T1, T2, T3, T4, T5)
6407    {
6408        #[inline]
6409        unsafe fn encode(
6410            self,
6411            encoder: &mut fidl::encoding::Encoder<
6412                '_,
6413                fidl::encoding::DefaultFuchsiaResourceDialect,
6414            >,
6415            offset: usize,
6416            depth: fidl::encoding::Depth,
6417        ) -> fidl::Result<()> {
6418            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6419            // Zero out padding regions. There's no need to apply masks
6420            // because the unmasked parts will be overwritten by fields.
6421            // Write the fields.
6422            self.0.encode(encoder, offset + 0, depth)?;
6423            self.1.encode(encoder, offset + 4, depth)?;
6424            self.2.encode(encoder, offset + 8, depth)?;
6425            self.3.encode(encoder, offset + 16, depth)?;
6426            self.4.encode(encoder, offset + 20, depth)?;
6427            self.5.encode(encoder, offset + 24, depth)?;
6428            Ok(())
6429        }
6430    }
6431
6432    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6433        for MultipleNonnullableHandles
6434    {
6435        #[inline(always)]
6436        fn new_empty() -> Self {
6437            Self {
6438                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6439                handle0: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6440                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6441                handle1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6442                handle2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6443                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6444            }
6445        }
6446
6447        #[inline]
6448        unsafe fn decode(
6449            &mut self,
6450            decoder: &mut fidl::encoding::Decoder<
6451                '_,
6452                fidl::encoding::DefaultFuchsiaResourceDialect,
6453            >,
6454            offset: usize,
6455            _depth: fidl::encoding::Depth,
6456        ) -> fidl::Result<()> {
6457            decoder.debug_check_bounds::<Self>(offset);
6458            // Verify that padding bytes are zero.
6459            fidl::decode!(
6460                u32,
6461                fidl::encoding::DefaultFuchsiaResourceDialect,
6462                &mut self.data0,
6463                decoder,
6464                offset + 0,
6465                _depth
6466            )?;
6467            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle0, decoder, offset + 4, _depth)?;
6468            fidl::decode!(
6469                u64,
6470                fidl::encoding::DefaultFuchsiaResourceDialect,
6471                &mut self.data1,
6472                decoder,
6473                offset + 8,
6474                _depth
6475            )?;
6476            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle1, decoder, offset + 16, _depth)?;
6477            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle2, decoder, offset + 20, _depth)?;
6478            fidl::decode!(
6479                u64,
6480                fidl::encoding::DefaultFuchsiaResourceDialect,
6481                &mut self.data2,
6482                decoder,
6483                offset + 24,
6484                _depth
6485            )?;
6486            Ok(())
6487        }
6488    }
6489
6490    impl fidl::encoding::ResourceTypeMarker for MultipleNullableHandles {
6491        type Borrowed<'a> = &'a mut Self;
6492        fn take_or_borrow<'a>(
6493            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6494        ) -> Self::Borrowed<'a> {
6495            value
6496        }
6497    }
6498
6499    unsafe impl fidl::encoding::TypeMarker for MultipleNullableHandles {
6500        type Owned = Self;
6501
6502        #[inline(always)]
6503        fn inline_align(_context: fidl::encoding::Context) -> usize {
6504            8
6505        }
6506
6507        #[inline(always)]
6508        fn inline_size(_context: fidl::encoding::Context) -> usize {
6509            32
6510        }
6511    }
6512
6513    unsafe impl
6514        fidl::encoding::Encode<
6515            MultipleNullableHandles,
6516            fidl::encoding::DefaultFuchsiaResourceDialect,
6517        > for &mut MultipleNullableHandles
6518    {
6519        #[inline]
6520        unsafe fn encode(
6521            self,
6522            encoder: &mut fidl::encoding::Encoder<
6523                '_,
6524                fidl::encoding::DefaultFuchsiaResourceDialect,
6525            >,
6526            offset: usize,
6527            _depth: fidl::encoding::Depth,
6528        ) -> fidl::Result<()> {
6529            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6530            // Delegate to tuple encoding.
6531            fidl::encoding::Encode::<
6532                MultipleNullableHandles,
6533                fidl::encoding::DefaultFuchsiaResourceDialect,
6534            >::encode(
6535                (
6536                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6537                    <fidl::encoding::Optional<
6538                        fidl::encoding::HandleType<
6539                            fidl::Handle,
6540                            { fidl::ObjectType::NONE.into_raw() },
6541                            2147483648,
6542                        >,
6543                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6544                        &mut self.handle0
6545                    ),
6546                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6547                    <fidl::encoding::Optional<
6548                        fidl::encoding::HandleType<
6549                            fidl::Channel,
6550                            { fidl::ObjectType::CHANNEL.into_raw() },
6551                            2147483648,
6552                        >,
6553                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6554                        &mut self.handle1
6555                    ),
6556                    <fidl::encoding::Optional<
6557                        fidl::encoding::HandleType<
6558                            fidl::Event,
6559                            { fidl::ObjectType::EVENT.into_raw() },
6560                            2147483648,
6561                        >,
6562                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6563                        &mut self.handle2
6564                    ),
6565                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6566                ),
6567                encoder,
6568                offset,
6569                _depth,
6570            )
6571        }
6572    }
6573    unsafe impl<
6574            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6575            T1: fidl::encoding::Encode<
6576                fidl::encoding::Optional<
6577                    fidl::encoding::HandleType<
6578                        fidl::Handle,
6579                        { fidl::ObjectType::NONE.into_raw() },
6580                        2147483648,
6581                    >,
6582                >,
6583                fidl::encoding::DefaultFuchsiaResourceDialect,
6584            >,
6585            T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6586            T3: fidl::encoding::Encode<
6587                fidl::encoding::Optional<
6588                    fidl::encoding::HandleType<
6589                        fidl::Channel,
6590                        { fidl::ObjectType::CHANNEL.into_raw() },
6591                        2147483648,
6592                    >,
6593                >,
6594                fidl::encoding::DefaultFuchsiaResourceDialect,
6595            >,
6596            T4: fidl::encoding::Encode<
6597                fidl::encoding::Optional<
6598                    fidl::encoding::HandleType<
6599                        fidl::Event,
6600                        { fidl::ObjectType::EVENT.into_raw() },
6601                        2147483648,
6602                    >,
6603                >,
6604                fidl::encoding::DefaultFuchsiaResourceDialect,
6605            >,
6606            T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6607        >
6608        fidl::encoding::Encode<
6609            MultipleNullableHandles,
6610            fidl::encoding::DefaultFuchsiaResourceDialect,
6611        > for (T0, T1, T2, T3, T4, T5)
6612    {
6613        #[inline]
6614        unsafe fn encode(
6615            self,
6616            encoder: &mut fidl::encoding::Encoder<
6617                '_,
6618                fidl::encoding::DefaultFuchsiaResourceDialect,
6619            >,
6620            offset: usize,
6621            depth: fidl::encoding::Depth,
6622        ) -> fidl::Result<()> {
6623            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6624            // Zero out padding regions. There's no need to apply masks
6625            // because the unmasked parts will be overwritten by fields.
6626            // Write the fields.
6627            self.0.encode(encoder, offset + 0, depth)?;
6628            self.1.encode(encoder, offset + 4, depth)?;
6629            self.2.encode(encoder, offset + 8, depth)?;
6630            self.3.encode(encoder, offset + 16, depth)?;
6631            self.4.encode(encoder, offset + 20, depth)?;
6632            self.5.encode(encoder, offset + 24, depth)?;
6633            Ok(())
6634        }
6635    }
6636
6637    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6638        for MultipleNullableHandles
6639    {
6640        #[inline(always)]
6641        fn new_empty() -> Self {
6642            Self {
6643                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6644                handle0: fidl::new_empty!(
6645                    fidl::encoding::Optional<
6646                        fidl::encoding::HandleType<
6647                            fidl::Handle,
6648                            { fidl::ObjectType::NONE.into_raw() },
6649                            2147483648,
6650                        >,
6651                    >,
6652                    fidl::encoding::DefaultFuchsiaResourceDialect
6653                ),
6654                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6655                handle1: fidl::new_empty!(
6656                    fidl::encoding::Optional<
6657                        fidl::encoding::HandleType<
6658                            fidl::Channel,
6659                            { fidl::ObjectType::CHANNEL.into_raw() },
6660                            2147483648,
6661                        >,
6662                    >,
6663                    fidl::encoding::DefaultFuchsiaResourceDialect
6664                ),
6665                handle2: fidl::new_empty!(
6666                    fidl::encoding::Optional<
6667                        fidl::encoding::HandleType<
6668                            fidl::Event,
6669                            { fidl::ObjectType::EVENT.into_raw() },
6670                            2147483648,
6671                        >,
6672                    >,
6673                    fidl::encoding::DefaultFuchsiaResourceDialect
6674                ),
6675                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6676            }
6677        }
6678
6679        #[inline]
6680        unsafe fn decode(
6681            &mut self,
6682            decoder: &mut fidl::encoding::Decoder<
6683                '_,
6684                fidl::encoding::DefaultFuchsiaResourceDialect,
6685            >,
6686            offset: usize,
6687            _depth: fidl::encoding::Depth,
6688        ) -> fidl::Result<()> {
6689            decoder.debug_check_bounds::<Self>(offset);
6690            // Verify that padding bytes are zero.
6691            fidl::decode!(
6692                u32,
6693                fidl::encoding::DefaultFuchsiaResourceDialect,
6694                &mut self.data0,
6695                decoder,
6696                offset + 0,
6697                _depth
6698            )?;
6699            fidl::decode!(
6700                fidl::encoding::Optional<
6701                    fidl::encoding::HandleType<
6702                        fidl::Handle,
6703                        { fidl::ObjectType::NONE.into_raw() },
6704                        2147483648,
6705                    >,
6706                >,
6707                fidl::encoding::DefaultFuchsiaResourceDialect,
6708                &mut self.handle0,
6709                decoder,
6710                offset + 4,
6711                _depth
6712            )?;
6713            fidl::decode!(
6714                u64,
6715                fidl::encoding::DefaultFuchsiaResourceDialect,
6716                &mut self.data1,
6717                decoder,
6718                offset + 8,
6719                _depth
6720            )?;
6721            fidl::decode!(
6722                fidl::encoding::Optional<
6723                    fidl::encoding::HandleType<
6724                        fidl::Channel,
6725                        { fidl::ObjectType::CHANNEL.into_raw() },
6726                        2147483648,
6727                    >,
6728                >,
6729                fidl::encoding::DefaultFuchsiaResourceDialect,
6730                &mut self.handle1,
6731                decoder,
6732                offset + 16,
6733                _depth
6734            )?;
6735            fidl::decode!(
6736                fidl::encoding::Optional<
6737                    fidl::encoding::HandleType<
6738                        fidl::Event,
6739                        { fidl::ObjectType::EVENT.into_raw() },
6740                        2147483648,
6741                    >,
6742                >,
6743                fidl::encoding::DefaultFuchsiaResourceDialect,
6744                &mut self.handle2,
6745                decoder,
6746                offset + 20,
6747                _depth
6748            )?;
6749            fidl::decode!(
6750                u64,
6751                fidl::encoding::DefaultFuchsiaResourceDialect,
6752                &mut self.data2,
6753                decoder,
6754                offset + 24,
6755                _depth
6756            )?;
6757            Ok(())
6758        }
6759    }
6760
6761    impl fidl::encoding::ResourceTypeMarker for NonnullableHandle {
6762        type Borrowed<'a> = &'a mut Self;
6763        fn take_or_borrow<'a>(
6764            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6765        ) -> Self::Borrowed<'a> {
6766            value
6767        }
6768    }
6769
6770    unsafe impl fidl::encoding::TypeMarker for NonnullableHandle {
6771        type Owned = Self;
6772
6773        #[inline(always)]
6774        fn inline_align(_context: fidl::encoding::Context) -> usize {
6775            4
6776        }
6777
6778        #[inline(always)]
6779        fn inline_size(_context: fidl::encoding::Context) -> usize {
6780            4
6781        }
6782    }
6783
6784    unsafe impl
6785        fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6786        for &mut NonnullableHandle
6787    {
6788        #[inline]
6789        unsafe fn encode(
6790            self,
6791            encoder: &mut fidl::encoding::Encoder<
6792                '_,
6793                fidl::encoding::DefaultFuchsiaResourceDialect,
6794            >,
6795            offset: usize,
6796            _depth: fidl::encoding::Depth,
6797        ) -> fidl::Result<()> {
6798            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6799            // Delegate to tuple encoding.
6800            fidl::encoding::Encode::<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6801                (
6802                    <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
6803                ),
6804                encoder, offset, _depth
6805            )
6806        }
6807    }
6808    unsafe impl<
6809            T0: fidl::encoding::Encode<
6810                fidl::encoding::HandleType<
6811                    fidl::Handle,
6812                    { fidl::ObjectType::NONE.into_raw() },
6813                    2147483648,
6814                >,
6815                fidl::encoding::DefaultFuchsiaResourceDialect,
6816            >,
6817        >
6818        fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6819        for (T0,)
6820    {
6821        #[inline]
6822        unsafe fn encode(
6823            self,
6824            encoder: &mut fidl::encoding::Encoder<
6825                '_,
6826                fidl::encoding::DefaultFuchsiaResourceDialect,
6827            >,
6828            offset: usize,
6829            depth: fidl::encoding::Depth,
6830        ) -> fidl::Result<()> {
6831            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6832            // Zero out padding regions. There's no need to apply masks
6833            // because the unmasked parts will be overwritten by fields.
6834            // Write the fields.
6835            self.0.encode(encoder, offset + 0, depth)?;
6836            Ok(())
6837        }
6838    }
6839
6840    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6841        for NonnullableHandle
6842    {
6843        #[inline(always)]
6844        fn new_empty() -> Self {
6845            Self {
6846                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6847            }
6848        }
6849
6850        #[inline]
6851        unsafe fn decode(
6852            &mut self,
6853            decoder: &mut fidl::encoding::Decoder<
6854                '_,
6855                fidl::encoding::DefaultFuchsiaResourceDialect,
6856            >,
6857            offset: usize,
6858            _depth: fidl::encoding::Depth,
6859        ) -> fidl::Result<()> {
6860            decoder.debug_check_bounds::<Self>(offset);
6861            // Verify that padding bytes are zero.
6862            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
6863            Ok(())
6864        }
6865    }
6866
6867    impl fidl::encoding::ResourceTypeMarker for NonnullableHandleArray {
6868        type Borrowed<'a> = &'a mut Self;
6869        fn take_or_borrow<'a>(
6870            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6871        ) -> Self::Borrowed<'a> {
6872            value
6873        }
6874    }
6875
6876    unsafe impl fidl::encoding::TypeMarker for NonnullableHandleArray {
6877        type Owned = Self;
6878
6879        #[inline(always)]
6880        fn inline_align(_context: fidl::encoding::Context) -> usize {
6881            4
6882        }
6883
6884        #[inline(always)]
6885        fn inline_size(_context: fidl::encoding::Context) -> usize {
6886            16
6887        }
6888    }
6889
6890    unsafe impl
6891        fidl::encoding::Encode<
6892            NonnullableHandleArray,
6893            fidl::encoding::DefaultFuchsiaResourceDialect,
6894        > for &mut NonnullableHandleArray
6895    {
6896        #[inline]
6897        unsafe fn encode(
6898            self,
6899            encoder: &mut fidl::encoding::Encoder<
6900                '_,
6901                fidl::encoding::DefaultFuchsiaResourceDialect,
6902            >,
6903            offset: usize,
6904            _depth: fidl::encoding::Depth,
6905        ) -> fidl::Result<()> {
6906            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6907            // Delegate to tuple encoding.
6908            fidl::encoding::Encode::<
6909                NonnullableHandleArray,
6910                fidl::encoding::DefaultFuchsiaResourceDialect,
6911            >::encode(
6912                (<fidl::encoding::Array<
6913                    fidl::encoding::HandleType<
6914                        fidl::Handle,
6915                        { fidl::ObjectType::NONE.into_raw() },
6916                        2147483648,
6917                    >,
6918                    4,
6919                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6920                    &mut self.handles
6921                ),),
6922                encoder,
6923                offset,
6924                _depth,
6925            )
6926        }
6927    }
6928    unsafe impl<
6929            T0: fidl::encoding::Encode<
6930                fidl::encoding::Array<
6931                    fidl::encoding::HandleType<
6932                        fidl::Handle,
6933                        { fidl::ObjectType::NONE.into_raw() },
6934                        2147483648,
6935                    >,
6936                    4,
6937                >,
6938                fidl::encoding::DefaultFuchsiaResourceDialect,
6939            >,
6940        >
6941        fidl::encoding::Encode<
6942            NonnullableHandleArray,
6943            fidl::encoding::DefaultFuchsiaResourceDialect,
6944        > for (T0,)
6945    {
6946        #[inline]
6947        unsafe fn encode(
6948            self,
6949            encoder: &mut fidl::encoding::Encoder<
6950                '_,
6951                fidl::encoding::DefaultFuchsiaResourceDialect,
6952            >,
6953            offset: usize,
6954            depth: fidl::encoding::Depth,
6955        ) -> fidl::Result<()> {
6956            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6957            // Zero out padding regions. There's no need to apply masks
6958            // because the unmasked parts will be overwritten by fields.
6959            // Write the fields.
6960            self.0.encode(encoder, offset + 0, depth)?;
6961            Ok(())
6962        }
6963    }
6964
6965    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6966        for NonnullableHandleArray
6967    {
6968        #[inline(always)]
6969        fn new_empty() -> Self {
6970            Self {
6971                handles: fidl::new_empty!(
6972                    fidl::encoding::Array<
6973                        fidl::encoding::HandleType<
6974                            fidl::Handle,
6975                            { fidl::ObjectType::NONE.into_raw() },
6976                            2147483648,
6977                        >,
6978                        4,
6979                    >,
6980                    fidl::encoding::DefaultFuchsiaResourceDialect
6981                ),
6982            }
6983        }
6984
6985        #[inline]
6986        unsafe fn decode(
6987            &mut self,
6988            decoder: &mut fidl::encoding::Decoder<
6989                '_,
6990                fidl::encoding::DefaultFuchsiaResourceDialect,
6991            >,
6992            offset: usize,
6993            _depth: fidl::encoding::Depth,
6994        ) -> fidl::Result<()> {
6995            decoder.debug_check_bounds::<Self>(offset);
6996            // Verify that padding bytes are zero.
6997            fidl::decode!(
6998                fidl::encoding::Array<
6999                    fidl::encoding::HandleType<
7000                        fidl::Handle,
7001                        { fidl::ObjectType::NONE.into_raw() },
7002                        2147483648,
7003                    >,
7004                    4,
7005                >,
7006                fidl::encoding::DefaultFuchsiaResourceDialect,
7007                &mut self.handles,
7008                decoder,
7009                offset + 0,
7010                _depth
7011            )?;
7012            Ok(())
7013        }
7014    }
7015
7016    impl fidl::encoding::ResourceTypeMarker for NullableHandle {
7017        type Borrowed<'a> = &'a mut Self;
7018        fn take_or_borrow<'a>(
7019            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7020        ) -> Self::Borrowed<'a> {
7021            value
7022        }
7023    }
7024
7025    unsafe impl fidl::encoding::TypeMarker for NullableHandle {
7026        type Owned = Self;
7027
7028        #[inline(always)]
7029        fn inline_align(_context: fidl::encoding::Context) -> usize {
7030            4
7031        }
7032
7033        #[inline(always)]
7034        fn inline_size(_context: fidl::encoding::Context) -> usize {
7035            4
7036        }
7037    }
7038
7039    unsafe impl
7040        fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7041        for &mut NullableHandle
7042    {
7043        #[inline]
7044        unsafe fn encode(
7045            self,
7046            encoder: &mut fidl::encoding::Encoder<
7047                '_,
7048                fidl::encoding::DefaultFuchsiaResourceDialect,
7049            >,
7050            offset: usize,
7051            _depth: fidl::encoding::Depth,
7052        ) -> fidl::Result<()> {
7053            encoder.debug_check_bounds::<NullableHandle>(offset);
7054            // Delegate to tuple encoding.
7055            fidl::encoding::Encode::<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7056                (
7057                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7058                ),
7059                encoder, offset, _depth
7060            )
7061        }
7062    }
7063    unsafe impl<
7064            T0: fidl::encoding::Encode<
7065                fidl::encoding::Optional<
7066                    fidl::encoding::HandleType<
7067                        fidl::Handle,
7068                        { fidl::ObjectType::NONE.into_raw() },
7069                        2147483648,
7070                    >,
7071                >,
7072                fidl::encoding::DefaultFuchsiaResourceDialect,
7073            >,
7074        > fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7075        for (T0,)
7076    {
7077        #[inline]
7078        unsafe fn encode(
7079            self,
7080            encoder: &mut fidl::encoding::Encoder<
7081                '_,
7082                fidl::encoding::DefaultFuchsiaResourceDialect,
7083            >,
7084            offset: usize,
7085            depth: fidl::encoding::Depth,
7086        ) -> fidl::Result<()> {
7087            encoder.debug_check_bounds::<NullableHandle>(offset);
7088            // Zero out padding regions. There's no need to apply masks
7089            // because the unmasked parts will be overwritten by fields.
7090            // Write the fields.
7091            self.0.encode(encoder, offset + 0, depth)?;
7092            Ok(())
7093        }
7094    }
7095
7096    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7097        for NullableHandle
7098    {
7099        #[inline(always)]
7100        fn new_empty() -> Self {
7101            Self {
7102                h: fidl::new_empty!(
7103                    fidl::encoding::Optional<
7104                        fidl::encoding::HandleType<
7105                            fidl::Handle,
7106                            { fidl::ObjectType::NONE.into_raw() },
7107                            2147483648,
7108                        >,
7109                    >,
7110                    fidl::encoding::DefaultFuchsiaResourceDialect
7111                ),
7112            }
7113        }
7114
7115        #[inline]
7116        unsafe fn decode(
7117            &mut self,
7118            decoder: &mut fidl::encoding::Decoder<
7119                '_,
7120                fidl::encoding::DefaultFuchsiaResourceDialect,
7121            >,
7122            offset: usize,
7123            _depth: fidl::encoding::Depth,
7124        ) -> fidl::Result<()> {
7125            decoder.debug_check_bounds::<Self>(offset);
7126            // Verify that padding bytes are zero.
7127            fidl::decode!(
7128                fidl::encoding::Optional<
7129                    fidl::encoding::HandleType<
7130                        fidl::Handle,
7131                        { fidl::ObjectType::NONE.into_raw() },
7132                        2147483648,
7133                    >,
7134                >,
7135                fidl::encoding::DefaultFuchsiaResourceDialect,
7136                &mut self.h,
7137                decoder,
7138                offset + 0,
7139                _depth
7140            )?;
7141            Ok(())
7142        }
7143    }
7144
7145    impl fidl::encoding::ResourceTypeMarker for OutOfLineArrayOfNonnullableHandles {
7146        type Borrowed<'a> = &'a mut Self;
7147        fn take_or_borrow<'a>(
7148            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7149        ) -> Self::Borrowed<'a> {
7150            value
7151        }
7152    }
7153
7154    unsafe impl fidl::encoding::TypeMarker for OutOfLineArrayOfNonnullableHandles {
7155        type Owned = Self;
7156
7157        #[inline(always)]
7158        fn inline_align(_context: fidl::encoding::Context) -> usize {
7159            8
7160        }
7161
7162        #[inline(always)]
7163        fn inline_size(_context: fidl::encoding::Context) -> usize {
7164            8
7165        }
7166    }
7167
7168    unsafe impl
7169        fidl::encoding::Encode<
7170            OutOfLineArrayOfNonnullableHandles,
7171            fidl::encoding::DefaultFuchsiaResourceDialect,
7172        > for &mut OutOfLineArrayOfNonnullableHandles
7173    {
7174        #[inline]
7175        unsafe fn encode(
7176            self,
7177            encoder: &mut fidl::encoding::Encoder<
7178                '_,
7179                fidl::encoding::DefaultFuchsiaResourceDialect,
7180            >,
7181            offset: usize,
7182            _depth: fidl::encoding::Depth,
7183        ) -> fidl::Result<()> {
7184            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7185            // Delegate to tuple encoding.
7186            fidl::encoding::Encode::<OutOfLineArrayOfNonnullableHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7187                (
7188                    <fidl::encoding::Boxed<NonnullableHandleArray> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
7189                ),
7190                encoder, offset, _depth
7191            )
7192        }
7193    }
7194    unsafe impl<
7195            T0: fidl::encoding::Encode<
7196                fidl::encoding::Boxed<NonnullableHandleArray>,
7197                fidl::encoding::DefaultFuchsiaResourceDialect,
7198            >,
7199        >
7200        fidl::encoding::Encode<
7201            OutOfLineArrayOfNonnullableHandles,
7202            fidl::encoding::DefaultFuchsiaResourceDialect,
7203        > for (T0,)
7204    {
7205        #[inline]
7206        unsafe fn encode(
7207            self,
7208            encoder: &mut fidl::encoding::Encoder<
7209                '_,
7210                fidl::encoding::DefaultFuchsiaResourceDialect,
7211            >,
7212            offset: usize,
7213            depth: fidl::encoding::Depth,
7214        ) -> fidl::Result<()> {
7215            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7216            // Zero out padding regions. There's no need to apply masks
7217            // because the unmasked parts will be overwritten by fields.
7218            // Write the fields.
7219            self.0.encode(encoder, offset + 0, depth)?;
7220            Ok(())
7221        }
7222    }
7223
7224    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7225        for OutOfLineArrayOfNonnullableHandles
7226    {
7227        #[inline(always)]
7228        fn new_empty() -> Self {
7229            Self {
7230                handles: fidl::new_empty!(
7231                    fidl::encoding::Boxed<NonnullableHandleArray>,
7232                    fidl::encoding::DefaultFuchsiaResourceDialect
7233                ),
7234            }
7235        }
7236
7237        #[inline]
7238        unsafe fn decode(
7239            &mut self,
7240            decoder: &mut fidl::encoding::Decoder<
7241                '_,
7242                fidl::encoding::DefaultFuchsiaResourceDialect,
7243            >,
7244            offset: usize,
7245            _depth: fidl::encoding::Depth,
7246        ) -> fidl::Result<()> {
7247            decoder.debug_check_bounds::<Self>(offset);
7248            // Verify that padding bytes are zero.
7249            fidl::decode!(
7250                fidl::encoding::Boxed<NonnullableHandleArray>,
7251                fidl::encoding::DefaultFuchsiaResourceDialect,
7252                &mut self.handles,
7253                decoder,
7254                offset + 0,
7255                _depth
7256            )?;
7257            Ok(())
7258        }
7259    }
7260
7261    impl fidl::encoding::ResourceTypeMarker for Sandwich6 {
7262        type Borrowed<'a> = &'a mut Self;
7263        fn take_or_borrow<'a>(
7264            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7265        ) -> Self::Borrowed<'a> {
7266            value
7267        }
7268    }
7269
7270    unsafe impl fidl::encoding::TypeMarker for Sandwich6 {
7271        type Owned = Self;
7272
7273        #[inline(always)]
7274        fn inline_align(_context: fidl::encoding::Context) -> usize {
7275            8
7276        }
7277
7278        #[inline(always)]
7279        fn inline_size(_context: fidl::encoding::Context) -> usize {
7280            32
7281        }
7282    }
7283
7284    unsafe impl fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7285        for &mut Sandwich6
7286    {
7287        #[inline]
7288        unsafe fn encode(
7289            self,
7290            encoder: &mut fidl::encoding::Encoder<
7291                '_,
7292                fidl::encoding::DefaultFuchsiaResourceDialect,
7293            >,
7294            offset: usize,
7295            _depth: fidl::encoding::Depth,
7296        ) -> fidl::Result<()> {
7297            encoder.debug_check_bounds::<Sandwich6>(offset);
7298            // Delegate to tuple encoding.
7299            fidl::encoding::Encode::<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7300                (
7301                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
7302                    <UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.the_union),
7303                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
7304                ),
7305                encoder, offset, _depth
7306            )
7307        }
7308    }
7309    unsafe impl<
7310            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7311            T1: fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>,
7312            T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7313        > fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7314        for (T0, T1, T2)
7315    {
7316        #[inline]
7317        unsafe fn encode(
7318            self,
7319            encoder: &mut fidl::encoding::Encoder<
7320                '_,
7321                fidl::encoding::DefaultFuchsiaResourceDialect,
7322            >,
7323            offset: usize,
7324            depth: fidl::encoding::Depth,
7325        ) -> fidl::Result<()> {
7326            encoder.debug_check_bounds::<Sandwich6>(offset);
7327            // Zero out padding regions. There's no need to apply masks
7328            // because the unmasked parts will be overwritten by fields.
7329            unsafe {
7330                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7331                (ptr as *mut u64).write_unaligned(0);
7332            }
7333            unsafe {
7334                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
7335                (ptr as *mut u64).write_unaligned(0);
7336            }
7337            // Write the fields.
7338            self.0.encode(encoder, offset + 0, depth)?;
7339            self.1.encode(encoder, offset + 8, depth)?;
7340            self.2.encode(encoder, offset + 24, depth)?;
7341            Ok(())
7342        }
7343    }
7344
7345    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {
7346        #[inline(always)]
7347        fn new_empty() -> Self {
7348            Self {
7349                before: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7350                the_union: fidl::new_empty!(
7351                    UnionWithVector,
7352                    fidl::encoding::DefaultFuchsiaResourceDialect
7353                ),
7354                after: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7355            }
7356        }
7357
7358        #[inline]
7359        unsafe fn decode(
7360            &mut self,
7361            decoder: &mut fidl::encoding::Decoder<
7362                '_,
7363                fidl::encoding::DefaultFuchsiaResourceDialect,
7364            >,
7365            offset: usize,
7366            _depth: fidl::encoding::Depth,
7367        ) -> fidl::Result<()> {
7368            decoder.debug_check_bounds::<Self>(offset);
7369            // Verify that padding bytes are zero.
7370            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7371            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7372            let mask = 0xffffffff00000000u64;
7373            let maskedval = padval & mask;
7374            if maskedval != 0 {
7375                return Err(fidl::Error::NonZeroPadding {
7376                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7377                });
7378            }
7379            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
7380            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7381            let mask = 0xffffffff00000000u64;
7382            let maskedval = padval & mask;
7383            if maskedval != 0 {
7384                return Err(fidl::Error::NonZeroPadding {
7385                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
7386                });
7387            }
7388            fidl::decode!(
7389                u32,
7390                fidl::encoding::DefaultFuchsiaResourceDialect,
7391                &mut self.before,
7392                decoder,
7393                offset + 0,
7394                _depth
7395            )?;
7396            fidl::decode!(
7397                UnionWithVector,
7398                fidl::encoding::DefaultFuchsiaResourceDialect,
7399                &mut self.the_union,
7400                decoder,
7401                offset + 8,
7402                _depth
7403            )?;
7404            fidl::decode!(
7405                u32,
7406                fidl::encoding::DefaultFuchsiaResourceDialect,
7407                &mut self.after,
7408                decoder,
7409                offset + 24,
7410                _depth
7411            )?;
7412            Ok(())
7413        }
7414    }
7415
7416    impl fidl::encoding::ResourceTypeMarker for ShortStringThenHandle {
7417        type Borrowed<'a> = &'a mut Self;
7418        fn take_or_borrow<'a>(
7419            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7420        ) -> Self::Borrowed<'a> {
7421            value
7422        }
7423    }
7424
7425    unsafe impl fidl::encoding::TypeMarker for ShortStringThenHandle {
7426        type Owned = Self;
7427
7428        #[inline(always)]
7429        fn inline_align(_context: fidl::encoding::Context) -> usize {
7430            8
7431        }
7432
7433        #[inline(always)]
7434        fn inline_size(_context: fidl::encoding::Context) -> usize {
7435            24
7436        }
7437    }
7438
7439    unsafe impl
7440        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7441        for &mut ShortStringThenHandle
7442    {
7443        #[inline]
7444        unsafe fn encode(
7445            self,
7446            encoder: &mut fidl::encoding::Encoder<
7447                '_,
7448                fidl::encoding::DefaultFuchsiaResourceDialect,
7449            >,
7450            offset: usize,
7451            _depth: fidl::encoding::Depth,
7452        ) -> fidl::Result<()> {
7453            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7454            // Delegate to tuple encoding.
7455            fidl::encoding::Encode::<
7456                ShortStringThenHandle,
7457                fidl::encoding::DefaultFuchsiaResourceDialect,
7458            >::encode(
7459                (
7460                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
7461                        &self.s,
7462                    ),
7463                    <fidl::encoding::HandleType<
7464                        fidl::Handle,
7465                        { fidl::ObjectType::NONE.into_raw() },
7466                        2147483648,
7467                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7468                        &mut self.h
7469                    ),
7470                ),
7471                encoder,
7472                offset,
7473                _depth,
7474            )
7475        }
7476    }
7477    unsafe impl<
7478            T0: fidl::encoding::Encode<
7479                fidl::encoding::BoundedString<1>,
7480                fidl::encoding::DefaultFuchsiaResourceDialect,
7481            >,
7482            T1: fidl::encoding::Encode<
7483                fidl::encoding::HandleType<
7484                    fidl::Handle,
7485                    { fidl::ObjectType::NONE.into_raw() },
7486                    2147483648,
7487                >,
7488                fidl::encoding::DefaultFuchsiaResourceDialect,
7489            >,
7490        >
7491        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7492        for (T0, T1)
7493    {
7494        #[inline]
7495        unsafe fn encode(
7496            self,
7497            encoder: &mut fidl::encoding::Encoder<
7498                '_,
7499                fidl::encoding::DefaultFuchsiaResourceDialect,
7500            >,
7501            offset: usize,
7502            depth: fidl::encoding::Depth,
7503        ) -> fidl::Result<()> {
7504            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7505            // Zero out padding regions. There's no need to apply masks
7506            // because the unmasked parts will be overwritten by fields.
7507            unsafe {
7508                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7509                (ptr as *mut u64).write_unaligned(0);
7510            }
7511            // Write the fields.
7512            self.0.encode(encoder, offset + 0, depth)?;
7513            self.1.encode(encoder, offset + 16, depth)?;
7514            Ok(())
7515        }
7516    }
7517
7518    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7519        for ShortStringThenHandle
7520    {
7521        #[inline(always)]
7522        fn new_empty() -> Self {
7523            Self {
7524                s: fidl::new_empty!(
7525                    fidl::encoding::BoundedString<1>,
7526                    fidl::encoding::DefaultFuchsiaResourceDialect
7527                ),
7528                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7529            }
7530        }
7531
7532        #[inline]
7533        unsafe fn decode(
7534            &mut self,
7535            decoder: &mut fidl::encoding::Decoder<
7536                '_,
7537                fidl::encoding::DefaultFuchsiaResourceDialect,
7538            >,
7539            offset: usize,
7540            _depth: fidl::encoding::Depth,
7541        ) -> fidl::Result<()> {
7542            decoder.debug_check_bounds::<Self>(offset);
7543            // Verify that padding bytes are zero.
7544            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7545            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7546            let mask = 0xffffffff00000000u64;
7547            let maskedval = padval & mask;
7548            if maskedval != 0 {
7549                return Err(fidl::Error::NonZeroPadding {
7550                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7551                });
7552            }
7553            fidl::decode!(
7554                fidl::encoding::BoundedString<1>,
7555                fidl::encoding::DefaultFuchsiaResourceDialect,
7556                &mut self.s,
7557                decoder,
7558                offset + 0,
7559                _depth
7560            )?;
7561            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 16, _depth)?;
7562            Ok(())
7563        }
7564    }
7565
7566    impl fidl::encoding::ResourceTypeMarker for SingleHandle {
7567        type Borrowed<'a> = &'a mut Self;
7568        fn take_or_borrow<'a>(
7569            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7570        ) -> Self::Borrowed<'a> {
7571            value
7572        }
7573    }
7574
7575    unsafe impl fidl::encoding::TypeMarker for SingleHandle {
7576        type Owned = Self;
7577
7578        #[inline(always)]
7579        fn inline_align(_context: fidl::encoding::Context) -> usize {
7580            4
7581        }
7582
7583        #[inline(always)]
7584        fn inline_size(_context: fidl::encoding::Context) -> usize {
7585            4
7586        }
7587    }
7588
7589    unsafe impl fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7590        for &mut SingleHandle
7591    {
7592        #[inline]
7593        unsafe fn encode(
7594            self,
7595            encoder: &mut fidl::encoding::Encoder<
7596                '_,
7597                fidl::encoding::DefaultFuchsiaResourceDialect,
7598            >,
7599            offset: usize,
7600            _depth: fidl::encoding::Depth,
7601        ) -> fidl::Result<()> {
7602            encoder.debug_check_bounds::<SingleHandle>(offset);
7603            // Delegate to tuple encoding.
7604            fidl::encoding::Encode::<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7605                (
7606                    <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7607                ),
7608                encoder, offset, _depth
7609            )
7610        }
7611    }
7612    unsafe impl<
7613            T0: fidl::encoding::Encode<
7614                fidl::encoding::HandleType<
7615                    fidl::Handle,
7616                    { fidl::ObjectType::NONE.into_raw() },
7617                    2147483648,
7618                >,
7619                fidl::encoding::DefaultFuchsiaResourceDialect,
7620            >,
7621        > fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7622        for (T0,)
7623    {
7624        #[inline]
7625        unsafe fn encode(
7626            self,
7627            encoder: &mut fidl::encoding::Encoder<
7628                '_,
7629                fidl::encoding::DefaultFuchsiaResourceDialect,
7630            >,
7631            offset: usize,
7632            depth: fidl::encoding::Depth,
7633        ) -> fidl::Result<()> {
7634            encoder.debug_check_bounds::<SingleHandle>(offset);
7635            // Zero out padding regions. There's no need to apply masks
7636            // because the unmasked parts will be overwritten by fields.
7637            // Write the fields.
7638            self.0.encode(encoder, offset + 0, depth)?;
7639            Ok(())
7640        }
7641    }
7642
7643    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {
7644        #[inline(always)]
7645        fn new_empty() -> Self {
7646            Self {
7647                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7648            }
7649        }
7650
7651        #[inline]
7652        unsafe fn decode(
7653            &mut self,
7654            decoder: &mut fidl::encoding::Decoder<
7655                '_,
7656                fidl::encoding::DefaultFuchsiaResourceDialect,
7657            >,
7658            offset: usize,
7659            _depth: fidl::encoding::Depth,
7660        ) -> fidl::Result<()> {
7661            decoder.debug_check_bounds::<Self>(offset);
7662            // Verify that padding bytes are zero.
7663            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
7664            Ok(())
7665        }
7666    }
7667
7668    impl fidl::encoding::ResourceTypeMarker for SingleOptionalHandle {
7669        type Borrowed<'a> = &'a mut Self;
7670        fn take_or_borrow<'a>(
7671            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7672        ) -> Self::Borrowed<'a> {
7673            value
7674        }
7675    }
7676
7677    unsafe impl fidl::encoding::TypeMarker for SingleOptionalHandle {
7678        type Owned = Self;
7679
7680        #[inline(always)]
7681        fn inline_align(_context: fidl::encoding::Context) -> usize {
7682            4
7683        }
7684
7685        #[inline(always)]
7686        fn inline_size(_context: fidl::encoding::Context) -> usize {
7687            4
7688        }
7689    }
7690
7691    unsafe impl
7692        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7693        for &mut SingleOptionalHandle
7694    {
7695        #[inline]
7696        unsafe fn encode(
7697            self,
7698            encoder: &mut fidl::encoding::Encoder<
7699                '_,
7700                fidl::encoding::DefaultFuchsiaResourceDialect,
7701            >,
7702            offset: usize,
7703            _depth: fidl::encoding::Depth,
7704        ) -> fidl::Result<()> {
7705            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7706            // Delegate to tuple encoding.
7707            fidl::encoding::Encode::<
7708                SingleOptionalHandle,
7709                fidl::encoding::DefaultFuchsiaResourceDialect,
7710            >::encode(
7711                (<fidl::encoding::Optional<
7712                    fidl::encoding::HandleType<
7713                        fidl::Handle,
7714                        { fidl::ObjectType::NONE.into_raw() },
7715                        2147483648,
7716                    >,
7717                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7718                    &mut self.h
7719                ),),
7720                encoder,
7721                offset,
7722                _depth,
7723            )
7724        }
7725    }
7726    unsafe impl<
7727            T0: fidl::encoding::Encode<
7728                fidl::encoding::Optional<
7729                    fidl::encoding::HandleType<
7730                        fidl::Handle,
7731                        { fidl::ObjectType::NONE.into_raw() },
7732                        2147483648,
7733                    >,
7734                >,
7735                fidl::encoding::DefaultFuchsiaResourceDialect,
7736            >,
7737        >
7738        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7739        for (T0,)
7740    {
7741        #[inline]
7742        unsafe fn encode(
7743            self,
7744            encoder: &mut fidl::encoding::Encoder<
7745                '_,
7746                fidl::encoding::DefaultFuchsiaResourceDialect,
7747            >,
7748            offset: usize,
7749            depth: fidl::encoding::Depth,
7750        ) -> fidl::Result<()> {
7751            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7752            // Zero out padding regions. There's no need to apply masks
7753            // because the unmasked parts will be overwritten by fields.
7754            // Write the fields.
7755            self.0.encode(encoder, offset + 0, depth)?;
7756            Ok(())
7757        }
7758    }
7759
7760    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7761        for SingleOptionalHandle
7762    {
7763        #[inline(always)]
7764        fn new_empty() -> Self {
7765            Self {
7766                h: fidl::new_empty!(
7767                    fidl::encoding::Optional<
7768                        fidl::encoding::HandleType<
7769                            fidl::Handle,
7770                            { fidl::ObjectType::NONE.into_raw() },
7771                            2147483648,
7772                        >,
7773                    >,
7774                    fidl::encoding::DefaultFuchsiaResourceDialect
7775                ),
7776            }
7777        }
7778
7779        #[inline]
7780        unsafe fn decode(
7781            &mut self,
7782            decoder: &mut fidl::encoding::Decoder<
7783                '_,
7784                fidl::encoding::DefaultFuchsiaResourceDialect,
7785            >,
7786            offset: usize,
7787            _depth: fidl::encoding::Depth,
7788        ) -> fidl::Result<()> {
7789            decoder.debug_check_bounds::<Self>(offset);
7790            // Verify that padding bytes are zero.
7791            fidl::decode!(
7792                fidl::encoding::Optional<
7793                    fidl::encoding::HandleType<
7794                        fidl::Handle,
7795                        { fidl::ObjectType::NONE.into_raw() },
7796                        2147483648,
7797                    >,
7798                >,
7799                fidl::encoding::DefaultFuchsiaResourceDialect,
7800                &mut self.h,
7801                decoder,
7802                offset + 0,
7803                _depth
7804            )?;
7805            Ok(())
7806        }
7807    }
7808
7809    impl fidl::encoding::ResourceTypeMarker for StructOfEndpoints {
7810        type Borrowed<'a> = &'a mut Self;
7811        fn take_or_borrow<'a>(
7812            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7813        ) -> Self::Borrowed<'a> {
7814            value
7815        }
7816    }
7817
7818    unsafe impl fidl::encoding::TypeMarker for StructOfEndpoints {
7819        type Owned = Self;
7820
7821        #[inline(always)]
7822        fn inline_align(_context: fidl::encoding::Context) -> usize {
7823            4
7824        }
7825
7826        #[inline(always)]
7827        fn inline_size(_context: fidl::encoding::Context) -> usize {
7828            16
7829        }
7830    }
7831
7832    unsafe impl
7833        fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7834        for &mut StructOfEndpoints
7835    {
7836        #[inline]
7837        unsafe fn encode(
7838            self,
7839            encoder: &mut fidl::encoding::Encoder<
7840                '_,
7841                fidl::encoding::DefaultFuchsiaResourceDialect,
7842            >,
7843            offset: usize,
7844            _depth: fidl::encoding::Depth,
7845        ) -> fidl::Result<()> {
7846            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7847            // Delegate to tuple encoding.
7848            fidl::encoding::Encode::<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7849                (
7850                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.client_end),
7851                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_client_end),
7852                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
7853                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_server_end),
7854                ),
7855                encoder, offset, _depth
7856            )
7857        }
7858    }
7859    unsafe impl<
7860            T0: fidl::encoding::Encode<
7861                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7862                fidl::encoding::DefaultFuchsiaResourceDialect,
7863            >,
7864            T1: fidl::encoding::Encode<
7865                fidl::encoding::Optional<
7866                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7867                >,
7868                fidl::encoding::DefaultFuchsiaResourceDialect,
7869            >,
7870            T2: fidl::encoding::Encode<
7871                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7872                fidl::encoding::DefaultFuchsiaResourceDialect,
7873            >,
7874            T3: fidl::encoding::Encode<
7875                fidl::encoding::Optional<
7876                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7877                >,
7878                fidl::encoding::DefaultFuchsiaResourceDialect,
7879            >,
7880        >
7881        fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7882        for (T0, T1, T2, T3)
7883    {
7884        #[inline]
7885        unsafe fn encode(
7886            self,
7887            encoder: &mut fidl::encoding::Encoder<
7888                '_,
7889                fidl::encoding::DefaultFuchsiaResourceDialect,
7890            >,
7891            offset: usize,
7892            depth: fidl::encoding::Depth,
7893        ) -> fidl::Result<()> {
7894            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7895            // Zero out padding regions. There's no need to apply masks
7896            // because the unmasked parts will be overwritten by fields.
7897            // Write the fields.
7898            self.0.encode(encoder, offset + 0, depth)?;
7899            self.1.encode(encoder, offset + 4, depth)?;
7900            self.2.encode(encoder, offset + 8, depth)?;
7901            self.3.encode(encoder, offset + 12, depth)?;
7902            Ok(())
7903        }
7904    }
7905
7906    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7907        for StructOfEndpoints
7908    {
7909        #[inline(always)]
7910        fn new_empty() -> Self {
7911            Self {
7912                client_end: fidl::new_empty!(
7913                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7914                    fidl::encoding::DefaultFuchsiaResourceDialect
7915                ),
7916                optional_client_end: fidl::new_empty!(
7917                    fidl::encoding::Optional<
7918                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7919                    >,
7920                    fidl::encoding::DefaultFuchsiaResourceDialect
7921                ),
7922                server_end: fidl::new_empty!(
7923                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7924                    fidl::encoding::DefaultFuchsiaResourceDialect
7925                ),
7926                optional_server_end: fidl::new_empty!(
7927                    fidl::encoding::Optional<
7928                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7929                    >,
7930                    fidl::encoding::DefaultFuchsiaResourceDialect
7931                ),
7932            }
7933        }
7934
7935        #[inline]
7936        unsafe fn decode(
7937            &mut self,
7938            decoder: &mut fidl::encoding::Decoder<
7939                '_,
7940                fidl::encoding::DefaultFuchsiaResourceDialect,
7941            >,
7942            offset: usize,
7943            _depth: fidl::encoding::Depth,
7944        ) -> fidl::Result<()> {
7945            decoder.debug_check_bounds::<Self>(offset);
7946            // Verify that padding bytes are zero.
7947            fidl::decode!(
7948                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7949                fidl::encoding::DefaultFuchsiaResourceDialect,
7950                &mut self.client_end,
7951                decoder,
7952                offset + 0,
7953                _depth
7954            )?;
7955            fidl::decode!(
7956                fidl::encoding::Optional<
7957                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7958                >,
7959                fidl::encoding::DefaultFuchsiaResourceDialect,
7960                &mut self.optional_client_end,
7961                decoder,
7962                offset + 4,
7963                _depth
7964            )?;
7965            fidl::decode!(
7966                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7967                fidl::encoding::DefaultFuchsiaResourceDialect,
7968                &mut self.server_end,
7969                decoder,
7970                offset + 8,
7971                _depth
7972            )?;
7973            fidl::decode!(
7974                fidl::encoding::Optional<
7975                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7976                >,
7977                fidl::encoding::DefaultFuchsiaResourceDialect,
7978                &mut self.optional_server_end,
7979                decoder,
7980                offset + 12,
7981                _depth
7982            )?;
7983            Ok(())
7984        }
7985    }
7986
7987    impl fidl::encoding::ResourceTypeMarker for StructOfOptionalUnionOfHandle {
7988        type Borrowed<'a> = &'a mut Self;
7989        fn take_or_borrow<'a>(
7990            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7991        ) -> Self::Borrowed<'a> {
7992            value
7993        }
7994    }
7995
7996    unsafe impl fidl::encoding::TypeMarker for StructOfOptionalUnionOfHandle {
7997        type Owned = Self;
7998
7999        #[inline(always)]
8000        fn inline_align(_context: fidl::encoding::Context) -> usize {
8001            8
8002        }
8003
8004        #[inline(always)]
8005        fn inline_size(_context: fidl::encoding::Context) -> usize {
8006            16
8007        }
8008    }
8009
8010    unsafe impl
8011        fidl::encoding::Encode<
8012            StructOfOptionalUnionOfHandle,
8013            fidl::encoding::DefaultFuchsiaResourceDialect,
8014        > for &mut StructOfOptionalUnionOfHandle
8015    {
8016        #[inline]
8017        unsafe fn encode(
8018            self,
8019            encoder: &mut fidl::encoding::Encoder<
8020                '_,
8021                fidl::encoding::DefaultFuchsiaResourceDialect,
8022            >,
8023            offset: usize,
8024            _depth: fidl::encoding::Depth,
8025        ) -> fidl::Result<()> {
8026            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8027            // Delegate to tuple encoding.
8028            fidl::encoding::Encode::<StructOfOptionalUnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8029                (
8030                    <fidl::encoding::OptionalUnion<UnionOfHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
8031                ),
8032                encoder, offset, _depth
8033            )
8034        }
8035    }
8036    unsafe impl<
8037            T0: fidl::encoding::Encode<
8038                fidl::encoding::OptionalUnion<UnionOfHandle>,
8039                fidl::encoding::DefaultFuchsiaResourceDialect,
8040            >,
8041        >
8042        fidl::encoding::Encode<
8043            StructOfOptionalUnionOfHandle,
8044            fidl::encoding::DefaultFuchsiaResourceDialect,
8045        > for (T0,)
8046    {
8047        #[inline]
8048        unsafe fn encode(
8049            self,
8050            encoder: &mut fidl::encoding::Encoder<
8051                '_,
8052                fidl::encoding::DefaultFuchsiaResourceDialect,
8053            >,
8054            offset: usize,
8055            depth: fidl::encoding::Depth,
8056        ) -> fidl::Result<()> {
8057            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8058            // Zero out padding regions. There's no need to apply masks
8059            // because the unmasked parts will be overwritten by fields.
8060            // Write the fields.
8061            self.0.encode(encoder, offset + 0, depth)?;
8062            Ok(())
8063        }
8064    }
8065
8066    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8067        for StructOfOptionalUnionOfHandle
8068    {
8069        #[inline(always)]
8070        fn new_empty() -> Self {
8071            Self {
8072                u: fidl::new_empty!(
8073                    fidl::encoding::OptionalUnion<UnionOfHandle>,
8074                    fidl::encoding::DefaultFuchsiaResourceDialect
8075                ),
8076            }
8077        }
8078
8079        #[inline]
8080        unsafe fn decode(
8081            &mut self,
8082            decoder: &mut fidl::encoding::Decoder<
8083                '_,
8084                fidl::encoding::DefaultFuchsiaResourceDialect,
8085            >,
8086            offset: usize,
8087            _depth: fidl::encoding::Depth,
8088        ) -> fidl::Result<()> {
8089            decoder.debug_check_bounds::<Self>(offset);
8090            // Verify that padding bytes are zero.
8091            fidl::decode!(
8092                fidl::encoding::OptionalUnion<UnionOfHandle>,
8093                fidl::encoding::DefaultFuchsiaResourceDialect,
8094                &mut self.u,
8095                decoder,
8096                offset + 0,
8097                _depth
8098            )?;
8099            Ok(())
8100        }
8101    }
8102
8103    impl fidl::encoding::ResourceTypeMarker for StructOfSimpleResourceTable {
8104        type Borrowed<'a> = &'a mut Self;
8105        fn take_or_borrow<'a>(
8106            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8107        ) -> Self::Borrowed<'a> {
8108            value
8109        }
8110    }
8111
8112    unsafe impl fidl::encoding::TypeMarker for StructOfSimpleResourceTable {
8113        type Owned = Self;
8114
8115        #[inline(always)]
8116        fn inline_align(_context: fidl::encoding::Context) -> usize {
8117            8
8118        }
8119
8120        #[inline(always)]
8121        fn inline_size(_context: fidl::encoding::Context) -> usize {
8122            16
8123        }
8124    }
8125
8126    unsafe impl
8127        fidl::encoding::Encode<
8128            StructOfSimpleResourceTable,
8129            fidl::encoding::DefaultFuchsiaResourceDialect,
8130        > for &mut StructOfSimpleResourceTable
8131    {
8132        #[inline]
8133        unsafe fn encode(
8134            self,
8135            encoder: &mut fidl::encoding::Encoder<
8136                '_,
8137                fidl::encoding::DefaultFuchsiaResourceDialect,
8138            >,
8139            offset: usize,
8140            _depth: fidl::encoding::Depth,
8141        ) -> fidl::Result<()> {
8142            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8143            // Delegate to tuple encoding.
8144            fidl::encoding::Encode::<
8145                StructOfSimpleResourceTable,
8146                fidl::encoding::DefaultFuchsiaResourceDialect,
8147            >::encode(
8148                (<SimpleResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8149                    &mut self.table,
8150                ),),
8151                encoder,
8152                offset,
8153                _depth,
8154            )
8155        }
8156    }
8157    unsafe impl<
8158            T0: fidl::encoding::Encode<
8159                SimpleResourceTable,
8160                fidl::encoding::DefaultFuchsiaResourceDialect,
8161            >,
8162        >
8163        fidl::encoding::Encode<
8164            StructOfSimpleResourceTable,
8165            fidl::encoding::DefaultFuchsiaResourceDialect,
8166        > for (T0,)
8167    {
8168        #[inline]
8169        unsafe fn encode(
8170            self,
8171            encoder: &mut fidl::encoding::Encoder<
8172                '_,
8173                fidl::encoding::DefaultFuchsiaResourceDialect,
8174            >,
8175            offset: usize,
8176            depth: fidl::encoding::Depth,
8177        ) -> fidl::Result<()> {
8178            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8179            // Zero out padding regions. There's no need to apply masks
8180            // because the unmasked parts will be overwritten by fields.
8181            // Write the fields.
8182            self.0.encode(encoder, offset + 0, depth)?;
8183            Ok(())
8184        }
8185    }
8186
8187    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8188        for StructOfSimpleResourceTable
8189    {
8190        #[inline(always)]
8191        fn new_empty() -> Self {
8192            Self {
8193                table: fidl::new_empty!(
8194                    SimpleResourceTable,
8195                    fidl::encoding::DefaultFuchsiaResourceDialect
8196                ),
8197            }
8198        }
8199
8200        #[inline]
8201        unsafe fn decode(
8202            &mut self,
8203            decoder: &mut fidl::encoding::Decoder<
8204                '_,
8205                fidl::encoding::DefaultFuchsiaResourceDialect,
8206            >,
8207            offset: usize,
8208            _depth: fidl::encoding::Depth,
8209        ) -> fidl::Result<()> {
8210            decoder.debug_check_bounds::<Self>(offset);
8211            // Verify that padding bytes are zero.
8212            fidl::decode!(
8213                SimpleResourceTable,
8214                fidl::encoding::DefaultFuchsiaResourceDialect,
8215                &mut self.table,
8216                decoder,
8217                offset + 0,
8218                _depth
8219            )?;
8220            Ok(())
8221        }
8222    }
8223
8224    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandleStruct {
8225        type Borrowed<'a> = &'a mut Self;
8226        fn take_or_borrow<'a>(
8227            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8228        ) -> Self::Borrowed<'a> {
8229            value
8230        }
8231    }
8232
8233    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandleStruct {
8234        type Owned = Self;
8235
8236        #[inline(always)]
8237        fn inline_align(_context: fidl::encoding::Context) -> usize {
8238            8
8239        }
8240
8241        #[inline(always)]
8242        fn inline_size(_context: fidl::encoding::Context) -> usize {
8243            16
8244        }
8245    }
8246
8247    unsafe impl
8248        fidl::encoding::Encode<
8249            TableFieldInlinedHandleStruct,
8250            fidl::encoding::DefaultFuchsiaResourceDialect,
8251        > for &mut TableFieldInlinedHandleStruct
8252    {
8253        #[inline]
8254        unsafe fn encode(
8255            self,
8256            encoder: &mut fidl::encoding::Encoder<
8257                '_,
8258                fidl::encoding::DefaultFuchsiaResourceDialect,
8259            >,
8260            offset: usize,
8261            _depth: fidl::encoding::Depth,
8262        ) -> fidl::Result<()> {
8263            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8264            // Delegate to tuple encoding.
8265            fidl::encoding::Encode::<
8266                TableFieldInlinedHandleStruct,
8267                fidl::encoding::DefaultFuchsiaResourceDialect,
8268            >::encode(
8269                (<TableFieldInlinedHandle as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8270                    &mut self.t,
8271                ),),
8272                encoder,
8273                offset,
8274                _depth,
8275            )
8276        }
8277    }
8278    unsafe impl<
8279            T0: fidl::encoding::Encode<
8280                TableFieldInlinedHandle,
8281                fidl::encoding::DefaultFuchsiaResourceDialect,
8282            >,
8283        >
8284        fidl::encoding::Encode<
8285            TableFieldInlinedHandleStruct,
8286            fidl::encoding::DefaultFuchsiaResourceDialect,
8287        > for (T0,)
8288    {
8289        #[inline]
8290        unsafe fn encode(
8291            self,
8292            encoder: &mut fidl::encoding::Encoder<
8293                '_,
8294                fidl::encoding::DefaultFuchsiaResourceDialect,
8295            >,
8296            offset: usize,
8297            depth: fidl::encoding::Depth,
8298        ) -> fidl::Result<()> {
8299            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8300            // Zero out padding regions. There's no need to apply masks
8301            // because the unmasked parts will be overwritten by fields.
8302            // Write the fields.
8303            self.0.encode(encoder, offset + 0, depth)?;
8304            Ok(())
8305        }
8306    }
8307
8308    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8309        for TableFieldInlinedHandleStruct
8310    {
8311        #[inline(always)]
8312        fn new_empty() -> Self {
8313            Self {
8314                t: fidl::new_empty!(
8315                    TableFieldInlinedHandle,
8316                    fidl::encoding::DefaultFuchsiaResourceDialect
8317                ),
8318            }
8319        }
8320
8321        #[inline]
8322        unsafe fn decode(
8323            &mut self,
8324            decoder: &mut fidl::encoding::Decoder<
8325                '_,
8326                fidl::encoding::DefaultFuchsiaResourceDialect,
8327            >,
8328            offset: usize,
8329            _depth: fidl::encoding::Depth,
8330        ) -> fidl::Result<()> {
8331            decoder.debug_check_bounds::<Self>(offset);
8332            // Verify that padding bytes are zero.
8333            fidl::decode!(
8334                TableFieldInlinedHandle,
8335                fidl::encoding::DefaultFuchsiaResourceDialect,
8336                &mut self.t,
8337                decoder,
8338                offset + 0,
8339                _depth
8340            )?;
8341            Ok(())
8342        }
8343    }
8344
8345    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResourceStruct {
8346        type Borrowed<'a> = &'a mut Self;
8347        fn take_or_borrow<'a>(
8348            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8349        ) -> Self::Borrowed<'a> {
8350            value
8351        }
8352    }
8353
8354    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResourceStruct {
8355        type Owned = Self;
8356
8357        #[inline(always)]
8358        fn inline_align(_context: fidl::encoding::Context) -> usize {
8359            8
8360        }
8361
8362        #[inline(always)]
8363        fn inline_size(_context: fidl::encoding::Context) -> usize {
8364            16
8365        }
8366    }
8367
8368    unsafe impl
8369        fidl::encoding::Encode<
8370            TableFieldUnknownResourceStruct,
8371            fidl::encoding::DefaultFuchsiaResourceDialect,
8372        > for &mut TableFieldUnknownResourceStruct
8373    {
8374        #[inline]
8375        unsafe fn encode(
8376            self,
8377            encoder: &mut fidl::encoding::Encoder<
8378                '_,
8379                fidl::encoding::DefaultFuchsiaResourceDialect,
8380            >,
8381            offset: usize,
8382            _depth: fidl::encoding::Depth,
8383        ) -> fidl::Result<()> {
8384            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8385            // Delegate to tuple encoding.
8386            fidl::encoding::Encode::<TableFieldUnknownResourceStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8387                (
8388                    <TableFieldUnknownResource as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8389                ),
8390                encoder, offset, _depth
8391            )
8392        }
8393    }
8394    unsafe impl<
8395            T0: fidl::encoding::Encode<
8396                TableFieldUnknownResource,
8397                fidl::encoding::DefaultFuchsiaResourceDialect,
8398            >,
8399        >
8400        fidl::encoding::Encode<
8401            TableFieldUnknownResourceStruct,
8402            fidl::encoding::DefaultFuchsiaResourceDialect,
8403        > for (T0,)
8404    {
8405        #[inline]
8406        unsafe fn encode(
8407            self,
8408            encoder: &mut fidl::encoding::Encoder<
8409                '_,
8410                fidl::encoding::DefaultFuchsiaResourceDialect,
8411            >,
8412            offset: usize,
8413            depth: fidl::encoding::Depth,
8414        ) -> fidl::Result<()> {
8415            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8416            // Zero out padding regions. There's no need to apply masks
8417            // because the unmasked parts will be overwritten by fields.
8418            // Write the fields.
8419            self.0.encode(encoder, offset + 0, depth)?;
8420            Ok(())
8421        }
8422    }
8423
8424    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8425        for TableFieldUnknownResourceStruct
8426    {
8427        #[inline(always)]
8428        fn new_empty() -> Self {
8429            Self {
8430                t: fidl::new_empty!(
8431                    TableFieldUnknownResource,
8432                    fidl::encoding::DefaultFuchsiaResourceDialect
8433                ),
8434            }
8435        }
8436
8437        #[inline]
8438        unsafe fn decode(
8439            &mut self,
8440            decoder: &mut fidl::encoding::Decoder<
8441                '_,
8442                fidl::encoding::DefaultFuchsiaResourceDialect,
8443            >,
8444            offset: usize,
8445            _depth: fidl::encoding::Depth,
8446        ) -> fidl::Result<()> {
8447            decoder.debug_check_bounds::<Self>(offset);
8448            // Verify that padding bytes are zero.
8449            fidl::decode!(
8450                TableFieldUnknownResource,
8451                fidl::encoding::DefaultFuchsiaResourceDialect,
8452                &mut self.t,
8453                decoder,
8454                offset + 0,
8455                _depth
8456            )?;
8457            Ok(())
8458        }
8459    }
8460
8461    impl fidl::encoding::ResourceTypeMarker for TableOfEndpoints {
8462        type Borrowed<'a> = &'a mut Self;
8463        fn take_or_borrow<'a>(
8464            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8465        ) -> Self::Borrowed<'a> {
8466            value
8467        }
8468    }
8469
8470    unsafe impl fidl::encoding::TypeMarker for TableOfEndpoints {
8471        type Owned = Self;
8472
8473        #[inline(always)]
8474        fn inline_align(_context: fidl::encoding::Context) -> usize {
8475            8
8476        }
8477
8478        #[inline(always)]
8479        fn inline_size(_context: fidl::encoding::Context) -> usize {
8480            16
8481        }
8482    }
8483
8484    unsafe impl
8485        fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8486        for &mut TableOfEndpoints
8487    {
8488        #[inline]
8489        unsafe fn encode(
8490            self,
8491            encoder: &mut fidl::encoding::Encoder<
8492                '_,
8493                fidl::encoding::DefaultFuchsiaResourceDialect,
8494            >,
8495            offset: usize,
8496            _depth: fidl::encoding::Depth,
8497        ) -> fidl::Result<()> {
8498            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8499            // Delegate to tuple encoding.
8500            fidl::encoding::Encode::<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8501                (
8502                    <TableOfEndpointsTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8503                ),
8504                encoder, offset, _depth
8505            )
8506        }
8507    }
8508    unsafe impl<
8509            T0: fidl::encoding::Encode<
8510                TableOfEndpointsTable,
8511                fidl::encoding::DefaultFuchsiaResourceDialect,
8512            >,
8513        >
8514        fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8515        for (T0,)
8516    {
8517        #[inline]
8518        unsafe fn encode(
8519            self,
8520            encoder: &mut fidl::encoding::Encoder<
8521                '_,
8522                fidl::encoding::DefaultFuchsiaResourceDialect,
8523            >,
8524            offset: usize,
8525            depth: fidl::encoding::Depth,
8526        ) -> fidl::Result<()> {
8527            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8528            // Zero out padding regions. There's no need to apply masks
8529            // because the unmasked parts will be overwritten by fields.
8530            // Write the fields.
8531            self.0.encode(encoder, offset + 0, depth)?;
8532            Ok(())
8533        }
8534    }
8535
8536    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8537        for TableOfEndpoints
8538    {
8539        #[inline(always)]
8540        fn new_empty() -> Self {
8541            Self {
8542                t: fidl::new_empty!(
8543                    TableOfEndpointsTable,
8544                    fidl::encoding::DefaultFuchsiaResourceDialect
8545                ),
8546            }
8547        }
8548
8549        #[inline]
8550        unsafe fn decode(
8551            &mut self,
8552            decoder: &mut fidl::encoding::Decoder<
8553                '_,
8554                fidl::encoding::DefaultFuchsiaResourceDialect,
8555            >,
8556            offset: usize,
8557            _depth: fidl::encoding::Depth,
8558        ) -> fidl::Result<()> {
8559            decoder.debug_check_bounds::<Self>(offset);
8560            // Verify that padding bytes are zero.
8561            fidl::decode!(
8562                TableOfEndpointsTable,
8563                fidl::encoding::DefaultFuchsiaResourceDialect,
8564                &mut self.t,
8565                decoder,
8566                offset + 0,
8567                _depth
8568            )?;
8569            Ok(())
8570        }
8571    }
8572
8573    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwichStruct {
8574        type Borrowed<'a> = &'a mut Self;
8575        fn take_or_borrow<'a>(
8576            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8577        ) -> Self::Borrowed<'a> {
8578            value
8579        }
8580    }
8581
8582    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwichStruct {
8583        type Owned = Self;
8584
8585        #[inline(always)]
8586        fn inline_align(_context: fidl::encoding::Context) -> usize {
8587            8
8588        }
8589
8590        #[inline(always)]
8591        fn inline_size(_context: fidl::encoding::Context) -> usize {
8592            16
8593        }
8594    }
8595
8596    unsafe impl
8597        fidl::encoding::Encode<
8598            TableUnionWithVectorReservedSandwichStruct,
8599            fidl::encoding::DefaultFuchsiaResourceDialect,
8600        > for &mut TableUnionWithVectorReservedSandwichStruct
8601    {
8602        #[inline]
8603        unsafe fn encode(
8604            self,
8605            encoder: &mut fidl::encoding::Encoder<
8606                '_,
8607                fidl::encoding::DefaultFuchsiaResourceDialect,
8608            >,
8609            offset: usize,
8610            _depth: fidl::encoding::Depth,
8611        ) -> fidl::Result<()> {
8612            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8613            // Delegate to tuple encoding.
8614            fidl::encoding::Encode::<TableUnionWithVectorReservedSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8615                (
8616                    <TableUnionWithVectorReservedSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8617                ),
8618                encoder, offset, _depth
8619            )
8620        }
8621    }
8622    unsafe impl<
8623            T0: fidl::encoding::Encode<
8624                TableUnionWithVectorReservedSandwich,
8625                fidl::encoding::DefaultFuchsiaResourceDialect,
8626            >,
8627        >
8628        fidl::encoding::Encode<
8629            TableUnionWithVectorReservedSandwichStruct,
8630            fidl::encoding::DefaultFuchsiaResourceDialect,
8631        > for (T0,)
8632    {
8633        #[inline]
8634        unsafe fn encode(
8635            self,
8636            encoder: &mut fidl::encoding::Encoder<
8637                '_,
8638                fidl::encoding::DefaultFuchsiaResourceDialect,
8639            >,
8640            offset: usize,
8641            depth: fidl::encoding::Depth,
8642        ) -> fidl::Result<()> {
8643            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8644            // Zero out padding regions. There's no need to apply masks
8645            // because the unmasked parts will be overwritten by fields.
8646            // Write the fields.
8647            self.0.encode(encoder, offset + 0, depth)?;
8648            Ok(())
8649        }
8650    }
8651
8652    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8653        for TableUnionWithVectorReservedSandwichStruct
8654    {
8655        #[inline(always)]
8656        fn new_empty() -> Self {
8657            Self {
8658                table: fidl::new_empty!(
8659                    TableUnionWithVectorReservedSandwich,
8660                    fidl::encoding::DefaultFuchsiaResourceDialect
8661                ),
8662            }
8663        }
8664
8665        #[inline]
8666        unsafe fn decode(
8667            &mut self,
8668            decoder: &mut fidl::encoding::Decoder<
8669                '_,
8670                fidl::encoding::DefaultFuchsiaResourceDialect,
8671            >,
8672            offset: usize,
8673            _depth: fidl::encoding::Depth,
8674        ) -> fidl::Result<()> {
8675            decoder.debug_check_bounds::<Self>(offset);
8676            // Verify that padding bytes are zero.
8677            fidl::decode!(
8678                TableUnionWithVectorReservedSandwich,
8679                fidl::encoding::DefaultFuchsiaResourceDialect,
8680                &mut self.table,
8681                decoder,
8682                offset + 0,
8683                _depth
8684            )?;
8685            Ok(())
8686        }
8687    }
8688
8689    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwichStruct {
8690        type Borrowed<'a> = &'a mut Self;
8691        fn take_or_borrow<'a>(
8692            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8693        ) -> Self::Borrowed<'a> {
8694            value
8695        }
8696    }
8697
8698    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwichStruct {
8699        type Owned = Self;
8700
8701        #[inline(always)]
8702        fn inline_align(_context: fidl::encoding::Context) -> usize {
8703            8
8704        }
8705
8706        #[inline(always)]
8707        fn inline_size(_context: fidl::encoding::Context) -> usize {
8708            16
8709        }
8710    }
8711
8712    unsafe impl
8713        fidl::encoding::Encode<
8714            TableUnionWithVectorStructSandwichStruct,
8715            fidl::encoding::DefaultFuchsiaResourceDialect,
8716        > for &mut TableUnionWithVectorStructSandwichStruct
8717    {
8718        #[inline]
8719        unsafe fn encode(
8720            self,
8721            encoder: &mut fidl::encoding::Encoder<
8722                '_,
8723                fidl::encoding::DefaultFuchsiaResourceDialect,
8724            >,
8725            offset: usize,
8726            _depth: fidl::encoding::Depth,
8727        ) -> fidl::Result<()> {
8728            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8729            // Delegate to tuple encoding.
8730            fidl::encoding::Encode::<TableUnionWithVectorStructSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8731                (
8732                    <TableUnionWithVectorStructSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8733                ),
8734                encoder, offset, _depth
8735            )
8736        }
8737    }
8738    unsafe impl<
8739            T0: fidl::encoding::Encode<
8740                TableUnionWithVectorStructSandwich,
8741                fidl::encoding::DefaultFuchsiaResourceDialect,
8742            >,
8743        >
8744        fidl::encoding::Encode<
8745            TableUnionWithVectorStructSandwichStruct,
8746            fidl::encoding::DefaultFuchsiaResourceDialect,
8747        > for (T0,)
8748    {
8749        #[inline]
8750        unsafe fn encode(
8751            self,
8752            encoder: &mut fidl::encoding::Encoder<
8753                '_,
8754                fidl::encoding::DefaultFuchsiaResourceDialect,
8755            >,
8756            offset: usize,
8757            depth: fidl::encoding::Depth,
8758        ) -> fidl::Result<()> {
8759            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8760            // Zero out padding regions. There's no need to apply masks
8761            // because the unmasked parts will be overwritten by fields.
8762            // Write the fields.
8763            self.0.encode(encoder, offset + 0, depth)?;
8764            Ok(())
8765        }
8766    }
8767
8768    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8769        for TableUnionWithVectorStructSandwichStruct
8770    {
8771        #[inline(always)]
8772        fn new_empty() -> Self {
8773            Self {
8774                table: fidl::new_empty!(
8775                    TableUnionWithVectorStructSandwich,
8776                    fidl::encoding::DefaultFuchsiaResourceDialect
8777                ),
8778            }
8779        }
8780
8781        #[inline]
8782        unsafe fn decode(
8783            &mut self,
8784            decoder: &mut fidl::encoding::Decoder<
8785                '_,
8786                fidl::encoding::DefaultFuchsiaResourceDialect,
8787            >,
8788            offset: usize,
8789            _depth: fidl::encoding::Depth,
8790        ) -> fidl::Result<()> {
8791            decoder.debug_check_bounds::<Self>(offset);
8792            // Verify that padding bytes are zero.
8793            fidl::decode!(
8794                TableUnionWithVectorStructSandwich,
8795                fidl::encoding::DefaultFuchsiaResourceDialect,
8796                &mut self.table,
8797                decoder,
8798                offset + 0,
8799                _depth
8800            )?;
8801            Ok(())
8802        }
8803    }
8804
8805    impl fidl::encoding::ResourceTypeMarker for TestFlexibleResourceXUnionInStruct {
8806        type Borrowed<'a> = &'a mut Self;
8807        fn take_or_borrow<'a>(
8808            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8809        ) -> Self::Borrowed<'a> {
8810            value
8811        }
8812    }
8813
8814    unsafe impl fidl::encoding::TypeMarker for TestFlexibleResourceXUnionInStruct {
8815        type Owned = Self;
8816
8817        #[inline(always)]
8818        fn inline_align(_context: fidl::encoding::Context) -> usize {
8819            8
8820        }
8821
8822        #[inline(always)]
8823        fn inline_size(_context: fidl::encoding::Context) -> usize {
8824            16
8825        }
8826    }
8827
8828    unsafe impl
8829        fidl::encoding::Encode<
8830            TestFlexibleResourceXUnionInStruct,
8831            fidl::encoding::DefaultFuchsiaResourceDialect,
8832        > for &mut TestFlexibleResourceXUnionInStruct
8833    {
8834        #[inline]
8835        unsafe fn encode(
8836            self,
8837            encoder: &mut fidl::encoding::Encoder<
8838                '_,
8839                fidl::encoding::DefaultFuchsiaResourceDialect,
8840            >,
8841            offset: usize,
8842            _depth: fidl::encoding::Depth,
8843        ) -> fidl::Result<()> {
8844            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8845            // Delegate to tuple encoding.
8846            fidl::encoding::Encode::<
8847                TestFlexibleResourceXUnionInStruct,
8848                fidl::encoding::DefaultFuchsiaResourceDialect,
8849            >::encode(
8850                (<SampleResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8851                    &mut self.xu,
8852                ),),
8853                encoder,
8854                offset,
8855                _depth,
8856            )
8857        }
8858    }
8859    unsafe impl<
8860            T0: fidl::encoding::Encode<
8861                SampleResourceXUnion,
8862                fidl::encoding::DefaultFuchsiaResourceDialect,
8863            >,
8864        >
8865        fidl::encoding::Encode<
8866            TestFlexibleResourceXUnionInStruct,
8867            fidl::encoding::DefaultFuchsiaResourceDialect,
8868        > for (T0,)
8869    {
8870        #[inline]
8871        unsafe fn encode(
8872            self,
8873            encoder: &mut fidl::encoding::Encoder<
8874                '_,
8875                fidl::encoding::DefaultFuchsiaResourceDialect,
8876            >,
8877            offset: usize,
8878            depth: fidl::encoding::Depth,
8879        ) -> fidl::Result<()> {
8880            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8881            // Zero out padding regions. There's no need to apply masks
8882            // because the unmasked parts will be overwritten by fields.
8883            // Write the fields.
8884            self.0.encode(encoder, offset + 0, depth)?;
8885            Ok(())
8886        }
8887    }
8888
8889    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8890        for TestFlexibleResourceXUnionInStruct
8891    {
8892        #[inline(always)]
8893        fn new_empty() -> Self {
8894            Self {
8895                xu: fidl::new_empty!(
8896                    SampleResourceXUnion,
8897                    fidl::encoding::DefaultFuchsiaResourceDialect
8898                ),
8899            }
8900        }
8901
8902        #[inline]
8903        unsafe fn decode(
8904            &mut self,
8905            decoder: &mut fidl::encoding::Decoder<
8906                '_,
8907                fidl::encoding::DefaultFuchsiaResourceDialect,
8908            >,
8909            offset: usize,
8910            _depth: fidl::encoding::Depth,
8911        ) -> fidl::Result<()> {
8912            decoder.debug_check_bounds::<Self>(offset);
8913            // Verify that padding bytes are zero.
8914            fidl::decode!(
8915                SampleResourceXUnion,
8916                fidl::encoding::DefaultFuchsiaResourceDialect,
8917                &mut self.xu,
8918                decoder,
8919                offset + 0,
8920                _depth
8921            )?;
8922            Ok(())
8923        }
8924    }
8925
8926    impl fidl::encoding::ResourceTypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8927        type Borrowed<'a> = &'a mut Self;
8928        fn take_or_borrow<'a>(
8929            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8930        ) -> Self::Borrowed<'a> {
8931            value
8932        }
8933    }
8934
8935    unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8936        type Owned = Self;
8937
8938        #[inline(always)]
8939        fn inline_align(_context: fidl::encoding::Context) -> usize {
8940            8
8941        }
8942
8943        #[inline(always)]
8944        fn inline_size(_context: fidl::encoding::Context) -> usize {
8945            16
8946        }
8947    }
8948
8949    unsafe impl
8950        fidl::encoding::Encode<
8951            TestOptionalFlexibleResourceXUnionInStruct,
8952            fidl::encoding::DefaultFuchsiaResourceDialect,
8953        > for &mut TestOptionalFlexibleResourceXUnionInStruct
8954    {
8955        #[inline]
8956        unsafe fn encode(
8957            self,
8958            encoder: &mut fidl::encoding::Encoder<
8959                '_,
8960                fidl::encoding::DefaultFuchsiaResourceDialect,
8961            >,
8962            offset: usize,
8963            _depth: fidl::encoding::Depth,
8964        ) -> fidl::Result<()> {
8965            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8966            // Delegate to tuple encoding.
8967            fidl::encoding::Encode::<TestOptionalFlexibleResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8968                (
8969                    <fidl::encoding::OptionalUnion<SampleResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
8970                ),
8971                encoder, offset, _depth
8972            )
8973        }
8974    }
8975    unsafe impl<
8976            T0: fidl::encoding::Encode<
8977                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8978                fidl::encoding::DefaultFuchsiaResourceDialect,
8979            >,
8980        >
8981        fidl::encoding::Encode<
8982            TestOptionalFlexibleResourceXUnionInStruct,
8983            fidl::encoding::DefaultFuchsiaResourceDialect,
8984        > for (T0,)
8985    {
8986        #[inline]
8987        unsafe fn encode(
8988            self,
8989            encoder: &mut fidl::encoding::Encoder<
8990                '_,
8991                fidl::encoding::DefaultFuchsiaResourceDialect,
8992            >,
8993            offset: usize,
8994            depth: fidl::encoding::Depth,
8995        ) -> fidl::Result<()> {
8996            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8997            // Zero out padding regions. There's no need to apply masks
8998            // because the unmasked parts will be overwritten by fields.
8999            // Write the fields.
9000            self.0.encode(encoder, offset + 0, depth)?;
9001            Ok(())
9002        }
9003    }
9004
9005    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9006        for TestOptionalFlexibleResourceXUnionInStruct
9007    {
9008        #[inline(always)]
9009        fn new_empty() -> Self {
9010            Self {
9011                xu: fidl::new_empty!(
9012                    fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9013                    fidl::encoding::DefaultFuchsiaResourceDialect
9014                ),
9015            }
9016        }
9017
9018        #[inline]
9019        unsafe fn decode(
9020            &mut self,
9021            decoder: &mut fidl::encoding::Decoder<
9022                '_,
9023                fidl::encoding::DefaultFuchsiaResourceDialect,
9024            >,
9025            offset: usize,
9026            _depth: fidl::encoding::Depth,
9027        ) -> fidl::Result<()> {
9028            decoder.debug_check_bounds::<Self>(offset);
9029            // Verify that padding bytes are zero.
9030            fidl::decode!(
9031                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9032                fidl::encoding::DefaultFuchsiaResourceDialect,
9033                &mut self.xu,
9034                decoder,
9035                offset + 0,
9036                _depth
9037            )?;
9038            Ok(())
9039        }
9040    }
9041
9042    impl fidl::encoding::ResourceTypeMarker for TestOptionalStrictResourceXUnionInStruct {
9043        type Borrowed<'a> = &'a mut Self;
9044        fn take_or_borrow<'a>(
9045            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9046        ) -> Self::Borrowed<'a> {
9047            value
9048        }
9049    }
9050
9051    unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictResourceXUnionInStruct {
9052        type Owned = Self;
9053
9054        #[inline(always)]
9055        fn inline_align(_context: fidl::encoding::Context) -> usize {
9056            8
9057        }
9058
9059        #[inline(always)]
9060        fn inline_size(_context: fidl::encoding::Context) -> usize {
9061            16
9062        }
9063    }
9064
9065    unsafe impl
9066        fidl::encoding::Encode<
9067            TestOptionalStrictResourceXUnionInStruct,
9068            fidl::encoding::DefaultFuchsiaResourceDialect,
9069        > for &mut TestOptionalStrictResourceXUnionInStruct
9070    {
9071        #[inline]
9072        unsafe fn encode(
9073            self,
9074            encoder: &mut fidl::encoding::Encoder<
9075                '_,
9076                fidl::encoding::DefaultFuchsiaResourceDialect,
9077            >,
9078            offset: usize,
9079            _depth: fidl::encoding::Depth,
9080        ) -> fidl::Result<()> {
9081            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9082            // Delegate to tuple encoding.
9083            fidl::encoding::Encode::<TestOptionalStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9084                (
9085                    <fidl::encoding::OptionalUnion<SampleStrictResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9086                ),
9087                encoder, offset, _depth
9088            )
9089        }
9090    }
9091    unsafe impl<
9092            T0: fidl::encoding::Encode<
9093                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9094                fidl::encoding::DefaultFuchsiaResourceDialect,
9095            >,
9096        >
9097        fidl::encoding::Encode<
9098            TestOptionalStrictResourceXUnionInStruct,
9099            fidl::encoding::DefaultFuchsiaResourceDialect,
9100        > for (T0,)
9101    {
9102        #[inline]
9103        unsafe fn encode(
9104            self,
9105            encoder: &mut fidl::encoding::Encoder<
9106                '_,
9107                fidl::encoding::DefaultFuchsiaResourceDialect,
9108            >,
9109            offset: usize,
9110            depth: fidl::encoding::Depth,
9111        ) -> fidl::Result<()> {
9112            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9113            // Zero out padding regions. There's no need to apply masks
9114            // because the unmasked parts will be overwritten by fields.
9115            // Write the fields.
9116            self.0.encode(encoder, offset + 0, depth)?;
9117            Ok(())
9118        }
9119    }
9120
9121    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9122        for TestOptionalStrictResourceXUnionInStruct
9123    {
9124        #[inline(always)]
9125        fn new_empty() -> Self {
9126            Self {
9127                xu: fidl::new_empty!(
9128                    fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9129                    fidl::encoding::DefaultFuchsiaResourceDialect
9130                ),
9131            }
9132        }
9133
9134        #[inline]
9135        unsafe fn decode(
9136            &mut self,
9137            decoder: &mut fidl::encoding::Decoder<
9138                '_,
9139                fidl::encoding::DefaultFuchsiaResourceDialect,
9140            >,
9141            offset: usize,
9142            _depth: fidl::encoding::Depth,
9143        ) -> fidl::Result<()> {
9144            decoder.debug_check_bounds::<Self>(offset);
9145            // Verify that padding bytes are zero.
9146            fidl::decode!(
9147                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9148                fidl::encoding::DefaultFuchsiaResourceDialect,
9149                &mut self.xu,
9150                decoder,
9151                offset + 0,
9152                _depth
9153            )?;
9154            Ok(())
9155        }
9156    }
9157
9158    impl fidl::encoding::ResourceTypeMarker for TestPackageResolverResolveRequest {
9159        type Borrowed<'a> = &'a mut Self;
9160        fn take_or_borrow<'a>(
9161            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9162        ) -> Self::Borrowed<'a> {
9163            value
9164        }
9165    }
9166
9167    unsafe impl fidl::encoding::TypeMarker for TestPackageResolverResolveRequest {
9168        type Owned = Self;
9169
9170        #[inline(always)]
9171        fn inline_align(_context: fidl::encoding::Context) -> usize {
9172            8
9173        }
9174
9175        #[inline(always)]
9176        fn inline_size(_context: fidl::encoding::Context) -> usize {
9177            40
9178        }
9179    }
9180
9181    unsafe impl
9182        fidl::encoding::Encode<
9183            TestPackageResolverResolveRequest,
9184            fidl::encoding::DefaultFuchsiaResourceDialect,
9185        > for &mut TestPackageResolverResolveRequest
9186    {
9187        #[inline]
9188        unsafe fn encode(
9189            self,
9190            encoder: &mut fidl::encoding::Encoder<
9191                '_,
9192                fidl::encoding::DefaultFuchsiaResourceDialect,
9193            >,
9194            offset: usize,
9195            _depth: fidl::encoding::Depth,
9196        ) -> fidl::Result<()> {
9197            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9198            // Delegate to tuple encoding.
9199            fidl::encoding::Encode::<TestPackageResolverResolveRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9200                (
9201                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),
9202                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.selectors),
9203                    <UpdatePolicy as fidl::encoding::ValueTypeMarker>::borrow(&self.update_policy),
9204                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
9205                ),
9206                encoder, offset, _depth
9207            )
9208        }
9209    }
9210    unsafe impl<
9211            T0: fidl::encoding::Encode<
9212                fidl::encoding::UnboundedString,
9213                fidl::encoding::DefaultFuchsiaResourceDialect,
9214            >,
9215            T1: fidl::encoding::Encode<
9216                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9217                fidl::encoding::DefaultFuchsiaResourceDialect,
9218            >,
9219            T2: fidl::encoding::Encode<UpdatePolicy, fidl::encoding::DefaultFuchsiaResourceDialect>,
9220            T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
9221        >
9222        fidl::encoding::Encode<
9223            TestPackageResolverResolveRequest,
9224            fidl::encoding::DefaultFuchsiaResourceDialect,
9225        > for (T0, T1, T2, T3)
9226    {
9227        #[inline]
9228        unsafe fn encode(
9229            self,
9230            encoder: &mut fidl::encoding::Encoder<
9231                '_,
9232                fidl::encoding::DefaultFuchsiaResourceDialect,
9233            >,
9234            offset: usize,
9235            depth: fidl::encoding::Depth,
9236        ) -> fidl::Result<()> {
9237            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9238            // Zero out padding regions. There's no need to apply masks
9239            // because the unmasked parts will be overwritten by fields.
9240            unsafe {
9241                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9242                (ptr as *mut u64).write_unaligned(0);
9243            }
9244            // Write the fields.
9245            self.0.encode(encoder, offset + 0, depth)?;
9246            self.1.encode(encoder, offset + 16, depth)?;
9247            self.2.encode(encoder, offset + 32, depth)?;
9248            self.3.encode(encoder, offset + 36, depth)?;
9249            Ok(())
9250        }
9251    }
9252
9253    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9254        for TestPackageResolverResolveRequest
9255    {
9256        #[inline(always)]
9257        fn new_empty() -> Self {
9258            Self {
9259                package_url: fidl::new_empty!(
9260                    fidl::encoding::UnboundedString,
9261                    fidl::encoding::DefaultFuchsiaResourceDialect
9262                ),
9263                selectors: fidl::new_empty!(
9264                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9265                    fidl::encoding::DefaultFuchsiaResourceDialect
9266                ),
9267                update_policy: fidl::new_empty!(
9268                    UpdatePolicy,
9269                    fidl::encoding::DefaultFuchsiaResourceDialect
9270                ),
9271                this_should_be_a_handle: fidl::new_empty!(
9272                    u32,
9273                    fidl::encoding::DefaultFuchsiaResourceDialect
9274                ),
9275            }
9276        }
9277
9278        #[inline]
9279        unsafe fn decode(
9280            &mut self,
9281            decoder: &mut fidl::encoding::Decoder<
9282                '_,
9283                fidl::encoding::DefaultFuchsiaResourceDialect,
9284            >,
9285            offset: usize,
9286            _depth: fidl::encoding::Depth,
9287        ) -> fidl::Result<()> {
9288            decoder.debug_check_bounds::<Self>(offset);
9289            // Verify that padding bytes are zero.
9290            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9291            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9292            let mask = 0xffff0000u64;
9293            let maskedval = padval & mask;
9294            if maskedval != 0 {
9295                return Err(fidl::Error::NonZeroPadding {
9296                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9297                });
9298            }
9299            fidl::decode!(
9300                fidl::encoding::UnboundedString,
9301                fidl::encoding::DefaultFuchsiaResourceDialect,
9302                &mut self.package_url,
9303                decoder,
9304                offset + 0,
9305                _depth
9306            )?;
9307            fidl::decode!(
9308                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9309                fidl::encoding::DefaultFuchsiaResourceDialect,
9310                &mut self.selectors,
9311                decoder,
9312                offset + 16,
9313                _depth
9314            )?;
9315            fidl::decode!(
9316                UpdatePolicy,
9317                fidl::encoding::DefaultFuchsiaResourceDialect,
9318                &mut self.update_policy,
9319                decoder,
9320                offset + 32,
9321                _depth
9322            )?;
9323            fidl::decode!(
9324                u32,
9325                fidl::encoding::DefaultFuchsiaResourceDialect,
9326                &mut self.this_should_be_a_handle,
9327                decoder,
9328                offset + 36,
9329                _depth
9330            )?;
9331            Ok(())
9332        }
9333    }
9334
9335    impl fidl::encoding::ResourceTypeMarker for TestStrictResourceXUnionInStruct {
9336        type Borrowed<'a> = &'a mut Self;
9337        fn take_or_borrow<'a>(
9338            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9339        ) -> Self::Borrowed<'a> {
9340            value
9341        }
9342    }
9343
9344    unsafe impl fidl::encoding::TypeMarker for TestStrictResourceXUnionInStruct {
9345        type Owned = Self;
9346
9347        #[inline(always)]
9348        fn inline_align(_context: fidl::encoding::Context) -> usize {
9349            8
9350        }
9351
9352        #[inline(always)]
9353        fn inline_size(_context: fidl::encoding::Context) -> usize {
9354            16
9355        }
9356    }
9357
9358    unsafe impl
9359        fidl::encoding::Encode<
9360            TestStrictResourceXUnionInStruct,
9361            fidl::encoding::DefaultFuchsiaResourceDialect,
9362        > for &mut TestStrictResourceXUnionInStruct
9363    {
9364        #[inline]
9365        unsafe fn encode(
9366            self,
9367            encoder: &mut fidl::encoding::Encoder<
9368                '_,
9369                fidl::encoding::DefaultFuchsiaResourceDialect,
9370            >,
9371            offset: usize,
9372            _depth: fidl::encoding::Depth,
9373        ) -> fidl::Result<()> {
9374            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9375            // Delegate to tuple encoding.
9376            fidl::encoding::Encode::<TestStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9377                (
9378                    <SampleStrictResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9379                ),
9380                encoder, offset, _depth
9381            )
9382        }
9383    }
9384    unsafe impl<
9385            T0: fidl::encoding::Encode<
9386                SampleStrictResourceXUnion,
9387                fidl::encoding::DefaultFuchsiaResourceDialect,
9388            >,
9389        >
9390        fidl::encoding::Encode<
9391            TestStrictResourceXUnionInStruct,
9392            fidl::encoding::DefaultFuchsiaResourceDialect,
9393        > for (T0,)
9394    {
9395        #[inline]
9396        unsafe fn encode(
9397            self,
9398            encoder: &mut fidl::encoding::Encoder<
9399                '_,
9400                fidl::encoding::DefaultFuchsiaResourceDialect,
9401            >,
9402            offset: usize,
9403            depth: fidl::encoding::Depth,
9404        ) -> fidl::Result<()> {
9405            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9406            // Zero out padding regions. There's no need to apply masks
9407            // because the unmasked parts will be overwritten by fields.
9408            // Write the fields.
9409            self.0.encode(encoder, offset + 0, depth)?;
9410            Ok(())
9411        }
9412    }
9413
9414    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9415        for TestStrictResourceXUnionInStruct
9416    {
9417        #[inline(always)]
9418        fn new_empty() -> Self {
9419            Self {
9420                xu: fidl::new_empty!(
9421                    SampleStrictResourceXUnion,
9422                    fidl::encoding::DefaultFuchsiaResourceDialect
9423                ),
9424            }
9425        }
9426
9427        #[inline]
9428        unsafe fn decode(
9429            &mut self,
9430            decoder: &mut fidl::encoding::Decoder<
9431                '_,
9432                fidl::encoding::DefaultFuchsiaResourceDialect,
9433            >,
9434            offset: usize,
9435            _depth: fidl::encoding::Depth,
9436        ) -> fidl::Result<()> {
9437            decoder.debug_check_bounds::<Self>(offset);
9438            // Verify that padding bytes are zero.
9439            fidl::decode!(
9440                SampleStrictResourceXUnion,
9441                fidl::encoding::DefaultFuchsiaResourceDialect,
9442                &mut self.xu,
9443                decoder,
9444                offset + 0,
9445                _depth
9446            )?;
9447            Ok(())
9448        }
9449    }
9450
9451    impl fidl::encoding::ResourceTypeMarker for UnboundedNonnullableVectorOfHandles {
9452        type Borrowed<'a> = &'a mut Self;
9453        fn take_or_borrow<'a>(
9454            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9455        ) -> Self::Borrowed<'a> {
9456            value
9457        }
9458    }
9459
9460    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfHandles {
9461        type Owned = Self;
9462
9463        #[inline(always)]
9464        fn inline_align(_context: fidl::encoding::Context) -> usize {
9465            8
9466        }
9467
9468        #[inline(always)]
9469        fn inline_size(_context: fidl::encoding::Context) -> usize {
9470            16
9471        }
9472    }
9473
9474    unsafe impl
9475        fidl::encoding::Encode<
9476            UnboundedNonnullableVectorOfHandles,
9477            fidl::encoding::DefaultFuchsiaResourceDialect,
9478        > for &mut UnboundedNonnullableVectorOfHandles
9479    {
9480        #[inline]
9481        unsafe fn encode(
9482            self,
9483            encoder: &mut fidl::encoding::Encoder<
9484                '_,
9485                fidl::encoding::DefaultFuchsiaResourceDialect,
9486            >,
9487            offset: usize,
9488            _depth: fidl::encoding::Depth,
9489        ) -> fidl::Result<()> {
9490            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9491            // Delegate to tuple encoding.
9492            fidl::encoding::Encode::<
9493                UnboundedNonnullableVectorOfHandles,
9494                fidl::encoding::DefaultFuchsiaResourceDialect,
9495            >::encode(
9496                (<fidl::encoding::UnboundedVector<
9497                    fidl::encoding::HandleType<
9498                        fidl::Handle,
9499                        { fidl::ObjectType::NONE.into_raw() },
9500                        2147483648,
9501                    >,
9502                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9503                    &mut self.vh0
9504                ),),
9505                encoder,
9506                offset,
9507                _depth,
9508            )
9509        }
9510    }
9511    unsafe impl<
9512            T0: fidl::encoding::Encode<
9513                fidl::encoding::UnboundedVector<
9514                    fidl::encoding::HandleType<
9515                        fidl::Handle,
9516                        { fidl::ObjectType::NONE.into_raw() },
9517                        2147483648,
9518                    >,
9519                >,
9520                fidl::encoding::DefaultFuchsiaResourceDialect,
9521            >,
9522        >
9523        fidl::encoding::Encode<
9524            UnboundedNonnullableVectorOfHandles,
9525            fidl::encoding::DefaultFuchsiaResourceDialect,
9526        > for (T0,)
9527    {
9528        #[inline]
9529        unsafe fn encode(
9530            self,
9531            encoder: &mut fidl::encoding::Encoder<
9532                '_,
9533                fidl::encoding::DefaultFuchsiaResourceDialect,
9534            >,
9535            offset: usize,
9536            depth: fidl::encoding::Depth,
9537        ) -> fidl::Result<()> {
9538            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9539            // Zero out padding regions. There's no need to apply masks
9540            // because the unmasked parts will be overwritten by fields.
9541            // Write the fields.
9542            self.0.encode(encoder, offset + 0, depth)?;
9543            Ok(())
9544        }
9545    }
9546
9547    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9548        for UnboundedNonnullableVectorOfHandles
9549    {
9550        #[inline(always)]
9551        fn new_empty() -> Self {
9552            Self {
9553                vh0: fidl::new_empty!(
9554                    fidl::encoding::UnboundedVector<
9555                        fidl::encoding::HandleType<
9556                            fidl::Handle,
9557                            { fidl::ObjectType::NONE.into_raw() },
9558                            2147483648,
9559                        >,
9560                    >,
9561                    fidl::encoding::DefaultFuchsiaResourceDialect
9562                ),
9563            }
9564        }
9565
9566        #[inline]
9567        unsafe fn decode(
9568            &mut self,
9569            decoder: &mut fidl::encoding::Decoder<
9570                '_,
9571                fidl::encoding::DefaultFuchsiaResourceDialect,
9572            >,
9573            offset: usize,
9574            _depth: fidl::encoding::Depth,
9575        ) -> fidl::Result<()> {
9576            decoder.debug_check_bounds::<Self>(offset);
9577            // Verify that padding bytes are zero.
9578            fidl::decode!(
9579                fidl::encoding::UnboundedVector<
9580                    fidl::encoding::HandleType<
9581                        fidl::Handle,
9582                        { fidl::ObjectType::NONE.into_raw() },
9583                        2147483648,
9584                    >,
9585                >,
9586                fidl::encoding::DefaultFuchsiaResourceDialect,
9587                &mut self.vh0,
9588                decoder,
9589                offset + 0,
9590                _depth
9591            )?;
9592            Ok(())
9593        }
9594    }
9595
9596    impl fidl::encoding::ResourceTypeMarker for UnboundedNullableVectorOfHandles {
9597        type Borrowed<'a> = &'a mut Self;
9598        fn take_or_borrow<'a>(
9599            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9600        ) -> Self::Borrowed<'a> {
9601            value
9602        }
9603    }
9604
9605    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfHandles {
9606        type Owned = Self;
9607
9608        #[inline(always)]
9609        fn inline_align(_context: fidl::encoding::Context) -> usize {
9610            8
9611        }
9612
9613        #[inline(always)]
9614        fn inline_size(_context: fidl::encoding::Context) -> usize {
9615            16
9616        }
9617    }
9618
9619    unsafe impl
9620        fidl::encoding::Encode<
9621            UnboundedNullableVectorOfHandles,
9622            fidl::encoding::DefaultFuchsiaResourceDialect,
9623        > for &mut UnboundedNullableVectorOfHandles
9624    {
9625        #[inline]
9626        unsafe fn encode(
9627            self,
9628            encoder: &mut fidl::encoding::Encoder<
9629                '_,
9630                fidl::encoding::DefaultFuchsiaResourceDialect,
9631            >,
9632            offset: usize,
9633            _depth: fidl::encoding::Depth,
9634        ) -> fidl::Result<()> {
9635            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9636            // Delegate to tuple encoding.
9637            fidl::encoding::Encode::<
9638                UnboundedNullableVectorOfHandles,
9639                fidl::encoding::DefaultFuchsiaResourceDialect,
9640            >::encode(
9641                (<fidl::encoding::Optional<
9642                    fidl::encoding::UnboundedVector<
9643                        fidl::encoding::HandleType<
9644                            fidl::Handle,
9645                            { fidl::ObjectType::NONE.into_raw() },
9646                            2147483648,
9647                        >,
9648                    >,
9649                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9650                    &mut self.vh0
9651                ),),
9652                encoder,
9653                offset,
9654                _depth,
9655            )
9656        }
9657    }
9658    unsafe impl<
9659            T0: fidl::encoding::Encode<
9660                fidl::encoding::Optional<
9661                    fidl::encoding::UnboundedVector<
9662                        fidl::encoding::HandleType<
9663                            fidl::Handle,
9664                            { fidl::ObjectType::NONE.into_raw() },
9665                            2147483648,
9666                        >,
9667                    >,
9668                >,
9669                fidl::encoding::DefaultFuchsiaResourceDialect,
9670            >,
9671        >
9672        fidl::encoding::Encode<
9673            UnboundedNullableVectorOfHandles,
9674            fidl::encoding::DefaultFuchsiaResourceDialect,
9675        > for (T0,)
9676    {
9677        #[inline]
9678        unsafe fn encode(
9679            self,
9680            encoder: &mut fidl::encoding::Encoder<
9681                '_,
9682                fidl::encoding::DefaultFuchsiaResourceDialect,
9683            >,
9684            offset: usize,
9685            depth: fidl::encoding::Depth,
9686        ) -> fidl::Result<()> {
9687            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9688            // Zero out padding regions. There's no need to apply masks
9689            // because the unmasked parts will be overwritten by fields.
9690            // Write the fields.
9691            self.0.encode(encoder, offset + 0, depth)?;
9692            Ok(())
9693        }
9694    }
9695
9696    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9697        for UnboundedNullableVectorOfHandles
9698    {
9699        #[inline(always)]
9700        fn new_empty() -> Self {
9701            Self {
9702                vh0: fidl::new_empty!(
9703                    fidl::encoding::Optional<
9704                        fidl::encoding::UnboundedVector<
9705                            fidl::encoding::HandleType<
9706                                fidl::Handle,
9707                                { fidl::ObjectType::NONE.into_raw() },
9708                                2147483648,
9709                            >,
9710                        >,
9711                    >,
9712                    fidl::encoding::DefaultFuchsiaResourceDialect
9713                ),
9714            }
9715        }
9716
9717        #[inline]
9718        unsafe fn decode(
9719            &mut self,
9720            decoder: &mut fidl::encoding::Decoder<
9721                '_,
9722                fidl::encoding::DefaultFuchsiaResourceDialect,
9723            >,
9724            offset: usize,
9725            _depth: fidl::encoding::Depth,
9726        ) -> fidl::Result<()> {
9727            decoder.debug_check_bounds::<Self>(offset);
9728            // Verify that padding bytes are zero.
9729            fidl::decode!(
9730                fidl::encoding::Optional<
9731                    fidl::encoding::UnboundedVector<
9732                        fidl::encoding::HandleType<
9733                            fidl::Handle,
9734                            { fidl::ObjectType::NONE.into_raw() },
9735                            2147483648,
9736                        >,
9737                    >,
9738                >,
9739                fidl::encoding::DefaultFuchsiaResourceDialect,
9740                &mut self.vh0,
9741                decoder,
9742                offset + 0,
9743                _depth
9744            )?;
9745            Ok(())
9746        }
9747    }
9748
9749    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpoints {
9750        type Borrowed<'a> = &'a mut Self;
9751        fn take_or_borrow<'a>(
9752            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9753        ) -> Self::Borrowed<'a> {
9754            value
9755        }
9756    }
9757
9758    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpoints {
9759        type Owned = Self;
9760
9761        #[inline(always)]
9762        fn inline_align(_context: fidl::encoding::Context) -> usize {
9763            8
9764        }
9765
9766        #[inline(always)]
9767        fn inline_size(_context: fidl::encoding::Context) -> usize {
9768            16
9769        }
9770    }
9771
9772    unsafe impl
9773        fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9774        for &mut UnionOfEndpoints
9775    {
9776        #[inline]
9777        unsafe fn encode(
9778            self,
9779            encoder: &mut fidl::encoding::Encoder<
9780                '_,
9781                fidl::encoding::DefaultFuchsiaResourceDialect,
9782            >,
9783            offset: usize,
9784            _depth: fidl::encoding::Depth,
9785        ) -> fidl::Result<()> {
9786            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9787            // Delegate to tuple encoding.
9788            fidl::encoding::Encode::<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9789                (
9790                    <UnionOfEndpointsUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
9791                ),
9792                encoder, offset, _depth
9793            )
9794        }
9795    }
9796    unsafe impl<
9797            T0: fidl::encoding::Encode<
9798                UnionOfEndpointsUnion,
9799                fidl::encoding::DefaultFuchsiaResourceDialect,
9800            >,
9801        >
9802        fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9803        for (T0,)
9804    {
9805        #[inline]
9806        unsafe fn encode(
9807            self,
9808            encoder: &mut fidl::encoding::Encoder<
9809                '_,
9810                fidl::encoding::DefaultFuchsiaResourceDialect,
9811            >,
9812            offset: usize,
9813            depth: fidl::encoding::Depth,
9814        ) -> fidl::Result<()> {
9815            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9816            // Zero out padding regions. There's no need to apply masks
9817            // because the unmasked parts will be overwritten by fields.
9818            // Write the fields.
9819            self.0.encode(encoder, offset + 0, depth)?;
9820            Ok(())
9821        }
9822    }
9823
9824    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9825        for UnionOfEndpoints
9826    {
9827        #[inline(always)]
9828        fn new_empty() -> Self {
9829            Self {
9830                u: fidl::new_empty!(
9831                    UnionOfEndpointsUnion,
9832                    fidl::encoding::DefaultFuchsiaResourceDialect
9833                ),
9834            }
9835        }
9836
9837        #[inline]
9838        unsafe fn decode(
9839            &mut self,
9840            decoder: &mut fidl::encoding::Decoder<
9841                '_,
9842                fidl::encoding::DefaultFuchsiaResourceDialect,
9843            >,
9844            offset: usize,
9845            _depth: fidl::encoding::Depth,
9846        ) -> fidl::Result<()> {
9847            decoder.debug_check_bounds::<Self>(offset);
9848            // Verify that padding bytes are zero.
9849            fidl::decode!(
9850                UnionOfEndpointsUnion,
9851                fidl::encoding::DefaultFuchsiaResourceDialect,
9852                &mut self.u,
9853                decoder,
9854                offset + 0,
9855                _depth
9856            )?;
9857            Ok(())
9858        }
9859    }
9860
9861    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9862        type Borrowed<'a> = &'a mut Self;
9863        fn take_or_borrow<'a>(
9864            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9865        ) -> Self::Borrowed<'a> {
9866            value
9867        }
9868    }
9869
9870    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9871        type Owned = Self;
9872
9873        #[inline(always)]
9874        fn inline_align(_context: fidl::encoding::Context) -> usize {
9875            8
9876        }
9877
9878        #[inline(always)]
9879        fn inline_size(_context: fidl::encoding::Context) -> usize {
9880            16
9881        }
9882    }
9883
9884    unsafe impl
9885        fidl::encoding::Encode<
9886            VectorOfArrayOfEventInStructWithDefaultRights,
9887            fidl::encoding::DefaultFuchsiaResourceDialect,
9888        > for &mut VectorOfArrayOfEventInStructWithDefaultRights
9889    {
9890        #[inline]
9891        unsafe fn encode(
9892            self,
9893            encoder: &mut fidl::encoding::Encoder<
9894                '_,
9895                fidl::encoding::DefaultFuchsiaResourceDialect,
9896            >,
9897            offset: usize,
9898            _depth: fidl::encoding::Depth,
9899        ) -> fidl::Result<()> {
9900            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9901            // Delegate to tuple encoding.
9902            fidl::encoding::Encode::<
9903                VectorOfArrayOfEventInStructWithDefaultRights,
9904                fidl::encoding::DefaultFuchsiaResourceDialect,
9905            >::encode(
9906                (<fidl::encoding::Vector<
9907                    fidl::encoding::Array<
9908                        fidl::encoding::HandleType<
9909                            fidl::Event,
9910                            { fidl::ObjectType::EVENT.into_raw() },
9911                            53251,
9912                        >,
9913                        1,
9914                    >,
9915                    1,
9916                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9917                    &mut self.h
9918                ),),
9919                encoder,
9920                offset,
9921                _depth,
9922            )
9923        }
9924    }
9925    unsafe impl<
9926            T0: fidl::encoding::Encode<
9927                fidl::encoding::Vector<
9928                    fidl::encoding::Array<
9929                        fidl::encoding::HandleType<
9930                            fidl::Event,
9931                            { fidl::ObjectType::EVENT.into_raw() },
9932                            53251,
9933                        >,
9934                        1,
9935                    >,
9936                    1,
9937                >,
9938                fidl::encoding::DefaultFuchsiaResourceDialect,
9939            >,
9940        >
9941        fidl::encoding::Encode<
9942            VectorOfArrayOfEventInStructWithDefaultRights,
9943            fidl::encoding::DefaultFuchsiaResourceDialect,
9944        > for (T0,)
9945    {
9946        #[inline]
9947        unsafe fn encode(
9948            self,
9949            encoder: &mut fidl::encoding::Encoder<
9950                '_,
9951                fidl::encoding::DefaultFuchsiaResourceDialect,
9952            >,
9953            offset: usize,
9954            depth: fidl::encoding::Depth,
9955        ) -> fidl::Result<()> {
9956            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9957            // Zero out padding regions. There's no need to apply masks
9958            // because the unmasked parts will be overwritten by fields.
9959            // Write the fields.
9960            self.0.encode(encoder, offset + 0, depth)?;
9961            Ok(())
9962        }
9963    }
9964
9965    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9966        for VectorOfArrayOfEventInStructWithDefaultRights
9967    {
9968        #[inline(always)]
9969        fn new_empty() -> Self {
9970            Self {
9971                h: fidl::new_empty!(
9972                    fidl::encoding::Vector<
9973                        fidl::encoding::Array<
9974                            fidl::encoding::HandleType<
9975                                fidl::Event,
9976                                { fidl::ObjectType::EVENT.into_raw() },
9977                                53251,
9978                            >,
9979                            1,
9980                        >,
9981                        1,
9982                    >,
9983                    fidl::encoding::DefaultFuchsiaResourceDialect
9984                ),
9985            }
9986        }
9987
9988        #[inline]
9989        unsafe fn decode(
9990            &mut self,
9991            decoder: &mut fidl::encoding::Decoder<
9992                '_,
9993                fidl::encoding::DefaultFuchsiaResourceDialect,
9994            >,
9995            offset: usize,
9996            _depth: fidl::encoding::Depth,
9997        ) -> fidl::Result<()> {
9998            decoder.debug_check_bounds::<Self>(offset);
9999            // Verify that padding bytes are zero.
10000            fidl::decode!(
10001                fidl::encoding::Vector<
10002                    fidl::encoding::Array<
10003                        fidl::encoding::HandleType<
10004                            fidl::Event,
10005                            { fidl::ObjectType::EVENT.into_raw() },
10006                            53251,
10007                        >,
10008                        1,
10009                    >,
10010                    1,
10011                >,
10012                fidl::encoding::DefaultFuchsiaResourceDialect,
10013                &mut self.h,
10014                decoder,
10015                offset + 0,
10016                _depth
10017            )?;
10018            Ok(())
10019        }
10020    }
10021
10022    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10023        type Borrowed<'a> = &'a mut Self;
10024        fn take_or_borrow<'a>(
10025            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10026        ) -> Self::Borrowed<'a> {
10027            value
10028        }
10029    }
10030
10031    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10032        type Owned = Self;
10033
10034        #[inline(always)]
10035        fn inline_align(_context: fidl::encoding::Context) -> usize {
10036            8
10037        }
10038
10039        #[inline(always)]
10040        fn inline_size(_context: fidl::encoding::Context) -> usize {
10041            16
10042        }
10043    }
10044
10045    unsafe impl
10046        fidl::encoding::Encode<
10047            VectorOfArrayOfEventInStructWithReducedRights,
10048            fidl::encoding::DefaultFuchsiaResourceDialect,
10049        > for &mut VectorOfArrayOfEventInStructWithReducedRights
10050    {
10051        #[inline]
10052        unsafe fn encode(
10053            self,
10054            encoder: &mut fidl::encoding::Encoder<
10055                '_,
10056                fidl::encoding::DefaultFuchsiaResourceDialect,
10057            >,
10058            offset: usize,
10059            _depth: fidl::encoding::Depth,
10060        ) -> fidl::Result<()> {
10061            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10062            // Delegate to tuple encoding.
10063            fidl::encoding::Encode::<
10064                VectorOfArrayOfEventInStructWithReducedRights,
10065                fidl::encoding::DefaultFuchsiaResourceDialect,
10066            >::encode(
10067                (<fidl::encoding::Vector<
10068                    fidl::encoding::Array<
10069                        fidl::encoding::HandleType<
10070                            fidl::Event,
10071                            { fidl::ObjectType::EVENT.into_raw() },
10072                            49155,
10073                        >,
10074                        1,
10075                    >,
10076                    1,
10077                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10078                    &mut self.h
10079                ),),
10080                encoder,
10081                offset,
10082                _depth,
10083            )
10084        }
10085    }
10086    unsafe impl<
10087            T0: fidl::encoding::Encode<
10088                fidl::encoding::Vector<
10089                    fidl::encoding::Array<
10090                        fidl::encoding::HandleType<
10091                            fidl::Event,
10092                            { fidl::ObjectType::EVENT.into_raw() },
10093                            49155,
10094                        >,
10095                        1,
10096                    >,
10097                    1,
10098                >,
10099                fidl::encoding::DefaultFuchsiaResourceDialect,
10100            >,
10101        >
10102        fidl::encoding::Encode<
10103            VectorOfArrayOfEventInStructWithReducedRights,
10104            fidl::encoding::DefaultFuchsiaResourceDialect,
10105        > for (T0,)
10106    {
10107        #[inline]
10108        unsafe fn encode(
10109            self,
10110            encoder: &mut fidl::encoding::Encoder<
10111                '_,
10112                fidl::encoding::DefaultFuchsiaResourceDialect,
10113            >,
10114            offset: usize,
10115            depth: fidl::encoding::Depth,
10116        ) -> fidl::Result<()> {
10117            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10118            // Zero out padding regions. There's no need to apply masks
10119            // because the unmasked parts will be overwritten by fields.
10120            // Write the fields.
10121            self.0.encode(encoder, offset + 0, depth)?;
10122            Ok(())
10123        }
10124    }
10125
10126    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10127        for VectorOfArrayOfEventInStructWithReducedRights
10128    {
10129        #[inline(always)]
10130        fn new_empty() -> Self {
10131            Self {
10132                h: fidl::new_empty!(
10133                    fidl::encoding::Vector<
10134                        fidl::encoding::Array<
10135                            fidl::encoding::HandleType<
10136                                fidl::Event,
10137                                { fidl::ObjectType::EVENT.into_raw() },
10138                                49155,
10139                            >,
10140                            1,
10141                        >,
10142                        1,
10143                    >,
10144                    fidl::encoding::DefaultFuchsiaResourceDialect
10145                ),
10146            }
10147        }
10148
10149        #[inline]
10150        unsafe fn decode(
10151            &mut self,
10152            decoder: &mut fidl::encoding::Decoder<
10153                '_,
10154                fidl::encoding::DefaultFuchsiaResourceDialect,
10155            >,
10156            offset: usize,
10157            _depth: fidl::encoding::Depth,
10158        ) -> fidl::Result<()> {
10159            decoder.debug_check_bounds::<Self>(offset);
10160            // Verify that padding bytes are zero.
10161            fidl::decode!(
10162                fidl::encoding::Vector<
10163                    fidl::encoding::Array<
10164                        fidl::encoding::HandleType<
10165                            fidl::Event,
10166                            { fidl::ObjectType::EVENT.into_raw() },
10167                            49155,
10168                        >,
10169                        1,
10170                    >,
10171                    1,
10172                >,
10173                fidl::encoding::DefaultFuchsiaResourceDialect,
10174                &mut self.h,
10175                decoder,
10176                offset + 0,
10177                _depth
10178            )?;
10179            Ok(())
10180        }
10181    }
10182
10183    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10184        type Borrowed<'a> = &'a mut Self;
10185        fn take_or_borrow<'a>(
10186            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10187        ) -> Self::Borrowed<'a> {
10188            value
10189        }
10190    }
10191
10192    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10193        type Owned = Self;
10194
10195        #[inline(always)]
10196        fn inline_align(_context: fidl::encoding::Context) -> usize {
10197            8
10198        }
10199
10200        #[inline(always)]
10201        fn inline_size(_context: fidl::encoding::Context) -> usize {
10202            16
10203        }
10204    }
10205
10206    unsafe impl
10207        fidl::encoding::Encode<
10208            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10209            fidl::encoding::DefaultFuchsiaResourceDialect,
10210        > for &mut VectorOfArrayOfEventInTableWithReducedRightsStruct
10211    {
10212        #[inline]
10213        unsafe fn encode(
10214            self,
10215            encoder: &mut fidl::encoding::Encoder<
10216                '_,
10217                fidl::encoding::DefaultFuchsiaResourceDialect,
10218            >,
10219            offset: usize,
10220            _depth: fidl::encoding::Depth,
10221        ) -> fidl::Result<()> {
10222            encoder
10223                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10224            // Delegate to tuple encoding.
10225            fidl::encoding::Encode::<VectorOfArrayOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10226                (
10227                    <VectorOfArrayOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
10228                ),
10229                encoder, offset, _depth
10230            )
10231        }
10232    }
10233    unsafe impl<
10234            T0: fidl::encoding::Encode<
10235                VectorOfArrayOfEventInTableWithReducedRights,
10236                fidl::encoding::DefaultFuchsiaResourceDialect,
10237            >,
10238        >
10239        fidl::encoding::Encode<
10240            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10241            fidl::encoding::DefaultFuchsiaResourceDialect,
10242        > for (T0,)
10243    {
10244        #[inline]
10245        unsafe fn encode(
10246            self,
10247            encoder: &mut fidl::encoding::Encoder<
10248                '_,
10249                fidl::encoding::DefaultFuchsiaResourceDialect,
10250            >,
10251            offset: usize,
10252            depth: fidl::encoding::Depth,
10253        ) -> fidl::Result<()> {
10254            encoder
10255                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10256            // Zero out padding regions. There's no need to apply masks
10257            // because the unmasked parts will be overwritten by fields.
10258            // Write the fields.
10259            self.0.encode(encoder, offset + 0, depth)?;
10260            Ok(())
10261        }
10262    }
10263
10264    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10265        for VectorOfArrayOfEventInTableWithReducedRightsStruct
10266    {
10267        #[inline(always)]
10268        fn new_empty() -> Self {
10269            Self {
10270                t: fidl::new_empty!(
10271                    VectorOfArrayOfEventInTableWithReducedRights,
10272                    fidl::encoding::DefaultFuchsiaResourceDialect
10273                ),
10274            }
10275        }
10276
10277        #[inline]
10278        unsafe fn decode(
10279            &mut self,
10280            decoder: &mut fidl::encoding::Decoder<
10281                '_,
10282                fidl::encoding::DefaultFuchsiaResourceDialect,
10283            >,
10284            offset: usize,
10285            _depth: fidl::encoding::Depth,
10286        ) -> fidl::Result<()> {
10287            decoder.debug_check_bounds::<Self>(offset);
10288            // Verify that padding bytes are zero.
10289            fidl::decode!(
10290                VectorOfArrayOfEventInTableWithReducedRights,
10291                fidl::encoding::DefaultFuchsiaResourceDialect,
10292                &mut self.t,
10293                decoder,
10294                offset + 0,
10295                _depth
10296            )?;
10297            Ok(())
10298        }
10299    }
10300
10301    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10302        type Borrowed<'a> = &'a mut Self;
10303        fn take_or_borrow<'a>(
10304            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10305        ) -> Self::Borrowed<'a> {
10306            value
10307        }
10308    }
10309
10310    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10311        type Owned = Self;
10312
10313        #[inline(always)]
10314        fn inline_align(_context: fidl::encoding::Context) -> usize {
10315            8
10316        }
10317
10318        #[inline(always)]
10319        fn inline_size(_context: fidl::encoding::Context) -> usize {
10320            16
10321        }
10322    }
10323
10324    unsafe impl
10325        fidl::encoding::Encode<
10326            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10327            fidl::encoding::DefaultFuchsiaResourceDialect,
10328        > for &mut VectorOfArrayOfEventInUnionWithReducedRightsStruct
10329    {
10330        #[inline]
10331        unsafe fn encode(
10332            self,
10333            encoder: &mut fidl::encoding::Encoder<
10334                '_,
10335                fidl::encoding::DefaultFuchsiaResourceDialect,
10336            >,
10337            offset: usize,
10338            _depth: fidl::encoding::Depth,
10339        ) -> fidl::Result<()> {
10340            encoder
10341                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10342            // Delegate to tuple encoding.
10343            fidl::encoding::Encode::<VectorOfArrayOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10344                (
10345                    <VectorOfArrayOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10346                ),
10347                encoder, offset, _depth
10348            )
10349        }
10350    }
10351    unsafe impl<
10352            T0: fidl::encoding::Encode<
10353                VectorOfArrayOfEventInUnionWithReducedRights,
10354                fidl::encoding::DefaultFuchsiaResourceDialect,
10355            >,
10356        >
10357        fidl::encoding::Encode<
10358            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10359            fidl::encoding::DefaultFuchsiaResourceDialect,
10360        > for (T0,)
10361    {
10362        #[inline]
10363        unsafe fn encode(
10364            self,
10365            encoder: &mut fidl::encoding::Encoder<
10366                '_,
10367                fidl::encoding::DefaultFuchsiaResourceDialect,
10368            >,
10369            offset: usize,
10370            depth: fidl::encoding::Depth,
10371        ) -> fidl::Result<()> {
10372            encoder
10373                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10374            // Zero out padding regions. There's no need to apply masks
10375            // because the unmasked parts will be overwritten by fields.
10376            // Write the fields.
10377            self.0.encode(encoder, offset + 0, depth)?;
10378            Ok(())
10379        }
10380    }
10381
10382    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10383        for VectorOfArrayOfEventInUnionWithReducedRightsStruct
10384    {
10385        #[inline(always)]
10386        fn new_empty() -> Self {
10387            Self {
10388                u: fidl::new_empty!(
10389                    VectorOfArrayOfEventInUnionWithReducedRights,
10390                    fidl::encoding::DefaultFuchsiaResourceDialect
10391                ),
10392            }
10393        }
10394
10395        #[inline]
10396        unsafe fn decode(
10397            &mut self,
10398            decoder: &mut fidl::encoding::Decoder<
10399                '_,
10400                fidl::encoding::DefaultFuchsiaResourceDialect,
10401            >,
10402            offset: usize,
10403            _depth: fidl::encoding::Depth,
10404        ) -> fidl::Result<()> {
10405            decoder.debug_check_bounds::<Self>(offset);
10406            // Verify that padding bytes are zero.
10407            fidl::decode!(
10408                VectorOfArrayOfEventInUnionWithReducedRights,
10409                fidl::encoding::DefaultFuchsiaResourceDialect,
10410                &mut self.u,
10411                decoder,
10412                offset + 0,
10413                _depth
10414            )?;
10415            Ok(())
10416        }
10417    }
10418
10419    impl fidl::encoding::ResourceTypeMarker for VectorOfHandles {
10420        type Borrowed<'a> = &'a mut Self;
10421        fn take_or_borrow<'a>(
10422            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10423        ) -> Self::Borrowed<'a> {
10424            value
10425        }
10426    }
10427
10428    unsafe impl fidl::encoding::TypeMarker for VectorOfHandles {
10429        type Owned = Self;
10430
10431        #[inline(always)]
10432        fn inline_align(_context: fidl::encoding::Context) -> usize {
10433            8
10434        }
10435
10436        #[inline(always)]
10437        fn inline_size(_context: fidl::encoding::Context) -> usize {
10438            16
10439        }
10440    }
10441
10442    unsafe impl
10443        fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10444        for &mut VectorOfHandles
10445    {
10446        #[inline]
10447        unsafe fn encode(
10448            self,
10449            encoder: &mut fidl::encoding::Encoder<
10450                '_,
10451                fidl::encoding::DefaultFuchsiaResourceDialect,
10452            >,
10453            offset: usize,
10454            _depth: fidl::encoding::Depth,
10455        ) -> fidl::Result<()> {
10456            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10457            // Delegate to tuple encoding.
10458            fidl::encoding::Encode::<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10459                (
10460                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.v),
10461                ),
10462                encoder, offset, _depth
10463            )
10464        }
10465    }
10466    unsafe impl<
10467            T0: fidl::encoding::Encode<
10468                fidl::encoding::UnboundedVector<
10469                    fidl::encoding::HandleType<
10470                        fidl::Handle,
10471                        { fidl::ObjectType::NONE.into_raw() },
10472                        2147483648,
10473                    >,
10474                >,
10475                fidl::encoding::DefaultFuchsiaResourceDialect,
10476            >,
10477        > fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10478        for (T0,)
10479    {
10480        #[inline]
10481        unsafe fn encode(
10482            self,
10483            encoder: &mut fidl::encoding::Encoder<
10484                '_,
10485                fidl::encoding::DefaultFuchsiaResourceDialect,
10486            >,
10487            offset: usize,
10488            depth: fidl::encoding::Depth,
10489        ) -> fidl::Result<()> {
10490            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10491            // Zero out padding regions. There's no need to apply masks
10492            // because the unmasked parts will be overwritten by fields.
10493            // Write the fields.
10494            self.0.encode(encoder, offset + 0, depth)?;
10495            Ok(())
10496        }
10497    }
10498
10499    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10500        for VectorOfHandles
10501    {
10502        #[inline(always)]
10503        fn new_empty() -> Self {
10504            Self {
10505                v: fidl::new_empty!(
10506                    fidl::encoding::UnboundedVector<
10507                        fidl::encoding::HandleType<
10508                            fidl::Handle,
10509                            { fidl::ObjectType::NONE.into_raw() },
10510                            2147483648,
10511                        >,
10512                    >,
10513                    fidl::encoding::DefaultFuchsiaResourceDialect
10514                ),
10515            }
10516        }
10517
10518        #[inline]
10519        unsafe fn decode(
10520            &mut self,
10521            decoder: &mut fidl::encoding::Decoder<
10522                '_,
10523                fidl::encoding::DefaultFuchsiaResourceDialect,
10524            >,
10525            offset: usize,
10526            _depth: fidl::encoding::Depth,
10527        ) -> fidl::Result<()> {
10528            decoder.debug_check_bounds::<Self>(offset);
10529            // Verify that padding bytes are zero.
10530            fidl::decode!(
10531                fidl::encoding::UnboundedVector<
10532                    fidl::encoding::HandleType<
10533                        fidl::Handle,
10534                        { fidl::ObjectType::NONE.into_raw() },
10535                        2147483648,
10536                    >,
10537                >,
10538                fidl::encoding::DefaultFuchsiaResourceDialect,
10539                &mut self.v,
10540                decoder,
10541                offset + 0,
10542                _depth
10543            )?;
10544            Ok(())
10545        }
10546    }
10547
10548    impl fidl::encoding::ResourceTypeMarker for VectorOfOptionalHandles {
10549        type Borrowed<'a> = &'a mut Self;
10550        fn take_or_borrow<'a>(
10551            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10552        ) -> Self::Borrowed<'a> {
10553            value
10554        }
10555    }
10556
10557    unsafe impl fidl::encoding::TypeMarker for VectorOfOptionalHandles {
10558        type Owned = Self;
10559
10560        #[inline(always)]
10561        fn inline_align(_context: fidl::encoding::Context) -> usize {
10562            8
10563        }
10564
10565        #[inline(always)]
10566        fn inline_size(_context: fidl::encoding::Context) -> usize {
10567            16
10568        }
10569    }
10570
10571    unsafe impl
10572        fidl::encoding::Encode<
10573            VectorOfOptionalHandles,
10574            fidl::encoding::DefaultFuchsiaResourceDialect,
10575        > for &mut VectorOfOptionalHandles
10576    {
10577        #[inline]
10578        unsafe fn encode(
10579            self,
10580            encoder: &mut fidl::encoding::Encoder<
10581                '_,
10582                fidl::encoding::DefaultFuchsiaResourceDialect,
10583            >,
10584            offset: usize,
10585            _depth: fidl::encoding::Depth,
10586        ) -> fidl::Result<()> {
10587            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10588            // Delegate to tuple encoding.
10589            fidl::encoding::Encode::<
10590                VectorOfOptionalHandles,
10591                fidl::encoding::DefaultFuchsiaResourceDialect,
10592            >::encode(
10593                (<fidl::encoding::UnboundedVector<
10594                    fidl::encoding::Optional<
10595                        fidl::encoding::HandleType<
10596                            fidl::Handle,
10597                            { fidl::ObjectType::NONE.into_raw() },
10598                            2147483648,
10599                        >,
10600                    >,
10601                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10602                    &mut self.v
10603                ),),
10604                encoder,
10605                offset,
10606                _depth,
10607            )
10608        }
10609    }
10610    unsafe impl<
10611            T0: fidl::encoding::Encode<
10612                fidl::encoding::UnboundedVector<
10613                    fidl::encoding::Optional<
10614                        fidl::encoding::HandleType<
10615                            fidl::Handle,
10616                            { fidl::ObjectType::NONE.into_raw() },
10617                            2147483648,
10618                        >,
10619                    >,
10620                >,
10621                fidl::encoding::DefaultFuchsiaResourceDialect,
10622            >,
10623        >
10624        fidl::encoding::Encode<
10625            VectorOfOptionalHandles,
10626            fidl::encoding::DefaultFuchsiaResourceDialect,
10627        > for (T0,)
10628    {
10629        #[inline]
10630        unsafe fn encode(
10631            self,
10632            encoder: &mut fidl::encoding::Encoder<
10633                '_,
10634                fidl::encoding::DefaultFuchsiaResourceDialect,
10635            >,
10636            offset: usize,
10637            depth: fidl::encoding::Depth,
10638        ) -> fidl::Result<()> {
10639            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10640            // Zero out padding regions. There's no need to apply masks
10641            // because the unmasked parts will be overwritten by fields.
10642            // Write the fields.
10643            self.0.encode(encoder, offset + 0, depth)?;
10644            Ok(())
10645        }
10646    }
10647
10648    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10649        for VectorOfOptionalHandles
10650    {
10651        #[inline(always)]
10652        fn new_empty() -> Self {
10653            Self {
10654                v: fidl::new_empty!(
10655                    fidl::encoding::UnboundedVector<
10656                        fidl::encoding::Optional<
10657                            fidl::encoding::HandleType<
10658                                fidl::Handle,
10659                                { fidl::ObjectType::NONE.into_raw() },
10660                                2147483648,
10661                            >,
10662                        >,
10663                    >,
10664                    fidl::encoding::DefaultFuchsiaResourceDialect
10665                ),
10666            }
10667        }
10668
10669        #[inline]
10670        unsafe fn decode(
10671            &mut self,
10672            decoder: &mut fidl::encoding::Decoder<
10673                '_,
10674                fidl::encoding::DefaultFuchsiaResourceDialect,
10675            >,
10676            offset: usize,
10677            _depth: fidl::encoding::Depth,
10678        ) -> fidl::Result<()> {
10679            decoder.debug_check_bounds::<Self>(offset);
10680            // Verify that padding bytes are zero.
10681            fidl::decode!(
10682                fidl::encoding::UnboundedVector<
10683                    fidl::encoding::Optional<
10684                        fidl::encoding::HandleType<
10685                            fidl::Handle,
10686                            { fidl::ObjectType::NONE.into_raw() },
10687                            2147483648,
10688                        >,
10689                    >,
10690                >,
10691                fidl::encoding::DefaultFuchsiaResourceDialect,
10692                &mut self.v,
10693                decoder,
10694                offset + 0,
10695                _depth
10696            )?;
10697            Ok(())
10698        }
10699    }
10700
10701    impl fidl::encoding::ResourceTypeMarker for VectorOfUpTo2Handles {
10702        type Borrowed<'a> = &'a mut Self;
10703        fn take_or_borrow<'a>(
10704            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10705        ) -> Self::Borrowed<'a> {
10706            value
10707        }
10708    }
10709
10710    unsafe impl fidl::encoding::TypeMarker for VectorOfUpTo2Handles {
10711        type Owned = Self;
10712
10713        #[inline(always)]
10714        fn inline_align(_context: fidl::encoding::Context) -> usize {
10715            8
10716        }
10717
10718        #[inline(always)]
10719        fn inline_size(_context: fidl::encoding::Context) -> usize {
10720            16
10721        }
10722    }
10723
10724    unsafe impl
10725        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10726        for &mut VectorOfUpTo2Handles
10727    {
10728        #[inline]
10729        unsafe fn encode(
10730            self,
10731            encoder: &mut fidl::encoding::Encoder<
10732                '_,
10733                fidl::encoding::DefaultFuchsiaResourceDialect,
10734            >,
10735            offset: usize,
10736            _depth: fidl::encoding::Depth,
10737        ) -> fidl::Result<()> {
10738            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10739            // Delegate to tuple encoding.
10740            fidl::encoding::Encode::<
10741                VectorOfUpTo2Handles,
10742                fidl::encoding::DefaultFuchsiaResourceDialect,
10743            >::encode(
10744                (<fidl::encoding::Vector<
10745                    fidl::encoding::HandleType<
10746                        fidl::Handle,
10747                        { fidl::ObjectType::NONE.into_raw() },
10748                        2147483648,
10749                    >,
10750                    2,
10751                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10752                    &mut self.v
10753                ),),
10754                encoder,
10755                offset,
10756                _depth,
10757            )
10758        }
10759    }
10760    unsafe impl<
10761            T0: fidl::encoding::Encode<
10762                fidl::encoding::Vector<
10763                    fidl::encoding::HandleType<
10764                        fidl::Handle,
10765                        { fidl::ObjectType::NONE.into_raw() },
10766                        2147483648,
10767                    >,
10768                    2,
10769                >,
10770                fidl::encoding::DefaultFuchsiaResourceDialect,
10771            >,
10772        >
10773        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10774        for (T0,)
10775    {
10776        #[inline]
10777        unsafe fn encode(
10778            self,
10779            encoder: &mut fidl::encoding::Encoder<
10780                '_,
10781                fidl::encoding::DefaultFuchsiaResourceDialect,
10782            >,
10783            offset: usize,
10784            depth: fidl::encoding::Depth,
10785        ) -> fidl::Result<()> {
10786            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10787            // Zero out padding regions. There's no need to apply masks
10788            // because the unmasked parts will be overwritten by fields.
10789            // Write the fields.
10790            self.0.encode(encoder, offset + 0, depth)?;
10791            Ok(())
10792        }
10793    }
10794
10795    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10796        for VectorOfUpTo2Handles
10797    {
10798        #[inline(always)]
10799        fn new_empty() -> Self {
10800            Self {
10801                v: fidl::new_empty!(
10802                    fidl::encoding::Vector<
10803                        fidl::encoding::HandleType<
10804                            fidl::Handle,
10805                            { fidl::ObjectType::NONE.into_raw() },
10806                            2147483648,
10807                        >,
10808                        2,
10809                    >,
10810                    fidl::encoding::DefaultFuchsiaResourceDialect
10811                ),
10812            }
10813        }
10814
10815        #[inline]
10816        unsafe fn decode(
10817            &mut self,
10818            decoder: &mut fidl::encoding::Decoder<
10819                '_,
10820                fidl::encoding::DefaultFuchsiaResourceDialect,
10821            >,
10822            offset: usize,
10823            _depth: fidl::encoding::Depth,
10824        ) -> fidl::Result<()> {
10825            decoder.debug_check_bounds::<Self>(offset);
10826            // Verify that padding bytes are zero.
10827            fidl::decode!(
10828                fidl::encoding::Vector<
10829                    fidl::encoding::HandleType<
10830                        fidl::Handle,
10831                        { fidl::ObjectType::NONE.into_raw() },
10832                        2147483648,
10833                    >,
10834                    2,
10835                >,
10836                fidl::encoding::DefaultFuchsiaResourceDialect,
10837                &mut self.v,
10838                decoder,
10839                offset + 0,
10840                _depth
10841            )?;
10842            Ok(())
10843        }
10844    }
10845
10846    impl ArrayOfVectorOfEventInTableWithDefaultRights {
10847        #[inline(always)]
10848        fn max_ordinal_present(&self) -> u64 {
10849            if let Some(_) = self.h {
10850                return 1;
10851            }
10852            0
10853        }
10854    }
10855
10856    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10857        type Borrowed<'a> = &'a mut Self;
10858        fn take_or_borrow<'a>(
10859            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10860        ) -> Self::Borrowed<'a> {
10861            value
10862        }
10863    }
10864
10865    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10866        type Owned = Self;
10867
10868        #[inline(always)]
10869        fn inline_align(_context: fidl::encoding::Context) -> usize {
10870            8
10871        }
10872
10873        #[inline(always)]
10874        fn inline_size(_context: fidl::encoding::Context) -> usize {
10875            16
10876        }
10877    }
10878
10879    unsafe impl
10880        fidl::encoding::Encode<
10881            ArrayOfVectorOfEventInTableWithDefaultRights,
10882            fidl::encoding::DefaultFuchsiaResourceDialect,
10883        > for &mut ArrayOfVectorOfEventInTableWithDefaultRights
10884    {
10885        unsafe fn encode(
10886            self,
10887            encoder: &mut fidl::encoding::Encoder<
10888                '_,
10889                fidl::encoding::DefaultFuchsiaResourceDialect,
10890            >,
10891            offset: usize,
10892            mut depth: fidl::encoding::Depth,
10893        ) -> fidl::Result<()> {
10894            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRights>(offset);
10895            // Vector header
10896            let max_ordinal: u64 = self.max_ordinal_present();
10897            encoder.write_num(max_ordinal, offset);
10898            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10899            // Calling encoder.out_of_line_offset(0) is not allowed.
10900            if max_ordinal == 0 {
10901                return Ok(());
10902            }
10903            depth.increment()?;
10904            let envelope_size = 8;
10905            let bytes_len = max_ordinal as usize * envelope_size;
10906            #[allow(unused_variables)]
10907            let offset = encoder.out_of_line_offset(bytes_len);
10908            let mut _prev_end_offset: usize = 0;
10909            if 1 > max_ordinal {
10910                return Ok(());
10911            }
10912
10913            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10914            // are envelope_size bytes.
10915            let cur_offset: usize = (1 - 1) * envelope_size;
10916
10917            // Zero reserved fields.
10918            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10919
10920            // Safety:
10921            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10922            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10923            //   envelope_size bytes, there is always sufficient room.
10924            fidl::encoding::encode_in_envelope_optional::<
10925                fidl::encoding::Array<
10926                    fidl::encoding::Vector<
10927                        fidl::encoding::HandleType<
10928                            fidl::Event,
10929                            { fidl::ObjectType::EVENT.into_raw() },
10930                            53251,
10931                        >,
10932                        1,
10933                    >,
10934                    1,
10935                >,
10936                fidl::encoding::DefaultFuchsiaResourceDialect,
10937            >(
10938                self.h.as_mut().map(
10939                    <fidl::encoding::Array<
10940                        fidl::encoding::Vector<
10941                            fidl::encoding::HandleType<
10942                                fidl::Event,
10943                                { fidl::ObjectType::EVENT.into_raw() },
10944                                53251,
10945                            >,
10946                            1,
10947                        >,
10948                        1,
10949                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10950                ),
10951                encoder,
10952                offset + cur_offset,
10953                depth,
10954            )?;
10955
10956            _prev_end_offset = cur_offset + envelope_size;
10957
10958            Ok(())
10959        }
10960    }
10961
10962    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10963        for ArrayOfVectorOfEventInTableWithDefaultRights
10964    {
10965        #[inline(always)]
10966        fn new_empty() -> Self {
10967            Self::default()
10968        }
10969
10970        unsafe fn decode(
10971            &mut self,
10972            decoder: &mut fidl::encoding::Decoder<
10973                '_,
10974                fidl::encoding::DefaultFuchsiaResourceDialect,
10975            >,
10976            offset: usize,
10977            mut depth: fidl::encoding::Depth,
10978        ) -> fidl::Result<()> {
10979            decoder.debug_check_bounds::<Self>(offset);
10980            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10981                None => return Err(fidl::Error::NotNullable),
10982                Some(len) => len,
10983            };
10984            // Calling decoder.out_of_line_offset(0) is not allowed.
10985            if len == 0 {
10986                return Ok(());
10987            };
10988            depth.increment()?;
10989            let envelope_size = 8;
10990            let bytes_len = len * envelope_size;
10991            let offset = decoder.out_of_line_offset(bytes_len)?;
10992            // Decode the envelope for each type.
10993            let mut _next_ordinal_to_read = 0;
10994            let mut next_offset = offset;
10995            let end_offset = offset + bytes_len;
10996            _next_ordinal_to_read += 1;
10997            if next_offset >= end_offset {
10998                return Ok(());
10999            }
11000
11001            // Decode unknown envelopes for gaps in ordinals.
11002            while _next_ordinal_to_read < 1 {
11003                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11004                _next_ordinal_to_read += 1;
11005                next_offset += envelope_size;
11006            }
11007
11008            let next_out_of_line = decoder.next_out_of_line();
11009            let handles_before = decoder.remaining_handles();
11010            if let Some((inlined, num_bytes, num_handles)) =
11011                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11012            {
11013                let member_inline_size = <fidl::encoding::Array<
11014                    fidl::encoding::Vector<
11015                        fidl::encoding::HandleType<
11016                            fidl::Event,
11017                            { fidl::ObjectType::EVENT.into_raw() },
11018                            53251,
11019                        >,
11020                        1,
11021                    >,
11022                    1,
11023                > as fidl::encoding::TypeMarker>::inline_size(
11024                    decoder.context
11025                );
11026                if inlined != (member_inline_size <= 4) {
11027                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11028                }
11029                let inner_offset;
11030                let mut inner_depth = depth.clone();
11031                if inlined {
11032                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11033                    inner_offset = next_offset;
11034                } else {
11035                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11036                    inner_depth.increment()?;
11037                }
11038                let val_ref = self.h.get_or_insert_with(|| {
11039                    fidl::new_empty!(
11040                        fidl::encoding::Array<
11041                            fidl::encoding::Vector<
11042                                fidl::encoding::HandleType<
11043                                    fidl::Event,
11044                                    { fidl::ObjectType::EVENT.into_raw() },
11045                                    53251,
11046                                >,
11047                                1,
11048                            >,
11049                            1,
11050                        >,
11051                        fidl::encoding::DefaultFuchsiaResourceDialect
11052                    )
11053                });
11054                fidl::decode!(
11055                    fidl::encoding::Array<
11056                        fidl::encoding::Vector<
11057                            fidl::encoding::HandleType<
11058                                fidl::Event,
11059                                { fidl::ObjectType::EVENT.into_raw() },
11060                                53251,
11061                            >,
11062                            1,
11063                        >,
11064                        1,
11065                    >,
11066                    fidl::encoding::DefaultFuchsiaResourceDialect,
11067                    val_ref,
11068                    decoder,
11069                    inner_offset,
11070                    inner_depth
11071                )?;
11072                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11073                {
11074                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11075                }
11076                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11077                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11078                }
11079            }
11080
11081            next_offset += envelope_size;
11082
11083            // Decode the remaining unknown envelopes.
11084            while next_offset < end_offset {
11085                _next_ordinal_to_read += 1;
11086                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11087                next_offset += envelope_size;
11088            }
11089
11090            Ok(())
11091        }
11092    }
11093
11094    impl ArrayOfVectorOfEventInTableWithReducedRights {
11095        #[inline(always)]
11096        fn max_ordinal_present(&self) -> u64 {
11097            if let Some(_) = self.h {
11098                return 1;
11099            }
11100            0
11101        }
11102    }
11103
11104    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11105        type Borrowed<'a> = &'a mut Self;
11106        fn take_or_borrow<'a>(
11107            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11108        ) -> Self::Borrowed<'a> {
11109            value
11110        }
11111    }
11112
11113    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11114        type Owned = Self;
11115
11116        #[inline(always)]
11117        fn inline_align(_context: fidl::encoding::Context) -> usize {
11118            8
11119        }
11120
11121        #[inline(always)]
11122        fn inline_size(_context: fidl::encoding::Context) -> usize {
11123            16
11124        }
11125    }
11126
11127    unsafe impl
11128        fidl::encoding::Encode<
11129            ArrayOfVectorOfEventInTableWithReducedRights,
11130            fidl::encoding::DefaultFuchsiaResourceDialect,
11131        > for &mut ArrayOfVectorOfEventInTableWithReducedRights
11132    {
11133        unsafe fn encode(
11134            self,
11135            encoder: &mut fidl::encoding::Encoder<
11136                '_,
11137                fidl::encoding::DefaultFuchsiaResourceDialect,
11138            >,
11139            offset: usize,
11140            mut depth: fidl::encoding::Depth,
11141        ) -> fidl::Result<()> {
11142            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRights>(offset);
11143            // Vector header
11144            let max_ordinal: u64 = self.max_ordinal_present();
11145            encoder.write_num(max_ordinal, offset);
11146            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11147            // Calling encoder.out_of_line_offset(0) is not allowed.
11148            if max_ordinal == 0 {
11149                return Ok(());
11150            }
11151            depth.increment()?;
11152            let envelope_size = 8;
11153            let bytes_len = max_ordinal as usize * envelope_size;
11154            #[allow(unused_variables)]
11155            let offset = encoder.out_of_line_offset(bytes_len);
11156            let mut _prev_end_offset: usize = 0;
11157            if 1 > max_ordinal {
11158                return Ok(());
11159            }
11160
11161            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11162            // are envelope_size bytes.
11163            let cur_offset: usize = (1 - 1) * envelope_size;
11164
11165            // Zero reserved fields.
11166            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11167
11168            // Safety:
11169            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11170            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11171            //   envelope_size bytes, there is always sufficient room.
11172            fidl::encoding::encode_in_envelope_optional::<
11173                fidl::encoding::Array<
11174                    fidl::encoding::Vector<
11175                        fidl::encoding::HandleType<
11176                            fidl::Event,
11177                            { fidl::ObjectType::EVENT.into_raw() },
11178                            49155,
11179                        >,
11180                        1,
11181                    >,
11182                    1,
11183                >,
11184                fidl::encoding::DefaultFuchsiaResourceDialect,
11185            >(
11186                self.h.as_mut().map(
11187                    <fidl::encoding::Array<
11188                        fidl::encoding::Vector<
11189                            fidl::encoding::HandleType<
11190                                fidl::Event,
11191                                { fidl::ObjectType::EVENT.into_raw() },
11192                                49155,
11193                            >,
11194                            1,
11195                        >,
11196                        1,
11197                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11198                ),
11199                encoder,
11200                offset + cur_offset,
11201                depth,
11202            )?;
11203
11204            _prev_end_offset = cur_offset + envelope_size;
11205
11206            Ok(())
11207        }
11208    }
11209
11210    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11211        for ArrayOfVectorOfEventInTableWithReducedRights
11212    {
11213        #[inline(always)]
11214        fn new_empty() -> Self {
11215            Self::default()
11216        }
11217
11218        unsafe fn decode(
11219            &mut self,
11220            decoder: &mut fidl::encoding::Decoder<
11221                '_,
11222                fidl::encoding::DefaultFuchsiaResourceDialect,
11223            >,
11224            offset: usize,
11225            mut depth: fidl::encoding::Depth,
11226        ) -> fidl::Result<()> {
11227            decoder.debug_check_bounds::<Self>(offset);
11228            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11229                None => return Err(fidl::Error::NotNullable),
11230                Some(len) => len,
11231            };
11232            // Calling decoder.out_of_line_offset(0) is not allowed.
11233            if len == 0 {
11234                return Ok(());
11235            };
11236            depth.increment()?;
11237            let envelope_size = 8;
11238            let bytes_len = len * envelope_size;
11239            let offset = decoder.out_of_line_offset(bytes_len)?;
11240            // Decode the envelope for each type.
11241            let mut _next_ordinal_to_read = 0;
11242            let mut next_offset = offset;
11243            let end_offset = offset + bytes_len;
11244            _next_ordinal_to_read += 1;
11245            if next_offset >= end_offset {
11246                return Ok(());
11247            }
11248
11249            // Decode unknown envelopes for gaps in ordinals.
11250            while _next_ordinal_to_read < 1 {
11251                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11252                _next_ordinal_to_read += 1;
11253                next_offset += envelope_size;
11254            }
11255
11256            let next_out_of_line = decoder.next_out_of_line();
11257            let handles_before = decoder.remaining_handles();
11258            if let Some((inlined, num_bytes, num_handles)) =
11259                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11260            {
11261                let member_inline_size = <fidl::encoding::Array<
11262                    fidl::encoding::Vector<
11263                        fidl::encoding::HandleType<
11264                            fidl::Event,
11265                            { fidl::ObjectType::EVENT.into_raw() },
11266                            49155,
11267                        >,
11268                        1,
11269                    >,
11270                    1,
11271                > as fidl::encoding::TypeMarker>::inline_size(
11272                    decoder.context
11273                );
11274                if inlined != (member_inline_size <= 4) {
11275                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11276                }
11277                let inner_offset;
11278                let mut inner_depth = depth.clone();
11279                if inlined {
11280                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11281                    inner_offset = next_offset;
11282                } else {
11283                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11284                    inner_depth.increment()?;
11285                }
11286                let val_ref = self.h.get_or_insert_with(|| {
11287                    fidl::new_empty!(
11288                        fidl::encoding::Array<
11289                            fidl::encoding::Vector<
11290                                fidl::encoding::HandleType<
11291                                    fidl::Event,
11292                                    { fidl::ObjectType::EVENT.into_raw() },
11293                                    49155,
11294                                >,
11295                                1,
11296                            >,
11297                            1,
11298                        >,
11299                        fidl::encoding::DefaultFuchsiaResourceDialect
11300                    )
11301                });
11302                fidl::decode!(
11303                    fidl::encoding::Array<
11304                        fidl::encoding::Vector<
11305                            fidl::encoding::HandleType<
11306                                fidl::Event,
11307                                { fidl::ObjectType::EVENT.into_raw() },
11308                                49155,
11309                            >,
11310                            1,
11311                        >,
11312                        1,
11313                    >,
11314                    fidl::encoding::DefaultFuchsiaResourceDialect,
11315                    val_ref,
11316                    decoder,
11317                    inner_offset,
11318                    inner_depth
11319                )?;
11320                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11321                {
11322                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11323                }
11324                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11325                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11326                }
11327            }
11328
11329            next_offset += envelope_size;
11330
11331            // Decode the remaining unknown envelopes.
11332            while next_offset < end_offset {
11333                _next_ordinal_to_read += 1;
11334                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11335                next_offset += envelope_size;
11336            }
11337
11338            Ok(())
11339        }
11340    }
11341
11342    impl EmptyResourceTable {
11343        #[inline(always)]
11344        fn max_ordinal_present(&self) -> u64 {
11345            0
11346        }
11347    }
11348
11349    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTable {
11350        type Borrowed<'a> = &'a mut Self;
11351        fn take_or_borrow<'a>(
11352            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11353        ) -> Self::Borrowed<'a> {
11354            value
11355        }
11356    }
11357
11358    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTable {
11359        type Owned = Self;
11360
11361        #[inline(always)]
11362        fn inline_align(_context: fidl::encoding::Context) -> usize {
11363            8
11364        }
11365
11366        #[inline(always)]
11367        fn inline_size(_context: fidl::encoding::Context) -> usize {
11368            16
11369        }
11370    }
11371
11372    unsafe impl
11373        fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11374        for &mut EmptyResourceTable
11375    {
11376        unsafe fn encode(
11377            self,
11378            encoder: &mut fidl::encoding::Encoder<
11379                '_,
11380                fidl::encoding::DefaultFuchsiaResourceDialect,
11381            >,
11382            offset: usize,
11383            mut depth: fidl::encoding::Depth,
11384        ) -> fidl::Result<()> {
11385            encoder.debug_check_bounds::<EmptyResourceTable>(offset);
11386            // Vector header
11387            let max_ordinal: u64 = self.max_ordinal_present();
11388            encoder.write_num(max_ordinal, offset);
11389            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11390            // Calling encoder.out_of_line_offset(0) is not allowed.
11391            if max_ordinal == 0 {
11392                return Ok(());
11393            }
11394            depth.increment()?;
11395            let envelope_size = 8;
11396            let bytes_len = max_ordinal as usize * envelope_size;
11397            #[allow(unused_variables)]
11398            let offset = encoder.out_of_line_offset(bytes_len);
11399            let mut _prev_end_offset: usize = 0;
11400
11401            Ok(())
11402        }
11403    }
11404
11405    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11406        for EmptyResourceTable
11407    {
11408        #[inline(always)]
11409        fn new_empty() -> Self {
11410            Self::default()
11411        }
11412
11413        unsafe fn decode(
11414            &mut self,
11415            decoder: &mut fidl::encoding::Decoder<
11416                '_,
11417                fidl::encoding::DefaultFuchsiaResourceDialect,
11418            >,
11419            offset: usize,
11420            mut depth: fidl::encoding::Depth,
11421        ) -> fidl::Result<()> {
11422            decoder.debug_check_bounds::<Self>(offset);
11423            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11424                None => return Err(fidl::Error::NotNullable),
11425                Some(len) => len,
11426            };
11427            // Calling decoder.out_of_line_offset(0) is not allowed.
11428            if len == 0 {
11429                return Ok(());
11430            };
11431            depth.increment()?;
11432            let envelope_size = 8;
11433            let bytes_len = len * envelope_size;
11434            let offset = decoder.out_of_line_offset(bytes_len)?;
11435            // Decode the envelope for each type.
11436            let mut _next_ordinal_to_read = 0;
11437            let mut next_offset = offset;
11438            let end_offset = offset + bytes_len;
11439
11440            // Decode the remaining unknown envelopes.
11441            while next_offset < end_offset {
11442                _next_ordinal_to_read += 1;
11443                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11444                next_offset += envelope_size;
11445            }
11446
11447            Ok(())
11448        }
11449    }
11450
11451    impl SimpleResourceTable {
11452        #[inline(always)]
11453        fn max_ordinal_present(&self) -> u64 {
11454            if let Some(_) = self.y {
11455                return 5;
11456            }
11457            if let Some(_) = self.x {
11458                return 1;
11459            }
11460            0
11461        }
11462    }
11463
11464    impl fidl::encoding::ResourceTypeMarker for SimpleResourceTable {
11465        type Borrowed<'a> = &'a mut Self;
11466        fn take_or_borrow<'a>(
11467            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11468        ) -> Self::Borrowed<'a> {
11469            value
11470        }
11471    }
11472
11473    unsafe impl fidl::encoding::TypeMarker for SimpleResourceTable {
11474        type Owned = Self;
11475
11476        #[inline(always)]
11477        fn inline_align(_context: fidl::encoding::Context) -> usize {
11478            8
11479        }
11480
11481        #[inline(always)]
11482        fn inline_size(_context: fidl::encoding::Context) -> usize {
11483            16
11484        }
11485    }
11486
11487    unsafe impl
11488        fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11489        for &mut SimpleResourceTable
11490    {
11491        unsafe fn encode(
11492            self,
11493            encoder: &mut fidl::encoding::Encoder<
11494                '_,
11495                fidl::encoding::DefaultFuchsiaResourceDialect,
11496            >,
11497            offset: usize,
11498            mut depth: fidl::encoding::Depth,
11499        ) -> fidl::Result<()> {
11500            encoder.debug_check_bounds::<SimpleResourceTable>(offset);
11501            // Vector header
11502            let max_ordinal: u64 = self.max_ordinal_present();
11503            encoder.write_num(max_ordinal, offset);
11504            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11505            // Calling encoder.out_of_line_offset(0) is not allowed.
11506            if max_ordinal == 0 {
11507                return Ok(());
11508            }
11509            depth.increment()?;
11510            let envelope_size = 8;
11511            let bytes_len = max_ordinal as usize * envelope_size;
11512            #[allow(unused_variables)]
11513            let offset = encoder.out_of_line_offset(bytes_len);
11514            let mut _prev_end_offset: usize = 0;
11515            if 1 > max_ordinal {
11516                return Ok(());
11517            }
11518
11519            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11520            // are envelope_size bytes.
11521            let cur_offset: usize = (1 - 1) * envelope_size;
11522
11523            // Zero reserved fields.
11524            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11525
11526            // Safety:
11527            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11528            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11529            //   envelope_size bytes, there is always sufficient room.
11530            fidl::encoding::encode_in_envelope_optional::<
11531                i64,
11532                fidl::encoding::DefaultFuchsiaResourceDialect,
11533            >(
11534                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11535                encoder,
11536                offset + cur_offset,
11537                depth,
11538            )?;
11539
11540            _prev_end_offset = cur_offset + envelope_size;
11541            if 5 > max_ordinal {
11542                return Ok(());
11543            }
11544
11545            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11546            // are envelope_size bytes.
11547            let cur_offset: usize = (5 - 1) * envelope_size;
11548
11549            // Zero reserved fields.
11550            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11551
11552            // Safety:
11553            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11554            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11555            //   envelope_size bytes, there is always sufficient room.
11556            fidl::encoding::encode_in_envelope_optional::<
11557                i64,
11558                fidl::encoding::DefaultFuchsiaResourceDialect,
11559            >(
11560                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11561                encoder,
11562                offset + cur_offset,
11563                depth,
11564            )?;
11565
11566            _prev_end_offset = cur_offset + envelope_size;
11567
11568            Ok(())
11569        }
11570    }
11571
11572    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11573        for SimpleResourceTable
11574    {
11575        #[inline(always)]
11576        fn new_empty() -> Self {
11577            Self::default()
11578        }
11579
11580        unsafe fn decode(
11581            &mut self,
11582            decoder: &mut fidl::encoding::Decoder<
11583                '_,
11584                fidl::encoding::DefaultFuchsiaResourceDialect,
11585            >,
11586            offset: usize,
11587            mut depth: fidl::encoding::Depth,
11588        ) -> fidl::Result<()> {
11589            decoder.debug_check_bounds::<Self>(offset);
11590            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11591                None => return Err(fidl::Error::NotNullable),
11592                Some(len) => len,
11593            };
11594            // Calling decoder.out_of_line_offset(0) is not allowed.
11595            if len == 0 {
11596                return Ok(());
11597            };
11598            depth.increment()?;
11599            let envelope_size = 8;
11600            let bytes_len = len * envelope_size;
11601            let offset = decoder.out_of_line_offset(bytes_len)?;
11602            // Decode the envelope for each type.
11603            let mut _next_ordinal_to_read = 0;
11604            let mut next_offset = offset;
11605            let end_offset = offset + bytes_len;
11606            _next_ordinal_to_read += 1;
11607            if next_offset >= end_offset {
11608                return Ok(());
11609            }
11610
11611            // Decode unknown envelopes for gaps in ordinals.
11612            while _next_ordinal_to_read < 1 {
11613                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11614                _next_ordinal_to_read += 1;
11615                next_offset += envelope_size;
11616            }
11617
11618            let next_out_of_line = decoder.next_out_of_line();
11619            let handles_before = decoder.remaining_handles();
11620            if let Some((inlined, num_bytes, num_handles)) =
11621                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11622            {
11623                let member_inline_size =
11624                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11625                if inlined != (member_inline_size <= 4) {
11626                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11627                }
11628                let inner_offset;
11629                let mut inner_depth = depth.clone();
11630                if inlined {
11631                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11632                    inner_offset = next_offset;
11633                } else {
11634                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11635                    inner_depth.increment()?;
11636                }
11637                let val_ref = self.x.get_or_insert_with(|| {
11638                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11639                });
11640                fidl::decode!(
11641                    i64,
11642                    fidl::encoding::DefaultFuchsiaResourceDialect,
11643                    val_ref,
11644                    decoder,
11645                    inner_offset,
11646                    inner_depth
11647                )?;
11648                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11649                {
11650                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11651                }
11652                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11653                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11654                }
11655            }
11656
11657            next_offset += envelope_size;
11658            _next_ordinal_to_read += 1;
11659            if next_offset >= end_offset {
11660                return Ok(());
11661            }
11662
11663            // Decode unknown envelopes for gaps in ordinals.
11664            while _next_ordinal_to_read < 5 {
11665                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11666                _next_ordinal_to_read += 1;
11667                next_offset += envelope_size;
11668            }
11669
11670            let next_out_of_line = decoder.next_out_of_line();
11671            let handles_before = decoder.remaining_handles();
11672            if let Some((inlined, num_bytes, num_handles)) =
11673                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11674            {
11675                let member_inline_size =
11676                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11677                if inlined != (member_inline_size <= 4) {
11678                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11679                }
11680                let inner_offset;
11681                let mut inner_depth = depth.clone();
11682                if inlined {
11683                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11684                    inner_offset = next_offset;
11685                } else {
11686                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11687                    inner_depth.increment()?;
11688                }
11689                let val_ref = self.y.get_or_insert_with(|| {
11690                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11691                });
11692                fidl::decode!(
11693                    i64,
11694                    fidl::encoding::DefaultFuchsiaResourceDialect,
11695                    val_ref,
11696                    decoder,
11697                    inner_offset,
11698                    inner_depth
11699                )?;
11700                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11701                {
11702                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11703                }
11704                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11705                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11706                }
11707            }
11708
11709            next_offset += envelope_size;
11710
11711            // Decode the remaining unknown envelopes.
11712            while next_offset < end_offset {
11713                _next_ordinal_to_read += 1;
11714                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11715                next_offset += envelope_size;
11716            }
11717
11718            Ok(())
11719        }
11720    }
11721
11722    impl TableFieldInlinedHandle {
11723        #[inline(always)]
11724        fn max_ordinal_present(&self) -> u64 {
11725            if let Some(_) = self.f {
11726                return 1;
11727            }
11728            0
11729        }
11730    }
11731
11732    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandle {
11733        type Borrowed<'a> = &'a mut Self;
11734        fn take_or_borrow<'a>(
11735            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11736        ) -> Self::Borrowed<'a> {
11737            value
11738        }
11739    }
11740
11741    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandle {
11742        type Owned = Self;
11743
11744        #[inline(always)]
11745        fn inline_align(_context: fidl::encoding::Context) -> usize {
11746            8
11747        }
11748
11749        #[inline(always)]
11750        fn inline_size(_context: fidl::encoding::Context) -> usize {
11751            16
11752        }
11753    }
11754
11755    unsafe impl
11756        fidl::encoding::Encode<
11757            TableFieldInlinedHandle,
11758            fidl::encoding::DefaultFuchsiaResourceDialect,
11759        > for &mut TableFieldInlinedHandle
11760    {
11761        unsafe fn encode(
11762            self,
11763            encoder: &mut fidl::encoding::Encoder<
11764                '_,
11765                fidl::encoding::DefaultFuchsiaResourceDialect,
11766            >,
11767            offset: usize,
11768            mut depth: fidl::encoding::Depth,
11769        ) -> fidl::Result<()> {
11770            encoder.debug_check_bounds::<TableFieldInlinedHandle>(offset);
11771            // Vector header
11772            let max_ordinal: u64 = self.max_ordinal_present();
11773            encoder.write_num(max_ordinal, offset);
11774            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11775            // Calling encoder.out_of_line_offset(0) is not allowed.
11776            if max_ordinal == 0 {
11777                return Ok(());
11778            }
11779            depth.increment()?;
11780            let envelope_size = 8;
11781            let bytes_len = max_ordinal as usize * envelope_size;
11782            #[allow(unused_variables)]
11783            let offset = encoder.out_of_line_offset(bytes_len);
11784            let mut _prev_end_offset: usize = 0;
11785            if 1 > max_ordinal {
11786                return Ok(());
11787            }
11788
11789            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11790            // are envelope_size bytes.
11791            let cur_offset: usize = (1 - 1) * envelope_size;
11792
11793            // Zero reserved fields.
11794            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11795
11796            // Safety:
11797            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11798            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11799            //   envelope_size bytes, there is always sufficient room.
11800            fidl::encoding::encode_in_envelope_optional::<
11801                fidl::encoding::HandleType<
11802                    fidl::Channel,
11803                    { fidl::ObjectType::CHANNEL.into_raw() },
11804                    2147483648,
11805                >,
11806                fidl::encoding::DefaultFuchsiaResourceDialect,
11807            >(
11808                self.f.as_mut().map(
11809                    <fidl::encoding::HandleType<
11810                        fidl::Channel,
11811                        { fidl::ObjectType::CHANNEL.into_raw() },
11812                        2147483648,
11813                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11814                ),
11815                encoder,
11816                offset + cur_offset,
11817                depth,
11818            )?;
11819
11820            _prev_end_offset = cur_offset + envelope_size;
11821
11822            Ok(())
11823        }
11824    }
11825
11826    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11827        for TableFieldInlinedHandle
11828    {
11829        #[inline(always)]
11830        fn new_empty() -> Self {
11831            Self::default()
11832        }
11833
11834        unsafe fn decode(
11835            &mut self,
11836            decoder: &mut fidl::encoding::Decoder<
11837                '_,
11838                fidl::encoding::DefaultFuchsiaResourceDialect,
11839            >,
11840            offset: usize,
11841            mut depth: fidl::encoding::Depth,
11842        ) -> fidl::Result<()> {
11843            decoder.debug_check_bounds::<Self>(offset);
11844            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11845                None => return Err(fidl::Error::NotNullable),
11846                Some(len) => len,
11847            };
11848            // Calling decoder.out_of_line_offset(0) is not allowed.
11849            if len == 0 {
11850                return Ok(());
11851            };
11852            depth.increment()?;
11853            let envelope_size = 8;
11854            let bytes_len = len * envelope_size;
11855            let offset = decoder.out_of_line_offset(bytes_len)?;
11856            // Decode the envelope for each type.
11857            let mut _next_ordinal_to_read = 0;
11858            let mut next_offset = offset;
11859            let end_offset = offset + bytes_len;
11860            _next_ordinal_to_read += 1;
11861            if next_offset >= end_offset {
11862                return Ok(());
11863            }
11864
11865            // Decode unknown envelopes for gaps in ordinals.
11866            while _next_ordinal_to_read < 1 {
11867                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11868                _next_ordinal_to_read += 1;
11869                next_offset += envelope_size;
11870            }
11871
11872            let next_out_of_line = decoder.next_out_of_line();
11873            let handles_before = decoder.remaining_handles();
11874            if let Some((inlined, num_bytes, num_handles)) =
11875                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11876            {
11877                let member_inline_size = <fidl::encoding::HandleType<
11878                    fidl::Channel,
11879                    { fidl::ObjectType::CHANNEL.into_raw() },
11880                    2147483648,
11881                > as fidl::encoding::TypeMarker>::inline_size(
11882                    decoder.context
11883                );
11884                if inlined != (member_inline_size <= 4) {
11885                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11886                }
11887                let inner_offset;
11888                let mut inner_depth = depth.clone();
11889                if inlined {
11890                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11891                    inner_offset = next_offset;
11892                } else {
11893                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11894                    inner_depth.increment()?;
11895                }
11896                let val_ref =
11897                self.f.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
11898                fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11899                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11900                {
11901                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11902                }
11903                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11904                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11905                }
11906            }
11907
11908            next_offset += envelope_size;
11909
11910            // Decode the remaining unknown envelopes.
11911            while next_offset < end_offset {
11912                _next_ordinal_to_read += 1;
11913                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11914                next_offset += envelope_size;
11915            }
11916
11917            Ok(())
11918        }
11919    }
11920
11921    impl TableFieldUnknownResource {
11922        #[inline(always)]
11923        fn max_ordinal_present(&self) -> u64 {
11924            0
11925        }
11926    }
11927
11928    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResource {
11929        type Borrowed<'a> = &'a mut Self;
11930        fn take_or_borrow<'a>(
11931            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11932        ) -> Self::Borrowed<'a> {
11933            value
11934        }
11935    }
11936
11937    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResource {
11938        type Owned = Self;
11939
11940        #[inline(always)]
11941        fn inline_align(_context: fidl::encoding::Context) -> usize {
11942            8
11943        }
11944
11945        #[inline(always)]
11946        fn inline_size(_context: fidl::encoding::Context) -> usize {
11947            16
11948        }
11949    }
11950
11951    unsafe impl
11952        fidl::encoding::Encode<
11953            TableFieldUnknownResource,
11954            fidl::encoding::DefaultFuchsiaResourceDialect,
11955        > for &mut TableFieldUnknownResource
11956    {
11957        unsafe fn encode(
11958            self,
11959            encoder: &mut fidl::encoding::Encoder<
11960                '_,
11961                fidl::encoding::DefaultFuchsiaResourceDialect,
11962            >,
11963            offset: usize,
11964            mut depth: fidl::encoding::Depth,
11965        ) -> fidl::Result<()> {
11966            encoder.debug_check_bounds::<TableFieldUnknownResource>(offset);
11967            // Vector header
11968            let max_ordinal: u64 = self.max_ordinal_present();
11969            encoder.write_num(max_ordinal, offset);
11970            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11971            // Calling encoder.out_of_line_offset(0) is not allowed.
11972            if max_ordinal == 0 {
11973                return Ok(());
11974            }
11975            depth.increment()?;
11976            let envelope_size = 8;
11977            let bytes_len = max_ordinal as usize * envelope_size;
11978            #[allow(unused_variables)]
11979            let offset = encoder.out_of_line_offset(bytes_len);
11980            let mut _prev_end_offset: usize = 0;
11981
11982            Ok(())
11983        }
11984    }
11985
11986    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11987        for TableFieldUnknownResource
11988    {
11989        #[inline(always)]
11990        fn new_empty() -> Self {
11991            Self::default()
11992        }
11993
11994        unsafe fn decode(
11995            &mut self,
11996            decoder: &mut fidl::encoding::Decoder<
11997                '_,
11998                fidl::encoding::DefaultFuchsiaResourceDialect,
11999            >,
12000            offset: usize,
12001            mut depth: fidl::encoding::Depth,
12002        ) -> fidl::Result<()> {
12003            decoder.debug_check_bounds::<Self>(offset);
12004            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12005                None => return Err(fidl::Error::NotNullable),
12006                Some(len) => len,
12007            };
12008            // Calling decoder.out_of_line_offset(0) is not allowed.
12009            if len == 0 {
12010                return Ok(());
12011            };
12012            depth.increment()?;
12013            let envelope_size = 8;
12014            let bytes_len = len * envelope_size;
12015            let offset = decoder.out_of_line_offset(bytes_len)?;
12016            // Decode the envelope for each type.
12017            let mut _next_ordinal_to_read = 0;
12018            let mut next_offset = offset;
12019            let end_offset = offset + bytes_len;
12020
12021            // Decode the remaining unknown envelopes.
12022            while next_offset < end_offset {
12023                _next_ordinal_to_read += 1;
12024                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12025                next_offset += envelope_size;
12026            }
12027
12028            Ok(())
12029        }
12030    }
12031
12032    impl TableOfEndpointsTable {
12033        #[inline(always)]
12034        fn max_ordinal_present(&self) -> u64 {
12035            if let Some(_) = self.server_end {
12036                return 2;
12037            }
12038            if let Some(_) = self.client_end {
12039                return 1;
12040            }
12041            0
12042        }
12043    }
12044
12045    impl fidl::encoding::ResourceTypeMarker for TableOfEndpointsTable {
12046        type Borrowed<'a> = &'a mut Self;
12047        fn take_or_borrow<'a>(
12048            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12049        ) -> Self::Borrowed<'a> {
12050            value
12051        }
12052    }
12053
12054    unsafe impl fidl::encoding::TypeMarker for TableOfEndpointsTable {
12055        type Owned = Self;
12056
12057        #[inline(always)]
12058        fn inline_align(_context: fidl::encoding::Context) -> usize {
12059            8
12060        }
12061
12062        #[inline(always)]
12063        fn inline_size(_context: fidl::encoding::Context) -> usize {
12064            16
12065        }
12066    }
12067
12068    unsafe impl
12069        fidl::encoding::Encode<TableOfEndpointsTable, fidl::encoding::DefaultFuchsiaResourceDialect>
12070        for &mut TableOfEndpointsTable
12071    {
12072        unsafe fn encode(
12073            self,
12074            encoder: &mut fidl::encoding::Encoder<
12075                '_,
12076                fidl::encoding::DefaultFuchsiaResourceDialect,
12077            >,
12078            offset: usize,
12079            mut depth: fidl::encoding::Depth,
12080        ) -> fidl::Result<()> {
12081            encoder.debug_check_bounds::<TableOfEndpointsTable>(offset);
12082            // Vector header
12083            let max_ordinal: u64 = self.max_ordinal_present();
12084            encoder.write_num(max_ordinal, offset);
12085            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12086            // Calling encoder.out_of_line_offset(0) is not allowed.
12087            if max_ordinal == 0 {
12088                return Ok(());
12089            }
12090            depth.increment()?;
12091            let envelope_size = 8;
12092            let bytes_len = max_ordinal as usize * envelope_size;
12093            #[allow(unused_variables)]
12094            let offset = encoder.out_of_line_offset(bytes_len);
12095            let mut _prev_end_offset: usize = 0;
12096            if 1 > max_ordinal {
12097                return Ok(());
12098            }
12099
12100            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12101            // are envelope_size bytes.
12102            let cur_offset: usize = (1 - 1) * envelope_size;
12103
12104            // Zero reserved fields.
12105            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12106
12107            // Safety:
12108            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12109            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12110            //   envelope_size bytes, there is always sufficient room.
12111            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12112            self.client_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12113            encoder, offset + cur_offset, depth
12114        )?;
12115
12116            _prev_end_offset = cur_offset + envelope_size;
12117            if 2 > max_ordinal {
12118                return Ok(());
12119            }
12120
12121            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12122            // are envelope_size bytes.
12123            let cur_offset: usize = (2 - 1) * envelope_size;
12124
12125            // Zero reserved fields.
12126            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12127
12128            // Safety:
12129            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12130            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12131            //   envelope_size bytes, there is always sufficient room.
12132            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12133            self.server_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12134            encoder, offset + cur_offset, depth
12135        )?;
12136
12137            _prev_end_offset = cur_offset + envelope_size;
12138
12139            Ok(())
12140        }
12141    }
12142
12143    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12144        for TableOfEndpointsTable
12145    {
12146        #[inline(always)]
12147        fn new_empty() -> Self {
12148            Self::default()
12149        }
12150
12151        unsafe fn decode(
12152            &mut self,
12153            decoder: &mut fidl::encoding::Decoder<
12154                '_,
12155                fidl::encoding::DefaultFuchsiaResourceDialect,
12156            >,
12157            offset: usize,
12158            mut depth: fidl::encoding::Depth,
12159        ) -> fidl::Result<()> {
12160            decoder.debug_check_bounds::<Self>(offset);
12161            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12162                None => return Err(fidl::Error::NotNullable),
12163                Some(len) => len,
12164            };
12165            // Calling decoder.out_of_line_offset(0) is not allowed.
12166            if len == 0 {
12167                return Ok(());
12168            };
12169            depth.increment()?;
12170            let envelope_size = 8;
12171            let bytes_len = len * envelope_size;
12172            let offset = decoder.out_of_line_offset(bytes_len)?;
12173            // Decode the envelope for each type.
12174            let mut _next_ordinal_to_read = 0;
12175            let mut next_offset = offset;
12176            let end_offset = offset + bytes_len;
12177            _next_ordinal_to_read += 1;
12178            if next_offset >= end_offset {
12179                return Ok(());
12180            }
12181
12182            // Decode unknown envelopes for gaps in ordinals.
12183            while _next_ordinal_to_read < 1 {
12184                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12185                _next_ordinal_to_read += 1;
12186                next_offset += envelope_size;
12187            }
12188
12189            let next_out_of_line = decoder.next_out_of_line();
12190            let handles_before = decoder.remaining_handles();
12191            if let Some((inlined, num_bytes, num_handles)) =
12192                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12193            {
12194                let member_inline_size = <fidl::encoding::Endpoint<
12195                    fidl::endpoints::ClientEnd<ProtocolMarker>,
12196                > as fidl::encoding::TypeMarker>::inline_size(
12197                    decoder.context
12198                );
12199                if inlined != (member_inline_size <= 4) {
12200                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12201                }
12202                let inner_offset;
12203                let mut inner_depth = depth.clone();
12204                if inlined {
12205                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12206                    inner_offset = next_offset;
12207                } else {
12208                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12209                    inner_depth.increment()?;
12210                }
12211                let val_ref = self.client_end.get_or_insert_with(|| {
12212                    fidl::new_empty!(
12213                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12214                        fidl::encoding::DefaultFuchsiaResourceDialect
12215                    )
12216                });
12217                fidl::decode!(
12218                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12219                    fidl::encoding::DefaultFuchsiaResourceDialect,
12220                    val_ref,
12221                    decoder,
12222                    inner_offset,
12223                    inner_depth
12224                )?;
12225                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12226                {
12227                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12228                }
12229                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12230                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12231                }
12232            }
12233
12234            next_offset += envelope_size;
12235            _next_ordinal_to_read += 1;
12236            if next_offset >= end_offset {
12237                return Ok(());
12238            }
12239
12240            // Decode unknown envelopes for gaps in ordinals.
12241            while _next_ordinal_to_read < 2 {
12242                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12243                _next_ordinal_to_read += 1;
12244                next_offset += envelope_size;
12245            }
12246
12247            let next_out_of_line = decoder.next_out_of_line();
12248            let handles_before = decoder.remaining_handles();
12249            if let Some((inlined, num_bytes, num_handles)) =
12250                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12251            {
12252                let member_inline_size = <fidl::encoding::Endpoint<
12253                    fidl::endpoints::ServerEnd<ProtocolMarker>,
12254                > as fidl::encoding::TypeMarker>::inline_size(
12255                    decoder.context
12256                );
12257                if inlined != (member_inline_size <= 4) {
12258                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12259                }
12260                let inner_offset;
12261                let mut inner_depth = depth.clone();
12262                if inlined {
12263                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12264                    inner_offset = next_offset;
12265                } else {
12266                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12267                    inner_depth.increment()?;
12268                }
12269                let val_ref = self.server_end.get_or_insert_with(|| {
12270                    fidl::new_empty!(
12271                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12272                        fidl::encoding::DefaultFuchsiaResourceDialect
12273                    )
12274                });
12275                fidl::decode!(
12276                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12277                    fidl::encoding::DefaultFuchsiaResourceDialect,
12278                    val_ref,
12279                    decoder,
12280                    inner_offset,
12281                    inner_depth
12282                )?;
12283                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12284                {
12285                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12286                }
12287                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12288                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12289                }
12290            }
12291
12292            next_offset += envelope_size;
12293
12294            // Decode the remaining unknown envelopes.
12295            while next_offset < end_offset {
12296                _next_ordinal_to_read += 1;
12297                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12298                next_offset += envelope_size;
12299            }
12300
12301            Ok(())
12302        }
12303    }
12304
12305    impl TableUnionWithVectorReservedSandwich {
12306        #[inline(always)]
12307        fn max_ordinal_present(&self) -> u64 {
12308            if let Some(_) = self.uv {
12309                return 2;
12310            }
12311            0
12312        }
12313    }
12314
12315    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwich {
12316        type Borrowed<'a> = &'a mut Self;
12317        fn take_or_borrow<'a>(
12318            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12319        ) -> Self::Borrowed<'a> {
12320            value
12321        }
12322    }
12323
12324    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwich {
12325        type Owned = Self;
12326
12327        #[inline(always)]
12328        fn inline_align(_context: fidl::encoding::Context) -> usize {
12329            8
12330        }
12331
12332        #[inline(always)]
12333        fn inline_size(_context: fidl::encoding::Context) -> usize {
12334            16
12335        }
12336    }
12337
12338    unsafe impl
12339        fidl::encoding::Encode<
12340            TableUnionWithVectorReservedSandwich,
12341            fidl::encoding::DefaultFuchsiaResourceDialect,
12342        > for &mut TableUnionWithVectorReservedSandwich
12343    {
12344        unsafe fn encode(
12345            self,
12346            encoder: &mut fidl::encoding::Encoder<
12347                '_,
12348                fidl::encoding::DefaultFuchsiaResourceDialect,
12349            >,
12350            offset: usize,
12351            mut depth: fidl::encoding::Depth,
12352        ) -> fidl::Result<()> {
12353            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwich>(offset);
12354            // Vector header
12355            let max_ordinal: u64 = self.max_ordinal_present();
12356            encoder.write_num(max_ordinal, offset);
12357            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12358            // Calling encoder.out_of_line_offset(0) is not allowed.
12359            if max_ordinal == 0 {
12360                return Ok(());
12361            }
12362            depth.increment()?;
12363            let envelope_size = 8;
12364            let bytes_len = max_ordinal as usize * envelope_size;
12365            #[allow(unused_variables)]
12366            let offset = encoder.out_of_line_offset(bytes_len);
12367            let mut _prev_end_offset: usize = 0;
12368            if 2 > max_ordinal {
12369                return Ok(());
12370            }
12371
12372            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12373            // are envelope_size bytes.
12374            let cur_offset: usize = (2 - 1) * envelope_size;
12375
12376            // Zero reserved fields.
12377            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12378
12379            // Safety:
12380            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12381            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12382            //   envelope_size bytes, there is always sufficient room.
12383            fidl::encoding::encode_in_envelope_optional::<
12384                UnionWithVector,
12385                fidl::encoding::DefaultFuchsiaResourceDialect,
12386            >(
12387                self.uv
12388                    .as_mut()
12389                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12390                encoder,
12391                offset + cur_offset,
12392                depth,
12393            )?;
12394
12395            _prev_end_offset = cur_offset + envelope_size;
12396
12397            Ok(())
12398        }
12399    }
12400
12401    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12402        for TableUnionWithVectorReservedSandwich
12403    {
12404        #[inline(always)]
12405        fn new_empty() -> Self {
12406            Self::default()
12407        }
12408
12409        unsafe fn decode(
12410            &mut self,
12411            decoder: &mut fidl::encoding::Decoder<
12412                '_,
12413                fidl::encoding::DefaultFuchsiaResourceDialect,
12414            >,
12415            offset: usize,
12416            mut depth: fidl::encoding::Depth,
12417        ) -> fidl::Result<()> {
12418            decoder.debug_check_bounds::<Self>(offset);
12419            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12420                None => return Err(fidl::Error::NotNullable),
12421                Some(len) => len,
12422            };
12423            // Calling decoder.out_of_line_offset(0) is not allowed.
12424            if len == 0 {
12425                return Ok(());
12426            };
12427            depth.increment()?;
12428            let envelope_size = 8;
12429            let bytes_len = len * envelope_size;
12430            let offset = decoder.out_of_line_offset(bytes_len)?;
12431            // Decode the envelope for each type.
12432            let mut _next_ordinal_to_read = 0;
12433            let mut next_offset = offset;
12434            let end_offset = offset + bytes_len;
12435            _next_ordinal_to_read += 1;
12436            if next_offset >= end_offset {
12437                return Ok(());
12438            }
12439
12440            // Decode unknown envelopes for gaps in ordinals.
12441            while _next_ordinal_to_read < 2 {
12442                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12443                _next_ordinal_to_read += 1;
12444                next_offset += envelope_size;
12445            }
12446
12447            let next_out_of_line = decoder.next_out_of_line();
12448            let handles_before = decoder.remaining_handles();
12449            if let Some((inlined, num_bytes, num_handles)) =
12450                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12451            {
12452                let member_inline_size =
12453                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12454                if inlined != (member_inline_size <= 4) {
12455                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12456                }
12457                let inner_offset;
12458                let mut inner_depth = depth.clone();
12459                if inlined {
12460                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12461                    inner_offset = next_offset;
12462                } else {
12463                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12464                    inner_depth.increment()?;
12465                }
12466                let val_ref = self.uv.get_or_insert_with(|| {
12467                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12468                });
12469                fidl::decode!(
12470                    UnionWithVector,
12471                    fidl::encoding::DefaultFuchsiaResourceDialect,
12472                    val_ref,
12473                    decoder,
12474                    inner_offset,
12475                    inner_depth
12476                )?;
12477                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12478                {
12479                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12480                }
12481                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12482                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12483                }
12484            }
12485
12486            next_offset += envelope_size;
12487
12488            // Decode the remaining unknown envelopes.
12489            while next_offset < end_offset {
12490                _next_ordinal_to_read += 1;
12491                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12492                next_offset += envelope_size;
12493            }
12494
12495            Ok(())
12496        }
12497    }
12498
12499    impl TableUnionWithVectorStructSandwich {
12500        #[inline(always)]
12501        fn max_ordinal_present(&self) -> u64 {
12502            if let Some(_) = self.s2 {
12503                return 3;
12504            }
12505            if let Some(_) = self.uv {
12506                return 2;
12507            }
12508            if let Some(_) = self.s1 {
12509                return 1;
12510            }
12511            0
12512        }
12513    }
12514
12515    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwich {
12516        type Borrowed<'a> = &'a mut Self;
12517        fn take_or_borrow<'a>(
12518            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12519        ) -> Self::Borrowed<'a> {
12520            value
12521        }
12522    }
12523
12524    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwich {
12525        type Owned = Self;
12526
12527        #[inline(always)]
12528        fn inline_align(_context: fidl::encoding::Context) -> usize {
12529            8
12530        }
12531
12532        #[inline(always)]
12533        fn inline_size(_context: fidl::encoding::Context) -> usize {
12534            16
12535        }
12536    }
12537
12538    unsafe impl
12539        fidl::encoding::Encode<
12540            TableUnionWithVectorStructSandwich,
12541            fidl::encoding::DefaultFuchsiaResourceDialect,
12542        > for &mut TableUnionWithVectorStructSandwich
12543    {
12544        unsafe fn encode(
12545            self,
12546            encoder: &mut fidl::encoding::Encoder<
12547                '_,
12548                fidl::encoding::DefaultFuchsiaResourceDialect,
12549            >,
12550            offset: usize,
12551            mut depth: fidl::encoding::Depth,
12552        ) -> fidl::Result<()> {
12553            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwich>(offset);
12554            // Vector header
12555            let max_ordinal: u64 = self.max_ordinal_present();
12556            encoder.write_num(max_ordinal, offset);
12557            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12558            // Calling encoder.out_of_line_offset(0) is not allowed.
12559            if max_ordinal == 0 {
12560                return Ok(());
12561            }
12562            depth.increment()?;
12563            let envelope_size = 8;
12564            let bytes_len = max_ordinal as usize * envelope_size;
12565            #[allow(unused_variables)]
12566            let offset = encoder.out_of_line_offset(bytes_len);
12567            let mut _prev_end_offset: usize = 0;
12568            if 1 > max_ordinal {
12569                return Ok(());
12570            }
12571
12572            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12573            // are envelope_size bytes.
12574            let cur_offset: usize = (1 - 1) * envelope_size;
12575
12576            // Zero reserved fields.
12577            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12578
12579            // Safety:
12580            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12581            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12582            //   envelope_size bytes, there is always sufficient room.
12583            fidl::encoding::encode_in_envelope_optional::<
12584                StructSize3Align1,
12585                fidl::encoding::DefaultFuchsiaResourceDialect,
12586            >(
12587                self.s1
12588                    .as_ref()
12589                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12590                encoder,
12591                offset + cur_offset,
12592                depth,
12593            )?;
12594
12595            _prev_end_offset = cur_offset + envelope_size;
12596            if 2 > max_ordinal {
12597                return Ok(());
12598            }
12599
12600            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12601            // are envelope_size bytes.
12602            let cur_offset: usize = (2 - 1) * envelope_size;
12603
12604            // Zero reserved fields.
12605            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12606
12607            // Safety:
12608            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12609            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12610            //   envelope_size bytes, there is always sufficient room.
12611            fidl::encoding::encode_in_envelope_optional::<
12612                UnionWithVector,
12613                fidl::encoding::DefaultFuchsiaResourceDialect,
12614            >(
12615                self.uv
12616                    .as_mut()
12617                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12618                encoder,
12619                offset + cur_offset,
12620                depth,
12621            )?;
12622
12623            _prev_end_offset = cur_offset + envelope_size;
12624            if 3 > max_ordinal {
12625                return Ok(());
12626            }
12627
12628            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12629            // are envelope_size bytes.
12630            let cur_offset: usize = (3 - 1) * envelope_size;
12631
12632            // Zero reserved fields.
12633            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12634
12635            // Safety:
12636            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12637            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12638            //   envelope_size bytes, there is always sufficient room.
12639            fidl::encoding::encode_in_envelope_optional::<
12640                StructSize3Align1,
12641                fidl::encoding::DefaultFuchsiaResourceDialect,
12642            >(
12643                self.s2
12644                    .as_ref()
12645                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12646                encoder,
12647                offset + cur_offset,
12648                depth,
12649            )?;
12650
12651            _prev_end_offset = cur_offset + envelope_size;
12652
12653            Ok(())
12654        }
12655    }
12656
12657    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12658        for TableUnionWithVectorStructSandwich
12659    {
12660        #[inline(always)]
12661        fn new_empty() -> Self {
12662            Self::default()
12663        }
12664
12665        unsafe fn decode(
12666            &mut self,
12667            decoder: &mut fidl::encoding::Decoder<
12668                '_,
12669                fidl::encoding::DefaultFuchsiaResourceDialect,
12670            >,
12671            offset: usize,
12672            mut depth: fidl::encoding::Depth,
12673        ) -> fidl::Result<()> {
12674            decoder.debug_check_bounds::<Self>(offset);
12675            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12676                None => return Err(fidl::Error::NotNullable),
12677                Some(len) => len,
12678            };
12679            // Calling decoder.out_of_line_offset(0) is not allowed.
12680            if len == 0 {
12681                return Ok(());
12682            };
12683            depth.increment()?;
12684            let envelope_size = 8;
12685            let bytes_len = len * envelope_size;
12686            let offset = decoder.out_of_line_offset(bytes_len)?;
12687            // Decode the envelope for each type.
12688            let mut _next_ordinal_to_read = 0;
12689            let mut next_offset = offset;
12690            let end_offset = offset + bytes_len;
12691            _next_ordinal_to_read += 1;
12692            if next_offset >= end_offset {
12693                return Ok(());
12694            }
12695
12696            // Decode unknown envelopes for gaps in ordinals.
12697            while _next_ordinal_to_read < 1 {
12698                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12699                _next_ordinal_to_read += 1;
12700                next_offset += envelope_size;
12701            }
12702
12703            let next_out_of_line = decoder.next_out_of_line();
12704            let handles_before = decoder.remaining_handles();
12705            if let Some((inlined, num_bytes, num_handles)) =
12706                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12707            {
12708                let member_inline_size =
12709                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12710                if inlined != (member_inline_size <= 4) {
12711                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12712                }
12713                let inner_offset;
12714                let mut inner_depth = depth.clone();
12715                if inlined {
12716                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12717                    inner_offset = next_offset;
12718                } else {
12719                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12720                    inner_depth.increment()?;
12721                }
12722                let val_ref = self.s1.get_or_insert_with(|| {
12723                    fidl::new_empty!(
12724                        StructSize3Align1,
12725                        fidl::encoding::DefaultFuchsiaResourceDialect
12726                    )
12727                });
12728                fidl::decode!(
12729                    StructSize3Align1,
12730                    fidl::encoding::DefaultFuchsiaResourceDialect,
12731                    val_ref,
12732                    decoder,
12733                    inner_offset,
12734                    inner_depth
12735                )?;
12736                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12737                {
12738                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12739                }
12740                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12741                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12742                }
12743            }
12744
12745            next_offset += envelope_size;
12746            _next_ordinal_to_read += 1;
12747            if next_offset >= end_offset {
12748                return Ok(());
12749            }
12750
12751            // Decode unknown envelopes for gaps in ordinals.
12752            while _next_ordinal_to_read < 2 {
12753                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12754                _next_ordinal_to_read += 1;
12755                next_offset += envelope_size;
12756            }
12757
12758            let next_out_of_line = decoder.next_out_of_line();
12759            let handles_before = decoder.remaining_handles();
12760            if let Some((inlined, num_bytes, num_handles)) =
12761                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12762            {
12763                let member_inline_size =
12764                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12765                if inlined != (member_inline_size <= 4) {
12766                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12767                }
12768                let inner_offset;
12769                let mut inner_depth = depth.clone();
12770                if inlined {
12771                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12772                    inner_offset = next_offset;
12773                } else {
12774                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12775                    inner_depth.increment()?;
12776                }
12777                let val_ref = self.uv.get_or_insert_with(|| {
12778                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12779                });
12780                fidl::decode!(
12781                    UnionWithVector,
12782                    fidl::encoding::DefaultFuchsiaResourceDialect,
12783                    val_ref,
12784                    decoder,
12785                    inner_offset,
12786                    inner_depth
12787                )?;
12788                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12789                {
12790                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12791                }
12792                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12793                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12794                }
12795            }
12796
12797            next_offset += envelope_size;
12798            _next_ordinal_to_read += 1;
12799            if next_offset >= end_offset {
12800                return Ok(());
12801            }
12802
12803            // Decode unknown envelopes for gaps in ordinals.
12804            while _next_ordinal_to_read < 3 {
12805                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12806                _next_ordinal_to_read += 1;
12807                next_offset += envelope_size;
12808            }
12809
12810            let next_out_of_line = decoder.next_out_of_line();
12811            let handles_before = decoder.remaining_handles();
12812            if let Some((inlined, num_bytes, num_handles)) =
12813                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12814            {
12815                let member_inline_size =
12816                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12817                if inlined != (member_inline_size <= 4) {
12818                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12819                }
12820                let inner_offset;
12821                let mut inner_depth = depth.clone();
12822                if inlined {
12823                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12824                    inner_offset = next_offset;
12825                } else {
12826                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12827                    inner_depth.increment()?;
12828                }
12829                let val_ref = self.s2.get_or_insert_with(|| {
12830                    fidl::new_empty!(
12831                        StructSize3Align1,
12832                        fidl::encoding::DefaultFuchsiaResourceDialect
12833                    )
12834                });
12835                fidl::decode!(
12836                    StructSize3Align1,
12837                    fidl::encoding::DefaultFuchsiaResourceDialect,
12838                    val_ref,
12839                    decoder,
12840                    inner_offset,
12841                    inner_depth
12842                )?;
12843                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12844                {
12845                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12846                }
12847                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12848                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12849                }
12850            }
12851
12852            next_offset += envelope_size;
12853
12854            // Decode the remaining unknown envelopes.
12855            while next_offset < end_offset {
12856                _next_ordinal_to_read += 1;
12857                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12858                next_offset += envelope_size;
12859            }
12860
12861            Ok(())
12862        }
12863    }
12864
12865    impl VectorOfArrayOfEventInTableWithReducedRights {
12866        #[inline(always)]
12867        fn max_ordinal_present(&self) -> u64 {
12868            if let Some(_) = self.h {
12869                return 1;
12870            }
12871            0
12872        }
12873    }
12874
12875    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12876        type Borrowed<'a> = &'a mut Self;
12877        fn take_or_borrow<'a>(
12878            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12879        ) -> Self::Borrowed<'a> {
12880            value
12881        }
12882    }
12883
12884    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12885        type Owned = Self;
12886
12887        #[inline(always)]
12888        fn inline_align(_context: fidl::encoding::Context) -> usize {
12889            8
12890        }
12891
12892        #[inline(always)]
12893        fn inline_size(_context: fidl::encoding::Context) -> usize {
12894            16
12895        }
12896    }
12897
12898    unsafe impl
12899        fidl::encoding::Encode<
12900            VectorOfArrayOfEventInTableWithReducedRights,
12901            fidl::encoding::DefaultFuchsiaResourceDialect,
12902        > for &mut VectorOfArrayOfEventInTableWithReducedRights
12903    {
12904        unsafe fn encode(
12905            self,
12906            encoder: &mut fidl::encoding::Encoder<
12907                '_,
12908                fidl::encoding::DefaultFuchsiaResourceDialect,
12909            >,
12910            offset: usize,
12911            mut depth: fidl::encoding::Depth,
12912        ) -> fidl::Result<()> {
12913            encoder.debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRights>(offset);
12914            // Vector header
12915            let max_ordinal: u64 = self.max_ordinal_present();
12916            encoder.write_num(max_ordinal, offset);
12917            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12918            // Calling encoder.out_of_line_offset(0) is not allowed.
12919            if max_ordinal == 0 {
12920                return Ok(());
12921            }
12922            depth.increment()?;
12923            let envelope_size = 8;
12924            let bytes_len = max_ordinal as usize * envelope_size;
12925            #[allow(unused_variables)]
12926            let offset = encoder.out_of_line_offset(bytes_len);
12927            let mut _prev_end_offset: usize = 0;
12928            if 1 > max_ordinal {
12929                return Ok(());
12930            }
12931
12932            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12933            // are envelope_size bytes.
12934            let cur_offset: usize = (1 - 1) * envelope_size;
12935
12936            // Zero reserved fields.
12937            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12938
12939            // Safety:
12940            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12941            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12942            //   envelope_size bytes, there is always sufficient room.
12943            fidl::encoding::encode_in_envelope_optional::<
12944                fidl::encoding::Vector<
12945                    fidl::encoding::Array<
12946                        fidl::encoding::HandleType<
12947                            fidl::Event,
12948                            { fidl::ObjectType::EVENT.into_raw() },
12949                            49155,
12950                        >,
12951                        1,
12952                    >,
12953                    1,
12954                >,
12955                fidl::encoding::DefaultFuchsiaResourceDialect,
12956            >(
12957                self.h.as_mut().map(
12958                    <fidl::encoding::Vector<
12959                        fidl::encoding::Array<
12960                            fidl::encoding::HandleType<
12961                                fidl::Event,
12962                                { fidl::ObjectType::EVENT.into_raw() },
12963                                49155,
12964                            >,
12965                            1,
12966                        >,
12967                        1,
12968                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12969                ),
12970                encoder,
12971                offset + cur_offset,
12972                depth,
12973            )?;
12974
12975            _prev_end_offset = cur_offset + envelope_size;
12976
12977            Ok(())
12978        }
12979    }
12980
12981    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12982        for VectorOfArrayOfEventInTableWithReducedRights
12983    {
12984        #[inline(always)]
12985        fn new_empty() -> Self {
12986            Self::default()
12987        }
12988
12989        unsafe fn decode(
12990            &mut self,
12991            decoder: &mut fidl::encoding::Decoder<
12992                '_,
12993                fidl::encoding::DefaultFuchsiaResourceDialect,
12994            >,
12995            offset: usize,
12996            mut depth: fidl::encoding::Depth,
12997        ) -> fidl::Result<()> {
12998            decoder.debug_check_bounds::<Self>(offset);
12999            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13000                None => return Err(fidl::Error::NotNullable),
13001                Some(len) => len,
13002            };
13003            // Calling decoder.out_of_line_offset(0) is not allowed.
13004            if len == 0 {
13005                return Ok(());
13006            };
13007            depth.increment()?;
13008            let envelope_size = 8;
13009            let bytes_len = len * envelope_size;
13010            let offset = decoder.out_of_line_offset(bytes_len)?;
13011            // Decode the envelope for each type.
13012            let mut _next_ordinal_to_read = 0;
13013            let mut next_offset = offset;
13014            let end_offset = offset + bytes_len;
13015            _next_ordinal_to_read += 1;
13016            if next_offset >= end_offset {
13017                return Ok(());
13018            }
13019
13020            // Decode unknown envelopes for gaps in ordinals.
13021            while _next_ordinal_to_read < 1 {
13022                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13023                _next_ordinal_to_read += 1;
13024                next_offset += envelope_size;
13025            }
13026
13027            let next_out_of_line = decoder.next_out_of_line();
13028            let handles_before = decoder.remaining_handles();
13029            if let Some((inlined, num_bytes, num_handles)) =
13030                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13031            {
13032                let member_inline_size = <fidl::encoding::Vector<
13033                    fidl::encoding::Array<
13034                        fidl::encoding::HandleType<
13035                            fidl::Event,
13036                            { fidl::ObjectType::EVENT.into_raw() },
13037                            49155,
13038                        >,
13039                        1,
13040                    >,
13041                    1,
13042                > as fidl::encoding::TypeMarker>::inline_size(
13043                    decoder.context
13044                );
13045                if inlined != (member_inline_size <= 4) {
13046                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13047                }
13048                let inner_offset;
13049                let mut inner_depth = depth.clone();
13050                if inlined {
13051                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13052                    inner_offset = next_offset;
13053                } else {
13054                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13055                    inner_depth.increment()?;
13056                }
13057                let val_ref = self.h.get_or_insert_with(|| {
13058                    fidl::new_empty!(
13059                        fidl::encoding::Vector<
13060                            fidl::encoding::Array<
13061                                fidl::encoding::HandleType<
13062                                    fidl::Event,
13063                                    { fidl::ObjectType::EVENT.into_raw() },
13064                                    49155,
13065                                >,
13066                                1,
13067                            >,
13068                            1,
13069                        >,
13070                        fidl::encoding::DefaultFuchsiaResourceDialect
13071                    )
13072                });
13073                fidl::decode!(
13074                    fidl::encoding::Vector<
13075                        fidl::encoding::Array<
13076                            fidl::encoding::HandleType<
13077                                fidl::Event,
13078                                { fidl::ObjectType::EVENT.into_raw() },
13079                                49155,
13080                            >,
13081                            1,
13082                        >,
13083                        1,
13084                    >,
13085                    fidl::encoding::DefaultFuchsiaResourceDialect,
13086                    val_ref,
13087                    decoder,
13088                    inner_offset,
13089                    inner_depth
13090                )?;
13091                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13092                {
13093                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13094                }
13095                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13096                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13097                }
13098            }
13099
13100            next_offset += envelope_size;
13101
13102            // Decode the remaining unknown envelopes.
13103            while next_offset < end_offset {
13104                _next_ordinal_to_read += 1;
13105                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13106                next_offset += envelope_size;
13107            }
13108
13109            Ok(())
13110        }
13111    }
13112
13113    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13114        type Borrowed<'a> = &'a mut Self;
13115        fn take_or_borrow<'a>(
13116            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13117        ) -> Self::Borrowed<'a> {
13118            value
13119        }
13120    }
13121
13122    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13123        type Owned = Self;
13124
13125        #[inline(always)]
13126        fn inline_align(_context: fidl::encoding::Context) -> usize {
13127            8
13128        }
13129
13130        #[inline(always)]
13131        fn inline_size(_context: fidl::encoding::Context) -> usize {
13132            16
13133        }
13134    }
13135
13136    unsafe impl
13137        fidl::encoding::Encode<
13138            ArrayOfVectorOfEventInUnionWithDefaultRights,
13139            fidl::encoding::DefaultFuchsiaResourceDialect,
13140        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRights
13141    {
13142        #[inline]
13143        unsafe fn encode(
13144            self,
13145            encoder: &mut fidl::encoding::Encoder<
13146                '_,
13147                fidl::encoding::DefaultFuchsiaResourceDialect,
13148            >,
13149            offset: usize,
13150            _depth: fidl::encoding::Depth,
13151        ) -> fidl::Result<()> {
13152            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRights>(offset);
13153            encoder.write_num::<u64>(self.ordinal(), offset);
13154            match self {
13155                ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) => {
13156                    fidl::encoding::encode_in_envelope::<
13157                        fidl::encoding::Array<
13158                            fidl::encoding::Vector<
13159                                fidl::encoding::HandleType<
13160                                    fidl::Event,
13161                                    { fidl::ObjectType::EVENT.into_raw() },
13162                                    53251,
13163                                >,
13164                                1,
13165                            >,
13166                            1,
13167                        >,
13168                        fidl::encoding::DefaultFuchsiaResourceDialect,
13169                    >(
13170                        <fidl::encoding::Array<
13171                            fidl::encoding::Vector<
13172                                fidl::encoding::HandleType<
13173                                    fidl::Event,
13174                                    { fidl::ObjectType::EVENT.into_raw() },
13175                                    53251,
13176                                >,
13177                                1,
13178                            >,
13179                            1,
13180                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13181                            val
13182                        ),
13183                        encoder,
13184                        offset + 8,
13185                        _depth,
13186                    )
13187                }
13188            }
13189        }
13190    }
13191
13192    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13193        for ArrayOfVectorOfEventInUnionWithDefaultRights
13194    {
13195        #[inline(always)]
13196        fn new_empty() -> Self {
13197            Self::H(fidl::new_empty!(
13198                fidl::encoding::Array<
13199                    fidl::encoding::Vector<
13200                        fidl::encoding::HandleType<
13201                            fidl::Event,
13202                            { fidl::ObjectType::EVENT.into_raw() },
13203                            53251,
13204                        >,
13205                        1,
13206                    >,
13207                    1,
13208                >,
13209                fidl::encoding::DefaultFuchsiaResourceDialect
13210            ))
13211        }
13212
13213        #[inline]
13214        unsafe fn decode(
13215            &mut self,
13216            decoder: &mut fidl::encoding::Decoder<
13217                '_,
13218                fidl::encoding::DefaultFuchsiaResourceDialect,
13219            >,
13220            offset: usize,
13221            mut depth: fidl::encoding::Depth,
13222        ) -> fidl::Result<()> {
13223            decoder.debug_check_bounds::<Self>(offset);
13224            #[allow(unused_variables)]
13225            let next_out_of_line = decoder.next_out_of_line();
13226            let handles_before = decoder.remaining_handles();
13227            let (ordinal, inlined, num_bytes, num_handles) =
13228                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13229
13230            let member_inline_size = match ordinal {
13231                1 => <fidl::encoding::Array<
13232                    fidl::encoding::Vector<
13233                        fidl::encoding::HandleType<
13234                            fidl::Event,
13235                            { fidl::ObjectType::EVENT.into_raw() },
13236                            53251,
13237                        >,
13238                        1,
13239                    >,
13240                    1,
13241                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13242                _ => return Err(fidl::Error::UnknownUnionTag),
13243            };
13244
13245            if inlined != (member_inline_size <= 4) {
13246                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13247            }
13248            let _inner_offset;
13249            if inlined {
13250                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13251                _inner_offset = offset + 8;
13252            } else {
13253                depth.increment()?;
13254                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13255            }
13256            match ordinal {
13257                1 => {
13258                    #[allow(irrefutable_let_patterns)]
13259                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(_) = self {
13260                        // Do nothing, read the value into the object
13261                    } else {
13262                        // Initialize `self` to the right variant
13263                        *self = ArrayOfVectorOfEventInUnionWithDefaultRights::H(fidl::new_empty!(
13264                            fidl::encoding::Array<
13265                                fidl::encoding::Vector<
13266                                    fidl::encoding::HandleType<
13267                                        fidl::Event,
13268                                        { fidl::ObjectType::EVENT.into_raw() },
13269                                        53251,
13270                                    >,
13271                                    1,
13272                                >,
13273                                1,
13274                            >,
13275                            fidl::encoding::DefaultFuchsiaResourceDialect
13276                        ));
13277                    }
13278                    #[allow(irrefutable_let_patterns)]
13279                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) = self {
13280                        fidl::decode!(
13281                            fidl::encoding::Array<
13282                                fidl::encoding::Vector<
13283                                    fidl::encoding::HandleType<
13284                                        fidl::Event,
13285                                        { fidl::ObjectType::EVENT.into_raw() },
13286                                        53251,
13287                                    >,
13288                                    1,
13289                                >,
13290                                1,
13291                            >,
13292                            fidl::encoding::DefaultFuchsiaResourceDialect,
13293                            val,
13294                            decoder,
13295                            _inner_offset,
13296                            depth
13297                        )?;
13298                    } else {
13299                        unreachable!()
13300                    }
13301                }
13302                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13303            }
13304            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13305                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13306            }
13307            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13308                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13309            }
13310            Ok(())
13311        }
13312    }
13313
13314    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13315        type Borrowed<'a> = &'a mut Self;
13316        fn take_or_borrow<'a>(
13317            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13318        ) -> Self::Borrowed<'a> {
13319            value
13320        }
13321    }
13322
13323    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13324        type Owned = Self;
13325
13326        #[inline(always)]
13327        fn inline_align(_context: fidl::encoding::Context) -> usize {
13328            8
13329        }
13330
13331        #[inline(always)]
13332        fn inline_size(_context: fidl::encoding::Context) -> usize {
13333            16
13334        }
13335    }
13336
13337    unsafe impl
13338        fidl::encoding::Encode<
13339            ArrayOfVectorOfEventInUnionWithReducedRights,
13340            fidl::encoding::DefaultFuchsiaResourceDialect,
13341        > for &mut ArrayOfVectorOfEventInUnionWithReducedRights
13342    {
13343        #[inline]
13344        unsafe fn encode(
13345            self,
13346            encoder: &mut fidl::encoding::Encoder<
13347                '_,
13348                fidl::encoding::DefaultFuchsiaResourceDialect,
13349            >,
13350            offset: usize,
13351            _depth: fidl::encoding::Depth,
13352        ) -> fidl::Result<()> {
13353            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRights>(offset);
13354            encoder.write_num::<u64>(self.ordinal(), offset);
13355            match self {
13356                ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) => {
13357                    fidl::encoding::encode_in_envelope::<
13358                        fidl::encoding::Array<
13359                            fidl::encoding::Vector<
13360                                fidl::encoding::HandleType<
13361                                    fidl::Event,
13362                                    { fidl::ObjectType::EVENT.into_raw() },
13363                                    49155,
13364                                >,
13365                                1,
13366                            >,
13367                            1,
13368                        >,
13369                        fidl::encoding::DefaultFuchsiaResourceDialect,
13370                    >(
13371                        <fidl::encoding::Array<
13372                            fidl::encoding::Vector<
13373                                fidl::encoding::HandleType<
13374                                    fidl::Event,
13375                                    { fidl::ObjectType::EVENT.into_raw() },
13376                                    49155,
13377                                >,
13378                                1,
13379                            >,
13380                            1,
13381                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13382                            val
13383                        ),
13384                        encoder,
13385                        offset + 8,
13386                        _depth,
13387                    )
13388                }
13389            }
13390        }
13391    }
13392
13393    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13394        for ArrayOfVectorOfEventInUnionWithReducedRights
13395    {
13396        #[inline(always)]
13397        fn new_empty() -> Self {
13398            Self::H(fidl::new_empty!(
13399                fidl::encoding::Array<
13400                    fidl::encoding::Vector<
13401                        fidl::encoding::HandleType<
13402                            fidl::Event,
13403                            { fidl::ObjectType::EVENT.into_raw() },
13404                            49155,
13405                        >,
13406                        1,
13407                    >,
13408                    1,
13409                >,
13410                fidl::encoding::DefaultFuchsiaResourceDialect
13411            ))
13412        }
13413
13414        #[inline]
13415        unsafe fn decode(
13416            &mut self,
13417            decoder: &mut fidl::encoding::Decoder<
13418                '_,
13419                fidl::encoding::DefaultFuchsiaResourceDialect,
13420            >,
13421            offset: usize,
13422            mut depth: fidl::encoding::Depth,
13423        ) -> fidl::Result<()> {
13424            decoder.debug_check_bounds::<Self>(offset);
13425            #[allow(unused_variables)]
13426            let next_out_of_line = decoder.next_out_of_line();
13427            let handles_before = decoder.remaining_handles();
13428            let (ordinal, inlined, num_bytes, num_handles) =
13429                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13430
13431            let member_inline_size = match ordinal {
13432                1 => <fidl::encoding::Array<
13433                    fidl::encoding::Vector<
13434                        fidl::encoding::HandleType<
13435                            fidl::Event,
13436                            { fidl::ObjectType::EVENT.into_raw() },
13437                            49155,
13438                        >,
13439                        1,
13440                    >,
13441                    1,
13442                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13443                _ => return Err(fidl::Error::UnknownUnionTag),
13444            };
13445
13446            if inlined != (member_inline_size <= 4) {
13447                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13448            }
13449            let _inner_offset;
13450            if inlined {
13451                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13452                _inner_offset = offset + 8;
13453            } else {
13454                depth.increment()?;
13455                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13456            }
13457            match ordinal {
13458                1 => {
13459                    #[allow(irrefutable_let_patterns)]
13460                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(_) = self {
13461                        // Do nothing, read the value into the object
13462                    } else {
13463                        // Initialize `self` to the right variant
13464                        *self = ArrayOfVectorOfEventInUnionWithReducedRights::H(fidl::new_empty!(
13465                            fidl::encoding::Array<
13466                                fidl::encoding::Vector<
13467                                    fidl::encoding::HandleType<
13468                                        fidl::Event,
13469                                        { fidl::ObjectType::EVENT.into_raw() },
13470                                        49155,
13471                                    >,
13472                                    1,
13473                                >,
13474                                1,
13475                            >,
13476                            fidl::encoding::DefaultFuchsiaResourceDialect
13477                        ));
13478                    }
13479                    #[allow(irrefutable_let_patterns)]
13480                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) = self {
13481                        fidl::decode!(
13482                            fidl::encoding::Array<
13483                                fidl::encoding::Vector<
13484                                    fidl::encoding::HandleType<
13485                                        fidl::Event,
13486                                        { fidl::ObjectType::EVENT.into_raw() },
13487                                        49155,
13488                                    >,
13489                                    1,
13490                                >,
13491                                1,
13492                            >,
13493                            fidl::encoding::DefaultFuchsiaResourceDialect,
13494                            val,
13495                            decoder,
13496                            _inner_offset,
13497                            depth
13498                        )?;
13499                    } else {
13500                        unreachable!()
13501                    }
13502                }
13503                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13504            }
13505            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13506                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13507            }
13508            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13509                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13510            }
13511            Ok(())
13512        }
13513    }
13514
13515    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnion {
13516        type Borrowed<'a> = &'a mut Self;
13517        fn take_or_borrow<'a>(
13518            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13519        ) -> Self::Borrowed<'a> {
13520            value
13521        }
13522    }
13523
13524    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnion {
13525        type Owned = Self;
13526
13527        #[inline(always)]
13528        fn inline_align(_context: fidl::encoding::Context) -> usize {
13529            8
13530        }
13531
13532        #[inline(always)]
13533        fn inline_size(_context: fidl::encoding::Context) -> usize {
13534            16
13535        }
13536    }
13537
13538    unsafe impl
13539        fidl::encoding::Encode<
13540            EnvelopeInliningTestUnion,
13541            fidl::encoding::DefaultFuchsiaResourceDialect,
13542        > for &mut EnvelopeInliningTestUnion
13543    {
13544        #[inline]
13545        unsafe fn encode(
13546            self,
13547            encoder: &mut fidl::encoding::Encoder<
13548                '_,
13549                fidl::encoding::DefaultFuchsiaResourceDialect,
13550            >,
13551            offset: usize,
13552            _depth: fidl::encoding::Depth,
13553        ) -> fidl::Result<()> {
13554            encoder.debug_check_bounds::<EnvelopeInliningTestUnion>(offset);
13555            encoder.write_num::<u64>(self.ordinal(), offset);
13556            match self {
13557                EnvelopeInliningTestUnion::Small(ref val) => fidl::encoding::encode_in_envelope::<
13558                    u32,
13559                    fidl::encoding::DefaultFuchsiaResourceDialect,
13560                >(
13561                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13562                    encoder,
13563                    offset + 8,
13564                    _depth,
13565                ),
13566                EnvelopeInliningTestUnion::Large(ref val) => fidl::encoding::encode_in_envelope::<
13567                    u64,
13568                    fidl::encoding::DefaultFuchsiaResourceDialect,
13569                >(
13570                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
13571                    encoder,
13572                    offset + 8,
13573                    _depth,
13574                ),
13575                EnvelopeInliningTestUnion::Handle(ref mut val) => {
13576                    fidl::encoding::encode_in_envelope::<
13577                        fidl::encoding::HandleType<
13578                            fidl::Handle,
13579                            { fidl::ObjectType::NONE.into_raw() },
13580                            2147483648,
13581                        >,
13582                        fidl::encoding::DefaultFuchsiaResourceDialect,
13583                    >(
13584                        <fidl::encoding::HandleType<
13585                            fidl::Handle,
13586                            { fidl::ObjectType::NONE.into_raw() },
13587                            2147483648,
13588                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13589                            val
13590                        ),
13591                        encoder,
13592                        offset + 8,
13593                        _depth,
13594                    )
13595                }
13596                EnvelopeInliningTestUnion::__SourceBreaking { .. } => {
13597                    Err(fidl::Error::UnknownUnionTag)
13598                }
13599            }
13600        }
13601    }
13602
13603    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13604        for EnvelopeInliningTestUnion
13605    {
13606        #[inline(always)]
13607        fn new_empty() -> Self {
13608            Self::__SourceBreaking { unknown_ordinal: 0 }
13609        }
13610
13611        #[inline]
13612        unsafe fn decode(
13613            &mut self,
13614            decoder: &mut fidl::encoding::Decoder<
13615                '_,
13616                fidl::encoding::DefaultFuchsiaResourceDialect,
13617            >,
13618            offset: usize,
13619            mut depth: fidl::encoding::Depth,
13620        ) -> fidl::Result<()> {
13621            decoder.debug_check_bounds::<Self>(offset);
13622            #[allow(unused_variables)]
13623            let next_out_of_line = decoder.next_out_of_line();
13624            let handles_before = decoder.remaining_handles();
13625            let (ordinal, inlined, num_bytes, num_handles) =
13626                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13627
13628            let member_inline_size = match ordinal {
13629                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13630                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13631                3 => <fidl::encoding::HandleType<
13632                    fidl::Handle,
13633                    { fidl::ObjectType::NONE.into_raw() },
13634                    2147483648,
13635                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13636                0 => return Err(fidl::Error::UnknownUnionTag),
13637                _ => num_bytes as usize,
13638            };
13639
13640            if inlined != (member_inline_size <= 4) {
13641                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13642            }
13643            let _inner_offset;
13644            if inlined {
13645                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13646                _inner_offset = offset + 8;
13647            } else {
13648                depth.increment()?;
13649                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13650            }
13651            match ordinal {
13652                1 => {
13653                    #[allow(irrefutable_let_patterns)]
13654                    if let EnvelopeInliningTestUnion::Small(_) = self {
13655                        // Do nothing, read the value into the object
13656                    } else {
13657                        // Initialize `self` to the right variant
13658                        *self = EnvelopeInliningTestUnion::Small(fidl::new_empty!(
13659                            u32,
13660                            fidl::encoding::DefaultFuchsiaResourceDialect
13661                        ));
13662                    }
13663                    #[allow(irrefutable_let_patterns)]
13664                    if let EnvelopeInliningTestUnion::Small(ref mut val) = self {
13665                        fidl::decode!(
13666                            u32,
13667                            fidl::encoding::DefaultFuchsiaResourceDialect,
13668                            val,
13669                            decoder,
13670                            _inner_offset,
13671                            depth
13672                        )?;
13673                    } else {
13674                        unreachable!()
13675                    }
13676                }
13677                2 => {
13678                    #[allow(irrefutable_let_patterns)]
13679                    if let EnvelopeInliningTestUnion::Large(_) = self {
13680                        // Do nothing, read the value into the object
13681                    } else {
13682                        // Initialize `self` to the right variant
13683                        *self = EnvelopeInliningTestUnion::Large(fidl::new_empty!(
13684                            u64,
13685                            fidl::encoding::DefaultFuchsiaResourceDialect
13686                        ));
13687                    }
13688                    #[allow(irrefutable_let_patterns)]
13689                    if let EnvelopeInliningTestUnion::Large(ref mut val) = self {
13690                        fidl::decode!(
13691                            u64,
13692                            fidl::encoding::DefaultFuchsiaResourceDialect,
13693                            val,
13694                            decoder,
13695                            _inner_offset,
13696                            depth
13697                        )?;
13698                    } else {
13699                        unreachable!()
13700                    }
13701                }
13702                3 => {
13703                    #[allow(irrefutable_let_patterns)]
13704                    if let EnvelopeInliningTestUnion::Handle(_) = self {
13705                        // Do nothing, read the value into the object
13706                    } else {
13707                        // Initialize `self` to the right variant
13708                        *self = EnvelopeInliningTestUnion::Handle(
13709                            fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13710                        );
13711                    }
13712                    #[allow(irrefutable_let_patterns)]
13713                    if let EnvelopeInliningTestUnion::Handle(ref mut val) = self {
13714                        fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
13715                    } else {
13716                        unreachable!()
13717                    }
13718                }
13719                #[allow(deprecated)]
13720                ordinal => {
13721                    for _ in 0..num_handles {
13722                        decoder.drop_next_handle()?;
13723                    }
13724                    *self =
13725                        EnvelopeInliningTestUnion::__SourceBreaking { unknown_ordinal: ordinal };
13726                }
13727            }
13728            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13729                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13730            }
13731            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13732                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13733            }
13734            Ok(())
13735        }
13736    }
13737
13738    impl fidl::encoding::ResourceTypeMarker for SampleResourceXUnion {
13739        type Borrowed<'a> = &'a mut Self;
13740        fn take_or_borrow<'a>(
13741            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13742        ) -> Self::Borrowed<'a> {
13743            value
13744        }
13745    }
13746
13747    unsafe impl fidl::encoding::TypeMarker for SampleResourceXUnion {
13748        type Owned = Self;
13749
13750        #[inline(always)]
13751        fn inline_align(_context: fidl::encoding::Context) -> usize {
13752            8
13753        }
13754
13755        #[inline(always)]
13756        fn inline_size(_context: fidl::encoding::Context) -> usize {
13757            16
13758        }
13759    }
13760
13761    unsafe impl
13762        fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
13763        for &mut SampleResourceXUnion
13764    {
13765        #[inline]
13766        unsafe fn encode(
13767            self,
13768            encoder: &mut fidl::encoding::Encoder<
13769                '_,
13770                fidl::encoding::DefaultFuchsiaResourceDialect,
13771            >,
13772            offset: usize,
13773            _depth: fidl::encoding::Depth,
13774        ) -> fidl::Result<()> {
13775            encoder.debug_check_bounds::<SampleResourceXUnion>(offset);
13776            encoder.write_num::<u64>(self.ordinal(), offset);
13777            match self {
13778                SampleResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13779                    u32,
13780                    fidl::encoding::DefaultFuchsiaResourceDialect,
13781                >(
13782                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13783                    encoder,
13784                    offset + 8,
13785                    _depth,
13786                ),
13787                SampleResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13788                    SimpleUnion,
13789                    fidl::encoding::DefaultFuchsiaResourceDialect,
13790                >(
13791                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13792                    encoder,
13793                    offset + 8,
13794                    _depth,
13795                ),
13796                SampleResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13797                    SimpleTable,
13798                    fidl::encoding::DefaultFuchsiaResourceDialect,
13799                >(
13800                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13801                    encoder,
13802                    offset + 8,
13803                    _depth,
13804                ),
13805                SampleResourceXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
13806            }
13807        }
13808    }
13809
13810    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13811        for SampleResourceXUnion
13812    {
13813        #[inline(always)]
13814        fn new_empty() -> Self {
13815            Self::__SourceBreaking { unknown_ordinal: 0 }
13816        }
13817
13818        #[inline]
13819        unsafe fn decode(
13820            &mut self,
13821            decoder: &mut fidl::encoding::Decoder<
13822                '_,
13823                fidl::encoding::DefaultFuchsiaResourceDialect,
13824            >,
13825            offset: usize,
13826            mut depth: fidl::encoding::Depth,
13827        ) -> fidl::Result<()> {
13828            decoder.debug_check_bounds::<Self>(offset);
13829            #[allow(unused_variables)]
13830            let next_out_of_line = decoder.next_out_of_line();
13831            let handles_before = decoder.remaining_handles();
13832            let (ordinal, inlined, num_bytes, num_handles) =
13833                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13834
13835            let member_inline_size = match ordinal {
13836                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13837                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13838                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13839                0 => return Err(fidl::Error::UnknownUnionTag),
13840                _ => num_bytes as usize,
13841            };
13842
13843            if inlined != (member_inline_size <= 4) {
13844                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13845            }
13846            let _inner_offset;
13847            if inlined {
13848                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13849                _inner_offset = offset + 8;
13850            } else {
13851                depth.increment()?;
13852                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13853            }
13854            match ordinal {
13855                1 => {
13856                    #[allow(irrefutable_let_patterns)]
13857                    if let SampleResourceXUnion::U(_) = self {
13858                        // Do nothing, read the value into the object
13859                    } else {
13860                        // Initialize `self` to the right variant
13861                        *self = SampleResourceXUnion::U(fidl::new_empty!(
13862                            u32,
13863                            fidl::encoding::DefaultFuchsiaResourceDialect
13864                        ));
13865                    }
13866                    #[allow(irrefutable_let_patterns)]
13867                    if let SampleResourceXUnion::U(ref mut val) = self {
13868                        fidl::decode!(
13869                            u32,
13870                            fidl::encoding::DefaultFuchsiaResourceDialect,
13871                            val,
13872                            decoder,
13873                            _inner_offset,
13874                            depth
13875                        )?;
13876                    } else {
13877                        unreachable!()
13878                    }
13879                }
13880                2 => {
13881                    #[allow(irrefutable_let_patterns)]
13882                    if let SampleResourceXUnion::Su(_) = self {
13883                        // Do nothing, read the value into the object
13884                    } else {
13885                        // Initialize `self` to the right variant
13886                        *self = SampleResourceXUnion::Su(fidl::new_empty!(
13887                            SimpleUnion,
13888                            fidl::encoding::DefaultFuchsiaResourceDialect
13889                        ));
13890                    }
13891                    #[allow(irrefutable_let_patterns)]
13892                    if let SampleResourceXUnion::Su(ref mut val) = self {
13893                        fidl::decode!(
13894                            SimpleUnion,
13895                            fidl::encoding::DefaultFuchsiaResourceDialect,
13896                            val,
13897                            decoder,
13898                            _inner_offset,
13899                            depth
13900                        )?;
13901                    } else {
13902                        unreachable!()
13903                    }
13904                }
13905                3 => {
13906                    #[allow(irrefutable_let_patterns)]
13907                    if let SampleResourceXUnion::St(_) = self {
13908                        // Do nothing, read the value into the object
13909                    } else {
13910                        // Initialize `self` to the right variant
13911                        *self = SampleResourceXUnion::St(fidl::new_empty!(
13912                            SimpleTable,
13913                            fidl::encoding::DefaultFuchsiaResourceDialect
13914                        ));
13915                    }
13916                    #[allow(irrefutable_let_patterns)]
13917                    if let SampleResourceXUnion::St(ref mut val) = self {
13918                        fidl::decode!(
13919                            SimpleTable,
13920                            fidl::encoding::DefaultFuchsiaResourceDialect,
13921                            val,
13922                            decoder,
13923                            _inner_offset,
13924                            depth
13925                        )?;
13926                    } else {
13927                        unreachable!()
13928                    }
13929                }
13930                #[allow(deprecated)]
13931                ordinal => {
13932                    for _ in 0..num_handles {
13933                        decoder.drop_next_handle()?;
13934                    }
13935                    *self = SampleResourceXUnion::__SourceBreaking { unknown_ordinal: ordinal };
13936                }
13937            }
13938            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13939                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13940            }
13941            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13942                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13943            }
13944            Ok(())
13945        }
13946    }
13947
13948    impl fidl::encoding::ResourceTypeMarker for SampleStrictResourceXUnion {
13949        type Borrowed<'a> = &'a mut Self;
13950        fn take_or_borrow<'a>(
13951            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13952        ) -> Self::Borrowed<'a> {
13953            value
13954        }
13955    }
13956
13957    unsafe impl fidl::encoding::TypeMarker for SampleStrictResourceXUnion {
13958        type Owned = Self;
13959
13960        #[inline(always)]
13961        fn inline_align(_context: fidl::encoding::Context) -> usize {
13962            8
13963        }
13964
13965        #[inline(always)]
13966        fn inline_size(_context: fidl::encoding::Context) -> usize {
13967            16
13968        }
13969    }
13970
13971    unsafe impl
13972        fidl::encoding::Encode<
13973            SampleStrictResourceXUnion,
13974            fidl::encoding::DefaultFuchsiaResourceDialect,
13975        > for &mut SampleStrictResourceXUnion
13976    {
13977        #[inline]
13978        unsafe fn encode(
13979            self,
13980            encoder: &mut fidl::encoding::Encoder<
13981                '_,
13982                fidl::encoding::DefaultFuchsiaResourceDialect,
13983            >,
13984            offset: usize,
13985            _depth: fidl::encoding::Depth,
13986        ) -> fidl::Result<()> {
13987            encoder.debug_check_bounds::<SampleStrictResourceXUnion>(offset);
13988            encoder.write_num::<u64>(self.ordinal(), offset);
13989            match self {
13990                SampleStrictResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13991                    u32,
13992                    fidl::encoding::DefaultFuchsiaResourceDialect,
13993                >(
13994                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13995                    encoder,
13996                    offset + 8,
13997                    _depth,
13998                ),
13999                SampleStrictResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
14000                    SimpleUnion,
14001                    fidl::encoding::DefaultFuchsiaResourceDialect,
14002                >(
14003                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
14004                    encoder,
14005                    offset + 8,
14006                    _depth,
14007                ),
14008                SampleStrictResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
14009                    SimpleTable,
14010                    fidl::encoding::DefaultFuchsiaResourceDialect,
14011                >(
14012                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
14013                    encoder,
14014                    offset + 8,
14015                    _depth,
14016                ),
14017            }
14018        }
14019    }
14020
14021    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14022        for SampleStrictResourceXUnion
14023    {
14024        #[inline(always)]
14025        fn new_empty() -> Self {
14026            Self::U(fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect))
14027        }
14028
14029        #[inline]
14030        unsafe fn decode(
14031            &mut self,
14032            decoder: &mut fidl::encoding::Decoder<
14033                '_,
14034                fidl::encoding::DefaultFuchsiaResourceDialect,
14035            >,
14036            offset: usize,
14037            mut depth: fidl::encoding::Depth,
14038        ) -> fidl::Result<()> {
14039            decoder.debug_check_bounds::<Self>(offset);
14040            #[allow(unused_variables)]
14041            let next_out_of_line = decoder.next_out_of_line();
14042            let handles_before = decoder.remaining_handles();
14043            let (ordinal, inlined, num_bytes, num_handles) =
14044                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14045
14046            let member_inline_size = match ordinal {
14047                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14048                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14049                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14050                _ => return Err(fidl::Error::UnknownUnionTag),
14051            };
14052
14053            if inlined != (member_inline_size <= 4) {
14054                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14055            }
14056            let _inner_offset;
14057            if inlined {
14058                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14059                _inner_offset = offset + 8;
14060            } else {
14061                depth.increment()?;
14062                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14063            }
14064            match ordinal {
14065                1 => {
14066                    #[allow(irrefutable_let_patterns)]
14067                    if let SampleStrictResourceXUnion::U(_) = self {
14068                        // Do nothing, read the value into the object
14069                    } else {
14070                        // Initialize `self` to the right variant
14071                        *self = SampleStrictResourceXUnion::U(fidl::new_empty!(
14072                            u32,
14073                            fidl::encoding::DefaultFuchsiaResourceDialect
14074                        ));
14075                    }
14076                    #[allow(irrefutable_let_patterns)]
14077                    if let SampleStrictResourceXUnion::U(ref mut val) = self {
14078                        fidl::decode!(
14079                            u32,
14080                            fidl::encoding::DefaultFuchsiaResourceDialect,
14081                            val,
14082                            decoder,
14083                            _inner_offset,
14084                            depth
14085                        )?;
14086                    } else {
14087                        unreachable!()
14088                    }
14089                }
14090                2 => {
14091                    #[allow(irrefutable_let_patterns)]
14092                    if let SampleStrictResourceXUnion::Su(_) = self {
14093                        // Do nothing, read the value into the object
14094                    } else {
14095                        // Initialize `self` to the right variant
14096                        *self = SampleStrictResourceXUnion::Su(fidl::new_empty!(
14097                            SimpleUnion,
14098                            fidl::encoding::DefaultFuchsiaResourceDialect
14099                        ));
14100                    }
14101                    #[allow(irrefutable_let_patterns)]
14102                    if let SampleStrictResourceXUnion::Su(ref mut val) = self {
14103                        fidl::decode!(
14104                            SimpleUnion,
14105                            fidl::encoding::DefaultFuchsiaResourceDialect,
14106                            val,
14107                            decoder,
14108                            _inner_offset,
14109                            depth
14110                        )?;
14111                    } else {
14112                        unreachable!()
14113                    }
14114                }
14115                3 => {
14116                    #[allow(irrefutable_let_patterns)]
14117                    if let SampleStrictResourceXUnion::St(_) = self {
14118                        // Do nothing, read the value into the object
14119                    } else {
14120                        // Initialize `self` to the right variant
14121                        *self = SampleStrictResourceXUnion::St(fidl::new_empty!(
14122                            SimpleTable,
14123                            fidl::encoding::DefaultFuchsiaResourceDialect
14124                        ));
14125                    }
14126                    #[allow(irrefutable_let_patterns)]
14127                    if let SampleStrictResourceXUnion::St(ref mut val) = self {
14128                        fidl::decode!(
14129                            SimpleTable,
14130                            fidl::encoding::DefaultFuchsiaResourceDialect,
14131                            val,
14132                            decoder,
14133                            _inner_offset,
14134                            depth
14135                        )?;
14136                    } else {
14137                        unreachable!()
14138                    }
14139                }
14140                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14141            }
14142            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14143                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14144            }
14145            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14146                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14147            }
14148            Ok(())
14149        }
14150    }
14151
14152    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpointsUnion {
14153        type Borrowed<'a> = &'a mut Self;
14154        fn take_or_borrow<'a>(
14155            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14156        ) -> Self::Borrowed<'a> {
14157            value
14158        }
14159    }
14160
14161    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpointsUnion {
14162        type Owned = Self;
14163
14164        #[inline(always)]
14165        fn inline_align(_context: fidl::encoding::Context) -> usize {
14166            8
14167        }
14168
14169        #[inline(always)]
14170        fn inline_size(_context: fidl::encoding::Context) -> usize {
14171            16
14172        }
14173    }
14174
14175    unsafe impl
14176        fidl::encoding::Encode<UnionOfEndpointsUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14177        for &mut UnionOfEndpointsUnion
14178    {
14179        #[inline]
14180        unsafe fn encode(
14181            self,
14182            encoder: &mut fidl::encoding::Encoder<
14183                '_,
14184                fidl::encoding::DefaultFuchsiaResourceDialect,
14185            >,
14186            offset: usize,
14187            _depth: fidl::encoding::Depth,
14188        ) -> fidl::Result<()> {
14189            encoder.debug_check_bounds::<UnionOfEndpointsUnion>(offset);
14190            encoder.write_num::<u64>(self.ordinal(), offset);
14191            match self {
14192            UnionOfEndpointsUnion::ClientEnd(ref mut val) => {
14193                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14194                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14195                    encoder, offset + 8, _depth
14196                )
14197            }
14198            UnionOfEndpointsUnion::ServerEnd(ref mut val) => {
14199                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14200                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14201                    encoder, offset + 8, _depth
14202                )
14203            }
14204            UnionOfEndpointsUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14205        }
14206        }
14207    }
14208
14209    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14210        for UnionOfEndpointsUnion
14211    {
14212        #[inline(always)]
14213        fn new_empty() -> Self {
14214            Self::__SourceBreaking { unknown_ordinal: 0 }
14215        }
14216
14217        #[inline]
14218        unsafe fn decode(
14219            &mut self,
14220            decoder: &mut fidl::encoding::Decoder<
14221                '_,
14222                fidl::encoding::DefaultFuchsiaResourceDialect,
14223            >,
14224            offset: usize,
14225            mut depth: fidl::encoding::Depth,
14226        ) -> fidl::Result<()> {
14227            decoder.debug_check_bounds::<Self>(offset);
14228            #[allow(unused_variables)]
14229            let next_out_of_line = decoder.next_out_of_line();
14230            let handles_before = decoder.remaining_handles();
14231            let (ordinal, inlined, num_bytes, num_handles) =
14232                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14233
14234            let member_inline_size = match ordinal {
14235            1 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14236            2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14237            0 => return Err(fidl::Error::UnknownUnionTag),
14238            _ => num_bytes as usize,
14239        };
14240
14241            if inlined != (member_inline_size <= 4) {
14242                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14243            }
14244            let _inner_offset;
14245            if inlined {
14246                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14247                _inner_offset = offset + 8;
14248            } else {
14249                depth.increment()?;
14250                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14251            }
14252            match ordinal {
14253                1 => {
14254                    #[allow(irrefutable_let_patterns)]
14255                    if let UnionOfEndpointsUnion::ClientEnd(_) = self {
14256                        // Do nothing, read the value into the object
14257                    } else {
14258                        // Initialize `self` to the right variant
14259                        *self = UnionOfEndpointsUnion::ClientEnd(fidl::new_empty!(
14260                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14261                            fidl::encoding::DefaultFuchsiaResourceDialect
14262                        ));
14263                    }
14264                    #[allow(irrefutable_let_patterns)]
14265                    if let UnionOfEndpointsUnion::ClientEnd(ref mut val) = self {
14266                        fidl::decode!(
14267                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14268                            fidl::encoding::DefaultFuchsiaResourceDialect,
14269                            val,
14270                            decoder,
14271                            _inner_offset,
14272                            depth
14273                        )?;
14274                    } else {
14275                        unreachable!()
14276                    }
14277                }
14278                2 => {
14279                    #[allow(irrefutable_let_patterns)]
14280                    if let UnionOfEndpointsUnion::ServerEnd(_) = self {
14281                        // Do nothing, read the value into the object
14282                    } else {
14283                        // Initialize `self` to the right variant
14284                        *self = UnionOfEndpointsUnion::ServerEnd(fidl::new_empty!(
14285                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14286                            fidl::encoding::DefaultFuchsiaResourceDialect
14287                        ));
14288                    }
14289                    #[allow(irrefutable_let_patterns)]
14290                    if let UnionOfEndpointsUnion::ServerEnd(ref mut val) = self {
14291                        fidl::decode!(
14292                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14293                            fidl::encoding::DefaultFuchsiaResourceDialect,
14294                            val,
14295                            decoder,
14296                            _inner_offset,
14297                            depth
14298                        )?;
14299                    } else {
14300                        unreachable!()
14301                    }
14302                }
14303                #[allow(deprecated)]
14304                ordinal => {
14305                    for _ in 0..num_handles {
14306                        decoder.drop_next_handle()?;
14307                    }
14308                    *self = UnionOfEndpointsUnion::__SourceBreaking { unknown_ordinal: ordinal };
14309                }
14310            }
14311            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14312                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14313            }
14314            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14315                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14316            }
14317            Ok(())
14318        }
14319    }
14320
14321    impl fidl::encoding::ResourceTypeMarker for UnionOfHandle {
14322        type Borrowed<'a> = &'a mut Self;
14323        fn take_or_borrow<'a>(
14324            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14325        ) -> Self::Borrowed<'a> {
14326            value
14327        }
14328    }
14329
14330    unsafe impl fidl::encoding::TypeMarker for UnionOfHandle {
14331        type Owned = Self;
14332
14333        #[inline(always)]
14334        fn inline_align(_context: fidl::encoding::Context) -> usize {
14335            8
14336        }
14337
14338        #[inline(always)]
14339        fn inline_size(_context: fidl::encoding::Context) -> usize {
14340            16
14341        }
14342    }
14343
14344    unsafe impl fidl::encoding::Encode<UnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
14345        for &mut UnionOfHandle
14346    {
14347        #[inline]
14348        unsafe fn encode(
14349            self,
14350            encoder: &mut fidl::encoding::Encoder<
14351                '_,
14352                fidl::encoding::DefaultFuchsiaResourceDialect,
14353            >,
14354            offset: usize,
14355            _depth: fidl::encoding::Depth,
14356        ) -> fidl::Result<()> {
14357            encoder.debug_check_bounds::<UnionOfHandle>(offset);
14358            encoder.write_num::<u64>(self.ordinal(), offset);
14359            match self {
14360                UnionOfHandle::H(ref mut val) => fidl::encoding::encode_in_envelope::<
14361                    fidl::encoding::HandleType<
14362                        fidl::Handle,
14363                        { fidl::ObjectType::NONE.into_raw() },
14364                        2147483648,
14365                    >,
14366                    fidl::encoding::DefaultFuchsiaResourceDialect,
14367                >(
14368                    <fidl::encoding::HandleType<
14369                        fidl::Handle,
14370                        { fidl::ObjectType::NONE.into_raw() },
14371                        2147483648,
14372                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14373                        val
14374                    ),
14375                    encoder,
14376                    offset + 8,
14377                    _depth,
14378                ),
14379            }
14380        }
14381    }
14382
14383    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {
14384        #[inline(always)]
14385        fn new_empty() -> Self {
14386            Self::H(
14387                fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14388            )
14389        }
14390
14391        #[inline]
14392        unsafe fn decode(
14393            &mut self,
14394            decoder: &mut fidl::encoding::Decoder<
14395                '_,
14396                fidl::encoding::DefaultFuchsiaResourceDialect,
14397            >,
14398            offset: usize,
14399            mut depth: fidl::encoding::Depth,
14400        ) -> fidl::Result<()> {
14401            decoder.debug_check_bounds::<Self>(offset);
14402            #[allow(unused_variables)]
14403            let next_out_of_line = decoder.next_out_of_line();
14404            let handles_before = decoder.remaining_handles();
14405            let (ordinal, inlined, num_bytes, num_handles) =
14406                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14407
14408            let member_inline_size = match ordinal {
14409                1 => <fidl::encoding::HandleType<
14410                    fidl::Handle,
14411                    { fidl::ObjectType::NONE.into_raw() },
14412                    2147483648,
14413                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14414                _ => return Err(fidl::Error::UnknownUnionTag),
14415            };
14416
14417            if inlined != (member_inline_size <= 4) {
14418                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14419            }
14420            let _inner_offset;
14421            if inlined {
14422                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14423                _inner_offset = offset + 8;
14424            } else {
14425                depth.increment()?;
14426                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14427            }
14428            match ordinal {
14429                1 => {
14430                    #[allow(irrefutable_let_patterns)]
14431                    if let UnionOfHandle::H(_) = self {
14432                        // Do nothing, read the value into the object
14433                    } else {
14434                        // Initialize `self` to the right variant
14435                        *self = UnionOfHandle::H(
14436                            fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14437                        );
14438                    }
14439                    #[allow(irrefutable_let_patterns)]
14440                    if let UnionOfHandle::H(ref mut val) = self {
14441                        fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14442                    } else {
14443                        unreachable!()
14444                    }
14445                }
14446                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14447            }
14448            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14449                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14450            }
14451            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14452                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14453            }
14454            Ok(())
14455        }
14456    }
14457
14458    impl fidl::encoding::ResourceTypeMarker for UnionWithVector {
14459        type Borrowed<'a> = &'a mut Self;
14460        fn take_or_borrow<'a>(
14461            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14462        ) -> Self::Borrowed<'a> {
14463            value
14464        }
14465    }
14466
14467    unsafe impl fidl::encoding::TypeMarker for UnionWithVector {
14468        type Owned = Self;
14469
14470        #[inline(always)]
14471        fn inline_align(_context: fidl::encoding::Context) -> usize {
14472            8
14473        }
14474
14475        #[inline(always)]
14476        fn inline_size(_context: fidl::encoding::Context) -> usize {
14477            16
14478        }
14479    }
14480
14481    unsafe impl
14482        fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>
14483        for &mut UnionWithVector
14484    {
14485        #[inline]
14486        unsafe fn encode(
14487            self,
14488            encoder: &mut fidl::encoding::Encoder<
14489                '_,
14490                fidl::encoding::DefaultFuchsiaResourceDialect,
14491            >,
14492            offset: usize,
14493            _depth: fidl::encoding::Depth,
14494        ) -> fidl::Result<()> {
14495            encoder.debug_check_bounds::<UnionWithVector>(offset);
14496            encoder.write_num::<u64>(self.ordinal(), offset);
14497            match self {
14498            UnionWithVector::Unused(ref val) => {
14499                fidl::encoding::encode_in_envelope::<u8, fidl::encoding::DefaultFuchsiaResourceDialect>(
14500                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
14501                    encoder, offset + 8, _depth
14502                )
14503            }
14504            UnionWithVector::VectorOfUint8(ref val) => {
14505                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14506                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(val),
14507                    encoder, offset + 8, _depth
14508                )
14509            }
14510            UnionWithVector::S(ref val) => {
14511                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, fidl::encoding::DefaultFuchsiaResourceDialect>(
14512                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
14513                    encoder, offset + 8, _depth
14514                )
14515            }
14516            UnionWithVector::VectorS3A1(ref val) => {
14517                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align1>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14518                    <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::ValueTypeMarker>::borrow(val),
14519                    encoder, offset + 8, _depth
14520                )
14521            }
14522            UnionWithVector::VectorS3A2(ref val) => {
14523                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14524                    <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14525                    encoder, offset + 8, _depth
14526                )
14527            }
14528            UnionWithVector::Handles(ref mut val) => {
14529                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14530                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14531                    encoder, offset + 8, _depth
14532                )
14533            }
14534            UnionWithVector::ArrayS3A1(ref val) => {
14535                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14536                    <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14537                    encoder, offset + 8, _depth
14538                )
14539            }
14540            UnionWithVector::ArrayS3A2(ref val) => {
14541                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14542                    <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14543                    encoder, offset + 8, _depth
14544                )
14545            }
14546            UnionWithVector::VectorUnion(ref val) => {
14547                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<UnionSize8Align4>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14548                    <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(val),
14549                    encoder, offset + 8, _depth
14550                )
14551            }
14552        }
14553        }
14554    }
14555
14556    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14557        for UnionWithVector
14558    {
14559        #[inline(always)]
14560        fn new_empty() -> Self {
14561            Self::Unused(fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect))
14562        }
14563
14564        #[inline]
14565        unsafe fn decode(
14566            &mut self,
14567            decoder: &mut fidl::encoding::Decoder<
14568                '_,
14569                fidl::encoding::DefaultFuchsiaResourceDialect,
14570            >,
14571            offset: usize,
14572            mut depth: fidl::encoding::Depth,
14573        ) -> fidl::Result<()> {
14574            decoder.debug_check_bounds::<Self>(offset);
14575            #[allow(unused_variables)]
14576            let next_out_of_line = decoder.next_out_of_line();
14577            let handles_before = decoder.remaining_handles();
14578            let (ordinal, inlined, num_bytes, num_handles) =
14579                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14580
14581            let member_inline_size = match ordinal {
14582            1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14583            2 => <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14584            3 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14585            4 => <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14586            5 => <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14587            6 => <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14588            7 => <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14589            8 => <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14590            9 => <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14591            _ => return Err(fidl::Error::UnknownUnionTag),
14592        };
14593
14594            if inlined != (member_inline_size <= 4) {
14595                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14596            }
14597            let _inner_offset;
14598            if inlined {
14599                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14600                _inner_offset = offset + 8;
14601            } else {
14602                depth.increment()?;
14603                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14604            }
14605            match ordinal {
14606                1 => {
14607                    #[allow(irrefutable_let_patterns)]
14608                    if let UnionWithVector::Unused(_) = self {
14609                        // Do nothing, read the value into the object
14610                    } else {
14611                        // Initialize `self` to the right variant
14612                        *self = UnionWithVector::Unused(fidl::new_empty!(
14613                            u8,
14614                            fidl::encoding::DefaultFuchsiaResourceDialect
14615                        ));
14616                    }
14617                    #[allow(irrefutable_let_patterns)]
14618                    if let UnionWithVector::Unused(ref mut val) = self {
14619                        fidl::decode!(
14620                            u8,
14621                            fidl::encoding::DefaultFuchsiaResourceDialect,
14622                            val,
14623                            decoder,
14624                            _inner_offset,
14625                            depth
14626                        )?;
14627                    } else {
14628                        unreachable!()
14629                    }
14630                }
14631                2 => {
14632                    #[allow(irrefutable_let_patterns)]
14633                    if let UnionWithVector::VectorOfUint8(_) = self {
14634                        // Do nothing, read the value into the object
14635                    } else {
14636                        // Initialize `self` to the right variant
14637                        *self = UnionWithVector::VectorOfUint8(fidl::new_empty!(
14638                            fidl::encoding::UnboundedVector<u8>,
14639                            fidl::encoding::DefaultFuchsiaResourceDialect
14640                        ));
14641                    }
14642                    #[allow(irrefutable_let_patterns)]
14643                    if let UnionWithVector::VectorOfUint8(ref mut val) = self {
14644                        fidl::decode!(
14645                            fidl::encoding::UnboundedVector<u8>,
14646                            fidl::encoding::DefaultFuchsiaResourceDialect,
14647                            val,
14648                            decoder,
14649                            _inner_offset,
14650                            depth
14651                        )?;
14652                    } else {
14653                        unreachable!()
14654                    }
14655                }
14656                3 => {
14657                    #[allow(irrefutable_let_patterns)]
14658                    if let UnionWithVector::S(_) = self {
14659                        // Do nothing, read the value into the object
14660                    } else {
14661                        // Initialize `self` to the right variant
14662                        *self = UnionWithVector::S(fidl::new_empty!(
14663                            fidl::encoding::UnboundedString,
14664                            fidl::encoding::DefaultFuchsiaResourceDialect
14665                        ));
14666                    }
14667                    #[allow(irrefutable_let_patterns)]
14668                    if let UnionWithVector::S(ref mut val) = self {
14669                        fidl::decode!(
14670                            fidl::encoding::UnboundedString,
14671                            fidl::encoding::DefaultFuchsiaResourceDialect,
14672                            val,
14673                            decoder,
14674                            _inner_offset,
14675                            depth
14676                        )?;
14677                    } else {
14678                        unreachable!()
14679                    }
14680                }
14681                4 => {
14682                    #[allow(irrefutable_let_patterns)]
14683                    if let UnionWithVector::VectorS3A1(_) = self {
14684                        // Do nothing, read the value into the object
14685                    } else {
14686                        // Initialize `self` to the right variant
14687                        *self = UnionWithVector::VectorS3A1(fidl::new_empty!(
14688                            fidl::encoding::UnboundedVector<StructSize3Align1>,
14689                            fidl::encoding::DefaultFuchsiaResourceDialect
14690                        ));
14691                    }
14692                    #[allow(irrefutable_let_patterns)]
14693                    if let UnionWithVector::VectorS3A1(ref mut val) = self {
14694                        fidl::decode!(
14695                            fidl::encoding::UnboundedVector<StructSize3Align1>,
14696                            fidl::encoding::DefaultFuchsiaResourceDialect,
14697                            val,
14698                            decoder,
14699                            _inner_offset,
14700                            depth
14701                        )?;
14702                    } else {
14703                        unreachable!()
14704                    }
14705                }
14706                5 => {
14707                    #[allow(irrefutable_let_patterns)]
14708                    if let UnionWithVector::VectorS3A2(_) = self {
14709                        // Do nothing, read the value into the object
14710                    } else {
14711                        // Initialize `self` to the right variant
14712                        *self = UnionWithVector::VectorS3A2(fidl::new_empty!(
14713                            fidl::encoding::UnboundedVector<StructSize3Align2>,
14714                            fidl::encoding::DefaultFuchsiaResourceDialect
14715                        ));
14716                    }
14717                    #[allow(irrefutable_let_patterns)]
14718                    if let UnionWithVector::VectorS3A2(ref mut val) = self {
14719                        fidl::decode!(
14720                            fidl::encoding::UnboundedVector<StructSize3Align2>,
14721                            fidl::encoding::DefaultFuchsiaResourceDialect,
14722                            val,
14723                            decoder,
14724                            _inner_offset,
14725                            depth
14726                        )?;
14727                    } else {
14728                        unreachable!()
14729                    }
14730                }
14731                6 => {
14732                    #[allow(irrefutable_let_patterns)]
14733                    if let UnionWithVector::Handles(_) = self {
14734                        // Do nothing, read the value into the object
14735                    } else {
14736                        // Initialize `self` to the right variant
14737                        *self = UnionWithVector::Handles(fidl::new_empty!(
14738                            fidl::encoding::UnboundedVector<
14739                                fidl::encoding::HandleType<
14740                                    fidl::Handle,
14741                                    { fidl::ObjectType::NONE.into_raw() },
14742                                    2147483648,
14743                                >,
14744                            >,
14745                            fidl::encoding::DefaultFuchsiaResourceDialect
14746                        ));
14747                    }
14748                    #[allow(irrefutable_let_patterns)]
14749                    if let UnionWithVector::Handles(ref mut val) = self {
14750                        fidl::decode!(
14751                            fidl::encoding::UnboundedVector<
14752                                fidl::encoding::HandleType<
14753                                    fidl::Handle,
14754                                    { fidl::ObjectType::NONE.into_raw() },
14755                                    2147483648,
14756                                >,
14757                            >,
14758                            fidl::encoding::DefaultFuchsiaResourceDialect,
14759                            val,
14760                            decoder,
14761                            _inner_offset,
14762                            depth
14763                        )?;
14764                    } else {
14765                        unreachable!()
14766                    }
14767                }
14768                7 => {
14769                    #[allow(irrefutable_let_patterns)]
14770                    if let UnionWithVector::ArrayS3A1(_) = self {
14771                        // Do nothing, read the value into the object
14772                    } else {
14773                        // Initialize `self` to the right variant
14774                        *self = UnionWithVector::ArrayS3A1(
14775                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14776                        );
14777                    }
14778                    #[allow(irrefutable_let_patterns)]
14779                    if let UnionWithVector::ArrayS3A1(ref mut val) = self {
14780                        fidl::decode!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14781                    } else {
14782                        unreachable!()
14783                    }
14784                }
14785                8 => {
14786                    #[allow(irrefutable_let_patterns)]
14787                    if let UnionWithVector::ArrayS3A2(_) = self {
14788                        // Do nothing, read the value into the object
14789                    } else {
14790                        // Initialize `self` to the right variant
14791                        *self = UnionWithVector::ArrayS3A2(
14792                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14793                        );
14794                    }
14795                    #[allow(irrefutable_let_patterns)]
14796                    if let UnionWithVector::ArrayS3A2(ref mut val) = self {
14797                        fidl::decode!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14798                    } else {
14799                        unreachable!()
14800                    }
14801                }
14802                9 => {
14803                    #[allow(irrefutable_let_patterns)]
14804                    if let UnionWithVector::VectorUnion(_) = self {
14805                        // Do nothing, read the value into the object
14806                    } else {
14807                        // Initialize `self` to the right variant
14808                        *self = UnionWithVector::VectorUnion(fidl::new_empty!(
14809                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
14810                            fidl::encoding::DefaultFuchsiaResourceDialect
14811                        ));
14812                    }
14813                    #[allow(irrefutable_let_patterns)]
14814                    if let UnionWithVector::VectorUnion(ref mut val) = self {
14815                        fidl::decode!(
14816                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
14817                            fidl::encoding::DefaultFuchsiaResourceDialect,
14818                            val,
14819                            decoder,
14820                            _inner_offset,
14821                            depth
14822                        )?;
14823                    } else {
14824                        unreachable!()
14825                    }
14826                }
14827                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14828            }
14829            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14830                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14831            }
14832            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14833                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14834            }
14835            Ok(())
14836        }
14837    }
14838
14839    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14840        type Borrowed<'a> = &'a mut Self;
14841        fn take_or_borrow<'a>(
14842            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14843        ) -> Self::Borrowed<'a> {
14844            value
14845        }
14846    }
14847
14848    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14849        type Owned = Self;
14850
14851        #[inline(always)]
14852        fn inline_align(_context: fidl::encoding::Context) -> usize {
14853            8
14854        }
14855
14856        #[inline(always)]
14857        fn inline_size(_context: fidl::encoding::Context) -> usize {
14858            16
14859        }
14860    }
14861
14862    unsafe impl
14863        fidl::encoding::Encode<
14864            VectorOfArrayOfEventInUnionWithReducedRights,
14865            fidl::encoding::DefaultFuchsiaResourceDialect,
14866        > for &mut VectorOfArrayOfEventInUnionWithReducedRights
14867    {
14868        #[inline]
14869        unsafe fn encode(
14870            self,
14871            encoder: &mut fidl::encoding::Encoder<
14872                '_,
14873                fidl::encoding::DefaultFuchsiaResourceDialect,
14874            >,
14875            offset: usize,
14876            _depth: fidl::encoding::Depth,
14877        ) -> fidl::Result<()> {
14878            encoder.debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRights>(offset);
14879            encoder.write_num::<u64>(self.ordinal(), offset);
14880            match self {
14881                VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) => {
14882                    fidl::encoding::encode_in_envelope::<
14883                        fidl::encoding::Vector<
14884                            fidl::encoding::Array<
14885                                fidl::encoding::HandleType<
14886                                    fidl::Event,
14887                                    { fidl::ObjectType::EVENT.into_raw() },
14888                                    49155,
14889                                >,
14890                                1,
14891                            >,
14892                            1,
14893                        >,
14894                        fidl::encoding::DefaultFuchsiaResourceDialect,
14895                    >(
14896                        <fidl::encoding::Vector<
14897                            fidl::encoding::Array<
14898                                fidl::encoding::HandleType<
14899                                    fidl::Event,
14900                                    { fidl::ObjectType::EVENT.into_raw() },
14901                                    49155,
14902                                >,
14903                                1,
14904                            >,
14905                            1,
14906                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14907                            val
14908                        ),
14909                        encoder,
14910                        offset + 8,
14911                        _depth,
14912                    )
14913                }
14914            }
14915        }
14916    }
14917
14918    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14919        for VectorOfArrayOfEventInUnionWithReducedRights
14920    {
14921        #[inline(always)]
14922        fn new_empty() -> Self {
14923            Self::H(fidl::new_empty!(
14924                fidl::encoding::Vector<
14925                    fidl::encoding::Array<
14926                        fidl::encoding::HandleType<
14927                            fidl::Event,
14928                            { fidl::ObjectType::EVENT.into_raw() },
14929                            49155,
14930                        >,
14931                        1,
14932                    >,
14933                    1,
14934                >,
14935                fidl::encoding::DefaultFuchsiaResourceDialect
14936            ))
14937        }
14938
14939        #[inline]
14940        unsafe fn decode(
14941            &mut self,
14942            decoder: &mut fidl::encoding::Decoder<
14943                '_,
14944                fidl::encoding::DefaultFuchsiaResourceDialect,
14945            >,
14946            offset: usize,
14947            mut depth: fidl::encoding::Depth,
14948        ) -> fidl::Result<()> {
14949            decoder.debug_check_bounds::<Self>(offset);
14950            #[allow(unused_variables)]
14951            let next_out_of_line = decoder.next_out_of_line();
14952            let handles_before = decoder.remaining_handles();
14953            let (ordinal, inlined, num_bytes, num_handles) =
14954                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14955
14956            let member_inline_size = match ordinal {
14957                1 => <fidl::encoding::Vector<
14958                    fidl::encoding::Array<
14959                        fidl::encoding::HandleType<
14960                            fidl::Event,
14961                            { fidl::ObjectType::EVENT.into_raw() },
14962                            49155,
14963                        >,
14964                        1,
14965                    >,
14966                    1,
14967                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14968                _ => return Err(fidl::Error::UnknownUnionTag),
14969            };
14970
14971            if inlined != (member_inline_size <= 4) {
14972                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14973            }
14974            let _inner_offset;
14975            if inlined {
14976                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14977                _inner_offset = offset + 8;
14978            } else {
14979                depth.increment()?;
14980                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14981            }
14982            match ordinal {
14983                1 => {
14984                    #[allow(irrefutable_let_patterns)]
14985                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(_) = self {
14986                        // Do nothing, read the value into the object
14987                    } else {
14988                        // Initialize `self` to the right variant
14989                        *self = VectorOfArrayOfEventInUnionWithReducedRights::H(fidl::new_empty!(
14990                            fidl::encoding::Vector<
14991                                fidl::encoding::Array<
14992                                    fidl::encoding::HandleType<
14993                                        fidl::Event,
14994                                        { fidl::ObjectType::EVENT.into_raw() },
14995                                        49155,
14996                                    >,
14997                                    1,
14998                                >,
14999                                1,
15000                            >,
15001                            fidl::encoding::DefaultFuchsiaResourceDialect
15002                        ));
15003                    }
15004                    #[allow(irrefutable_let_patterns)]
15005                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) = self {
15006                        fidl::decode!(
15007                            fidl::encoding::Vector<
15008                                fidl::encoding::Array<
15009                                    fidl::encoding::HandleType<
15010                                        fidl::Event,
15011                                        { fidl::ObjectType::EVENT.into_raw() },
15012                                        49155,
15013                                    >,
15014                                    1,
15015                                >,
15016                                1,
15017                            >,
15018                            fidl::encoding::DefaultFuchsiaResourceDialect,
15019                            val,
15020                            decoder,
15021                            _inner_offset,
15022                            depth
15023                        )?;
15024                    } else {
15025                        unreachable!()
15026                    }
15027                }
15028                ordinal => panic!("unexpected ordinal {:?}", ordinal),
15029            }
15030            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15031                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15032            }
15033            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15034                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15035            }
15036            Ok(())
15037        }
15038    }
15039}