Skip to main content

fidl_test_conformance/
fidl_test_conformance.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_test_conformance_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct AlternatingHandlesAndFailures {
16    pub h1: fidl::NullableHandle,
17    pub failure_trigger1: String,
18    pub h2: fidl::NullableHandle,
19    pub failure_trigger2: String,
20    pub h3: fidl::NullableHandle,
21}
22
23impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
24    for AlternatingHandlesAndFailures
25{
26}
27
28#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29pub struct ArrayOfArrayOfNonnullableHandles {
30    pub handles: [[fidl::NullableHandle; 3]; 4],
31}
32
33impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
34    for ArrayOfArrayOfNonnullableHandles
35{
36}
37
38#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39pub struct ArrayOfHandles {
40    pub a: [fidl::NullableHandle; 3],
41}
42
43impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfHandles {}
44
45#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
46pub struct ArrayOfNonnullableHandles {
47    pub handles: [fidl::NullableHandle; 4],
48}
49
50impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfNonnullableHandles {}
51
52#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
53pub struct ArrayOfNullableHandles {
54    pub handles: [Option<fidl::NullableHandle>; 5],
55}
56
57impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfNullableHandles {}
58
59#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
60pub struct ArrayOfOptionalHandles {
61    pub a: [Option<fidl::NullableHandle>; 3],
62}
63
64impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfOptionalHandles {}
65
66#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
67pub struct ArrayOfVectorOfEventInStructWithDefaultRights {
68    pub h: [Vec<fidl::Event>; 1],
69}
70
71impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
72    for ArrayOfVectorOfEventInStructWithDefaultRights
73{
74}
75
76#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
77pub struct ArrayOfVectorOfEventInStructWithReducedRights {
78    pub h: [Vec<fidl::Event>; 1],
79}
80
81impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
82    for ArrayOfVectorOfEventInStructWithReducedRights
83{
84}
85
86#[derive(Debug, PartialEq)]
87pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
88    pub t: ArrayOfVectorOfEventInTableWithDefaultRights,
89}
90
91impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
92    for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
93{
94}
95
96#[derive(Debug, PartialEq)]
97pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct {
98    pub t: ArrayOfVectorOfEventInTableWithReducedRights,
99}
100
101impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
102    for ArrayOfVectorOfEventInTableWithReducedRightsStruct
103{
104}
105
106#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
107pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
108    pub u: ArrayOfVectorOfEventInUnionWithDefaultRights,
109}
110
111impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
112    for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
113{
114}
115
116#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
117pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
118    pub u: ArrayOfVectorOfEventInUnionWithReducedRights,
119}
120
121impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
122    for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
123{
124}
125
126#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
127pub struct Bounded32NonnullableVectorOfHandles {
128    pub vh0: Vec<fidl::NullableHandle>,
129}
130
131impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
132    for Bounded32NonnullableVectorOfHandles
133{
134}
135
136#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
137pub struct Bounded32NullableVectorOfHandles {
138    pub vh0: Option<Vec<fidl::NullableHandle>>,
139}
140
141impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
142    for Bounded32NullableVectorOfHandles
143{
144}
145
146#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
147pub struct BoxOfSingleHandle {
148    pub b: Option<Box<SingleHandle>>,
149}
150
151impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BoxOfSingleHandle {}
152
153#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
154pub struct BoxOfSingleOptionalHandle {
155    pub b: Option<Box<SingleOptionalHandle>>,
156}
157
158impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BoxOfSingleOptionalHandle {}
159
160#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161pub struct CreateComponentRequest {
162    pub launch_info: LaunchInfo,
163    pub controller: Option<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
164}
165
166impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CreateComponentRequest {}
167
168#[derive(Debug, PartialEq)]
169pub struct EmptyResourceTableStruct {
170    pub table: EmptyResourceTable,
171}
172
173impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EmptyResourceTableStruct {}
174
175#[derive(Debug, PartialEq)]
176pub struct EnvelopeInliningTestUnionStruct {
177    pub u: EnvelopeInliningTestUnion,
178}
179
180impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
181    for EnvelopeInliningTestUnionStruct
182{
183}
184
185#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
186pub struct EventWithDefaultRights {
187    pub h: fidl::Event,
188}
189
190impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EventWithDefaultRights {}
191
192#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
193pub struct EventWithReducedRights {
194    pub h: fidl::Event,
195}
196
197impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EventWithReducedRights {}
198
199#[derive(Debug, PartialEq)]
200pub struct FidlvizDemo {
201    pub f1: u8,
202    pub f2: i8,
203    pub f3: u16,
204    pub f4: u32,
205    pub f5: u64,
206    pub f6: u8,
207    pub f7: u8,
208    pub f8: u16,
209    pub f9: f32,
210    pub f10: f64,
211    pub f11: bool,
212    pub f12: bool,
213    pub f13: String,
214    pub f14: Option<String>,
215    pub f15: String,
216    pub f16: Option<fidl::NullableHandle>,
217    pub f17: fidl::NullableHandle,
218    pub f18: [u8; 3],
219    pub f19: Vec<f64>,
220    pub f20: Option<Vec<u8>>,
221    pub f21: Vec<u8>,
222    pub f22: FidlvizBits,
223    pub f23: FidlvizEnum,
224    pub f24: FidlvizStruct1,
225    pub f25: FidlvizStruct2,
226    pub f26: Option<Box<FidlvizStruct1>>,
227    pub f27: Option<Box<FidlvizStruct2>>,
228    pub f28: FidlvizTable,
229    pub f29: FidlvizTable,
230    pub f30: Option<Box<FidlvizUnion>>,
231    pub f31: FidlvizUnion,
232}
233
234impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {}
235
236#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
237pub struct GoldenHandleBasicRightsStruct {
238    pub v: fidl::Event,
239}
240
241impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
242    for GoldenHandleBasicRightsStruct
243{
244}
245
246#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
247pub struct GoldenNullableHandleStruct {
248    pub v: Option<fidl::NullableHandle>,
249}
250
251impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
252    for GoldenNullableHandleStruct
253{
254}
255
256#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
257pub struct LaunchInfo {
258    pub url: String,
259    pub arguments: Option<Vec<String>>,
260    pub out: Option<Box<TransformerEmptyStruct>>,
261    pub err: Option<Box<TransformerEmptyStruct>>,
262    pub directory_request: Option<fidl::Channel>,
263    pub flat_namespace: Option<Box<TransformerEmptyStruct>>,
264    pub additional_services: Option<Box<TransformerEmptyStruct>>,
265}
266
267impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {}
268
269#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
270pub struct MultipleBoundedNonnullableVectorsOfHandles {
271    pub vh0: Vec<fidl::NullableHandle>,
272    pub vh1: Vec<fidl::NullableHandle>,
273}
274
275impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
276    for MultipleBoundedNonnullableVectorsOfHandles
277{
278}
279
280#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
281pub struct MultipleBoundedNullableVectorsOfHandles {
282    pub vh0: Option<Vec<fidl::NullableHandle>>,
283    pub vh1: Option<Vec<fidl::NullableHandle>>,
284}
285
286impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
287    for MultipleBoundedNullableVectorsOfHandles
288{
289}
290
291#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
292pub struct MultipleHandleSubtypes {
293    pub untyped: fidl::NullableHandle,
294    pub event: fidl::Event,
295    pub channel: fidl::Channel,
296}
297
298impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for MultipleHandleSubtypes {}
299
300#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
301pub struct MultipleNonnullableHandles {
302    pub data0: u32,
303    pub handle0: fidl::NullableHandle,
304    pub data1: u64,
305    pub handle1: fidl::Channel,
306    pub handle2: fidl::Event,
307    pub data2: u64,
308}
309
310impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
311    for MultipleNonnullableHandles
312{
313}
314
315#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
316pub struct MultipleNullableHandles {
317    pub data0: u32,
318    pub handle0: Option<fidl::NullableHandle>,
319    pub data1: u64,
320    pub handle1: Option<fidl::Channel>,
321    pub handle2: Option<fidl::Event>,
322    pub data2: u64,
323}
324
325impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for MultipleNullableHandles {}
326
327#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
328pub struct NonnullableHandle {
329    pub h: fidl::NullableHandle,
330}
331
332impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NonnullableHandle {}
333
334#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
335pub struct NonnullableHandleArray {
336    pub handles: [fidl::NullableHandle; 4],
337}
338
339impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NonnullableHandleArray {}
340
341#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
342pub struct NullableHandle {
343    pub h: Option<fidl::NullableHandle>,
344}
345
346impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NullableHandle {}
347
348#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
349pub struct OutOfLineArrayOfNonnullableHandles {
350    pub handles: Option<Box<NonnullableHandleArray>>,
351}
352
353impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
354    for OutOfLineArrayOfNonnullableHandles
355{
356}
357
358#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
359pub struct Sandwich6 {
360    pub before: u32,
361    pub the_union: UnionWithVector,
362    pub after: u32,
363}
364
365impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {}
366
367#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
368pub struct ShortStringThenHandle {
369    pub s: String,
370    pub h: fidl::NullableHandle,
371}
372
373impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ShortStringThenHandle {}
374
375#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
376pub struct SingleHandle {
377    pub h: fidl::NullableHandle,
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {}
381
382#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
383pub struct SingleOptionalHandle {
384    pub h: Option<fidl::NullableHandle>,
385}
386
387impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SingleOptionalHandle {}
388
389#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
390pub struct StructOfEndpoints {
391    pub client_end: fidl::endpoints::ClientEnd<ProtocolMarker>,
392    pub optional_client_end: Option<fidl::endpoints::ClientEnd<ProtocolMarker>>,
393    pub server_end: fidl::endpoints::ServerEnd<ProtocolMarker>,
394    pub optional_server_end: Option<fidl::endpoints::ServerEnd<ProtocolMarker>>,
395}
396
397impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for StructOfEndpoints {}
398
399#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
400pub struct StructOfOptionalUnionOfHandle {
401    pub u: Option<Box<UnionOfHandle>>,
402}
403
404impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
405    for StructOfOptionalUnionOfHandle
406{
407}
408
409#[derive(Debug, PartialEq)]
410pub struct StructOfSimpleResourceTable {
411    pub table: SimpleResourceTable,
412}
413
414impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
415    for StructOfSimpleResourceTable
416{
417}
418
419#[derive(Debug, PartialEq)]
420pub struct TableFieldInlinedHandleStruct {
421    pub t: TableFieldInlinedHandle,
422}
423
424impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
425    for TableFieldInlinedHandleStruct
426{
427}
428
429#[derive(Debug, PartialEq)]
430pub struct TableFieldUnknownResourceStruct {
431    pub t: TableFieldUnknownResource,
432}
433
434impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
435    for TableFieldUnknownResourceStruct
436{
437}
438
439#[derive(Debug, PartialEq)]
440pub struct TableOfEndpoints {
441    pub t: TableOfEndpointsTable,
442}
443
444impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableOfEndpoints {}
445
446#[derive(Debug, PartialEq)]
447pub struct TableUnionWithVectorReservedSandwichStruct {
448    pub table: TableUnionWithVectorReservedSandwich,
449}
450
451impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
452    for TableUnionWithVectorReservedSandwichStruct
453{
454}
455
456#[derive(Debug, PartialEq)]
457pub struct TableUnionWithVectorStructSandwichStruct {
458    pub table: TableUnionWithVectorStructSandwich,
459}
460
461impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
462    for TableUnionWithVectorStructSandwichStruct
463{
464}
465
466#[derive(Debug, PartialEq)]
467pub struct TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
468    pub t: TableWithUnknownEnvelopesAfterKnownEnvelopes,
469}
470
471impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
472    for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
473{
474}
475
476#[derive(Debug, PartialEq)]
477pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
478    pub t: TableWithUnknownEnvelopesBeforeKnownEnvelopes,
479}
480
481impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
482    for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
483{
484}
485
486#[derive(Debug, PartialEq)]
487pub struct TestFlexibleResourceXUnionInStruct {
488    pub xu: SampleResourceXUnion,
489}
490
491impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
492    for TestFlexibleResourceXUnionInStruct
493{
494}
495
496#[derive(Debug, PartialEq)]
497pub struct TestOptionalFlexibleResourceXUnionInStruct {
498    pub xu: Option<Box<SampleResourceXUnion>>,
499}
500
501impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
502    for TestOptionalFlexibleResourceXUnionInStruct
503{
504}
505
506#[derive(Debug, PartialEq)]
507pub struct TestOptionalStrictResourceXUnionInStruct {
508    pub xu: Option<Box<SampleStrictResourceXUnion>>,
509}
510
511impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
512    for TestOptionalStrictResourceXUnionInStruct
513{
514}
515
516#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
517pub struct TestPackageResolverResolveRequest {
518    pub package_url: String,
519    pub selectors: Vec<String>,
520    pub update_policy: UpdatePolicy,
521    pub this_should_be_a_handle: u32,
522}
523
524impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
525    for TestPackageResolverResolveRequest
526{
527}
528
529#[derive(Debug, PartialEq)]
530pub struct TestStrictResourceXUnionInStruct {
531    pub xu: SampleStrictResourceXUnion,
532}
533
534impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
535    for TestStrictResourceXUnionInStruct
536{
537}
538
539#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
540pub struct UnboundedNonnullableVectorOfHandles {
541    pub vh0: Vec<fidl::NullableHandle>,
542}
543
544impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
545    for UnboundedNonnullableVectorOfHandles
546{
547}
548
549#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
550pub struct UnboundedNullableVectorOfHandles {
551    pub vh0: Option<Vec<fidl::NullableHandle>>,
552}
553
554impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
555    for UnboundedNullableVectorOfHandles
556{
557}
558
559#[derive(Debug, PartialEq)]
560pub struct UnionOfEndpoints {
561    pub u: UnionOfEndpointsUnion,
562}
563
564impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpoints {}
565
566#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
567pub struct VectorOfArrayOfEventInStructWithDefaultRights {
568    pub h: Vec<[fidl::Event; 1]>,
569}
570
571impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
572    for VectorOfArrayOfEventInStructWithDefaultRights
573{
574}
575
576#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
577pub struct VectorOfArrayOfEventInStructWithReducedRights {
578    pub h: Vec<[fidl::Event; 1]>,
579}
580
581impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
582    for VectorOfArrayOfEventInStructWithReducedRights
583{
584}
585
586#[derive(Debug, PartialEq)]
587pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct {
588    pub t: VectorOfArrayOfEventInTableWithReducedRights,
589}
590
591impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
592    for VectorOfArrayOfEventInTableWithReducedRightsStruct
593{
594}
595
596#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
597pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct {
598    pub u: VectorOfArrayOfEventInUnionWithReducedRights,
599}
600
601impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
602    for VectorOfArrayOfEventInUnionWithReducedRightsStruct
603{
604}
605
606#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
607pub struct VectorOfHandles {
608    pub v: Vec<fidl::NullableHandle>,
609}
610
611impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfHandles {}
612
613#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
614pub struct VectorOfOptionalHandles {
615    pub v: Vec<Option<fidl::NullableHandle>>,
616}
617
618impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfOptionalHandles {}
619
620#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
621pub struct VectorOfUpTo2Handles {
622    pub v: Vec<fidl::NullableHandle>,
623}
624
625impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfUpTo2Handles {}
626
627#[derive(Debug, Default, PartialEq)]
628pub struct ArrayOfVectorOfEventInTableWithDefaultRights {
629    pub h: Option<[Vec<fidl::Event>; 1]>,
630    #[doc(hidden)]
631    pub __source_breaking: fidl::marker::SourceBreaking,
632}
633
634impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
635    for ArrayOfVectorOfEventInTableWithDefaultRights
636{
637}
638
639#[derive(Debug, Default, PartialEq)]
640pub struct ArrayOfVectorOfEventInTableWithReducedRights {
641    pub h: Option<[Vec<fidl::Event>; 1]>,
642    #[doc(hidden)]
643    pub __source_breaking: fidl::marker::SourceBreaking,
644}
645
646impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
647    for ArrayOfVectorOfEventInTableWithReducedRights
648{
649}
650
651#[derive(Debug, Default, PartialEq)]
652pub struct EmptyResourceTable {
653    #[doc(hidden)]
654    pub __source_breaking: fidl::marker::SourceBreaking,
655}
656
657impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EmptyResourceTable {}
658
659#[derive(Debug, Default, PartialEq)]
660pub struct SimpleResourceTable {
661    pub x: Option<i64>,
662    pub y: Option<i64>,
663    #[doc(hidden)]
664    pub __source_breaking: fidl::marker::SourceBreaking,
665}
666
667impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SimpleResourceTable {}
668
669#[derive(Debug, Default, PartialEq)]
670pub struct TableFieldInlinedHandle {
671    pub f: Option<fidl::Channel>,
672    #[doc(hidden)]
673    pub __source_breaking: fidl::marker::SourceBreaking,
674}
675
676impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableFieldInlinedHandle {}
677
678#[derive(Debug, Default, PartialEq)]
679pub struct TableFieldUnknownResource {
680    #[doc(hidden)]
681    pub __source_breaking: fidl::marker::SourceBreaking,
682}
683
684impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableFieldUnknownResource {}
685
686#[derive(Debug, Default, PartialEq)]
687pub struct TableOfEndpointsTable {
688    pub client_end: Option<fidl::endpoints::ClientEnd<ProtocolMarker>>,
689    pub server_end: Option<fidl::endpoints::ServerEnd<ProtocolMarker>>,
690    #[doc(hidden)]
691    pub __source_breaking: fidl::marker::SourceBreaking,
692}
693
694impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableOfEndpointsTable {}
695
696#[derive(Debug, Default, PartialEq)]
697pub struct TableUnionWithVectorReservedSandwich {
698    pub uv: Option<UnionWithVector>,
699    #[doc(hidden)]
700    pub __source_breaking: fidl::marker::SourceBreaking,
701}
702
703impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
704    for TableUnionWithVectorReservedSandwich
705{
706}
707
708#[derive(Debug, Default, PartialEq)]
709pub struct TableUnionWithVectorStructSandwich {
710    pub s1: Option<StructSize3Align1>,
711    pub uv: Option<UnionWithVector>,
712    pub s2: Option<StructSize3Align1>,
713    #[doc(hidden)]
714    pub __source_breaking: fidl::marker::SourceBreaking,
715}
716
717impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
718    for TableUnionWithVectorStructSandwich
719{
720}
721
722#[derive(Debug, Default, PartialEq)]
723pub struct TableWithUnknownEnvelopesAfterKnownEnvelopes {
724    pub a: Option<fidl::Event>,
725    #[doc(hidden)]
726    pub __source_breaking: fidl::marker::SourceBreaking,
727}
728
729impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
730    for TableWithUnknownEnvelopesAfterKnownEnvelopes
731{
732}
733
734#[derive(Debug, Default, PartialEq)]
735pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopes {
736    pub b: Option<fidl::Event>,
737    #[doc(hidden)]
738    pub __source_breaking: fidl::marker::SourceBreaking,
739}
740
741impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
742    for TableWithUnknownEnvelopesBeforeKnownEnvelopes
743{
744}
745
746#[derive(Debug, Default, PartialEq)]
747pub struct VectorOfArrayOfEventInTableWithReducedRights {
748    pub h: Option<Vec<[fidl::Event; 1]>>,
749    #[doc(hidden)]
750    pub __source_breaking: fidl::marker::SourceBreaking,
751}
752
753impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
754    for VectorOfArrayOfEventInTableWithReducedRights
755{
756}
757
758#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
759pub enum ArrayOfVectorOfEventInUnionWithDefaultRights {
760    H([Vec<fidl::Event>; 1]),
761}
762
763impl ArrayOfVectorOfEventInUnionWithDefaultRights {
764    #[inline]
765    pub fn ordinal(&self) -> u64 {
766        match *self {
767            Self::H(_) => 1,
768        }
769    }
770}
771
772impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
773    for ArrayOfVectorOfEventInUnionWithDefaultRights
774{
775}
776
777#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
778pub enum ArrayOfVectorOfEventInUnionWithReducedRights {
779    H([Vec<fidl::Event>; 1]),
780}
781
782impl ArrayOfVectorOfEventInUnionWithReducedRights {
783    #[inline]
784    pub fn ordinal(&self) -> u64 {
785        match *self {
786            Self::H(_) => 1,
787        }
788    }
789}
790
791impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
792    for ArrayOfVectorOfEventInUnionWithReducedRights
793{
794}
795
796#[derive(Debug)]
797pub enum EnvelopeInliningTestUnion {
798    Small(u32),
799    Large(u64),
800    Handle(fidl::NullableHandle),
801    #[doc(hidden)]
802    __SourceBreaking {
803        unknown_ordinal: u64,
804    },
805}
806
807/// Pattern that matches an unknown `EnvelopeInliningTestUnion` member.
808#[macro_export]
809macro_rules! EnvelopeInliningTestUnionUnknown {
810    () => {
811        _
812    };
813}
814
815// Custom PartialEq so that unknown variants are not equal to themselves.
816impl PartialEq for EnvelopeInliningTestUnion {
817    fn eq(&self, other: &Self) -> bool {
818        match (self, other) {
819            (Self::Small(x), Self::Small(y)) => *x == *y,
820            (Self::Large(x), Self::Large(y)) => *x == *y,
821            (Self::Handle(x), Self::Handle(y)) => *x == *y,
822            _ => false,
823        }
824    }
825}
826
827impl EnvelopeInliningTestUnion {
828    #[inline]
829    pub fn ordinal(&self) -> u64 {
830        match *self {
831            Self::Small(_) => 1,
832            Self::Large(_) => 2,
833            Self::Handle(_) => 3,
834            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
835        }
836    }
837
838    #[inline]
839    pub fn unknown_variant_for_testing() -> Self {
840        Self::__SourceBreaking { unknown_ordinal: 0 }
841    }
842
843    #[inline]
844    pub fn is_unknown(&self) -> bool {
845        match self {
846            Self::__SourceBreaking { .. } => true,
847            _ => false,
848        }
849    }
850}
851
852impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EnvelopeInliningTestUnion {}
853
854#[derive(Debug)]
855pub enum SampleResourceXUnion {
856    U(u32),
857    Su(SimpleUnion),
858    St(SimpleTable),
859    #[doc(hidden)]
860    __SourceBreaking {
861        unknown_ordinal: u64,
862    },
863}
864
865/// Pattern that matches an unknown `SampleResourceXUnion` member.
866#[macro_export]
867macro_rules! SampleResourceXUnionUnknown {
868    () => {
869        _
870    };
871}
872
873// Custom PartialEq so that unknown variants are not equal to themselves.
874impl PartialEq for SampleResourceXUnion {
875    fn eq(&self, other: &Self) -> bool {
876        match (self, other) {
877            (Self::U(x), Self::U(y)) => *x == *y,
878            (Self::Su(x), Self::Su(y)) => *x == *y,
879            (Self::St(x), Self::St(y)) => *x == *y,
880            _ => false,
881        }
882    }
883}
884
885impl SampleResourceXUnion {
886    #[inline]
887    pub fn ordinal(&self) -> u64 {
888        match *self {
889            Self::U(_) => 1,
890            Self::Su(_) => 2,
891            Self::St(_) => 3,
892            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
893        }
894    }
895
896    #[inline]
897    pub fn unknown_variant_for_testing() -> Self {
898        Self::__SourceBreaking { unknown_ordinal: 0 }
899    }
900
901    #[inline]
902    pub fn is_unknown(&self) -> bool {
903        match self {
904            Self::__SourceBreaking { .. } => true,
905            _ => false,
906        }
907    }
908}
909
910impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SampleResourceXUnion {}
911
912#[derive(Debug, PartialEq)]
913pub enum SampleStrictResourceXUnion {
914    U(u32),
915    Su(SimpleUnion),
916    St(SimpleTable),
917}
918
919impl SampleStrictResourceXUnion {
920    #[inline]
921    pub fn ordinal(&self) -> u64 {
922        match *self {
923            Self::U(_) => 1,
924            Self::Su(_) => 2,
925            Self::St(_) => 3,
926        }
927    }
928}
929
930impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
931    for SampleStrictResourceXUnion
932{
933}
934
935#[derive(Debug)]
936pub enum UnionOfEndpointsUnion {
937    ClientEnd(fidl::endpoints::ClientEnd<ProtocolMarker>),
938    ServerEnd(fidl::endpoints::ServerEnd<ProtocolMarker>),
939    #[doc(hidden)]
940    __SourceBreaking {
941        unknown_ordinal: u64,
942    },
943}
944
945/// Pattern that matches an unknown `UnionOfEndpointsUnion` member.
946#[macro_export]
947macro_rules! UnionOfEndpointsUnionUnknown {
948    () => {
949        _
950    };
951}
952
953// Custom PartialEq so that unknown variants are not equal to themselves.
954impl PartialEq for UnionOfEndpointsUnion {
955    fn eq(&self, other: &Self) -> bool {
956        match (self, other) {
957            (Self::ClientEnd(x), Self::ClientEnd(y)) => *x == *y,
958            (Self::ServerEnd(x), Self::ServerEnd(y)) => *x == *y,
959            _ => false,
960        }
961    }
962}
963
964impl UnionOfEndpointsUnion {
965    #[inline]
966    pub fn ordinal(&self) -> u64 {
967        match *self {
968            Self::ClientEnd(_) => 1,
969            Self::ServerEnd(_) => 2,
970            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
971        }
972    }
973
974    #[inline]
975    pub fn unknown_variant_for_testing() -> Self {
976        Self::__SourceBreaking { unknown_ordinal: 0 }
977    }
978
979    #[inline]
980    pub fn is_unknown(&self) -> bool {
981        match self {
982            Self::__SourceBreaking { .. } => true,
983            _ => false,
984        }
985    }
986}
987
988impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpointsUnion {}
989
990#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
991pub enum UnionOfHandle {
992    H(fidl::NullableHandle),
993}
994
995impl UnionOfHandle {
996    #[inline]
997    pub fn ordinal(&self) -> u64 {
998        match *self {
999            Self::H(_) => 1,
1000        }
1001    }
1002}
1003
1004impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {}
1005
1006#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1007pub enum UnionWithVector {
1008    Unused(u8),
1009    VectorOfUint8(Vec<u8>),
1010    S(String),
1011    VectorS3A1(Vec<StructSize3Align1>),
1012    VectorS3A2(Vec<StructSize3Align2>),
1013    Handles(Vec<fidl::NullableHandle>),
1014    ArrayS3A1([StructSize3Align1; 2]),
1015    ArrayS3A2([StructSize3Align2; 2]),
1016    VectorUnion(Vec<UnionSize8Align4>),
1017}
1018
1019impl UnionWithVector {
1020    #[inline]
1021    pub fn ordinal(&self) -> u64 {
1022        match *self {
1023            Self::Unused(_) => 1,
1024            Self::VectorOfUint8(_) => 2,
1025            Self::S(_) => 3,
1026            Self::VectorS3A1(_) => 4,
1027            Self::VectorS3A2(_) => 5,
1028            Self::Handles(_) => 6,
1029            Self::ArrayS3A1(_) => 7,
1030            Self::ArrayS3A2(_) => 8,
1031            Self::VectorUnion(_) => 9,
1032        }
1033    }
1034}
1035
1036impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionWithVector {}
1037
1038#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1039pub enum VectorOfArrayOfEventInUnionWithReducedRights {
1040    H(Vec<[fidl::Event; 1]>),
1041}
1042
1043impl VectorOfArrayOfEventInUnionWithReducedRights {
1044    #[inline]
1045    pub fn ordinal(&self) -> u64 {
1046        match *self {
1047            Self::H(_) => 1,
1048        }
1049    }
1050}
1051
1052impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
1053    for VectorOfArrayOfEventInUnionWithReducedRights
1054{
1055}
1056
1057#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1058pub struct ComponentControllerMarker;
1059
1060impl fidl::endpoints::ProtocolMarker for ComponentControllerMarker {
1061    type Proxy = ComponentControllerProxy;
1062    type RequestStream = ComponentControllerRequestStream;
1063    #[cfg(target_os = "fuchsia")]
1064    type SynchronousProxy = ComponentControllerSynchronousProxy;
1065
1066    const DEBUG_NAME: &'static str = "(anonymous) ComponentController";
1067}
1068
1069pub trait ComponentControllerProxyInterface: Send + Sync {}
1070#[derive(Debug)]
1071#[cfg(target_os = "fuchsia")]
1072pub struct ComponentControllerSynchronousProxy {
1073    client: fidl::client::sync::Client,
1074}
1075
1076#[cfg(target_os = "fuchsia")]
1077impl fidl::endpoints::SynchronousProxy for ComponentControllerSynchronousProxy {
1078    type Proxy = ComponentControllerProxy;
1079    type Protocol = ComponentControllerMarker;
1080
1081    fn from_channel(inner: fidl::Channel) -> Self {
1082        Self::new(inner)
1083    }
1084
1085    fn into_channel(self) -> fidl::Channel {
1086        self.client.into_channel()
1087    }
1088
1089    fn as_channel(&self) -> &fidl::Channel {
1090        self.client.as_channel()
1091    }
1092}
1093
1094#[cfg(target_os = "fuchsia")]
1095impl ComponentControllerSynchronousProxy {
1096    pub fn new(channel: fidl::Channel) -> Self {
1097        Self { client: fidl::client::sync::Client::new(channel) }
1098    }
1099
1100    pub fn into_channel(self) -> fidl::Channel {
1101        self.client.into_channel()
1102    }
1103
1104    /// Waits until an event arrives and returns it. It is safe for other
1105    /// threads to make concurrent requests while waiting for an event.
1106    pub fn wait_for_event(
1107        &self,
1108        deadline: zx::MonotonicInstant,
1109    ) -> Result<ComponentControllerEvent, fidl::Error> {
1110        ComponentControllerEvent::decode(
1111            self.client.wait_for_event::<ComponentControllerMarker>(deadline)?,
1112        )
1113    }
1114}
1115
1116#[cfg(target_os = "fuchsia")]
1117impl From<ComponentControllerSynchronousProxy> for zx::NullableHandle {
1118    fn from(value: ComponentControllerSynchronousProxy) -> Self {
1119        value.into_channel().into()
1120    }
1121}
1122
1123#[cfg(target_os = "fuchsia")]
1124impl From<fidl::Channel> for ComponentControllerSynchronousProxy {
1125    fn from(value: fidl::Channel) -> Self {
1126        Self::new(value)
1127    }
1128}
1129
1130#[cfg(target_os = "fuchsia")]
1131impl fidl::endpoints::FromClient for ComponentControllerSynchronousProxy {
1132    type Protocol = ComponentControllerMarker;
1133
1134    fn from_client(value: fidl::endpoints::ClientEnd<ComponentControllerMarker>) -> Self {
1135        Self::new(value.into_channel())
1136    }
1137}
1138
1139#[derive(Debug, Clone)]
1140pub struct ComponentControllerProxy {
1141    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1142}
1143
1144impl fidl::endpoints::Proxy for ComponentControllerProxy {
1145    type Protocol = ComponentControllerMarker;
1146
1147    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1148        Self::new(inner)
1149    }
1150
1151    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1152        self.client.into_channel().map_err(|client| Self { client })
1153    }
1154
1155    fn as_channel(&self) -> &::fidl::AsyncChannel {
1156        self.client.as_channel()
1157    }
1158}
1159
1160impl ComponentControllerProxy {
1161    /// Create a new Proxy for test.conformance/ComponentController.
1162    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1163        let protocol_name =
1164            <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1165        Self { client: fidl::client::Client::new(channel, protocol_name) }
1166    }
1167
1168    /// Get a Stream of events from the remote end of the protocol.
1169    ///
1170    /// # Panics
1171    ///
1172    /// Panics if the event stream was already taken.
1173    pub fn take_event_stream(&self) -> ComponentControllerEventStream {
1174        ComponentControllerEventStream { event_receiver: self.client.take_event_receiver() }
1175    }
1176}
1177
1178impl ComponentControllerProxyInterface for ComponentControllerProxy {}
1179
1180pub struct ComponentControllerEventStream {
1181    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1182}
1183
1184impl std::marker::Unpin for ComponentControllerEventStream {}
1185
1186impl futures::stream::FusedStream for ComponentControllerEventStream {
1187    fn is_terminated(&self) -> bool {
1188        self.event_receiver.is_terminated()
1189    }
1190}
1191
1192impl futures::Stream for ComponentControllerEventStream {
1193    type Item = Result<ComponentControllerEvent, fidl::Error>;
1194
1195    fn poll_next(
1196        mut self: std::pin::Pin<&mut Self>,
1197        cx: &mut std::task::Context<'_>,
1198    ) -> std::task::Poll<Option<Self::Item>> {
1199        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1200            &mut self.event_receiver,
1201            cx
1202        )?) {
1203            Some(buf) => std::task::Poll::Ready(Some(ComponentControllerEvent::decode(buf))),
1204            None => std::task::Poll::Ready(None),
1205        }
1206    }
1207}
1208
1209#[derive(Debug)]
1210pub enum ComponentControllerEvent {}
1211
1212impl ComponentControllerEvent {
1213    /// Decodes a message buffer as a [`ComponentControllerEvent`].
1214    fn decode(
1215        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1216    ) -> Result<ComponentControllerEvent, fidl::Error> {
1217        let (bytes, _handles) = buf.split_mut();
1218        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1219        debug_assert_eq!(tx_header.tx_id, 0);
1220        match tx_header.ordinal {
1221            _ => Err(fidl::Error::UnknownOrdinal {
1222                ordinal: tx_header.ordinal,
1223                protocol_name:
1224                    <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1225            }),
1226        }
1227    }
1228}
1229
1230/// A Stream of incoming requests for test.conformance/ComponentController.
1231pub struct ComponentControllerRequestStream {
1232    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1233    is_terminated: bool,
1234}
1235
1236impl std::marker::Unpin for ComponentControllerRequestStream {}
1237
1238impl futures::stream::FusedStream for ComponentControllerRequestStream {
1239    fn is_terminated(&self) -> bool {
1240        self.is_terminated
1241    }
1242}
1243
1244impl fidl::endpoints::RequestStream for ComponentControllerRequestStream {
1245    type Protocol = ComponentControllerMarker;
1246    type ControlHandle = ComponentControllerControlHandle;
1247
1248    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1249        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1250    }
1251
1252    fn control_handle(&self) -> Self::ControlHandle {
1253        ComponentControllerControlHandle { inner: self.inner.clone() }
1254    }
1255
1256    fn into_inner(
1257        self,
1258    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1259    {
1260        (self.inner, self.is_terminated)
1261    }
1262
1263    fn from_inner(
1264        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1265        is_terminated: bool,
1266    ) -> Self {
1267        Self { inner, is_terminated }
1268    }
1269}
1270
1271impl futures::Stream for ComponentControllerRequestStream {
1272    type Item = Result<ComponentControllerRequest, fidl::Error>;
1273
1274    fn poll_next(
1275        mut self: std::pin::Pin<&mut Self>,
1276        cx: &mut std::task::Context<'_>,
1277    ) -> std::task::Poll<Option<Self::Item>> {
1278        let this = &mut *self;
1279        if this.inner.check_shutdown(cx) {
1280            this.is_terminated = true;
1281            return std::task::Poll::Ready(None);
1282        }
1283        if this.is_terminated {
1284            panic!("polled ComponentControllerRequestStream after completion");
1285        }
1286        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1287            |bytes, handles| {
1288                match this.inner.channel().read_etc(cx, bytes, handles) {
1289                    std::task::Poll::Ready(Ok(())) => {}
1290                    std::task::Poll::Pending => return std::task::Poll::Pending,
1291                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1292                        this.is_terminated = true;
1293                        return std::task::Poll::Ready(None);
1294                    }
1295                    std::task::Poll::Ready(Err(e)) => {
1296                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1297                            e.into(),
1298                        ))));
1299                    }
1300                }
1301
1302                // A message has been received from the channel
1303                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1304
1305                std::task::Poll::Ready(Some(match header.ordinal {
1306                _ => Err(fidl::Error::UnknownOrdinal {
1307                    ordinal: header.ordinal,
1308                    protocol_name: <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1309                }),
1310            }))
1311            },
1312        )
1313    }
1314}
1315
1316#[derive(Debug)]
1317pub enum ComponentControllerRequest {}
1318
1319impl ComponentControllerRequest {
1320    /// Name of the method defined in FIDL
1321    pub fn method_name(&self) -> &'static str {
1322        match *self {}
1323    }
1324}
1325
1326#[derive(Debug, Clone)]
1327pub struct ComponentControllerControlHandle {
1328    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1329}
1330
1331impl ComponentControllerControlHandle {
1332    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
1333        self.inner.shutdown_with_epitaph(status.into())
1334    }
1335}
1336
1337impl fidl::endpoints::ControlHandle for ComponentControllerControlHandle {
1338    fn shutdown(&self) {
1339        self.inner.shutdown()
1340    }
1341
1342    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
1343        self.inner.shutdown_with_epitaph(status)
1344    }
1345
1346    fn is_closed(&self) -> bool {
1347        self.inner.channel().is_closed()
1348    }
1349    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1350        self.inner.channel().on_closed()
1351    }
1352
1353    #[cfg(target_os = "fuchsia")]
1354    fn signal_peer(
1355        &self,
1356        clear_mask: zx::Signals,
1357        set_mask: zx::Signals,
1358    ) -> Result<(), zx_status::Status> {
1359        use fidl::Peered;
1360        self.inner.channel().signal_peer(clear_mask, set_mask)
1361    }
1362}
1363
1364impl ComponentControllerControlHandle {}
1365
1366#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1367pub struct ProtocolMarker;
1368
1369impl fidl::endpoints::ProtocolMarker for ProtocolMarker {
1370    type Proxy = ProtocolProxy;
1371    type RequestStream = ProtocolRequestStream;
1372    #[cfg(target_os = "fuchsia")]
1373    type SynchronousProxy = ProtocolSynchronousProxy;
1374
1375    const DEBUG_NAME: &'static str = "(anonymous) Protocol";
1376}
1377
1378pub trait ProtocolProxyInterface: Send + Sync {}
1379#[derive(Debug)]
1380#[cfg(target_os = "fuchsia")]
1381pub struct ProtocolSynchronousProxy {
1382    client: fidl::client::sync::Client,
1383}
1384
1385#[cfg(target_os = "fuchsia")]
1386impl fidl::endpoints::SynchronousProxy for ProtocolSynchronousProxy {
1387    type Proxy = ProtocolProxy;
1388    type Protocol = ProtocolMarker;
1389
1390    fn from_channel(inner: fidl::Channel) -> Self {
1391        Self::new(inner)
1392    }
1393
1394    fn into_channel(self) -> fidl::Channel {
1395        self.client.into_channel()
1396    }
1397
1398    fn as_channel(&self) -> &fidl::Channel {
1399        self.client.as_channel()
1400    }
1401}
1402
1403#[cfg(target_os = "fuchsia")]
1404impl ProtocolSynchronousProxy {
1405    pub fn new(channel: fidl::Channel) -> Self {
1406        Self { client: fidl::client::sync::Client::new(channel) }
1407    }
1408
1409    pub fn into_channel(self) -> fidl::Channel {
1410        self.client.into_channel()
1411    }
1412
1413    /// Waits until an event arrives and returns it. It is safe for other
1414    /// threads to make concurrent requests while waiting for an event.
1415    pub fn wait_for_event(
1416        &self,
1417        deadline: zx::MonotonicInstant,
1418    ) -> Result<ProtocolEvent, fidl::Error> {
1419        ProtocolEvent::decode(self.client.wait_for_event::<ProtocolMarker>(deadline)?)
1420    }
1421}
1422
1423#[cfg(target_os = "fuchsia")]
1424impl From<ProtocolSynchronousProxy> for zx::NullableHandle {
1425    fn from(value: ProtocolSynchronousProxy) -> Self {
1426        value.into_channel().into()
1427    }
1428}
1429
1430#[cfg(target_os = "fuchsia")]
1431impl From<fidl::Channel> for ProtocolSynchronousProxy {
1432    fn from(value: fidl::Channel) -> Self {
1433        Self::new(value)
1434    }
1435}
1436
1437#[cfg(target_os = "fuchsia")]
1438impl fidl::endpoints::FromClient for ProtocolSynchronousProxy {
1439    type Protocol = ProtocolMarker;
1440
1441    fn from_client(value: fidl::endpoints::ClientEnd<ProtocolMarker>) -> Self {
1442        Self::new(value.into_channel())
1443    }
1444}
1445
1446#[derive(Debug, Clone)]
1447pub struct ProtocolProxy {
1448    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1449}
1450
1451impl fidl::endpoints::Proxy for ProtocolProxy {
1452    type Protocol = ProtocolMarker;
1453
1454    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1455        Self::new(inner)
1456    }
1457
1458    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1459        self.client.into_channel().map_err(|client| Self { client })
1460    }
1461
1462    fn as_channel(&self) -> &::fidl::AsyncChannel {
1463        self.client.as_channel()
1464    }
1465}
1466
1467impl ProtocolProxy {
1468    /// Create a new Proxy for test.conformance/Protocol.
1469    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1470        let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1471        Self { client: fidl::client::Client::new(channel, protocol_name) }
1472    }
1473
1474    /// Get a Stream of events from the remote end of the protocol.
1475    ///
1476    /// # Panics
1477    ///
1478    /// Panics if the event stream was already taken.
1479    pub fn take_event_stream(&self) -> ProtocolEventStream {
1480        ProtocolEventStream { event_receiver: self.client.take_event_receiver() }
1481    }
1482}
1483
1484impl ProtocolProxyInterface for ProtocolProxy {}
1485
1486pub struct ProtocolEventStream {
1487    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1488}
1489
1490impl std::marker::Unpin for ProtocolEventStream {}
1491
1492impl futures::stream::FusedStream for ProtocolEventStream {
1493    fn is_terminated(&self) -> bool {
1494        self.event_receiver.is_terminated()
1495    }
1496}
1497
1498impl futures::Stream for ProtocolEventStream {
1499    type Item = Result<ProtocolEvent, fidl::Error>;
1500
1501    fn poll_next(
1502        mut self: std::pin::Pin<&mut Self>,
1503        cx: &mut std::task::Context<'_>,
1504    ) -> std::task::Poll<Option<Self::Item>> {
1505        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1506            &mut self.event_receiver,
1507            cx
1508        )?) {
1509            Some(buf) => std::task::Poll::Ready(Some(ProtocolEvent::decode(buf))),
1510            None => std::task::Poll::Ready(None),
1511        }
1512    }
1513}
1514
1515#[derive(Debug)]
1516pub enum ProtocolEvent {}
1517
1518impl ProtocolEvent {
1519    /// Decodes a message buffer as a [`ProtocolEvent`].
1520    fn decode(
1521        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1522    ) -> Result<ProtocolEvent, fidl::Error> {
1523        let (bytes, _handles) = buf.split_mut();
1524        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1525        debug_assert_eq!(tx_header.tx_id, 0);
1526        match tx_header.ordinal {
1527            _ => Err(fidl::Error::UnknownOrdinal {
1528                ordinal: tx_header.ordinal,
1529                protocol_name: <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1530            }),
1531        }
1532    }
1533}
1534
1535/// A Stream of incoming requests for test.conformance/Protocol.
1536pub struct ProtocolRequestStream {
1537    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1538    is_terminated: bool,
1539}
1540
1541impl std::marker::Unpin for ProtocolRequestStream {}
1542
1543impl futures::stream::FusedStream for ProtocolRequestStream {
1544    fn is_terminated(&self) -> bool {
1545        self.is_terminated
1546    }
1547}
1548
1549impl fidl::endpoints::RequestStream for ProtocolRequestStream {
1550    type Protocol = ProtocolMarker;
1551    type ControlHandle = ProtocolControlHandle;
1552
1553    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1554        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1555    }
1556
1557    fn control_handle(&self) -> Self::ControlHandle {
1558        ProtocolControlHandle { inner: self.inner.clone() }
1559    }
1560
1561    fn into_inner(
1562        self,
1563    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1564    {
1565        (self.inner, self.is_terminated)
1566    }
1567
1568    fn from_inner(
1569        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1570        is_terminated: bool,
1571    ) -> Self {
1572        Self { inner, is_terminated }
1573    }
1574}
1575
1576impl futures::Stream for ProtocolRequestStream {
1577    type Item = Result<ProtocolRequest, fidl::Error>;
1578
1579    fn poll_next(
1580        mut self: std::pin::Pin<&mut Self>,
1581        cx: &mut std::task::Context<'_>,
1582    ) -> std::task::Poll<Option<Self::Item>> {
1583        let this = &mut *self;
1584        if this.inner.check_shutdown(cx) {
1585            this.is_terminated = true;
1586            return std::task::Poll::Ready(None);
1587        }
1588        if this.is_terminated {
1589            panic!("polled ProtocolRequestStream after completion");
1590        }
1591        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1592            |bytes, handles| {
1593                match this.inner.channel().read_etc(cx, bytes, handles) {
1594                    std::task::Poll::Ready(Ok(())) => {}
1595                    std::task::Poll::Pending => return std::task::Poll::Pending,
1596                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1597                        this.is_terminated = true;
1598                        return std::task::Poll::Ready(None);
1599                    }
1600                    std::task::Poll::Ready(Err(e)) => {
1601                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1602                            e.into(),
1603                        ))));
1604                    }
1605                }
1606
1607                // A message has been received from the channel
1608                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1609
1610                std::task::Poll::Ready(Some(match header.ordinal {
1611                    _ => Err(fidl::Error::UnknownOrdinal {
1612                        ordinal: header.ordinal,
1613                        protocol_name:
1614                            <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1615                    }),
1616                }))
1617            },
1618        )
1619    }
1620}
1621
1622#[derive(Debug)]
1623pub enum ProtocolRequest {}
1624
1625impl ProtocolRequest {
1626    /// Name of the method defined in FIDL
1627    pub fn method_name(&self) -> &'static str {
1628        match *self {}
1629    }
1630}
1631
1632#[derive(Debug, Clone)]
1633pub struct ProtocolControlHandle {
1634    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1635}
1636
1637impl ProtocolControlHandle {
1638    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
1639        self.inner.shutdown_with_epitaph(status.into())
1640    }
1641}
1642
1643impl fidl::endpoints::ControlHandle for ProtocolControlHandle {
1644    fn shutdown(&self) {
1645        self.inner.shutdown()
1646    }
1647
1648    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
1649        self.inner.shutdown_with_epitaph(status)
1650    }
1651
1652    fn is_closed(&self) -> bool {
1653        self.inner.channel().is_closed()
1654    }
1655    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1656        self.inner.channel().on_closed()
1657    }
1658
1659    #[cfg(target_os = "fuchsia")]
1660    fn signal_peer(
1661        &self,
1662        clear_mask: zx::Signals,
1663        set_mask: zx::Signals,
1664    ) -> Result<(), zx_status::Status> {
1665        use fidl::Peered;
1666        self.inner.channel().signal_peer(clear_mask, set_mask)
1667    }
1668}
1669
1670impl ProtocolControlHandle {}
1671
1672mod internal {
1673    use super::*;
1674
1675    impl fidl::encoding::ResourceTypeMarker for AlternatingHandlesAndFailures {
1676        type Borrowed<'a> = &'a mut Self;
1677        fn take_or_borrow<'a>(
1678            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1679        ) -> Self::Borrowed<'a> {
1680            value
1681        }
1682    }
1683
1684    unsafe impl fidl::encoding::TypeMarker for AlternatingHandlesAndFailures {
1685        type Owned = Self;
1686
1687        #[inline(always)]
1688        fn inline_align(_context: fidl::encoding::Context) -> usize {
1689            8
1690        }
1691
1692        #[inline(always)]
1693        fn inline_size(_context: fidl::encoding::Context) -> usize {
1694            56
1695        }
1696    }
1697
1698    unsafe impl
1699        fidl::encoding::Encode<
1700            AlternatingHandlesAndFailures,
1701            fidl::encoding::DefaultFuchsiaResourceDialect,
1702        > for &mut AlternatingHandlesAndFailures
1703    {
1704        #[inline]
1705        unsafe fn encode(
1706            self,
1707            encoder: &mut fidl::encoding::Encoder<
1708                '_,
1709                fidl::encoding::DefaultFuchsiaResourceDialect,
1710            >,
1711            offset: usize,
1712            _depth: fidl::encoding::Depth,
1713        ) -> fidl::Result<()> {
1714            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1715            // Delegate to tuple encoding.
1716            fidl::encoding::Encode::<
1717                AlternatingHandlesAndFailures,
1718                fidl::encoding::DefaultFuchsiaResourceDialect,
1719            >::encode(
1720                (
1721                    <fidl::encoding::HandleType<
1722                        fidl::NullableHandle,
1723                        { fidl::ObjectType::NONE.into_raw() },
1724                        2147483648,
1725                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1726                        &mut self.h1
1727                    ),
1728                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1729                        &self.failure_trigger1,
1730                    ),
1731                    <fidl::encoding::HandleType<
1732                        fidl::NullableHandle,
1733                        { fidl::ObjectType::NONE.into_raw() },
1734                        2147483648,
1735                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1736                        &mut self.h2
1737                    ),
1738                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1739                        &self.failure_trigger2,
1740                    ),
1741                    <fidl::encoding::HandleType<
1742                        fidl::NullableHandle,
1743                        { fidl::ObjectType::NONE.into_raw() },
1744                        2147483648,
1745                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1746                        &mut self.h3
1747                    ),
1748                ),
1749                encoder,
1750                offset,
1751                _depth,
1752            )
1753        }
1754    }
1755    unsafe impl<
1756        T0: fidl::encoding::Encode<
1757                fidl::encoding::HandleType<
1758                    fidl::NullableHandle,
1759                    { fidl::ObjectType::NONE.into_raw() },
1760                    2147483648,
1761                >,
1762                fidl::encoding::DefaultFuchsiaResourceDialect,
1763            >,
1764        T1: fidl::encoding::Encode<
1765                fidl::encoding::BoundedString<1>,
1766                fidl::encoding::DefaultFuchsiaResourceDialect,
1767            >,
1768        T2: fidl::encoding::Encode<
1769                fidl::encoding::HandleType<
1770                    fidl::NullableHandle,
1771                    { fidl::ObjectType::NONE.into_raw() },
1772                    2147483648,
1773                >,
1774                fidl::encoding::DefaultFuchsiaResourceDialect,
1775            >,
1776        T3: fidl::encoding::Encode<
1777                fidl::encoding::BoundedString<1>,
1778                fidl::encoding::DefaultFuchsiaResourceDialect,
1779            >,
1780        T4: fidl::encoding::Encode<
1781                fidl::encoding::HandleType<
1782                    fidl::NullableHandle,
1783                    { fidl::ObjectType::NONE.into_raw() },
1784                    2147483648,
1785                >,
1786                fidl::encoding::DefaultFuchsiaResourceDialect,
1787            >,
1788    >
1789        fidl::encoding::Encode<
1790            AlternatingHandlesAndFailures,
1791            fidl::encoding::DefaultFuchsiaResourceDialect,
1792        > for (T0, T1, T2, T3, T4)
1793    {
1794        #[inline]
1795        unsafe fn encode(
1796            self,
1797            encoder: &mut fidl::encoding::Encoder<
1798                '_,
1799                fidl::encoding::DefaultFuchsiaResourceDialect,
1800            >,
1801            offset: usize,
1802            depth: fidl::encoding::Depth,
1803        ) -> fidl::Result<()> {
1804            encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1805            // Zero out padding regions. There's no need to apply masks
1806            // because the unmasked parts will be overwritten by fields.
1807            unsafe {
1808                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1809                (ptr as *mut u64).write_unaligned(0);
1810            }
1811            unsafe {
1812                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1813                (ptr as *mut u64).write_unaligned(0);
1814            }
1815            unsafe {
1816                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
1817                (ptr as *mut u64).write_unaligned(0);
1818            }
1819            // Write the fields.
1820            self.0.encode(encoder, offset + 0, depth)?;
1821            self.1.encode(encoder, offset + 8, depth)?;
1822            self.2.encode(encoder, offset + 24, depth)?;
1823            self.3.encode(encoder, offset + 32, depth)?;
1824            self.4.encode(encoder, offset + 48, depth)?;
1825            Ok(())
1826        }
1827    }
1828
1829    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1830        for AlternatingHandlesAndFailures
1831    {
1832        #[inline(always)]
1833        fn new_empty() -> Self {
1834            Self {
1835                h1: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1836                failure_trigger1: fidl::new_empty!(
1837                    fidl::encoding::BoundedString<1>,
1838                    fidl::encoding::DefaultFuchsiaResourceDialect
1839                ),
1840                h2: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1841                failure_trigger2: fidl::new_empty!(
1842                    fidl::encoding::BoundedString<1>,
1843                    fidl::encoding::DefaultFuchsiaResourceDialect
1844                ),
1845                h3: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1846            }
1847        }
1848
1849        #[inline]
1850        unsafe fn decode(
1851            &mut self,
1852            decoder: &mut fidl::encoding::Decoder<
1853                '_,
1854                fidl::encoding::DefaultFuchsiaResourceDialect,
1855            >,
1856            offset: usize,
1857            _depth: fidl::encoding::Depth,
1858        ) -> fidl::Result<()> {
1859            decoder.debug_check_bounds::<Self>(offset);
1860            // Verify that padding bytes are zero.
1861            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1862            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1863            let mask = 0xffffffff00000000u64;
1864            let maskedval = padval & mask;
1865            if maskedval != 0 {
1866                return Err(fidl::Error::NonZeroPadding {
1867                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1868                });
1869            }
1870            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1871            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1872            let mask = 0xffffffff00000000u64;
1873            let maskedval = padval & mask;
1874            if maskedval != 0 {
1875                return Err(fidl::Error::NonZeroPadding {
1876                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1877                });
1878            }
1879            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
1880            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1881            let mask = 0xffffffff00000000u64;
1882            let maskedval = padval & mask;
1883            if maskedval != 0 {
1884                return Err(fidl::Error::NonZeroPadding {
1885                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
1886                });
1887            }
1888            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h1, decoder, offset + 0, _depth)?;
1889            fidl::decode!(
1890                fidl::encoding::BoundedString<1>,
1891                fidl::encoding::DefaultFuchsiaResourceDialect,
1892                &mut self.failure_trigger1,
1893                decoder,
1894                offset + 8,
1895                _depth
1896            )?;
1897            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h2, decoder, offset + 24, _depth)?;
1898            fidl::decode!(
1899                fidl::encoding::BoundedString<1>,
1900                fidl::encoding::DefaultFuchsiaResourceDialect,
1901                &mut self.failure_trigger2,
1902                decoder,
1903                offset + 32,
1904                _depth
1905            )?;
1906            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h3, decoder, offset + 48, _depth)?;
1907            Ok(())
1908        }
1909    }
1910
1911    impl fidl::encoding::ResourceTypeMarker for ArrayOfArrayOfNonnullableHandles {
1912        type Borrowed<'a> = &'a mut Self;
1913        fn take_or_borrow<'a>(
1914            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1915        ) -> Self::Borrowed<'a> {
1916            value
1917        }
1918    }
1919
1920    unsafe impl fidl::encoding::TypeMarker for ArrayOfArrayOfNonnullableHandles {
1921        type Owned = Self;
1922
1923        #[inline(always)]
1924        fn inline_align(_context: fidl::encoding::Context) -> usize {
1925            4
1926        }
1927
1928        #[inline(always)]
1929        fn inline_size(_context: fidl::encoding::Context) -> usize {
1930            48
1931        }
1932    }
1933
1934    unsafe impl
1935        fidl::encoding::Encode<
1936            ArrayOfArrayOfNonnullableHandles,
1937            fidl::encoding::DefaultFuchsiaResourceDialect,
1938        > for &mut ArrayOfArrayOfNonnullableHandles
1939    {
1940        #[inline]
1941        unsafe fn encode(
1942            self,
1943            encoder: &mut fidl::encoding::Encoder<
1944                '_,
1945                fidl::encoding::DefaultFuchsiaResourceDialect,
1946            >,
1947            offset: usize,
1948            _depth: fidl::encoding::Depth,
1949        ) -> fidl::Result<()> {
1950            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1951            // Delegate to tuple encoding.
1952            fidl::encoding::Encode::<
1953                ArrayOfArrayOfNonnullableHandles,
1954                fidl::encoding::DefaultFuchsiaResourceDialect,
1955            >::encode(
1956                (<fidl::encoding::Array<
1957                    fidl::encoding::Array<
1958                        fidl::encoding::HandleType<
1959                            fidl::NullableHandle,
1960                            { fidl::ObjectType::NONE.into_raw() },
1961                            2147483648,
1962                        >,
1963                        3,
1964                    >,
1965                    4,
1966                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1967                    &mut self.handles
1968                ),),
1969                encoder,
1970                offset,
1971                _depth,
1972            )
1973        }
1974    }
1975    unsafe impl<
1976        T0: fidl::encoding::Encode<
1977                fidl::encoding::Array<
1978                    fidl::encoding::Array<
1979                        fidl::encoding::HandleType<
1980                            fidl::NullableHandle,
1981                            { fidl::ObjectType::NONE.into_raw() },
1982                            2147483648,
1983                        >,
1984                        3,
1985                    >,
1986                    4,
1987                >,
1988                fidl::encoding::DefaultFuchsiaResourceDialect,
1989            >,
1990    >
1991        fidl::encoding::Encode<
1992            ArrayOfArrayOfNonnullableHandles,
1993            fidl::encoding::DefaultFuchsiaResourceDialect,
1994        > for (T0,)
1995    {
1996        #[inline]
1997        unsafe fn encode(
1998            self,
1999            encoder: &mut fidl::encoding::Encoder<
2000                '_,
2001                fidl::encoding::DefaultFuchsiaResourceDialect,
2002            >,
2003            offset: usize,
2004            depth: fidl::encoding::Depth,
2005        ) -> fidl::Result<()> {
2006            encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
2007            // Zero out padding regions. There's no need to apply masks
2008            // because the unmasked parts will be overwritten by fields.
2009            // Write the fields.
2010            self.0.encode(encoder, offset + 0, depth)?;
2011            Ok(())
2012        }
2013    }
2014
2015    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2016        for ArrayOfArrayOfNonnullableHandles
2017    {
2018        #[inline(always)]
2019        fn new_empty() -> Self {
2020            Self {
2021                handles: fidl::new_empty!(
2022                    fidl::encoding::Array<
2023                        fidl::encoding::Array<
2024                            fidl::encoding::HandleType<
2025                                fidl::NullableHandle,
2026                                { fidl::ObjectType::NONE.into_raw() },
2027                                2147483648,
2028                            >,
2029                            3,
2030                        >,
2031                        4,
2032                    >,
2033                    fidl::encoding::DefaultFuchsiaResourceDialect
2034                ),
2035            }
2036        }
2037
2038        #[inline]
2039        unsafe fn decode(
2040            &mut self,
2041            decoder: &mut fidl::encoding::Decoder<
2042                '_,
2043                fidl::encoding::DefaultFuchsiaResourceDialect,
2044            >,
2045            offset: usize,
2046            _depth: fidl::encoding::Depth,
2047        ) -> fidl::Result<()> {
2048            decoder.debug_check_bounds::<Self>(offset);
2049            // Verify that padding bytes are zero.
2050            fidl::decode!(
2051                fidl::encoding::Array<
2052                    fidl::encoding::Array<
2053                        fidl::encoding::HandleType<
2054                            fidl::NullableHandle,
2055                            { fidl::ObjectType::NONE.into_raw() },
2056                            2147483648,
2057                        >,
2058                        3,
2059                    >,
2060                    4,
2061                >,
2062                fidl::encoding::DefaultFuchsiaResourceDialect,
2063                &mut self.handles,
2064                decoder,
2065                offset + 0,
2066                _depth
2067            )?;
2068            Ok(())
2069        }
2070    }
2071
2072    impl fidl::encoding::ResourceTypeMarker for ArrayOfHandles {
2073        type Borrowed<'a> = &'a mut Self;
2074        fn take_or_borrow<'a>(
2075            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2076        ) -> Self::Borrowed<'a> {
2077            value
2078        }
2079    }
2080
2081    unsafe impl fidl::encoding::TypeMarker for ArrayOfHandles {
2082        type Owned = Self;
2083
2084        #[inline(always)]
2085        fn inline_align(_context: fidl::encoding::Context) -> usize {
2086            4
2087        }
2088
2089        #[inline(always)]
2090        fn inline_size(_context: fidl::encoding::Context) -> usize {
2091            12
2092        }
2093    }
2094
2095    unsafe impl
2096        fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2097        for &mut ArrayOfHandles
2098    {
2099        #[inline]
2100        unsafe fn encode(
2101            self,
2102            encoder: &mut fidl::encoding::Encoder<
2103                '_,
2104                fidl::encoding::DefaultFuchsiaResourceDialect,
2105            >,
2106            offset: usize,
2107            _depth: fidl::encoding::Depth,
2108        ) -> fidl::Result<()> {
2109            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2110            // Delegate to tuple encoding.
2111            fidl::encoding::Encode::<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2112                (
2113                    <fidl::encoding::Array<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.a),
2114                ),
2115                encoder, offset, _depth
2116            )
2117        }
2118    }
2119    unsafe impl<
2120        T0: fidl::encoding::Encode<
2121                fidl::encoding::Array<
2122                    fidl::encoding::HandleType<
2123                        fidl::NullableHandle,
2124                        { fidl::ObjectType::NONE.into_raw() },
2125                        2147483648,
2126                    >,
2127                    3,
2128                >,
2129                fidl::encoding::DefaultFuchsiaResourceDialect,
2130            >,
2131    > fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2132        for (T0,)
2133    {
2134        #[inline]
2135        unsafe fn encode(
2136            self,
2137            encoder: &mut fidl::encoding::Encoder<
2138                '_,
2139                fidl::encoding::DefaultFuchsiaResourceDialect,
2140            >,
2141            offset: usize,
2142            depth: fidl::encoding::Depth,
2143        ) -> fidl::Result<()> {
2144            encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2145            // Zero out padding regions. There's no need to apply masks
2146            // because the unmasked parts will be overwritten by fields.
2147            // Write the fields.
2148            self.0.encode(encoder, offset + 0, depth)?;
2149            Ok(())
2150        }
2151    }
2152
2153    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2154        for ArrayOfHandles
2155    {
2156        #[inline(always)]
2157        fn new_empty() -> Self {
2158            Self {
2159                a: fidl::new_empty!(
2160                    fidl::encoding::Array<
2161                        fidl::encoding::HandleType<
2162                            fidl::NullableHandle,
2163                            { fidl::ObjectType::NONE.into_raw() },
2164                            2147483648,
2165                        >,
2166                        3,
2167                    >,
2168                    fidl::encoding::DefaultFuchsiaResourceDialect
2169                ),
2170            }
2171        }
2172
2173        #[inline]
2174        unsafe fn decode(
2175            &mut self,
2176            decoder: &mut fidl::encoding::Decoder<
2177                '_,
2178                fidl::encoding::DefaultFuchsiaResourceDialect,
2179            >,
2180            offset: usize,
2181            _depth: fidl::encoding::Depth,
2182        ) -> fidl::Result<()> {
2183            decoder.debug_check_bounds::<Self>(offset);
2184            // Verify that padding bytes are zero.
2185            fidl::decode!(
2186                fidl::encoding::Array<
2187                    fidl::encoding::HandleType<
2188                        fidl::NullableHandle,
2189                        { fidl::ObjectType::NONE.into_raw() },
2190                        2147483648,
2191                    >,
2192                    3,
2193                >,
2194                fidl::encoding::DefaultFuchsiaResourceDialect,
2195                &mut self.a,
2196                decoder,
2197                offset + 0,
2198                _depth
2199            )?;
2200            Ok(())
2201        }
2202    }
2203
2204    impl fidl::encoding::ResourceTypeMarker for ArrayOfNonnullableHandles {
2205        type Borrowed<'a> = &'a mut Self;
2206        fn take_or_borrow<'a>(
2207            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2208        ) -> Self::Borrowed<'a> {
2209            value
2210        }
2211    }
2212
2213    unsafe impl fidl::encoding::TypeMarker for ArrayOfNonnullableHandles {
2214        type Owned = Self;
2215
2216        #[inline(always)]
2217        fn inline_align(_context: fidl::encoding::Context) -> usize {
2218            4
2219        }
2220
2221        #[inline(always)]
2222        fn inline_size(_context: fidl::encoding::Context) -> usize {
2223            16
2224        }
2225    }
2226
2227    unsafe impl
2228        fidl::encoding::Encode<
2229            ArrayOfNonnullableHandles,
2230            fidl::encoding::DefaultFuchsiaResourceDialect,
2231        > for &mut ArrayOfNonnullableHandles
2232    {
2233        #[inline]
2234        unsafe fn encode(
2235            self,
2236            encoder: &mut fidl::encoding::Encoder<
2237                '_,
2238                fidl::encoding::DefaultFuchsiaResourceDialect,
2239            >,
2240            offset: usize,
2241            _depth: fidl::encoding::Depth,
2242        ) -> fidl::Result<()> {
2243            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2244            // Delegate to tuple encoding.
2245            fidl::encoding::Encode::<
2246                ArrayOfNonnullableHandles,
2247                fidl::encoding::DefaultFuchsiaResourceDialect,
2248            >::encode(
2249                (<fidl::encoding::Array<
2250                    fidl::encoding::HandleType<
2251                        fidl::NullableHandle,
2252                        { fidl::ObjectType::NONE.into_raw() },
2253                        2147483648,
2254                    >,
2255                    4,
2256                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2257                    &mut self.handles
2258                ),),
2259                encoder,
2260                offset,
2261                _depth,
2262            )
2263        }
2264    }
2265    unsafe impl<
2266        T0: fidl::encoding::Encode<
2267                fidl::encoding::Array<
2268                    fidl::encoding::HandleType<
2269                        fidl::NullableHandle,
2270                        { fidl::ObjectType::NONE.into_raw() },
2271                        2147483648,
2272                    >,
2273                    4,
2274                >,
2275                fidl::encoding::DefaultFuchsiaResourceDialect,
2276            >,
2277    >
2278        fidl::encoding::Encode<
2279            ArrayOfNonnullableHandles,
2280            fidl::encoding::DefaultFuchsiaResourceDialect,
2281        > for (T0,)
2282    {
2283        #[inline]
2284        unsafe fn encode(
2285            self,
2286            encoder: &mut fidl::encoding::Encoder<
2287                '_,
2288                fidl::encoding::DefaultFuchsiaResourceDialect,
2289            >,
2290            offset: usize,
2291            depth: fidl::encoding::Depth,
2292        ) -> fidl::Result<()> {
2293            encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2294            // Zero out padding regions. There's no need to apply masks
2295            // because the unmasked parts will be overwritten by fields.
2296            // Write the fields.
2297            self.0.encode(encoder, offset + 0, depth)?;
2298            Ok(())
2299        }
2300    }
2301
2302    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2303        for ArrayOfNonnullableHandles
2304    {
2305        #[inline(always)]
2306        fn new_empty() -> Self {
2307            Self {
2308                handles: fidl::new_empty!(
2309                    fidl::encoding::Array<
2310                        fidl::encoding::HandleType<
2311                            fidl::NullableHandle,
2312                            { fidl::ObjectType::NONE.into_raw() },
2313                            2147483648,
2314                        >,
2315                        4,
2316                    >,
2317                    fidl::encoding::DefaultFuchsiaResourceDialect
2318                ),
2319            }
2320        }
2321
2322        #[inline]
2323        unsafe fn decode(
2324            &mut self,
2325            decoder: &mut fidl::encoding::Decoder<
2326                '_,
2327                fidl::encoding::DefaultFuchsiaResourceDialect,
2328            >,
2329            offset: usize,
2330            _depth: fidl::encoding::Depth,
2331        ) -> fidl::Result<()> {
2332            decoder.debug_check_bounds::<Self>(offset);
2333            // Verify that padding bytes are zero.
2334            fidl::decode!(
2335                fidl::encoding::Array<
2336                    fidl::encoding::HandleType<
2337                        fidl::NullableHandle,
2338                        { fidl::ObjectType::NONE.into_raw() },
2339                        2147483648,
2340                    >,
2341                    4,
2342                >,
2343                fidl::encoding::DefaultFuchsiaResourceDialect,
2344                &mut self.handles,
2345                decoder,
2346                offset + 0,
2347                _depth
2348            )?;
2349            Ok(())
2350        }
2351    }
2352
2353    impl fidl::encoding::ResourceTypeMarker for ArrayOfNullableHandles {
2354        type Borrowed<'a> = &'a mut Self;
2355        fn take_or_borrow<'a>(
2356            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2357        ) -> Self::Borrowed<'a> {
2358            value
2359        }
2360    }
2361
2362    unsafe impl fidl::encoding::TypeMarker for ArrayOfNullableHandles {
2363        type Owned = Self;
2364
2365        #[inline(always)]
2366        fn inline_align(_context: fidl::encoding::Context) -> usize {
2367            4
2368        }
2369
2370        #[inline(always)]
2371        fn inline_size(_context: fidl::encoding::Context) -> usize {
2372            20
2373        }
2374    }
2375
2376    unsafe impl
2377        fidl::encoding::Encode<
2378            ArrayOfNullableHandles,
2379            fidl::encoding::DefaultFuchsiaResourceDialect,
2380        > for &mut ArrayOfNullableHandles
2381    {
2382        #[inline]
2383        unsafe fn encode(
2384            self,
2385            encoder: &mut fidl::encoding::Encoder<
2386                '_,
2387                fidl::encoding::DefaultFuchsiaResourceDialect,
2388            >,
2389            offset: usize,
2390            _depth: fidl::encoding::Depth,
2391        ) -> fidl::Result<()> {
2392            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2393            // Delegate to tuple encoding.
2394            fidl::encoding::Encode::<
2395                ArrayOfNullableHandles,
2396                fidl::encoding::DefaultFuchsiaResourceDialect,
2397            >::encode(
2398                (<fidl::encoding::Array<
2399                    fidl::encoding::Optional<
2400                        fidl::encoding::HandleType<
2401                            fidl::NullableHandle,
2402                            { fidl::ObjectType::NONE.into_raw() },
2403                            2147483648,
2404                        >,
2405                    >,
2406                    5,
2407                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2408                    &mut self.handles
2409                ),),
2410                encoder,
2411                offset,
2412                _depth,
2413            )
2414        }
2415    }
2416    unsafe impl<
2417        T0: fidl::encoding::Encode<
2418                fidl::encoding::Array<
2419                    fidl::encoding::Optional<
2420                        fidl::encoding::HandleType<
2421                            fidl::NullableHandle,
2422                            { fidl::ObjectType::NONE.into_raw() },
2423                            2147483648,
2424                        >,
2425                    >,
2426                    5,
2427                >,
2428                fidl::encoding::DefaultFuchsiaResourceDialect,
2429            >,
2430    >
2431        fidl::encoding::Encode<
2432            ArrayOfNullableHandles,
2433            fidl::encoding::DefaultFuchsiaResourceDialect,
2434        > for (T0,)
2435    {
2436        #[inline]
2437        unsafe fn encode(
2438            self,
2439            encoder: &mut fidl::encoding::Encoder<
2440                '_,
2441                fidl::encoding::DefaultFuchsiaResourceDialect,
2442            >,
2443            offset: usize,
2444            depth: fidl::encoding::Depth,
2445        ) -> fidl::Result<()> {
2446            encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2447            // Zero out padding regions. There's no need to apply masks
2448            // because the unmasked parts will be overwritten by fields.
2449            // Write the fields.
2450            self.0.encode(encoder, offset + 0, depth)?;
2451            Ok(())
2452        }
2453    }
2454
2455    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2456        for ArrayOfNullableHandles
2457    {
2458        #[inline(always)]
2459        fn new_empty() -> Self {
2460            Self {
2461                handles: fidl::new_empty!(
2462                    fidl::encoding::Array<
2463                        fidl::encoding::Optional<
2464                            fidl::encoding::HandleType<
2465                                fidl::NullableHandle,
2466                                { fidl::ObjectType::NONE.into_raw() },
2467                                2147483648,
2468                            >,
2469                        >,
2470                        5,
2471                    >,
2472                    fidl::encoding::DefaultFuchsiaResourceDialect
2473                ),
2474            }
2475        }
2476
2477        #[inline]
2478        unsafe fn decode(
2479            &mut self,
2480            decoder: &mut fidl::encoding::Decoder<
2481                '_,
2482                fidl::encoding::DefaultFuchsiaResourceDialect,
2483            >,
2484            offset: usize,
2485            _depth: fidl::encoding::Depth,
2486        ) -> fidl::Result<()> {
2487            decoder.debug_check_bounds::<Self>(offset);
2488            // Verify that padding bytes are zero.
2489            fidl::decode!(
2490                fidl::encoding::Array<
2491                    fidl::encoding::Optional<
2492                        fidl::encoding::HandleType<
2493                            fidl::NullableHandle,
2494                            { fidl::ObjectType::NONE.into_raw() },
2495                            2147483648,
2496                        >,
2497                    >,
2498                    5,
2499                >,
2500                fidl::encoding::DefaultFuchsiaResourceDialect,
2501                &mut self.handles,
2502                decoder,
2503                offset + 0,
2504                _depth
2505            )?;
2506            Ok(())
2507        }
2508    }
2509
2510    impl fidl::encoding::ResourceTypeMarker for ArrayOfOptionalHandles {
2511        type Borrowed<'a> = &'a mut Self;
2512        fn take_or_borrow<'a>(
2513            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2514        ) -> Self::Borrowed<'a> {
2515            value
2516        }
2517    }
2518
2519    unsafe impl fidl::encoding::TypeMarker for ArrayOfOptionalHandles {
2520        type Owned = Self;
2521
2522        #[inline(always)]
2523        fn inline_align(_context: fidl::encoding::Context) -> usize {
2524            4
2525        }
2526
2527        #[inline(always)]
2528        fn inline_size(_context: fidl::encoding::Context) -> usize {
2529            12
2530        }
2531    }
2532
2533    unsafe impl
2534        fidl::encoding::Encode<
2535            ArrayOfOptionalHandles,
2536            fidl::encoding::DefaultFuchsiaResourceDialect,
2537        > for &mut ArrayOfOptionalHandles
2538    {
2539        #[inline]
2540        unsafe fn encode(
2541            self,
2542            encoder: &mut fidl::encoding::Encoder<
2543                '_,
2544                fidl::encoding::DefaultFuchsiaResourceDialect,
2545            >,
2546            offset: usize,
2547            _depth: fidl::encoding::Depth,
2548        ) -> fidl::Result<()> {
2549            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2550            // Delegate to tuple encoding.
2551            fidl::encoding::Encode::<
2552                ArrayOfOptionalHandles,
2553                fidl::encoding::DefaultFuchsiaResourceDialect,
2554            >::encode(
2555                (<fidl::encoding::Array<
2556                    fidl::encoding::Optional<
2557                        fidl::encoding::HandleType<
2558                            fidl::NullableHandle,
2559                            { fidl::ObjectType::NONE.into_raw() },
2560                            2147483648,
2561                        >,
2562                    >,
2563                    3,
2564                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2565                    &mut self.a
2566                ),),
2567                encoder,
2568                offset,
2569                _depth,
2570            )
2571        }
2572    }
2573    unsafe impl<
2574        T0: fidl::encoding::Encode<
2575                fidl::encoding::Array<
2576                    fidl::encoding::Optional<
2577                        fidl::encoding::HandleType<
2578                            fidl::NullableHandle,
2579                            { fidl::ObjectType::NONE.into_raw() },
2580                            2147483648,
2581                        >,
2582                    >,
2583                    3,
2584                >,
2585                fidl::encoding::DefaultFuchsiaResourceDialect,
2586            >,
2587    >
2588        fidl::encoding::Encode<
2589            ArrayOfOptionalHandles,
2590            fidl::encoding::DefaultFuchsiaResourceDialect,
2591        > for (T0,)
2592    {
2593        #[inline]
2594        unsafe fn encode(
2595            self,
2596            encoder: &mut fidl::encoding::Encoder<
2597                '_,
2598                fidl::encoding::DefaultFuchsiaResourceDialect,
2599            >,
2600            offset: usize,
2601            depth: fidl::encoding::Depth,
2602        ) -> fidl::Result<()> {
2603            encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2604            // Zero out padding regions. There's no need to apply masks
2605            // because the unmasked parts will be overwritten by fields.
2606            // Write the fields.
2607            self.0.encode(encoder, offset + 0, depth)?;
2608            Ok(())
2609        }
2610    }
2611
2612    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2613        for ArrayOfOptionalHandles
2614    {
2615        #[inline(always)]
2616        fn new_empty() -> Self {
2617            Self {
2618                a: fidl::new_empty!(
2619                    fidl::encoding::Array<
2620                        fidl::encoding::Optional<
2621                            fidl::encoding::HandleType<
2622                                fidl::NullableHandle,
2623                                { fidl::ObjectType::NONE.into_raw() },
2624                                2147483648,
2625                            >,
2626                        >,
2627                        3,
2628                    >,
2629                    fidl::encoding::DefaultFuchsiaResourceDialect
2630                ),
2631            }
2632        }
2633
2634        #[inline]
2635        unsafe fn decode(
2636            &mut self,
2637            decoder: &mut fidl::encoding::Decoder<
2638                '_,
2639                fidl::encoding::DefaultFuchsiaResourceDialect,
2640            >,
2641            offset: usize,
2642            _depth: fidl::encoding::Depth,
2643        ) -> fidl::Result<()> {
2644            decoder.debug_check_bounds::<Self>(offset);
2645            // Verify that padding bytes are zero.
2646            fidl::decode!(
2647                fidl::encoding::Array<
2648                    fidl::encoding::Optional<
2649                        fidl::encoding::HandleType<
2650                            fidl::NullableHandle,
2651                            { fidl::ObjectType::NONE.into_raw() },
2652                            2147483648,
2653                        >,
2654                    >,
2655                    3,
2656                >,
2657                fidl::encoding::DefaultFuchsiaResourceDialect,
2658                &mut self.a,
2659                decoder,
2660                offset + 0,
2661                _depth
2662            )?;
2663            Ok(())
2664        }
2665    }
2666
2667    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2668        type Borrowed<'a> = &'a mut Self;
2669        fn take_or_borrow<'a>(
2670            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2671        ) -> Self::Borrowed<'a> {
2672            value
2673        }
2674    }
2675
2676    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2677        type Owned = Self;
2678
2679        #[inline(always)]
2680        fn inline_align(_context: fidl::encoding::Context) -> usize {
2681            8
2682        }
2683
2684        #[inline(always)]
2685        fn inline_size(_context: fidl::encoding::Context) -> usize {
2686            16
2687        }
2688    }
2689
2690    unsafe impl
2691        fidl::encoding::Encode<
2692            ArrayOfVectorOfEventInStructWithDefaultRights,
2693            fidl::encoding::DefaultFuchsiaResourceDialect,
2694        > for &mut ArrayOfVectorOfEventInStructWithDefaultRights
2695    {
2696        #[inline]
2697        unsafe fn encode(
2698            self,
2699            encoder: &mut fidl::encoding::Encoder<
2700                '_,
2701                fidl::encoding::DefaultFuchsiaResourceDialect,
2702            >,
2703            offset: usize,
2704            _depth: fidl::encoding::Depth,
2705        ) -> fidl::Result<()> {
2706            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2707            // Delegate to tuple encoding.
2708            fidl::encoding::Encode::<
2709                ArrayOfVectorOfEventInStructWithDefaultRights,
2710                fidl::encoding::DefaultFuchsiaResourceDialect,
2711            >::encode(
2712                (<fidl::encoding::Array<
2713                    fidl::encoding::Vector<
2714                        fidl::encoding::HandleType<
2715                            fidl::Event,
2716                            { fidl::ObjectType::EVENT.into_raw() },
2717                            53251,
2718                        >,
2719                        1,
2720                    >,
2721                    1,
2722                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2723                    &mut self.h
2724                ),),
2725                encoder,
2726                offset,
2727                _depth,
2728            )
2729        }
2730    }
2731    unsafe impl<
2732        T0: fidl::encoding::Encode<
2733                fidl::encoding::Array<
2734                    fidl::encoding::Vector<
2735                        fidl::encoding::HandleType<
2736                            fidl::Event,
2737                            { fidl::ObjectType::EVENT.into_raw() },
2738                            53251,
2739                        >,
2740                        1,
2741                    >,
2742                    1,
2743                >,
2744                fidl::encoding::DefaultFuchsiaResourceDialect,
2745            >,
2746    >
2747        fidl::encoding::Encode<
2748            ArrayOfVectorOfEventInStructWithDefaultRights,
2749            fidl::encoding::DefaultFuchsiaResourceDialect,
2750        > for (T0,)
2751    {
2752        #[inline]
2753        unsafe fn encode(
2754            self,
2755            encoder: &mut fidl::encoding::Encoder<
2756                '_,
2757                fidl::encoding::DefaultFuchsiaResourceDialect,
2758            >,
2759            offset: usize,
2760            depth: fidl::encoding::Depth,
2761        ) -> fidl::Result<()> {
2762            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2763            // Zero out padding regions. There's no need to apply masks
2764            // because the unmasked parts will be overwritten by fields.
2765            // Write the fields.
2766            self.0.encode(encoder, offset + 0, depth)?;
2767            Ok(())
2768        }
2769    }
2770
2771    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2772        for ArrayOfVectorOfEventInStructWithDefaultRights
2773    {
2774        #[inline(always)]
2775        fn new_empty() -> Self {
2776            Self {
2777                h: fidl::new_empty!(
2778                    fidl::encoding::Array<
2779                        fidl::encoding::Vector<
2780                            fidl::encoding::HandleType<
2781                                fidl::Event,
2782                                { fidl::ObjectType::EVENT.into_raw() },
2783                                53251,
2784                            >,
2785                            1,
2786                        >,
2787                        1,
2788                    >,
2789                    fidl::encoding::DefaultFuchsiaResourceDialect
2790                ),
2791            }
2792        }
2793
2794        #[inline]
2795        unsafe fn decode(
2796            &mut self,
2797            decoder: &mut fidl::encoding::Decoder<
2798                '_,
2799                fidl::encoding::DefaultFuchsiaResourceDialect,
2800            >,
2801            offset: usize,
2802            _depth: fidl::encoding::Depth,
2803        ) -> fidl::Result<()> {
2804            decoder.debug_check_bounds::<Self>(offset);
2805            // Verify that padding bytes are zero.
2806            fidl::decode!(
2807                fidl::encoding::Array<
2808                    fidl::encoding::Vector<
2809                        fidl::encoding::HandleType<
2810                            fidl::Event,
2811                            { fidl::ObjectType::EVENT.into_raw() },
2812                            53251,
2813                        >,
2814                        1,
2815                    >,
2816                    1,
2817                >,
2818                fidl::encoding::DefaultFuchsiaResourceDialect,
2819                &mut self.h,
2820                decoder,
2821                offset + 0,
2822                _depth
2823            )?;
2824            Ok(())
2825        }
2826    }
2827
2828    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2829        type Borrowed<'a> = &'a mut Self;
2830        fn take_or_borrow<'a>(
2831            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2832        ) -> Self::Borrowed<'a> {
2833            value
2834        }
2835    }
2836
2837    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2838        type Owned = Self;
2839
2840        #[inline(always)]
2841        fn inline_align(_context: fidl::encoding::Context) -> usize {
2842            8
2843        }
2844
2845        #[inline(always)]
2846        fn inline_size(_context: fidl::encoding::Context) -> usize {
2847            16
2848        }
2849    }
2850
2851    unsafe impl
2852        fidl::encoding::Encode<
2853            ArrayOfVectorOfEventInStructWithReducedRights,
2854            fidl::encoding::DefaultFuchsiaResourceDialect,
2855        > for &mut ArrayOfVectorOfEventInStructWithReducedRights
2856    {
2857        #[inline]
2858        unsafe fn encode(
2859            self,
2860            encoder: &mut fidl::encoding::Encoder<
2861                '_,
2862                fidl::encoding::DefaultFuchsiaResourceDialect,
2863            >,
2864            offset: usize,
2865            _depth: fidl::encoding::Depth,
2866        ) -> fidl::Result<()> {
2867            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2868            // Delegate to tuple encoding.
2869            fidl::encoding::Encode::<
2870                ArrayOfVectorOfEventInStructWithReducedRights,
2871                fidl::encoding::DefaultFuchsiaResourceDialect,
2872            >::encode(
2873                (<fidl::encoding::Array<
2874                    fidl::encoding::Vector<
2875                        fidl::encoding::HandleType<
2876                            fidl::Event,
2877                            { fidl::ObjectType::EVENT.into_raw() },
2878                            49155,
2879                        >,
2880                        1,
2881                    >,
2882                    1,
2883                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2884                    &mut self.h
2885                ),),
2886                encoder,
2887                offset,
2888                _depth,
2889            )
2890        }
2891    }
2892    unsafe impl<
2893        T0: fidl::encoding::Encode<
2894                fidl::encoding::Array<
2895                    fidl::encoding::Vector<
2896                        fidl::encoding::HandleType<
2897                            fidl::Event,
2898                            { fidl::ObjectType::EVENT.into_raw() },
2899                            49155,
2900                        >,
2901                        1,
2902                    >,
2903                    1,
2904                >,
2905                fidl::encoding::DefaultFuchsiaResourceDialect,
2906            >,
2907    >
2908        fidl::encoding::Encode<
2909            ArrayOfVectorOfEventInStructWithReducedRights,
2910            fidl::encoding::DefaultFuchsiaResourceDialect,
2911        > for (T0,)
2912    {
2913        #[inline]
2914        unsafe fn encode(
2915            self,
2916            encoder: &mut fidl::encoding::Encoder<
2917                '_,
2918                fidl::encoding::DefaultFuchsiaResourceDialect,
2919            >,
2920            offset: usize,
2921            depth: fidl::encoding::Depth,
2922        ) -> fidl::Result<()> {
2923            encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2924            // Zero out padding regions. There's no need to apply masks
2925            // because the unmasked parts will be overwritten by fields.
2926            // Write the fields.
2927            self.0.encode(encoder, offset + 0, depth)?;
2928            Ok(())
2929        }
2930    }
2931
2932    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2933        for ArrayOfVectorOfEventInStructWithReducedRights
2934    {
2935        #[inline(always)]
2936        fn new_empty() -> Self {
2937            Self {
2938                h: fidl::new_empty!(
2939                    fidl::encoding::Array<
2940                        fidl::encoding::Vector<
2941                            fidl::encoding::HandleType<
2942                                fidl::Event,
2943                                { fidl::ObjectType::EVENT.into_raw() },
2944                                49155,
2945                            >,
2946                            1,
2947                        >,
2948                        1,
2949                    >,
2950                    fidl::encoding::DefaultFuchsiaResourceDialect
2951                ),
2952            }
2953        }
2954
2955        #[inline]
2956        unsafe fn decode(
2957            &mut self,
2958            decoder: &mut fidl::encoding::Decoder<
2959                '_,
2960                fidl::encoding::DefaultFuchsiaResourceDialect,
2961            >,
2962            offset: usize,
2963            _depth: fidl::encoding::Depth,
2964        ) -> fidl::Result<()> {
2965            decoder.debug_check_bounds::<Self>(offset);
2966            // Verify that padding bytes are zero.
2967            fidl::decode!(
2968                fidl::encoding::Array<
2969                    fidl::encoding::Vector<
2970                        fidl::encoding::HandleType<
2971                            fidl::Event,
2972                            { fidl::ObjectType::EVENT.into_raw() },
2973                            49155,
2974                        >,
2975                        1,
2976                    >,
2977                    1,
2978                >,
2979                fidl::encoding::DefaultFuchsiaResourceDialect,
2980                &mut self.h,
2981                decoder,
2982                offset + 0,
2983                _depth
2984            )?;
2985            Ok(())
2986        }
2987    }
2988
2989    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2990        type Borrowed<'a> = &'a mut Self;
2991        fn take_or_borrow<'a>(
2992            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2993        ) -> Self::Borrowed<'a> {
2994            value
2995        }
2996    }
2997
2998    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2999        type Owned = Self;
3000
3001        #[inline(always)]
3002        fn inline_align(_context: fidl::encoding::Context) -> usize {
3003            8
3004        }
3005
3006        #[inline(always)]
3007        fn inline_size(_context: fidl::encoding::Context) -> usize {
3008            16
3009        }
3010    }
3011
3012    unsafe impl
3013        fidl::encoding::Encode<
3014            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
3015            fidl::encoding::DefaultFuchsiaResourceDialect,
3016        > for &mut ArrayOfVectorOfEventInTableWithDefaultRightsStruct
3017    {
3018        #[inline]
3019        unsafe fn encode(
3020            self,
3021            encoder: &mut fidl::encoding::Encoder<
3022                '_,
3023                fidl::encoding::DefaultFuchsiaResourceDialect,
3024            >,
3025            offset: usize,
3026            _depth: fidl::encoding::Depth,
3027        ) -> fidl::Result<()> {
3028            encoder
3029                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
3030            // Delegate to tuple encoding.
3031            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3032                (
3033                    <ArrayOfVectorOfEventInTableWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
3034                ),
3035                encoder, offset, _depth
3036            )
3037        }
3038    }
3039    unsafe impl<
3040        T0: fidl::encoding::Encode<
3041                ArrayOfVectorOfEventInTableWithDefaultRights,
3042                fidl::encoding::DefaultFuchsiaResourceDialect,
3043            >,
3044    >
3045        fidl::encoding::Encode<
3046            ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
3047            fidl::encoding::DefaultFuchsiaResourceDialect,
3048        > for (T0,)
3049    {
3050        #[inline]
3051        unsafe fn encode(
3052            self,
3053            encoder: &mut fidl::encoding::Encoder<
3054                '_,
3055                fidl::encoding::DefaultFuchsiaResourceDialect,
3056            >,
3057            offset: usize,
3058            depth: fidl::encoding::Depth,
3059        ) -> fidl::Result<()> {
3060            encoder
3061                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
3062            // Zero out padding regions. There's no need to apply masks
3063            // because the unmasked parts will be overwritten by fields.
3064            // Write the fields.
3065            self.0.encode(encoder, offset + 0, depth)?;
3066            Ok(())
3067        }
3068    }
3069
3070    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3071        for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
3072    {
3073        #[inline(always)]
3074        fn new_empty() -> Self {
3075            Self {
3076                t: fidl::new_empty!(
3077                    ArrayOfVectorOfEventInTableWithDefaultRights,
3078                    fidl::encoding::DefaultFuchsiaResourceDialect
3079                ),
3080            }
3081        }
3082
3083        #[inline]
3084        unsafe fn decode(
3085            &mut self,
3086            decoder: &mut fidl::encoding::Decoder<
3087                '_,
3088                fidl::encoding::DefaultFuchsiaResourceDialect,
3089            >,
3090            offset: usize,
3091            _depth: fidl::encoding::Depth,
3092        ) -> fidl::Result<()> {
3093            decoder.debug_check_bounds::<Self>(offset);
3094            // Verify that padding bytes are zero.
3095            fidl::decode!(
3096                ArrayOfVectorOfEventInTableWithDefaultRights,
3097                fidl::encoding::DefaultFuchsiaResourceDialect,
3098                &mut self.t,
3099                decoder,
3100                offset + 0,
3101                _depth
3102            )?;
3103            Ok(())
3104        }
3105    }
3106
3107    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3108        type Borrowed<'a> = &'a mut Self;
3109        fn take_or_borrow<'a>(
3110            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3111        ) -> Self::Borrowed<'a> {
3112            value
3113        }
3114    }
3115
3116    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3117        type Owned = Self;
3118
3119        #[inline(always)]
3120        fn inline_align(_context: fidl::encoding::Context) -> usize {
3121            8
3122        }
3123
3124        #[inline(always)]
3125        fn inline_size(_context: fidl::encoding::Context) -> usize {
3126            16
3127        }
3128    }
3129
3130    unsafe impl
3131        fidl::encoding::Encode<
3132            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3133            fidl::encoding::DefaultFuchsiaResourceDialect,
3134        > for &mut ArrayOfVectorOfEventInTableWithReducedRightsStruct
3135    {
3136        #[inline]
3137        unsafe fn encode(
3138            self,
3139            encoder: &mut fidl::encoding::Encoder<
3140                '_,
3141                fidl::encoding::DefaultFuchsiaResourceDialect,
3142            >,
3143            offset: usize,
3144            _depth: fidl::encoding::Depth,
3145        ) -> fidl::Result<()> {
3146            encoder
3147                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3148            // Delegate to tuple encoding.
3149            fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3150                (
3151                    <ArrayOfVectorOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
3152                ),
3153                encoder, offset, _depth
3154            )
3155        }
3156    }
3157    unsafe impl<
3158        T0: fidl::encoding::Encode<
3159                ArrayOfVectorOfEventInTableWithReducedRights,
3160                fidl::encoding::DefaultFuchsiaResourceDialect,
3161            >,
3162    >
3163        fidl::encoding::Encode<
3164            ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3165            fidl::encoding::DefaultFuchsiaResourceDialect,
3166        > for (T0,)
3167    {
3168        #[inline]
3169        unsafe fn encode(
3170            self,
3171            encoder: &mut fidl::encoding::Encoder<
3172                '_,
3173                fidl::encoding::DefaultFuchsiaResourceDialect,
3174            >,
3175            offset: usize,
3176            depth: fidl::encoding::Depth,
3177        ) -> fidl::Result<()> {
3178            encoder
3179                .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3180            // Zero out padding regions. There's no need to apply masks
3181            // because the unmasked parts will be overwritten by fields.
3182            // Write the fields.
3183            self.0.encode(encoder, offset + 0, depth)?;
3184            Ok(())
3185        }
3186    }
3187
3188    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3189        for ArrayOfVectorOfEventInTableWithReducedRightsStruct
3190    {
3191        #[inline(always)]
3192        fn new_empty() -> Self {
3193            Self {
3194                t: fidl::new_empty!(
3195                    ArrayOfVectorOfEventInTableWithReducedRights,
3196                    fidl::encoding::DefaultFuchsiaResourceDialect
3197                ),
3198            }
3199        }
3200
3201        #[inline]
3202        unsafe fn decode(
3203            &mut self,
3204            decoder: &mut fidl::encoding::Decoder<
3205                '_,
3206                fidl::encoding::DefaultFuchsiaResourceDialect,
3207            >,
3208            offset: usize,
3209            _depth: fidl::encoding::Depth,
3210        ) -> fidl::Result<()> {
3211            decoder.debug_check_bounds::<Self>(offset);
3212            // Verify that padding bytes are zero.
3213            fidl::decode!(
3214                ArrayOfVectorOfEventInTableWithReducedRights,
3215                fidl::encoding::DefaultFuchsiaResourceDialect,
3216                &mut self.t,
3217                decoder,
3218                offset + 0,
3219                _depth
3220            )?;
3221            Ok(())
3222        }
3223    }
3224
3225    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3226        type Borrowed<'a> = &'a mut Self;
3227        fn take_or_borrow<'a>(
3228            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3229        ) -> Self::Borrowed<'a> {
3230            value
3231        }
3232    }
3233
3234    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3235        type Owned = Self;
3236
3237        #[inline(always)]
3238        fn inline_align(_context: fidl::encoding::Context) -> usize {
3239            8
3240        }
3241
3242        #[inline(always)]
3243        fn inline_size(_context: fidl::encoding::Context) -> usize {
3244            16
3245        }
3246    }
3247
3248    unsafe impl
3249        fidl::encoding::Encode<
3250            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3251            fidl::encoding::DefaultFuchsiaResourceDialect,
3252        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3253    {
3254        #[inline]
3255        unsafe fn encode(
3256            self,
3257            encoder: &mut fidl::encoding::Encoder<
3258                '_,
3259                fidl::encoding::DefaultFuchsiaResourceDialect,
3260            >,
3261            offset: usize,
3262            _depth: fidl::encoding::Depth,
3263        ) -> fidl::Result<()> {
3264            encoder
3265                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3266            // Delegate to tuple encoding.
3267            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3268                (
3269                    <ArrayOfVectorOfEventInUnionWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3270                ),
3271                encoder, offset, _depth
3272            )
3273        }
3274    }
3275    unsafe impl<
3276        T0: fidl::encoding::Encode<
3277                ArrayOfVectorOfEventInUnionWithDefaultRights,
3278                fidl::encoding::DefaultFuchsiaResourceDialect,
3279            >,
3280    >
3281        fidl::encoding::Encode<
3282            ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3283            fidl::encoding::DefaultFuchsiaResourceDialect,
3284        > for (T0,)
3285    {
3286        #[inline]
3287        unsafe fn encode(
3288            self,
3289            encoder: &mut fidl::encoding::Encoder<
3290                '_,
3291                fidl::encoding::DefaultFuchsiaResourceDialect,
3292            >,
3293            offset: usize,
3294            depth: fidl::encoding::Depth,
3295        ) -> fidl::Result<()> {
3296            encoder
3297                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3298            // Zero out padding regions. There's no need to apply masks
3299            // because the unmasked parts will be overwritten by fields.
3300            // Write the fields.
3301            self.0.encode(encoder, offset + 0, depth)?;
3302            Ok(())
3303        }
3304    }
3305
3306    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3307        for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3308    {
3309        #[inline(always)]
3310        fn new_empty() -> Self {
3311            Self {
3312                u: fidl::new_empty!(
3313                    ArrayOfVectorOfEventInUnionWithDefaultRights,
3314                    fidl::encoding::DefaultFuchsiaResourceDialect
3315                ),
3316            }
3317        }
3318
3319        #[inline]
3320        unsafe fn decode(
3321            &mut self,
3322            decoder: &mut fidl::encoding::Decoder<
3323                '_,
3324                fidl::encoding::DefaultFuchsiaResourceDialect,
3325            >,
3326            offset: usize,
3327            _depth: fidl::encoding::Depth,
3328        ) -> fidl::Result<()> {
3329            decoder.debug_check_bounds::<Self>(offset);
3330            // Verify that padding bytes are zero.
3331            fidl::decode!(
3332                ArrayOfVectorOfEventInUnionWithDefaultRights,
3333                fidl::encoding::DefaultFuchsiaResourceDialect,
3334                &mut self.u,
3335                decoder,
3336                offset + 0,
3337                _depth
3338            )?;
3339            Ok(())
3340        }
3341    }
3342
3343    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3344        type Borrowed<'a> = &'a mut Self;
3345        fn take_or_borrow<'a>(
3346            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3347        ) -> Self::Borrowed<'a> {
3348            value
3349        }
3350    }
3351
3352    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3353        type Owned = Self;
3354
3355        #[inline(always)]
3356        fn inline_align(_context: fidl::encoding::Context) -> usize {
3357            8
3358        }
3359
3360        #[inline(always)]
3361        fn inline_size(_context: fidl::encoding::Context) -> usize {
3362            16
3363        }
3364    }
3365
3366    unsafe impl
3367        fidl::encoding::Encode<
3368            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3369            fidl::encoding::DefaultFuchsiaResourceDialect,
3370        > for &mut ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3371    {
3372        #[inline]
3373        unsafe fn encode(
3374            self,
3375            encoder: &mut fidl::encoding::Encoder<
3376                '_,
3377                fidl::encoding::DefaultFuchsiaResourceDialect,
3378            >,
3379            offset: usize,
3380            _depth: fidl::encoding::Depth,
3381        ) -> fidl::Result<()> {
3382            encoder
3383                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3384            // Delegate to tuple encoding.
3385            fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3386                (
3387                    <ArrayOfVectorOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3388                ),
3389                encoder, offset, _depth
3390            )
3391        }
3392    }
3393    unsafe impl<
3394        T0: fidl::encoding::Encode<
3395                ArrayOfVectorOfEventInUnionWithReducedRights,
3396                fidl::encoding::DefaultFuchsiaResourceDialect,
3397            >,
3398    >
3399        fidl::encoding::Encode<
3400            ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3401            fidl::encoding::DefaultFuchsiaResourceDialect,
3402        > for (T0,)
3403    {
3404        #[inline]
3405        unsafe fn encode(
3406            self,
3407            encoder: &mut fidl::encoding::Encoder<
3408                '_,
3409                fidl::encoding::DefaultFuchsiaResourceDialect,
3410            >,
3411            offset: usize,
3412            depth: fidl::encoding::Depth,
3413        ) -> fidl::Result<()> {
3414            encoder
3415                .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3416            // Zero out padding regions. There's no need to apply masks
3417            // because the unmasked parts will be overwritten by fields.
3418            // Write the fields.
3419            self.0.encode(encoder, offset + 0, depth)?;
3420            Ok(())
3421        }
3422    }
3423
3424    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3425        for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3426    {
3427        #[inline(always)]
3428        fn new_empty() -> Self {
3429            Self {
3430                u: fidl::new_empty!(
3431                    ArrayOfVectorOfEventInUnionWithReducedRights,
3432                    fidl::encoding::DefaultFuchsiaResourceDialect
3433                ),
3434            }
3435        }
3436
3437        #[inline]
3438        unsafe fn decode(
3439            &mut self,
3440            decoder: &mut fidl::encoding::Decoder<
3441                '_,
3442                fidl::encoding::DefaultFuchsiaResourceDialect,
3443            >,
3444            offset: usize,
3445            _depth: fidl::encoding::Depth,
3446        ) -> fidl::Result<()> {
3447            decoder.debug_check_bounds::<Self>(offset);
3448            // Verify that padding bytes are zero.
3449            fidl::decode!(
3450                ArrayOfVectorOfEventInUnionWithReducedRights,
3451                fidl::encoding::DefaultFuchsiaResourceDialect,
3452                &mut self.u,
3453                decoder,
3454                offset + 0,
3455                _depth
3456            )?;
3457            Ok(())
3458        }
3459    }
3460
3461    impl fidl::encoding::ResourceTypeMarker for Bounded32NonnullableVectorOfHandles {
3462        type Borrowed<'a> = &'a mut Self;
3463        fn take_or_borrow<'a>(
3464            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3465        ) -> Self::Borrowed<'a> {
3466            value
3467        }
3468    }
3469
3470    unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfHandles {
3471        type Owned = Self;
3472
3473        #[inline(always)]
3474        fn inline_align(_context: fidl::encoding::Context) -> usize {
3475            8
3476        }
3477
3478        #[inline(always)]
3479        fn inline_size(_context: fidl::encoding::Context) -> usize {
3480            16
3481        }
3482    }
3483
3484    unsafe impl
3485        fidl::encoding::Encode<
3486            Bounded32NonnullableVectorOfHandles,
3487            fidl::encoding::DefaultFuchsiaResourceDialect,
3488        > for &mut Bounded32NonnullableVectorOfHandles
3489    {
3490        #[inline]
3491        unsafe fn encode(
3492            self,
3493            encoder: &mut fidl::encoding::Encoder<
3494                '_,
3495                fidl::encoding::DefaultFuchsiaResourceDialect,
3496            >,
3497            offset: usize,
3498            _depth: fidl::encoding::Depth,
3499        ) -> fidl::Result<()> {
3500            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3501            // Delegate to tuple encoding.
3502            fidl::encoding::Encode::<
3503                Bounded32NonnullableVectorOfHandles,
3504                fidl::encoding::DefaultFuchsiaResourceDialect,
3505            >::encode(
3506                (<fidl::encoding::Vector<
3507                    fidl::encoding::HandleType<
3508                        fidl::NullableHandle,
3509                        { fidl::ObjectType::NONE.into_raw() },
3510                        2147483648,
3511                    >,
3512                    32,
3513                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3514                    &mut self.vh0
3515                ),),
3516                encoder,
3517                offset,
3518                _depth,
3519            )
3520        }
3521    }
3522    unsafe impl<
3523        T0: fidl::encoding::Encode<
3524                fidl::encoding::Vector<
3525                    fidl::encoding::HandleType<
3526                        fidl::NullableHandle,
3527                        { fidl::ObjectType::NONE.into_raw() },
3528                        2147483648,
3529                    >,
3530                    32,
3531                >,
3532                fidl::encoding::DefaultFuchsiaResourceDialect,
3533            >,
3534    >
3535        fidl::encoding::Encode<
3536            Bounded32NonnullableVectorOfHandles,
3537            fidl::encoding::DefaultFuchsiaResourceDialect,
3538        > for (T0,)
3539    {
3540        #[inline]
3541        unsafe fn encode(
3542            self,
3543            encoder: &mut fidl::encoding::Encoder<
3544                '_,
3545                fidl::encoding::DefaultFuchsiaResourceDialect,
3546            >,
3547            offset: usize,
3548            depth: fidl::encoding::Depth,
3549        ) -> fidl::Result<()> {
3550            encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3551            // Zero out padding regions. There's no need to apply masks
3552            // because the unmasked parts will be overwritten by fields.
3553            // Write the fields.
3554            self.0.encode(encoder, offset + 0, depth)?;
3555            Ok(())
3556        }
3557    }
3558
3559    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3560        for Bounded32NonnullableVectorOfHandles
3561    {
3562        #[inline(always)]
3563        fn new_empty() -> Self {
3564            Self {
3565                vh0: fidl::new_empty!(
3566                    fidl::encoding::Vector<
3567                        fidl::encoding::HandleType<
3568                            fidl::NullableHandle,
3569                            { fidl::ObjectType::NONE.into_raw() },
3570                            2147483648,
3571                        >,
3572                        32,
3573                    >,
3574                    fidl::encoding::DefaultFuchsiaResourceDialect
3575                ),
3576            }
3577        }
3578
3579        #[inline]
3580        unsafe fn decode(
3581            &mut self,
3582            decoder: &mut fidl::encoding::Decoder<
3583                '_,
3584                fidl::encoding::DefaultFuchsiaResourceDialect,
3585            >,
3586            offset: usize,
3587            _depth: fidl::encoding::Depth,
3588        ) -> fidl::Result<()> {
3589            decoder.debug_check_bounds::<Self>(offset);
3590            // Verify that padding bytes are zero.
3591            fidl::decode!(
3592                fidl::encoding::Vector<
3593                    fidl::encoding::HandleType<
3594                        fidl::NullableHandle,
3595                        { fidl::ObjectType::NONE.into_raw() },
3596                        2147483648,
3597                    >,
3598                    32,
3599                >,
3600                fidl::encoding::DefaultFuchsiaResourceDialect,
3601                &mut self.vh0,
3602                decoder,
3603                offset + 0,
3604                _depth
3605            )?;
3606            Ok(())
3607        }
3608    }
3609
3610    impl fidl::encoding::ResourceTypeMarker for Bounded32NullableVectorOfHandles {
3611        type Borrowed<'a> = &'a mut Self;
3612        fn take_or_borrow<'a>(
3613            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3614        ) -> Self::Borrowed<'a> {
3615            value
3616        }
3617    }
3618
3619    unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfHandles {
3620        type Owned = Self;
3621
3622        #[inline(always)]
3623        fn inline_align(_context: fidl::encoding::Context) -> usize {
3624            8
3625        }
3626
3627        #[inline(always)]
3628        fn inline_size(_context: fidl::encoding::Context) -> usize {
3629            16
3630        }
3631    }
3632
3633    unsafe impl
3634        fidl::encoding::Encode<
3635            Bounded32NullableVectorOfHandles,
3636            fidl::encoding::DefaultFuchsiaResourceDialect,
3637        > for &mut Bounded32NullableVectorOfHandles
3638    {
3639        #[inline]
3640        unsafe fn encode(
3641            self,
3642            encoder: &mut fidl::encoding::Encoder<
3643                '_,
3644                fidl::encoding::DefaultFuchsiaResourceDialect,
3645            >,
3646            offset: usize,
3647            _depth: fidl::encoding::Depth,
3648        ) -> fidl::Result<()> {
3649            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3650            // Delegate to tuple encoding.
3651            fidl::encoding::Encode::<
3652                Bounded32NullableVectorOfHandles,
3653                fidl::encoding::DefaultFuchsiaResourceDialect,
3654            >::encode(
3655                (<fidl::encoding::Optional<
3656                    fidl::encoding::Vector<
3657                        fidl::encoding::HandleType<
3658                            fidl::NullableHandle,
3659                            { fidl::ObjectType::NONE.into_raw() },
3660                            2147483648,
3661                        >,
3662                        32,
3663                    >,
3664                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3665                    &mut self.vh0
3666                ),),
3667                encoder,
3668                offset,
3669                _depth,
3670            )
3671        }
3672    }
3673    unsafe impl<
3674        T0: fidl::encoding::Encode<
3675                fidl::encoding::Optional<
3676                    fidl::encoding::Vector<
3677                        fidl::encoding::HandleType<
3678                            fidl::NullableHandle,
3679                            { fidl::ObjectType::NONE.into_raw() },
3680                            2147483648,
3681                        >,
3682                        32,
3683                    >,
3684                >,
3685                fidl::encoding::DefaultFuchsiaResourceDialect,
3686            >,
3687    >
3688        fidl::encoding::Encode<
3689            Bounded32NullableVectorOfHandles,
3690            fidl::encoding::DefaultFuchsiaResourceDialect,
3691        > for (T0,)
3692    {
3693        #[inline]
3694        unsafe fn encode(
3695            self,
3696            encoder: &mut fidl::encoding::Encoder<
3697                '_,
3698                fidl::encoding::DefaultFuchsiaResourceDialect,
3699            >,
3700            offset: usize,
3701            depth: fidl::encoding::Depth,
3702        ) -> fidl::Result<()> {
3703            encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3704            // Zero out padding regions. There's no need to apply masks
3705            // because the unmasked parts will be overwritten by fields.
3706            // Write the fields.
3707            self.0.encode(encoder, offset + 0, depth)?;
3708            Ok(())
3709        }
3710    }
3711
3712    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3713        for Bounded32NullableVectorOfHandles
3714    {
3715        #[inline(always)]
3716        fn new_empty() -> Self {
3717            Self {
3718                vh0: fidl::new_empty!(
3719                    fidl::encoding::Optional<
3720                        fidl::encoding::Vector<
3721                            fidl::encoding::HandleType<
3722                                fidl::NullableHandle,
3723                                { fidl::ObjectType::NONE.into_raw() },
3724                                2147483648,
3725                            >,
3726                            32,
3727                        >,
3728                    >,
3729                    fidl::encoding::DefaultFuchsiaResourceDialect
3730                ),
3731            }
3732        }
3733
3734        #[inline]
3735        unsafe fn decode(
3736            &mut self,
3737            decoder: &mut fidl::encoding::Decoder<
3738                '_,
3739                fidl::encoding::DefaultFuchsiaResourceDialect,
3740            >,
3741            offset: usize,
3742            _depth: fidl::encoding::Depth,
3743        ) -> fidl::Result<()> {
3744            decoder.debug_check_bounds::<Self>(offset);
3745            // Verify that padding bytes are zero.
3746            fidl::decode!(
3747                fidl::encoding::Optional<
3748                    fidl::encoding::Vector<
3749                        fidl::encoding::HandleType<
3750                            fidl::NullableHandle,
3751                            { fidl::ObjectType::NONE.into_raw() },
3752                            2147483648,
3753                        >,
3754                        32,
3755                    >,
3756                >,
3757                fidl::encoding::DefaultFuchsiaResourceDialect,
3758                &mut self.vh0,
3759                decoder,
3760                offset + 0,
3761                _depth
3762            )?;
3763            Ok(())
3764        }
3765    }
3766
3767    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleHandle {
3768        type Borrowed<'a> = &'a mut Self;
3769        fn take_or_borrow<'a>(
3770            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3771        ) -> Self::Borrowed<'a> {
3772            value
3773        }
3774    }
3775
3776    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleHandle {
3777        type Owned = Self;
3778
3779        #[inline(always)]
3780        fn inline_align(_context: fidl::encoding::Context) -> usize {
3781            8
3782        }
3783
3784        #[inline(always)]
3785        fn inline_size(_context: fidl::encoding::Context) -> usize {
3786            8
3787        }
3788    }
3789
3790    unsafe impl
3791        fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3792        for &mut BoxOfSingleHandle
3793    {
3794        #[inline]
3795        unsafe fn encode(
3796            self,
3797            encoder: &mut fidl::encoding::Encoder<
3798                '_,
3799                fidl::encoding::DefaultFuchsiaResourceDialect,
3800            >,
3801            offset: usize,
3802            _depth: fidl::encoding::Depth,
3803        ) -> fidl::Result<()> {
3804            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3805            // Delegate to tuple encoding.
3806            fidl::encoding::Encode::<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3807                (
3808                    <fidl::encoding::Boxed<SingleHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3809                ),
3810                encoder, offset, _depth
3811            )
3812        }
3813    }
3814    unsafe impl<
3815        T0: fidl::encoding::Encode<
3816                fidl::encoding::Boxed<SingleHandle>,
3817                fidl::encoding::DefaultFuchsiaResourceDialect,
3818            >,
3819    > fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3820        for (T0,)
3821    {
3822        #[inline]
3823        unsafe fn encode(
3824            self,
3825            encoder: &mut fidl::encoding::Encoder<
3826                '_,
3827                fidl::encoding::DefaultFuchsiaResourceDialect,
3828            >,
3829            offset: usize,
3830            depth: fidl::encoding::Depth,
3831        ) -> fidl::Result<()> {
3832            encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3833            // Zero out padding regions. There's no need to apply masks
3834            // because the unmasked parts will be overwritten by fields.
3835            // Write the fields.
3836            self.0.encode(encoder, offset + 0, depth)?;
3837            Ok(())
3838        }
3839    }
3840
3841    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3842        for BoxOfSingleHandle
3843    {
3844        #[inline(always)]
3845        fn new_empty() -> Self {
3846            Self {
3847                b: fidl::new_empty!(
3848                    fidl::encoding::Boxed<SingleHandle>,
3849                    fidl::encoding::DefaultFuchsiaResourceDialect
3850                ),
3851            }
3852        }
3853
3854        #[inline]
3855        unsafe fn decode(
3856            &mut self,
3857            decoder: &mut fidl::encoding::Decoder<
3858                '_,
3859                fidl::encoding::DefaultFuchsiaResourceDialect,
3860            >,
3861            offset: usize,
3862            _depth: fidl::encoding::Depth,
3863        ) -> fidl::Result<()> {
3864            decoder.debug_check_bounds::<Self>(offset);
3865            // Verify that padding bytes are zero.
3866            fidl::decode!(
3867                fidl::encoding::Boxed<SingleHandle>,
3868                fidl::encoding::DefaultFuchsiaResourceDialect,
3869                &mut self.b,
3870                decoder,
3871                offset + 0,
3872                _depth
3873            )?;
3874            Ok(())
3875        }
3876    }
3877
3878    impl fidl::encoding::ResourceTypeMarker for BoxOfSingleOptionalHandle {
3879        type Borrowed<'a> = &'a mut Self;
3880        fn take_or_borrow<'a>(
3881            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3882        ) -> Self::Borrowed<'a> {
3883            value
3884        }
3885    }
3886
3887    unsafe impl fidl::encoding::TypeMarker for BoxOfSingleOptionalHandle {
3888        type Owned = Self;
3889
3890        #[inline(always)]
3891        fn inline_align(_context: fidl::encoding::Context) -> usize {
3892            8
3893        }
3894
3895        #[inline(always)]
3896        fn inline_size(_context: fidl::encoding::Context) -> usize {
3897            8
3898        }
3899    }
3900
3901    unsafe impl
3902        fidl::encoding::Encode<
3903            BoxOfSingleOptionalHandle,
3904            fidl::encoding::DefaultFuchsiaResourceDialect,
3905        > for &mut BoxOfSingleOptionalHandle
3906    {
3907        #[inline]
3908        unsafe fn encode(
3909            self,
3910            encoder: &mut fidl::encoding::Encoder<
3911                '_,
3912                fidl::encoding::DefaultFuchsiaResourceDialect,
3913            >,
3914            offset: usize,
3915            _depth: fidl::encoding::Depth,
3916        ) -> fidl::Result<()> {
3917            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3918            // Delegate to tuple encoding.
3919            fidl::encoding::Encode::<BoxOfSingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3920                (
3921                    <fidl::encoding::Boxed<SingleOptionalHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3922                ),
3923                encoder, offset, _depth
3924            )
3925        }
3926    }
3927    unsafe impl<
3928        T0: fidl::encoding::Encode<
3929                fidl::encoding::Boxed<SingleOptionalHandle>,
3930                fidl::encoding::DefaultFuchsiaResourceDialect,
3931            >,
3932    >
3933        fidl::encoding::Encode<
3934            BoxOfSingleOptionalHandle,
3935            fidl::encoding::DefaultFuchsiaResourceDialect,
3936        > for (T0,)
3937    {
3938        #[inline]
3939        unsafe fn encode(
3940            self,
3941            encoder: &mut fidl::encoding::Encoder<
3942                '_,
3943                fidl::encoding::DefaultFuchsiaResourceDialect,
3944            >,
3945            offset: usize,
3946            depth: fidl::encoding::Depth,
3947        ) -> fidl::Result<()> {
3948            encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3949            // Zero out padding regions. There's no need to apply masks
3950            // because the unmasked parts will be overwritten by fields.
3951            // Write the fields.
3952            self.0.encode(encoder, offset + 0, depth)?;
3953            Ok(())
3954        }
3955    }
3956
3957    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3958        for BoxOfSingleOptionalHandle
3959    {
3960        #[inline(always)]
3961        fn new_empty() -> Self {
3962            Self {
3963                b: fidl::new_empty!(
3964                    fidl::encoding::Boxed<SingleOptionalHandle>,
3965                    fidl::encoding::DefaultFuchsiaResourceDialect
3966                ),
3967            }
3968        }
3969
3970        #[inline]
3971        unsafe fn decode(
3972            &mut self,
3973            decoder: &mut fidl::encoding::Decoder<
3974                '_,
3975                fidl::encoding::DefaultFuchsiaResourceDialect,
3976            >,
3977            offset: usize,
3978            _depth: fidl::encoding::Depth,
3979        ) -> fidl::Result<()> {
3980            decoder.debug_check_bounds::<Self>(offset);
3981            // Verify that padding bytes are zero.
3982            fidl::decode!(
3983                fidl::encoding::Boxed<SingleOptionalHandle>,
3984                fidl::encoding::DefaultFuchsiaResourceDialect,
3985                &mut self.b,
3986                decoder,
3987                offset + 0,
3988                _depth
3989            )?;
3990            Ok(())
3991        }
3992    }
3993
3994    impl fidl::encoding::ResourceTypeMarker for CreateComponentRequest {
3995        type Borrowed<'a> = &'a mut Self;
3996        fn take_or_borrow<'a>(
3997            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3998        ) -> Self::Borrowed<'a> {
3999            value
4000        }
4001    }
4002
4003    unsafe impl fidl::encoding::TypeMarker for CreateComponentRequest {
4004        type Owned = Self;
4005
4006        #[inline(always)]
4007        fn inline_align(_context: fidl::encoding::Context) -> usize {
4008            8
4009        }
4010
4011        #[inline(always)]
4012        fn inline_size(_context: fidl::encoding::Context) -> usize {
4013            80
4014        }
4015    }
4016
4017    unsafe impl
4018        fidl::encoding::Encode<
4019            CreateComponentRequest,
4020            fidl::encoding::DefaultFuchsiaResourceDialect,
4021        > for &mut CreateComponentRequest
4022    {
4023        #[inline]
4024        unsafe fn encode(
4025            self,
4026            encoder: &mut fidl::encoding::Encoder<
4027                '_,
4028                fidl::encoding::DefaultFuchsiaResourceDialect,
4029            >,
4030            offset: usize,
4031            _depth: fidl::encoding::Depth,
4032        ) -> fidl::Result<()> {
4033            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4034            // Delegate to tuple encoding.
4035            fidl::encoding::Encode::<
4036                CreateComponentRequest,
4037                fidl::encoding::DefaultFuchsiaResourceDialect,
4038            >::encode(
4039                (
4040                    <LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4041                        &mut self.launch_info,
4042                    ),
4043                    <fidl::encoding::Optional<
4044                        fidl::encoding::Endpoint<
4045                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4046                        >,
4047                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4048                        &mut self.controller
4049                    ),
4050                ),
4051                encoder,
4052                offset,
4053                _depth,
4054            )
4055        }
4056    }
4057    unsafe impl<
4058        T0: fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>,
4059        T1: fidl::encoding::Encode<
4060                fidl::encoding::Optional<
4061                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4062                >,
4063                fidl::encoding::DefaultFuchsiaResourceDialect,
4064            >,
4065    >
4066        fidl::encoding::Encode<
4067            CreateComponentRequest,
4068            fidl::encoding::DefaultFuchsiaResourceDialect,
4069        > for (T0, T1)
4070    {
4071        #[inline]
4072        unsafe fn encode(
4073            self,
4074            encoder: &mut fidl::encoding::Encoder<
4075                '_,
4076                fidl::encoding::DefaultFuchsiaResourceDialect,
4077            >,
4078            offset: usize,
4079            depth: fidl::encoding::Depth,
4080        ) -> fidl::Result<()> {
4081            encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4082            // Zero out padding regions. There's no need to apply masks
4083            // because the unmasked parts will be overwritten by fields.
4084            unsafe {
4085                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
4086                (ptr as *mut u64).write_unaligned(0);
4087            }
4088            // Write the fields.
4089            self.0.encode(encoder, offset + 0, depth)?;
4090            self.1.encode(encoder, offset + 72, depth)?;
4091            Ok(())
4092        }
4093    }
4094
4095    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4096        for CreateComponentRequest
4097    {
4098        #[inline(always)]
4099        fn new_empty() -> Self {
4100            Self {
4101                launch_info: fidl::new_empty!(
4102                    LaunchInfo,
4103                    fidl::encoding::DefaultFuchsiaResourceDialect
4104                ),
4105                controller: fidl::new_empty!(
4106                    fidl::encoding::Optional<
4107                        fidl::encoding::Endpoint<
4108                            fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4109                        >,
4110                    >,
4111                    fidl::encoding::DefaultFuchsiaResourceDialect
4112                ),
4113            }
4114        }
4115
4116        #[inline]
4117        unsafe fn decode(
4118            &mut self,
4119            decoder: &mut fidl::encoding::Decoder<
4120                '_,
4121                fidl::encoding::DefaultFuchsiaResourceDialect,
4122            >,
4123            offset: usize,
4124            _depth: fidl::encoding::Depth,
4125        ) -> fidl::Result<()> {
4126            decoder.debug_check_bounds::<Self>(offset);
4127            // Verify that padding bytes are zero.
4128            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
4129            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4130            let mask = 0xffffffff00000000u64;
4131            let maskedval = padval & mask;
4132            if maskedval != 0 {
4133                return Err(fidl::Error::NonZeroPadding {
4134                    padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
4135                });
4136            }
4137            fidl::decode!(
4138                LaunchInfo,
4139                fidl::encoding::DefaultFuchsiaResourceDialect,
4140                &mut self.launch_info,
4141                decoder,
4142                offset + 0,
4143                _depth
4144            )?;
4145            fidl::decode!(
4146                fidl::encoding::Optional<
4147                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4148                >,
4149                fidl::encoding::DefaultFuchsiaResourceDialect,
4150                &mut self.controller,
4151                decoder,
4152                offset + 72,
4153                _depth
4154            )?;
4155            Ok(())
4156        }
4157    }
4158
4159    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTableStruct {
4160        type Borrowed<'a> = &'a mut Self;
4161        fn take_or_borrow<'a>(
4162            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4163        ) -> Self::Borrowed<'a> {
4164            value
4165        }
4166    }
4167
4168    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTableStruct {
4169        type Owned = Self;
4170
4171        #[inline(always)]
4172        fn inline_align(_context: fidl::encoding::Context) -> usize {
4173            8
4174        }
4175
4176        #[inline(always)]
4177        fn inline_size(_context: fidl::encoding::Context) -> usize {
4178            16
4179        }
4180    }
4181
4182    unsafe impl
4183        fidl::encoding::Encode<
4184            EmptyResourceTableStruct,
4185            fidl::encoding::DefaultFuchsiaResourceDialect,
4186        > for &mut EmptyResourceTableStruct
4187    {
4188        #[inline]
4189        unsafe fn encode(
4190            self,
4191            encoder: &mut fidl::encoding::Encoder<
4192                '_,
4193                fidl::encoding::DefaultFuchsiaResourceDialect,
4194            >,
4195            offset: usize,
4196            _depth: fidl::encoding::Depth,
4197        ) -> fidl::Result<()> {
4198            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4199            // Delegate to tuple encoding.
4200            fidl::encoding::Encode::<
4201                EmptyResourceTableStruct,
4202                fidl::encoding::DefaultFuchsiaResourceDialect,
4203            >::encode(
4204                (<EmptyResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4205                    &mut self.table,
4206                ),),
4207                encoder,
4208                offset,
4209                _depth,
4210            )
4211        }
4212    }
4213    unsafe impl<
4214        T0: fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4215    >
4216        fidl::encoding::Encode<
4217            EmptyResourceTableStruct,
4218            fidl::encoding::DefaultFuchsiaResourceDialect,
4219        > for (T0,)
4220    {
4221        #[inline]
4222        unsafe fn encode(
4223            self,
4224            encoder: &mut fidl::encoding::Encoder<
4225                '_,
4226                fidl::encoding::DefaultFuchsiaResourceDialect,
4227            >,
4228            offset: usize,
4229            depth: fidl::encoding::Depth,
4230        ) -> fidl::Result<()> {
4231            encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4232            // Zero out padding regions. There's no need to apply masks
4233            // because the unmasked parts will be overwritten by fields.
4234            // Write the fields.
4235            self.0.encode(encoder, offset + 0, depth)?;
4236            Ok(())
4237        }
4238    }
4239
4240    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4241        for EmptyResourceTableStruct
4242    {
4243        #[inline(always)]
4244        fn new_empty() -> Self {
4245            Self {
4246                table: fidl::new_empty!(
4247                    EmptyResourceTable,
4248                    fidl::encoding::DefaultFuchsiaResourceDialect
4249                ),
4250            }
4251        }
4252
4253        #[inline]
4254        unsafe fn decode(
4255            &mut self,
4256            decoder: &mut fidl::encoding::Decoder<
4257                '_,
4258                fidl::encoding::DefaultFuchsiaResourceDialect,
4259            >,
4260            offset: usize,
4261            _depth: fidl::encoding::Depth,
4262        ) -> fidl::Result<()> {
4263            decoder.debug_check_bounds::<Self>(offset);
4264            // Verify that padding bytes are zero.
4265            fidl::decode!(
4266                EmptyResourceTable,
4267                fidl::encoding::DefaultFuchsiaResourceDialect,
4268                &mut self.table,
4269                decoder,
4270                offset + 0,
4271                _depth
4272            )?;
4273            Ok(())
4274        }
4275    }
4276
4277    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnionStruct {
4278        type Borrowed<'a> = &'a mut Self;
4279        fn take_or_borrow<'a>(
4280            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4281        ) -> Self::Borrowed<'a> {
4282            value
4283        }
4284    }
4285
4286    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnionStruct {
4287        type Owned = Self;
4288
4289        #[inline(always)]
4290        fn inline_align(_context: fidl::encoding::Context) -> usize {
4291            8
4292        }
4293
4294        #[inline(always)]
4295        fn inline_size(_context: fidl::encoding::Context) -> usize {
4296            16
4297        }
4298    }
4299
4300    unsafe impl
4301        fidl::encoding::Encode<
4302            EnvelopeInliningTestUnionStruct,
4303            fidl::encoding::DefaultFuchsiaResourceDialect,
4304        > for &mut EnvelopeInliningTestUnionStruct
4305    {
4306        #[inline]
4307        unsafe fn encode(
4308            self,
4309            encoder: &mut fidl::encoding::Encoder<
4310                '_,
4311                fidl::encoding::DefaultFuchsiaResourceDialect,
4312            >,
4313            offset: usize,
4314            _depth: fidl::encoding::Depth,
4315        ) -> fidl::Result<()> {
4316            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4317            // Delegate to tuple encoding.
4318            fidl::encoding::Encode::<EnvelopeInliningTestUnionStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4319                (
4320                    <EnvelopeInliningTestUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
4321                ),
4322                encoder, offset, _depth
4323            )
4324        }
4325    }
4326    unsafe impl<
4327        T0: fidl::encoding::Encode<
4328                EnvelopeInliningTestUnion,
4329                fidl::encoding::DefaultFuchsiaResourceDialect,
4330            >,
4331    >
4332        fidl::encoding::Encode<
4333            EnvelopeInliningTestUnionStruct,
4334            fidl::encoding::DefaultFuchsiaResourceDialect,
4335        > for (T0,)
4336    {
4337        #[inline]
4338        unsafe fn encode(
4339            self,
4340            encoder: &mut fidl::encoding::Encoder<
4341                '_,
4342                fidl::encoding::DefaultFuchsiaResourceDialect,
4343            >,
4344            offset: usize,
4345            depth: fidl::encoding::Depth,
4346        ) -> fidl::Result<()> {
4347            encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4348            // Zero out padding regions. There's no need to apply masks
4349            // because the unmasked parts will be overwritten by fields.
4350            // Write the fields.
4351            self.0.encode(encoder, offset + 0, depth)?;
4352            Ok(())
4353        }
4354    }
4355
4356    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4357        for EnvelopeInliningTestUnionStruct
4358    {
4359        #[inline(always)]
4360        fn new_empty() -> Self {
4361            Self {
4362                u: fidl::new_empty!(
4363                    EnvelopeInliningTestUnion,
4364                    fidl::encoding::DefaultFuchsiaResourceDialect
4365                ),
4366            }
4367        }
4368
4369        #[inline]
4370        unsafe fn decode(
4371            &mut self,
4372            decoder: &mut fidl::encoding::Decoder<
4373                '_,
4374                fidl::encoding::DefaultFuchsiaResourceDialect,
4375            >,
4376            offset: usize,
4377            _depth: fidl::encoding::Depth,
4378        ) -> fidl::Result<()> {
4379            decoder.debug_check_bounds::<Self>(offset);
4380            // Verify that padding bytes are zero.
4381            fidl::decode!(
4382                EnvelopeInliningTestUnion,
4383                fidl::encoding::DefaultFuchsiaResourceDialect,
4384                &mut self.u,
4385                decoder,
4386                offset + 0,
4387                _depth
4388            )?;
4389            Ok(())
4390        }
4391    }
4392
4393    impl fidl::encoding::ResourceTypeMarker for EventWithDefaultRights {
4394        type Borrowed<'a> = &'a mut Self;
4395        fn take_or_borrow<'a>(
4396            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4397        ) -> Self::Borrowed<'a> {
4398            value
4399        }
4400    }
4401
4402    unsafe impl fidl::encoding::TypeMarker for EventWithDefaultRights {
4403        type Owned = Self;
4404
4405        #[inline(always)]
4406        fn inline_align(_context: fidl::encoding::Context) -> usize {
4407            4
4408        }
4409
4410        #[inline(always)]
4411        fn inline_size(_context: fidl::encoding::Context) -> usize {
4412            4
4413        }
4414    }
4415
4416    unsafe impl
4417        fidl::encoding::Encode<
4418            EventWithDefaultRights,
4419            fidl::encoding::DefaultFuchsiaResourceDialect,
4420        > for &mut EventWithDefaultRights
4421    {
4422        #[inline]
4423        unsafe fn encode(
4424            self,
4425            encoder: &mut fidl::encoding::Encoder<
4426                '_,
4427                fidl::encoding::DefaultFuchsiaResourceDialect,
4428            >,
4429            offset: usize,
4430            _depth: fidl::encoding::Depth,
4431        ) -> fidl::Result<()> {
4432            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4433            // Delegate to tuple encoding.
4434            fidl::encoding::Encode::<
4435                EventWithDefaultRights,
4436                fidl::encoding::DefaultFuchsiaResourceDialect,
4437            >::encode(
4438                (<fidl::encoding::HandleType<
4439                    fidl::Event,
4440                    { fidl::ObjectType::EVENT.into_raw() },
4441                    53251,
4442                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4443                    &mut self.h
4444                ),),
4445                encoder,
4446                offset,
4447                _depth,
4448            )
4449        }
4450    }
4451    unsafe impl<
4452        T0: fidl::encoding::Encode<
4453                fidl::encoding::HandleType<
4454                    fidl::Event,
4455                    { fidl::ObjectType::EVENT.into_raw() },
4456                    53251,
4457                >,
4458                fidl::encoding::DefaultFuchsiaResourceDialect,
4459            >,
4460    >
4461        fidl::encoding::Encode<
4462            EventWithDefaultRights,
4463            fidl::encoding::DefaultFuchsiaResourceDialect,
4464        > for (T0,)
4465    {
4466        #[inline]
4467        unsafe fn encode(
4468            self,
4469            encoder: &mut fidl::encoding::Encoder<
4470                '_,
4471                fidl::encoding::DefaultFuchsiaResourceDialect,
4472            >,
4473            offset: usize,
4474            depth: fidl::encoding::Depth,
4475        ) -> fidl::Result<()> {
4476            encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4477            // Zero out padding regions. There's no need to apply masks
4478            // because the unmasked parts will be overwritten by fields.
4479            // Write the fields.
4480            self.0.encode(encoder, offset + 0, depth)?;
4481            Ok(())
4482        }
4483    }
4484
4485    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4486        for EventWithDefaultRights
4487    {
4488        #[inline(always)]
4489        fn new_empty() -> Self {
4490            Self {
4491                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect),
4492            }
4493        }
4494
4495        #[inline]
4496        unsafe fn decode(
4497            &mut self,
4498            decoder: &mut fidl::encoding::Decoder<
4499                '_,
4500                fidl::encoding::DefaultFuchsiaResourceDialect,
4501            >,
4502            offset: usize,
4503            _depth: fidl::encoding::Depth,
4504        ) -> fidl::Result<()> {
4505            decoder.debug_check_bounds::<Self>(offset);
4506            // Verify that padding bytes are zero.
4507            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4508            Ok(())
4509        }
4510    }
4511
4512    impl fidl::encoding::ResourceTypeMarker for EventWithReducedRights {
4513        type Borrowed<'a> = &'a mut Self;
4514        fn take_or_borrow<'a>(
4515            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4516        ) -> Self::Borrowed<'a> {
4517            value
4518        }
4519    }
4520
4521    unsafe impl fidl::encoding::TypeMarker for EventWithReducedRights {
4522        type Owned = Self;
4523
4524        #[inline(always)]
4525        fn inline_align(_context: fidl::encoding::Context) -> usize {
4526            4
4527        }
4528
4529        #[inline(always)]
4530        fn inline_size(_context: fidl::encoding::Context) -> usize {
4531            4
4532        }
4533    }
4534
4535    unsafe impl
4536        fidl::encoding::Encode<
4537            EventWithReducedRights,
4538            fidl::encoding::DefaultFuchsiaResourceDialect,
4539        > for &mut EventWithReducedRights
4540    {
4541        #[inline]
4542        unsafe fn encode(
4543            self,
4544            encoder: &mut fidl::encoding::Encoder<
4545                '_,
4546                fidl::encoding::DefaultFuchsiaResourceDialect,
4547            >,
4548            offset: usize,
4549            _depth: fidl::encoding::Depth,
4550        ) -> fidl::Result<()> {
4551            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4552            // Delegate to tuple encoding.
4553            fidl::encoding::Encode::<
4554                EventWithReducedRights,
4555                fidl::encoding::DefaultFuchsiaResourceDialect,
4556            >::encode(
4557                (<fidl::encoding::HandleType<
4558                    fidl::Event,
4559                    { fidl::ObjectType::EVENT.into_raw() },
4560                    49155,
4561                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4562                    &mut self.h
4563                ),),
4564                encoder,
4565                offset,
4566                _depth,
4567            )
4568        }
4569    }
4570    unsafe impl<
4571        T0: fidl::encoding::Encode<
4572                fidl::encoding::HandleType<
4573                    fidl::Event,
4574                    { fidl::ObjectType::EVENT.into_raw() },
4575                    49155,
4576                >,
4577                fidl::encoding::DefaultFuchsiaResourceDialect,
4578            >,
4579    >
4580        fidl::encoding::Encode<
4581            EventWithReducedRights,
4582            fidl::encoding::DefaultFuchsiaResourceDialect,
4583        > for (T0,)
4584    {
4585        #[inline]
4586        unsafe fn encode(
4587            self,
4588            encoder: &mut fidl::encoding::Encoder<
4589                '_,
4590                fidl::encoding::DefaultFuchsiaResourceDialect,
4591            >,
4592            offset: usize,
4593            depth: fidl::encoding::Depth,
4594        ) -> fidl::Result<()> {
4595            encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4596            // Zero out padding regions. There's no need to apply masks
4597            // because the unmasked parts will be overwritten by fields.
4598            // Write the fields.
4599            self.0.encode(encoder, offset + 0, depth)?;
4600            Ok(())
4601        }
4602    }
4603
4604    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4605        for EventWithReducedRights
4606    {
4607        #[inline(always)]
4608        fn new_empty() -> Self {
4609            Self {
4610                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
4611            }
4612        }
4613
4614        #[inline]
4615        unsafe fn decode(
4616            &mut self,
4617            decoder: &mut fidl::encoding::Decoder<
4618                '_,
4619                fidl::encoding::DefaultFuchsiaResourceDialect,
4620            >,
4621            offset: usize,
4622            _depth: fidl::encoding::Depth,
4623        ) -> fidl::Result<()> {
4624            decoder.debug_check_bounds::<Self>(offset);
4625            // Verify that padding bytes are zero.
4626            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4627            Ok(())
4628        }
4629    }
4630
4631    impl fidl::encoding::ResourceTypeMarker for FidlvizDemo {
4632        type Borrowed<'a> = &'a mut Self;
4633        fn take_or_borrow<'a>(
4634            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4635        ) -> Self::Borrowed<'a> {
4636            value
4637        }
4638    }
4639
4640    unsafe impl fidl::encoding::TypeMarker for FidlvizDemo {
4641        type Owned = Self;
4642
4643        #[inline(always)]
4644        fn inline_align(_context: fidl::encoding::Context) -> usize {
4645            8
4646        }
4647
4648        #[inline(always)]
4649        fn inline_size(_context: fidl::encoding::Context) -> usize {
4650            248
4651        }
4652    }
4653
4654    unsafe impl fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4655        for &mut FidlvizDemo
4656    {
4657        #[inline]
4658        unsafe fn encode(
4659            self,
4660            encoder: &mut fidl::encoding::Encoder<
4661                '_,
4662                fidl::encoding::DefaultFuchsiaResourceDialect,
4663            >,
4664            offset: usize,
4665            _depth: fidl::encoding::Depth,
4666        ) -> fidl::Result<()> {
4667            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4668            // Delegate to tuple encoding.
4669            fidl::encoding::Encode::<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4670                (
4671                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
4672                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
4673                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
4674                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
4675                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
4676                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
4677                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
4678                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
4679                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
4680                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f10),
4681                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f11),
4682                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f12),
4683                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f13),
4684                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.f14),
4685                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f15),
4686                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f16),
4687                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f17),
4688                    <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f18),
4689                    <fidl::encoding::UnboundedVector<f64> as fidl::encoding::ValueTypeMarker>::borrow(&self.f19),
4690                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f20),
4691                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.f21),
4692                    <FidlvizBits as fidl::encoding::ValueTypeMarker>::borrow(&self.f22),
4693                    <FidlvizEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.f23),
4694                    <FidlvizStruct1 as fidl::encoding::ValueTypeMarker>::borrow(&self.f24),
4695                    <FidlvizStruct2 as fidl::encoding::ValueTypeMarker>::borrow(&self.f25),
4696                    <fidl::encoding::Boxed<FidlvizStruct1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f26),
4697                    <fidl::encoding::Boxed<FidlvizStruct2> as fidl::encoding::ValueTypeMarker>::borrow(&self.f27),
4698                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f28),
4699                    <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f29),
4700                    <fidl::encoding::OptionalUnion<FidlvizUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.f30),
4701                    <FidlvizUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.f31),
4702                ),
4703                encoder, offset, _depth
4704            )
4705        }
4706    }
4707    unsafe impl<
4708        T0: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4709        T1: fidl::encoding::Encode<i8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4710        T2: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4711        T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4712        T4: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4713        T5: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4714        T6: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4715        T7: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4716        T8: fidl::encoding::Encode<f32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4717        T9: fidl::encoding::Encode<f64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4718        T10: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4719        T11: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4720        T12: fidl::encoding::Encode<
4721                fidl::encoding::UnboundedString,
4722                fidl::encoding::DefaultFuchsiaResourceDialect,
4723            >,
4724        T13: fidl::encoding::Encode<
4725                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4726                fidl::encoding::DefaultFuchsiaResourceDialect,
4727            >,
4728        T14: fidl::encoding::Encode<
4729                fidl::encoding::UnboundedString,
4730                fidl::encoding::DefaultFuchsiaResourceDialect,
4731            >,
4732        T15: fidl::encoding::Encode<
4733                fidl::encoding::Optional<
4734                    fidl::encoding::HandleType<
4735                        fidl::NullableHandle,
4736                        { fidl::ObjectType::NONE.into_raw() },
4737                        2147483648,
4738                    >,
4739                >,
4740                fidl::encoding::DefaultFuchsiaResourceDialect,
4741            >,
4742        T16: fidl::encoding::Encode<
4743                fidl::encoding::HandleType<
4744                    fidl::NullableHandle,
4745                    { fidl::ObjectType::NONE.into_raw() },
4746                    2147483648,
4747                >,
4748                fidl::encoding::DefaultFuchsiaResourceDialect,
4749            >,
4750        T17: fidl::encoding::Encode<
4751                fidl::encoding::Array<u8, 3>,
4752                fidl::encoding::DefaultFuchsiaResourceDialect,
4753            >,
4754        T18: fidl::encoding::Encode<
4755                fidl::encoding::UnboundedVector<f64>,
4756                fidl::encoding::DefaultFuchsiaResourceDialect,
4757            >,
4758        T19: fidl::encoding::Encode<
4759                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4760                fidl::encoding::DefaultFuchsiaResourceDialect,
4761            >,
4762        T20: fidl::encoding::Encode<
4763                fidl::encoding::UnboundedVector<u8>,
4764                fidl::encoding::DefaultFuchsiaResourceDialect,
4765            >,
4766        T21: fidl::encoding::Encode<FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect>,
4767        T22: fidl::encoding::Encode<FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
4768        T23: fidl::encoding::Encode<FidlvizStruct1, fidl::encoding::DefaultFuchsiaResourceDialect>,
4769        T24: fidl::encoding::Encode<FidlvizStruct2, fidl::encoding::DefaultFuchsiaResourceDialect>,
4770        T25: fidl::encoding::Encode<
4771                fidl::encoding::Boxed<FidlvizStruct1>,
4772                fidl::encoding::DefaultFuchsiaResourceDialect,
4773            >,
4774        T26: fidl::encoding::Encode<
4775                fidl::encoding::Boxed<FidlvizStruct2>,
4776                fidl::encoding::DefaultFuchsiaResourceDialect,
4777            >,
4778        T27: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4779        T28: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4780        T29: fidl::encoding::Encode<
4781                fidl::encoding::OptionalUnion<FidlvizUnion>,
4782                fidl::encoding::DefaultFuchsiaResourceDialect,
4783            >,
4784        T30: fidl::encoding::Encode<FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
4785    > fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4786        for (
4787            T0,
4788            T1,
4789            T2,
4790            T3,
4791            T4,
4792            T5,
4793            T6,
4794            T7,
4795            T8,
4796            T9,
4797            T10,
4798            T11,
4799            T12,
4800            T13,
4801            T14,
4802            T15,
4803            T16,
4804            T17,
4805            T18,
4806            T19,
4807            T20,
4808            T21,
4809            T22,
4810            T23,
4811            T24,
4812            T25,
4813            T26,
4814            T27,
4815            T28,
4816            T29,
4817            T30,
4818        )
4819    {
4820        #[inline]
4821        unsafe fn encode(
4822            self,
4823            encoder: &mut fidl::encoding::Encoder<
4824                '_,
4825                fidl::encoding::DefaultFuchsiaResourceDialect,
4826            >,
4827            offset: usize,
4828            depth: fidl::encoding::Depth,
4829        ) -> fidl::Result<()> {
4830            encoder.debug_check_bounds::<FidlvizDemo>(offset);
4831            // Zero out padding regions. There's no need to apply masks
4832            // because the unmasked parts will be overwritten by fields.
4833            unsafe {
4834                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4835                (ptr as *mut u64).write_unaligned(0);
4836            }
4837            unsafe {
4838                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
4839                (ptr as *mut u64).write_unaligned(0);
4840            }
4841            unsafe {
4842                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(152);
4843                (ptr as *mut u64).write_unaligned(0);
4844            }
4845            // Write the fields.
4846            self.0.encode(encoder, offset + 0, depth)?;
4847            self.1.encode(encoder, offset + 1, depth)?;
4848            self.2.encode(encoder, offset + 2, depth)?;
4849            self.3.encode(encoder, offset + 4, depth)?;
4850            self.4.encode(encoder, offset + 8, depth)?;
4851            self.5.encode(encoder, offset + 16, depth)?;
4852            self.6.encode(encoder, offset + 17, depth)?;
4853            self.7.encode(encoder, offset + 18, depth)?;
4854            self.8.encode(encoder, offset + 20, depth)?;
4855            self.9.encode(encoder, offset + 24, depth)?;
4856            self.10.encode(encoder, offset + 32, depth)?;
4857            self.11.encode(encoder, offset + 33, depth)?;
4858            self.12.encode(encoder, offset + 40, depth)?;
4859            self.13.encode(encoder, offset + 56, depth)?;
4860            self.14.encode(encoder, offset + 72, depth)?;
4861            self.15.encode(encoder, offset + 88, depth)?;
4862            self.16.encode(encoder, offset + 92, depth)?;
4863            self.17.encode(encoder, offset + 96, depth)?;
4864            self.18.encode(encoder, offset + 104, depth)?;
4865            self.19.encode(encoder, offset + 120, depth)?;
4866            self.20.encode(encoder, offset + 136, depth)?;
4867            self.21.encode(encoder, offset + 152, depth)?;
4868            self.22.encode(encoder, offset + 153, depth)?;
4869            self.23.encode(encoder, offset + 154, depth)?;
4870            self.24.encode(encoder, offset + 160, depth)?;
4871            self.25.encode(encoder, offset + 168, depth)?;
4872            self.26.encode(encoder, offset + 176, depth)?;
4873            self.27.encode(encoder, offset + 184, depth)?;
4874            self.28.encode(encoder, offset + 200, depth)?;
4875            self.29.encode(encoder, offset + 216, depth)?;
4876            self.30.encode(encoder, offset + 232, depth)?;
4877            Ok(())
4878        }
4879    }
4880
4881    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {
4882        #[inline(always)]
4883        fn new_empty() -> Self {
4884            Self {
4885                f1: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4886                f2: fidl::new_empty!(i8, fidl::encoding::DefaultFuchsiaResourceDialect),
4887                f3: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4888                f4: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4889                f5: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
4890                f6: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4891                f7: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4892                f8: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4893                f9: fidl::new_empty!(f32, fidl::encoding::DefaultFuchsiaResourceDialect),
4894                f10: fidl::new_empty!(f64, fidl::encoding::DefaultFuchsiaResourceDialect),
4895                f11: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4896                f12: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4897                f13: fidl::new_empty!(
4898                    fidl::encoding::UnboundedString,
4899                    fidl::encoding::DefaultFuchsiaResourceDialect
4900                ),
4901                f14: fidl::new_empty!(
4902                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4903                    fidl::encoding::DefaultFuchsiaResourceDialect
4904                ),
4905                f15: fidl::new_empty!(
4906                    fidl::encoding::UnboundedString,
4907                    fidl::encoding::DefaultFuchsiaResourceDialect
4908                ),
4909                f16: fidl::new_empty!(
4910                    fidl::encoding::Optional<
4911                        fidl::encoding::HandleType<
4912                            fidl::NullableHandle,
4913                            { fidl::ObjectType::NONE.into_raw() },
4914                            2147483648,
4915                        >,
4916                    >,
4917                    fidl::encoding::DefaultFuchsiaResourceDialect
4918                ),
4919                f17: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
4920                f18: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
4921                f19: fidl::new_empty!(
4922                    fidl::encoding::UnboundedVector<f64>,
4923                    fidl::encoding::DefaultFuchsiaResourceDialect
4924                ),
4925                f20: fidl::new_empty!(
4926                    fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4927                    fidl::encoding::DefaultFuchsiaResourceDialect
4928                ),
4929                f21: fidl::new_empty!(
4930                    fidl::encoding::UnboundedVector<u8>,
4931                    fidl::encoding::DefaultFuchsiaResourceDialect
4932                ),
4933                f22: fidl::new_empty!(FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect),
4934                f23: fidl::new_empty!(FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect),
4935                f24: fidl::new_empty!(
4936                    FidlvizStruct1,
4937                    fidl::encoding::DefaultFuchsiaResourceDialect
4938                ),
4939                f25: fidl::new_empty!(
4940                    FidlvizStruct2,
4941                    fidl::encoding::DefaultFuchsiaResourceDialect
4942                ),
4943                f26: fidl::new_empty!(
4944                    fidl::encoding::Boxed<FidlvizStruct1>,
4945                    fidl::encoding::DefaultFuchsiaResourceDialect
4946                ),
4947                f27: fidl::new_empty!(
4948                    fidl::encoding::Boxed<FidlvizStruct2>,
4949                    fidl::encoding::DefaultFuchsiaResourceDialect
4950                ),
4951                f28: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4952                f29: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4953                f30: fidl::new_empty!(
4954                    fidl::encoding::OptionalUnion<FidlvizUnion>,
4955                    fidl::encoding::DefaultFuchsiaResourceDialect
4956                ),
4957                f31: fidl::new_empty!(FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect),
4958            }
4959        }
4960
4961        #[inline]
4962        unsafe fn decode(
4963            &mut self,
4964            decoder: &mut fidl::encoding::Decoder<
4965                '_,
4966                fidl::encoding::DefaultFuchsiaResourceDialect,
4967            >,
4968            offset: usize,
4969            _depth: fidl::encoding::Depth,
4970        ) -> fidl::Result<()> {
4971            decoder.debug_check_bounds::<Self>(offset);
4972            // Verify that padding bytes are zero.
4973            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4974            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4975            let mask = 0xffffffffffff0000u64;
4976            let maskedval = padval & mask;
4977            if maskedval != 0 {
4978                return Err(fidl::Error::NonZeroPadding {
4979                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4980                });
4981            }
4982            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
4983            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4984            let mask = 0xffffffffff000000u64;
4985            let maskedval = padval & mask;
4986            if maskedval != 0 {
4987                return Err(fidl::Error::NonZeroPadding {
4988                    padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
4989                });
4990            }
4991            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(152) };
4992            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4993            let mask = 0xffffffffff000000u64;
4994            let maskedval = padval & mask;
4995            if maskedval != 0 {
4996                return Err(fidl::Error::NonZeroPadding {
4997                    padding_start: offset + 152 + ((mask as u64).trailing_zeros() / 8) as usize,
4998                });
4999            }
5000            fidl::decode!(
5001                u8,
5002                fidl::encoding::DefaultFuchsiaResourceDialect,
5003                &mut self.f1,
5004                decoder,
5005                offset + 0,
5006                _depth
5007            )?;
5008            fidl::decode!(
5009                i8,
5010                fidl::encoding::DefaultFuchsiaResourceDialect,
5011                &mut self.f2,
5012                decoder,
5013                offset + 1,
5014                _depth
5015            )?;
5016            fidl::decode!(
5017                u16,
5018                fidl::encoding::DefaultFuchsiaResourceDialect,
5019                &mut self.f3,
5020                decoder,
5021                offset + 2,
5022                _depth
5023            )?;
5024            fidl::decode!(
5025                u32,
5026                fidl::encoding::DefaultFuchsiaResourceDialect,
5027                &mut self.f4,
5028                decoder,
5029                offset + 4,
5030                _depth
5031            )?;
5032            fidl::decode!(
5033                u64,
5034                fidl::encoding::DefaultFuchsiaResourceDialect,
5035                &mut self.f5,
5036                decoder,
5037                offset + 8,
5038                _depth
5039            )?;
5040            fidl::decode!(
5041                u8,
5042                fidl::encoding::DefaultFuchsiaResourceDialect,
5043                &mut self.f6,
5044                decoder,
5045                offset + 16,
5046                _depth
5047            )?;
5048            fidl::decode!(
5049                u8,
5050                fidl::encoding::DefaultFuchsiaResourceDialect,
5051                &mut self.f7,
5052                decoder,
5053                offset + 17,
5054                _depth
5055            )?;
5056            fidl::decode!(
5057                u16,
5058                fidl::encoding::DefaultFuchsiaResourceDialect,
5059                &mut self.f8,
5060                decoder,
5061                offset + 18,
5062                _depth
5063            )?;
5064            fidl::decode!(
5065                f32,
5066                fidl::encoding::DefaultFuchsiaResourceDialect,
5067                &mut self.f9,
5068                decoder,
5069                offset + 20,
5070                _depth
5071            )?;
5072            fidl::decode!(
5073                f64,
5074                fidl::encoding::DefaultFuchsiaResourceDialect,
5075                &mut self.f10,
5076                decoder,
5077                offset + 24,
5078                _depth
5079            )?;
5080            fidl::decode!(
5081                bool,
5082                fidl::encoding::DefaultFuchsiaResourceDialect,
5083                &mut self.f11,
5084                decoder,
5085                offset + 32,
5086                _depth
5087            )?;
5088            fidl::decode!(
5089                bool,
5090                fidl::encoding::DefaultFuchsiaResourceDialect,
5091                &mut self.f12,
5092                decoder,
5093                offset + 33,
5094                _depth
5095            )?;
5096            fidl::decode!(
5097                fidl::encoding::UnboundedString,
5098                fidl::encoding::DefaultFuchsiaResourceDialect,
5099                &mut self.f13,
5100                decoder,
5101                offset + 40,
5102                _depth
5103            )?;
5104            fidl::decode!(
5105                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5106                fidl::encoding::DefaultFuchsiaResourceDialect,
5107                &mut self.f14,
5108                decoder,
5109                offset + 56,
5110                _depth
5111            )?;
5112            fidl::decode!(
5113                fidl::encoding::UnboundedString,
5114                fidl::encoding::DefaultFuchsiaResourceDialect,
5115                &mut self.f15,
5116                decoder,
5117                offset + 72,
5118                _depth
5119            )?;
5120            fidl::decode!(
5121                fidl::encoding::Optional<
5122                    fidl::encoding::HandleType<
5123                        fidl::NullableHandle,
5124                        { fidl::ObjectType::NONE.into_raw() },
5125                        2147483648,
5126                    >,
5127                >,
5128                fidl::encoding::DefaultFuchsiaResourceDialect,
5129                &mut self.f16,
5130                decoder,
5131                offset + 88,
5132                _depth
5133            )?;
5134            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f17, decoder, offset + 92, _depth)?;
5135            fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f18, decoder, offset + 96, _depth)?;
5136            fidl::decode!(
5137                fidl::encoding::UnboundedVector<f64>,
5138                fidl::encoding::DefaultFuchsiaResourceDialect,
5139                &mut self.f19,
5140                decoder,
5141                offset + 104,
5142                _depth
5143            )?;
5144            fidl::decode!(
5145                fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
5146                fidl::encoding::DefaultFuchsiaResourceDialect,
5147                &mut self.f20,
5148                decoder,
5149                offset + 120,
5150                _depth
5151            )?;
5152            fidl::decode!(
5153                fidl::encoding::UnboundedVector<u8>,
5154                fidl::encoding::DefaultFuchsiaResourceDialect,
5155                &mut self.f21,
5156                decoder,
5157                offset + 136,
5158                _depth
5159            )?;
5160            fidl::decode!(
5161                FidlvizBits,
5162                fidl::encoding::DefaultFuchsiaResourceDialect,
5163                &mut self.f22,
5164                decoder,
5165                offset + 152,
5166                _depth
5167            )?;
5168            fidl::decode!(
5169                FidlvizEnum,
5170                fidl::encoding::DefaultFuchsiaResourceDialect,
5171                &mut self.f23,
5172                decoder,
5173                offset + 153,
5174                _depth
5175            )?;
5176            fidl::decode!(
5177                FidlvizStruct1,
5178                fidl::encoding::DefaultFuchsiaResourceDialect,
5179                &mut self.f24,
5180                decoder,
5181                offset + 154,
5182                _depth
5183            )?;
5184            fidl::decode!(
5185                FidlvizStruct2,
5186                fidl::encoding::DefaultFuchsiaResourceDialect,
5187                &mut self.f25,
5188                decoder,
5189                offset + 160,
5190                _depth
5191            )?;
5192            fidl::decode!(
5193                fidl::encoding::Boxed<FidlvizStruct1>,
5194                fidl::encoding::DefaultFuchsiaResourceDialect,
5195                &mut self.f26,
5196                decoder,
5197                offset + 168,
5198                _depth
5199            )?;
5200            fidl::decode!(
5201                fidl::encoding::Boxed<FidlvizStruct2>,
5202                fidl::encoding::DefaultFuchsiaResourceDialect,
5203                &mut self.f27,
5204                decoder,
5205                offset + 176,
5206                _depth
5207            )?;
5208            fidl::decode!(
5209                FidlvizTable,
5210                fidl::encoding::DefaultFuchsiaResourceDialect,
5211                &mut self.f28,
5212                decoder,
5213                offset + 184,
5214                _depth
5215            )?;
5216            fidl::decode!(
5217                FidlvizTable,
5218                fidl::encoding::DefaultFuchsiaResourceDialect,
5219                &mut self.f29,
5220                decoder,
5221                offset + 200,
5222                _depth
5223            )?;
5224            fidl::decode!(
5225                fidl::encoding::OptionalUnion<FidlvizUnion>,
5226                fidl::encoding::DefaultFuchsiaResourceDialect,
5227                &mut self.f30,
5228                decoder,
5229                offset + 216,
5230                _depth
5231            )?;
5232            fidl::decode!(
5233                FidlvizUnion,
5234                fidl::encoding::DefaultFuchsiaResourceDialect,
5235                &mut self.f31,
5236                decoder,
5237                offset + 232,
5238                _depth
5239            )?;
5240            Ok(())
5241        }
5242    }
5243
5244    impl fidl::encoding::ResourceTypeMarker for GoldenHandleBasicRightsStruct {
5245        type Borrowed<'a> = &'a mut Self;
5246        fn take_or_borrow<'a>(
5247            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5248        ) -> Self::Borrowed<'a> {
5249            value
5250        }
5251    }
5252
5253    unsafe impl fidl::encoding::TypeMarker for GoldenHandleBasicRightsStruct {
5254        type Owned = Self;
5255
5256        #[inline(always)]
5257        fn inline_align(_context: fidl::encoding::Context) -> usize {
5258            4
5259        }
5260
5261        #[inline(always)]
5262        fn inline_size(_context: fidl::encoding::Context) -> usize {
5263            4
5264        }
5265    }
5266
5267    unsafe impl
5268        fidl::encoding::Encode<
5269            GoldenHandleBasicRightsStruct,
5270            fidl::encoding::DefaultFuchsiaResourceDialect,
5271        > for &mut GoldenHandleBasicRightsStruct
5272    {
5273        #[inline]
5274        unsafe fn encode(
5275            self,
5276            encoder: &mut fidl::encoding::Encoder<
5277                '_,
5278                fidl::encoding::DefaultFuchsiaResourceDialect,
5279            >,
5280            offset: usize,
5281            _depth: fidl::encoding::Depth,
5282        ) -> fidl::Result<()> {
5283            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5284            // Delegate to tuple encoding.
5285            fidl::encoding::Encode::<
5286                GoldenHandleBasicRightsStruct,
5287                fidl::encoding::DefaultFuchsiaResourceDialect,
5288            >::encode(
5289                (<fidl::encoding::HandleType<
5290                    fidl::Event,
5291                    { fidl::ObjectType::EVENT.into_raw() },
5292                    49155,
5293                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5294                    &mut self.v
5295                ),),
5296                encoder,
5297                offset,
5298                _depth,
5299            )
5300        }
5301    }
5302    unsafe impl<
5303        T0: fidl::encoding::Encode<
5304                fidl::encoding::HandleType<
5305                    fidl::Event,
5306                    { fidl::ObjectType::EVENT.into_raw() },
5307                    49155,
5308                >,
5309                fidl::encoding::DefaultFuchsiaResourceDialect,
5310            >,
5311    >
5312        fidl::encoding::Encode<
5313            GoldenHandleBasicRightsStruct,
5314            fidl::encoding::DefaultFuchsiaResourceDialect,
5315        > for (T0,)
5316    {
5317        #[inline]
5318        unsafe fn encode(
5319            self,
5320            encoder: &mut fidl::encoding::Encoder<
5321                '_,
5322                fidl::encoding::DefaultFuchsiaResourceDialect,
5323            >,
5324            offset: usize,
5325            depth: fidl::encoding::Depth,
5326        ) -> fidl::Result<()> {
5327            encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5328            // Zero out padding regions. There's no need to apply masks
5329            // because the unmasked parts will be overwritten by fields.
5330            // Write the fields.
5331            self.0.encode(encoder, offset + 0, depth)?;
5332            Ok(())
5333        }
5334    }
5335
5336    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5337        for GoldenHandleBasicRightsStruct
5338    {
5339        #[inline(always)]
5340        fn new_empty() -> Self {
5341            Self {
5342                v: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
5343            }
5344        }
5345
5346        #[inline]
5347        unsafe fn decode(
5348            &mut self,
5349            decoder: &mut fidl::encoding::Decoder<
5350                '_,
5351                fidl::encoding::DefaultFuchsiaResourceDialect,
5352            >,
5353            offset: usize,
5354            _depth: fidl::encoding::Depth,
5355        ) -> fidl::Result<()> {
5356            decoder.debug_check_bounds::<Self>(offset);
5357            // Verify that padding bytes are zero.
5358            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.v, decoder, offset + 0, _depth)?;
5359            Ok(())
5360        }
5361    }
5362
5363    impl fidl::encoding::ResourceTypeMarker for GoldenNullableHandleStruct {
5364        type Borrowed<'a> = &'a mut Self;
5365        fn take_or_borrow<'a>(
5366            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5367        ) -> Self::Borrowed<'a> {
5368            value
5369        }
5370    }
5371
5372    unsafe impl fidl::encoding::TypeMarker for GoldenNullableHandleStruct {
5373        type Owned = Self;
5374
5375        #[inline(always)]
5376        fn inline_align(_context: fidl::encoding::Context) -> usize {
5377            4
5378        }
5379
5380        #[inline(always)]
5381        fn inline_size(_context: fidl::encoding::Context) -> usize {
5382            4
5383        }
5384    }
5385
5386    unsafe impl
5387        fidl::encoding::Encode<
5388            GoldenNullableHandleStruct,
5389            fidl::encoding::DefaultFuchsiaResourceDialect,
5390        > for &mut GoldenNullableHandleStruct
5391    {
5392        #[inline]
5393        unsafe fn encode(
5394            self,
5395            encoder: &mut fidl::encoding::Encoder<
5396                '_,
5397                fidl::encoding::DefaultFuchsiaResourceDialect,
5398            >,
5399            offset: usize,
5400            _depth: fidl::encoding::Depth,
5401        ) -> fidl::Result<()> {
5402            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5403            // Delegate to tuple encoding.
5404            fidl::encoding::Encode::<
5405                GoldenNullableHandleStruct,
5406                fidl::encoding::DefaultFuchsiaResourceDialect,
5407            >::encode(
5408                (<fidl::encoding::Optional<
5409                    fidl::encoding::HandleType<
5410                        fidl::NullableHandle,
5411                        { fidl::ObjectType::NONE.into_raw() },
5412                        2147483648,
5413                    >,
5414                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5415                    &mut self.v
5416                ),),
5417                encoder,
5418                offset,
5419                _depth,
5420            )
5421        }
5422    }
5423    unsafe impl<
5424        T0: fidl::encoding::Encode<
5425                fidl::encoding::Optional<
5426                    fidl::encoding::HandleType<
5427                        fidl::NullableHandle,
5428                        { fidl::ObjectType::NONE.into_raw() },
5429                        2147483648,
5430                    >,
5431                >,
5432                fidl::encoding::DefaultFuchsiaResourceDialect,
5433            >,
5434    >
5435        fidl::encoding::Encode<
5436            GoldenNullableHandleStruct,
5437            fidl::encoding::DefaultFuchsiaResourceDialect,
5438        > for (T0,)
5439    {
5440        #[inline]
5441        unsafe fn encode(
5442            self,
5443            encoder: &mut fidl::encoding::Encoder<
5444                '_,
5445                fidl::encoding::DefaultFuchsiaResourceDialect,
5446            >,
5447            offset: usize,
5448            depth: fidl::encoding::Depth,
5449        ) -> fidl::Result<()> {
5450            encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5451            // Zero out padding regions. There's no need to apply masks
5452            // because the unmasked parts will be overwritten by fields.
5453            // Write the fields.
5454            self.0.encode(encoder, offset + 0, depth)?;
5455            Ok(())
5456        }
5457    }
5458
5459    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5460        for GoldenNullableHandleStruct
5461    {
5462        #[inline(always)]
5463        fn new_empty() -> Self {
5464            Self {
5465                v: fidl::new_empty!(
5466                    fidl::encoding::Optional<
5467                        fidl::encoding::HandleType<
5468                            fidl::NullableHandle,
5469                            { fidl::ObjectType::NONE.into_raw() },
5470                            2147483648,
5471                        >,
5472                    >,
5473                    fidl::encoding::DefaultFuchsiaResourceDialect
5474                ),
5475            }
5476        }
5477
5478        #[inline]
5479        unsafe fn decode(
5480            &mut self,
5481            decoder: &mut fidl::encoding::Decoder<
5482                '_,
5483                fidl::encoding::DefaultFuchsiaResourceDialect,
5484            >,
5485            offset: usize,
5486            _depth: fidl::encoding::Depth,
5487        ) -> fidl::Result<()> {
5488            decoder.debug_check_bounds::<Self>(offset);
5489            // Verify that padding bytes are zero.
5490            fidl::decode!(
5491                fidl::encoding::Optional<
5492                    fidl::encoding::HandleType<
5493                        fidl::NullableHandle,
5494                        { fidl::ObjectType::NONE.into_raw() },
5495                        2147483648,
5496                    >,
5497                >,
5498                fidl::encoding::DefaultFuchsiaResourceDialect,
5499                &mut self.v,
5500                decoder,
5501                offset + 0,
5502                _depth
5503            )?;
5504            Ok(())
5505        }
5506    }
5507
5508    impl fidl::encoding::ResourceTypeMarker for LaunchInfo {
5509        type Borrowed<'a> = &'a mut Self;
5510        fn take_or_borrow<'a>(
5511            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5512        ) -> Self::Borrowed<'a> {
5513            value
5514        }
5515    }
5516
5517    unsafe impl fidl::encoding::TypeMarker for LaunchInfo {
5518        type Owned = Self;
5519
5520        #[inline(always)]
5521        fn inline_align(_context: fidl::encoding::Context) -> usize {
5522            8
5523        }
5524
5525        #[inline(always)]
5526        fn inline_size(_context: fidl::encoding::Context) -> usize {
5527            72
5528        }
5529    }
5530
5531    unsafe impl fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5532        for &mut LaunchInfo
5533    {
5534        #[inline]
5535        unsafe fn encode(
5536            self,
5537            encoder: &mut fidl::encoding::Encoder<
5538                '_,
5539                fidl::encoding::DefaultFuchsiaResourceDialect,
5540            >,
5541            offset: usize,
5542            _depth: fidl::encoding::Depth,
5543        ) -> fidl::Result<()> {
5544            encoder.debug_check_bounds::<LaunchInfo>(offset);
5545            // Delegate to tuple encoding.
5546            fidl::encoding::Encode::<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5547                (
5548                    <fidl::encoding::BoundedString<200> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
5549                    <fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.arguments),
5550                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.out),
5551                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.err),
5552                    <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),
5553                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.flat_namespace),
5554                    <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.additional_services),
5555                ),
5556                encoder, offset, _depth
5557            )
5558        }
5559    }
5560    unsafe impl<
5561        T0: fidl::encoding::Encode<
5562                fidl::encoding::BoundedString<200>,
5563                fidl::encoding::DefaultFuchsiaResourceDialect,
5564            >,
5565        T1: fidl::encoding::Encode<
5566                fidl::encoding::Optional<
5567                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5568                >,
5569                fidl::encoding::DefaultFuchsiaResourceDialect,
5570            >,
5571        T2: fidl::encoding::Encode<
5572                fidl::encoding::Boxed<TransformerEmptyStruct>,
5573                fidl::encoding::DefaultFuchsiaResourceDialect,
5574            >,
5575        T3: fidl::encoding::Encode<
5576                fidl::encoding::Boxed<TransformerEmptyStruct>,
5577                fidl::encoding::DefaultFuchsiaResourceDialect,
5578            >,
5579        T4: fidl::encoding::Encode<
5580                fidl::encoding::Optional<
5581                    fidl::encoding::HandleType<
5582                        fidl::Channel,
5583                        { fidl::ObjectType::CHANNEL.into_raw() },
5584                        2147483648,
5585                    >,
5586                >,
5587                fidl::encoding::DefaultFuchsiaResourceDialect,
5588            >,
5589        T5: fidl::encoding::Encode<
5590                fidl::encoding::Boxed<TransformerEmptyStruct>,
5591                fidl::encoding::DefaultFuchsiaResourceDialect,
5592            >,
5593        T6: fidl::encoding::Encode<
5594                fidl::encoding::Boxed<TransformerEmptyStruct>,
5595                fidl::encoding::DefaultFuchsiaResourceDialect,
5596            >,
5597    > fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5598        for (T0, T1, T2, T3, T4, T5, T6)
5599    {
5600        #[inline]
5601        unsafe fn encode(
5602            self,
5603            encoder: &mut fidl::encoding::Encoder<
5604                '_,
5605                fidl::encoding::DefaultFuchsiaResourceDialect,
5606            >,
5607            offset: usize,
5608            depth: fidl::encoding::Depth,
5609        ) -> fidl::Result<()> {
5610            encoder.debug_check_bounds::<LaunchInfo>(offset);
5611            // Zero out padding regions. There's no need to apply masks
5612            // because the unmasked parts will be overwritten by fields.
5613            unsafe {
5614                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
5615                (ptr as *mut u64).write_unaligned(0);
5616            }
5617            // Write the fields.
5618            self.0.encode(encoder, offset + 0, depth)?;
5619            self.1.encode(encoder, offset + 16, depth)?;
5620            self.2.encode(encoder, offset + 32, depth)?;
5621            self.3.encode(encoder, offset + 40, depth)?;
5622            self.4.encode(encoder, offset + 48, depth)?;
5623            self.5.encode(encoder, offset + 56, depth)?;
5624            self.6.encode(encoder, offset + 64, depth)?;
5625            Ok(())
5626        }
5627    }
5628
5629    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {
5630        #[inline(always)]
5631        fn new_empty() -> Self {
5632            Self {
5633                url: fidl::new_empty!(
5634                    fidl::encoding::BoundedString<200>,
5635                    fidl::encoding::DefaultFuchsiaResourceDialect
5636                ),
5637                arguments: fidl::new_empty!(
5638                    fidl::encoding::Optional<
5639                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5640                    >,
5641                    fidl::encoding::DefaultFuchsiaResourceDialect
5642                ),
5643                out: fidl::new_empty!(
5644                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5645                    fidl::encoding::DefaultFuchsiaResourceDialect
5646                ),
5647                err: fidl::new_empty!(
5648                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5649                    fidl::encoding::DefaultFuchsiaResourceDialect
5650                ),
5651                directory_request: fidl::new_empty!(
5652                    fidl::encoding::Optional<
5653                        fidl::encoding::HandleType<
5654                            fidl::Channel,
5655                            { fidl::ObjectType::CHANNEL.into_raw() },
5656                            2147483648,
5657                        >,
5658                    >,
5659                    fidl::encoding::DefaultFuchsiaResourceDialect
5660                ),
5661                flat_namespace: fidl::new_empty!(
5662                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5663                    fidl::encoding::DefaultFuchsiaResourceDialect
5664                ),
5665                additional_services: fidl::new_empty!(
5666                    fidl::encoding::Boxed<TransformerEmptyStruct>,
5667                    fidl::encoding::DefaultFuchsiaResourceDialect
5668                ),
5669            }
5670        }
5671
5672        #[inline]
5673        unsafe fn decode(
5674            &mut self,
5675            decoder: &mut fidl::encoding::Decoder<
5676                '_,
5677                fidl::encoding::DefaultFuchsiaResourceDialect,
5678            >,
5679            offset: usize,
5680            _depth: fidl::encoding::Depth,
5681        ) -> fidl::Result<()> {
5682            decoder.debug_check_bounds::<Self>(offset);
5683            // Verify that padding bytes are zero.
5684            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
5685            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5686            let mask = 0xffffffff00000000u64;
5687            let maskedval = padval & mask;
5688            if maskedval != 0 {
5689                return Err(fidl::Error::NonZeroPadding {
5690                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
5691                });
5692            }
5693            fidl::decode!(
5694                fidl::encoding::BoundedString<200>,
5695                fidl::encoding::DefaultFuchsiaResourceDialect,
5696                &mut self.url,
5697                decoder,
5698                offset + 0,
5699                _depth
5700            )?;
5701            fidl::decode!(
5702                fidl::encoding::Optional<
5703                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5704                >,
5705                fidl::encoding::DefaultFuchsiaResourceDialect,
5706                &mut self.arguments,
5707                decoder,
5708                offset + 16,
5709                _depth
5710            )?;
5711            fidl::decode!(
5712                fidl::encoding::Boxed<TransformerEmptyStruct>,
5713                fidl::encoding::DefaultFuchsiaResourceDialect,
5714                &mut self.out,
5715                decoder,
5716                offset + 32,
5717                _depth
5718            )?;
5719            fidl::decode!(
5720                fidl::encoding::Boxed<TransformerEmptyStruct>,
5721                fidl::encoding::DefaultFuchsiaResourceDialect,
5722                &mut self.err,
5723                decoder,
5724                offset + 40,
5725                _depth
5726            )?;
5727            fidl::decode!(
5728                fidl::encoding::Optional<
5729                    fidl::encoding::HandleType<
5730                        fidl::Channel,
5731                        { fidl::ObjectType::CHANNEL.into_raw() },
5732                        2147483648,
5733                    >,
5734                >,
5735                fidl::encoding::DefaultFuchsiaResourceDialect,
5736                &mut self.directory_request,
5737                decoder,
5738                offset + 48,
5739                _depth
5740            )?;
5741            fidl::decode!(
5742                fidl::encoding::Boxed<TransformerEmptyStruct>,
5743                fidl::encoding::DefaultFuchsiaResourceDialect,
5744                &mut self.flat_namespace,
5745                decoder,
5746                offset + 56,
5747                _depth
5748            )?;
5749            fidl::decode!(
5750                fidl::encoding::Boxed<TransformerEmptyStruct>,
5751                fidl::encoding::DefaultFuchsiaResourceDialect,
5752                &mut self.additional_services,
5753                decoder,
5754                offset + 64,
5755                _depth
5756            )?;
5757            Ok(())
5758        }
5759    }
5760
5761    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5762        type Borrowed<'a> = &'a mut Self;
5763        fn take_or_borrow<'a>(
5764            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5765        ) -> Self::Borrowed<'a> {
5766            value
5767        }
5768    }
5769
5770    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5771        type Owned = Self;
5772
5773        #[inline(always)]
5774        fn inline_align(_context: fidl::encoding::Context) -> usize {
5775            8
5776        }
5777
5778        #[inline(always)]
5779        fn inline_size(_context: fidl::encoding::Context) -> usize {
5780            32
5781        }
5782    }
5783
5784    unsafe impl
5785        fidl::encoding::Encode<
5786            MultipleBoundedNonnullableVectorsOfHandles,
5787            fidl::encoding::DefaultFuchsiaResourceDialect,
5788        > for &mut MultipleBoundedNonnullableVectorsOfHandles
5789    {
5790        #[inline]
5791        unsafe fn encode(
5792            self,
5793            encoder: &mut fidl::encoding::Encoder<
5794                '_,
5795                fidl::encoding::DefaultFuchsiaResourceDialect,
5796            >,
5797            offset: usize,
5798            _depth: fidl::encoding::Depth,
5799        ) -> fidl::Result<()> {
5800            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5801            // Delegate to tuple encoding.
5802            fidl::encoding::Encode::<
5803                MultipleBoundedNonnullableVectorsOfHandles,
5804                fidl::encoding::DefaultFuchsiaResourceDialect,
5805            >::encode(
5806                (
5807                    <fidl::encoding::Vector<
5808                        fidl::encoding::HandleType<
5809                            fidl::NullableHandle,
5810                            { fidl::ObjectType::NONE.into_raw() },
5811                            2147483648,
5812                        >,
5813                        2,
5814                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5815                        &mut self.vh0
5816                    ),
5817                    <fidl::encoding::Vector<
5818                        fidl::encoding::HandleType<
5819                            fidl::NullableHandle,
5820                            { fidl::ObjectType::NONE.into_raw() },
5821                            2147483648,
5822                        >,
5823                        32,
5824                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5825                        &mut self.vh1
5826                    ),
5827                ),
5828                encoder,
5829                offset,
5830                _depth,
5831            )
5832        }
5833    }
5834    unsafe impl<
5835        T0: fidl::encoding::Encode<
5836                fidl::encoding::Vector<
5837                    fidl::encoding::HandleType<
5838                        fidl::NullableHandle,
5839                        { fidl::ObjectType::NONE.into_raw() },
5840                        2147483648,
5841                    >,
5842                    2,
5843                >,
5844                fidl::encoding::DefaultFuchsiaResourceDialect,
5845            >,
5846        T1: fidl::encoding::Encode<
5847                fidl::encoding::Vector<
5848                    fidl::encoding::HandleType<
5849                        fidl::NullableHandle,
5850                        { fidl::ObjectType::NONE.into_raw() },
5851                        2147483648,
5852                    >,
5853                    32,
5854                >,
5855                fidl::encoding::DefaultFuchsiaResourceDialect,
5856            >,
5857    >
5858        fidl::encoding::Encode<
5859            MultipleBoundedNonnullableVectorsOfHandles,
5860            fidl::encoding::DefaultFuchsiaResourceDialect,
5861        > for (T0, T1)
5862    {
5863        #[inline]
5864        unsafe fn encode(
5865            self,
5866            encoder: &mut fidl::encoding::Encoder<
5867                '_,
5868                fidl::encoding::DefaultFuchsiaResourceDialect,
5869            >,
5870            offset: usize,
5871            depth: fidl::encoding::Depth,
5872        ) -> fidl::Result<()> {
5873            encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5874            // Zero out padding regions. There's no need to apply masks
5875            // because the unmasked parts will be overwritten by fields.
5876            // Write the fields.
5877            self.0.encode(encoder, offset + 0, depth)?;
5878            self.1.encode(encoder, offset + 16, depth)?;
5879            Ok(())
5880        }
5881    }
5882
5883    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5884        for MultipleBoundedNonnullableVectorsOfHandles
5885    {
5886        #[inline(always)]
5887        fn new_empty() -> Self {
5888            Self {
5889                vh0: fidl::new_empty!(
5890                    fidl::encoding::Vector<
5891                        fidl::encoding::HandleType<
5892                            fidl::NullableHandle,
5893                            { fidl::ObjectType::NONE.into_raw() },
5894                            2147483648,
5895                        >,
5896                        2,
5897                    >,
5898                    fidl::encoding::DefaultFuchsiaResourceDialect
5899                ),
5900                vh1: fidl::new_empty!(
5901                    fidl::encoding::Vector<
5902                        fidl::encoding::HandleType<
5903                            fidl::NullableHandle,
5904                            { fidl::ObjectType::NONE.into_raw() },
5905                            2147483648,
5906                        >,
5907                        32,
5908                    >,
5909                    fidl::encoding::DefaultFuchsiaResourceDialect
5910                ),
5911            }
5912        }
5913
5914        #[inline]
5915        unsafe fn decode(
5916            &mut self,
5917            decoder: &mut fidl::encoding::Decoder<
5918                '_,
5919                fidl::encoding::DefaultFuchsiaResourceDialect,
5920            >,
5921            offset: usize,
5922            _depth: fidl::encoding::Depth,
5923        ) -> fidl::Result<()> {
5924            decoder.debug_check_bounds::<Self>(offset);
5925            // Verify that padding bytes are zero.
5926            fidl::decode!(
5927                fidl::encoding::Vector<
5928                    fidl::encoding::HandleType<
5929                        fidl::NullableHandle,
5930                        { fidl::ObjectType::NONE.into_raw() },
5931                        2147483648,
5932                    >,
5933                    2,
5934                >,
5935                fidl::encoding::DefaultFuchsiaResourceDialect,
5936                &mut self.vh0,
5937                decoder,
5938                offset + 0,
5939                _depth
5940            )?;
5941            fidl::decode!(
5942                fidl::encoding::Vector<
5943                    fidl::encoding::HandleType<
5944                        fidl::NullableHandle,
5945                        { fidl::ObjectType::NONE.into_raw() },
5946                        2147483648,
5947                    >,
5948                    32,
5949                >,
5950                fidl::encoding::DefaultFuchsiaResourceDialect,
5951                &mut self.vh1,
5952                decoder,
5953                offset + 16,
5954                _depth
5955            )?;
5956            Ok(())
5957        }
5958    }
5959
5960    impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNullableVectorsOfHandles {
5961        type Borrowed<'a> = &'a mut Self;
5962        fn take_or_borrow<'a>(
5963            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5964        ) -> Self::Borrowed<'a> {
5965            value
5966        }
5967    }
5968
5969    unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfHandles {
5970        type Owned = Self;
5971
5972        #[inline(always)]
5973        fn inline_align(_context: fidl::encoding::Context) -> usize {
5974            8
5975        }
5976
5977        #[inline(always)]
5978        fn inline_size(_context: fidl::encoding::Context) -> usize {
5979            32
5980        }
5981    }
5982
5983    unsafe impl
5984        fidl::encoding::Encode<
5985            MultipleBoundedNullableVectorsOfHandles,
5986            fidl::encoding::DefaultFuchsiaResourceDialect,
5987        > for &mut MultipleBoundedNullableVectorsOfHandles
5988    {
5989        #[inline]
5990        unsafe fn encode(
5991            self,
5992            encoder: &mut fidl::encoding::Encoder<
5993                '_,
5994                fidl::encoding::DefaultFuchsiaResourceDialect,
5995            >,
5996            offset: usize,
5997            _depth: fidl::encoding::Depth,
5998        ) -> fidl::Result<()> {
5999            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
6000            // Delegate to tuple encoding.
6001            fidl::encoding::Encode::<
6002                MultipleBoundedNullableVectorsOfHandles,
6003                fidl::encoding::DefaultFuchsiaResourceDialect,
6004            >::encode(
6005                (
6006                    <fidl::encoding::Optional<
6007                        fidl::encoding::Vector<
6008                            fidl::encoding::HandleType<
6009                                fidl::NullableHandle,
6010                                { fidl::ObjectType::NONE.into_raw() },
6011                                2147483648,
6012                            >,
6013                            2,
6014                        >,
6015                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6016                        &mut self.vh0
6017                    ),
6018                    <fidl::encoding::Optional<
6019                        fidl::encoding::Vector<
6020                            fidl::encoding::HandleType<
6021                                fidl::NullableHandle,
6022                                { fidl::ObjectType::NONE.into_raw() },
6023                                2147483648,
6024                            >,
6025                            32,
6026                        >,
6027                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6028                        &mut self.vh1
6029                    ),
6030                ),
6031                encoder,
6032                offset,
6033                _depth,
6034            )
6035        }
6036    }
6037    unsafe impl<
6038        T0: fidl::encoding::Encode<
6039                fidl::encoding::Optional<
6040                    fidl::encoding::Vector<
6041                        fidl::encoding::HandleType<
6042                            fidl::NullableHandle,
6043                            { fidl::ObjectType::NONE.into_raw() },
6044                            2147483648,
6045                        >,
6046                        2,
6047                    >,
6048                >,
6049                fidl::encoding::DefaultFuchsiaResourceDialect,
6050            >,
6051        T1: fidl::encoding::Encode<
6052                fidl::encoding::Optional<
6053                    fidl::encoding::Vector<
6054                        fidl::encoding::HandleType<
6055                            fidl::NullableHandle,
6056                            { fidl::ObjectType::NONE.into_raw() },
6057                            2147483648,
6058                        >,
6059                        32,
6060                    >,
6061                >,
6062                fidl::encoding::DefaultFuchsiaResourceDialect,
6063            >,
6064    >
6065        fidl::encoding::Encode<
6066            MultipleBoundedNullableVectorsOfHandles,
6067            fidl::encoding::DefaultFuchsiaResourceDialect,
6068        > for (T0, T1)
6069    {
6070        #[inline]
6071        unsafe fn encode(
6072            self,
6073            encoder: &mut fidl::encoding::Encoder<
6074                '_,
6075                fidl::encoding::DefaultFuchsiaResourceDialect,
6076            >,
6077            offset: usize,
6078            depth: fidl::encoding::Depth,
6079        ) -> fidl::Result<()> {
6080            encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
6081            // Zero out padding regions. There's no need to apply masks
6082            // because the unmasked parts will be overwritten by fields.
6083            // Write the fields.
6084            self.0.encode(encoder, offset + 0, depth)?;
6085            self.1.encode(encoder, offset + 16, depth)?;
6086            Ok(())
6087        }
6088    }
6089
6090    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6091        for MultipleBoundedNullableVectorsOfHandles
6092    {
6093        #[inline(always)]
6094        fn new_empty() -> Self {
6095            Self {
6096                vh0: fidl::new_empty!(
6097                    fidl::encoding::Optional<
6098                        fidl::encoding::Vector<
6099                            fidl::encoding::HandleType<
6100                                fidl::NullableHandle,
6101                                { fidl::ObjectType::NONE.into_raw() },
6102                                2147483648,
6103                            >,
6104                            2,
6105                        >,
6106                    >,
6107                    fidl::encoding::DefaultFuchsiaResourceDialect
6108                ),
6109                vh1: fidl::new_empty!(
6110                    fidl::encoding::Optional<
6111                        fidl::encoding::Vector<
6112                            fidl::encoding::HandleType<
6113                                fidl::NullableHandle,
6114                                { fidl::ObjectType::NONE.into_raw() },
6115                                2147483648,
6116                            >,
6117                            32,
6118                        >,
6119                    >,
6120                    fidl::encoding::DefaultFuchsiaResourceDialect
6121                ),
6122            }
6123        }
6124
6125        #[inline]
6126        unsafe fn decode(
6127            &mut self,
6128            decoder: &mut fidl::encoding::Decoder<
6129                '_,
6130                fidl::encoding::DefaultFuchsiaResourceDialect,
6131            >,
6132            offset: usize,
6133            _depth: fidl::encoding::Depth,
6134        ) -> fidl::Result<()> {
6135            decoder.debug_check_bounds::<Self>(offset);
6136            // Verify that padding bytes are zero.
6137            fidl::decode!(
6138                fidl::encoding::Optional<
6139                    fidl::encoding::Vector<
6140                        fidl::encoding::HandleType<
6141                            fidl::NullableHandle,
6142                            { fidl::ObjectType::NONE.into_raw() },
6143                            2147483648,
6144                        >,
6145                        2,
6146                    >,
6147                >,
6148                fidl::encoding::DefaultFuchsiaResourceDialect,
6149                &mut self.vh0,
6150                decoder,
6151                offset + 0,
6152                _depth
6153            )?;
6154            fidl::decode!(
6155                fidl::encoding::Optional<
6156                    fidl::encoding::Vector<
6157                        fidl::encoding::HandleType<
6158                            fidl::NullableHandle,
6159                            { fidl::ObjectType::NONE.into_raw() },
6160                            2147483648,
6161                        >,
6162                        32,
6163                    >,
6164                >,
6165                fidl::encoding::DefaultFuchsiaResourceDialect,
6166                &mut self.vh1,
6167                decoder,
6168                offset + 16,
6169                _depth
6170            )?;
6171            Ok(())
6172        }
6173    }
6174
6175    impl fidl::encoding::ResourceTypeMarker for MultipleHandleSubtypes {
6176        type Borrowed<'a> = &'a mut Self;
6177        fn take_or_borrow<'a>(
6178            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6179        ) -> Self::Borrowed<'a> {
6180            value
6181        }
6182    }
6183
6184    unsafe impl fidl::encoding::TypeMarker for MultipleHandleSubtypes {
6185        type Owned = Self;
6186
6187        #[inline(always)]
6188        fn inline_align(_context: fidl::encoding::Context) -> usize {
6189            4
6190        }
6191
6192        #[inline(always)]
6193        fn inline_size(_context: fidl::encoding::Context) -> usize {
6194            12
6195        }
6196    }
6197
6198    unsafe impl
6199        fidl::encoding::Encode<
6200            MultipleHandleSubtypes,
6201            fidl::encoding::DefaultFuchsiaResourceDialect,
6202        > for &mut MultipleHandleSubtypes
6203    {
6204        #[inline]
6205        unsafe fn encode(
6206            self,
6207            encoder: &mut fidl::encoding::Encoder<
6208                '_,
6209                fidl::encoding::DefaultFuchsiaResourceDialect,
6210            >,
6211            offset: usize,
6212            _depth: fidl::encoding::Depth,
6213        ) -> fidl::Result<()> {
6214            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6215            // Delegate to tuple encoding.
6216            fidl::encoding::Encode::<
6217                MultipleHandleSubtypes,
6218                fidl::encoding::DefaultFuchsiaResourceDialect,
6219            >::encode(
6220                (
6221                    <fidl::encoding::HandleType<
6222                        fidl::NullableHandle,
6223                        { fidl::ObjectType::NONE.into_raw() },
6224                        2147483648,
6225                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6226                        &mut self.untyped
6227                    ),
6228                    <fidl::encoding::HandleType<
6229                        fidl::Event,
6230                        { fidl::ObjectType::EVENT.into_raw() },
6231                        2147483648,
6232                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6233                        &mut self.event
6234                    ),
6235                    <fidl::encoding::HandleType<
6236                        fidl::Channel,
6237                        { fidl::ObjectType::CHANNEL.into_raw() },
6238                        2147483648,
6239                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6240                        &mut self.channel
6241                    ),
6242                ),
6243                encoder,
6244                offset,
6245                _depth,
6246            )
6247        }
6248    }
6249    unsafe impl<
6250        T0: fidl::encoding::Encode<
6251                fidl::encoding::HandleType<
6252                    fidl::NullableHandle,
6253                    { fidl::ObjectType::NONE.into_raw() },
6254                    2147483648,
6255                >,
6256                fidl::encoding::DefaultFuchsiaResourceDialect,
6257            >,
6258        T1: fidl::encoding::Encode<
6259                fidl::encoding::HandleType<
6260                    fidl::Event,
6261                    { fidl::ObjectType::EVENT.into_raw() },
6262                    2147483648,
6263                >,
6264                fidl::encoding::DefaultFuchsiaResourceDialect,
6265            >,
6266        T2: fidl::encoding::Encode<
6267                fidl::encoding::HandleType<
6268                    fidl::Channel,
6269                    { fidl::ObjectType::CHANNEL.into_raw() },
6270                    2147483648,
6271                >,
6272                fidl::encoding::DefaultFuchsiaResourceDialect,
6273            >,
6274    >
6275        fidl::encoding::Encode<
6276            MultipleHandleSubtypes,
6277            fidl::encoding::DefaultFuchsiaResourceDialect,
6278        > for (T0, T1, T2)
6279    {
6280        #[inline]
6281        unsafe fn encode(
6282            self,
6283            encoder: &mut fidl::encoding::Encoder<
6284                '_,
6285                fidl::encoding::DefaultFuchsiaResourceDialect,
6286            >,
6287            offset: usize,
6288            depth: fidl::encoding::Depth,
6289        ) -> fidl::Result<()> {
6290            encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6291            // Zero out padding regions. There's no need to apply masks
6292            // because the unmasked parts will be overwritten by fields.
6293            // Write the fields.
6294            self.0.encode(encoder, offset + 0, depth)?;
6295            self.1.encode(encoder, offset + 4, depth)?;
6296            self.2.encode(encoder, offset + 8, depth)?;
6297            Ok(())
6298        }
6299    }
6300
6301    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6302        for MultipleHandleSubtypes
6303    {
6304        #[inline(always)]
6305        fn new_empty() -> Self {
6306            Self {
6307                untyped: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6308                event: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6309                channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6310            }
6311        }
6312
6313        #[inline]
6314        unsafe fn decode(
6315            &mut self,
6316            decoder: &mut fidl::encoding::Decoder<
6317                '_,
6318                fidl::encoding::DefaultFuchsiaResourceDialect,
6319            >,
6320            offset: usize,
6321            _depth: fidl::encoding::Depth,
6322        ) -> fidl::Result<()> {
6323            decoder.debug_check_bounds::<Self>(offset);
6324            // Verify that padding bytes are zero.
6325            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.untyped, decoder, offset + 0, _depth)?;
6326            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.event, decoder, offset + 4, _depth)?;
6327            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 8, _depth)?;
6328            Ok(())
6329        }
6330    }
6331
6332    impl fidl::encoding::ResourceTypeMarker for MultipleNonnullableHandles {
6333        type Borrowed<'a> = &'a mut Self;
6334        fn take_or_borrow<'a>(
6335            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6336        ) -> Self::Borrowed<'a> {
6337            value
6338        }
6339    }
6340
6341    unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableHandles {
6342        type Owned = Self;
6343
6344        #[inline(always)]
6345        fn inline_align(_context: fidl::encoding::Context) -> usize {
6346            8
6347        }
6348
6349        #[inline(always)]
6350        fn inline_size(_context: fidl::encoding::Context) -> usize {
6351            32
6352        }
6353    }
6354
6355    unsafe impl
6356        fidl::encoding::Encode<
6357            MultipleNonnullableHandles,
6358            fidl::encoding::DefaultFuchsiaResourceDialect,
6359        > for &mut MultipleNonnullableHandles
6360    {
6361        #[inline]
6362        unsafe fn encode(
6363            self,
6364            encoder: &mut fidl::encoding::Encoder<
6365                '_,
6366                fidl::encoding::DefaultFuchsiaResourceDialect,
6367            >,
6368            offset: usize,
6369            _depth: fidl::encoding::Depth,
6370        ) -> fidl::Result<()> {
6371            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6372            // Delegate to tuple encoding.
6373            fidl::encoding::Encode::<
6374                MultipleNonnullableHandles,
6375                fidl::encoding::DefaultFuchsiaResourceDialect,
6376            >::encode(
6377                (
6378                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6379                    <fidl::encoding::HandleType<
6380                        fidl::NullableHandle,
6381                        { fidl::ObjectType::NONE.into_raw() },
6382                        2147483648,
6383                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6384                        &mut self.handle0
6385                    ),
6386                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6387                    <fidl::encoding::HandleType<
6388                        fidl::Channel,
6389                        { fidl::ObjectType::CHANNEL.into_raw() },
6390                        2147483648,
6391                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6392                        &mut self.handle1
6393                    ),
6394                    <fidl::encoding::HandleType<
6395                        fidl::Event,
6396                        { fidl::ObjectType::EVENT.into_raw() },
6397                        2147483648,
6398                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6399                        &mut self.handle2
6400                    ),
6401                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6402                ),
6403                encoder,
6404                offset,
6405                _depth,
6406            )
6407        }
6408    }
6409    unsafe impl<
6410        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6411        T1: fidl::encoding::Encode<
6412                fidl::encoding::HandleType<
6413                    fidl::NullableHandle,
6414                    { fidl::ObjectType::NONE.into_raw() },
6415                    2147483648,
6416                >,
6417                fidl::encoding::DefaultFuchsiaResourceDialect,
6418            >,
6419        T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6420        T3: fidl::encoding::Encode<
6421                fidl::encoding::HandleType<
6422                    fidl::Channel,
6423                    { fidl::ObjectType::CHANNEL.into_raw() },
6424                    2147483648,
6425                >,
6426                fidl::encoding::DefaultFuchsiaResourceDialect,
6427            >,
6428        T4: fidl::encoding::Encode<
6429                fidl::encoding::HandleType<
6430                    fidl::Event,
6431                    { fidl::ObjectType::EVENT.into_raw() },
6432                    2147483648,
6433                >,
6434                fidl::encoding::DefaultFuchsiaResourceDialect,
6435            >,
6436        T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6437    >
6438        fidl::encoding::Encode<
6439            MultipleNonnullableHandles,
6440            fidl::encoding::DefaultFuchsiaResourceDialect,
6441        > for (T0, T1, T2, T3, T4, T5)
6442    {
6443        #[inline]
6444        unsafe fn encode(
6445            self,
6446            encoder: &mut fidl::encoding::Encoder<
6447                '_,
6448                fidl::encoding::DefaultFuchsiaResourceDialect,
6449            >,
6450            offset: usize,
6451            depth: fidl::encoding::Depth,
6452        ) -> fidl::Result<()> {
6453            encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6454            // Zero out padding regions. There's no need to apply masks
6455            // because the unmasked parts will be overwritten by fields.
6456            // Write the fields.
6457            self.0.encode(encoder, offset + 0, depth)?;
6458            self.1.encode(encoder, offset + 4, depth)?;
6459            self.2.encode(encoder, offset + 8, depth)?;
6460            self.3.encode(encoder, offset + 16, depth)?;
6461            self.4.encode(encoder, offset + 20, depth)?;
6462            self.5.encode(encoder, offset + 24, depth)?;
6463            Ok(())
6464        }
6465    }
6466
6467    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6468        for MultipleNonnullableHandles
6469    {
6470        #[inline(always)]
6471        fn new_empty() -> Self {
6472            Self {
6473                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6474                handle0: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6475                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6476                handle1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6477                handle2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6478                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6479            }
6480        }
6481
6482        #[inline]
6483        unsafe fn decode(
6484            &mut self,
6485            decoder: &mut fidl::encoding::Decoder<
6486                '_,
6487                fidl::encoding::DefaultFuchsiaResourceDialect,
6488            >,
6489            offset: usize,
6490            _depth: fidl::encoding::Depth,
6491        ) -> fidl::Result<()> {
6492            decoder.debug_check_bounds::<Self>(offset);
6493            // Verify that padding bytes are zero.
6494            fidl::decode!(
6495                u32,
6496                fidl::encoding::DefaultFuchsiaResourceDialect,
6497                &mut self.data0,
6498                decoder,
6499                offset + 0,
6500                _depth
6501            )?;
6502            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle0, decoder, offset + 4, _depth)?;
6503            fidl::decode!(
6504                u64,
6505                fidl::encoding::DefaultFuchsiaResourceDialect,
6506                &mut self.data1,
6507                decoder,
6508                offset + 8,
6509                _depth
6510            )?;
6511            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle1, decoder, offset + 16, _depth)?;
6512            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle2, decoder, offset + 20, _depth)?;
6513            fidl::decode!(
6514                u64,
6515                fidl::encoding::DefaultFuchsiaResourceDialect,
6516                &mut self.data2,
6517                decoder,
6518                offset + 24,
6519                _depth
6520            )?;
6521            Ok(())
6522        }
6523    }
6524
6525    impl fidl::encoding::ResourceTypeMarker for MultipleNullableHandles {
6526        type Borrowed<'a> = &'a mut Self;
6527        fn take_or_borrow<'a>(
6528            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6529        ) -> Self::Borrowed<'a> {
6530            value
6531        }
6532    }
6533
6534    unsafe impl fidl::encoding::TypeMarker for MultipleNullableHandles {
6535        type Owned = Self;
6536
6537        #[inline(always)]
6538        fn inline_align(_context: fidl::encoding::Context) -> usize {
6539            8
6540        }
6541
6542        #[inline(always)]
6543        fn inline_size(_context: fidl::encoding::Context) -> usize {
6544            32
6545        }
6546    }
6547
6548    unsafe impl
6549        fidl::encoding::Encode<
6550            MultipleNullableHandles,
6551            fidl::encoding::DefaultFuchsiaResourceDialect,
6552        > for &mut MultipleNullableHandles
6553    {
6554        #[inline]
6555        unsafe fn encode(
6556            self,
6557            encoder: &mut fidl::encoding::Encoder<
6558                '_,
6559                fidl::encoding::DefaultFuchsiaResourceDialect,
6560            >,
6561            offset: usize,
6562            _depth: fidl::encoding::Depth,
6563        ) -> fidl::Result<()> {
6564            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6565            // Delegate to tuple encoding.
6566            fidl::encoding::Encode::<
6567                MultipleNullableHandles,
6568                fidl::encoding::DefaultFuchsiaResourceDialect,
6569            >::encode(
6570                (
6571                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6572                    <fidl::encoding::Optional<
6573                        fidl::encoding::HandleType<
6574                            fidl::NullableHandle,
6575                            { fidl::ObjectType::NONE.into_raw() },
6576                            2147483648,
6577                        >,
6578                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6579                        &mut self.handle0
6580                    ),
6581                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6582                    <fidl::encoding::Optional<
6583                        fidl::encoding::HandleType<
6584                            fidl::Channel,
6585                            { fidl::ObjectType::CHANNEL.into_raw() },
6586                            2147483648,
6587                        >,
6588                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6589                        &mut self.handle1
6590                    ),
6591                    <fidl::encoding::Optional<
6592                        fidl::encoding::HandleType<
6593                            fidl::Event,
6594                            { fidl::ObjectType::EVENT.into_raw() },
6595                            2147483648,
6596                        >,
6597                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6598                        &mut self.handle2
6599                    ),
6600                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6601                ),
6602                encoder,
6603                offset,
6604                _depth,
6605            )
6606        }
6607    }
6608    unsafe impl<
6609        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6610        T1: fidl::encoding::Encode<
6611                fidl::encoding::Optional<
6612                    fidl::encoding::HandleType<
6613                        fidl::NullableHandle,
6614                        { fidl::ObjectType::NONE.into_raw() },
6615                        2147483648,
6616                    >,
6617                >,
6618                fidl::encoding::DefaultFuchsiaResourceDialect,
6619            >,
6620        T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6621        T3: fidl::encoding::Encode<
6622                fidl::encoding::Optional<
6623                    fidl::encoding::HandleType<
6624                        fidl::Channel,
6625                        { fidl::ObjectType::CHANNEL.into_raw() },
6626                        2147483648,
6627                    >,
6628                >,
6629                fidl::encoding::DefaultFuchsiaResourceDialect,
6630            >,
6631        T4: fidl::encoding::Encode<
6632                fidl::encoding::Optional<
6633                    fidl::encoding::HandleType<
6634                        fidl::Event,
6635                        { fidl::ObjectType::EVENT.into_raw() },
6636                        2147483648,
6637                    >,
6638                >,
6639                fidl::encoding::DefaultFuchsiaResourceDialect,
6640            >,
6641        T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6642    >
6643        fidl::encoding::Encode<
6644            MultipleNullableHandles,
6645            fidl::encoding::DefaultFuchsiaResourceDialect,
6646        > for (T0, T1, T2, T3, T4, T5)
6647    {
6648        #[inline]
6649        unsafe fn encode(
6650            self,
6651            encoder: &mut fidl::encoding::Encoder<
6652                '_,
6653                fidl::encoding::DefaultFuchsiaResourceDialect,
6654            >,
6655            offset: usize,
6656            depth: fidl::encoding::Depth,
6657        ) -> fidl::Result<()> {
6658            encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6659            // Zero out padding regions. There's no need to apply masks
6660            // because the unmasked parts will be overwritten by fields.
6661            // Write the fields.
6662            self.0.encode(encoder, offset + 0, depth)?;
6663            self.1.encode(encoder, offset + 4, depth)?;
6664            self.2.encode(encoder, offset + 8, depth)?;
6665            self.3.encode(encoder, offset + 16, depth)?;
6666            self.4.encode(encoder, offset + 20, depth)?;
6667            self.5.encode(encoder, offset + 24, depth)?;
6668            Ok(())
6669        }
6670    }
6671
6672    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6673        for MultipleNullableHandles
6674    {
6675        #[inline(always)]
6676        fn new_empty() -> Self {
6677            Self {
6678                data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6679                handle0: fidl::new_empty!(
6680                    fidl::encoding::Optional<
6681                        fidl::encoding::HandleType<
6682                            fidl::NullableHandle,
6683                            { fidl::ObjectType::NONE.into_raw() },
6684                            2147483648,
6685                        >,
6686                    >,
6687                    fidl::encoding::DefaultFuchsiaResourceDialect
6688                ),
6689                data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6690                handle1: fidl::new_empty!(
6691                    fidl::encoding::Optional<
6692                        fidl::encoding::HandleType<
6693                            fidl::Channel,
6694                            { fidl::ObjectType::CHANNEL.into_raw() },
6695                            2147483648,
6696                        >,
6697                    >,
6698                    fidl::encoding::DefaultFuchsiaResourceDialect
6699                ),
6700                handle2: fidl::new_empty!(
6701                    fidl::encoding::Optional<
6702                        fidl::encoding::HandleType<
6703                            fidl::Event,
6704                            { fidl::ObjectType::EVENT.into_raw() },
6705                            2147483648,
6706                        >,
6707                    >,
6708                    fidl::encoding::DefaultFuchsiaResourceDialect
6709                ),
6710                data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6711            }
6712        }
6713
6714        #[inline]
6715        unsafe fn decode(
6716            &mut self,
6717            decoder: &mut fidl::encoding::Decoder<
6718                '_,
6719                fidl::encoding::DefaultFuchsiaResourceDialect,
6720            >,
6721            offset: usize,
6722            _depth: fidl::encoding::Depth,
6723        ) -> fidl::Result<()> {
6724            decoder.debug_check_bounds::<Self>(offset);
6725            // Verify that padding bytes are zero.
6726            fidl::decode!(
6727                u32,
6728                fidl::encoding::DefaultFuchsiaResourceDialect,
6729                &mut self.data0,
6730                decoder,
6731                offset + 0,
6732                _depth
6733            )?;
6734            fidl::decode!(
6735                fidl::encoding::Optional<
6736                    fidl::encoding::HandleType<
6737                        fidl::NullableHandle,
6738                        { fidl::ObjectType::NONE.into_raw() },
6739                        2147483648,
6740                    >,
6741                >,
6742                fidl::encoding::DefaultFuchsiaResourceDialect,
6743                &mut self.handle0,
6744                decoder,
6745                offset + 4,
6746                _depth
6747            )?;
6748            fidl::decode!(
6749                u64,
6750                fidl::encoding::DefaultFuchsiaResourceDialect,
6751                &mut self.data1,
6752                decoder,
6753                offset + 8,
6754                _depth
6755            )?;
6756            fidl::decode!(
6757                fidl::encoding::Optional<
6758                    fidl::encoding::HandleType<
6759                        fidl::Channel,
6760                        { fidl::ObjectType::CHANNEL.into_raw() },
6761                        2147483648,
6762                    >,
6763                >,
6764                fidl::encoding::DefaultFuchsiaResourceDialect,
6765                &mut self.handle1,
6766                decoder,
6767                offset + 16,
6768                _depth
6769            )?;
6770            fidl::decode!(
6771                fidl::encoding::Optional<
6772                    fidl::encoding::HandleType<
6773                        fidl::Event,
6774                        { fidl::ObjectType::EVENT.into_raw() },
6775                        2147483648,
6776                    >,
6777                >,
6778                fidl::encoding::DefaultFuchsiaResourceDialect,
6779                &mut self.handle2,
6780                decoder,
6781                offset + 20,
6782                _depth
6783            )?;
6784            fidl::decode!(
6785                u64,
6786                fidl::encoding::DefaultFuchsiaResourceDialect,
6787                &mut self.data2,
6788                decoder,
6789                offset + 24,
6790                _depth
6791            )?;
6792            Ok(())
6793        }
6794    }
6795
6796    impl fidl::encoding::ResourceTypeMarker for NonnullableHandle {
6797        type Borrowed<'a> = &'a mut Self;
6798        fn take_or_borrow<'a>(
6799            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6800        ) -> Self::Borrowed<'a> {
6801            value
6802        }
6803    }
6804
6805    unsafe impl fidl::encoding::TypeMarker for NonnullableHandle {
6806        type Owned = Self;
6807
6808        #[inline(always)]
6809        fn inline_align(_context: fidl::encoding::Context) -> usize {
6810            4
6811        }
6812
6813        #[inline(always)]
6814        fn inline_size(_context: fidl::encoding::Context) -> usize {
6815            4
6816        }
6817    }
6818
6819    unsafe impl
6820        fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6821        for &mut NonnullableHandle
6822    {
6823        #[inline]
6824        unsafe fn encode(
6825            self,
6826            encoder: &mut fidl::encoding::Encoder<
6827                '_,
6828                fidl::encoding::DefaultFuchsiaResourceDialect,
6829            >,
6830            offset: usize,
6831            _depth: fidl::encoding::Depth,
6832        ) -> fidl::Result<()> {
6833            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6834            // Delegate to tuple encoding.
6835            fidl::encoding::Encode::<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6836                (
6837                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
6838                ),
6839                encoder, offset, _depth
6840            )
6841        }
6842    }
6843    unsafe impl<
6844        T0: fidl::encoding::Encode<
6845                fidl::encoding::HandleType<
6846                    fidl::NullableHandle,
6847                    { fidl::ObjectType::NONE.into_raw() },
6848                    2147483648,
6849                >,
6850                fidl::encoding::DefaultFuchsiaResourceDialect,
6851            >,
6852    > fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6853        for (T0,)
6854    {
6855        #[inline]
6856        unsafe fn encode(
6857            self,
6858            encoder: &mut fidl::encoding::Encoder<
6859                '_,
6860                fidl::encoding::DefaultFuchsiaResourceDialect,
6861            >,
6862            offset: usize,
6863            depth: fidl::encoding::Depth,
6864        ) -> fidl::Result<()> {
6865            encoder.debug_check_bounds::<NonnullableHandle>(offset);
6866            // Zero out padding regions. There's no need to apply masks
6867            // because the unmasked parts will be overwritten by fields.
6868            // Write the fields.
6869            self.0.encode(encoder, offset + 0, depth)?;
6870            Ok(())
6871        }
6872    }
6873
6874    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6875        for NonnullableHandle
6876    {
6877        #[inline(always)]
6878        fn new_empty() -> Self {
6879            Self {
6880                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6881            }
6882        }
6883
6884        #[inline]
6885        unsafe fn decode(
6886            &mut self,
6887            decoder: &mut fidl::encoding::Decoder<
6888                '_,
6889                fidl::encoding::DefaultFuchsiaResourceDialect,
6890            >,
6891            offset: usize,
6892            _depth: fidl::encoding::Depth,
6893        ) -> fidl::Result<()> {
6894            decoder.debug_check_bounds::<Self>(offset);
6895            // Verify that padding bytes are zero.
6896            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
6897            Ok(())
6898        }
6899    }
6900
6901    impl fidl::encoding::ResourceTypeMarker for NonnullableHandleArray {
6902        type Borrowed<'a> = &'a mut Self;
6903        fn take_or_borrow<'a>(
6904            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6905        ) -> Self::Borrowed<'a> {
6906            value
6907        }
6908    }
6909
6910    unsafe impl fidl::encoding::TypeMarker for NonnullableHandleArray {
6911        type Owned = Self;
6912
6913        #[inline(always)]
6914        fn inline_align(_context: fidl::encoding::Context) -> usize {
6915            4
6916        }
6917
6918        #[inline(always)]
6919        fn inline_size(_context: fidl::encoding::Context) -> usize {
6920            16
6921        }
6922    }
6923
6924    unsafe impl
6925        fidl::encoding::Encode<
6926            NonnullableHandleArray,
6927            fidl::encoding::DefaultFuchsiaResourceDialect,
6928        > for &mut NonnullableHandleArray
6929    {
6930        #[inline]
6931        unsafe fn encode(
6932            self,
6933            encoder: &mut fidl::encoding::Encoder<
6934                '_,
6935                fidl::encoding::DefaultFuchsiaResourceDialect,
6936            >,
6937            offset: usize,
6938            _depth: fidl::encoding::Depth,
6939        ) -> fidl::Result<()> {
6940            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6941            // Delegate to tuple encoding.
6942            fidl::encoding::Encode::<
6943                NonnullableHandleArray,
6944                fidl::encoding::DefaultFuchsiaResourceDialect,
6945            >::encode(
6946                (<fidl::encoding::Array<
6947                    fidl::encoding::HandleType<
6948                        fidl::NullableHandle,
6949                        { fidl::ObjectType::NONE.into_raw() },
6950                        2147483648,
6951                    >,
6952                    4,
6953                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6954                    &mut self.handles
6955                ),),
6956                encoder,
6957                offset,
6958                _depth,
6959            )
6960        }
6961    }
6962    unsafe impl<
6963        T0: fidl::encoding::Encode<
6964                fidl::encoding::Array<
6965                    fidl::encoding::HandleType<
6966                        fidl::NullableHandle,
6967                        { fidl::ObjectType::NONE.into_raw() },
6968                        2147483648,
6969                    >,
6970                    4,
6971                >,
6972                fidl::encoding::DefaultFuchsiaResourceDialect,
6973            >,
6974    >
6975        fidl::encoding::Encode<
6976            NonnullableHandleArray,
6977            fidl::encoding::DefaultFuchsiaResourceDialect,
6978        > for (T0,)
6979    {
6980        #[inline]
6981        unsafe fn encode(
6982            self,
6983            encoder: &mut fidl::encoding::Encoder<
6984                '_,
6985                fidl::encoding::DefaultFuchsiaResourceDialect,
6986            >,
6987            offset: usize,
6988            depth: fidl::encoding::Depth,
6989        ) -> fidl::Result<()> {
6990            encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6991            // Zero out padding regions. There's no need to apply masks
6992            // because the unmasked parts will be overwritten by fields.
6993            // Write the fields.
6994            self.0.encode(encoder, offset + 0, depth)?;
6995            Ok(())
6996        }
6997    }
6998
6999    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7000        for NonnullableHandleArray
7001    {
7002        #[inline(always)]
7003        fn new_empty() -> Self {
7004            Self {
7005                handles: fidl::new_empty!(
7006                    fidl::encoding::Array<
7007                        fidl::encoding::HandleType<
7008                            fidl::NullableHandle,
7009                            { fidl::ObjectType::NONE.into_raw() },
7010                            2147483648,
7011                        >,
7012                        4,
7013                    >,
7014                    fidl::encoding::DefaultFuchsiaResourceDialect
7015                ),
7016            }
7017        }
7018
7019        #[inline]
7020        unsafe fn decode(
7021            &mut self,
7022            decoder: &mut fidl::encoding::Decoder<
7023                '_,
7024                fidl::encoding::DefaultFuchsiaResourceDialect,
7025            >,
7026            offset: usize,
7027            _depth: fidl::encoding::Depth,
7028        ) -> fidl::Result<()> {
7029            decoder.debug_check_bounds::<Self>(offset);
7030            // Verify that padding bytes are zero.
7031            fidl::decode!(
7032                fidl::encoding::Array<
7033                    fidl::encoding::HandleType<
7034                        fidl::NullableHandle,
7035                        { fidl::ObjectType::NONE.into_raw() },
7036                        2147483648,
7037                    >,
7038                    4,
7039                >,
7040                fidl::encoding::DefaultFuchsiaResourceDialect,
7041                &mut self.handles,
7042                decoder,
7043                offset + 0,
7044                _depth
7045            )?;
7046            Ok(())
7047        }
7048    }
7049
7050    impl fidl::encoding::ResourceTypeMarker for NullableHandle {
7051        type Borrowed<'a> = &'a mut Self;
7052        fn take_or_borrow<'a>(
7053            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7054        ) -> Self::Borrowed<'a> {
7055            value
7056        }
7057    }
7058
7059    unsafe impl fidl::encoding::TypeMarker for NullableHandle {
7060        type Owned = Self;
7061
7062        #[inline(always)]
7063        fn inline_align(_context: fidl::encoding::Context) -> usize {
7064            4
7065        }
7066
7067        #[inline(always)]
7068        fn inline_size(_context: fidl::encoding::Context) -> usize {
7069            4
7070        }
7071    }
7072
7073    unsafe impl
7074        fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7075        for &mut NullableHandle
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            // Delegate to tuple encoding.
7089            fidl::encoding::Encode::<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7090                (
7091                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7092                ),
7093                encoder, offset, _depth
7094            )
7095        }
7096    }
7097    unsafe impl<
7098        T0: fidl::encoding::Encode<
7099                fidl::encoding::Optional<
7100                    fidl::encoding::HandleType<
7101                        fidl::NullableHandle,
7102                        { fidl::ObjectType::NONE.into_raw() },
7103                        2147483648,
7104                    >,
7105                >,
7106                fidl::encoding::DefaultFuchsiaResourceDialect,
7107            >,
7108    > fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7109        for (T0,)
7110    {
7111        #[inline]
7112        unsafe fn encode(
7113            self,
7114            encoder: &mut fidl::encoding::Encoder<
7115                '_,
7116                fidl::encoding::DefaultFuchsiaResourceDialect,
7117            >,
7118            offset: usize,
7119            depth: fidl::encoding::Depth,
7120        ) -> fidl::Result<()> {
7121            encoder.debug_check_bounds::<NullableHandle>(offset);
7122            // Zero out padding regions. There's no need to apply masks
7123            // because the unmasked parts will be overwritten by fields.
7124            // Write the fields.
7125            self.0.encode(encoder, offset + 0, depth)?;
7126            Ok(())
7127        }
7128    }
7129
7130    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7131        for NullableHandle
7132    {
7133        #[inline(always)]
7134        fn new_empty() -> Self {
7135            Self {
7136                h: fidl::new_empty!(
7137                    fidl::encoding::Optional<
7138                        fidl::encoding::HandleType<
7139                            fidl::NullableHandle,
7140                            { fidl::ObjectType::NONE.into_raw() },
7141                            2147483648,
7142                        >,
7143                    >,
7144                    fidl::encoding::DefaultFuchsiaResourceDialect
7145                ),
7146            }
7147        }
7148
7149        #[inline]
7150        unsafe fn decode(
7151            &mut self,
7152            decoder: &mut fidl::encoding::Decoder<
7153                '_,
7154                fidl::encoding::DefaultFuchsiaResourceDialect,
7155            >,
7156            offset: usize,
7157            _depth: fidl::encoding::Depth,
7158        ) -> fidl::Result<()> {
7159            decoder.debug_check_bounds::<Self>(offset);
7160            // Verify that padding bytes are zero.
7161            fidl::decode!(
7162                fidl::encoding::Optional<
7163                    fidl::encoding::HandleType<
7164                        fidl::NullableHandle,
7165                        { fidl::ObjectType::NONE.into_raw() },
7166                        2147483648,
7167                    >,
7168                >,
7169                fidl::encoding::DefaultFuchsiaResourceDialect,
7170                &mut self.h,
7171                decoder,
7172                offset + 0,
7173                _depth
7174            )?;
7175            Ok(())
7176        }
7177    }
7178
7179    impl fidl::encoding::ResourceTypeMarker for OutOfLineArrayOfNonnullableHandles {
7180        type Borrowed<'a> = &'a mut Self;
7181        fn take_or_borrow<'a>(
7182            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7183        ) -> Self::Borrowed<'a> {
7184            value
7185        }
7186    }
7187
7188    unsafe impl fidl::encoding::TypeMarker for OutOfLineArrayOfNonnullableHandles {
7189        type Owned = Self;
7190
7191        #[inline(always)]
7192        fn inline_align(_context: fidl::encoding::Context) -> usize {
7193            8
7194        }
7195
7196        #[inline(always)]
7197        fn inline_size(_context: fidl::encoding::Context) -> usize {
7198            8
7199        }
7200    }
7201
7202    unsafe impl
7203        fidl::encoding::Encode<
7204            OutOfLineArrayOfNonnullableHandles,
7205            fidl::encoding::DefaultFuchsiaResourceDialect,
7206        > for &mut OutOfLineArrayOfNonnullableHandles
7207    {
7208        #[inline]
7209        unsafe fn encode(
7210            self,
7211            encoder: &mut fidl::encoding::Encoder<
7212                '_,
7213                fidl::encoding::DefaultFuchsiaResourceDialect,
7214            >,
7215            offset: usize,
7216            _depth: fidl::encoding::Depth,
7217        ) -> fidl::Result<()> {
7218            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7219            // Delegate to tuple encoding.
7220            fidl::encoding::Encode::<OutOfLineArrayOfNonnullableHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7221                (
7222                    <fidl::encoding::Boxed<NonnullableHandleArray> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
7223                ),
7224                encoder, offset, _depth
7225            )
7226        }
7227    }
7228    unsafe impl<
7229        T0: fidl::encoding::Encode<
7230                fidl::encoding::Boxed<NonnullableHandleArray>,
7231                fidl::encoding::DefaultFuchsiaResourceDialect,
7232            >,
7233    >
7234        fidl::encoding::Encode<
7235            OutOfLineArrayOfNonnullableHandles,
7236            fidl::encoding::DefaultFuchsiaResourceDialect,
7237        > for (T0,)
7238    {
7239        #[inline]
7240        unsafe fn encode(
7241            self,
7242            encoder: &mut fidl::encoding::Encoder<
7243                '_,
7244                fidl::encoding::DefaultFuchsiaResourceDialect,
7245            >,
7246            offset: usize,
7247            depth: fidl::encoding::Depth,
7248        ) -> fidl::Result<()> {
7249            encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7250            // Zero out padding regions. There's no need to apply masks
7251            // because the unmasked parts will be overwritten by fields.
7252            // Write the fields.
7253            self.0.encode(encoder, offset + 0, depth)?;
7254            Ok(())
7255        }
7256    }
7257
7258    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7259        for OutOfLineArrayOfNonnullableHandles
7260    {
7261        #[inline(always)]
7262        fn new_empty() -> Self {
7263            Self {
7264                handles: fidl::new_empty!(
7265                    fidl::encoding::Boxed<NonnullableHandleArray>,
7266                    fidl::encoding::DefaultFuchsiaResourceDialect
7267                ),
7268            }
7269        }
7270
7271        #[inline]
7272        unsafe fn decode(
7273            &mut self,
7274            decoder: &mut fidl::encoding::Decoder<
7275                '_,
7276                fidl::encoding::DefaultFuchsiaResourceDialect,
7277            >,
7278            offset: usize,
7279            _depth: fidl::encoding::Depth,
7280        ) -> fidl::Result<()> {
7281            decoder.debug_check_bounds::<Self>(offset);
7282            // Verify that padding bytes are zero.
7283            fidl::decode!(
7284                fidl::encoding::Boxed<NonnullableHandleArray>,
7285                fidl::encoding::DefaultFuchsiaResourceDialect,
7286                &mut self.handles,
7287                decoder,
7288                offset + 0,
7289                _depth
7290            )?;
7291            Ok(())
7292        }
7293    }
7294
7295    impl fidl::encoding::ResourceTypeMarker for Sandwich6 {
7296        type Borrowed<'a> = &'a mut Self;
7297        fn take_or_borrow<'a>(
7298            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7299        ) -> Self::Borrowed<'a> {
7300            value
7301        }
7302    }
7303
7304    unsafe impl fidl::encoding::TypeMarker for Sandwich6 {
7305        type Owned = Self;
7306
7307        #[inline(always)]
7308        fn inline_align(_context: fidl::encoding::Context) -> usize {
7309            8
7310        }
7311
7312        #[inline(always)]
7313        fn inline_size(_context: fidl::encoding::Context) -> usize {
7314            32
7315        }
7316    }
7317
7318    unsafe impl fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7319        for &mut Sandwich6
7320    {
7321        #[inline]
7322        unsafe fn encode(
7323            self,
7324            encoder: &mut fidl::encoding::Encoder<
7325                '_,
7326                fidl::encoding::DefaultFuchsiaResourceDialect,
7327            >,
7328            offset: usize,
7329            _depth: fidl::encoding::Depth,
7330        ) -> fidl::Result<()> {
7331            encoder.debug_check_bounds::<Sandwich6>(offset);
7332            // Delegate to tuple encoding.
7333            fidl::encoding::Encode::<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7334                (
7335                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
7336                    <UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.the_union),
7337                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
7338                ),
7339                encoder, offset, _depth
7340            )
7341        }
7342    }
7343    unsafe impl<
7344        T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7345        T1: fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>,
7346        T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7347    > fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7348        for (T0, T1, T2)
7349    {
7350        #[inline]
7351        unsafe fn encode(
7352            self,
7353            encoder: &mut fidl::encoding::Encoder<
7354                '_,
7355                fidl::encoding::DefaultFuchsiaResourceDialect,
7356            >,
7357            offset: usize,
7358            depth: fidl::encoding::Depth,
7359        ) -> fidl::Result<()> {
7360            encoder.debug_check_bounds::<Sandwich6>(offset);
7361            // Zero out padding regions. There's no need to apply masks
7362            // because the unmasked parts will be overwritten by fields.
7363            unsafe {
7364                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7365                (ptr as *mut u64).write_unaligned(0);
7366            }
7367            unsafe {
7368                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
7369                (ptr as *mut u64).write_unaligned(0);
7370            }
7371            // Write the fields.
7372            self.0.encode(encoder, offset + 0, depth)?;
7373            self.1.encode(encoder, offset + 8, depth)?;
7374            self.2.encode(encoder, offset + 24, depth)?;
7375            Ok(())
7376        }
7377    }
7378
7379    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {
7380        #[inline(always)]
7381        fn new_empty() -> Self {
7382            Self {
7383                before: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7384                the_union: fidl::new_empty!(
7385                    UnionWithVector,
7386                    fidl::encoding::DefaultFuchsiaResourceDialect
7387                ),
7388                after: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7389            }
7390        }
7391
7392        #[inline]
7393        unsafe fn decode(
7394            &mut self,
7395            decoder: &mut fidl::encoding::Decoder<
7396                '_,
7397                fidl::encoding::DefaultFuchsiaResourceDialect,
7398            >,
7399            offset: usize,
7400            _depth: fidl::encoding::Depth,
7401        ) -> fidl::Result<()> {
7402            decoder.debug_check_bounds::<Self>(offset);
7403            // Verify that padding bytes are zero.
7404            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7405            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7406            let mask = 0xffffffff00000000u64;
7407            let maskedval = padval & mask;
7408            if maskedval != 0 {
7409                return Err(fidl::Error::NonZeroPadding {
7410                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7411                });
7412            }
7413            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
7414            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7415            let mask = 0xffffffff00000000u64;
7416            let maskedval = padval & mask;
7417            if maskedval != 0 {
7418                return Err(fidl::Error::NonZeroPadding {
7419                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
7420                });
7421            }
7422            fidl::decode!(
7423                u32,
7424                fidl::encoding::DefaultFuchsiaResourceDialect,
7425                &mut self.before,
7426                decoder,
7427                offset + 0,
7428                _depth
7429            )?;
7430            fidl::decode!(
7431                UnionWithVector,
7432                fidl::encoding::DefaultFuchsiaResourceDialect,
7433                &mut self.the_union,
7434                decoder,
7435                offset + 8,
7436                _depth
7437            )?;
7438            fidl::decode!(
7439                u32,
7440                fidl::encoding::DefaultFuchsiaResourceDialect,
7441                &mut self.after,
7442                decoder,
7443                offset + 24,
7444                _depth
7445            )?;
7446            Ok(())
7447        }
7448    }
7449
7450    impl fidl::encoding::ResourceTypeMarker for ShortStringThenHandle {
7451        type Borrowed<'a> = &'a mut Self;
7452        fn take_or_borrow<'a>(
7453            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7454        ) -> Self::Borrowed<'a> {
7455            value
7456        }
7457    }
7458
7459    unsafe impl fidl::encoding::TypeMarker for ShortStringThenHandle {
7460        type Owned = Self;
7461
7462        #[inline(always)]
7463        fn inline_align(_context: fidl::encoding::Context) -> usize {
7464            8
7465        }
7466
7467        #[inline(always)]
7468        fn inline_size(_context: fidl::encoding::Context) -> usize {
7469            24
7470        }
7471    }
7472
7473    unsafe impl
7474        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7475        for &mut ShortStringThenHandle
7476    {
7477        #[inline]
7478        unsafe fn encode(
7479            self,
7480            encoder: &mut fidl::encoding::Encoder<
7481                '_,
7482                fidl::encoding::DefaultFuchsiaResourceDialect,
7483            >,
7484            offset: usize,
7485            _depth: fidl::encoding::Depth,
7486        ) -> fidl::Result<()> {
7487            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7488            // Delegate to tuple encoding.
7489            fidl::encoding::Encode::<
7490                ShortStringThenHandle,
7491                fidl::encoding::DefaultFuchsiaResourceDialect,
7492            >::encode(
7493                (
7494                    <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
7495                        &self.s,
7496                    ),
7497                    <fidl::encoding::HandleType<
7498                        fidl::NullableHandle,
7499                        { fidl::ObjectType::NONE.into_raw() },
7500                        2147483648,
7501                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7502                        &mut self.h
7503                    ),
7504                ),
7505                encoder,
7506                offset,
7507                _depth,
7508            )
7509        }
7510    }
7511    unsafe impl<
7512        T0: fidl::encoding::Encode<
7513                fidl::encoding::BoundedString<1>,
7514                fidl::encoding::DefaultFuchsiaResourceDialect,
7515            >,
7516        T1: fidl::encoding::Encode<
7517                fidl::encoding::HandleType<
7518                    fidl::NullableHandle,
7519                    { fidl::ObjectType::NONE.into_raw() },
7520                    2147483648,
7521                >,
7522                fidl::encoding::DefaultFuchsiaResourceDialect,
7523            >,
7524    >
7525        fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7526        for (T0, T1)
7527    {
7528        #[inline]
7529        unsafe fn encode(
7530            self,
7531            encoder: &mut fidl::encoding::Encoder<
7532                '_,
7533                fidl::encoding::DefaultFuchsiaResourceDialect,
7534            >,
7535            offset: usize,
7536            depth: fidl::encoding::Depth,
7537        ) -> fidl::Result<()> {
7538            encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7539            // Zero out padding regions. There's no need to apply masks
7540            // because the unmasked parts will be overwritten by fields.
7541            unsafe {
7542                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7543                (ptr as *mut u64).write_unaligned(0);
7544            }
7545            // Write the fields.
7546            self.0.encode(encoder, offset + 0, depth)?;
7547            self.1.encode(encoder, offset + 16, depth)?;
7548            Ok(())
7549        }
7550    }
7551
7552    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7553        for ShortStringThenHandle
7554    {
7555        #[inline(always)]
7556        fn new_empty() -> Self {
7557            Self {
7558                s: fidl::new_empty!(
7559                    fidl::encoding::BoundedString<1>,
7560                    fidl::encoding::DefaultFuchsiaResourceDialect
7561                ),
7562                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7563            }
7564        }
7565
7566        #[inline]
7567        unsafe fn decode(
7568            &mut self,
7569            decoder: &mut fidl::encoding::Decoder<
7570                '_,
7571                fidl::encoding::DefaultFuchsiaResourceDialect,
7572            >,
7573            offset: usize,
7574            _depth: fidl::encoding::Depth,
7575        ) -> fidl::Result<()> {
7576            decoder.debug_check_bounds::<Self>(offset);
7577            // Verify that padding bytes are zero.
7578            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7579            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7580            let mask = 0xffffffff00000000u64;
7581            let maskedval = padval & mask;
7582            if maskedval != 0 {
7583                return Err(fidl::Error::NonZeroPadding {
7584                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7585                });
7586            }
7587            fidl::decode!(
7588                fidl::encoding::BoundedString<1>,
7589                fidl::encoding::DefaultFuchsiaResourceDialect,
7590                &mut self.s,
7591                decoder,
7592                offset + 0,
7593                _depth
7594            )?;
7595            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 16, _depth)?;
7596            Ok(())
7597        }
7598    }
7599
7600    impl fidl::encoding::ResourceTypeMarker for SingleHandle {
7601        type Borrowed<'a> = &'a mut Self;
7602        fn take_or_borrow<'a>(
7603            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7604        ) -> Self::Borrowed<'a> {
7605            value
7606        }
7607    }
7608
7609    unsafe impl fidl::encoding::TypeMarker for SingleHandle {
7610        type Owned = Self;
7611
7612        #[inline(always)]
7613        fn inline_align(_context: fidl::encoding::Context) -> usize {
7614            4
7615        }
7616
7617        #[inline(always)]
7618        fn inline_size(_context: fidl::encoding::Context) -> usize {
7619            4
7620        }
7621    }
7622
7623    unsafe impl fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7624        for &mut SingleHandle
7625    {
7626        #[inline]
7627        unsafe fn encode(
7628            self,
7629            encoder: &mut fidl::encoding::Encoder<
7630                '_,
7631                fidl::encoding::DefaultFuchsiaResourceDialect,
7632            >,
7633            offset: usize,
7634            _depth: fidl::encoding::Depth,
7635        ) -> fidl::Result<()> {
7636            encoder.debug_check_bounds::<SingleHandle>(offset);
7637            // Delegate to tuple encoding.
7638            fidl::encoding::Encode::<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7639                (
7640                    <fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7641                ),
7642                encoder, offset, _depth
7643            )
7644        }
7645    }
7646    unsafe impl<
7647        T0: fidl::encoding::Encode<
7648                fidl::encoding::HandleType<
7649                    fidl::NullableHandle,
7650                    { fidl::ObjectType::NONE.into_raw() },
7651                    2147483648,
7652                >,
7653                fidl::encoding::DefaultFuchsiaResourceDialect,
7654            >,
7655    > fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
7656    {
7657        #[inline]
7658        unsafe fn encode(
7659            self,
7660            encoder: &mut fidl::encoding::Encoder<
7661                '_,
7662                fidl::encoding::DefaultFuchsiaResourceDialect,
7663            >,
7664            offset: usize,
7665            depth: fidl::encoding::Depth,
7666        ) -> fidl::Result<()> {
7667            encoder.debug_check_bounds::<SingleHandle>(offset);
7668            // Zero out padding regions. There's no need to apply masks
7669            // because the unmasked parts will be overwritten by fields.
7670            // Write the fields.
7671            self.0.encode(encoder, offset + 0, depth)?;
7672            Ok(())
7673        }
7674    }
7675
7676    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {
7677        #[inline(always)]
7678        fn new_empty() -> Self {
7679            Self {
7680                h: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7681            }
7682        }
7683
7684        #[inline]
7685        unsafe fn decode(
7686            &mut self,
7687            decoder: &mut fidl::encoding::Decoder<
7688                '_,
7689                fidl::encoding::DefaultFuchsiaResourceDialect,
7690            >,
7691            offset: usize,
7692            _depth: fidl::encoding::Depth,
7693        ) -> fidl::Result<()> {
7694            decoder.debug_check_bounds::<Self>(offset);
7695            // Verify that padding bytes are zero.
7696            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
7697            Ok(())
7698        }
7699    }
7700
7701    impl fidl::encoding::ResourceTypeMarker for SingleOptionalHandle {
7702        type Borrowed<'a> = &'a mut Self;
7703        fn take_or_borrow<'a>(
7704            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7705        ) -> Self::Borrowed<'a> {
7706            value
7707        }
7708    }
7709
7710    unsafe impl fidl::encoding::TypeMarker for SingleOptionalHandle {
7711        type Owned = Self;
7712
7713        #[inline(always)]
7714        fn inline_align(_context: fidl::encoding::Context) -> usize {
7715            4
7716        }
7717
7718        #[inline(always)]
7719        fn inline_size(_context: fidl::encoding::Context) -> usize {
7720            4
7721        }
7722    }
7723
7724    unsafe impl
7725        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7726        for &mut SingleOptionalHandle
7727    {
7728        #[inline]
7729        unsafe fn encode(
7730            self,
7731            encoder: &mut fidl::encoding::Encoder<
7732                '_,
7733                fidl::encoding::DefaultFuchsiaResourceDialect,
7734            >,
7735            offset: usize,
7736            _depth: fidl::encoding::Depth,
7737        ) -> fidl::Result<()> {
7738            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7739            // Delegate to tuple encoding.
7740            fidl::encoding::Encode::<
7741                SingleOptionalHandle,
7742                fidl::encoding::DefaultFuchsiaResourceDialect,
7743            >::encode(
7744                (<fidl::encoding::Optional<
7745                    fidl::encoding::HandleType<
7746                        fidl::NullableHandle,
7747                        { fidl::ObjectType::NONE.into_raw() },
7748                        2147483648,
7749                    >,
7750                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7751                    &mut self.h
7752                ),),
7753                encoder,
7754                offset,
7755                _depth,
7756            )
7757        }
7758    }
7759    unsafe impl<
7760        T0: fidl::encoding::Encode<
7761                fidl::encoding::Optional<
7762                    fidl::encoding::HandleType<
7763                        fidl::NullableHandle,
7764                        { fidl::ObjectType::NONE.into_raw() },
7765                        2147483648,
7766                    >,
7767                >,
7768                fidl::encoding::DefaultFuchsiaResourceDialect,
7769            >,
7770    >
7771        fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7772        for (T0,)
7773    {
7774        #[inline]
7775        unsafe fn encode(
7776            self,
7777            encoder: &mut fidl::encoding::Encoder<
7778                '_,
7779                fidl::encoding::DefaultFuchsiaResourceDialect,
7780            >,
7781            offset: usize,
7782            depth: fidl::encoding::Depth,
7783        ) -> fidl::Result<()> {
7784            encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7785            // Zero out padding regions. There's no need to apply masks
7786            // because the unmasked parts will be overwritten by fields.
7787            // Write the fields.
7788            self.0.encode(encoder, offset + 0, depth)?;
7789            Ok(())
7790        }
7791    }
7792
7793    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7794        for SingleOptionalHandle
7795    {
7796        #[inline(always)]
7797        fn new_empty() -> Self {
7798            Self {
7799                h: fidl::new_empty!(
7800                    fidl::encoding::Optional<
7801                        fidl::encoding::HandleType<
7802                            fidl::NullableHandle,
7803                            { fidl::ObjectType::NONE.into_raw() },
7804                            2147483648,
7805                        >,
7806                    >,
7807                    fidl::encoding::DefaultFuchsiaResourceDialect
7808                ),
7809            }
7810        }
7811
7812        #[inline]
7813        unsafe fn decode(
7814            &mut self,
7815            decoder: &mut fidl::encoding::Decoder<
7816                '_,
7817                fidl::encoding::DefaultFuchsiaResourceDialect,
7818            >,
7819            offset: usize,
7820            _depth: fidl::encoding::Depth,
7821        ) -> fidl::Result<()> {
7822            decoder.debug_check_bounds::<Self>(offset);
7823            // Verify that padding bytes are zero.
7824            fidl::decode!(
7825                fidl::encoding::Optional<
7826                    fidl::encoding::HandleType<
7827                        fidl::NullableHandle,
7828                        { fidl::ObjectType::NONE.into_raw() },
7829                        2147483648,
7830                    >,
7831                >,
7832                fidl::encoding::DefaultFuchsiaResourceDialect,
7833                &mut self.h,
7834                decoder,
7835                offset + 0,
7836                _depth
7837            )?;
7838            Ok(())
7839        }
7840    }
7841
7842    impl fidl::encoding::ResourceTypeMarker for StructOfEndpoints {
7843        type Borrowed<'a> = &'a mut Self;
7844        fn take_or_borrow<'a>(
7845            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7846        ) -> Self::Borrowed<'a> {
7847            value
7848        }
7849    }
7850
7851    unsafe impl fidl::encoding::TypeMarker for StructOfEndpoints {
7852        type Owned = Self;
7853
7854        #[inline(always)]
7855        fn inline_align(_context: fidl::encoding::Context) -> usize {
7856            4
7857        }
7858
7859        #[inline(always)]
7860        fn inline_size(_context: fidl::encoding::Context) -> usize {
7861            16
7862        }
7863    }
7864
7865    unsafe impl
7866        fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7867        for &mut StructOfEndpoints
7868    {
7869        #[inline]
7870        unsafe fn encode(
7871            self,
7872            encoder: &mut fidl::encoding::Encoder<
7873                '_,
7874                fidl::encoding::DefaultFuchsiaResourceDialect,
7875            >,
7876            offset: usize,
7877            _depth: fidl::encoding::Depth,
7878        ) -> fidl::Result<()> {
7879            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7880            // Delegate to tuple encoding.
7881            fidl::encoding::Encode::<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7882                (
7883                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.client_end),
7884                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_client_end),
7885                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
7886                    <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_server_end),
7887                ),
7888                encoder, offset, _depth
7889            )
7890        }
7891    }
7892    unsafe impl<
7893        T0: fidl::encoding::Encode<
7894                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7895                fidl::encoding::DefaultFuchsiaResourceDialect,
7896            >,
7897        T1: fidl::encoding::Encode<
7898                fidl::encoding::Optional<
7899                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7900                >,
7901                fidl::encoding::DefaultFuchsiaResourceDialect,
7902            >,
7903        T2: fidl::encoding::Encode<
7904                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7905                fidl::encoding::DefaultFuchsiaResourceDialect,
7906            >,
7907        T3: fidl::encoding::Encode<
7908                fidl::encoding::Optional<
7909                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7910                >,
7911                fidl::encoding::DefaultFuchsiaResourceDialect,
7912            >,
7913    > fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7914        for (T0, T1, T2, T3)
7915    {
7916        #[inline]
7917        unsafe fn encode(
7918            self,
7919            encoder: &mut fidl::encoding::Encoder<
7920                '_,
7921                fidl::encoding::DefaultFuchsiaResourceDialect,
7922            >,
7923            offset: usize,
7924            depth: fidl::encoding::Depth,
7925        ) -> fidl::Result<()> {
7926            encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7927            // Zero out padding regions. There's no need to apply masks
7928            // because the unmasked parts will be overwritten by fields.
7929            // Write the fields.
7930            self.0.encode(encoder, offset + 0, depth)?;
7931            self.1.encode(encoder, offset + 4, depth)?;
7932            self.2.encode(encoder, offset + 8, depth)?;
7933            self.3.encode(encoder, offset + 12, depth)?;
7934            Ok(())
7935        }
7936    }
7937
7938    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7939        for StructOfEndpoints
7940    {
7941        #[inline(always)]
7942        fn new_empty() -> Self {
7943            Self {
7944                client_end: fidl::new_empty!(
7945                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7946                    fidl::encoding::DefaultFuchsiaResourceDialect
7947                ),
7948                optional_client_end: fidl::new_empty!(
7949                    fidl::encoding::Optional<
7950                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7951                    >,
7952                    fidl::encoding::DefaultFuchsiaResourceDialect
7953                ),
7954                server_end: fidl::new_empty!(
7955                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7956                    fidl::encoding::DefaultFuchsiaResourceDialect
7957                ),
7958                optional_server_end: fidl::new_empty!(
7959                    fidl::encoding::Optional<
7960                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7961                    >,
7962                    fidl::encoding::DefaultFuchsiaResourceDialect
7963                ),
7964            }
7965        }
7966
7967        #[inline]
7968        unsafe fn decode(
7969            &mut self,
7970            decoder: &mut fidl::encoding::Decoder<
7971                '_,
7972                fidl::encoding::DefaultFuchsiaResourceDialect,
7973            >,
7974            offset: usize,
7975            _depth: fidl::encoding::Depth,
7976        ) -> fidl::Result<()> {
7977            decoder.debug_check_bounds::<Self>(offset);
7978            // Verify that padding bytes are zero.
7979            fidl::decode!(
7980                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7981                fidl::encoding::DefaultFuchsiaResourceDialect,
7982                &mut self.client_end,
7983                decoder,
7984                offset + 0,
7985                _depth
7986            )?;
7987            fidl::decode!(
7988                fidl::encoding::Optional<
7989                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7990                >,
7991                fidl::encoding::DefaultFuchsiaResourceDialect,
7992                &mut self.optional_client_end,
7993                decoder,
7994                offset + 4,
7995                _depth
7996            )?;
7997            fidl::decode!(
7998                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7999                fidl::encoding::DefaultFuchsiaResourceDialect,
8000                &mut self.server_end,
8001                decoder,
8002                offset + 8,
8003                _depth
8004            )?;
8005            fidl::decode!(
8006                fidl::encoding::Optional<
8007                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
8008                >,
8009                fidl::encoding::DefaultFuchsiaResourceDialect,
8010                &mut self.optional_server_end,
8011                decoder,
8012                offset + 12,
8013                _depth
8014            )?;
8015            Ok(())
8016        }
8017    }
8018
8019    impl fidl::encoding::ResourceTypeMarker for StructOfOptionalUnionOfHandle {
8020        type Borrowed<'a> = &'a mut Self;
8021        fn take_or_borrow<'a>(
8022            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8023        ) -> Self::Borrowed<'a> {
8024            value
8025        }
8026    }
8027
8028    unsafe impl fidl::encoding::TypeMarker for StructOfOptionalUnionOfHandle {
8029        type Owned = Self;
8030
8031        #[inline(always)]
8032        fn inline_align(_context: fidl::encoding::Context) -> usize {
8033            8
8034        }
8035
8036        #[inline(always)]
8037        fn inline_size(_context: fidl::encoding::Context) -> usize {
8038            16
8039        }
8040    }
8041
8042    unsafe impl
8043        fidl::encoding::Encode<
8044            StructOfOptionalUnionOfHandle,
8045            fidl::encoding::DefaultFuchsiaResourceDialect,
8046        > for &mut StructOfOptionalUnionOfHandle
8047    {
8048        #[inline]
8049        unsafe fn encode(
8050            self,
8051            encoder: &mut fidl::encoding::Encoder<
8052                '_,
8053                fidl::encoding::DefaultFuchsiaResourceDialect,
8054            >,
8055            offset: usize,
8056            _depth: fidl::encoding::Depth,
8057        ) -> fidl::Result<()> {
8058            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8059            // Delegate to tuple encoding.
8060            fidl::encoding::Encode::<StructOfOptionalUnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8061                (
8062                    <fidl::encoding::OptionalUnion<UnionOfHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
8063                ),
8064                encoder, offset, _depth
8065            )
8066        }
8067    }
8068    unsafe impl<
8069        T0: fidl::encoding::Encode<
8070                fidl::encoding::OptionalUnion<UnionOfHandle>,
8071                fidl::encoding::DefaultFuchsiaResourceDialect,
8072            >,
8073    >
8074        fidl::encoding::Encode<
8075            StructOfOptionalUnionOfHandle,
8076            fidl::encoding::DefaultFuchsiaResourceDialect,
8077        > for (T0,)
8078    {
8079        #[inline]
8080        unsafe fn encode(
8081            self,
8082            encoder: &mut fidl::encoding::Encoder<
8083                '_,
8084                fidl::encoding::DefaultFuchsiaResourceDialect,
8085            >,
8086            offset: usize,
8087            depth: fidl::encoding::Depth,
8088        ) -> fidl::Result<()> {
8089            encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8090            // Zero out padding regions. There's no need to apply masks
8091            // because the unmasked parts will be overwritten by fields.
8092            // Write the fields.
8093            self.0.encode(encoder, offset + 0, depth)?;
8094            Ok(())
8095        }
8096    }
8097
8098    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8099        for StructOfOptionalUnionOfHandle
8100    {
8101        #[inline(always)]
8102        fn new_empty() -> Self {
8103            Self {
8104                u: fidl::new_empty!(
8105                    fidl::encoding::OptionalUnion<UnionOfHandle>,
8106                    fidl::encoding::DefaultFuchsiaResourceDialect
8107                ),
8108            }
8109        }
8110
8111        #[inline]
8112        unsafe fn decode(
8113            &mut self,
8114            decoder: &mut fidl::encoding::Decoder<
8115                '_,
8116                fidl::encoding::DefaultFuchsiaResourceDialect,
8117            >,
8118            offset: usize,
8119            _depth: fidl::encoding::Depth,
8120        ) -> fidl::Result<()> {
8121            decoder.debug_check_bounds::<Self>(offset);
8122            // Verify that padding bytes are zero.
8123            fidl::decode!(
8124                fidl::encoding::OptionalUnion<UnionOfHandle>,
8125                fidl::encoding::DefaultFuchsiaResourceDialect,
8126                &mut self.u,
8127                decoder,
8128                offset + 0,
8129                _depth
8130            )?;
8131            Ok(())
8132        }
8133    }
8134
8135    impl fidl::encoding::ResourceTypeMarker for StructOfSimpleResourceTable {
8136        type Borrowed<'a> = &'a mut Self;
8137        fn take_or_borrow<'a>(
8138            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8139        ) -> Self::Borrowed<'a> {
8140            value
8141        }
8142    }
8143
8144    unsafe impl fidl::encoding::TypeMarker for StructOfSimpleResourceTable {
8145        type Owned = Self;
8146
8147        #[inline(always)]
8148        fn inline_align(_context: fidl::encoding::Context) -> usize {
8149            8
8150        }
8151
8152        #[inline(always)]
8153        fn inline_size(_context: fidl::encoding::Context) -> usize {
8154            16
8155        }
8156    }
8157
8158    unsafe impl
8159        fidl::encoding::Encode<
8160            StructOfSimpleResourceTable,
8161            fidl::encoding::DefaultFuchsiaResourceDialect,
8162        > for &mut StructOfSimpleResourceTable
8163    {
8164        #[inline]
8165        unsafe fn encode(
8166            self,
8167            encoder: &mut fidl::encoding::Encoder<
8168                '_,
8169                fidl::encoding::DefaultFuchsiaResourceDialect,
8170            >,
8171            offset: usize,
8172            _depth: fidl::encoding::Depth,
8173        ) -> fidl::Result<()> {
8174            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8175            // Delegate to tuple encoding.
8176            fidl::encoding::Encode::<
8177                StructOfSimpleResourceTable,
8178                fidl::encoding::DefaultFuchsiaResourceDialect,
8179            >::encode(
8180                (<SimpleResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8181                    &mut self.table,
8182                ),),
8183                encoder,
8184                offset,
8185                _depth,
8186            )
8187        }
8188    }
8189    unsafe impl<
8190        T0: fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
8191    >
8192        fidl::encoding::Encode<
8193            StructOfSimpleResourceTable,
8194            fidl::encoding::DefaultFuchsiaResourceDialect,
8195        > for (T0,)
8196    {
8197        #[inline]
8198        unsafe fn encode(
8199            self,
8200            encoder: &mut fidl::encoding::Encoder<
8201                '_,
8202                fidl::encoding::DefaultFuchsiaResourceDialect,
8203            >,
8204            offset: usize,
8205            depth: fidl::encoding::Depth,
8206        ) -> fidl::Result<()> {
8207            encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8208            // Zero out padding regions. There's no need to apply masks
8209            // because the unmasked parts will be overwritten by fields.
8210            // Write the fields.
8211            self.0.encode(encoder, offset + 0, depth)?;
8212            Ok(())
8213        }
8214    }
8215
8216    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8217        for StructOfSimpleResourceTable
8218    {
8219        #[inline(always)]
8220        fn new_empty() -> Self {
8221            Self {
8222                table: fidl::new_empty!(
8223                    SimpleResourceTable,
8224                    fidl::encoding::DefaultFuchsiaResourceDialect
8225                ),
8226            }
8227        }
8228
8229        #[inline]
8230        unsafe fn decode(
8231            &mut self,
8232            decoder: &mut fidl::encoding::Decoder<
8233                '_,
8234                fidl::encoding::DefaultFuchsiaResourceDialect,
8235            >,
8236            offset: usize,
8237            _depth: fidl::encoding::Depth,
8238        ) -> fidl::Result<()> {
8239            decoder.debug_check_bounds::<Self>(offset);
8240            // Verify that padding bytes are zero.
8241            fidl::decode!(
8242                SimpleResourceTable,
8243                fidl::encoding::DefaultFuchsiaResourceDialect,
8244                &mut self.table,
8245                decoder,
8246                offset + 0,
8247                _depth
8248            )?;
8249            Ok(())
8250        }
8251    }
8252
8253    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandleStruct {
8254        type Borrowed<'a> = &'a mut Self;
8255        fn take_or_borrow<'a>(
8256            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8257        ) -> Self::Borrowed<'a> {
8258            value
8259        }
8260    }
8261
8262    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandleStruct {
8263        type Owned = Self;
8264
8265        #[inline(always)]
8266        fn inline_align(_context: fidl::encoding::Context) -> usize {
8267            8
8268        }
8269
8270        #[inline(always)]
8271        fn inline_size(_context: fidl::encoding::Context) -> usize {
8272            16
8273        }
8274    }
8275
8276    unsafe impl
8277        fidl::encoding::Encode<
8278            TableFieldInlinedHandleStruct,
8279            fidl::encoding::DefaultFuchsiaResourceDialect,
8280        > for &mut TableFieldInlinedHandleStruct
8281    {
8282        #[inline]
8283        unsafe fn encode(
8284            self,
8285            encoder: &mut fidl::encoding::Encoder<
8286                '_,
8287                fidl::encoding::DefaultFuchsiaResourceDialect,
8288            >,
8289            offset: usize,
8290            _depth: fidl::encoding::Depth,
8291        ) -> fidl::Result<()> {
8292            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8293            // Delegate to tuple encoding.
8294            fidl::encoding::Encode::<
8295                TableFieldInlinedHandleStruct,
8296                fidl::encoding::DefaultFuchsiaResourceDialect,
8297            >::encode(
8298                (<TableFieldInlinedHandle as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8299                    &mut self.t,
8300                ),),
8301                encoder,
8302                offset,
8303                _depth,
8304            )
8305        }
8306    }
8307    unsafe impl<
8308        T0: fidl::encoding::Encode<
8309                TableFieldInlinedHandle,
8310                fidl::encoding::DefaultFuchsiaResourceDialect,
8311            >,
8312    >
8313        fidl::encoding::Encode<
8314            TableFieldInlinedHandleStruct,
8315            fidl::encoding::DefaultFuchsiaResourceDialect,
8316        > for (T0,)
8317    {
8318        #[inline]
8319        unsafe fn encode(
8320            self,
8321            encoder: &mut fidl::encoding::Encoder<
8322                '_,
8323                fidl::encoding::DefaultFuchsiaResourceDialect,
8324            >,
8325            offset: usize,
8326            depth: fidl::encoding::Depth,
8327        ) -> fidl::Result<()> {
8328            encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8329            // Zero out padding regions. There's no need to apply masks
8330            // because the unmasked parts will be overwritten by fields.
8331            // Write the fields.
8332            self.0.encode(encoder, offset + 0, depth)?;
8333            Ok(())
8334        }
8335    }
8336
8337    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8338        for TableFieldInlinedHandleStruct
8339    {
8340        #[inline(always)]
8341        fn new_empty() -> Self {
8342            Self {
8343                t: fidl::new_empty!(
8344                    TableFieldInlinedHandle,
8345                    fidl::encoding::DefaultFuchsiaResourceDialect
8346                ),
8347            }
8348        }
8349
8350        #[inline]
8351        unsafe fn decode(
8352            &mut self,
8353            decoder: &mut fidl::encoding::Decoder<
8354                '_,
8355                fidl::encoding::DefaultFuchsiaResourceDialect,
8356            >,
8357            offset: usize,
8358            _depth: fidl::encoding::Depth,
8359        ) -> fidl::Result<()> {
8360            decoder.debug_check_bounds::<Self>(offset);
8361            // Verify that padding bytes are zero.
8362            fidl::decode!(
8363                TableFieldInlinedHandle,
8364                fidl::encoding::DefaultFuchsiaResourceDialect,
8365                &mut self.t,
8366                decoder,
8367                offset + 0,
8368                _depth
8369            )?;
8370            Ok(())
8371        }
8372    }
8373
8374    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResourceStruct {
8375        type Borrowed<'a> = &'a mut Self;
8376        fn take_or_borrow<'a>(
8377            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8378        ) -> Self::Borrowed<'a> {
8379            value
8380        }
8381    }
8382
8383    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResourceStruct {
8384        type Owned = Self;
8385
8386        #[inline(always)]
8387        fn inline_align(_context: fidl::encoding::Context) -> usize {
8388            8
8389        }
8390
8391        #[inline(always)]
8392        fn inline_size(_context: fidl::encoding::Context) -> usize {
8393            16
8394        }
8395    }
8396
8397    unsafe impl
8398        fidl::encoding::Encode<
8399            TableFieldUnknownResourceStruct,
8400            fidl::encoding::DefaultFuchsiaResourceDialect,
8401        > for &mut TableFieldUnknownResourceStruct
8402    {
8403        #[inline]
8404        unsafe fn encode(
8405            self,
8406            encoder: &mut fidl::encoding::Encoder<
8407                '_,
8408                fidl::encoding::DefaultFuchsiaResourceDialect,
8409            >,
8410            offset: usize,
8411            _depth: fidl::encoding::Depth,
8412        ) -> fidl::Result<()> {
8413            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8414            // Delegate to tuple encoding.
8415            fidl::encoding::Encode::<TableFieldUnknownResourceStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8416                (
8417                    <TableFieldUnknownResource as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8418                ),
8419                encoder, offset, _depth
8420            )
8421        }
8422    }
8423    unsafe impl<
8424        T0: fidl::encoding::Encode<
8425                TableFieldUnknownResource,
8426                fidl::encoding::DefaultFuchsiaResourceDialect,
8427            >,
8428    >
8429        fidl::encoding::Encode<
8430            TableFieldUnknownResourceStruct,
8431            fidl::encoding::DefaultFuchsiaResourceDialect,
8432        > for (T0,)
8433    {
8434        #[inline]
8435        unsafe fn encode(
8436            self,
8437            encoder: &mut fidl::encoding::Encoder<
8438                '_,
8439                fidl::encoding::DefaultFuchsiaResourceDialect,
8440            >,
8441            offset: usize,
8442            depth: fidl::encoding::Depth,
8443        ) -> fidl::Result<()> {
8444            encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8445            // Zero out padding regions. There's no need to apply masks
8446            // because the unmasked parts will be overwritten by fields.
8447            // Write the fields.
8448            self.0.encode(encoder, offset + 0, depth)?;
8449            Ok(())
8450        }
8451    }
8452
8453    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8454        for TableFieldUnknownResourceStruct
8455    {
8456        #[inline(always)]
8457        fn new_empty() -> Self {
8458            Self {
8459                t: fidl::new_empty!(
8460                    TableFieldUnknownResource,
8461                    fidl::encoding::DefaultFuchsiaResourceDialect
8462                ),
8463            }
8464        }
8465
8466        #[inline]
8467        unsafe fn decode(
8468            &mut self,
8469            decoder: &mut fidl::encoding::Decoder<
8470                '_,
8471                fidl::encoding::DefaultFuchsiaResourceDialect,
8472            >,
8473            offset: usize,
8474            _depth: fidl::encoding::Depth,
8475        ) -> fidl::Result<()> {
8476            decoder.debug_check_bounds::<Self>(offset);
8477            // Verify that padding bytes are zero.
8478            fidl::decode!(
8479                TableFieldUnknownResource,
8480                fidl::encoding::DefaultFuchsiaResourceDialect,
8481                &mut self.t,
8482                decoder,
8483                offset + 0,
8484                _depth
8485            )?;
8486            Ok(())
8487        }
8488    }
8489
8490    impl fidl::encoding::ResourceTypeMarker for TableOfEndpoints {
8491        type Borrowed<'a> = &'a mut Self;
8492        fn take_or_borrow<'a>(
8493            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8494        ) -> Self::Borrowed<'a> {
8495            value
8496        }
8497    }
8498
8499    unsafe impl fidl::encoding::TypeMarker for TableOfEndpoints {
8500        type Owned = Self;
8501
8502        #[inline(always)]
8503        fn inline_align(_context: fidl::encoding::Context) -> usize {
8504            8
8505        }
8506
8507        #[inline(always)]
8508        fn inline_size(_context: fidl::encoding::Context) -> usize {
8509            16
8510        }
8511    }
8512
8513    unsafe impl
8514        fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8515        for &mut TableOfEndpoints
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            // Delegate to tuple encoding.
8529            fidl::encoding::Encode::<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8530                (
8531                    <TableOfEndpointsTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8532                ),
8533                encoder, offset, _depth
8534            )
8535        }
8536    }
8537    unsafe impl<
8538        T0: fidl::encoding::Encode<
8539                TableOfEndpointsTable,
8540                fidl::encoding::DefaultFuchsiaResourceDialect,
8541            >,
8542    > fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8543        for (T0,)
8544    {
8545        #[inline]
8546        unsafe fn encode(
8547            self,
8548            encoder: &mut fidl::encoding::Encoder<
8549                '_,
8550                fidl::encoding::DefaultFuchsiaResourceDialect,
8551            >,
8552            offset: usize,
8553            depth: fidl::encoding::Depth,
8554        ) -> fidl::Result<()> {
8555            encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8556            // Zero out padding regions. There's no need to apply masks
8557            // because the unmasked parts will be overwritten by fields.
8558            // Write the fields.
8559            self.0.encode(encoder, offset + 0, depth)?;
8560            Ok(())
8561        }
8562    }
8563
8564    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8565        for TableOfEndpoints
8566    {
8567        #[inline(always)]
8568        fn new_empty() -> Self {
8569            Self {
8570                t: fidl::new_empty!(
8571                    TableOfEndpointsTable,
8572                    fidl::encoding::DefaultFuchsiaResourceDialect
8573                ),
8574            }
8575        }
8576
8577        #[inline]
8578        unsafe fn decode(
8579            &mut self,
8580            decoder: &mut fidl::encoding::Decoder<
8581                '_,
8582                fidl::encoding::DefaultFuchsiaResourceDialect,
8583            >,
8584            offset: usize,
8585            _depth: fidl::encoding::Depth,
8586        ) -> fidl::Result<()> {
8587            decoder.debug_check_bounds::<Self>(offset);
8588            // Verify that padding bytes are zero.
8589            fidl::decode!(
8590                TableOfEndpointsTable,
8591                fidl::encoding::DefaultFuchsiaResourceDialect,
8592                &mut self.t,
8593                decoder,
8594                offset + 0,
8595                _depth
8596            )?;
8597            Ok(())
8598        }
8599    }
8600
8601    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwichStruct {
8602        type Borrowed<'a> = &'a mut Self;
8603        fn take_or_borrow<'a>(
8604            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8605        ) -> Self::Borrowed<'a> {
8606            value
8607        }
8608    }
8609
8610    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwichStruct {
8611        type Owned = Self;
8612
8613        #[inline(always)]
8614        fn inline_align(_context: fidl::encoding::Context) -> usize {
8615            8
8616        }
8617
8618        #[inline(always)]
8619        fn inline_size(_context: fidl::encoding::Context) -> usize {
8620            16
8621        }
8622    }
8623
8624    unsafe impl
8625        fidl::encoding::Encode<
8626            TableUnionWithVectorReservedSandwichStruct,
8627            fidl::encoding::DefaultFuchsiaResourceDialect,
8628        > for &mut TableUnionWithVectorReservedSandwichStruct
8629    {
8630        #[inline]
8631        unsafe fn encode(
8632            self,
8633            encoder: &mut fidl::encoding::Encoder<
8634                '_,
8635                fidl::encoding::DefaultFuchsiaResourceDialect,
8636            >,
8637            offset: usize,
8638            _depth: fidl::encoding::Depth,
8639        ) -> fidl::Result<()> {
8640            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8641            // Delegate to tuple encoding.
8642            fidl::encoding::Encode::<TableUnionWithVectorReservedSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8643                (
8644                    <TableUnionWithVectorReservedSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8645                ),
8646                encoder, offset, _depth
8647            )
8648        }
8649    }
8650    unsafe impl<
8651        T0: fidl::encoding::Encode<
8652                TableUnionWithVectorReservedSandwich,
8653                fidl::encoding::DefaultFuchsiaResourceDialect,
8654            >,
8655    >
8656        fidl::encoding::Encode<
8657            TableUnionWithVectorReservedSandwichStruct,
8658            fidl::encoding::DefaultFuchsiaResourceDialect,
8659        > for (T0,)
8660    {
8661        #[inline]
8662        unsafe fn encode(
8663            self,
8664            encoder: &mut fidl::encoding::Encoder<
8665                '_,
8666                fidl::encoding::DefaultFuchsiaResourceDialect,
8667            >,
8668            offset: usize,
8669            depth: fidl::encoding::Depth,
8670        ) -> fidl::Result<()> {
8671            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8672            // Zero out padding regions. There's no need to apply masks
8673            // because the unmasked parts will be overwritten by fields.
8674            // Write the fields.
8675            self.0.encode(encoder, offset + 0, depth)?;
8676            Ok(())
8677        }
8678    }
8679
8680    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8681        for TableUnionWithVectorReservedSandwichStruct
8682    {
8683        #[inline(always)]
8684        fn new_empty() -> Self {
8685            Self {
8686                table: fidl::new_empty!(
8687                    TableUnionWithVectorReservedSandwich,
8688                    fidl::encoding::DefaultFuchsiaResourceDialect
8689                ),
8690            }
8691        }
8692
8693        #[inline]
8694        unsafe fn decode(
8695            &mut self,
8696            decoder: &mut fidl::encoding::Decoder<
8697                '_,
8698                fidl::encoding::DefaultFuchsiaResourceDialect,
8699            >,
8700            offset: usize,
8701            _depth: fidl::encoding::Depth,
8702        ) -> fidl::Result<()> {
8703            decoder.debug_check_bounds::<Self>(offset);
8704            // Verify that padding bytes are zero.
8705            fidl::decode!(
8706                TableUnionWithVectorReservedSandwich,
8707                fidl::encoding::DefaultFuchsiaResourceDialect,
8708                &mut self.table,
8709                decoder,
8710                offset + 0,
8711                _depth
8712            )?;
8713            Ok(())
8714        }
8715    }
8716
8717    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwichStruct {
8718        type Borrowed<'a> = &'a mut Self;
8719        fn take_or_borrow<'a>(
8720            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8721        ) -> Self::Borrowed<'a> {
8722            value
8723        }
8724    }
8725
8726    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwichStruct {
8727        type Owned = Self;
8728
8729        #[inline(always)]
8730        fn inline_align(_context: fidl::encoding::Context) -> usize {
8731            8
8732        }
8733
8734        #[inline(always)]
8735        fn inline_size(_context: fidl::encoding::Context) -> usize {
8736            16
8737        }
8738    }
8739
8740    unsafe impl
8741        fidl::encoding::Encode<
8742            TableUnionWithVectorStructSandwichStruct,
8743            fidl::encoding::DefaultFuchsiaResourceDialect,
8744        > for &mut TableUnionWithVectorStructSandwichStruct
8745    {
8746        #[inline]
8747        unsafe fn encode(
8748            self,
8749            encoder: &mut fidl::encoding::Encoder<
8750                '_,
8751                fidl::encoding::DefaultFuchsiaResourceDialect,
8752            >,
8753            offset: usize,
8754            _depth: fidl::encoding::Depth,
8755        ) -> fidl::Result<()> {
8756            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8757            // Delegate to tuple encoding.
8758            fidl::encoding::Encode::<TableUnionWithVectorStructSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8759                (
8760                    <TableUnionWithVectorStructSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8761                ),
8762                encoder, offset, _depth
8763            )
8764        }
8765    }
8766    unsafe impl<
8767        T0: fidl::encoding::Encode<
8768                TableUnionWithVectorStructSandwich,
8769                fidl::encoding::DefaultFuchsiaResourceDialect,
8770            >,
8771    >
8772        fidl::encoding::Encode<
8773            TableUnionWithVectorStructSandwichStruct,
8774            fidl::encoding::DefaultFuchsiaResourceDialect,
8775        > for (T0,)
8776    {
8777        #[inline]
8778        unsafe fn encode(
8779            self,
8780            encoder: &mut fidl::encoding::Encoder<
8781                '_,
8782                fidl::encoding::DefaultFuchsiaResourceDialect,
8783            >,
8784            offset: usize,
8785            depth: fidl::encoding::Depth,
8786        ) -> fidl::Result<()> {
8787            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8788            // Zero out padding regions. There's no need to apply masks
8789            // because the unmasked parts will be overwritten by fields.
8790            // Write the fields.
8791            self.0.encode(encoder, offset + 0, depth)?;
8792            Ok(())
8793        }
8794    }
8795
8796    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8797        for TableUnionWithVectorStructSandwichStruct
8798    {
8799        #[inline(always)]
8800        fn new_empty() -> Self {
8801            Self {
8802                table: fidl::new_empty!(
8803                    TableUnionWithVectorStructSandwich,
8804                    fidl::encoding::DefaultFuchsiaResourceDialect
8805                ),
8806            }
8807        }
8808
8809        #[inline]
8810        unsafe fn decode(
8811            &mut self,
8812            decoder: &mut fidl::encoding::Decoder<
8813                '_,
8814                fidl::encoding::DefaultFuchsiaResourceDialect,
8815            >,
8816            offset: usize,
8817            _depth: fidl::encoding::Depth,
8818        ) -> fidl::Result<()> {
8819            decoder.debug_check_bounds::<Self>(offset);
8820            // Verify that padding bytes are zero.
8821            fidl::decode!(
8822                TableUnionWithVectorStructSandwich,
8823                fidl::encoding::DefaultFuchsiaResourceDialect,
8824                &mut self.table,
8825                decoder,
8826                offset + 0,
8827                _depth
8828            )?;
8829            Ok(())
8830        }
8831    }
8832
8833    impl fidl::encoding::ResourceTypeMarker for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
8834        type Borrowed<'a> = &'a mut Self;
8835        fn take_or_borrow<'a>(
8836            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8837        ) -> Self::Borrowed<'a> {
8838            value
8839        }
8840    }
8841
8842    unsafe impl fidl::encoding::TypeMarker for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
8843        type Owned = Self;
8844
8845        #[inline(always)]
8846        fn inline_align(_context: fidl::encoding::Context) -> usize {
8847            8
8848        }
8849
8850        #[inline(always)]
8851        fn inline_size(_context: fidl::encoding::Context) -> usize {
8852            16
8853        }
8854    }
8855
8856    unsafe impl
8857        fidl::encoding::Encode<
8858            TableWithUnknownEnveloepsAfterKnownEnvelopesStruct,
8859            fidl::encoding::DefaultFuchsiaResourceDialect,
8860        > for &mut TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
8861    {
8862        #[inline]
8863        unsafe fn encode(
8864            self,
8865            encoder: &mut fidl::encoding::Encoder<
8866                '_,
8867                fidl::encoding::DefaultFuchsiaResourceDialect,
8868            >,
8869            offset: usize,
8870            _depth: fidl::encoding::Depth,
8871        ) -> fidl::Result<()> {
8872            encoder
8873                .debug_check_bounds::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct>(offset);
8874            // Delegate to tuple encoding.
8875            fidl::encoding::Encode::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8876                (
8877                    <TableWithUnknownEnvelopesAfterKnownEnvelopes as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8878                ),
8879                encoder, offset, _depth
8880            )
8881        }
8882    }
8883    unsafe impl<
8884        T0: fidl::encoding::Encode<
8885                TableWithUnknownEnvelopesAfterKnownEnvelopes,
8886                fidl::encoding::DefaultFuchsiaResourceDialect,
8887            >,
8888    >
8889        fidl::encoding::Encode<
8890            TableWithUnknownEnveloepsAfterKnownEnvelopesStruct,
8891            fidl::encoding::DefaultFuchsiaResourceDialect,
8892        > for (T0,)
8893    {
8894        #[inline]
8895        unsafe fn encode(
8896            self,
8897            encoder: &mut fidl::encoding::Encoder<
8898                '_,
8899                fidl::encoding::DefaultFuchsiaResourceDialect,
8900            >,
8901            offset: usize,
8902            depth: fidl::encoding::Depth,
8903        ) -> fidl::Result<()> {
8904            encoder
8905                .debug_check_bounds::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct>(offset);
8906            // Zero out padding regions. There's no need to apply masks
8907            // because the unmasked parts will be overwritten by fields.
8908            // Write the fields.
8909            self.0.encode(encoder, offset + 0, depth)?;
8910            Ok(())
8911        }
8912    }
8913
8914    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8915        for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
8916    {
8917        #[inline(always)]
8918        fn new_empty() -> Self {
8919            Self {
8920                t: fidl::new_empty!(
8921                    TableWithUnknownEnvelopesAfterKnownEnvelopes,
8922                    fidl::encoding::DefaultFuchsiaResourceDialect
8923                ),
8924            }
8925        }
8926
8927        #[inline]
8928        unsafe fn decode(
8929            &mut self,
8930            decoder: &mut fidl::encoding::Decoder<
8931                '_,
8932                fidl::encoding::DefaultFuchsiaResourceDialect,
8933            >,
8934            offset: usize,
8935            _depth: fidl::encoding::Depth,
8936        ) -> fidl::Result<()> {
8937            decoder.debug_check_bounds::<Self>(offset);
8938            // Verify that padding bytes are zero.
8939            fidl::decode!(
8940                TableWithUnknownEnvelopesAfterKnownEnvelopes,
8941                fidl::encoding::DefaultFuchsiaResourceDialect,
8942                &mut self.t,
8943                decoder,
8944                offset + 0,
8945                _depth
8946            )?;
8947            Ok(())
8948        }
8949    }
8950
8951    impl fidl::encoding::ResourceTypeMarker for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
8952        type Borrowed<'a> = &'a mut Self;
8953        fn take_or_borrow<'a>(
8954            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8955        ) -> Self::Borrowed<'a> {
8956            value
8957        }
8958    }
8959
8960    unsafe impl fidl::encoding::TypeMarker for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
8961        type Owned = Self;
8962
8963        #[inline(always)]
8964        fn inline_align(_context: fidl::encoding::Context) -> usize {
8965            8
8966        }
8967
8968        #[inline(always)]
8969        fn inline_size(_context: fidl::encoding::Context) -> usize {
8970            16
8971        }
8972    }
8973
8974    unsafe impl
8975        fidl::encoding::Encode<
8976            TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct,
8977            fidl::encoding::DefaultFuchsiaResourceDialect,
8978        > for &mut TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
8979    {
8980        #[inline]
8981        unsafe fn encode(
8982            self,
8983            encoder: &mut fidl::encoding::Encoder<
8984                '_,
8985                fidl::encoding::DefaultFuchsiaResourceDialect,
8986            >,
8987            offset: usize,
8988            _depth: fidl::encoding::Depth,
8989        ) -> fidl::Result<()> {
8990            encoder
8991                .debug_check_bounds::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct>(offset);
8992            // Delegate to tuple encoding.
8993            fidl::encoding::Encode::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8994                (
8995                    <TableWithUnknownEnvelopesBeforeKnownEnvelopes as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8996                ),
8997                encoder, offset, _depth
8998            )
8999        }
9000    }
9001    unsafe impl<
9002        T0: fidl::encoding::Encode<
9003                TableWithUnknownEnvelopesBeforeKnownEnvelopes,
9004                fidl::encoding::DefaultFuchsiaResourceDialect,
9005            >,
9006    >
9007        fidl::encoding::Encode<
9008            TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct,
9009            fidl::encoding::DefaultFuchsiaResourceDialect,
9010        > for (T0,)
9011    {
9012        #[inline]
9013        unsafe fn encode(
9014            self,
9015            encoder: &mut fidl::encoding::Encoder<
9016                '_,
9017                fidl::encoding::DefaultFuchsiaResourceDialect,
9018            >,
9019            offset: usize,
9020            depth: fidl::encoding::Depth,
9021        ) -> fidl::Result<()> {
9022            encoder
9023                .debug_check_bounds::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct>(offset);
9024            // Zero out padding regions. There's no need to apply masks
9025            // because the unmasked parts will be overwritten by fields.
9026            // Write the fields.
9027            self.0.encode(encoder, offset + 0, depth)?;
9028            Ok(())
9029        }
9030    }
9031
9032    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9033        for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
9034    {
9035        #[inline(always)]
9036        fn new_empty() -> Self {
9037            Self {
9038                t: fidl::new_empty!(
9039                    TableWithUnknownEnvelopesBeforeKnownEnvelopes,
9040                    fidl::encoding::DefaultFuchsiaResourceDialect
9041                ),
9042            }
9043        }
9044
9045        #[inline]
9046        unsafe fn decode(
9047            &mut self,
9048            decoder: &mut fidl::encoding::Decoder<
9049                '_,
9050                fidl::encoding::DefaultFuchsiaResourceDialect,
9051            >,
9052            offset: usize,
9053            _depth: fidl::encoding::Depth,
9054        ) -> fidl::Result<()> {
9055            decoder.debug_check_bounds::<Self>(offset);
9056            // Verify that padding bytes are zero.
9057            fidl::decode!(
9058                TableWithUnknownEnvelopesBeforeKnownEnvelopes,
9059                fidl::encoding::DefaultFuchsiaResourceDialect,
9060                &mut self.t,
9061                decoder,
9062                offset + 0,
9063                _depth
9064            )?;
9065            Ok(())
9066        }
9067    }
9068
9069    impl fidl::encoding::ResourceTypeMarker for TestFlexibleResourceXUnionInStruct {
9070        type Borrowed<'a> = &'a mut Self;
9071        fn take_or_borrow<'a>(
9072            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9073        ) -> Self::Borrowed<'a> {
9074            value
9075        }
9076    }
9077
9078    unsafe impl fidl::encoding::TypeMarker for TestFlexibleResourceXUnionInStruct {
9079        type Owned = Self;
9080
9081        #[inline(always)]
9082        fn inline_align(_context: fidl::encoding::Context) -> usize {
9083            8
9084        }
9085
9086        #[inline(always)]
9087        fn inline_size(_context: fidl::encoding::Context) -> usize {
9088            16
9089        }
9090    }
9091
9092    unsafe impl
9093        fidl::encoding::Encode<
9094            TestFlexibleResourceXUnionInStruct,
9095            fidl::encoding::DefaultFuchsiaResourceDialect,
9096        > for &mut TestFlexibleResourceXUnionInStruct
9097    {
9098        #[inline]
9099        unsafe fn encode(
9100            self,
9101            encoder: &mut fidl::encoding::Encoder<
9102                '_,
9103                fidl::encoding::DefaultFuchsiaResourceDialect,
9104            >,
9105            offset: usize,
9106            _depth: fidl::encoding::Depth,
9107        ) -> fidl::Result<()> {
9108            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
9109            // Delegate to tuple encoding.
9110            fidl::encoding::Encode::<
9111                TestFlexibleResourceXUnionInStruct,
9112                fidl::encoding::DefaultFuchsiaResourceDialect,
9113            >::encode(
9114                (<SampleResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9115                    &mut self.xu,
9116                ),),
9117                encoder,
9118                offset,
9119                _depth,
9120            )
9121        }
9122    }
9123    unsafe impl<
9124        T0: fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
9125    >
9126        fidl::encoding::Encode<
9127            TestFlexibleResourceXUnionInStruct,
9128            fidl::encoding::DefaultFuchsiaResourceDialect,
9129        > for (T0,)
9130    {
9131        #[inline]
9132        unsafe fn encode(
9133            self,
9134            encoder: &mut fidl::encoding::Encoder<
9135                '_,
9136                fidl::encoding::DefaultFuchsiaResourceDialect,
9137            >,
9138            offset: usize,
9139            depth: fidl::encoding::Depth,
9140        ) -> fidl::Result<()> {
9141            encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
9142            // Zero out padding regions. There's no need to apply masks
9143            // because the unmasked parts will be overwritten by fields.
9144            // Write the fields.
9145            self.0.encode(encoder, offset + 0, depth)?;
9146            Ok(())
9147        }
9148    }
9149
9150    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9151        for TestFlexibleResourceXUnionInStruct
9152    {
9153        #[inline(always)]
9154        fn new_empty() -> Self {
9155            Self {
9156                xu: fidl::new_empty!(
9157                    SampleResourceXUnion,
9158                    fidl::encoding::DefaultFuchsiaResourceDialect
9159                ),
9160            }
9161        }
9162
9163        #[inline]
9164        unsafe fn decode(
9165            &mut self,
9166            decoder: &mut fidl::encoding::Decoder<
9167                '_,
9168                fidl::encoding::DefaultFuchsiaResourceDialect,
9169            >,
9170            offset: usize,
9171            _depth: fidl::encoding::Depth,
9172        ) -> fidl::Result<()> {
9173            decoder.debug_check_bounds::<Self>(offset);
9174            // Verify that padding bytes are zero.
9175            fidl::decode!(
9176                SampleResourceXUnion,
9177                fidl::encoding::DefaultFuchsiaResourceDialect,
9178                &mut self.xu,
9179                decoder,
9180                offset + 0,
9181                _depth
9182            )?;
9183            Ok(())
9184        }
9185    }
9186
9187    impl fidl::encoding::ResourceTypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
9188        type Borrowed<'a> = &'a mut Self;
9189        fn take_or_borrow<'a>(
9190            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9191        ) -> Self::Borrowed<'a> {
9192            value
9193        }
9194    }
9195
9196    unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
9197        type Owned = Self;
9198
9199        #[inline(always)]
9200        fn inline_align(_context: fidl::encoding::Context) -> usize {
9201            8
9202        }
9203
9204        #[inline(always)]
9205        fn inline_size(_context: fidl::encoding::Context) -> usize {
9206            16
9207        }
9208    }
9209
9210    unsafe impl
9211        fidl::encoding::Encode<
9212            TestOptionalFlexibleResourceXUnionInStruct,
9213            fidl::encoding::DefaultFuchsiaResourceDialect,
9214        > for &mut TestOptionalFlexibleResourceXUnionInStruct
9215    {
9216        #[inline]
9217        unsafe fn encode(
9218            self,
9219            encoder: &mut fidl::encoding::Encoder<
9220                '_,
9221                fidl::encoding::DefaultFuchsiaResourceDialect,
9222            >,
9223            offset: usize,
9224            _depth: fidl::encoding::Depth,
9225        ) -> fidl::Result<()> {
9226            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
9227            // Delegate to tuple encoding.
9228            fidl::encoding::Encode::<TestOptionalFlexibleResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9229                (
9230                    <fidl::encoding::OptionalUnion<SampleResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9231                ),
9232                encoder, offset, _depth
9233            )
9234        }
9235    }
9236    unsafe impl<
9237        T0: fidl::encoding::Encode<
9238                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9239                fidl::encoding::DefaultFuchsiaResourceDialect,
9240            >,
9241    >
9242        fidl::encoding::Encode<
9243            TestOptionalFlexibleResourceXUnionInStruct,
9244            fidl::encoding::DefaultFuchsiaResourceDialect,
9245        > for (T0,)
9246    {
9247        #[inline]
9248        unsafe fn encode(
9249            self,
9250            encoder: &mut fidl::encoding::Encoder<
9251                '_,
9252                fidl::encoding::DefaultFuchsiaResourceDialect,
9253            >,
9254            offset: usize,
9255            depth: fidl::encoding::Depth,
9256        ) -> fidl::Result<()> {
9257            encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
9258            // Zero out padding regions. There's no need to apply masks
9259            // because the unmasked parts will be overwritten by fields.
9260            // Write the fields.
9261            self.0.encode(encoder, offset + 0, depth)?;
9262            Ok(())
9263        }
9264    }
9265
9266    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9267        for TestOptionalFlexibleResourceXUnionInStruct
9268    {
9269        #[inline(always)]
9270        fn new_empty() -> Self {
9271            Self {
9272                xu: fidl::new_empty!(
9273                    fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9274                    fidl::encoding::DefaultFuchsiaResourceDialect
9275                ),
9276            }
9277        }
9278
9279        #[inline]
9280        unsafe fn decode(
9281            &mut self,
9282            decoder: &mut fidl::encoding::Decoder<
9283                '_,
9284                fidl::encoding::DefaultFuchsiaResourceDialect,
9285            >,
9286            offset: usize,
9287            _depth: fidl::encoding::Depth,
9288        ) -> fidl::Result<()> {
9289            decoder.debug_check_bounds::<Self>(offset);
9290            // Verify that padding bytes are zero.
9291            fidl::decode!(
9292                fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9293                fidl::encoding::DefaultFuchsiaResourceDialect,
9294                &mut self.xu,
9295                decoder,
9296                offset + 0,
9297                _depth
9298            )?;
9299            Ok(())
9300        }
9301    }
9302
9303    impl fidl::encoding::ResourceTypeMarker for TestOptionalStrictResourceXUnionInStruct {
9304        type Borrowed<'a> = &'a mut Self;
9305        fn take_or_borrow<'a>(
9306            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9307        ) -> Self::Borrowed<'a> {
9308            value
9309        }
9310    }
9311
9312    unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictResourceXUnionInStruct {
9313        type Owned = Self;
9314
9315        #[inline(always)]
9316        fn inline_align(_context: fidl::encoding::Context) -> usize {
9317            8
9318        }
9319
9320        #[inline(always)]
9321        fn inline_size(_context: fidl::encoding::Context) -> usize {
9322            16
9323        }
9324    }
9325
9326    unsafe impl
9327        fidl::encoding::Encode<
9328            TestOptionalStrictResourceXUnionInStruct,
9329            fidl::encoding::DefaultFuchsiaResourceDialect,
9330        > for &mut TestOptionalStrictResourceXUnionInStruct
9331    {
9332        #[inline]
9333        unsafe fn encode(
9334            self,
9335            encoder: &mut fidl::encoding::Encoder<
9336                '_,
9337                fidl::encoding::DefaultFuchsiaResourceDialect,
9338            >,
9339            offset: usize,
9340            _depth: fidl::encoding::Depth,
9341        ) -> fidl::Result<()> {
9342            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9343            // Delegate to tuple encoding.
9344            fidl::encoding::Encode::<TestOptionalStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9345                (
9346                    <fidl::encoding::OptionalUnion<SampleStrictResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9347                ),
9348                encoder, offset, _depth
9349            )
9350        }
9351    }
9352    unsafe impl<
9353        T0: fidl::encoding::Encode<
9354                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9355                fidl::encoding::DefaultFuchsiaResourceDialect,
9356            >,
9357    >
9358        fidl::encoding::Encode<
9359            TestOptionalStrictResourceXUnionInStruct,
9360            fidl::encoding::DefaultFuchsiaResourceDialect,
9361        > for (T0,)
9362    {
9363        #[inline]
9364        unsafe fn encode(
9365            self,
9366            encoder: &mut fidl::encoding::Encoder<
9367                '_,
9368                fidl::encoding::DefaultFuchsiaResourceDialect,
9369            >,
9370            offset: usize,
9371            depth: fidl::encoding::Depth,
9372        ) -> fidl::Result<()> {
9373            encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9374            // Zero out padding regions. There's no need to apply masks
9375            // because the unmasked parts will be overwritten by fields.
9376            // Write the fields.
9377            self.0.encode(encoder, offset + 0, depth)?;
9378            Ok(())
9379        }
9380    }
9381
9382    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9383        for TestOptionalStrictResourceXUnionInStruct
9384    {
9385        #[inline(always)]
9386        fn new_empty() -> Self {
9387            Self {
9388                xu: fidl::new_empty!(
9389                    fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9390                    fidl::encoding::DefaultFuchsiaResourceDialect
9391                ),
9392            }
9393        }
9394
9395        #[inline]
9396        unsafe fn decode(
9397            &mut self,
9398            decoder: &mut fidl::encoding::Decoder<
9399                '_,
9400                fidl::encoding::DefaultFuchsiaResourceDialect,
9401            >,
9402            offset: usize,
9403            _depth: fidl::encoding::Depth,
9404        ) -> fidl::Result<()> {
9405            decoder.debug_check_bounds::<Self>(offset);
9406            // Verify that padding bytes are zero.
9407            fidl::decode!(
9408                fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9409                fidl::encoding::DefaultFuchsiaResourceDialect,
9410                &mut self.xu,
9411                decoder,
9412                offset + 0,
9413                _depth
9414            )?;
9415            Ok(())
9416        }
9417    }
9418
9419    impl fidl::encoding::ResourceTypeMarker for TestPackageResolverResolveRequest {
9420        type Borrowed<'a> = &'a mut Self;
9421        fn take_or_borrow<'a>(
9422            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9423        ) -> Self::Borrowed<'a> {
9424            value
9425        }
9426    }
9427
9428    unsafe impl fidl::encoding::TypeMarker for TestPackageResolverResolveRequest {
9429        type Owned = Self;
9430
9431        #[inline(always)]
9432        fn inline_align(_context: fidl::encoding::Context) -> usize {
9433            8
9434        }
9435
9436        #[inline(always)]
9437        fn inline_size(_context: fidl::encoding::Context) -> usize {
9438            40
9439        }
9440    }
9441
9442    unsafe impl
9443        fidl::encoding::Encode<
9444            TestPackageResolverResolveRequest,
9445            fidl::encoding::DefaultFuchsiaResourceDialect,
9446        > for &mut TestPackageResolverResolveRequest
9447    {
9448        #[inline]
9449        unsafe fn encode(
9450            self,
9451            encoder: &mut fidl::encoding::Encoder<
9452                '_,
9453                fidl::encoding::DefaultFuchsiaResourceDialect,
9454            >,
9455            offset: usize,
9456            _depth: fidl::encoding::Depth,
9457        ) -> fidl::Result<()> {
9458            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9459            // Delegate to tuple encoding.
9460            fidl::encoding::Encode::<TestPackageResolverResolveRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9461                (
9462                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),
9463                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.selectors),
9464                    <UpdatePolicy as fidl::encoding::ValueTypeMarker>::borrow(&self.update_policy),
9465                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
9466                ),
9467                encoder, offset, _depth
9468            )
9469        }
9470    }
9471    unsafe impl<
9472        T0: fidl::encoding::Encode<
9473                fidl::encoding::UnboundedString,
9474                fidl::encoding::DefaultFuchsiaResourceDialect,
9475            >,
9476        T1: fidl::encoding::Encode<
9477                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9478                fidl::encoding::DefaultFuchsiaResourceDialect,
9479            >,
9480        T2: fidl::encoding::Encode<UpdatePolicy, fidl::encoding::DefaultFuchsiaResourceDialect>,
9481        T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
9482    >
9483        fidl::encoding::Encode<
9484            TestPackageResolverResolveRequest,
9485            fidl::encoding::DefaultFuchsiaResourceDialect,
9486        > for (T0, T1, T2, T3)
9487    {
9488        #[inline]
9489        unsafe fn encode(
9490            self,
9491            encoder: &mut fidl::encoding::Encoder<
9492                '_,
9493                fidl::encoding::DefaultFuchsiaResourceDialect,
9494            >,
9495            offset: usize,
9496            depth: fidl::encoding::Depth,
9497        ) -> fidl::Result<()> {
9498            encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9499            // Zero out padding regions. There's no need to apply masks
9500            // because the unmasked parts will be overwritten by fields.
9501            unsafe {
9502                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9503                (ptr as *mut u64).write_unaligned(0);
9504            }
9505            // Write the fields.
9506            self.0.encode(encoder, offset + 0, depth)?;
9507            self.1.encode(encoder, offset + 16, depth)?;
9508            self.2.encode(encoder, offset + 32, depth)?;
9509            self.3.encode(encoder, offset + 36, depth)?;
9510            Ok(())
9511        }
9512    }
9513
9514    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9515        for TestPackageResolverResolveRequest
9516    {
9517        #[inline(always)]
9518        fn new_empty() -> Self {
9519            Self {
9520                package_url: fidl::new_empty!(
9521                    fidl::encoding::UnboundedString,
9522                    fidl::encoding::DefaultFuchsiaResourceDialect
9523                ),
9524                selectors: fidl::new_empty!(
9525                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9526                    fidl::encoding::DefaultFuchsiaResourceDialect
9527                ),
9528                update_policy: fidl::new_empty!(
9529                    UpdatePolicy,
9530                    fidl::encoding::DefaultFuchsiaResourceDialect
9531                ),
9532                this_should_be_a_handle: fidl::new_empty!(
9533                    u32,
9534                    fidl::encoding::DefaultFuchsiaResourceDialect
9535                ),
9536            }
9537        }
9538
9539        #[inline]
9540        unsafe fn decode(
9541            &mut self,
9542            decoder: &mut fidl::encoding::Decoder<
9543                '_,
9544                fidl::encoding::DefaultFuchsiaResourceDialect,
9545            >,
9546            offset: usize,
9547            _depth: fidl::encoding::Depth,
9548        ) -> fidl::Result<()> {
9549            decoder.debug_check_bounds::<Self>(offset);
9550            // Verify that padding bytes are zero.
9551            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9552            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9553            let mask = 0xffff0000u64;
9554            let maskedval = padval & mask;
9555            if maskedval != 0 {
9556                return Err(fidl::Error::NonZeroPadding {
9557                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9558                });
9559            }
9560            fidl::decode!(
9561                fidl::encoding::UnboundedString,
9562                fidl::encoding::DefaultFuchsiaResourceDialect,
9563                &mut self.package_url,
9564                decoder,
9565                offset + 0,
9566                _depth
9567            )?;
9568            fidl::decode!(
9569                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9570                fidl::encoding::DefaultFuchsiaResourceDialect,
9571                &mut self.selectors,
9572                decoder,
9573                offset + 16,
9574                _depth
9575            )?;
9576            fidl::decode!(
9577                UpdatePolicy,
9578                fidl::encoding::DefaultFuchsiaResourceDialect,
9579                &mut self.update_policy,
9580                decoder,
9581                offset + 32,
9582                _depth
9583            )?;
9584            fidl::decode!(
9585                u32,
9586                fidl::encoding::DefaultFuchsiaResourceDialect,
9587                &mut self.this_should_be_a_handle,
9588                decoder,
9589                offset + 36,
9590                _depth
9591            )?;
9592            Ok(())
9593        }
9594    }
9595
9596    impl fidl::encoding::ResourceTypeMarker for TestStrictResourceXUnionInStruct {
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 TestStrictResourceXUnionInStruct {
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            TestStrictResourceXUnionInStruct,
9622            fidl::encoding::DefaultFuchsiaResourceDialect,
9623        > for &mut TestStrictResourceXUnionInStruct
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::<TestStrictResourceXUnionInStruct>(offset);
9636            // Delegate to tuple encoding.
9637            fidl::encoding::Encode::<TestStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9638                (
9639                    <SampleStrictResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9640                ),
9641                encoder, offset, _depth
9642            )
9643        }
9644    }
9645    unsafe impl<
9646        T0: fidl::encoding::Encode<
9647                SampleStrictResourceXUnion,
9648                fidl::encoding::DefaultFuchsiaResourceDialect,
9649            >,
9650    >
9651        fidl::encoding::Encode<
9652            TestStrictResourceXUnionInStruct,
9653            fidl::encoding::DefaultFuchsiaResourceDialect,
9654        > for (T0,)
9655    {
9656        #[inline]
9657        unsafe fn encode(
9658            self,
9659            encoder: &mut fidl::encoding::Encoder<
9660                '_,
9661                fidl::encoding::DefaultFuchsiaResourceDialect,
9662            >,
9663            offset: usize,
9664            depth: fidl::encoding::Depth,
9665        ) -> fidl::Result<()> {
9666            encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9667            // Zero out padding regions. There's no need to apply masks
9668            // because the unmasked parts will be overwritten by fields.
9669            // Write the fields.
9670            self.0.encode(encoder, offset + 0, depth)?;
9671            Ok(())
9672        }
9673    }
9674
9675    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9676        for TestStrictResourceXUnionInStruct
9677    {
9678        #[inline(always)]
9679        fn new_empty() -> Self {
9680            Self {
9681                xu: fidl::new_empty!(
9682                    SampleStrictResourceXUnion,
9683                    fidl::encoding::DefaultFuchsiaResourceDialect
9684                ),
9685            }
9686        }
9687
9688        #[inline]
9689        unsafe fn decode(
9690            &mut self,
9691            decoder: &mut fidl::encoding::Decoder<
9692                '_,
9693                fidl::encoding::DefaultFuchsiaResourceDialect,
9694            >,
9695            offset: usize,
9696            _depth: fidl::encoding::Depth,
9697        ) -> fidl::Result<()> {
9698            decoder.debug_check_bounds::<Self>(offset);
9699            // Verify that padding bytes are zero.
9700            fidl::decode!(
9701                SampleStrictResourceXUnion,
9702                fidl::encoding::DefaultFuchsiaResourceDialect,
9703                &mut self.xu,
9704                decoder,
9705                offset + 0,
9706                _depth
9707            )?;
9708            Ok(())
9709        }
9710    }
9711
9712    impl fidl::encoding::ResourceTypeMarker for UnboundedNonnullableVectorOfHandles {
9713        type Borrowed<'a> = &'a mut Self;
9714        fn take_or_borrow<'a>(
9715            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9716        ) -> Self::Borrowed<'a> {
9717            value
9718        }
9719    }
9720
9721    unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfHandles {
9722        type Owned = Self;
9723
9724        #[inline(always)]
9725        fn inline_align(_context: fidl::encoding::Context) -> usize {
9726            8
9727        }
9728
9729        #[inline(always)]
9730        fn inline_size(_context: fidl::encoding::Context) -> usize {
9731            16
9732        }
9733    }
9734
9735    unsafe impl
9736        fidl::encoding::Encode<
9737            UnboundedNonnullableVectorOfHandles,
9738            fidl::encoding::DefaultFuchsiaResourceDialect,
9739        > for &mut UnboundedNonnullableVectorOfHandles
9740    {
9741        #[inline]
9742        unsafe fn encode(
9743            self,
9744            encoder: &mut fidl::encoding::Encoder<
9745                '_,
9746                fidl::encoding::DefaultFuchsiaResourceDialect,
9747            >,
9748            offset: usize,
9749            _depth: fidl::encoding::Depth,
9750        ) -> fidl::Result<()> {
9751            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9752            // Delegate to tuple encoding.
9753            fidl::encoding::Encode::<
9754                UnboundedNonnullableVectorOfHandles,
9755                fidl::encoding::DefaultFuchsiaResourceDialect,
9756            >::encode(
9757                (<fidl::encoding::UnboundedVector<
9758                    fidl::encoding::HandleType<
9759                        fidl::NullableHandle,
9760                        { fidl::ObjectType::NONE.into_raw() },
9761                        2147483648,
9762                    >,
9763                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9764                    &mut self.vh0
9765                ),),
9766                encoder,
9767                offset,
9768                _depth,
9769            )
9770        }
9771    }
9772    unsafe impl<
9773        T0: fidl::encoding::Encode<
9774                fidl::encoding::UnboundedVector<
9775                    fidl::encoding::HandleType<
9776                        fidl::NullableHandle,
9777                        { fidl::ObjectType::NONE.into_raw() },
9778                        2147483648,
9779                    >,
9780                >,
9781                fidl::encoding::DefaultFuchsiaResourceDialect,
9782            >,
9783    >
9784        fidl::encoding::Encode<
9785            UnboundedNonnullableVectorOfHandles,
9786            fidl::encoding::DefaultFuchsiaResourceDialect,
9787        > for (T0,)
9788    {
9789        #[inline]
9790        unsafe fn encode(
9791            self,
9792            encoder: &mut fidl::encoding::Encoder<
9793                '_,
9794                fidl::encoding::DefaultFuchsiaResourceDialect,
9795            >,
9796            offset: usize,
9797            depth: fidl::encoding::Depth,
9798        ) -> fidl::Result<()> {
9799            encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9800            // Zero out padding regions. There's no need to apply masks
9801            // because the unmasked parts will be overwritten by fields.
9802            // Write the fields.
9803            self.0.encode(encoder, offset + 0, depth)?;
9804            Ok(())
9805        }
9806    }
9807
9808    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9809        for UnboundedNonnullableVectorOfHandles
9810    {
9811        #[inline(always)]
9812        fn new_empty() -> Self {
9813            Self {
9814                vh0: fidl::new_empty!(
9815                    fidl::encoding::UnboundedVector<
9816                        fidl::encoding::HandleType<
9817                            fidl::NullableHandle,
9818                            { fidl::ObjectType::NONE.into_raw() },
9819                            2147483648,
9820                        >,
9821                    >,
9822                    fidl::encoding::DefaultFuchsiaResourceDialect
9823                ),
9824            }
9825        }
9826
9827        #[inline]
9828        unsafe fn decode(
9829            &mut self,
9830            decoder: &mut fidl::encoding::Decoder<
9831                '_,
9832                fidl::encoding::DefaultFuchsiaResourceDialect,
9833            >,
9834            offset: usize,
9835            _depth: fidl::encoding::Depth,
9836        ) -> fidl::Result<()> {
9837            decoder.debug_check_bounds::<Self>(offset);
9838            // Verify that padding bytes are zero.
9839            fidl::decode!(
9840                fidl::encoding::UnboundedVector<
9841                    fidl::encoding::HandleType<
9842                        fidl::NullableHandle,
9843                        { fidl::ObjectType::NONE.into_raw() },
9844                        2147483648,
9845                    >,
9846                >,
9847                fidl::encoding::DefaultFuchsiaResourceDialect,
9848                &mut self.vh0,
9849                decoder,
9850                offset + 0,
9851                _depth
9852            )?;
9853            Ok(())
9854        }
9855    }
9856
9857    impl fidl::encoding::ResourceTypeMarker for UnboundedNullableVectorOfHandles {
9858        type Borrowed<'a> = &'a mut Self;
9859        fn take_or_borrow<'a>(
9860            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9861        ) -> Self::Borrowed<'a> {
9862            value
9863        }
9864    }
9865
9866    unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfHandles {
9867        type Owned = Self;
9868
9869        #[inline(always)]
9870        fn inline_align(_context: fidl::encoding::Context) -> usize {
9871            8
9872        }
9873
9874        #[inline(always)]
9875        fn inline_size(_context: fidl::encoding::Context) -> usize {
9876            16
9877        }
9878    }
9879
9880    unsafe impl
9881        fidl::encoding::Encode<
9882            UnboundedNullableVectorOfHandles,
9883            fidl::encoding::DefaultFuchsiaResourceDialect,
9884        > for &mut UnboundedNullableVectorOfHandles
9885    {
9886        #[inline]
9887        unsafe fn encode(
9888            self,
9889            encoder: &mut fidl::encoding::Encoder<
9890                '_,
9891                fidl::encoding::DefaultFuchsiaResourceDialect,
9892            >,
9893            offset: usize,
9894            _depth: fidl::encoding::Depth,
9895        ) -> fidl::Result<()> {
9896            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9897            // Delegate to tuple encoding.
9898            fidl::encoding::Encode::<
9899                UnboundedNullableVectorOfHandles,
9900                fidl::encoding::DefaultFuchsiaResourceDialect,
9901            >::encode(
9902                (<fidl::encoding::Optional<
9903                    fidl::encoding::UnboundedVector<
9904                        fidl::encoding::HandleType<
9905                            fidl::NullableHandle,
9906                            { fidl::ObjectType::NONE.into_raw() },
9907                            2147483648,
9908                        >,
9909                    >,
9910                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9911                    &mut self.vh0
9912                ),),
9913                encoder,
9914                offset,
9915                _depth,
9916            )
9917        }
9918    }
9919    unsafe impl<
9920        T0: fidl::encoding::Encode<
9921                fidl::encoding::Optional<
9922                    fidl::encoding::UnboundedVector<
9923                        fidl::encoding::HandleType<
9924                            fidl::NullableHandle,
9925                            { fidl::ObjectType::NONE.into_raw() },
9926                            2147483648,
9927                        >,
9928                    >,
9929                >,
9930                fidl::encoding::DefaultFuchsiaResourceDialect,
9931            >,
9932    >
9933        fidl::encoding::Encode<
9934            UnboundedNullableVectorOfHandles,
9935            fidl::encoding::DefaultFuchsiaResourceDialect,
9936        > for (T0,)
9937    {
9938        #[inline]
9939        unsafe fn encode(
9940            self,
9941            encoder: &mut fidl::encoding::Encoder<
9942                '_,
9943                fidl::encoding::DefaultFuchsiaResourceDialect,
9944            >,
9945            offset: usize,
9946            depth: fidl::encoding::Depth,
9947        ) -> fidl::Result<()> {
9948            encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9949            // Zero out padding regions. There's no need to apply masks
9950            // because the unmasked parts will be overwritten by fields.
9951            // Write the fields.
9952            self.0.encode(encoder, offset + 0, depth)?;
9953            Ok(())
9954        }
9955    }
9956
9957    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9958        for UnboundedNullableVectorOfHandles
9959    {
9960        #[inline(always)]
9961        fn new_empty() -> Self {
9962            Self {
9963                vh0: fidl::new_empty!(
9964                    fidl::encoding::Optional<
9965                        fidl::encoding::UnboundedVector<
9966                            fidl::encoding::HandleType<
9967                                fidl::NullableHandle,
9968                                { fidl::ObjectType::NONE.into_raw() },
9969                                2147483648,
9970                            >,
9971                        >,
9972                    >,
9973                    fidl::encoding::DefaultFuchsiaResourceDialect
9974                ),
9975            }
9976        }
9977
9978        #[inline]
9979        unsafe fn decode(
9980            &mut self,
9981            decoder: &mut fidl::encoding::Decoder<
9982                '_,
9983                fidl::encoding::DefaultFuchsiaResourceDialect,
9984            >,
9985            offset: usize,
9986            _depth: fidl::encoding::Depth,
9987        ) -> fidl::Result<()> {
9988            decoder.debug_check_bounds::<Self>(offset);
9989            // Verify that padding bytes are zero.
9990            fidl::decode!(
9991                fidl::encoding::Optional<
9992                    fidl::encoding::UnboundedVector<
9993                        fidl::encoding::HandleType<
9994                            fidl::NullableHandle,
9995                            { fidl::ObjectType::NONE.into_raw() },
9996                            2147483648,
9997                        >,
9998                    >,
9999                >,
10000                fidl::encoding::DefaultFuchsiaResourceDialect,
10001                &mut self.vh0,
10002                decoder,
10003                offset + 0,
10004                _depth
10005            )?;
10006            Ok(())
10007        }
10008    }
10009
10010    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpoints {
10011        type Borrowed<'a> = &'a mut Self;
10012        fn take_or_borrow<'a>(
10013            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10014        ) -> Self::Borrowed<'a> {
10015            value
10016        }
10017    }
10018
10019    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpoints {
10020        type Owned = Self;
10021
10022        #[inline(always)]
10023        fn inline_align(_context: fidl::encoding::Context) -> usize {
10024            8
10025        }
10026
10027        #[inline(always)]
10028        fn inline_size(_context: fidl::encoding::Context) -> usize {
10029            16
10030        }
10031    }
10032
10033    unsafe impl
10034        fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
10035        for &mut UnionOfEndpoints
10036    {
10037        #[inline]
10038        unsafe fn encode(
10039            self,
10040            encoder: &mut fidl::encoding::Encoder<
10041                '_,
10042                fidl::encoding::DefaultFuchsiaResourceDialect,
10043            >,
10044            offset: usize,
10045            _depth: fidl::encoding::Depth,
10046        ) -> fidl::Result<()> {
10047            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
10048            // Delegate to tuple encoding.
10049            fidl::encoding::Encode::<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10050                (
10051                    <UnionOfEndpointsUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10052                ),
10053                encoder, offset, _depth
10054            )
10055        }
10056    }
10057    unsafe impl<
10058        T0: fidl::encoding::Encode<
10059                UnionOfEndpointsUnion,
10060                fidl::encoding::DefaultFuchsiaResourceDialect,
10061            >,
10062    > fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
10063        for (T0,)
10064    {
10065        #[inline]
10066        unsafe fn encode(
10067            self,
10068            encoder: &mut fidl::encoding::Encoder<
10069                '_,
10070                fidl::encoding::DefaultFuchsiaResourceDialect,
10071            >,
10072            offset: usize,
10073            depth: fidl::encoding::Depth,
10074        ) -> fidl::Result<()> {
10075            encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
10076            // Zero out padding regions. There's no need to apply masks
10077            // because the unmasked parts will be overwritten by fields.
10078            // Write the fields.
10079            self.0.encode(encoder, offset + 0, depth)?;
10080            Ok(())
10081        }
10082    }
10083
10084    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10085        for UnionOfEndpoints
10086    {
10087        #[inline(always)]
10088        fn new_empty() -> Self {
10089            Self {
10090                u: fidl::new_empty!(
10091                    UnionOfEndpointsUnion,
10092                    fidl::encoding::DefaultFuchsiaResourceDialect
10093                ),
10094            }
10095        }
10096
10097        #[inline]
10098        unsafe fn decode(
10099            &mut self,
10100            decoder: &mut fidl::encoding::Decoder<
10101                '_,
10102                fidl::encoding::DefaultFuchsiaResourceDialect,
10103            >,
10104            offset: usize,
10105            _depth: fidl::encoding::Depth,
10106        ) -> fidl::Result<()> {
10107            decoder.debug_check_bounds::<Self>(offset);
10108            // Verify that padding bytes are zero.
10109            fidl::decode!(
10110                UnionOfEndpointsUnion,
10111                fidl::encoding::DefaultFuchsiaResourceDialect,
10112                &mut self.u,
10113                decoder,
10114                offset + 0,
10115                _depth
10116            )?;
10117            Ok(())
10118        }
10119    }
10120
10121    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
10122        type Borrowed<'a> = &'a mut Self;
10123        fn take_or_borrow<'a>(
10124            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10125        ) -> Self::Borrowed<'a> {
10126            value
10127        }
10128    }
10129
10130    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
10131        type Owned = Self;
10132
10133        #[inline(always)]
10134        fn inline_align(_context: fidl::encoding::Context) -> usize {
10135            8
10136        }
10137
10138        #[inline(always)]
10139        fn inline_size(_context: fidl::encoding::Context) -> usize {
10140            16
10141        }
10142    }
10143
10144    unsafe impl
10145        fidl::encoding::Encode<
10146            VectorOfArrayOfEventInStructWithDefaultRights,
10147            fidl::encoding::DefaultFuchsiaResourceDialect,
10148        > for &mut VectorOfArrayOfEventInStructWithDefaultRights
10149    {
10150        #[inline]
10151        unsafe fn encode(
10152            self,
10153            encoder: &mut fidl::encoding::Encoder<
10154                '_,
10155                fidl::encoding::DefaultFuchsiaResourceDialect,
10156            >,
10157            offset: usize,
10158            _depth: fidl::encoding::Depth,
10159        ) -> fidl::Result<()> {
10160            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
10161            // Delegate to tuple encoding.
10162            fidl::encoding::Encode::<
10163                VectorOfArrayOfEventInStructWithDefaultRights,
10164                fidl::encoding::DefaultFuchsiaResourceDialect,
10165            >::encode(
10166                (<fidl::encoding::Vector<
10167                    fidl::encoding::Array<
10168                        fidl::encoding::HandleType<
10169                            fidl::Event,
10170                            { fidl::ObjectType::EVENT.into_raw() },
10171                            53251,
10172                        >,
10173                        1,
10174                    >,
10175                    1,
10176                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10177                    &mut self.h
10178                ),),
10179                encoder,
10180                offset,
10181                _depth,
10182            )
10183        }
10184    }
10185    unsafe impl<
10186        T0: fidl::encoding::Encode<
10187                fidl::encoding::Vector<
10188                    fidl::encoding::Array<
10189                        fidl::encoding::HandleType<
10190                            fidl::Event,
10191                            { fidl::ObjectType::EVENT.into_raw() },
10192                            53251,
10193                        >,
10194                        1,
10195                    >,
10196                    1,
10197                >,
10198                fidl::encoding::DefaultFuchsiaResourceDialect,
10199            >,
10200    >
10201        fidl::encoding::Encode<
10202            VectorOfArrayOfEventInStructWithDefaultRights,
10203            fidl::encoding::DefaultFuchsiaResourceDialect,
10204        > for (T0,)
10205    {
10206        #[inline]
10207        unsafe fn encode(
10208            self,
10209            encoder: &mut fidl::encoding::Encoder<
10210                '_,
10211                fidl::encoding::DefaultFuchsiaResourceDialect,
10212            >,
10213            offset: usize,
10214            depth: fidl::encoding::Depth,
10215        ) -> fidl::Result<()> {
10216            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
10217            // Zero out padding regions. There's no need to apply masks
10218            // because the unmasked parts will be overwritten by fields.
10219            // Write the fields.
10220            self.0.encode(encoder, offset + 0, depth)?;
10221            Ok(())
10222        }
10223    }
10224
10225    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10226        for VectorOfArrayOfEventInStructWithDefaultRights
10227    {
10228        #[inline(always)]
10229        fn new_empty() -> Self {
10230            Self {
10231                h: fidl::new_empty!(
10232                    fidl::encoding::Vector<
10233                        fidl::encoding::Array<
10234                            fidl::encoding::HandleType<
10235                                fidl::Event,
10236                                { fidl::ObjectType::EVENT.into_raw() },
10237                                53251,
10238                            >,
10239                            1,
10240                        >,
10241                        1,
10242                    >,
10243                    fidl::encoding::DefaultFuchsiaResourceDialect
10244                ),
10245            }
10246        }
10247
10248        #[inline]
10249        unsafe fn decode(
10250            &mut self,
10251            decoder: &mut fidl::encoding::Decoder<
10252                '_,
10253                fidl::encoding::DefaultFuchsiaResourceDialect,
10254            >,
10255            offset: usize,
10256            _depth: fidl::encoding::Depth,
10257        ) -> fidl::Result<()> {
10258            decoder.debug_check_bounds::<Self>(offset);
10259            // Verify that padding bytes are zero.
10260            fidl::decode!(
10261                fidl::encoding::Vector<
10262                    fidl::encoding::Array<
10263                        fidl::encoding::HandleType<
10264                            fidl::Event,
10265                            { fidl::ObjectType::EVENT.into_raw() },
10266                            53251,
10267                        >,
10268                        1,
10269                    >,
10270                    1,
10271                >,
10272                fidl::encoding::DefaultFuchsiaResourceDialect,
10273                &mut self.h,
10274                decoder,
10275                offset + 0,
10276                _depth
10277            )?;
10278            Ok(())
10279        }
10280    }
10281
10282    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10283        type Borrowed<'a> = &'a mut Self;
10284        fn take_or_borrow<'a>(
10285            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10286        ) -> Self::Borrowed<'a> {
10287            value
10288        }
10289    }
10290
10291    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10292        type Owned = Self;
10293
10294        #[inline(always)]
10295        fn inline_align(_context: fidl::encoding::Context) -> usize {
10296            8
10297        }
10298
10299        #[inline(always)]
10300        fn inline_size(_context: fidl::encoding::Context) -> usize {
10301            16
10302        }
10303    }
10304
10305    unsafe impl
10306        fidl::encoding::Encode<
10307            VectorOfArrayOfEventInStructWithReducedRights,
10308            fidl::encoding::DefaultFuchsiaResourceDialect,
10309        > for &mut VectorOfArrayOfEventInStructWithReducedRights
10310    {
10311        #[inline]
10312        unsafe fn encode(
10313            self,
10314            encoder: &mut fidl::encoding::Encoder<
10315                '_,
10316                fidl::encoding::DefaultFuchsiaResourceDialect,
10317            >,
10318            offset: usize,
10319            _depth: fidl::encoding::Depth,
10320        ) -> fidl::Result<()> {
10321            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10322            // Delegate to tuple encoding.
10323            fidl::encoding::Encode::<
10324                VectorOfArrayOfEventInStructWithReducedRights,
10325                fidl::encoding::DefaultFuchsiaResourceDialect,
10326            >::encode(
10327                (<fidl::encoding::Vector<
10328                    fidl::encoding::Array<
10329                        fidl::encoding::HandleType<
10330                            fidl::Event,
10331                            { fidl::ObjectType::EVENT.into_raw() },
10332                            49155,
10333                        >,
10334                        1,
10335                    >,
10336                    1,
10337                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10338                    &mut self.h
10339                ),),
10340                encoder,
10341                offset,
10342                _depth,
10343            )
10344        }
10345    }
10346    unsafe impl<
10347        T0: fidl::encoding::Encode<
10348                fidl::encoding::Vector<
10349                    fidl::encoding::Array<
10350                        fidl::encoding::HandleType<
10351                            fidl::Event,
10352                            { fidl::ObjectType::EVENT.into_raw() },
10353                            49155,
10354                        >,
10355                        1,
10356                    >,
10357                    1,
10358                >,
10359                fidl::encoding::DefaultFuchsiaResourceDialect,
10360            >,
10361    >
10362        fidl::encoding::Encode<
10363            VectorOfArrayOfEventInStructWithReducedRights,
10364            fidl::encoding::DefaultFuchsiaResourceDialect,
10365        > for (T0,)
10366    {
10367        #[inline]
10368        unsafe fn encode(
10369            self,
10370            encoder: &mut fidl::encoding::Encoder<
10371                '_,
10372                fidl::encoding::DefaultFuchsiaResourceDialect,
10373            >,
10374            offset: usize,
10375            depth: fidl::encoding::Depth,
10376        ) -> fidl::Result<()> {
10377            encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10378            // Zero out padding regions. There's no need to apply masks
10379            // because the unmasked parts will be overwritten by fields.
10380            // Write the fields.
10381            self.0.encode(encoder, offset + 0, depth)?;
10382            Ok(())
10383        }
10384    }
10385
10386    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10387        for VectorOfArrayOfEventInStructWithReducedRights
10388    {
10389        #[inline(always)]
10390        fn new_empty() -> Self {
10391            Self {
10392                h: fidl::new_empty!(
10393                    fidl::encoding::Vector<
10394                        fidl::encoding::Array<
10395                            fidl::encoding::HandleType<
10396                                fidl::Event,
10397                                { fidl::ObjectType::EVENT.into_raw() },
10398                                49155,
10399                            >,
10400                            1,
10401                        >,
10402                        1,
10403                    >,
10404                    fidl::encoding::DefaultFuchsiaResourceDialect
10405                ),
10406            }
10407        }
10408
10409        #[inline]
10410        unsafe fn decode(
10411            &mut self,
10412            decoder: &mut fidl::encoding::Decoder<
10413                '_,
10414                fidl::encoding::DefaultFuchsiaResourceDialect,
10415            >,
10416            offset: usize,
10417            _depth: fidl::encoding::Depth,
10418        ) -> fidl::Result<()> {
10419            decoder.debug_check_bounds::<Self>(offset);
10420            // Verify that padding bytes are zero.
10421            fidl::decode!(
10422                fidl::encoding::Vector<
10423                    fidl::encoding::Array<
10424                        fidl::encoding::HandleType<
10425                            fidl::Event,
10426                            { fidl::ObjectType::EVENT.into_raw() },
10427                            49155,
10428                        >,
10429                        1,
10430                    >,
10431                    1,
10432                >,
10433                fidl::encoding::DefaultFuchsiaResourceDialect,
10434                &mut self.h,
10435                decoder,
10436                offset + 0,
10437                _depth
10438            )?;
10439            Ok(())
10440        }
10441    }
10442
10443    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10444        type Borrowed<'a> = &'a mut Self;
10445        fn take_or_borrow<'a>(
10446            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10447        ) -> Self::Borrowed<'a> {
10448            value
10449        }
10450    }
10451
10452    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10453        type Owned = Self;
10454
10455        #[inline(always)]
10456        fn inline_align(_context: fidl::encoding::Context) -> usize {
10457            8
10458        }
10459
10460        #[inline(always)]
10461        fn inline_size(_context: fidl::encoding::Context) -> usize {
10462            16
10463        }
10464    }
10465
10466    unsafe impl
10467        fidl::encoding::Encode<
10468            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10469            fidl::encoding::DefaultFuchsiaResourceDialect,
10470        > for &mut VectorOfArrayOfEventInTableWithReducedRightsStruct
10471    {
10472        #[inline]
10473        unsafe fn encode(
10474            self,
10475            encoder: &mut fidl::encoding::Encoder<
10476                '_,
10477                fidl::encoding::DefaultFuchsiaResourceDialect,
10478            >,
10479            offset: usize,
10480            _depth: fidl::encoding::Depth,
10481        ) -> fidl::Result<()> {
10482            encoder
10483                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10484            // Delegate to tuple encoding.
10485            fidl::encoding::Encode::<VectorOfArrayOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10486                (
10487                    <VectorOfArrayOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
10488                ),
10489                encoder, offset, _depth
10490            )
10491        }
10492    }
10493    unsafe impl<
10494        T0: fidl::encoding::Encode<
10495                VectorOfArrayOfEventInTableWithReducedRights,
10496                fidl::encoding::DefaultFuchsiaResourceDialect,
10497            >,
10498    >
10499        fidl::encoding::Encode<
10500            VectorOfArrayOfEventInTableWithReducedRightsStruct,
10501            fidl::encoding::DefaultFuchsiaResourceDialect,
10502        > for (T0,)
10503    {
10504        #[inline]
10505        unsafe fn encode(
10506            self,
10507            encoder: &mut fidl::encoding::Encoder<
10508                '_,
10509                fidl::encoding::DefaultFuchsiaResourceDialect,
10510            >,
10511            offset: usize,
10512            depth: fidl::encoding::Depth,
10513        ) -> fidl::Result<()> {
10514            encoder
10515                .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10516            // Zero out padding regions. There's no need to apply masks
10517            // because the unmasked parts will be overwritten by fields.
10518            // Write the fields.
10519            self.0.encode(encoder, offset + 0, depth)?;
10520            Ok(())
10521        }
10522    }
10523
10524    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10525        for VectorOfArrayOfEventInTableWithReducedRightsStruct
10526    {
10527        #[inline(always)]
10528        fn new_empty() -> Self {
10529            Self {
10530                t: fidl::new_empty!(
10531                    VectorOfArrayOfEventInTableWithReducedRights,
10532                    fidl::encoding::DefaultFuchsiaResourceDialect
10533                ),
10534            }
10535        }
10536
10537        #[inline]
10538        unsafe fn decode(
10539            &mut self,
10540            decoder: &mut fidl::encoding::Decoder<
10541                '_,
10542                fidl::encoding::DefaultFuchsiaResourceDialect,
10543            >,
10544            offset: usize,
10545            _depth: fidl::encoding::Depth,
10546        ) -> fidl::Result<()> {
10547            decoder.debug_check_bounds::<Self>(offset);
10548            // Verify that padding bytes are zero.
10549            fidl::decode!(
10550                VectorOfArrayOfEventInTableWithReducedRights,
10551                fidl::encoding::DefaultFuchsiaResourceDialect,
10552                &mut self.t,
10553                decoder,
10554                offset + 0,
10555                _depth
10556            )?;
10557            Ok(())
10558        }
10559    }
10560
10561    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10562        type Borrowed<'a> = &'a mut Self;
10563        fn take_or_borrow<'a>(
10564            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10565        ) -> Self::Borrowed<'a> {
10566            value
10567        }
10568    }
10569
10570    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10571        type Owned = Self;
10572
10573        #[inline(always)]
10574        fn inline_align(_context: fidl::encoding::Context) -> usize {
10575            8
10576        }
10577
10578        #[inline(always)]
10579        fn inline_size(_context: fidl::encoding::Context) -> usize {
10580            16
10581        }
10582    }
10583
10584    unsafe impl
10585        fidl::encoding::Encode<
10586            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10587            fidl::encoding::DefaultFuchsiaResourceDialect,
10588        > for &mut VectorOfArrayOfEventInUnionWithReducedRightsStruct
10589    {
10590        #[inline]
10591        unsafe fn encode(
10592            self,
10593            encoder: &mut fidl::encoding::Encoder<
10594                '_,
10595                fidl::encoding::DefaultFuchsiaResourceDialect,
10596            >,
10597            offset: usize,
10598            _depth: fidl::encoding::Depth,
10599        ) -> fidl::Result<()> {
10600            encoder
10601                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10602            // Delegate to tuple encoding.
10603            fidl::encoding::Encode::<VectorOfArrayOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10604                (
10605                    <VectorOfArrayOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10606                ),
10607                encoder, offset, _depth
10608            )
10609        }
10610    }
10611    unsafe impl<
10612        T0: fidl::encoding::Encode<
10613                VectorOfArrayOfEventInUnionWithReducedRights,
10614                fidl::encoding::DefaultFuchsiaResourceDialect,
10615            >,
10616    >
10617        fidl::encoding::Encode<
10618            VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10619            fidl::encoding::DefaultFuchsiaResourceDialect,
10620        > for (T0,)
10621    {
10622        #[inline]
10623        unsafe fn encode(
10624            self,
10625            encoder: &mut fidl::encoding::Encoder<
10626                '_,
10627                fidl::encoding::DefaultFuchsiaResourceDialect,
10628            >,
10629            offset: usize,
10630            depth: fidl::encoding::Depth,
10631        ) -> fidl::Result<()> {
10632            encoder
10633                .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10634            // Zero out padding regions. There's no need to apply masks
10635            // because the unmasked parts will be overwritten by fields.
10636            // Write the fields.
10637            self.0.encode(encoder, offset + 0, depth)?;
10638            Ok(())
10639        }
10640    }
10641
10642    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10643        for VectorOfArrayOfEventInUnionWithReducedRightsStruct
10644    {
10645        #[inline(always)]
10646        fn new_empty() -> Self {
10647            Self {
10648                u: fidl::new_empty!(
10649                    VectorOfArrayOfEventInUnionWithReducedRights,
10650                    fidl::encoding::DefaultFuchsiaResourceDialect
10651                ),
10652            }
10653        }
10654
10655        #[inline]
10656        unsafe fn decode(
10657            &mut self,
10658            decoder: &mut fidl::encoding::Decoder<
10659                '_,
10660                fidl::encoding::DefaultFuchsiaResourceDialect,
10661            >,
10662            offset: usize,
10663            _depth: fidl::encoding::Depth,
10664        ) -> fidl::Result<()> {
10665            decoder.debug_check_bounds::<Self>(offset);
10666            // Verify that padding bytes are zero.
10667            fidl::decode!(
10668                VectorOfArrayOfEventInUnionWithReducedRights,
10669                fidl::encoding::DefaultFuchsiaResourceDialect,
10670                &mut self.u,
10671                decoder,
10672                offset + 0,
10673                _depth
10674            )?;
10675            Ok(())
10676        }
10677    }
10678
10679    impl fidl::encoding::ResourceTypeMarker for VectorOfHandles {
10680        type Borrowed<'a> = &'a mut Self;
10681        fn take_or_borrow<'a>(
10682            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10683        ) -> Self::Borrowed<'a> {
10684            value
10685        }
10686    }
10687
10688    unsafe impl fidl::encoding::TypeMarker for VectorOfHandles {
10689        type Owned = Self;
10690
10691        #[inline(always)]
10692        fn inline_align(_context: fidl::encoding::Context) -> usize {
10693            8
10694        }
10695
10696        #[inline(always)]
10697        fn inline_size(_context: fidl::encoding::Context) -> usize {
10698            16
10699        }
10700    }
10701
10702    unsafe impl
10703        fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10704        for &mut VectorOfHandles
10705    {
10706        #[inline]
10707        unsafe fn encode(
10708            self,
10709            encoder: &mut fidl::encoding::Encoder<
10710                '_,
10711                fidl::encoding::DefaultFuchsiaResourceDialect,
10712            >,
10713            offset: usize,
10714            _depth: fidl::encoding::Depth,
10715        ) -> fidl::Result<()> {
10716            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10717            // Delegate to tuple encoding.
10718            fidl::encoding::Encode::<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10719                (
10720                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.v),
10721                ),
10722                encoder, offset, _depth
10723            )
10724        }
10725    }
10726    unsafe impl<
10727        T0: fidl::encoding::Encode<
10728                fidl::encoding::UnboundedVector<
10729                    fidl::encoding::HandleType<
10730                        fidl::NullableHandle,
10731                        { fidl::ObjectType::NONE.into_raw() },
10732                        2147483648,
10733                    >,
10734                >,
10735                fidl::encoding::DefaultFuchsiaResourceDialect,
10736            >,
10737    > fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10738        for (T0,)
10739    {
10740        #[inline]
10741        unsafe fn encode(
10742            self,
10743            encoder: &mut fidl::encoding::Encoder<
10744                '_,
10745                fidl::encoding::DefaultFuchsiaResourceDialect,
10746            >,
10747            offset: usize,
10748            depth: fidl::encoding::Depth,
10749        ) -> fidl::Result<()> {
10750            encoder.debug_check_bounds::<VectorOfHandles>(offset);
10751            // Zero out padding regions. There's no need to apply masks
10752            // because the unmasked parts will be overwritten by fields.
10753            // Write the fields.
10754            self.0.encode(encoder, offset + 0, depth)?;
10755            Ok(())
10756        }
10757    }
10758
10759    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10760        for VectorOfHandles
10761    {
10762        #[inline(always)]
10763        fn new_empty() -> Self {
10764            Self {
10765                v: fidl::new_empty!(
10766                    fidl::encoding::UnboundedVector<
10767                        fidl::encoding::HandleType<
10768                            fidl::NullableHandle,
10769                            { fidl::ObjectType::NONE.into_raw() },
10770                            2147483648,
10771                        >,
10772                    >,
10773                    fidl::encoding::DefaultFuchsiaResourceDialect
10774                ),
10775            }
10776        }
10777
10778        #[inline]
10779        unsafe fn decode(
10780            &mut self,
10781            decoder: &mut fidl::encoding::Decoder<
10782                '_,
10783                fidl::encoding::DefaultFuchsiaResourceDialect,
10784            >,
10785            offset: usize,
10786            _depth: fidl::encoding::Depth,
10787        ) -> fidl::Result<()> {
10788            decoder.debug_check_bounds::<Self>(offset);
10789            // Verify that padding bytes are zero.
10790            fidl::decode!(
10791                fidl::encoding::UnboundedVector<
10792                    fidl::encoding::HandleType<
10793                        fidl::NullableHandle,
10794                        { fidl::ObjectType::NONE.into_raw() },
10795                        2147483648,
10796                    >,
10797                >,
10798                fidl::encoding::DefaultFuchsiaResourceDialect,
10799                &mut self.v,
10800                decoder,
10801                offset + 0,
10802                _depth
10803            )?;
10804            Ok(())
10805        }
10806    }
10807
10808    impl fidl::encoding::ResourceTypeMarker for VectorOfOptionalHandles {
10809        type Borrowed<'a> = &'a mut Self;
10810        fn take_or_borrow<'a>(
10811            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10812        ) -> Self::Borrowed<'a> {
10813            value
10814        }
10815    }
10816
10817    unsafe impl fidl::encoding::TypeMarker for VectorOfOptionalHandles {
10818        type Owned = Self;
10819
10820        #[inline(always)]
10821        fn inline_align(_context: fidl::encoding::Context) -> usize {
10822            8
10823        }
10824
10825        #[inline(always)]
10826        fn inline_size(_context: fidl::encoding::Context) -> usize {
10827            16
10828        }
10829    }
10830
10831    unsafe impl
10832        fidl::encoding::Encode<
10833            VectorOfOptionalHandles,
10834            fidl::encoding::DefaultFuchsiaResourceDialect,
10835        > for &mut VectorOfOptionalHandles
10836    {
10837        #[inline]
10838        unsafe fn encode(
10839            self,
10840            encoder: &mut fidl::encoding::Encoder<
10841                '_,
10842                fidl::encoding::DefaultFuchsiaResourceDialect,
10843            >,
10844            offset: usize,
10845            _depth: fidl::encoding::Depth,
10846        ) -> fidl::Result<()> {
10847            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10848            // Delegate to tuple encoding.
10849            fidl::encoding::Encode::<
10850                VectorOfOptionalHandles,
10851                fidl::encoding::DefaultFuchsiaResourceDialect,
10852            >::encode(
10853                (<fidl::encoding::UnboundedVector<
10854                    fidl::encoding::Optional<
10855                        fidl::encoding::HandleType<
10856                            fidl::NullableHandle,
10857                            { fidl::ObjectType::NONE.into_raw() },
10858                            2147483648,
10859                        >,
10860                    >,
10861                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10862                    &mut self.v
10863                ),),
10864                encoder,
10865                offset,
10866                _depth,
10867            )
10868        }
10869    }
10870    unsafe impl<
10871        T0: fidl::encoding::Encode<
10872                fidl::encoding::UnboundedVector<
10873                    fidl::encoding::Optional<
10874                        fidl::encoding::HandleType<
10875                            fidl::NullableHandle,
10876                            { fidl::ObjectType::NONE.into_raw() },
10877                            2147483648,
10878                        >,
10879                    >,
10880                >,
10881                fidl::encoding::DefaultFuchsiaResourceDialect,
10882            >,
10883    >
10884        fidl::encoding::Encode<
10885            VectorOfOptionalHandles,
10886            fidl::encoding::DefaultFuchsiaResourceDialect,
10887        > for (T0,)
10888    {
10889        #[inline]
10890        unsafe fn encode(
10891            self,
10892            encoder: &mut fidl::encoding::Encoder<
10893                '_,
10894                fidl::encoding::DefaultFuchsiaResourceDialect,
10895            >,
10896            offset: usize,
10897            depth: fidl::encoding::Depth,
10898        ) -> fidl::Result<()> {
10899            encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10900            // Zero out padding regions. There's no need to apply masks
10901            // because the unmasked parts will be overwritten by fields.
10902            // Write the fields.
10903            self.0.encode(encoder, offset + 0, depth)?;
10904            Ok(())
10905        }
10906    }
10907
10908    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10909        for VectorOfOptionalHandles
10910    {
10911        #[inline(always)]
10912        fn new_empty() -> Self {
10913            Self {
10914                v: fidl::new_empty!(
10915                    fidl::encoding::UnboundedVector<
10916                        fidl::encoding::Optional<
10917                            fidl::encoding::HandleType<
10918                                fidl::NullableHandle,
10919                                { fidl::ObjectType::NONE.into_raw() },
10920                                2147483648,
10921                            >,
10922                        >,
10923                    >,
10924                    fidl::encoding::DefaultFuchsiaResourceDialect
10925                ),
10926            }
10927        }
10928
10929        #[inline]
10930        unsafe fn decode(
10931            &mut self,
10932            decoder: &mut fidl::encoding::Decoder<
10933                '_,
10934                fidl::encoding::DefaultFuchsiaResourceDialect,
10935            >,
10936            offset: usize,
10937            _depth: fidl::encoding::Depth,
10938        ) -> fidl::Result<()> {
10939            decoder.debug_check_bounds::<Self>(offset);
10940            // Verify that padding bytes are zero.
10941            fidl::decode!(
10942                fidl::encoding::UnboundedVector<
10943                    fidl::encoding::Optional<
10944                        fidl::encoding::HandleType<
10945                            fidl::NullableHandle,
10946                            { fidl::ObjectType::NONE.into_raw() },
10947                            2147483648,
10948                        >,
10949                    >,
10950                >,
10951                fidl::encoding::DefaultFuchsiaResourceDialect,
10952                &mut self.v,
10953                decoder,
10954                offset + 0,
10955                _depth
10956            )?;
10957            Ok(())
10958        }
10959    }
10960
10961    impl fidl::encoding::ResourceTypeMarker for VectorOfUpTo2Handles {
10962        type Borrowed<'a> = &'a mut Self;
10963        fn take_or_borrow<'a>(
10964            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10965        ) -> Self::Borrowed<'a> {
10966            value
10967        }
10968    }
10969
10970    unsafe impl fidl::encoding::TypeMarker for VectorOfUpTo2Handles {
10971        type Owned = Self;
10972
10973        #[inline(always)]
10974        fn inline_align(_context: fidl::encoding::Context) -> usize {
10975            8
10976        }
10977
10978        #[inline(always)]
10979        fn inline_size(_context: fidl::encoding::Context) -> usize {
10980            16
10981        }
10982    }
10983
10984    unsafe impl
10985        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10986        for &mut VectorOfUpTo2Handles
10987    {
10988        #[inline]
10989        unsafe fn encode(
10990            self,
10991            encoder: &mut fidl::encoding::Encoder<
10992                '_,
10993                fidl::encoding::DefaultFuchsiaResourceDialect,
10994            >,
10995            offset: usize,
10996            _depth: fidl::encoding::Depth,
10997        ) -> fidl::Result<()> {
10998            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10999            // Delegate to tuple encoding.
11000            fidl::encoding::Encode::<
11001                VectorOfUpTo2Handles,
11002                fidl::encoding::DefaultFuchsiaResourceDialect,
11003            >::encode(
11004                (<fidl::encoding::Vector<
11005                    fidl::encoding::HandleType<
11006                        fidl::NullableHandle,
11007                        { fidl::ObjectType::NONE.into_raw() },
11008                        2147483648,
11009                    >,
11010                    2,
11011                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11012                    &mut self.v
11013                ),),
11014                encoder,
11015                offset,
11016                _depth,
11017            )
11018        }
11019    }
11020    unsafe impl<
11021        T0: fidl::encoding::Encode<
11022                fidl::encoding::Vector<
11023                    fidl::encoding::HandleType<
11024                        fidl::NullableHandle,
11025                        { fidl::ObjectType::NONE.into_raw() },
11026                        2147483648,
11027                    >,
11028                    2,
11029                >,
11030                fidl::encoding::DefaultFuchsiaResourceDialect,
11031            >,
11032    >
11033        fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
11034        for (T0,)
11035    {
11036        #[inline]
11037        unsafe fn encode(
11038            self,
11039            encoder: &mut fidl::encoding::Encoder<
11040                '_,
11041                fidl::encoding::DefaultFuchsiaResourceDialect,
11042            >,
11043            offset: usize,
11044            depth: fidl::encoding::Depth,
11045        ) -> fidl::Result<()> {
11046            encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
11047            // Zero out padding regions. There's no need to apply masks
11048            // because the unmasked parts will be overwritten by fields.
11049            // Write the fields.
11050            self.0.encode(encoder, offset + 0, depth)?;
11051            Ok(())
11052        }
11053    }
11054
11055    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11056        for VectorOfUpTo2Handles
11057    {
11058        #[inline(always)]
11059        fn new_empty() -> Self {
11060            Self {
11061                v: fidl::new_empty!(
11062                    fidl::encoding::Vector<
11063                        fidl::encoding::HandleType<
11064                            fidl::NullableHandle,
11065                            { fidl::ObjectType::NONE.into_raw() },
11066                            2147483648,
11067                        >,
11068                        2,
11069                    >,
11070                    fidl::encoding::DefaultFuchsiaResourceDialect
11071                ),
11072            }
11073        }
11074
11075        #[inline]
11076        unsafe fn decode(
11077            &mut self,
11078            decoder: &mut fidl::encoding::Decoder<
11079                '_,
11080                fidl::encoding::DefaultFuchsiaResourceDialect,
11081            >,
11082            offset: usize,
11083            _depth: fidl::encoding::Depth,
11084        ) -> fidl::Result<()> {
11085            decoder.debug_check_bounds::<Self>(offset);
11086            // Verify that padding bytes are zero.
11087            fidl::decode!(
11088                fidl::encoding::Vector<
11089                    fidl::encoding::HandleType<
11090                        fidl::NullableHandle,
11091                        { fidl::ObjectType::NONE.into_raw() },
11092                        2147483648,
11093                    >,
11094                    2,
11095                >,
11096                fidl::encoding::DefaultFuchsiaResourceDialect,
11097                &mut self.v,
11098                decoder,
11099                offset + 0,
11100                _depth
11101            )?;
11102            Ok(())
11103        }
11104    }
11105
11106    impl ArrayOfVectorOfEventInTableWithDefaultRights {
11107        #[inline(always)]
11108        fn max_ordinal_present(&self) -> u64 {
11109            if let Some(_) = self.h {
11110                return 1;
11111            }
11112            0
11113        }
11114    }
11115
11116    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
11117        type Borrowed<'a> = &'a mut Self;
11118        fn take_or_borrow<'a>(
11119            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11120        ) -> Self::Borrowed<'a> {
11121            value
11122        }
11123    }
11124
11125    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
11126        type Owned = Self;
11127
11128        #[inline(always)]
11129        fn inline_align(_context: fidl::encoding::Context) -> usize {
11130            8
11131        }
11132
11133        #[inline(always)]
11134        fn inline_size(_context: fidl::encoding::Context) -> usize {
11135            16
11136        }
11137    }
11138
11139    unsafe impl
11140        fidl::encoding::Encode<
11141            ArrayOfVectorOfEventInTableWithDefaultRights,
11142            fidl::encoding::DefaultFuchsiaResourceDialect,
11143        > for &mut ArrayOfVectorOfEventInTableWithDefaultRights
11144    {
11145        unsafe fn encode(
11146            self,
11147            encoder: &mut fidl::encoding::Encoder<
11148                '_,
11149                fidl::encoding::DefaultFuchsiaResourceDialect,
11150            >,
11151            offset: usize,
11152            mut depth: fidl::encoding::Depth,
11153        ) -> fidl::Result<()> {
11154            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRights>(offset);
11155            // Vector header
11156            let max_ordinal: u64 = self.max_ordinal_present();
11157            encoder.write_num(max_ordinal, offset);
11158            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11159            // Calling encoder.out_of_line_offset(0) is not allowed.
11160            if max_ordinal == 0 {
11161                return Ok(());
11162            }
11163            depth.increment()?;
11164            let envelope_size = 8;
11165            let bytes_len = max_ordinal as usize * envelope_size;
11166            #[allow(unused_variables)]
11167            let offset = encoder.out_of_line_offset(bytes_len);
11168            let mut _prev_end_offset: usize = 0;
11169            if 1 > max_ordinal {
11170                return Ok(());
11171            }
11172
11173            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11174            // are envelope_size bytes.
11175            let cur_offset: usize = (1 - 1) * envelope_size;
11176
11177            // Zero reserved fields.
11178            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11179
11180            // Safety:
11181            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11182            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11183            //   envelope_size bytes, there is always sufficient room.
11184            fidl::encoding::encode_in_envelope_optional::<
11185                fidl::encoding::Array<
11186                    fidl::encoding::Vector<
11187                        fidl::encoding::HandleType<
11188                            fidl::Event,
11189                            { fidl::ObjectType::EVENT.into_raw() },
11190                            53251,
11191                        >,
11192                        1,
11193                    >,
11194                    1,
11195                >,
11196                fidl::encoding::DefaultFuchsiaResourceDialect,
11197            >(
11198                self.h.as_mut().map(
11199                    <fidl::encoding::Array<
11200                        fidl::encoding::Vector<
11201                            fidl::encoding::HandleType<
11202                                fidl::Event,
11203                                { fidl::ObjectType::EVENT.into_raw() },
11204                                53251,
11205                            >,
11206                            1,
11207                        >,
11208                        1,
11209                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11210                ),
11211                encoder,
11212                offset + cur_offset,
11213                depth,
11214            )?;
11215
11216            _prev_end_offset = cur_offset + envelope_size;
11217
11218            Ok(())
11219        }
11220    }
11221
11222    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11223        for ArrayOfVectorOfEventInTableWithDefaultRights
11224    {
11225        #[inline(always)]
11226        fn new_empty() -> Self {
11227            Self::default()
11228        }
11229
11230        unsafe fn decode(
11231            &mut self,
11232            decoder: &mut fidl::encoding::Decoder<
11233                '_,
11234                fidl::encoding::DefaultFuchsiaResourceDialect,
11235            >,
11236            offset: usize,
11237            mut depth: fidl::encoding::Depth,
11238        ) -> fidl::Result<()> {
11239            decoder.debug_check_bounds::<Self>(offset);
11240            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11241                None => return Err(fidl::Error::NotNullable),
11242                Some(len) => len,
11243            };
11244            // Calling decoder.out_of_line_offset(0) is not allowed.
11245            if len == 0 {
11246                return Ok(());
11247            };
11248            depth.increment()?;
11249            let envelope_size = 8;
11250            let bytes_len = len * envelope_size;
11251            let offset = decoder.out_of_line_offset(bytes_len)?;
11252            // Decode the envelope for each type.
11253            let mut _next_ordinal_to_read = 0;
11254            let mut next_offset = offset;
11255            let end_offset = offset + bytes_len;
11256            _next_ordinal_to_read += 1;
11257            if next_offset >= end_offset {
11258                return Ok(());
11259            }
11260
11261            // Decode unknown envelopes for gaps in ordinals.
11262            while _next_ordinal_to_read < 1 {
11263                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11264                _next_ordinal_to_read += 1;
11265                next_offset += envelope_size;
11266            }
11267
11268            let next_out_of_line = decoder.next_out_of_line();
11269            let handles_before = decoder.remaining_handles();
11270            if let Some((inlined, num_bytes, num_handles)) =
11271                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11272            {
11273                let member_inline_size = <fidl::encoding::Array<
11274                    fidl::encoding::Vector<
11275                        fidl::encoding::HandleType<
11276                            fidl::Event,
11277                            { fidl::ObjectType::EVENT.into_raw() },
11278                            53251,
11279                        >,
11280                        1,
11281                    >,
11282                    1,
11283                > as fidl::encoding::TypeMarker>::inline_size(
11284                    decoder.context
11285                );
11286                if inlined != (member_inline_size <= 4) {
11287                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11288                }
11289                let inner_offset;
11290                let mut inner_depth = depth.clone();
11291                if inlined {
11292                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11293                    inner_offset = next_offset;
11294                } else {
11295                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11296                    inner_depth.increment()?;
11297                }
11298                let val_ref = self.h.get_or_insert_with(|| {
11299                    fidl::new_empty!(
11300                        fidl::encoding::Array<
11301                            fidl::encoding::Vector<
11302                                fidl::encoding::HandleType<
11303                                    fidl::Event,
11304                                    { fidl::ObjectType::EVENT.into_raw() },
11305                                    53251,
11306                                >,
11307                                1,
11308                            >,
11309                            1,
11310                        >,
11311                        fidl::encoding::DefaultFuchsiaResourceDialect
11312                    )
11313                });
11314                fidl::decode!(
11315                    fidl::encoding::Array<
11316                        fidl::encoding::Vector<
11317                            fidl::encoding::HandleType<
11318                                fidl::Event,
11319                                { fidl::ObjectType::EVENT.into_raw() },
11320                                53251,
11321                            >,
11322                            1,
11323                        >,
11324                        1,
11325                    >,
11326                    fidl::encoding::DefaultFuchsiaResourceDialect,
11327                    val_ref,
11328                    decoder,
11329                    inner_offset,
11330                    inner_depth
11331                )?;
11332                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11333                {
11334                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11335                }
11336                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11337                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11338                }
11339            }
11340
11341            next_offset += envelope_size;
11342
11343            // Decode the remaining unknown envelopes.
11344            while next_offset < end_offset {
11345                _next_ordinal_to_read += 1;
11346                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11347                next_offset += envelope_size;
11348            }
11349
11350            Ok(())
11351        }
11352    }
11353
11354    impl ArrayOfVectorOfEventInTableWithReducedRights {
11355        #[inline(always)]
11356        fn max_ordinal_present(&self) -> u64 {
11357            if let Some(_) = self.h {
11358                return 1;
11359            }
11360            0
11361        }
11362    }
11363
11364    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11365        type Borrowed<'a> = &'a mut Self;
11366        fn take_or_borrow<'a>(
11367            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11368        ) -> Self::Borrowed<'a> {
11369            value
11370        }
11371    }
11372
11373    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11374        type Owned = Self;
11375
11376        #[inline(always)]
11377        fn inline_align(_context: fidl::encoding::Context) -> usize {
11378            8
11379        }
11380
11381        #[inline(always)]
11382        fn inline_size(_context: fidl::encoding::Context) -> usize {
11383            16
11384        }
11385    }
11386
11387    unsafe impl
11388        fidl::encoding::Encode<
11389            ArrayOfVectorOfEventInTableWithReducedRights,
11390            fidl::encoding::DefaultFuchsiaResourceDialect,
11391        > for &mut ArrayOfVectorOfEventInTableWithReducedRights
11392    {
11393        unsafe fn encode(
11394            self,
11395            encoder: &mut fidl::encoding::Encoder<
11396                '_,
11397                fidl::encoding::DefaultFuchsiaResourceDialect,
11398            >,
11399            offset: usize,
11400            mut depth: fidl::encoding::Depth,
11401        ) -> fidl::Result<()> {
11402            encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRights>(offset);
11403            // Vector header
11404            let max_ordinal: u64 = self.max_ordinal_present();
11405            encoder.write_num(max_ordinal, offset);
11406            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11407            // Calling encoder.out_of_line_offset(0) is not allowed.
11408            if max_ordinal == 0 {
11409                return Ok(());
11410            }
11411            depth.increment()?;
11412            let envelope_size = 8;
11413            let bytes_len = max_ordinal as usize * envelope_size;
11414            #[allow(unused_variables)]
11415            let offset = encoder.out_of_line_offset(bytes_len);
11416            let mut _prev_end_offset: usize = 0;
11417            if 1 > max_ordinal {
11418                return Ok(());
11419            }
11420
11421            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11422            // are envelope_size bytes.
11423            let cur_offset: usize = (1 - 1) * envelope_size;
11424
11425            // Zero reserved fields.
11426            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11427
11428            // Safety:
11429            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11430            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11431            //   envelope_size bytes, there is always sufficient room.
11432            fidl::encoding::encode_in_envelope_optional::<
11433                fidl::encoding::Array<
11434                    fidl::encoding::Vector<
11435                        fidl::encoding::HandleType<
11436                            fidl::Event,
11437                            { fidl::ObjectType::EVENT.into_raw() },
11438                            49155,
11439                        >,
11440                        1,
11441                    >,
11442                    1,
11443                >,
11444                fidl::encoding::DefaultFuchsiaResourceDialect,
11445            >(
11446                self.h.as_mut().map(
11447                    <fidl::encoding::Array<
11448                        fidl::encoding::Vector<
11449                            fidl::encoding::HandleType<
11450                                fidl::Event,
11451                                { fidl::ObjectType::EVENT.into_raw() },
11452                                49155,
11453                            >,
11454                            1,
11455                        >,
11456                        1,
11457                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11458                ),
11459                encoder,
11460                offset + cur_offset,
11461                depth,
11462            )?;
11463
11464            _prev_end_offset = cur_offset + envelope_size;
11465
11466            Ok(())
11467        }
11468    }
11469
11470    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11471        for ArrayOfVectorOfEventInTableWithReducedRights
11472    {
11473        #[inline(always)]
11474        fn new_empty() -> Self {
11475            Self::default()
11476        }
11477
11478        unsafe fn decode(
11479            &mut self,
11480            decoder: &mut fidl::encoding::Decoder<
11481                '_,
11482                fidl::encoding::DefaultFuchsiaResourceDialect,
11483            >,
11484            offset: usize,
11485            mut depth: fidl::encoding::Depth,
11486        ) -> fidl::Result<()> {
11487            decoder.debug_check_bounds::<Self>(offset);
11488            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11489                None => return Err(fidl::Error::NotNullable),
11490                Some(len) => len,
11491            };
11492            // Calling decoder.out_of_line_offset(0) is not allowed.
11493            if len == 0 {
11494                return Ok(());
11495            };
11496            depth.increment()?;
11497            let envelope_size = 8;
11498            let bytes_len = len * envelope_size;
11499            let offset = decoder.out_of_line_offset(bytes_len)?;
11500            // Decode the envelope for each type.
11501            let mut _next_ordinal_to_read = 0;
11502            let mut next_offset = offset;
11503            let end_offset = offset + bytes_len;
11504            _next_ordinal_to_read += 1;
11505            if next_offset >= end_offset {
11506                return Ok(());
11507            }
11508
11509            // Decode unknown envelopes for gaps in ordinals.
11510            while _next_ordinal_to_read < 1 {
11511                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11512                _next_ordinal_to_read += 1;
11513                next_offset += envelope_size;
11514            }
11515
11516            let next_out_of_line = decoder.next_out_of_line();
11517            let handles_before = decoder.remaining_handles();
11518            if let Some((inlined, num_bytes, num_handles)) =
11519                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11520            {
11521                let member_inline_size = <fidl::encoding::Array<
11522                    fidl::encoding::Vector<
11523                        fidl::encoding::HandleType<
11524                            fidl::Event,
11525                            { fidl::ObjectType::EVENT.into_raw() },
11526                            49155,
11527                        >,
11528                        1,
11529                    >,
11530                    1,
11531                > as fidl::encoding::TypeMarker>::inline_size(
11532                    decoder.context
11533                );
11534                if inlined != (member_inline_size <= 4) {
11535                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11536                }
11537                let inner_offset;
11538                let mut inner_depth = depth.clone();
11539                if inlined {
11540                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11541                    inner_offset = next_offset;
11542                } else {
11543                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11544                    inner_depth.increment()?;
11545                }
11546                let val_ref = self.h.get_or_insert_with(|| {
11547                    fidl::new_empty!(
11548                        fidl::encoding::Array<
11549                            fidl::encoding::Vector<
11550                                fidl::encoding::HandleType<
11551                                    fidl::Event,
11552                                    { fidl::ObjectType::EVENT.into_raw() },
11553                                    49155,
11554                                >,
11555                                1,
11556                            >,
11557                            1,
11558                        >,
11559                        fidl::encoding::DefaultFuchsiaResourceDialect
11560                    )
11561                });
11562                fidl::decode!(
11563                    fidl::encoding::Array<
11564                        fidl::encoding::Vector<
11565                            fidl::encoding::HandleType<
11566                                fidl::Event,
11567                                { fidl::ObjectType::EVENT.into_raw() },
11568                                49155,
11569                            >,
11570                            1,
11571                        >,
11572                        1,
11573                    >,
11574                    fidl::encoding::DefaultFuchsiaResourceDialect,
11575                    val_ref,
11576                    decoder,
11577                    inner_offset,
11578                    inner_depth
11579                )?;
11580                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11581                {
11582                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11583                }
11584                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11585                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11586                }
11587            }
11588
11589            next_offset += envelope_size;
11590
11591            // Decode the remaining unknown envelopes.
11592            while next_offset < end_offset {
11593                _next_ordinal_to_read += 1;
11594                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11595                next_offset += envelope_size;
11596            }
11597
11598            Ok(())
11599        }
11600    }
11601
11602    impl EmptyResourceTable {
11603        #[inline(always)]
11604        fn max_ordinal_present(&self) -> u64 {
11605            0
11606        }
11607    }
11608
11609    impl fidl::encoding::ResourceTypeMarker for EmptyResourceTable {
11610        type Borrowed<'a> = &'a mut Self;
11611        fn take_or_borrow<'a>(
11612            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11613        ) -> Self::Borrowed<'a> {
11614            value
11615        }
11616    }
11617
11618    unsafe impl fidl::encoding::TypeMarker for EmptyResourceTable {
11619        type Owned = Self;
11620
11621        #[inline(always)]
11622        fn inline_align(_context: fidl::encoding::Context) -> usize {
11623            8
11624        }
11625
11626        #[inline(always)]
11627        fn inline_size(_context: fidl::encoding::Context) -> usize {
11628            16
11629        }
11630    }
11631
11632    unsafe impl
11633        fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11634        for &mut EmptyResourceTable
11635    {
11636        unsafe fn encode(
11637            self,
11638            encoder: &mut fidl::encoding::Encoder<
11639                '_,
11640                fidl::encoding::DefaultFuchsiaResourceDialect,
11641            >,
11642            offset: usize,
11643            mut depth: fidl::encoding::Depth,
11644        ) -> fidl::Result<()> {
11645            encoder.debug_check_bounds::<EmptyResourceTable>(offset);
11646            // Vector header
11647            let max_ordinal: u64 = self.max_ordinal_present();
11648            encoder.write_num(max_ordinal, offset);
11649            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11650            // Calling encoder.out_of_line_offset(0) is not allowed.
11651            if max_ordinal == 0 {
11652                return Ok(());
11653            }
11654            depth.increment()?;
11655            let envelope_size = 8;
11656            let bytes_len = max_ordinal as usize * envelope_size;
11657            #[allow(unused_variables)]
11658            let offset = encoder.out_of_line_offset(bytes_len);
11659            let mut _prev_end_offset: usize = 0;
11660
11661            Ok(())
11662        }
11663    }
11664
11665    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11666        for EmptyResourceTable
11667    {
11668        #[inline(always)]
11669        fn new_empty() -> Self {
11670            Self::default()
11671        }
11672
11673        unsafe fn decode(
11674            &mut self,
11675            decoder: &mut fidl::encoding::Decoder<
11676                '_,
11677                fidl::encoding::DefaultFuchsiaResourceDialect,
11678            >,
11679            offset: usize,
11680            mut depth: fidl::encoding::Depth,
11681        ) -> fidl::Result<()> {
11682            decoder.debug_check_bounds::<Self>(offset);
11683            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11684                None => return Err(fidl::Error::NotNullable),
11685                Some(len) => len,
11686            };
11687            // Calling decoder.out_of_line_offset(0) is not allowed.
11688            if len == 0 {
11689                return Ok(());
11690            };
11691            depth.increment()?;
11692            let envelope_size = 8;
11693            let bytes_len = len * envelope_size;
11694            let offset = decoder.out_of_line_offset(bytes_len)?;
11695            // Decode the envelope for each type.
11696            let mut _next_ordinal_to_read = 0;
11697            let mut next_offset = offset;
11698            let end_offset = offset + bytes_len;
11699
11700            // Decode the remaining unknown envelopes.
11701            while next_offset < end_offset {
11702                _next_ordinal_to_read += 1;
11703                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11704                next_offset += envelope_size;
11705            }
11706
11707            Ok(())
11708        }
11709    }
11710
11711    impl SimpleResourceTable {
11712        #[inline(always)]
11713        fn max_ordinal_present(&self) -> u64 {
11714            if let Some(_) = self.y {
11715                return 5;
11716            }
11717            if let Some(_) = self.x {
11718                return 1;
11719            }
11720            0
11721        }
11722    }
11723
11724    impl fidl::encoding::ResourceTypeMarker for SimpleResourceTable {
11725        type Borrowed<'a> = &'a mut Self;
11726        fn take_or_borrow<'a>(
11727            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11728        ) -> Self::Borrowed<'a> {
11729            value
11730        }
11731    }
11732
11733    unsafe impl fidl::encoding::TypeMarker for SimpleResourceTable {
11734        type Owned = Self;
11735
11736        #[inline(always)]
11737        fn inline_align(_context: fidl::encoding::Context) -> usize {
11738            8
11739        }
11740
11741        #[inline(always)]
11742        fn inline_size(_context: fidl::encoding::Context) -> usize {
11743            16
11744        }
11745    }
11746
11747    unsafe impl
11748        fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11749        for &mut SimpleResourceTable
11750    {
11751        unsafe fn encode(
11752            self,
11753            encoder: &mut fidl::encoding::Encoder<
11754                '_,
11755                fidl::encoding::DefaultFuchsiaResourceDialect,
11756            >,
11757            offset: usize,
11758            mut depth: fidl::encoding::Depth,
11759        ) -> fidl::Result<()> {
11760            encoder.debug_check_bounds::<SimpleResourceTable>(offset);
11761            // Vector header
11762            let max_ordinal: u64 = self.max_ordinal_present();
11763            encoder.write_num(max_ordinal, offset);
11764            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11765            // Calling encoder.out_of_line_offset(0) is not allowed.
11766            if max_ordinal == 0 {
11767                return Ok(());
11768            }
11769            depth.increment()?;
11770            let envelope_size = 8;
11771            let bytes_len = max_ordinal as usize * envelope_size;
11772            #[allow(unused_variables)]
11773            let offset = encoder.out_of_line_offset(bytes_len);
11774            let mut _prev_end_offset: usize = 0;
11775            if 1 > max_ordinal {
11776                return Ok(());
11777            }
11778
11779            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11780            // are envelope_size bytes.
11781            let cur_offset: usize = (1 - 1) * envelope_size;
11782
11783            // Zero reserved fields.
11784            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11785
11786            // Safety:
11787            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11788            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11789            //   envelope_size bytes, there is always sufficient room.
11790            fidl::encoding::encode_in_envelope_optional::<
11791                i64,
11792                fidl::encoding::DefaultFuchsiaResourceDialect,
11793            >(
11794                self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11795                encoder,
11796                offset + cur_offset,
11797                depth,
11798            )?;
11799
11800            _prev_end_offset = cur_offset + envelope_size;
11801            if 5 > max_ordinal {
11802                return Ok(());
11803            }
11804
11805            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11806            // are envelope_size bytes.
11807            let cur_offset: usize = (5 - 1) * envelope_size;
11808
11809            // Zero reserved fields.
11810            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11811
11812            // Safety:
11813            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11814            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11815            //   envelope_size bytes, there is always sufficient room.
11816            fidl::encoding::encode_in_envelope_optional::<
11817                i64,
11818                fidl::encoding::DefaultFuchsiaResourceDialect,
11819            >(
11820                self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11821                encoder,
11822                offset + cur_offset,
11823                depth,
11824            )?;
11825
11826            _prev_end_offset = cur_offset + envelope_size;
11827
11828            Ok(())
11829        }
11830    }
11831
11832    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11833        for SimpleResourceTable
11834    {
11835        #[inline(always)]
11836        fn new_empty() -> Self {
11837            Self::default()
11838        }
11839
11840        unsafe fn decode(
11841            &mut self,
11842            decoder: &mut fidl::encoding::Decoder<
11843                '_,
11844                fidl::encoding::DefaultFuchsiaResourceDialect,
11845            >,
11846            offset: usize,
11847            mut depth: fidl::encoding::Depth,
11848        ) -> fidl::Result<()> {
11849            decoder.debug_check_bounds::<Self>(offset);
11850            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11851                None => return Err(fidl::Error::NotNullable),
11852                Some(len) => len,
11853            };
11854            // Calling decoder.out_of_line_offset(0) is not allowed.
11855            if len == 0 {
11856                return Ok(());
11857            };
11858            depth.increment()?;
11859            let envelope_size = 8;
11860            let bytes_len = len * envelope_size;
11861            let offset = decoder.out_of_line_offset(bytes_len)?;
11862            // Decode the envelope for each type.
11863            let mut _next_ordinal_to_read = 0;
11864            let mut next_offset = offset;
11865            let end_offset = offset + bytes_len;
11866            _next_ordinal_to_read += 1;
11867            if next_offset >= end_offset {
11868                return Ok(());
11869            }
11870
11871            // Decode unknown envelopes for gaps in ordinals.
11872            while _next_ordinal_to_read < 1 {
11873                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11874                _next_ordinal_to_read += 1;
11875                next_offset += envelope_size;
11876            }
11877
11878            let next_out_of_line = decoder.next_out_of_line();
11879            let handles_before = decoder.remaining_handles();
11880            if let Some((inlined, num_bytes, num_handles)) =
11881                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11882            {
11883                let member_inline_size =
11884                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11885                if inlined != (member_inline_size <= 4) {
11886                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11887                }
11888                let inner_offset;
11889                let mut inner_depth = depth.clone();
11890                if inlined {
11891                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11892                    inner_offset = next_offset;
11893                } else {
11894                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11895                    inner_depth.increment()?;
11896                }
11897                let val_ref = self.x.get_or_insert_with(|| {
11898                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11899                });
11900                fidl::decode!(
11901                    i64,
11902                    fidl::encoding::DefaultFuchsiaResourceDialect,
11903                    val_ref,
11904                    decoder,
11905                    inner_offset,
11906                    inner_depth
11907                )?;
11908                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11909                {
11910                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11911                }
11912                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11913                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11914                }
11915            }
11916
11917            next_offset += envelope_size;
11918            _next_ordinal_to_read += 1;
11919            if next_offset >= end_offset {
11920                return Ok(());
11921            }
11922
11923            // Decode unknown envelopes for gaps in ordinals.
11924            while _next_ordinal_to_read < 5 {
11925                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11926                _next_ordinal_to_read += 1;
11927                next_offset += envelope_size;
11928            }
11929
11930            let next_out_of_line = decoder.next_out_of_line();
11931            let handles_before = decoder.remaining_handles();
11932            if let Some((inlined, num_bytes, num_handles)) =
11933                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11934            {
11935                let member_inline_size =
11936                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11937                if inlined != (member_inline_size <= 4) {
11938                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11939                }
11940                let inner_offset;
11941                let mut inner_depth = depth.clone();
11942                if inlined {
11943                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11944                    inner_offset = next_offset;
11945                } else {
11946                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11947                    inner_depth.increment()?;
11948                }
11949                let val_ref = self.y.get_or_insert_with(|| {
11950                    fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11951                });
11952                fidl::decode!(
11953                    i64,
11954                    fidl::encoding::DefaultFuchsiaResourceDialect,
11955                    val_ref,
11956                    decoder,
11957                    inner_offset,
11958                    inner_depth
11959                )?;
11960                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11961                {
11962                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11963                }
11964                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11965                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11966                }
11967            }
11968
11969            next_offset += envelope_size;
11970
11971            // Decode the remaining unknown envelopes.
11972            while next_offset < end_offset {
11973                _next_ordinal_to_read += 1;
11974                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11975                next_offset += envelope_size;
11976            }
11977
11978            Ok(())
11979        }
11980    }
11981
11982    impl TableFieldInlinedHandle {
11983        #[inline(always)]
11984        fn max_ordinal_present(&self) -> u64 {
11985            if let Some(_) = self.f {
11986                return 1;
11987            }
11988            0
11989        }
11990    }
11991
11992    impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandle {
11993        type Borrowed<'a> = &'a mut Self;
11994        fn take_or_borrow<'a>(
11995            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11996        ) -> Self::Borrowed<'a> {
11997            value
11998        }
11999    }
12000
12001    unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandle {
12002        type Owned = Self;
12003
12004        #[inline(always)]
12005        fn inline_align(_context: fidl::encoding::Context) -> usize {
12006            8
12007        }
12008
12009        #[inline(always)]
12010        fn inline_size(_context: fidl::encoding::Context) -> usize {
12011            16
12012        }
12013    }
12014
12015    unsafe impl
12016        fidl::encoding::Encode<
12017            TableFieldInlinedHandle,
12018            fidl::encoding::DefaultFuchsiaResourceDialect,
12019        > for &mut TableFieldInlinedHandle
12020    {
12021        unsafe fn encode(
12022            self,
12023            encoder: &mut fidl::encoding::Encoder<
12024                '_,
12025                fidl::encoding::DefaultFuchsiaResourceDialect,
12026            >,
12027            offset: usize,
12028            mut depth: fidl::encoding::Depth,
12029        ) -> fidl::Result<()> {
12030            encoder.debug_check_bounds::<TableFieldInlinedHandle>(offset);
12031            // Vector header
12032            let max_ordinal: u64 = self.max_ordinal_present();
12033            encoder.write_num(max_ordinal, offset);
12034            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12035            // Calling encoder.out_of_line_offset(0) is not allowed.
12036            if max_ordinal == 0 {
12037                return Ok(());
12038            }
12039            depth.increment()?;
12040            let envelope_size = 8;
12041            let bytes_len = max_ordinal as usize * envelope_size;
12042            #[allow(unused_variables)]
12043            let offset = encoder.out_of_line_offset(bytes_len);
12044            let mut _prev_end_offset: usize = 0;
12045            if 1 > max_ordinal {
12046                return Ok(());
12047            }
12048
12049            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12050            // are envelope_size bytes.
12051            let cur_offset: usize = (1 - 1) * envelope_size;
12052
12053            // Zero reserved fields.
12054            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12055
12056            // Safety:
12057            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12058            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12059            //   envelope_size bytes, there is always sufficient room.
12060            fidl::encoding::encode_in_envelope_optional::<
12061                fidl::encoding::HandleType<
12062                    fidl::Channel,
12063                    { fidl::ObjectType::CHANNEL.into_raw() },
12064                    2147483648,
12065                >,
12066                fidl::encoding::DefaultFuchsiaResourceDialect,
12067            >(
12068                self.f.as_mut().map(
12069                    <fidl::encoding::HandleType<
12070                        fidl::Channel,
12071                        { fidl::ObjectType::CHANNEL.into_raw() },
12072                        2147483648,
12073                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12074                ),
12075                encoder,
12076                offset + cur_offset,
12077                depth,
12078            )?;
12079
12080            _prev_end_offset = cur_offset + envelope_size;
12081
12082            Ok(())
12083        }
12084    }
12085
12086    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12087        for TableFieldInlinedHandle
12088    {
12089        #[inline(always)]
12090        fn new_empty() -> Self {
12091            Self::default()
12092        }
12093
12094        unsafe fn decode(
12095            &mut self,
12096            decoder: &mut fidl::encoding::Decoder<
12097                '_,
12098                fidl::encoding::DefaultFuchsiaResourceDialect,
12099            >,
12100            offset: usize,
12101            mut depth: fidl::encoding::Depth,
12102        ) -> fidl::Result<()> {
12103            decoder.debug_check_bounds::<Self>(offset);
12104            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12105                None => return Err(fidl::Error::NotNullable),
12106                Some(len) => len,
12107            };
12108            // Calling decoder.out_of_line_offset(0) is not allowed.
12109            if len == 0 {
12110                return Ok(());
12111            };
12112            depth.increment()?;
12113            let envelope_size = 8;
12114            let bytes_len = len * envelope_size;
12115            let offset = decoder.out_of_line_offset(bytes_len)?;
12116            // Decode the envelope for each type.
12117            let mut _next_ordinal_to_read = 0;
12118            let mut next_offset = offset;
12119            let end_offset = offset + bytes_len;
12120            _next_ordinal_to_read += 1;
12121            if next_offset >= end_offset {
12122                return Ok(());
12123            }
12124
12125            // Decode unknown envelopes for gaps in ordinals.
12126            while _next_ordinal_to_read < 1 {
12127                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12128                _next_ordinal_to_read += 1;
12129                next_offset += envelope_size;
12130            }
12131
12132            let next_out_of_line = decoder.next_out_of_line();
12133            let handles_before = decoder.remaining_handles();
12134            if let Some((inlined, num_bytes, num_handles)) =
12135                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12136            {
12137                let member_inline_size = <fidl::encoding::HandleType<
12138                    fidl::Channel,
12139                    { fidl::ObjectType::CHANNEL.into_raw() },
12140                    2147483648,
12141                > as fidl::encoding::TypeMarker>::inline_size(
12142                    decoder.context
12143                );
12144                if inlined != (member_inline_size <= 4) {
12145                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12146                }
12147                let inner_offset;
12148                let mut inner_depth = depth.clone();
12149                if inlined {
12150                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12151                    inner_offset = next_offset;
12152                } else {
12153                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12154                    inner_depth.increment()?;
12155                }
12156                let val_ref =
12157                self.f.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
12158                fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
12159                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12160                {
12161                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12162                }
12163                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12164                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12165                }
12166            }
12167
12168            next_offset += envelope_size;
12169
12170            // Decode the remaining unknown envelopes.
12171            while next_offset < end_offset {
12172                _next_ordinal_to_read += 1;
12173                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12174                next_offset += envelope_size;
12175            }
12176
12177            Ok(())
12178        }
12179    }
12180
12181    impl TableFieldUnknownResource {
12182        #[inline(always)]
12183        fn max_ordinal_present(&self) -> u64 {
12184            0
12185        }
12186    }
12187
12188    impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResource {
12189        type Borrowed<'a> = &'a mut Self;
12190        fn take_or_borrow<'a>(
12191            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12192        ) -> Self::Borrowed<'a> {
12193            value
12194        }
12195    }
12196
12197    unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResource {
12198        type Owned = Self;
12199
12200        #[inline(always)]
12201        fn inline_align(_context: fidl::encoding::Context) -> usize {
12202            8
12203        }
12204
12205        #[inline(always)]
12206        fn inline_size(_context: fidl::encoding::Context) -> usize {
12207            16
12208        }
12209    }
12210
12211    unsafe impl
12212        fidl::encoding::Encode<
12213            TableFieldUnknownResource,
12214            fidl::encoding::DefaultFuchsiaResourceDialect,
12215        > for &mut TableFieldUnknownResource
12216    {
12217        unsafe fn encode(
12218            self,
12219            encoder: &mut fidl::encoding::Encoder<
12220                '_,
12221                fidl::encoding::DefaultFuchsiaResourceDialect,
12222            >,
12223            offset: usize,
12224            mut depth: fidl::encoding::Depth,
12225        ) -> fidl::Result<()> {
12226            encoder.debug_check_bounds::<TableFieldUnknownResource>(offset);
12227            // Vector header
12228            let max_ordinal: u64 = self.max_ordinal_present();
12229            encoder.write_num(max_ordinal, offset);
12230            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12231            // Calling encoder.out_of_line_offset(0) is not allowed.
12232            if max_ordinal == 0 {
12233                return Ok(());
12234            }
12235            depth.increment()?;
12236            let envelope_size = 8;
12237            let bytes_len = max_ordinal as usize * envelope_size;
12238            #[allow(unused_variables)]
12239            let offset = encoder.out_of_line_offset(bytes_len);
12240            let mut _prev_end_offset: usize = 0;
12241
12242            Ok(())
12243        }
12244    }
12245
12246    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12247        for TableFieldUnknownResource
12248    {
12249        #[inline(always)]
12250        fn new_empty() -> Self {
12251            Self::default()
12252        }
12253
12254        unsafe fn decode(
12255            &mut self,
12256            decoder: &mut fidl::encoding::Decoder<
12257                '_,
12258                fidl::encoding::DefaultFuchsiaResourceDialect,
12259            >,
12260            offset: usize,
12261            mut depth: fidl::encoding::Depth,
12262        ) -> fidl::Result<()> {
12263            decoder.debug_check_bounds::<Self>(offset);
12264            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12265                None => return Err(fidl::Error::NotNullable),
12266                Some(len) => len,
12267            };
12268            // Calling decoder.out_of_line_offset(0) is not allowed.
12269            if len == 0 {
12270                return Ok(());
12271            };
12272            depth.increment()?;
12273            let envelope_size = 8;
12274            let bytes_len = len * envelope_size;
12275            let offset = decoder.out_of_line_offset(bytes_len)?;
12276            // Decode the envelope for each type.
12277            let mut _next_ordinal_to_read = 0;
12278            let mut next_offset = offset;
12279            let end_offset = offset + bytes_len;
12280
12281            // Decode the remaining unknown envelopes.
12282            while next_offset < end_offset {
12283                _next_ordinal_to_read += 1;
12284                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12285                next_offset += envelope_size;
12286            }
12287
12288            Ok(())
12289        }
12290    }
12291
12292    impl TableOfEndpointsTable {
12293        #[inline(always)]
12294        fn max_ordinal_present(&self) -> u64 {
12295            if let Some(_) = self.server_end {
12296                return 2;
12297            }
12298            if let Some(_) = self.client_end {
12299                return 1;
12300            }
12301            0
12302        }
12303    }
12304
12305    impl fidl::encoding::ResourceTypeMarker for TableOfEndpointsTable {
12306        type Borrowed<'a> = &'a mut Self;
12307        fn take_or_borrow<'a>(
12308            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12309        ) -> Self::Borrowed<'a> {
12310            value
12311        }
12312    }
12313
12314    unsafe impl fidl::encoding::TypeMarker for TableOfEndpointsTable {
12315        type Owned = Self;
12316
12317        #[inline(always)]
12318        fn inline_align(_context: fidl::encoding::Context) -> usize {
12319            8
12320        }
12321
12322        #[inline(always)]
12323        fn inline_size(_context: fidl::encoding::Context) -> usize {
12324            16
12325        }
12326    }
12327
12328    unsafe impl
12329        fidl::encoding::Encode<TableOfEndpointsTable, fidl::encoding::DefaultFuchsiaResourceDialect>
12330        for &mut TableOfEndpointsTable
12331    {
12332        unsafe fn encode(
12333            self,
12334            encoder: &mut fidl::encoding::Encoder<
12335                '_,
12336                fidl::encoding::DefaultFuchsiaResourceDialect,
12337            >,
12338            offset: usize,
12339            mut depth: fidl::encoding::Depth,
12340        ) -> fidl::Result<()> {
12341            encoder.debug_check_bounds::<TableOfEndpointsTable>(offset);
12342            // Vector header
12343            let max_ordinal: u64 = self.max_ordinal_present();
12344            encoder.write_num(max_ordinal, offset);
12345            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12346            // Calling encoder.out_of_line_offset(0) is not allowed.
12347            if max_ordinal == 0 {
12348                return Ok(());
12349            }
12350            depth.increment()?;
12351            let envelope_size = 8;
12352            let bytes_len = max_ordinal as usize * envelope_size;
12353            #[allow(unused_variables)]
12354            let offset = encoder.out_of_line_offset(bytes_len);
12355            let mut _prev_end_offset: usize = 0;
12356            if 1 > max_ordinal {
12357                return Ok(());
12358            }
12359
12360            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12361            // are envelope_size bytes.
12362            let cur_offset: usize = (1 - 1) * envelope_size;
12363
12364            // Zero reserved fields.
12365            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12366
12367            // Safety:
12368            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12369            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12370            //   envelope_size bytes, there is always sufficient room.
12371            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12372            self.client_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12373            encoder, offset + cur_offset, depth
12374        )?;
12375
12376            _prev_end_offset = cur_offset + envelope_size;
12377            if 2 > max_ordinal {
12378                return Ok(());
12379            }
12380
12381            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12382            // are envelope_size bytes.
12383            let cur_offset: usize = (2 - 1) * envelope_size;
12384
12385            // Zero reserved fields.
12386            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12387
12388            // Safety:
12389            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12390            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12391            //   envelope_size bytes, there is always sufficient room.
12392            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12393            self.server_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12394            encoder, offset + cur_offset, depth
12395        )?;
12396
12397            _prev_end_offset = cur_offset + envelope_size;
12398
12399            Ok(())
12400        }
12401    }
12402
12403    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12404        for TableOfEndpointsTable
12405    {
12406        #[inline(always)]
12407        fn new_empty() -> Self {
12408            Self::default()
12409        }
12410
12411        unsafe fn decode(
12412            &mut self,
12413            decoder: &mut fidl::encoding::Decoder<
12414                '_,
12415                fidl::encoding::DefaultFuchsiaResourceDialect,
12416            >,
12417            offset: usize,
12418            mut depth: fidl::encoding::Depth,
12419        ) -> fidl::Result<()> {
12420            decoder.debug_check_bounds::<Self>(offset);
12421            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12422                None => return Err(fidl::Error::NotNullable),
12423                Some(len) => len,
12424            };
12425            // Calling decoder.out_of_line_offset(0) is not allowed.
12426            if len == 0 {
12427                return Ok(());
12428            };
12429            depth.increment()?;
12430            let envelope_size = 8;
12431            let bytes_len = len * envelope_size;
12432            let offset = decoder.out_of_line_offset(bytes_len)?;
12433            // Decode the envelope for each type.
12434            let mut _next_ordinal_to_read = 0;
12435            let mut next_offset = offset;
12436            let end_offset = offset + bytes_len;
12437            _next_ordinal_to_read += 1;
12438            if next_offset >= end_offset {
12439                return Ok(());
12440            }
12441
12442            // Decode unknown envelopes for gaps in ordinals.
12443            while _next_ordinal_to_read < 1 {
12444                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12445                _next_ordinal_to_read += 1;
12446                next_offset += envelope_size;
12447            }
12448
12449            let next_out_of_line = decoder.next_out_of_line();
12450            let handles_before = decoder.remaining_handles();
12451            if let Some((inlined, num_bytes, num_handles)) =
12452                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12453            {
12454                let member_inline_size = <fidl::encoding::Endpoint<
12455                    fidl::endpoints::ClientEnd<ProtocolMarker>,
12456                > as fidl::encoding::TypeMarker>::inline_size(
12457                    decoder.context
12458                );
12459                if inlined != (member_inline_size <= 4) {
12460                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12461                }
12462                let inner_offset;
12463                let mut inner_depth = depth.clone();
12464                if inlined {
12465                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12466                    inner_offset = next_offset;
12467                } else {
12468                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12469                    inner_depth.increment()?;
12470                }
12471                let val_ref = self.client_end.get_or_insert_with(|| {
12472                    fidl::new_empty!(
12473                        fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12474                        fidl::encoding::DefaultFuchsiaResourceDialect
12475                    )
12476                });
12477                fidl::decode!(
12478                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12479                    fidl::encoding::DefaultFuchsiaResourceDialect,
12480                    val_ref,
12481                    decoder,
12482                    inner_offset,
12483                    inner_depth
12484                )?;
12485                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12486                {
12487                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12488                }
12489                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12490                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12491                }
12492            }
12493
12494            next_offset += envelope_size;
12495            _next_ordinal_to_read += 1;
12496            if next_offset >= end_offset {
12497                return Ok(());
12498            }
12499
12500            // Decode unknown envelopes for gaps in ordinals.
12501            while _next_ordinal_to_read < 2 {
12502                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12503                _next_ordinal_to_read += 1;
12504                next_offset += envelope_size;
12505            }
12506
12507            let next_out_of_line = decoder.next_out_of_line();
12508            let handles_before = decoder.remaining_handles();
12509            if let Some((inlined, num_bytes, num_handles)) =
12510                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12511            {
12512                let member_inline_size = <fidl::encoding::Endpoint<
12513                    fidl::endpoints::ServerEnd<ProtocolMarker>,
12514                > as fidl::encoding::TypeMarker>::inline_size(
12515                    decoder.context
12516                );
12517                if inlined != (member_inline_size <= 4) {
12518                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12519                }
12520                let inner_offset;
12521                let mut inner_depth = depth.clone();
12522                if inlined {
12523                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12524                    inner_offset = next_offset;
12525                } else {
12526                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12527                    inner_depth.increment()?;
12528                }
12529                let val_ref = self.server_end.get_or_insert_with(|| {
12530                    fidl::new_empty!(
12531                        fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12532                        fidl::encoding::DefaultFuchsiaResourceDialect
12533                    )
12534                });
12535                fidl::decode!(
12536                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12537                    fidl::encoding::DefaultFuchsiaResourceDialect,
12538                    val_ref,
12539                    decoder,
12540                    inner_offset,
12541                    inner_depth
12542                )?;
12543                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12544                {
12545                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12546                }
12547                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12548                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12549                }
12550            }
12551
12552            next_offset += envelope_size;
12553
12554            // Decode the remaining unknown envelopes.
12555            while next_offset < end_offset {
12556                _next_ordinal_to_read += 1;
12557                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12558                next_offset += envelope_size;
12559            }
12560
12561            Ok(())
12562        }
12563    }
12564
12565    impl TableUnionWithVectorReservedSandwich {
12566        #[inline(always)]
12567        fn max_ordinal_present(&self) -> u64 {
12568            if let Some(_) = self.uv {
12569                return 2;
12570            }
12571            0
12572        }
12573    }
12574
12575    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwich {
12576        type Borrowed<'a> = &'a mut Self;
12577        fn take_or_borrow<'a>(
12578            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12579        ) -> Self::Borrowed<'a> {
12580            value
12581        }
12582    }
12583
12584    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwich {
12585        type Owned = Self;
12586
12587        #[inline(always)]
12588        fn inline_align(_context: fidl::encoding::Context) -> usize {
12589            8
12590        }
12591
12592        #[inline(always)]
12593        fn inline_size(_context: fidl::encoding::Context) -> usize {
12594            16
12595        }
12596    }
12597
12598    unsafe impl
12599        fidl::encoding::Encode<
12600            TableUnionWithVectorReservedSandwich,
12601            fidl::encoding::DefaultFuchsiaResourceDialect,
12602        > for &mut TableUnionWithVectorReservedSandwich
12603    {
12604        unsafe fn encode(
12605            self,
12606            encoder: &mut fidl::encoding::Encoder<
12607                '_,
12608                fidl::encoding::DefaultFuchsiaResourceDialect,
12609            >,
12610            offset: usize,
12611            mut depth: fidl::encoding::Depth,
12612        ) -> fidl::Result<()> {
12613            encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwich>(offset);
12614            // Vector header
12615            let max_ordinal: u64 = self.max_ordinal_present();
12616            encoder.write_num(max_ordinal, offset);
12617            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12618            // Calling encoder.out_of_line_offset(0) is not allowed.
12619            if max_ordinal == 0 {
12620                return Ok(());
12621            }
12622            depth.increment()?;
12623            let envelope_size = 8;
12624            let bytes_len = max_ordinal as usize * envelope_size;
12625            #[allow(unused_variables)]
12626            let offset = encoder.out_of_line_offset(bytes_len);
12627            let mut _prev_end_offset: usize = 0;
12628            if 2 > max_ordinal {
12629                return Ok(());
12630            }
12631
12632            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12633            // are envelope_size bytes.
12634            let cur_offset: usize = (2 - 1) * envelope_size;
12635
12636            // Zero reserved fields.
12637            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12638
12639            // Safety:
12640            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12641            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12642            //   envelope_size bytes, there is always sufficient room.
12643            fidl::encoding::encode_in_envelope_optional::<
12644                UnionWithVector,
12645                fidl::encoding::DefaultFuchsiaResourceDialect,
12646            >(
12647                self.uv
12648                    .as_mut()
12649                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12650                encoder,
12651                offset + cur_offset,
12652                depth,
12653            )?;
12654
12655            _prev_end_offset = cur_offset + envelope_size;
12656
12657            Ok(())
12658        }
12659    }
12660
12661    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12662        for TableUnionWithVectorReservedSandwich
12663    {
12664        #[inline(always)]
12665        fn new_empty() -> Self {
12666            Self::default()
12667        }
12668
12669        unsafe fn decode(
12670            &mut self,
12671            decoder: &mut fidl::encoding::Decoder<
12672                '_,
12673                fidl::encoding::DefaultFuchsiaResourceDialect,
12674            >,
12675            offset: usize,
12676            mut depth: fidl::encoding::Depth,
12677        ) -> fidl::Result<()> {
12678            decoder.debug_check_bounds::<Self>(offset);
12679            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12680                None => return Err(fidl::Error::NotNullable),
12681                Some(len) => len,
12682            };
12683            // Calling decoder.out_of_line_offset(0) is not allowed.
12684            if len == 0 {
12685                return Ok(());
12686            };
12687            depth.increment()?;
12688            let envelope_size = 8;
12689            let bytes_len = len * envelope_size;
12690            let offset = decoder.out_of_line_offset(bytes_len)?;
12691            // Decode the envelope for each type.
12692            let mut _next_ordinal_to_read = 0;
12693            let mut next_offset = offset;
12694            let end_offset = offset + bytes_len;
12695            _next_ordinal_to_read += 1;
12696            if next_offset >= end_offset {
12697                return Ok(());
12698            }
12699
12700            // Decode unknown envelopes for gaps in ordinals.
12701            while _next_ordinal_to_read < 2 {
12702                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12703                _next_ordinal_to_read += 1;
12704                next_offset += envelope_size;
12705            }
12706
12707            let next_out_of_line = decoder.next_out_of_line();
12708            let handles_before = decoder.remaining_handles();
12709            if let Some((inlined, num_bytes, num_handles)) =
12710                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12711            {
12712                let member_inline_size =
12713                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12714                if inlined != (member_inline_size <= 4) {
12715                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12716                }
12717                let inner_offset;
12718                let mut inner_depth = depth.clone();
12719                if inlined {
12720                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12721                    inner_offset = next_offset;
12722                } else {
12723                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12724                    inner_depth.increment()?;
12725                }
12726                let val_ref = self.uv.get_or_insert_with(|| {
12727                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12728                });
12729                fidl::decode!(
12730                    UnionWithVector,
12731                    fidl::encoding::DefaultFuchsiaResourceDialect,
12732                    val_ref,
12733                    decoder,
12734                    inner_offset,
12735                    inner_depth
12736                )?;
12737                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12738                {
12739                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12740                }
12741                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12742                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12743                }
12744            }
12745
12746            next_offset += envelope_size;
12747
12748            // Decode the remaining unknown envelopes.
12749            while next_offset < end_offset {
12750                _next_ordinal_to_read += 1;
12751                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12752                next_offset += envelope_size;
12753            }
12754
12755            Ok(())
12756        }
12757    }
12758
12759    impl TableUnionWithVectorStructSandwich {
12760        #[inline(always)]
12761        fn max_ordinal_present(&self) -> u64 {
12762            if let Some(_) = self.s2 {
12763                return 3;
12764            }
12765            if let Some(_) = self.uv {
12766                return 2;
12767            }
12768            if let Some(_) = self.s1 {
12769                return 1;
12770            }
12771            0
12772        }
12773    }
12774
12775    impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwich {
12776        type Borrowed<'a> = &'a mut Self;
12777        fn take_or_borrow<'a>(
12778            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12779        ) -> Self::Borrowed<'a> {
12780            value
12781        }
12782    }
12783
12784    unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwich {
12785        type Owned = Self;
12786
12787        #[inline(always)]
12788        fn inline_align(_context: fidl::encoding::Context) -> usize {
12789            8
12790        }
12791
12792        #[inline(always)]
12793        fn inline_size(_context: fidl::encoding::Context) -> usize {
12794            16
12795        }
12796    }
12797
12798    unsafe impl
12799        fidl::encoding::Encode<
12800            TableUnionWithVectorStructSandwich,
12801            fidl::encoding::DefaultFuchsiaResourceDialect,
12802        > for &mut TableUnionWithVectorStructSandwich
12803    {
12804        unsafe fn encode(
12805            self,
12806            encoder: &mut fidl::encoding::Encoder<
12807                '_,
12808                fidl::encoding::DefaultFuchsiaResourceDialect,
12809            >,
12810            offset: usize,
12811            mut depth: fidl::encoding::Depth,
12812        ) -> fidl::Result<()> {
12813            encoder.debug_check_bounds::<TableUnionWithVectorStructSandwich>(offset);
12814            // Vector header
12815            let max_ordinal: u64 = self.max_ordinal_present();
12816            encoder.write_num(max_ordinal, offset);
12817            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12818            // Calling encoder.out_of_line_offset(0) is not allowed.
12819            if max_ordinal == 0 {
12820                return Ok(());
12821            }
12822            depth.increment()?;
12823            let envelope_size = 8;
12824            let bytes_len = max_ordinal as usize * envelope_size;
12825            #[allow(unused_variables)]
12826            let offset = encoder.out_of_line_offset(bytes_len);
12827            let mut _prev_end_offset: usize = 0;
12828            if 1 > max_ordinal {
12829                return Ok(());
12830            }
12831
12832            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12833            // are envelope_size bytes.
12834            let cur_offset: usize = (1 - 1) * envelope_size;
12835
12836            // Zero reserved fields.
12837            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12838
12839            // Safety:
12840            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12841            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12842            //   envelope_size bytes, there is always sufficient room.
12843            fidl::encoding::encode_in_envelope_optional::<
12844                StructSize3Align1,
12845                fidl::encoding::DefaultFuchsiaResourceDialect,
12846            >(
12847                self.s1
12848                    .as_ref()
12849                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12850                encoder,
12851                offset + cur_offset,
12852                depth,
12853            )?;
12854
12855            _prev_end_offset = cur_offset + envelope_size;
12856            if 2 > max_ordinal {
12857                return Ok(());
12858            }
12859
12860            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12861            // are envelope_size bytes.
12862            let cur_offset: usize = (2 - 1) * envelope_size;
12863
12864            // Zero reserved fields.
12865            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12866
12867            // Safety:
12868            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12869            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12870            //   envelope_size bytes, there is always sufficient room.
12871            fidl::encoding::encode_in_envelope_optional::<
12872                UnionWithVector,
12873                fidl::encoding::DefaultFuchsiaResourceDialect,
12874            >(
12875                self.uv
12876                    .as_mut()
12877                    .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12878                encoder,
12879                offset + cur_offset,
12880                depth,
12881            )?;
12882
12883            _prev_end_offset = cur_offset + envelope_size;
12884            if 3 > max_ordinal {
12885                return Ok(());
12886            }
12887
12888            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12889            // are envelope_size bytes.
12890            let cur_offset: usize = (3 - 1) * envelope_size;
12891
12892            // Zero reserved fields.
12893            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12894
12895            // Safety:
12896            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12897            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12898            //   envelope_size bytes, there is always sufficient room.
12899            fidl::encoding::encode_in_envelope_optional::<
12900                StructSize3Align1,
12901                fidl::encoding::DefaultFuchsiaResourceDialect,
12902            >(
12903                self.s2
12904                    .as_ref()
12905                    .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12906                encoder,
12907                offset + cur_offset,
12908                depth,
12909            )?;
12910
12911            _prev_end_offset = cur_offset + envelope_size;
12912
12913            Ok(())
12914        }
12915    }
12916
12917    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12918        for TableUnionWithVectorStructSandwich
12919    {
12920        #[inline(always)]
12921        fn new_empty() -> Self {
12922            Self::default()
12923        }
12924
12925        unsafe fn decode(
12926            &mut self,
12927            decoder: &mut fidl::encoding::Decoder<
12928                '_,
12929                fidl::encoding::DefaultFuchsiaResourceDialect,
12930            >,
12931            offset: usize,
12932            mut depth: fidl::encoding::Depth,
12933        ) -> fidl::Result<()> {
12934            decoder.debug_check_bounds::<Self>(offset);
12935            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12936                None => return Err(fidl::Error::NotNullable),
12937                Some(len) => len,
12938            };
12939            // Calling decoder.out_of_line_offset(0) is not allowed.
12940            if len == 0 {
12941                return Ok(());
12942            };
12943            depth.increment()?;
12944            let envelope_size = 8;
12945            let bytes_len = len * envelope_size;
12946            let offset = decoder.out_of_line_offset(bytes_len)?;
12947            // Decode the envelope for each type.
12948            let mut _next_ordinal_to_read = 0;
12949            let mut next_offset = offset;
12950            let end_offset = offset + bytes_len;
12951            _next_ordinal_to_read += 1;
12952            if next_offset >= end_offset {
12953                return Ok(());
12954            }
12955
12956            // Decode unknown envelopes for gaps in ordinals.
12957            while _next_ordinal_to_read < 1 {
12958                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12959                _next_ordinal_to_read += 1;
12960                next_offset += envelope_size;
12961            }
12962
12963            let next_out_of_line = decoder.next_out_of_line();
12964            let handles_before = decoder.remaining_handles();
12965            if let Some((inlined, num_bytes, num_handles)) =
12966                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12967            {
12968                let member_inline_size =
12969                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12970                if inlined != (member_inline_size <= 4) {
12971                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12972                }
12973                let inner_offset;
12974                let mut inner_depth = depth.clone();
12975                if inlined {
12976                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12977                    inner_offset = next_offset;
12978                } else {
12979                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12980                    inner_depth.increment()?;
12981                }
12982                let val_ref = self.s1.get_or_insert_with(|| {
12983                    fidl::new_empty!(
12984                        StructSize3Align1,
12985                        fidl::encoding::DefaultFuchsiaResourceDialect
12986                    )
12987                });
12988                fidl::decode!(
12989                    StructSize3Align1,
12990                    fidl::encoding::DefaultFuchsiaResourceDialect,
12991                    val_ref,
12992                    decoder,
12993                    inner_offset,
12994                    inner_depth
12995                )?;
12996                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12997                {
12998                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12999                }
13000                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13001                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13002                }
13003            }
13004
13005            next_offset += envelope_size;
13006            _next_ordinal_to_read += 1;
13007            if next_offset >= end_offset {
13008                return Ok(());
13009            }
13010
13011            // Decode unknown envelopes for gaps in ordinals.
13012            while _next_ordinal_to_read < 2 {
13013                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13014                _next_ordinal_to_read += 1;
13015                next_offset += envelope_size;
13016            }
13017
13018            let next_out_of_line = decoder.next_out_of_line();
13019            let handles_before = decoder.remaining_handles();
13020            if let Some((inlined, num_bytes, num_handles)) =
13021                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13022            {
13023                let member_inline_size =
13024                    <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13025                if inlined != (member_inline_size <= 4) {
13026                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13027                }
13028                let inner_offset;
13029                let mut inner_depth = depth.clone();
13030                if inlined {
13031                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13032                    inner_offset = next_offset;
13033                } else {
13034                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13035                    inner_depth.increment()?;
13036                }
13037                let val_ref = self.uv.get_or_insert_with(|| {
13038                    fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
13039                });
13040                fidl::decode!(
13041                    UnionWithVector,
13042                    fidl::encoding::DefaultFuchsiaResourceDialect,
13043                    val_ref,
13044                    decoder,
13045                    inner_offset,
13046                    inner_depth
13047                )?;
13048                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13049                {
13050                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13051                }
13052                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13053                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13054                }
13055            }
13056
13057            next_offset += envelope_size;
13058            _next_ordinal_to_read += 1;
13059            if next_offset >= end_offset {
13060                return Ok(());
13061            }
13062
13063            // Decode unknown envelopes for gaps in ordinals.
13064            while _next_ordinal_to_read < 3 {
13065                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13066                _next_ordinal_to_read += 1;
13067                next_offset += envelope_size;
13068            }
13069
13070            let next_out_of_line = decoder.next_out_of_line();
13071            let handles_before = decoder.remaining_handles();
13072            if let Some((inlined, num_bytes, num_handles)) =
13073                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13074            {
13075                let member_inline_size =
13076                    <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13077                if inlined != (member_inline_size <= 4) {
13078                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13079                }
13080                let inner_offset;
13081                let mut inner_depth = depth.clone();
13082                if inlined {
13083                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13084                    inner_offset = next_offset;
13085                } else {
13086                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13087                    inner_depth.increment()?;
13088                }
13089                let val_ref = self.s2.get_or_insert_with(|| {
13090                    fidl::new_empty!(
13091                        StructSize3Align1,
13092                        fidl::encoding::DefaultFuchsiaResourceDialect
13093                    )
13094                });
13095                fidl::decode!(
13096                    StructSize3Align1,
13097                    fidl::encoding::DefaultFuchsiaResourceDialect,
13098                    val_ref,
13099                    decoder,
13100                    inner_offset,
13101                    inner_depth
13102                )?;
13103                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13104                {
13105                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13106                }
13107                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13108                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13109                }
13110            }
13111
13112            next_offset += envelope_size;
13113
13114            // Decode the remaining unknown envelopes.
13115            while next_offset < end_offset {
13116                _next_ordinal_to_read += 1;
13117                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13118                next_offset += envelope_size;
13119            }
13120
13121            Ok(())
13122        }
13123    }
13124
13125    impl TableWithUnknownEnvelopesAfterKnownEnvelopes {
13126        #[inline(always)]
13127        fn max_ordinal_present(&self) -> u64 {
13128            if let Some(_) = self.a {
13129                return 1;
13130            }
13131            0
13132        }
13133    }
13134
13135    impl fidl::encoding::ResourceTypeMarker for TableWithUnknownEnvelopesAfterKnownEnvelopes {
13136        type Borrowed<'a> = &'a mut Self;
13137        fn take_or_borrow<'a>(
13138            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13139        ) -> Self::Borrowed<'a> {
13140            value
13141        }
13142    }
13143
13144    unsafe impl fidl::encoding::TypeMarker for TableWithUnknownEnvelopesAfterKnownEnvelopes {
13145        type Owned = Self;
13146
13147        #[inline(always)]
13148        fn inline_align(_context: fidl::encoding::Context) -> usize {
13149            8
13150        }
13151
13152        #[inline(always)]
13153        fn inline_size(_context: fidl::encoding::Context) -> usize {
13154            16
13155        }
13156    }
13157
13158    unsafe impl
13159        fidl::encoding::Encode<
13160            TableWithUnknownEnvelopesAfterKnownEnvelopes,
13161            fidl::encoding::DefaultFuchsiaResourceDialect,
13162        > for &mut TableWithUnknownEnvelopesAfterKnownEnvelopes
13163    {
13164        unsafe fn encode(
13165            self,
13166            encoder: &mut fidl::encoding::Encoder<
13167                '_,
13168                fidl::encoding::DefaultFuchsiaResourceDialect,
13169            >,
13170            offset: usize,
13171            mut depth: fidl::encoding::Depth,
13172        ) -> fidl::Result<()> {
13173            encoder.debug_check_bounds::<TableWithUnknownEnvelopesAfterKnownEnvelopes>(offset);
13174            // Vector header
13175            let max_ordinal: u64 = self.max_ordinal_present();
13176            encoder.write_num(max_ordinal, offset);
13177            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13178            // Calling encoder.out_of_line_offset(0) is not allowed.
13179            if max_ordinal == 0 {
13180                return Ok(());
13181            }
13182            depth.increment()?;
13183            let envelope_size = 8;
13184            let bytes_len = max_ordinal as usize * envelope_size;
13185            #[allow(unused_variables)]
13186            let offset = encoder.out_of_line_offset(bytes_len);
13187            let mut _prev_end_offset: usize = 0;
13188            if 1 > max_ordinal {
13189                return Ok(());
13190            }
13191
13192            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13193            // are envelope_size bytes.
13194            let cur_offset: usize = (1 - 1) * envelope_size;
13195
13196            // Zero reserved fields.
13197            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13198
13199            // Safety:
13200            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13201            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13202            //   envelope_size bytes, there is always sufficient room.
13203            fidl::encoding::encode_in_envelope_optional::<
13204                fidl::encoding::HandleType<
13205                    fidl::Event,
13206                    { fidl::ObjectType::EVENT.into_raw() },
13207                    53251,
13208                >,
13209                fidl::encoding::DefaultFuchsiaResourceDialect,
13210            >(
13211                self.a.as_mut().map(
13212                    <fidl::encoding::HandleType<
13213                        fidl::Event,
13214                        { fidl::ObjectType::EVENT.into_raw() },
13215                        53251,
13216                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
13217                ),
13218                encoder,
13219                offset + cur_offset,
13220                depth,
13221            )?;
13222
13223            _prev_end_offset = cur_offset + envelope_size;
13224
13225            Ok(())
13226        }
13227    }
13228
13229    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13230        for TableWithUnknownEnvelopesAfterKnownEnvelopes
13231    {
13232        #[inline(always)]
13233        fn new_empty() -> Self {
13234            Self::default()
13235        }
13236
13237        unsafe fn decode(
13238            &mut self,
13239            decoder: &mut fidl::encoding::Decoder<
13240                '_,
13241                fidl::encoding::DefaultFuchsiaResourceDialect,
13242            >,
13243            offset: usize,
13244            mut depth: fidl::encoding::Depth,
13245        ) -> fidl::Result<()> {
13246            decoder.debug_check_bounds::<Self>(offset);
13247            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13248                None => return Err(fidl::Error::NotNullable),
13249                Some(len) => len,
13250            };
13251            // Calling decoder.out_of_line_offset(0) is not allowed.
13252            if len == 0 {
13253                return Ok(());
13254            };
13255            depth.increment()?;
13256            let envelope_size = 8;
13257            let bytes_len = len * envelope_size;
13258            let offset = decoder.out_of_line_offset(bytes_len)?;
13259            // Decode the envelope for each type.
13260            let mut _next_ordinal_to_read = 0;
13261            let mut next_offset = offset;
13262            let end_offset = offset + bytes_len;
13263            _next_ordinal_to_read += 1;
13264            if next_offset >= end_offset {
13265                return Ok(());
13266            }
13267
13268            // Decode unknown envelopes for gaps in ordinals.
13269            while _next_ordinal_to_read < 1 {
13270                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13271                _next_ordinal_to_read += 1;
13272                next_offset += envelope_size;
13273            }
13274
13275            let next_out_of_line = decoder.next_out_of_line();
13276            let handles_before = decoder.remaining_handles();
13277            if let Some((inlined, num_bytes, num_handles)) =
13278                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13279            {
13280                let member_inline_size = <fidl::encoding::HandleType<
13281                    fidl::Event,
13282                    { fidl::ObjectType::EVENT.into_raw() },
13283                    53251,
13284                > as fidl::encoding::TypeMarker>::inline_size(
13285                    decoder.context
13286                );
13287                if inlined != (member_inline_size <= 4) {
13288                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13289                }
13290                let inner_offset;
13291                let mut inner_depth = depth.clone();
13292                if inlined {
13293                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13294                    inner_offset = next_offset;
13295                } else {
13296                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13297                    inner_depth.increment()?;
13298                }
13299                let val_ref =
13300                self.a.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect));
13301                fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
13302                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13303                {
13304                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13305                }
13306                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13307                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13308                }
13309            }
13310
13311            next_offset += envelope_size;
13312
13313            // Decode the remaining unknown envelopes.
13314            while next_offset < end_offset {
13315                _next_ordinal_to_read += 1;
13316                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13317                next_offset += envelope_size;
13318            }
13319
13320            Ok(())
13321        }
13322    }
13323
13324    impl TableWithUnknownEnvelopesBeforeKnownEnvelopes {
13325        #[inline(always)]
13326        fn max_ordinal_present(&self) -> u64 {
13327            if let Some(_) = self.b {
13328                return 2;
13329            }
13330            0
13331        }
13332    }
13333
13334    impl fidl::encoding::ResourceTypeMarker for TableWithUnknownEnvelopesBeforeKnownEnvelopes {
13335        type Borrowed<'a> = &'a mut Self;
13336        fn take_or_borrow<'a>(
13337            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13338        ) -> Self::Borrowed<'a> {
13339            value
13340        }
13341    }
13342
13343    unsafe impl fidl::encoding::TypeMarker for TableWithUnknownEnvelopesBeforeKnownEnvelopes {
13344        type Owned = Self;
13345
13346        #[inline(always)]
13347        fn inline_align(_context: fidl::encoding::Context) -> usize {
13348            8
13349        }
13350
13351        #[inline(always)]
13352        fn inline_size(_context: fidl::encoding::Context) -> usize {
13353            16
13354        }
13355    }
13356
13357    unsafe impl
13358        fidl::encoding::Encode<
13359            TableWithUnknownEnvelopesBeforeKnownEnvelopes,
13360            fidl::encoding::DefaultFuchsiaResourceDialect,
13361        > for &mut TableWithUnknownEnvelopesBeforeKnownEnvelopes
13362    {
13363        unsafe fn encode(
13364            self,
13365            encoder: &mut fidl::encoding::Encoder<
13366                '_,
13367                fidl::encoding::DefaultFuchsiaResourceDialect,
13368            >,
13369            offset: usize,
13370            mut depth: fidl::encoding::Depth,
13371        ) -> fidl::Result<()> {
13372            encoder.debug_check_bounds::<TableWithUnknownEnvelopesBeforeKnownEnvelopes>(offset);
13373            // Vector header
13374            let max_ordinal: u64 = self.max_ordinal_present();
13375            encoder.write_num(max_ordinal, offset);
13376            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13377            // Calling encoder.out_of_line_offset(0) is not allowed.
13378            if max_ordinal == 0 {
13379                return Ok(());
13380            }
13381            depth.increment()?;
13382            let envelope_size = 8;
13383            let bytes_len = max_ordinal as usize * envelope_size;
13384            #[allow(unused_variables)]
13385            let offset = encoder.out_of_line_offset(bytes_len);
13386            let mut _prev_end_offset: usize = 0;
13387            if 2 > max_ordinal {
13388                return Ok(());
13389            }
13390
13391            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13392            // are envelope_size bytes.
13393            let cur_offset: usize = (2 - 1) * envelope_size;
13394
13395            // Zero reserved fields.
13396            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13397
13398            // Safety:
13399            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13400            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13401            //   envelope_size bytes, there is always sufficient room.
13402            fidl::encoding::encode_in_envelope_optional::<
13403                fidl::encoding::HandleType<
13404                    fidl::Event,
13405                    { fidl::ObjectType::EVENT.into_raw() },
13406                    53251,
13407                >,
13408                fidl::encoding::DefaultFuchsiaResourceDialect,
13409            >(
13410                self.b.as_mut().map(
13411                    <fidl::encoding::HandleType<
13412                        fidl::Event,
13413                        { fidl::ObjectType::EVENT.into_raw() },
13414                        53251,
13415                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
13416                ),
13417                encoder,
13418                offset + cur_offset,
13419                depth,
13420            )?;
13421
13422            _prev_end_offset = cur_offset + envelope_size;
13423
13424            Ok(())
13425        }
13426    }
13427
13428    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13429        for TableWithUnknownEnvelopesBeforeKnownEnvelopes
13430    {
13431        #[inline(always)]
13432        fn new_empty() -> Self {
13433            Self::default()
13434        }
13435
13436        unsafe fn decode(
13437            &mut self,
13438            decoder: &mut fidl::encoding::Decoder<
13439                '_,
13440                fidl::encoding::DefaultFuchsiaResourceDialect,
13441            >,
13442            offset: usize,
13443            mut depth: fidl::encoding::Depth,
13444        ) -> fidl::Result<()> {
13445            decoder.debug_check_bounds::<Self>(offset);
13446            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13447                None => return Err(fidl::Error::NotNullable),
13448                Some(len) => len,
13449            };
13450            // Calling decoder.out_of_line_offset(0) is not allowed.
13451            if len == 0 {
13452                return Ok(());
13453            };
13454            depth.increment()?;
13455            let envelope_size = 8;
13456            let bytes_len = len * envelope_size;
13457            let offset = decoder.out_of_line_offset(bytes_len)?;
13458            // Decode the envelope for each type.
13459            let mut _next_ordinal_to_read = 0;
13460            let mut next_offset = offset;
13461            let end_offset = offset + bytes_len;
13462            _next_ordinal_to_read += 1;
13463            if next_offset >= end_offset {
13464                return Ok(());
13465            }
13466
13467            // Decode unknown envelopes for gaps in ordinals.
13468            while _next_ordinal_to_read < 2 {
13469                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13470                _next_ordinal_to_read += 1;
13471                next_offset += envelope_size;
13472            }
13473
13474            let next_out_of_line = decoder.next_out_of_line();
13475            let handles_before = decoder.remaining_handles();
13476            if let Some((inlined, num_bytes, num_handles)) =
13477                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13478            {
13479                let member_inline_size = <fidl::encoding::HandleType<
13480                    fidl::Event,
13481                    { fidl::ObjectType::EVENT.into_raw() },
13482                    53251,
13483                > as fidl::encoding::TypeMarker>::inline_size(
13484                    decoder.context
13485                );
13486                if inlined != (member_inline_size <= 4) {
13487                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13488                }
13489                let inner_offset;
13490                let mut inner_depth = depth.clone();
13491                if inlined {
13492                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13493                    inner_offset = next_offset;
13494                } else {
13495                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13496                    inner_depth.increment()?;
13497                }
13498                let val_ref =
13499                self.b.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect));
13500                fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
13501                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13502                {
13503                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13504                }
13505                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13506                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13507                }
13508            }
13509
13510            next_offset += envelope_size;
13511
13512            // Decode the remaining unknown envelopes.
13513            while next_offset < end_offset {
13514                _next_ordinal_to_read += 1;
13515                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13516                next_offset += envelope_size;
13517            }
13518
13519            Ok(())
13520        }
13521    }
13522
13523    impl VectorOfArrayOfEventInTableWithReducedRights {
13524        #[inline(always)]
13525        fn max_ordinal_present(&self) -> u64 {
13526            if let Some(_) = self.h {
13527                return 1;
13528            }
13529            0
13530        }
13531    }
13532
13533    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
13534        type Borrowed<'a> = &'a mut Self;
13535        fn take_or_borrow<'a>(
13536            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13537        ) -> Self::Borrowed<'a> {
13538            value
13539        }
13540    }
13541
13542    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
13543        type Owned = Self;
13544
13545        #[inline(always)]
13546        fn inline_align(_context: fidl::encoding::Context) -> usize {
13547            8
13548        }
13549
13550        #[inline(always)]
13551        fn inline_size(_context: fidl::encoding::Context) -> usize {
13552            16
13553        }
13554    }
13555
13556    unsafe impl
13557        fidl::encoding::Encode<
13558            VectorOfArrayOfEventInTableWithReducedRights,
13559            fidl::encoding::DefaultFuchsiaResourceDialect,
13560        > for &mut VectorOfArrayOfEventInTableWithReducedRights
13561    {
13562        unsafe fn encode(
13563            self,
13564            encoder: &mut fidl::encoding::Encoder<
13565                '_,
13566                fidl::encoding::DefaultFuchsiaResourceDialect,
13567            >,
13568            offset: usize,
13569            mut depth: fidl::encoding::Depth,
13570        ) -> fidl::Result<()> {
13571            encoder.debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRights>(offset);
13572            // Vector header
13573            let max_ordinal: u64 = self.max_ordinal_present();
13574            encoder.write_num(max_ordinal, offset);
13575            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13576            // Calling encoder.out_of_line_offset(0) is not allowed.
13577            if max_ordinal == 0 {
13578                return Ok(());
13579            }
13580            depth.increment()?;
13581            let envelope_size = 8;
13582            let bytes_len = max_ordinal as usize * envelope_size;
13583            #[allow(unused_variables)]
13584            let offset = encoder.out_of_line_offset(bytes_len);
13585            let mut _prev_end_offset: usize = 0;
13586            if 1 > max_ordinal {
13587                return Ok(());
13588            }
13589
13590            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13591            // are envelope_size bytes.
13592            let cur_offset: usize = (1 - 1) * envelope_size;
13593
13594            // Zero reserved fields.
13595            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13596
13597            // Safety:
13598            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13599            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13600            //   envelope_size bytes, there is always sufficient room.
13601            fidl::encoding::encode_in_envelope_optional::<
13602                fidl::encoding::Vector<
13603                    fidl::encoding::Array<
13604                        fidl::encoding::HandleType<
13605                            fidl::Event,
13606                            { fidl::ObjectType::EVENT.into_raw() },
13607                            49155,
13608                        >,
13609                        1,
13610                    >,
13611                    1,
13612                >,
13613                fidl::encoding::DefaultFuchsiaResourceDialect,
13614            >(
13615                self.h.as_mut().map(
13616                    <fidl::encoding::Vector<
13617                        fidl::encoding::Array<
13618                            fidl::encoding::HandleType<
13619                                fidl::Event,
13620                                { fidl::ObjectType::EVENT.into_raw() },
13621                                49155,
13622                            >,
13623                            1,
13624                        >,
13625                        1,
13626                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
13627                ),
13628                encoder,
13629                offset + cur_offset,
13630                depth,
13631            )?;
13632
13633            _prev_end_offset = cur_offset + envelope_size;
13634
13635            Ok(())
13636        }
13637    }
13638
13639    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13640        for VectorOfArrayOfEventInTableWithReducedRights
13641    {
13642        #[inline(always)]
13643        fn new_empty() -> Self {
13644            Self::default()
13645        }
13646
13647        unsafe fn decode(
13648            &mut self,
13649            decoder: &mut fidl::encoding::Decoder<
13650                '_,
13651                fidl::encoding::DefaultFuchsiaResourceDialect,
13652            >,
13653            offset: usize,
13654            mut depth: fidl::encoding::Depth,
13655        ) -> fidl::Result<()> {
13656            decoder.debug_check_bounds::<Self>(offset);
13657            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13658                None => return Err(fidl::Error::NotNullable),
13659                Some(len) => len,
13660            };
13661            // Calling decoder.out_of_line_offset(0) is not allowed.
13662            if len == 0 {
13663                return Ok(());
13664            };
13665            depth.increment()?;
13666            let envelope_size = 8;
13667            let bytes_len = len * envelope_size;
13668            let offset = decoder.out_of_line_offset(bytes_len)?;
13669            // Decode the envelope for each type.
13670            let mut _next_ordinal_to_read = 0;
13671            let mut next_offset = offset;
13672            let end_offset = offset + bytes_len;
13673            _next_ordinal_to_read += 1;
13674            if next_offset >= end_offset {
13675                return Ok(());
13676            }
13677
13678            // Decode unknown envelopes for gaps in ordinals.
13679            while _next_ordinal_to_read < 1 {
13680                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13681                _next_ordinal_to_read += 1;
13682                next_offset += envelope_size;
13683            }
13684
13685            let next_out_of_line = decoder.next_out_of_line();
13686            let handles_before = decoder.remaining_handles();
13687            if let Some((inlined, num_bytes, num_handles)) =
13688                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13689            {
13690                let member_inline_size = <fidl::encoding::Vector<
13691                    fidl::encoding::Array<
13692                        fidl::encoding::HandleType<
13693                            fidl::Event,
13694                            { fidl::ObjectType::EVENT.into_raw() },
13695                            49155,
13696                        >,
13697                        1,
13698                    >,
13699                    1,
13700                > as fidl::encoding::TypeMarker>::inline_size(
13701                    decoder.context
13702                );
13703                if inlined != (member_inline_size <= 4) {
13704                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13705                }
13706                let inner_offset;
13707                let mut inner_depth = depth.clone();
13708                if inlined {
13709                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13710                    inner_offset = next_offset;
13711                } else {
13712                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13713                    inner_depth.increment()?;
13714                }
13715                let val_ref = self.h.get_or_insert_with(|| {
13716                    fidl::new_empty!(
13717                        fidl::encoding::Vector<
13718                            fidl::encoding::Array<
13719                                fidl::encoding::HandleType<
13720                                    fidl::Event,
13721                                    { fidl::ObjectType::EVENT.into_raw() },
13722                                    49155,
13723                                >,
13724                                1,
13725                            >,
13726                            1,
13727                        >,
13728                        fidl::encoding::DefaultFuchsiaResourceDialect
13729                    )
13730                });
13731                fidl::decode!(
13732                    fidl::encoding::Vector<
13733                        fidl::encoding::Array<
13734                            fidl::encoding::HandleType<
13735                                fidl::Event,
13736                                { fidl::ObjectType::EVENT.into_raw() },
13737                                49155,
13738                            >,
13739                            1,
13740                        >,
13741                        1,
13742                    >,
13743                    fidl::encoding::DefaultFuchsiaResourceDialect,
13744                    val_ref,
13745                    decoder,
13746                    inner_offset,
13747                    inner_depth
13748                )?;
13749                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13750                {
13751                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13752                }
13753                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13754                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13755                }
13756            }
13757
13758            next_offset += envelope_size;
13759
13760            // Decode the remaining unknown envelopes.
13761            while next_offset < end_offset {
13762                _next_ordinal_to_read += 1;
13763                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13764                next_offset += envelope_size;
13765            }
13766
13767            Ok(())
13768        }
13769    }
13770
13771    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13772        type Borrowed<'a> = &'a mut Self;
13773        fn take_or_borrow<'a>(
13774            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13775        ) -> Self::Borrowed<'a> {
13776            value
13777        }
13778    }
13779
13780    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13781        type Owned = Self;
13782
13783        #[inline(always)]
13784        fn inline_align(_context: fidl::encoding::Context) -> usize {
13785            8
13786        }
13787
13788        #[inline(always)]
13789        fn inline_size(_context: fidl::encoding::Context) -> usize {
13790            16
13791        }
13792    }
13793
13794    unsafe impl
13795        fidl::encoding::Encode<
13796            ArrayOfVectorOfEventInUnionWithDefaultRights,
13797            fidl::encoding::DefaultFuchsiaResourceDialect,
13798        > for &mut ArrayOfVectorOfEventInUnionWithDefaultRights
13799    {
13800        #[inline]
13801        unsafe fn encode(
13802            self,
13803            encoder: &mut fidl::encoding::Encoder<
13804                '_,
13805                fidl::encoding::DefaultFuchsiaResourceDialect,
13806            >,
13807            offset: usize,
13808            _depth: fidl::encoding::Depth,
13809        ) -> fidl::Result<()> {
13810            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRights>(offset);
13811            encoder.write_num::<u64>(self.ordinal(), offset);
13812            match self {
13813                ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) => {
13814                    fidl::encoding::encode_in_envelope::<
13815                        fidl::encoding::Array<
13816                            fidl::encoding::Vector<
13817                                fidl::encoding::HandleType<
13818                                    fidl::Event,
13819                                    { fidl::ObjectType::EVENT.into_raw() },
13820                                    53251,
13821                                >,
13822                                1,
13823                            >,
13824                            1,
13825                        >,
13826                        fidl::encoding::DefaultFuchsiaResourceDialect,
13827                    >(
13828                        <fidl::encoding::Array<
13829                            fidl::encoding::Vector<
13830                                fidl::encoding::HandleType<
13831                                    fidl::Event,
13832                                    { fidl::ObjectType::EVENT.into_raw() },
13833                                    53251,
13834                                >,
13835                                1,
13836                            >,
13837                            1,
13838                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13839                            val
13840                        ),
13841                        encoder,
13842                        offset + 8,
13843                        _depth,
13844                    )
13845                }
13846            }
13847        }
13848    }
13849
13850    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13851        for ArrayOfVectorOfEventInUnionWithDefaultRights
13852    {
13853        #[inline(always)]
13854        fn new_empty() -> Self {
13855            Self::H(fidl::new_empty!(
13856                fidl::encoding::Array<
13857                    fidl::encoding::Vector<
13858                        fidl::encoding::HandleType<
13859                            fidl::Event,
13860                            { fidl::ObjectType::EVENT.into_raw() },
13861                            53251,
13862                        >,
13863                        1,
13864                    >,
13865                    1,
13866                >,
13867                fidl::encoding::DefaultFuchsiaResourceDialect
13868            ))
13869        }
13870
13871        #[inline]
13872        unsafe fn decode(
13873            &mut self,
13874            decoder: &mut fidl::encoding::Decoder<
13875                '_,
13876                fidl::encoding::DefaultFuchsiaResourceDialect,
13877            >,
13878            offset: usize,
13879            mut depth: fidl::encoding::Depth,
13880        ) -> fidl::Result<()> {
13881            decoder.debug_check_bounds::<Self>(offset);
13882            #[allow(unused_variables)]
13883            let next_out_of_line = decoder.next_out_of_line();
13884            let handles_before = decoder.remaining_handles();
13885            let (ordinal, inlined, num_bytes, num_handles) =
13886                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13887
13888            let member_inline_size = match ordinal {
13889                1 => <fidl::encoding::Array<
13890                    fidl::encoding::Vector<
13891                        fidl::encoding::HandleType<
13892                            fidl::Event,
13893                            { fidl::ObjectType::EVENT.into_raw() },
13894                            53251,
13895                        >,
13896                        1,
13897                    >,
13898                    1,
13899                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13900                _ => return Err(fidl::Error::UnknownUnionTag),
13901            };
13902
13903            if inlined != (member_inline_size <= 4) {
13904                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13905            }
13906            let _inner_offset;
13907            if inlined {
13908                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13909                _inner_offset = offset + 8;
13910            } else {
13911                depth.increment()?;
13912                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13913            }
13914            match ordinal {
13915                1 => {
13916                    #[allow(irrefutable_let_patterns)]
13917                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(_) = self {
13918                        // Do nothing, read the value into the object
13919                    } else {
13920                        // Initialize `self` to the right variant
13921                        *self = ArrayOfVectorOfEventInUnionWithDefaultRights::H(fidl::new_empty!(
13922                            fidl::encoding::Array<
13923                                fidl::encoding::Vector<
13924                                    fidl::encoding::HandleType<
13925                                        fidl::Event,
13926                                        { fidl::ObjectType::EVENT.into_raw() },
13927                                        53251,
13928                                    >,
13929                                    1,
13930                                >,
13931                                1,
13932                            >,
13933                            fidl::encoding::DefaultFuchsiaResourceDialect
13934                        ));
13935                    }
13936                    #[allow(irrefutable_let_patterns)]
13937                    if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) = self {
13938                        fidl::decode!(
13939                            fidl::encoding::Array<
13940                                fidl::encoding::Vector<
13941                                    fidl::encoding::HandleType<
13942                                        fidl::Event,
13943                                        { fidl::ObjectType::EVENT.into_raw() },
13944                                        53251,
13945                                    >,
13946                                    1,
13947                                >,
13948                                1,
13949                            >,
13950                            fidl::encoding::DefaultFuchsiaResourceDialect,
13951                            val,
13952                            decoder,
13953                            _inner_offset,
13954                            depth
13955                        )?;
13956                    } else {
13957                        unreachable!()
13958                    }
13959                }
13960                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13961            }
13962            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13963                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13964            }
13965            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13966                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13967            }
13968            Ok(())
13969        }
13970    }
13971
13972    impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13973        type Borrowed<'a> = &'a mut Self;
13974        fn take_or_borrow<'a>(
13975            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13976        ) -> Self::Borrowed<'a> {
13977            value
13978        }
13979    }
13980
13981    unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13982        type Owned = Self;
13983
13984        #[inline(always)]
13985        fn inline_align(_context: fidl::encoding::Context) -> usize {
13986            8
13987        }
13988
13989        #[inline(always)]
13990        fn inline_size(_context: fidl::encoding::Context) -> usize {
13991            16
13992        }
13993    }
13994
13995    unsafe impl
13996        fidl::encoding::Encode<
13997            ArrayOfVectorOfEventInUnionWithReducedRights,
13998            fidl::encoding::DefaultFuchsiaResourceDialect,
13999        > for &mut ArrayOfVectorOfEventInUnionWithReducedRights
14000    {
14001        #[inline]
14002        unsafe fn encode(
14003            self,
14004            encoder: &mut fidl::encoding::Encoder<
14005                '_,
14006                fidl::encoding::DefaultFuchsiaResourceDialect,
14007            >,
14008            offset: usize,
14009            _depth: fidl::encoding::Depth,
14010        ) -> fidl::Result<()> {
14011            encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRights>(offset);
14012            encoder.write_num::<u64>(self.ordinal(), offset);
14013            match self {
14014                ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) => {
14015                    fidl::encoding::encode_in_envelope::<
14016                        fidl::encoding::Array<
14017                            fidl::encoding::Vector<
14018                                fidl::encoding::HandleType<
14019                                    fidl::Event,
14020                                    { fidl::ObjectType::EVENT.into_raw() },
14021                                    49155,
14022                                >,
14023                                1,
14024                            >,
14025                            1,
14026                        >,
14027                        fidl::encoding::DefaultFuchsiaResourceDialect,
14028                    >(
14029                        <fidl::encoding::Array<
14030                            fidl::encoding::Vector<
14031                                fidl::encoding::HandleType<
14032                                    fidl::Event,
14033                                    { fidl::ObjectType::EVENT.into_raw() },
14034                                    49155,
14035                                >,
14036                                1,
14037                            >,
14038                            1,
14039                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14040                            val
14041                        ),
14042                        encoder,
14043                        offset + 8,
14044                        _depth,
14045                    )
14046                }
14047            }
14048        }
14049    }
14050
14051    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14052        for ArrayOfVectorOfEventInUnionWithReducedRights
14053    {
14054        #[inline(always)]
14055        fn new_empty() -> Self {
14056            Self::H(fidl::new_empty!(
14057                fidl::encoding::Array<
14058                    fidl::encoding::Vector<
14059                        fidl::encoding::HandleType<
14060                            fidl::Event,
14061                            { fidl::ObjectType::EVENT.into_raw() },
14062                            49155,
14063                        >,
14064                        1,
14065                    >,
14066                    1,
14067                >,
14068                fidl::encoding::DefaultFuchsiaResourceDialect
14069            ))
14070        }
14071
14072        #[inline]
14073        unsafe fn decode(
14074            &mut self,
14075            decoder: &mut fidl::encoding::Decoder<
14076                '_,
14077                fidl::encoding::DefaultFuchsiaResourceDialect,
14078            >,
14079            offset: usize,
14080            mut depth: fidl::encoding::Depth,
14081        ) -> fidl::Result<()> {
14082            decoder.debug_check_bounds::<Self>(offset);
14083            #[allow(unused_variables)]
14084            let next_out_of_line = decoder.next_out_of_line();
14085            let handles_before = decoder.remaining_handles();
14086            let (ordinal, inlined, num_bytes, num_handles) =
14087                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14088
14089            let member_inline_size = match ordinal {
14090                1 => <fidl::encoding::Array<
14091                    fidl::encoding::Vector<
14092                        fidl::encoding::HandleType<
14093                            fidl::Event,
14094                            { fidl::ObjectType::EVENT.into_raw() },
14095                            49155,
14096                        >,
14097                        1,
14098                    >,
14099                    1,
14100                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14101                _ => return Err(fidl::Error::UnknownUnionTag),
14102            };
14103
14104            if inlined != (member_inline_size <= 4) {
14105                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14106            }
14107            let _inner_offset;
14108            if inlined {
14109                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14110                _inner_offset = offset + 8;
14111            } else {
14112                depth.increment()?;
14113                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14114            }
14115            match ordinal {
14116                1 => {
14117                    #[allow(irrefutable_let_patterns)]
14118                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(_) = self {
14119                        // Do nothing, read the value into the object
14120                    } else {
14121                        // Initialize `self` to the right variant
14122                        *self = ArrayOfVectorOfEventInUnionWithReducedRights::H(fidl::new_empty!(
14123                            fidl::encoding::Array<
14124                                fidl::encoding::Vector<
14125                                    fidl::encoding::HandleType<
14126                                        fidl::Event,
14127                                        { fidl::ObjectType::EVENT.into_raw() },
14128                                        49155,
14129                                    >,
14130                                    1,
14131                                >,
14132                                1,
14133                            >,
14134                            fidl::encoding::DefaultFuchsiaResourceDialect
14135                        ));
14136                    }
14137                    #[allow(irrefutable_let_patterns)]
14138                    if let ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) = self {
14139                        fidl::decode!(
14140                            fidl::encoding::Array<
14141                                fidl::encoding::Vector<
14142                                    fidl::encoding::HandleType<
14143                                        fidl::Event,
14144                                        { fidl::ObjectType::EVENT.into_raw() },
14145                                        49155,
14146                                    >,
14147                                    1,
14148                                >,
14149                                1,
14150                            >,
14151                            fidl::encoding::DefaultFuchsiaResourceDialect,
14152                            val,
14153                            decoder,
14154                            _inner_offset,
14155                            depth
14156                        )?;
14157                    } else {
14158                        unreachable!()
14159                    }
14160                }
14161                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14162            }
14163            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14164                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14165            }
14166            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14167                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14168            }
14169            Ok(())
14170        }
14171    }
14172
14173    impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnion {
14174        type Borrowed<'a> = &'a mut Self;
14175        fn take_or_borrow<'a>(
14176            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14177        ) -> Self::Borrowed<'a> {
14178            value
14179        }
14180    }
14181
14182    unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnion {
14183        type Owned = Self;
14184
14185        #[inline(always)]
14186        fn inline_align(_context: fidl::encoding::Context) -> usize {
14187            8
14188        }
14189
14190        #[inline(always)]
14191        fn inline_size(_context: fidl::encoding::Context) -> usize {
14192            16
14193        }
14194    }
14195
14196    unsafe impl
14197        fidl::encoding::Encode<
14198            EnvelopeInliningTestUnion,
14199            fidl::encoding::DefaultFuchsiaResourceDialect,
14200        > for &mut EnvelopeInliningTestUnion
14201    {
14202        #[inline]
14203        unsafe fn encode(
14204            self,
14205            encoder: &mut fidl::encoding::Encoder<
14206                '_,
14207                fidl::encoding::DefaultFuchsiaResourceDialect,
14208            >,
14209            offset: usize,
14210            _depth: fidl::encoding::Depth,
14211        ) -> fidl::Result<()> {
14212            encoder.debug_check_bounds::<EnvelopeInliningTestUnion>(offset);
14213            encoder.write_num::<u64>(self.ordinal(), offset);
14214            match self {
14215                EnvelopeInliningTestUnion::Small(ref val) => fidl::encoding::encode_in_envelope::<
14216                    u32,
14217                    fidl::encoding::DefaultFuchsiaResourceDialect,
14218                >(
14219                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
14220                    encoder,
14221                    offset + 8,
14222                    _depth,
14223                ),
14224                EnvelopeInliningTestUnion::Large(ref val) => fidl::encoding::encode_in_envelope::<
14225                    u64,
14226                    fidl::encoding::DefaultFuchsiaResourceDialect,
14227                >(
14228                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
14229                    encoder,
14230                    offset + 8,
14231                    _depth,
14232                ),
14233                EnvelopeInliningTestUnion::Handle(ref mut val) => {
14234                    fidl::encoding::encode_in_envelope::<
14235                        fidl::encoding::HandleType<
14236                            fidl::NullableHandle,
14237                            { fidl::ObjectType::NONE.into_raw() },
14238                            2147483648,
14239                        >,
14240                        fidl::encoding::DefaultFuchsiaResourceDialect,
14241                    >(
14242                        <fidl::encoding::HandleType<
14243                            fidl::NullableHandle,
14244                            { fidl::ObjectType::NONE.into_raw() },
14245                            2147483648,
14246                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14247                            val
14248                        ),
14249                        encoder,
14250                        offset + 8,
14251                        _depth,
14252                    )
14253                }
14254                EnvelopeInliningTestUnion::__SourceBreaking { .. } => {
14255                    Err(fidl::Error::UnknownUnionTag)
14256                }
14257            }
14258        }
14259    }
14260
14261    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14262        for EnvelopeInliningTestUnion
14263    {
14264        #[inline(always)]
14265        fn new_empty() -> Self {
14266            Self::__SourceBreaking { unknown_ordinal: 0 }
14267        }
14268
14269        #[inline]
14270        unsafe fn decode(
14271            &mut self,
14272            decoder: &mut fidl::encoding::Decoder<
14273                '_,
14274                fidl::encoding::DefaultFuchsiaResourceDialect,
14275            >,
14276            offset: usize,
14277            mut depth: fidl::encoding::Depth,
14278        ) -> fidl::Result<()> {
14279            decoder.debug_check_bounds::<Self>(offset);
14280            #[allow(unused_variables)]
14281            let next_out_of_line = decoder.next_out_of_line();
14282            let handles_before = decoder.remaining_handles();
14283            let (ordinal, inlined, num_bytes, num_handles) =
14284                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14285
14286            let member_inline_size = match ordinal {
14287                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14288                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14289                3 => <fidl::encoding::HandleType<
14290                    fidl::NullableHandle,
14291                    { fidl::ObjectType::NONE.into_raw() },
14292                    2147483648,
14293                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14294                0 => return Err(fidl::Error::UnknownUnionTag),
14295                _ => num_bytes as usize,
14296            };
14297
14298            if inlined != (member_inline_size <= 4) {
14299                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14300            }
14301            let _inner_offset;
14302            if inlined {
14303                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14304                _inner_offset = offset + 8;
14305            } else {
14306                depth.increment()?;
14307                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14308            }
14309            match ordinal {
14310                1 => {
14311                    #[allow(irrefutable_let_patterns)]
14312                    if let EnvelopeInliningTestUnion::Small(_) = self {
14313                        // Do nothing, read the value into the object
14314                    } else {
14315                        // Initialize `self` to the right variant
14316                        *self = EnvelopeInliningTestUnion::Small(fidl::new_empty!(
14317                            u32,
14318                            fidl::encoding::DefaultFuchsiaResourceDialect
14319                        ));
14320                    }
14321                    #[allow(irrefutable_let_patterns)]
14322                    if let EnvelopeInliningTestUnion::Small(ref mut val) = self {
14323                        fidl::decode!(
14324                            u32,
14325                            fidl::encoding::DefaultFuchsiaResourceDialect,
14326                            val,
14327                            decoder,
14328                            _inner_offset,
14329                            depth
14330                        )?;
14331                    } else {
14332                        unreachable!()
14333                    }
14334                }
14335                2 => {
14336                    #[allow(irrefutable_let_patterns)]
14337                    if let EnvelopeInliningTestUnion::Large(_) = self {
14338                        // Do nothing, read the value into the object
14339                    } else {
14340                        // Initialize `self` to the right variant
14341                        *self = EnvelopeInliningTestUnion::Large(fidl::new_empty!(
14342                            u64,
14343                            fidl::encoding::DefaultFuchsiaResourceDialect
14344                        ));
14345                    }
14346                    #[allow(irrefutable_let_patterns)]
14347                    if let EnvelopeInliningTestUnion::Large(ref mut val) = self {
14348                        fidl::decode!(
14349                            u64,
14350                            fidl::encoding::DefaultFuchsiaResourceDialect,
14351                            val,
14352                            decoder,
14353                            _inner_offset,
14354                            depth
14355                        )?;
14356                    } else {
14357                        unreachable!()
14358                    }
14359                }
14360                3 => {
14361                    #[allow(irrefutable_let_patterns)]
14362                    if let EnvelopeInliningTestUnion::Handle(_) = self {
14363                        // Do nothing, read the value into the object
14364                    } else {
14365                        // Initialize `self` to the right variant
14366                        *self = EnvelopeInliningTestUnion::Handle(
14367                            fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14368                        );
14369                    }
14370                    #[allow(irrefutable_let_patterns)]
14371                    if let EnvelopeInliningTestUnion::Handle(ref mut val) = self {
14372                        fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14373                    } else {
14374                        unreachable!()
14375                    }
14376                }
14377                #[allow(deprecated)]
14378                ordinal => {
14379                    for _ in 0..num_handles {
14380                        decoder.drop_next_handle()?;
14381                    }
14382                    *self =
14383                        EnvelopeInliningTestUnion::__SourceBreaking { unknown_ordinal: ordinal };
14384                }
14385            }
14386            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14387                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14388            }
14389            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14390                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14391            }
14392            Ok(())
14393        }
14394    }
14395
14396    impl fidl::encoding::ResourceTypeMarker for SampleResourceXUnion {
14397        type Borrowed<'a> = &'a mut Self;
14398        fn take_or_borrow<'a>(
14399            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14400        ) -> Self::Borrowed<'a> {
14401            value
14402        }
14403    }
14404
14405    unsafe impl fidl::encoding::TypeMarker for SampleResourceXUnion {
14406        type Owned = Self;
14407
14408        #[inline(always)]
14409        fn inline_align(_context: fidl::encoding::Context) -> usize {
14410            8
14411        }
14412
14413        #[inline(always)]
14414        fn inline_size(_context: fidl::encoding::Context) -> usize {
14415            16
14416        }
14417    }
14418
14419    unsafe impl
14420        fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14421        for &mut SampleResourceXUnion
14422    {
14423        #[inline]
14424        unsafe fn encode(
14425            self,
14426            encoder: &mut fidl::encoding::Encoder<
14427                '_,
14428                fidl::encoding::DefaultFuchsiaResourceDialect,
14429            >,
14430            offset: usize,
14431            _depth: fidl::encoding::Depth,
14432        ) -> fidl::Result<()> {
14433            encoder.debug_check_bounds::<SampleResourceXUnion>(offset);
14434            encoder.write_num::<u64>(self.ordinal(), offset);
14435            match self {
14436                SampleResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
14437                    u32,
14438                    fidl::encoding::DefaultFuchsiaResourceDialect,
14439                >(
14440                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
14441                    encoder,
14442                    offset + 8,
14443                    _depth,
14444                ),
14445                SampleResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
14446                    SimpleUnion,
14447                    fidl::encoding::DefaultFuchsiaResourceDialect,
14448                >(
14449                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
14450                    encoder,
14451                    offset + 8,
14452                    _depth,
14453                ),
14454                SampleResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
14455                    SimpleTable,
14456                    fidl::encoding::DefaultFuchsiaResourceDialect,
14457                >(
14458                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
14459                    encoder,
14460                    offset + 8,
14461                    _depth,
14462                ),
14463                SampleResourceXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14464            }
14465        }
14466    }
14467
14468    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14469        for SampleResourceXUnion
14470    {
14471        #[inline(always)]
14472        fn new_empty() -> Self {
14473            Self::__SourceBreaking { unknown_ordinal: 0 }
14474        }
14475
14476        #[inline]
14477        unsafe fn decode(
14478            &mut self,
14479            decoder: &mut fidl::encoding::Decoder<
14480                '_,
14481                fidl::encoding::DefaultFuchsiaResourceDialect,
14482            >,
14483            offset: usize,
14484            mut depth: fidl::encoding::Depth,
14485        ) -> fidl::Result<()> {
14486            decoder.debug_check_bounds::<Self>(offset);
14487            #[allow(unused_variables)]
14488            let next_out_of_line = decoder.next_out_of_line();
14489            let handles_before = decoder.remaining_handles();
14490            let (ordinal, inlined, num_bytes, num_handles) =
14491                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14492
14493            let member_inline_size = match ordinal {
14494                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14495                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14496                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14497                0 => return Err(fidl::Error::UnknownUnionTag),
14498                _ => num_bytes as usize,
14499            };
14500
14501            if inlined != (member_inline_size <= 4) {
14502                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14503            }
14504            let _inner_offset;
14505            if inlined {
14506                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14507                _inner_offset = offset + 8;
14508            } else {
14509                depth.increment()?;
14510                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14511            }
14512            match ordinal {
14513                1 => {
14514                    #[allow(irrefutable_let_patterns)]
14515                    if let SampleResourceXUnion::U(_) = self {
14516                        // Do nothing, read the value into the object
14517                    } else {
14518                        // Initialize `self` to the right variant
14519                        *self = SampleResourceXUnion::U(fidl::new_empty!(
14520                            u32,
14521                            fidl::encoding::DefaultFuchsiaResourceDialect
14522                        ));
14523                    }
14524                    #[allow(irrefutable_let_patterns)]
14525                    if let SampleResourceXUnion::U(ref mut val) = self {
14526                        fidl::decode!(
14527                            u32,
14528                            fidl::encoding::DefaultFuchsiaResourceDialect,
14529                            val,
14530                            decoder,
14531                            _inner_offset,
14532                            depth
14533                        )?;
14534                    } else {
14535                        unreachable!()
14536                    }
14537                }
14538                2 => {
14539                    #[allow(irrefutable_let_patterns)]
14540                    if let SampleResourceXUnion::Su(_) = self {
14541                        // Do nothing, read the value into the object
14542                    } else {
14543                        // Initialize `self` to the right variant
14544                        *self = SampleResourceXUnion::Su(fidl::new_empty!(
14545                            SimpleUnion,
14546                            fidl::encoding::DefaultFuchsiaResourceDialect
14547                        ));
14548                    }
14549                    #[allow(irrefutable_let_patterns)]
14550                    if let SampleResourceXUnion::Su(ref mut val) = self {
14551                        fidl::decode!(
14552                            SimpleUnion,
14553                            fidl::encoding::DefaultFuchsiaResourceDialect,
14554                            val,
14555                            decoder,
14556                            _inner_offset,
14557                            depth
14558                        )?;
14559                    } else {
14560                        unreachable!()
14561                    }
14562                }
14563                3 => {
14564                    #[allow(irrefutable_let_patterns)]
14565                    if let SampleResourceXUnion::St(_) = self {
14566                        // Do nothing, read the value into the object
14567                    } else {
14568                        // Initialize `self` to the right variant
14569                        *self = SampleResourceXUnion::St(fidl::new_empty!(
14570                            SimpleTable,
14571                            fidl::encoding::DefaultFuchsiaResourceDialect
14572                        ));
14573                    }
14574                    #[allow(irrefutable_let_patterns)]
14575                    if let SampleResourceXUnion::St(ref mut val) = self {
14576                        fidl::decode!(
14577                            SimpleTable,
14578                            fidl::encoding::DefaultFuchsiaResourceDialect,
14579                            val,
14580                            decoder,
14581                            _inner_offset,
14582                            depth
14583                        )?;
14584                    } else {
14585                        unreachable!()
14586                    }
14587                }
14588                #[allow(deprecated)]
14589                ordinal => {
14590                    for _ in 0..num_handles {
14591                        decoder.drop_next_handle()?;
14592                    }
14593                    *self = SampleResourceXUnion::__SourceBreaking { unknown_ordinal: ordinal };
14594                }
14595            }
14596            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14597                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14598            }
14599            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14600                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14601            }
14602            Ok(())
14603        }
14604    }
14605
14606    impl fidl::encoding::ResourceTypeMarker for SampleStrictResourceXUnion {
14607        type Borrowed<'a> = &'a mut Self;
14608        fn take_or_borrow<'a>(
14609            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14610        ) -> Self::Borrowed<'a> {
14611            value
14612        }
14613    }
14614
14615    unsafe impl fidl::encoding::TypeMarker for SampleStrictResourceXUnion {
14616        type Owned = Self;
14617
14618        #[inline(always)]
14619        fn inline_align(_context: fidl::encoding::Context) -> usize {
14620            8
14621        }
14622
14623        #[inline(always)]
14624        fn inline_size(_context: fidl::encoding::Context) -> usize {
14625            16
14626        }
14627    }
14628
14629    unsafe impl
14630        fidl::encoding::Encode<
14631            SampleStrictResourceXUnion,
14632            fidl::encoding::DefaultFuchsiaResourceDialect,
14633        > for &mut SampleStrictResourceXUnion
14634    {
14635        #[inline]
14636        unsafe fn encode(
14637            self,
14638            encoder: &mut fidl::encoding::Encoder<
14639                '_,
14640                fidl::encoding::DefaultFuchsiaResourceDialect,
14641            >,
14642            offset: usize,
14643            _depth: fidl::encoding::Depth,
14644        ) -> fidl::Result<()> {
14645            encoder.debug_check_bounds::<SampleStrictResourceXUnion>(offset);
14646            encoder.write_num::<u64>(self.ordinal(), offset);
14647            match self {
14648                SampleStrictResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
14649                    u32,
14650                    fidl::encoding::DefaultFuchsiaResourceDialect,
14651                >(
14652                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
14653                    encoder,
14654                    offset + 8,
14655                    _depth,
14656                ),
14657                SampleStrictResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
14658                    SimpleUnion,
14659                    fidl::encoding::DefaultFuchsiaResourceDialect,
14660                >(
14661                    <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
14662                    encoder,
14663                    offset + 8,
14664                    _depth,
14665                ),
14666                SampleStrictResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
14667                    SimpleTable,
14668                    fidl::encoding::DefaultFuchsiaResourceDialect,
14669                >(
14670                    <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
14671                    encoder,
14672                    offset + 8,
14673                    _depth,
14674                ),
14675            }
14676        }
14677    }
14678
14679    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14680        for SampleStrictResourceXUnion
14681    {
14682        #[inline(always)]
14683        fn new_empty() -> Self {
14684            Self::U(fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect))
14685        }
14686
14687        #[inline]
14688        unsafe fn decode(
14689            &mut self,
14690            decoder: &mut fidl::encoding::Decoder<
14691                '_,
14692                fidl::encoding::DefaultFuchsiaResourceDialect,
14693            >,
14694            offset: usize,
14695            mut depth: fidl::encoding::Depth,
14696        ) -> fidl::Result<()> {
14697            decoder.debug_check_bounds::<Self>(offset);
14698            #[allow(unused_variables)]
14699            let next_out_of_line = decoder.next_out_of_line();
14700            let handles_before = decoder.remaining_handles();
14701            let (ordinal, inlined, num_bytes, num_handles) =
14702                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14703
14704            let member_inline_size = match ordinal {
14705                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14706                2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14707                3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14708                _ => return Err(fidl::Error::UnknownUnionTag),
14709            };
14710
14711            if inlined != (member_inline_size <= 4) {
14712                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14713            }
14714            let _inner_offset;
14715            if inlined {
14716                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14717                _inner_offset = offset + 8;
14718            } else {
14719                depth.increment()?;
14720                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14721            }
14722            match ordinal {
14723                1 => {
14724                    #[allow(irrefutable_let_patterns)]
14725                    if let SampleStrictResourceXUnion::U(_) = self {
14726                        // Do nothing, read the value into the object
14727                    } else {
14728                        // Initialize `self` to the right variant
14729                        *self = SampleStrictResourceXUnion::U(fidl::new_empty!(
14730                            u32,
14731                            fidl::encoding::DefaultFuchsiaResourceDialect
14732                        ));
14733                    }
14734                    #[allow(irrefutable_let_patterns)]
14735                    if let SampleStrictResourceXUnion::U(ref mut val) = self {
14736                        fidl::decode!(
14737                            u32,
14738                            fidl::encoding::DefaultFuchsiaResourceDialect,
14739                            val,
14740                            decoder,
14741                            _inner_offset,
14742                            depth
14743                        )?;
14744                    } else {
14745                        unreachable!()
14746                    }
14747                }
14748                2 => {
14749                    #[allow(irrefutable_let_patterns)]
14750                    if let SampleStrictResourceXUnion::Su(_) = self {
14751                        // Do nothing, read the value into the object
14752                    } else {
14753                        // Initialize `self` to the right variant
14754                        *self = SampleStrictResourceXUnion::Su(fidl::new_empty!(
14755                            SimpleUnion,
14756                            fidl::encoding::DefaultFuchsiaResourceDialect
14757                        ));
14758                    }
14759                    #[allow(irrefutable_let_patterns)]
14760                    if let SampleStrictResourceXUnion::Su(ref mut val) = self {
14761                        fidl::decode!(
14762                            SimpleUnion,
14763                            fidl::encoding::DefaultFuchsiaResourceDialect,
14764                            val,
14765                            decoder,
14766                            _inner_offset,
14767                            depth
14768                        )?;
14769                    } else {
14770                        unreachable!()
14771                    }
14772                }
14773                3 => {
14774                    #[allow(irrefutable_let_patterns)]
14775                    if let SampleStrictResourceXUnion::St(_) = self {
14776                        // Do nothing, read the value into the object
14777                    } else {
14778                        // Initialize `self` to the right variant
14779                        *self = SampleStrictResourceXUnion::St(fidl::new_empty!(
14780                            SimpleTable,
14781                            fidl::encoding::DefaultFuchsiaResourceDialect
14782                        ));
14783                    }
14784                    #[allow(irrefutable_let_patterns)]
14785                    if let SampleStrictResourceXUnion::St(ref mut val) = self {
14786                        fidl::decode!(
14787                            SimpleTable,
14788                            fidl::encoding::DefaultFuchsiaResourceDialect,
14789                            val,
14790                            decoder,
14791                            _inner_offset,
14792                            depth
14793                        )?;
14794                    } else {
14795                        unreachable!()
14796                    }
14797                }
14798                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14799            }
14800            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14801                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14802            }
14803            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14804                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14805            }
14806            Ok(())
14807        }
14808    }
14809
14810    impl fidl::encoding::ResourceTypeMarker for UnionOfEndpointsUnion {
14811        type Borrowed<'a> = &'a mut Self;
14812        fn take_or_borrow<'a>(
14813            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14814        ) -> Self::Borrowed<'a> {
14815            value
14816        }
14817    }
14818
14819    unsafe impl fidl::encoding::TypeMarker for UnionOfEndpointsUnion {
14820        type Owned = Self;
14821
14822        #[inline(always)]
14823        fn inline_align(_context: fidl::encoding::Context) -> usize {
14824            8
14825        }
14826
14827        #[inline(always)]
14828        fn inline_size(_context: fidl::encoding::Context) -> usize {
14829            16
14830        }
14831    }
14832
14833    unsafe impl
14834        fidl::encoding::Encode<UnionOfEndpointsUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14835        for &mut UnionOfEndpointsUnion
14836    {
14837        #[inline]
14838        unsafe fn encode(
14839            self,
14840            encoder: &mut fidl::encoding::Encoder<
14841                '_,
14842                fidl::encoding::DefaultFuchsiaResourceDialect,
14843            >,
14844            offset: usize,
14845            _depth: fidl::encoding::Depth,
14846        ) -> fidl::Result<()> {
14847            encoder.debug_check_bounds::<UnionOfEndpointsUnion>(offset);
14848            encoder.write_num::<u64>(self.ordinal(), offset);
14849            match self {
14850            UnionOfEndpointsUnion::ClientEnd(ref mut val) => {
14851                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14852                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14853                    encoder, offset + 8, _depth
14854                )
14855            }
14856            UnionOfEndpointsUnion::ServerEnd(ref mut val) => {
14857                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14858                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14859                    encoder, offset + 8, _depth
14860                )
14861            }
14862            UnionOfEndpointsUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14863        }
14864        }
14865    }
14866
14867    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14868        for UnionOfEndpointsUnion
14869    {
14870        #[inline(always)]
14871        fn new_empty() -> Self {
14872            Self::__SourceBreaking { unknown_ordinal: 0 }
14873        }
14874
14875        #[inline]
14876        unsafe fn decode(
14877            &mut self,
14878            decoder: &mut fidl::encoding::Decoder<
14879                '_,
14880                fidl::encoding::DefaultFuchsiaResourceDialect,
14881            >,
14882            offset: usize,
14883            mut depth: fidl::encoding::Depth,
14884        ) -> fidl::Result<()> {
14885            decoder.debug_check_bounds::<Self>(offset);
14886            #[allow(unused_variables)]
14887            let next_out_of_line = decoder.next_out_of_line();
14888            let handles_before = decoder.remaining_handles();
14889            let (ordinal, inlined, num_bytes, num_handles) =
14890                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14891
14892            let member_inline_size = match ordinal {
14893            1 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14894            2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14895            0 => return Err(fidl::Error::UnknownUnionTag),
14896            _ => num_bytes as usize,
14897        };
14898
14899            if inlined != (member_inline_size <= 4) {
14900                return Err(fidl::Error::InvalidInlineBitInEnvelope);
14901            }
14902            let _inner_offset;
14903            if inlined {
14904                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14905                _inner_offset = offset + 8;
14906            } else {
14907                depth.increment()?;
14908                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14909            }
14910            match ordinal {
14911                1 => {
14912                    #[allow(irrefutable_let_patterns)]
14913                    if let UnionOfEndpointsUnion::ClientEnd(_) = self {
14914                        // Do nothing, read the value into the object
14915                    } else {
14916                        // Initialize `self` to the right variant
14917                        *self = UnionOfEndpointsUnion::ClientEnd(fidl::new_empty!(
14918                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14919                            fidl::encoding::DefaultFuchsiaResourceDialect
14920                        ));
14921                    }
14922                    #[allow(irrefutable_let_patterns)]
14923                    if let UnionOfEndpointsUnion::ClientEnd(ref mut val) = self {
14924                        fidl::decode!(
14925                            fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14926                            fidl::encoding::DefaultFuchsiaResourceDialect,
14927                            val,
14928                            decoder,
14929                            _inner_offset,
14930                            depth
14931                        )?;
14932                    } else {
14933                        unreachable!()
14934                    }
14935                }
14936                2 => {
14937                    #[allow(irrefutable_let_patterns)]
14938                    if let UnionOfEndpointsUnion::ServerEnd(_) = self {
14939                        // Do nothing, read the value into the object
14940                    } else {
14941                        // Initialize `self` to the right variant
14942                        *self = UnionOfEndpointsUnion::ServerEnd(fidl::new_empty!(
14943                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14944                            fidl::encoding::DefaultFuchsiaResourceDialect
14945                        ));
14946                    }
14947                    #[allow(irrefutable_let_patterns)]
14948                    if let UnionOfEndpointsUnion::ServerEnd(ref mut val) = self {
14949                        fidl::decode!(
14950                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14951                            fidl::encoding::DefaultFuchsiaResourceDialect,
14952                            val,
14953                            decoder,
14954                            _inner_offset,
14955                            depth
14956                        )?;
14957                    } else {
14958                        unreachable!()
14959                    }
14960                }
14961                #[allow(deprecated)]
14962                ordinal => {
14963                    for _ in 0..num_handles {
14964                        decoder.drop_next_handle()?;
14965                    }
14966                    *self = UnionOfEndpointsUnion::__SourceBreaking { unknown_ordinal: ordinal };
14967                }
14968            }
14969            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14970                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14971            }
14972            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14973                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14974            }
14975            Ok(())
14976        }
14977    }
14978
14979    impl fidl::encoding::ResourceTypeMarker for UnionOfHandle {
14980        type Borrowed<'a> = &'a mut Self;
14981        fn take_or_borrow<'a>(
14982            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14983        ) -> Self::Borrowed<'a> {
14984            value
14985        }
14986    }
14987
14988    unsafe impl fidl::encoding::TypeMarker for UnionOfHandle {
14989        type Owned = Self;
14990
14991        #[inline(always)]
14992        fn inline_align(_context: fidl::encoding::Context) -> usize {
14993            8
14994        }
14995
14996        #[inline(always)]
14997        fn inline_size(_context: fidl::encoding::Context) -> usize {
14998            16
14999        }
15000    }
15001
15002    unsafe impl fidl::encoding::Encode<UnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
15003        for &mut UnionOfHandle
15004    {
15005        #[inline]
15006        unsafe fn encode(
15007            self,
15008            encoder: &mut fidl::encoding::Encoder<
15009                '_,
15010                fidl::encoding::DefaultFuchsiaResourceDialect,
15011            >,
15012            offset: usize,
15013            _depth: fidl::encoding::Depth,
15014        ) -> fidl::Result<()> {
15015            encoder.debug_check_bounds::<UnionOfHandle>(offset);
15016            encoder.write_num::<u64>(self.ordinal(), offset);
15017            match self {
15018                UnionOfHandle::H(ref mut val) => fidl::encoding::encode_in_envelope::<
15019                    fidl::encoding::HandleType<
15020                        fidl::NullableHandle,
15021                        { fidl::ObjectType::NONE.into_raw() },
15022                        2147483648,
15023                    >,
15024                    fidl::encoding::DefaultFuchsiaResourceDialect,
15025                >(
15026                    <fidl::encoding::HandleType<
15027                        fidl::NullableHandle,
15028                        { fidl::ObjectType::NONE.into_raw() },
15029                        2147483648,
15030                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
15031                        val
15032                    ),
15033                    encoder,
15034                    offset + 8,
15035                    _depth,
15036                ),
15037            }
15038        }
15039    }
15040
15041    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {
15042        #[inline(always)]
15043        fn new_empty() -> Self {
15044            Self::H(
15045                fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
15046            )
15047        }
15048
15049        #[inline]
15050        unsafe fn decode(
15051            &mut self,
15052            decoder: &mut fidl::encoding::Decoder<
15053                '_,
15054                fidl::encoding::DefaultFuchsiaResourceDialect,
15055            >,
15056            offset: usize,
15057            mut depth: fidl::encoding::Depth,
15058        ) -> fidl::Result<()> {
15059            decoder.debug_check_bounds::<Self>(offset);
15060            #[allow(unused_variables)]
15061            let next_out_of_line = decoder.next_out_of_line();
15062            let handles_before = decoder.remaining_handles();
15063            let (ordinal, inlined, num_bytes, num_handles) =
15064                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15065
15066            let member_inline_size = match ordinal {
15067                1 => <fidl::encoding::HandleType<
15068                    fidl::NullableHandle,
15069                    { fidl::ObjectType::NONE.into_raw() },
15070                    2147483648,
15071                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15072                _ => return Err(fidl::Error::UnknownUnionTag),
15073            };
15074
15075            if inlined != (member_inline_size <= 4) {
15076                return Err(fidl::Error::InvalidInlineBitInEnvelope);
15077            }
15078            let _inner_offset;
15079            if inlined {
15080                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15081                _inner_offset = offset + 8;
15082            } else {
15083                depth.increment()?;
15084                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15085            }
15086            match ordinal {
15087                1 => {
15088                    #[allow(irrefutable_let_patterns)]
15089                    if let UnionOfHandle::H(_) = self {
15090                        // Do nothing, read the value into the object
15091                    } else {
15092                        // Initialize `self` to the right variant
15093                        *self = UnionOfHandle::H(
15094                            fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
15095                        );
15096                    }
15097                    #[allow(irrefutable_let_patterns)]
15098                    if let UnionOfHandle::H(ref mut val) = self {
15099                        fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
15100                    } else {
15101                        unreachable!()
15102                    }
15103                }
15104                ordinal => panic!("unexpected ordinal {:?}", ordinal),
15105            }
15106            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15107                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15108            }
15109            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15110                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15111            }
15112            Ok(())
15113        }
15114    }
15115
15116    impl fidl::encoding::ResourceTypeMarker for UnionWithVector {
15117        type Borrowed<'a> = &'a mut Self;
15118        fn take_or_borrow<'a>(
15119            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15120        ) -> Self::Borrowed<'a> {
15121            value
15122        }
15123    }
15124
15125    unsafe impl fidl::encoding::TypeMarker for UnionWithVector {
15126        type Owned = Self;
15127
15128        #[inline(always)]
15129        fn inline_align(_context: fidl::encoding::Context) -> usize {
15130            8
15131        }
15132
15133        #[inline(always)]
15134        fn inline_size(_context: fidl::encoding::Context) -> usize {
15135            16
15136        }
15137    }
15138
15139    unsafe impl
15140        fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>
15141        for &mut UnionWithVector
15142    {
15143        #[inline]
15144        unsafe fn encode(
15145            self,
15146            encoder: &mut fidl::encoding::Encoder<
15147                '_,
15148                fidl::encoding::DefaultFuchsiaResourceDialect,
15149            >,
15150            offset: usize,
15151            _depth: fidl::encoding::Depth,
15152        ) -> fidl::Result<()> {
15153            encoder.debug_check_bounds::<UnionWithVector>(offset);
15154            encoder.write_num::<u64>(self.ordinal(), offset);
15155            match self {
15156            UnionWithVector::Unused(ref val) => {
15157                fidl::encoding::encode_in_envelope::<u8, fidl::encoding::DefaultFuchsiaResourceDialect>(
15158                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
15159                    encoder, offset + 8, _depth
15160                )
15161            }
15162            UnionWithVector::VectorOfUint8(ref val) => {
15163                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15164                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(val),
15165                    encoder, offset + 8, _depth
15166                )
15167            }
15168            UnionWithVector::S(ref val) => {
15169                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, fidl::encoding::DefaultFuchsiaResourceDialect>(
15170                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
15171                    encoder, offset + 8, _depth
15172                )
15173            }
15174            UnionWithVector::VectorS3A1(ref val) => {
15175                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align1>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15176                    <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::ValueTypeMarker>::borrow(val),
15177                    encoder, offset + 8, _depth
15178                )
15179            }
15180            UnionWithVector::VectorS3A2(ref val) => {
15181                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15182                    <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::ValueTypeMarker>::borrow(val),
15183                    encoder, offset + 8, _depth
15184                )
15185            }
15186            UnionWithVector::Handles(ref mut val) => {
15187                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15188                    <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15189                    encoder, offset + 8, _depth
15190                )
15191            }
15192            UnionWithVector::ArrayS3A1(ref val) => {
15193                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15194                    <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
15195                    encoder, offset + 8, _depth
15196                )
15197            }
15198            UnionWithVector::ArrayS3A2(ref val) => {
15199                fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15200                    <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
15201                    encoder, offset + 8, _depth
15202                )
15203            }
15204            UnionWithVector::VectorUnion(ref val) => {
15205                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<UnionSize8Align4>, fidl::encoding::DefaultFuchsiaResourceDialect>(
15206                    <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(val),
15207                    encoder, offset + 8, _depth
15208                )
15209            }
15210        }
15211        }
15212    }
15213
15214    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15215        for UnionWithVector
15216    {
15217        #[inline(always)]
15218        fn new_empty() -> Self {
15219            Self::Unused(fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect))
15220        }
15221
15222        #[inline]
15223        unsafe fn decode(
15224            &mut self,
15225            decoder: &mut fidl::encoding::Decoder<
15226                '_,
15227                fidl::encoding::DefaultFuchsiaResourceDialect,
15228            >,
15229            offset: usize,
15230            mut depth: fidl::encoding::Depth,
15231        ) -> fidl::Result<()> {
15232            decoder.debug_check_bounds::<Self>(offset);
15233            #[allow(unused_variables)]
15234            let next_out_of_line = decoder.next_out_of_line();
15235            let handles_before = decoder.remaining_handles();
15236            let (ordinal, inlined, num_bytes, num_handles) =
15237                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15238
15239            let member_inline_size = match ordinal {
15240            1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15241            2 => <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15242            3 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15243            4 => <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15244            5 => <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15245            6 => <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15246            7 => <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15247            8 => <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15248            9 => <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15249            _ => return Err(fidl::Error::UnknownUnionTag),
15250        };
15251
15252            if inlined != (member_inline_size <= 4) {
15253                return Err(fidl::Error::InvalidInlineBitInEnvelope);
15254            }
15255            let _inner_offset;
15256            if inlined {
15257                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15258                _inner_offset = offset + 8;
15259            } else {
15260                depth.increment()?;
15261                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15262            }
15263            match ordinal {
15264                1 => {
15265                    #[allow(irrefutable_let_patterns)]
15266                    if let UnionWithVector::Unused(_) = self {
15267                        // Do nothing, read the value into the object
15268                    } else {
15269                        // Initialize `self` to the right variant
15270                        *self = UnionWithVector::Unused(fidl::new_empty!(
15271                            u8,
15272                            fidl::encoding::DefaultFuchsiaResourceDialect
15273                        ));
15274                    }
15275                    #[allow(irrefutable_let_patterns)]
15276                    if let UnionWithVector::Unused(ref mut val) = self {
15277                        fidl::decode!(
15278                            u8,
15279                            fidl::encoding::DefaultFuchsiaResourceDialect,
15280                            val,
15281                            decoder,
15282                            _inner_offset,
15283                            depth
15284                        )?;
15285                    } else {
15286                        unreachable!()
15287                    }
15288                }
15289                2 => {
15290                    #[allow(irrefutable_let_patterns)]
15291                    if let UnionWithVector::VectorOfUint8(_) = self {
15292                        // Do nothing, read the value into the object
15293                    } else {
15294                        // Initialize `self` to the right variant
15295                        *self = UnionWithVector::VectorOfUint8(fidl::new_empty!(
15296                            fidl::encoding::UnboundedVector<u8>,
15297                            fidl::encoding::DefaultFuchsiaResourceDialect
15298                        ));
15299                    }
15300                    #[allow(irrefutable_let_patterns)]
15301                    if let UnionWithVector::VectorOfUint8(ref mut val) = self {
15302                        fidl::decode!(
15303                            fidl::encoding::UnboundedVector<u8>,
15304                            fidl::encoding::DefaultFuchsiaResourceDialect,
15305                            val,
15306                            decoder,
15307                            _inner_offset,
15308                            depth
15309                        )?;
15310                    } else {
15311                        unreachable!()
15312                    }
15313                }
15314                3 => {
15315                    #[allow(irrefutable_let_patterns)]
15316                    if let UnionWithVector::S(_) = self {
15317                        // Do nothing, read the value into the object
15318                    } else {
15319                        // Initialize `self` to the right variant
15320                        *self = UnionWithVector::S(fidl::new_empty!(
15321                            fidl::encoding::UnboundedString,
15322                            fidl::encoding::DefaultFuchsiaResourceDialect
15323                        ));
15324                    }
15325                    #[allow(irrefutable_let_patterns)]
15326                    if let UnionWithVector::S(ref mut val) = self {
15327                        fidl::decode!(
15328                            fidl::encoding::UnboundedString,
15329                            fidl::encoding::DefaultFuchsiaResourceDialect,
15330                            val,
15331                            decoder,
15332                            _inner_offset,
15333                            depth
15334                        )?;
15335                    } else {
15336                        unreachable!()
15337                    }
15338                }
15339                4 => {
15340                    #[allow(irrefutable_let_patterns)]
15341                    if let UnionWithVector::VectorS3A1(_) = self {
15342                        // Do nothing, read the value into the object
15343                    } else {
15344                        // Initialize `self` to the right variant
15345                        *self = UnionWithVector::VectorS3A1(fidl::new_empty!(
15346                            fidl::encoding::UnboundedVector<StructSize3Align1>,
15347                            fidl::encoding::DefaultFuchsiaResourceDialect
15348                        ));
15349                    }
15350                    #[allow(irrefutable_let_patterns)]
15351                    if let UnionWithVector::VectorS3A1(ref mut val) = self {
15352                        fidl::decode!(
15353                            fidl::encoding::UnboundedVector<StructSize3Align1>,
15354                            fidl::encoding::DefaultFuchsiaResourceDialect,
15355                            val,
15356                            decoder,
15357                            _inner_offset,
15358                            depth
15359                        )?;
15360                    } else {
15361                        unreachable!()
15362                    }
15363                }
15364                5 => {
15365                    #[allow(irrefutable_let_patterns)]
15366                    if let UnionWithVector::VectorS3A2(_) = self {
15367                        // Do nothing, read the value into the object
15368                    } else {
15369                        // Initialize `self` to the right variant
15370                        *self = UnionWithVector::VectorS3A2(fidl::new_empty!(
15371                            fidl::encoding::UnboundedVector<StructSize3Align2>,
15372                            fidl::encoding::DefaultFuchsiaResourceDialect
15373                        ));
15374                    }
15375                    #[allow(irrefutable_let_patterns)]
15376                    if let UnionWithVector::VectorS3A2(ref mut val) = self {
15377                        fidl::decode!(
15378                            fidl::encoding::UnboundedVector<StructSize3Align2>,
15379                            fidl::encoding::DefaultFuchsiaResourceDialect,
15380                            val,
15381                            decoder,
15382                            _inner_offset,
15383                            depth
15384                        )?;
15385                    } else {
15386                        unreachable!()
15387                    }
15388                }
15389                6 => {
15390                    #[allow(irrefutable_let_patterns)]
15391                    if let UnionWithVector::Handles(_) = self {
15392                        // Do nothing, read the value into the object
15393                    } else {
15394                        // Initialize `self` to the right variant
15395                        *self = UnionWithVector::Handles(fidl::new_empty!(
15396                            fidl::encoding::UnboundedVector<
15397                                fidl::encoding::HandleType<
15398                                    fidl::NullableHandle,
15399                                    { fidl::ObjectType::NONE.into_raw() },
15400                                    2147483648,
15401                                >,
15402                            >,
15403                            fidl::encoding::DefaultFuchsiaResourceDialect
15404                        ));
15405                    }
15406                    #[allow(irrefutable_let_patterns)]
15407                    if let UnionWithVector::Handles(ref mut val) = self {
15408                        fidl::decode!(
15409                            fidl::encoding::UnboundedVector<
15410                                fidl::encoding::HandleType<
15411                                    fidl::NullableHandle,
15412                                    { fidl::ObjectType::NONE.into_raw() },
15413                                    2147483648,
15414                                >,
15415                            >,
15416                            fidl::encoding::DefaultFuchsiaResourceDialect,
15417                            val,
15418                            decoder,
15419                            _inner_offset,
15420                            depth
15421                        )?;
15422                    } else {
15423                        unreachable!()
15424                    }
15425                }
15426                7 => {
15427                    #[allow(irrefutable_let_patterns)]
15428                    if let UnionWithVector::ArrayS3A1(_) = self {
15429                        // Do nothing, read the value into the object
15430                    } else {
15431                        // Initialize `self` to the right variant
15432                        *self = UnionWithVector::ArrayS3A1(
15433                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
15434                        );
15435                    }
15436                    #[allow(irrefutable_let_patterns)]
15437                    if let UnionWithVector::ArrayS3A1(ref mut val) = self {
15438                        fidl::decode!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
15439                    } else {
15440                        unreachable!()
15441                    }
15442                }
15443                8 => {
15444                    #[allow(irrefutable_let_patterns)]
15445                    if let UnionWithVector::ArrayS3A2(_) = self {
15446                        // Do nothing, read the value into the object
15447                    } else {
15448                        // Initialize `self` to the right variant
15449                        *self = UnionWithVector::ArrayS3A2(
15450                            fidl::new_empty!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
15451                        );
15452                    }
15453                    #[allow(irrefutable_let_patterns)]
15454                    if let UnionWithVector::ArrayS3A2(ref mut val) = self {
15455                        fidl::decode!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
15456                    } else {
15457                        unreachable!()
15458                    }
15459                }
15460                9 => {
15461                    #[allow(irrefutable_let_patterns)]
15462                    if let UnionWithVector::VectorUnion(_) = self {
15463                        // Do nothing, read the value into the object
15464                    } else {
15465                        // Initialize `self` to the right variant
15466                        *self = UnionWithVector::VectorUnion(fidl::new_empty!(
15467                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
15468                            fidl::encoding::DefaultFuchsiaResourceDialect
15469                        ));
15470                    }
15471                    #[allow(irrefutable_let_patterns)]
15472                    if let UnionWithVector::VectorUnion(ref mut val) = self {
15473                        fidl::decode!(
15474                            fidl::encoding::UnboundedVector<UnionSize8Align4>,
15475                            fidl::encoding::DefaultFuchsiaResourceDialect,
15476                            val,
15477                            decoder,
15478                            _inner_offset,
15479                            depth
15480                        )?;
15481                    } else {
15482                        unreachable!()
15483                    }
15484                }
15485                ordinal => panic!("unexpected ordinal {:?}", ordinal),
15486            }
15487            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15488                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15489            }
15490            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15491                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15492            }
15493            Ok(())
15494        }
15495    }
15496
15497    impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
15498        type Borrowed<'a> = &'a mut Self;
15499        fn take_or_borrow<'a>(
15500            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15501        ) -> Self::Borrowed<'a> {
15502            value
15503        }
15504    }
15505
15506    unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
15507        type Owned = Self;
15508
15509        #[inline(always)]
15510        fn inline_align(_context: fidl::encoding::Context) -> usize {
15511            8
15512        }
15513
15514        #[inline(always)]
15515        fn inline_size(_context: fidl::encoding::Context) -> usize {
15516            16
15517        }
15518    }
15519
15520    unsafe impl
15521        fidl::encoding::Encode<
15522            VectorOfArrayOfEventInUnionWithReducedRights,
15523            fidl::encoding::DefaultFuchsiaResourceDialect,
15524        > for &mut VectorOfArrayOfEventInUnionWithReducedRights
15525    {
15526        #[inline]
15527        unsafe fn encode(
15528            self,
15529            encoder: &mut fidl::encoding::Encoder<
15530                '_,
15531                fidl::encoding::DefaultFuchsiaResourceDialect,
15532            >,
15533            offset: usize,
15534            _depth: fidl::encoding::Depth,
15535        ) -> fidl::Result<()> {
15536            encoder.debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRights>(offset);
15537            encoder.write_num::<u64>(self.ordinal(), offset);
15538            match self {
15539                VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) => {
15540                    fidl::encoding::encode_in_envelope::<
15541                        fidl::encoding::Vector<
15542                            fidl::encoding::Array<
15543                                fidl::encoding::HandleType<
15544                                    fidl::Event,
15545                                    { fidl::ObjectType::EVENT.into_raw() },
15546                                    49155,
15547                                >,
15548                                1,
15549                            >,
15550                            1,
15551                        >,
15552                        fidl::encoding::DefaultFuchsiaResourceDialect,
15553                    >(
15554                        <fidl::encoding::Vector<
15555                            fidl::encoding::Array<
15556                                fidl::encoding::HandleType<
15557                                    fidl::Event,
15558                                    { fidl::ObjectType::EVENT.into_raw() },
15559                                    49155,
15560                                >,
15561                                1,
15562                            >,
15563                            1,
15564                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
15565                            val
15566                        ),
15567                        encoder,
15568                        offset + 8,
15569                        _depth,
15570                    )
15571                }
15572            }
15573        }
15574    }
15575
15576    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15577        for VectorOfArrayOfEventInUnionWithReducedRights
15578    {
15579        #[inline(always)]
15580        fn new_empty() -> Self {
15581            Self::H(fidl::new_empty!(
15582                fidl::encoding::Vector<
15583                    fidl::encoding::Array<
15584                        fidl::encoding::HandleType<
15585                            fidl::Event,
15586                            { fidl::ObjectType::EVENT.into_raw() },
15587                            49155,
15588                        >,
15589                        1,
15590                    >,
15591                    1,
15592                >,
15593                fidl::encoding::DefaultFuchsiaResourceDialect
15594            ))
15595        }
15596
15597        #[inline]
15598        unsafe fn decode(
15599            &mut self,
15600            decoder: &mut fidl::encoding::Decoder<
15601                '_,
15602                fidl::encoding::DefaultFuchsiaResourceDialect,
15603            >,
15604            offset: usize,
15605            mut depth: fidl::encoding::Depth,
15606        ) -> fidl::Result<()> {
15607            decoder.debug_check_bounds::<Self>(offset);
15608            #[allow(unused_variables)]
15609            let next_out_of_line = decoder.next_out_of_line();
15610            let handles_before = decoder.remaining_handles();
15611            let (ordinal, inlined, num_bytes, num_handles) =
15612                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
15613
15614            let member_inline_size = match ordinal {
15615                1 => <fidl::encoding::Vector<
15616                    fidl::encoding::Array<
15617                        fidl::encoding::HandleType<
15618                            fidl::Event,
15619                            { fidl::ObjectType::EVENT.into_raw() },
15620                            49155,
15621                        >,
15622                        1,
15623                    >,
15624                    1,
15625                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15626                _ => return Err(fidl::Error::UnknownUnionTag),
15627            };
15628
15629            if inlined != (member_inline_size <= 4) {
15630                return Err(fidl::Error::InvalidInlineBitInEnvelope);
15631            }
15632            let _inner_offset;
15633            if inlined {
15634                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
15635                _inner_offset = offset + 8;
15636            } else {
15637                depth.increment()?;
15638                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15639            }
15640            match ordinal {
15641                1 => {
15642                    #[allow(irrefutable_let_patterns)]
15643                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(_) = self {
15644                        // Do nothing, read the value into the object
15645                    } else {
15646                        // Initialize `self` to the right variant
15647                        *self = VectorOfArrayOfEventInUnionWithReducedRights::H(fidl::new_empty!(
15648                            fidl::encoding::Vector<
15649                                fidl::encoding::Array<
15650                                    fidl::encoding::HandleType<
15651                                        fidl::Event,
15652                                        { fidl::ObjectType::EVENT.into_raw() },
15653                                        49155,
15654                                    >,
15655                                    1,
15656                                >,
15657                                1,
15658                            >,
15659                            fidl::encoding::DefaultFuchsiaResourceDialect
15660                        ));
15661                    }
15662                    #[allow(irrefutable_let_patterns)]
15663                    if let VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) = self {
15664                        fidl::decode!(
15665                            fidl::encoding::Vector<
15666                                fidl::encoding::Array<
15667                                    fidl::encoding::HandleType<
15668                                        fidl::Event,
15669                                        { fidl::ObjectType::EVENT.into_raw() },
15670                                        49155,
15671                                    >,
15672                                    1,
15673                                >,
15674                                1,
15675                            >,
15676                            fidl::encoding::DefaultFuchsiaResourceDialect,
15677                            val,
15678                            decoder,
15679                            _inner_offset,
15680                            depth
15681                        )?;
15682                    } else {
15683                        unreachable!()
15684                    }
15685                }
15686                ordinal => panic!("unexpected ordinal {:?}", ordinal),
15687            }
15688            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15689                return Err(fidl::Error::InvalidNumBytesInEnvelope);
15690            }
15691            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15692                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15693            }
15694            Ok(())
15695        }
15696    }
15697}