1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_test_conformance__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct AlternatingHandlesAndFailures {
16 pub h1: fidl::Handle,
17 pub failure_trigger1: String,
18 pub h2: fidl::Handle,
19 pub failure_trigger2: String,
20 pub h3: fidl::Handle,
21}
22
23impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
24 for AlternatingHandlesAndFailures
25{
26}
27
28#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29pub struct ArrayOfArrayOfNonnullableHandles {
30 pub handles: [[fidl::Handle; 3]; 4],
31}
32
33impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
34 for ArrayOfArrayOfNonnullableHandles
35{
36}
37
38#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39pub struct ArrayOfHandles {
40 pub a: [fidl::Handle; 3],
41}
42
43impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfHandles {}
44
45#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
46pub struct ArrayOfNonnullableHandles {
47 pub handles: [fidl::Handle; 4],
48}
49
50impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfNonnullableHandles {}
51
52#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
53pub struct ArrayOfNullableHandles {
54 pub handles: [Option<fidl::Handle>; 5],
55}
56
57impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfNullableHandles {}
58
59#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
60pub struct ArrayOfOptionalHandles {
61 pub a: [Option<fidl::Handle>; 3],
62}
63
64impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ArrayOfOptionalHandles {}
65
66#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
67pub struct ArrayOfVectorOfEventInStructWithDefaultRights {
68 pub h: [Vec<fidl::Event>; 1],
69}
70
71impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
72 for ArrayOfVectorOfEventInStructWithDefaultRights
73{
74}
75
76#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
77pub struct ArrayOfVectorOfEventInStructWithReducedRights {
78 pub h: [Vec<fidl::Event>; 1],
79}
80
81impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
82 for ArrayOfVectorOfEventInStructWithReducedRights
83{
84}
85
86#[derive(Debug, PartialEq)]
87pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
88 pub t: ArrayOfVectorOfEventInTableWithDefaultRights,
89}
90
91impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
92 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
93{
94}
95
96#[derive(Debug, PartialEq)]
97pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct {
98 pub t: ArrayOfVectorOfEventInTableWithReducedRights,
99}
100
101impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
102 for ArrayOfVectorOfEventInTableWithReducedRightsStruct
103{
104}
105
106#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
107pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
108 pub u: ArrayOfVectorOfEventInUnionWithDefaultRights,
109}
110
111impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
112 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
113{
114}
115
116#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
117pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
118 pub u: ArrayOfVectorOfEventInUnionWithReducedRights,
119}
120
121impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
122 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
123{
124}
125
126#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
127pub struct Bounded32NonnullableVectorOfHandles {
128 pub vh0: Vec<fidl::Handle>,
129}
130
131impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
132 for Bounded32NonnullableVectorOfHandles
133{
134}
135
136#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
137pub struct Bounded32NullableVectorOfHandles {
138 pub vh0: Option<Vec<fidl::Handle>>,
139}
140
141impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
142 for Bounded32NullableVectorOfHandles
143{
144}
145
146#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
147pub struct BoxOfSingleHandle {
148 pub b: Option<Box<SingleHandle>>,
149}
150
151impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BoxOfSingleHandle {}
152
153#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
154pub struct BoxOfSingleOptionalHandle {
155 pub b: Option<Box<SingleOptionalHandle>>,
156}
157
158impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BoxOfSingleOptionalHandle {}
159
160#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161pub struct CreateComponentRequest {
162 pub launch_info: LaunchInfo,
163 pub controller: Option<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
164}
165
166impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CreateComponentRequest {}
167
168#[derive(Debug, PartialEq)]
169pub struct EmptyResourceTableStruct {
170 pub table: EmptyResourceTable,
171}
172
173impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EmptyResourceTableStruct {}
174
175#[derive(Debug, PartialEq)]
176pub struct EnvelopeInliningTestUnionStruct {
177 pub u: EnvelopeInliningTestUnion,
178}
179
180impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
181 for EnvelopeInliningTestUnionStruct
182{
183}
184
185#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
186pub struct EventWithDefaultRights {
187 pub h: fidl::Event,
188}
189
190impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EventWithDefaultRights {}
191
192#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
193pub struct EventWithReducedRights {
194 pub h: fidl::Event,
195}
196
197impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EventWithReducedRights {}
198
199#[derive(Debug, PartialEq)]
200pub struct FidlvizDemo {
201 pub f1: u8,
202 pub f2: i8,
203 pub f3: u16,
204 pub f4: u32,
205 pub f5: u64,
206 pub f6: u8,
207 pub f7: u8,
208 pub f8: u16,
209 pub f9: f32,
210 pub f10: f64,
211 pub f11: bool,
212 pub f12: bool,
213 pub f13: String,
214 pub f14: Option<String>,
215 pub f15: String,
216 pub f16: Option<fidl::Handle>,
217 pub f17: fidl::Handle,
218 pub f18: [u8; 3],
219 pub f19: Vec<f64>,
220 pub f20: Option<Vec<u8>>,
221 pub f21: Vec<u8>,
222 pub f22: FidlvizBits,
223 pub f23: FidlvizEnum,
224 pub f24: FidlvizStruct1,
225 pub f25: FidlvizStruct2,
226 pub f26: Option<Box<FidlvizStruct1>>,
227 pub f27: Option<Box<FidlvizStruct2>>,
228 pub f28: FidlvizTable,
229 pub f29: FidlvizTable,
230 pub f30: Option<Box<FidlvizUnion>>,
231 pub f31: FidlvizUnion,
232}
233
234impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {}
235
236#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
237pub struct GoldenHandleBasicRightsStruct {
238 pub v: fidl::Event,
239}
240
241impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
242 for GoldenHandleBasicRightsStruct
243{
244}
245
246#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
247pub struct GoldenNullableHandleStruct {
248 pub v: Option<fidl::Handle>,
249}
250
251impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
252 for GoldenNullableHandleStruct
253{
254}
255
256#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
257pub struct LaunchInfo {
258 pub url: String,
259 pub arguments: Option<Vec<String>>,
260 pub out: Option<Box<TransformerEmptyStruct>>,
261 pub err: Option<Box<TransformerEmptyStruct>>,
262 pub directory_request: Option<fidl::Channel>,
263 pub flat_namespace: Option<Box<TransformerEmptyStruct>>,
264 pub additional_services: Option<Box<TransformerEmptyStruct>>,
265}
266
267impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {}
268
269#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
270pub struct MultipleBoundedNonnullableVectorsOfHandles {
271 pub vh0: Vec<fidl::Handle>,
272 pub vh1: Vec<fidl::Handle>,
273}
274
275impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
276 for MultipleBoundedNonnullableVectorsOfHandles
277{
278}
279
280#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
281pub struct MultipleBoundedNullableVectorsOfHandles {
282 pub vh0: Option<Vec<fidl::Handle>>,
283 pub vh1: Option<Vec<fidl::Handle>>,
284}
285
286impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
287 for MultipleBoundedNullableVectorsOfHandles
288{
289}
290
291#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
292pub struct MultipleHandleSubtypes {
293 pub untyped: fidl::Handle,
294 pub event: fidl::Event,
295 pub channel: fidl::Channel,
296}
297
298impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for MultipleHandleSubtypes {}
299
300#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
301pub struct MultipleNonnullableHandles {
302 pub data0: u32,
303 pub handle0: fidl::Handle,
304 pub data1: u64,
305 pub handle1: fidl::Channel,
306 pub handle2: fidl::Event,
307 pub data2: u64,
308}
309
310impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
311 for MultipleNonnullableHandles
312{
313}
314
315#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
316pub struct MultipleNullableHandles {
317 pub data0: u32,
318 pub handle0: Option<fidl::Handle>,
319 pub data1: u64,
320 pub handle1: Option<fidl::Channel>,
321 pub handle2: Option<fidl::Event>,
322 pub data2: u64,
323}
324
325impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for MultipleNullableHandles {}
326
327#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
328pub struct NonnullableHandle {
329 pub h: fidl::Handle,
330}
331
332impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NonnullableHandle {}
333
334#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
335pub struct NonnullableHandleArray {
336 pub handles: [fidl::Handle; 4],
337}
338
339impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NonnullableHandleArray {}
340
341#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
342pub struct NullableHandle {
343 pub h: Option<fidl::Handle>,
344}
345
346impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NullableHandle {}
347
348#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
349pub struct OutOfLineArrayOfNonnullableHandles {
350 pub handles: Option<Box<NonnullableHandleArray>>,
351}
352
353impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
354 for OutOfLineArrayOfNonnullableHandles
355{
356}
357
358#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
359pub struct Sandwich6 {
360 pub before: u32,
361 pub the_union: UnionWithVector,
362 pub after: u32,
363}
364
365impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {}
366
367#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
368pub struct ShortStringThenHandle {
369 pub s: String,
370 pub h: fidl::Handle,
371}
372
373impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ShortStringThenHandle {}
374
375#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
376pub struct SingleHandle {
377 pub h: fidl::Handle,
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {}
381
382#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
383pub struct SingleOptionalHandle {
384 pub h: Option<fidl::Handle>,
385}
386
387impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SingleOptionalHandle {}
388
389#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
390pub struct StructOfEndpoints {
391 pub client_end: fidl::endpoints::ClientEnd<ProtocolMarker>,
392 pub optional_client_end: Option<fidl::endpoints::ClientEnd<ProtocolMarker>>,
393 pub server_end: fidl::endpoints::ServerEnd<ProtocolMarker>,
394 pub optional_server_end: Option<fidl::endpoints::ServerEnd<ProtocolMarker>>,
395}
396
397impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for StructOfEndpoints {}
398
399#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
400pub struct StructOfOptionalUnionOfHandle {
401 pub u: Option<Box<UnionOfHandle>>,
402}
403
404impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
405 for StructOfOptionalUnionOfHandle
406{
407}
408
409#[derive(Debug, PartialEq)]
410pub struct StructOfSimpleResourceTable {
411 pub table: SimpleResourceTable,
412}
413
414impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
415 for StructOfSimpleResourceTable
416{
417}
418
419#[derive(Debug, PartialEq)]
420pub struct TableFieldInlinedHandleStruct {
421 pub t: TableFieldInlinedHandle,
422}
423
424impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
425 for TableFieldInlinedHandleStruct
426{
427}
428
429#[derive(Debug, PartialEq)]
430pub struct TableFieldUnknownResourceStruct {
431 pub t: TableFieldUnknownResource,
432}
433
434impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
435 for TableFieldUnknownResourceStruct
436{
437}
438
439#[derive(Debug, PartialEq)]
440pub struct TableOfEndpoints {
441 pub t: TableOfEndpointsTable,
442}
443
444impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableOfEndpoints {}
445
446#[derive(Debug, PartialEq)]
447pub struct TableUnionWithVectorReservedSandwichStruct {
448 pub table: TableUnionWithVectorReservedSandwich,
449}
450
451impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
452 for TableUnionWithVectorReservedSandwichStruct
453{
454}
455
456#[derive(Debug, PartialEq)]
457pub struct TableUnionWithVectorStructSandwichStruct {
458 pub table: TableUnionWithVectorStructSandwich,
459}
460
461impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
462 for TableUnionWithVectorStructSandwichStruct
463{
464}
465
466#[derive(Debug, PartialEq)]
467pub struct TestFlexibleResourceXUnionInStruct {
468 pub xu: SampleResourceXUnion,
469}
470
471impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
472 for TestFlexibleResourceXUnionInStruct
473{
474}
475
476#[derive(Debug, PartialEq)]
477pub struct TestOptionalFlexibleResourceXUnionInStruct {
478 pub xu: Option<Box<SampleResourceXUnion>>,
479}
480
481impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
482 for TestOptionalFlexibleResourceXUnionInStruct
483{
484}
485
486#[derive(Debug, PartialEq)]
487pub struct TestOptionalStrictResourceXUnionInStruct {
488 pub xu: Option<Box<SampleStrictResourceXUnion>>,
489}
490
491impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
492 for TestOptionalStrictResourceXUnionInStruct
493{
494}
495
496#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
497pub struct TestPackageResolverResolveRequest {
498 pub package_url: String,
499 pub selectors: Vec<String>,
500 pub update_policy: UpdatePolicy,
501 pub this_should_be_a_handle: u32,
502}
503
504impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
505 for TestPackageResolverResolveRequest
506{
507}
508
509#[derive(Debug, PartialEq)]
510pub struct TestStrictResourceXUnionInStruct {
511 pub xu: SampleStrictResourceXUnion,
512}
513
514impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
515 for TestStrictResourceXUnionInStruct
516{
517}
518
519#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
520pub struct UnboundedNonnullableVectorOfHandles {
521 pub vh0: Vec<fidl::Handle>,
522}
523
524impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
525 for UnboundedNonnullableVectorOfHandles
526{
527}
528
529#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
530pub struct UnboundedNullableVectorOfHandles {
531 pub vh0: Option<Vec<fidl::Handle>>,
532}
533
534impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
535 for UnboundedNullableVectorOfHandles
536{
537}
538
539#[derive(Debug, PartialEq)]
540pub struct UnionOfEndpoints {
541 pub u: UnionOfEndpointsUnion,
542}
543
544impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpoints {}
545
546#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
547pub struct VectorOfArrayOfEventInStructWithDefaultRights {
548 pub h: Vec<[fidl::Event; 1]>,
549}
550
551impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
552 for VectorOfArrayOfEventInStructWithDefaultRights
553{
554}
555
556#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
557pub struct VectorOfArrayOfEventInStructWithReducedRights {
558 pub h: Vec<[fidl::Event; 1]>,
559}
560
561impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
562 for VectorOfArrayOfEventInStructWithReducedRights
563{
564}
565
566#[derive(Debug, PartialEq)]
567pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct {
568 pub t: VectorOfArrayOfEventInTableWithReducedRights,
569}
570
571impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
572 for VectorOfArrayOfEventInTableWithReducedRightsStruct
573{
574}
575
576#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
577pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct {
578 pub u: VectorOfArrayOfEventInUnionWithReducedRights,
579}
580
581impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
582 for VectorOfArrayOfEventInUnionWithReducedRightsStruct
583{
584}
585
586#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
587pub struct VectorOfHandles {
588 pub v: Vec<fidl::Handle>,
589}
590
591impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfHandles {}
592
593#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
594pub struct VectorOfOptionalHandles {
595 pub v: Vec<Option<fidl::Handle>>,
596}
597
598impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfOptionalHandles {}
599
600#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
601pub struct VectorOfUpTo2Handles {
602 pub v: Vec<fidl::Handle>,
603}
604
605impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for VectorOfUpTo2Handles {}
606
607#[derive(Debug, Default, PartialEq)]
608pub struct ArrayOfVectorOfEventInTableWithDefaultRights {
609 pub h: Option<[Vec<fidl::Event>; 1]>,
610 #[doc(hidden)]
611 pub __source_breaking: fidl::marker::SourceBreaking,
612}
613
614impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
615 for ArrayOfVectorOfEventInTableWithDefaultRights
616{
617}
618
619#[derive(Debug, Default, PartialEq)]
620pub struct ArrayOfVectorOfEventInTableWithReducedRights {
621 pub h: Option<[Vec<fidl::Event>; 1]>,
622 #[doc(hidden)]
623 pub __source_breaking: fidl::marker::SourceBreaking,
624}
625
626impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
627 for ArrayOfVectorOfEventInTableWithReducedRights
628{
629}
630
631#[derive(Debug, Default, PartialEq)]
632pub struct EmptyResourceTable {
633 #[doc(hidden)]
634 pub __source_breaking: fidl::marker::SourceBreaking,
635}
636
637impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EmptyResourceTable {}
638
639#[derive(Debug, Default, PartialEq)]
640pub struct SimpleResourceTable {
641 pub x: Option<i64>,
642 pub y: Option<i64>,
643 #[doc(hidden)]
644 pub __source_breaking: fidl::marker::SourceBreaking,
645}
646
647impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SimpleResourceTable {}
648
649#[derive(Debug, Default, PartialEq)]
650pub struct TableFieldInlinedHandle {
651 pub f: Option<fidl::Channel>,
652 #[doc(hidden)]
653 pub __source_breaking: fidl::marker::SourceBreaking,
654}
655
656impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableFieldInlinedHandle {}
657
658#[derive(Debug, Default, PartialEq)]
659pub struct TableFieldUnknownResource {
660 #[doc(hidden)]
661 pub __source_breaking: fidl::marker::SourceBreaking,
662}
663
664impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableFieldUnknownResource {}
665
666#[derive(Debug, Default, PartialEq)]
667pub struct TableOfEndpointsTable {
668 pub client_end: Option<fidl::endpoints::ClientEnd<ProtocolMarker>>,
669 pub server_end: Option<fidl::endpoints::ServerEnd<ProtocolMarker>>,
670 #[doc(hidden)]
671 pub __source_breaking: fidl::marker::SourceBreaking,
672}
673
674impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TableOfEndpointsTable {}
675
676#[derive(Debug, Default, PartialEq)]
677pub struct TableUnionWithVectorReservedSandwich {
678 pub uv: Option<UnionWithVector>,
679 #[doc(hidden)]
680 pub __source_breaking: fidl::marker::SourceBreaking,
681}
682
683impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
684 for TableUnionWithVectorReservedSandwich
685{
686}
687
688#[derive(Debug, Default, PartialEq)]
689pub struct TableUnionWithVectorStructSandwich {
690 pub s1: Option<StructSize3Align1>,
691 pub uv: Option<UnionWithVector>,
692 pub s2: Option<StructSize3Align1>,
693 #[doc(hidden)]
694 pub __source_breaking: fidl::marker::SourceBreaking,
695}
696
697impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
698 for TableUnionWithVectorStructSandwich
699{
700}
701
702#[derive(Debug, Default, PartialEq)]
703pub struct VectorOfArrayOfEventInTableWithReducedRights {
704 pub h: Option<Vec<[fidl::Event; 1]>>,
705 #[doc(hidden)]
706 pub __source_breaking: fidl::marker::SourceBreaking,
707}
708
709impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
710 for VectorOfArrayOfEventInTableWithReducedRights
711{
712}
713
714#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
715pub enum ArrayOfVectorOfEventInUnionWithDefaultRights {
716 H([Vec<fidl::Event>; 1]),
717}
718
719impl ArrayOfVectorOfEventInUnionWithDefaultRights {
720 #[inline]
721 pub fn ordinal(&self) -> u64 {
722 match *self {
723 Self::H(_) => 1,
724 }
725 }
726}
727
728impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
729 for ArrayOfVectorOfEventInUnionWithDefaultRights
730{
731}
732
733#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
734pub enum ArrayOfVectorOfEventInUnionWithReducedRights {
735 H([Vec<fidl::Event>; 1]),
736}
737
738impl ArrayOfVectorOfEventInUnionWithReducedRights {
739 #[inline]
740 pub fn ordinal(&self) -> u64 {
741 match *self {
742 Self::H(_) => 1,
743 }
744 }
745}
746
747impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
748 for ArrayOfVectorOfEventInUnionWithReducedRights
749{
750}
751
752#[derive(Debug)]
753pub enum EnvelopeInliningTestUnion {
754 Small(u32),
755 Large(u64),
756 Handle(fidl::Handle),
757 #[doc(hidden)]
758 __SourceBreaking {
759 unknown_ordinal: u64,
760 },
761}
762
763#[macro_export]
765macro_rules! EnvelopeInliningTestUnionUnknown {
766 () => {
767 _
768 };
769}
770
771impl PartialEq for EnvelopeInliningTestUnion {
773 fn eq(&self, other: &Self) -> bool {
774 match (self, other) {
775 (Self::Small(x), Self::Small(y)) => *x == *y,
776 (Self::Large(x), Self::Large(y)) => *x == *y,
777 (Self::Handle(x), Self::Handle(y)) => *x == *y,
778 _ => false,
779 }
780 }
781}
782
783impl EnvelopeInliningTestUnion {
784 #[inline]
785 pub fn ordinal(&self) -> u64 {
786 match *self {
787 Self::Small(_) => 1,
788 Self::Large(_) => 2,
789 Self::Handle(_) => 3,
790 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
791 }
792 }
793
794 #[inline]
795 pub fn unknown_variant_for_testing() -> Self {
796 Self::__SourceBreaking { unknown_ordinal: 0 }
797 }
798
799 #[inline]
800 pub fn is_unknown(&self) -> bool {
801 match self {
802 Self::__SourceBreaking { .. } => true,
803 _ => false,
804 }
805 }
806}
807
808impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EnvelopeInliningTestUnion {}
809
810#[derive(Debug)]
811pub enum SampleResourceXUnion {
812 U(u32),
813 Su(SimpleUnion),
814 St(SimpleTable),
815 #[doc(hidden)]
816 __SourceBreaking {
817 unknown_ordinal: u64,
818 },
819}
820
821#[macro_export]
823macro_rules! SampleResourceXUnionUnknown {
824 () => {
825 _
826 };
827}
828
829impl PartialEq for SampleResourceXUnion {
831 fn eq(&self, other: &Self) -> bool {
832 match (self, other) {
833 (Self::U(x), Self::U(y)) => *x == *y,
834 (Self::Su(x), Self::Su(y)) => *x == *y,
835 (Self::St(x), Self::St(y)) => *x == *y,
836 _ => false,
837 }
838 }
839}
840
841impl SampleResourceXUnion {
842 #[inline]
843 pub fn ordinal(&self) -> u64 {
844 match *self {
845 Self::U(_) => 1,
846 Self::Su(_) => 2,
847 Self::St(_) => 3,
848 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
849 }
850 }
851
852 #[inline]
853 pub fn unknown_variant_for_testing() -> Self {
854 Self::__SourceBreaking { unknown_ordinal: 0 }
855 }
856
857 #[inline]
858 pub fn is_unknown(&self) -> bool {
859 match self {
860 Self::__SourceBreaking { .. } => true,
861 _ => false,
862 }
863 }
864}
865
866impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SampleResourceXUnion {}
867
868#[derive(Debug, PartialEq)]
869pub enum SampleStrictResourceXUnion {
870 U(u32),
871 Su(SimpleUnion),
872 St(SimpleTable),
873}
874
875impl SampleStrictResourceXUnion {
876 #[inline]
877 pub fn ordinal(&self) -> u64 {
878 match *self {
879 Self::U(_) => 1,
880 Self::Su(_) => 2,
881 Self::St(_) => 3,
882 }
883 }
884}
885
886impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
887 for SampleStrictResourceXUnion
888{
889}
890
891#[derive(Debug)]
892pub enum UnionOfEndpointsUnion {
893 ClientEnd(fidl::endpoints::ClientEnd<ProtocolMarker>),
894 ServerEnd(fidl::endpoints::ServerEnd<ProtocolMarker>),
895 #[doc(hidden)]
896 __SourceBreaking {
897 unknown_ordinal: u64,
898 },
899}
900
901#[macro_export]
903macro_rules! UnionOfEndpointsUnionUnknown {
904 () => {
905 _
906 };
907}
908
909impl PartialEq for UnionOfEndpointsUnion {
911 fn eq(&self, other: &Self) -> bool {
912 match (self, other) {
913 (Self::ClientEnd(x), Self::ClientEnd(y)) => *x == *y,
914 (Self::ServerEnd(x), Self::ServerEnd(y)) => *x == *y,
915 _ => false,
916 }
917 }
918}
919
920impl UnionOfEndpointsUnion {
921 #[inline]
922 pub fn ordinal(&self) -> u64 {
923 match *self {
924 Self::ClientEnd(_) => 1,
925 Self::ServerEnd(_) => 2,
926 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
927 }
928 }
929
930 #[inline]
931 pub fn unknown_variant_for_testing() -> Self {
932 Self::__SourceBreaking { unknown_ordinal: 0 }
933 }
934
935 #[inline]
936 pub fn is_unknown(&self) -> bool {
937 match self {
938 Self::__SourceBreaking { .. } => true,
939 _ => false,
940 }
941 }
942}
943
944impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfEndpointsUnion {}
945
946#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
947pub enum UnionOfHandle {
948 H(fidl::Handle),
949}
950
951impl UnionOfHandle {
952 #[inline]
953 pub fn ordinal(&self) -> u64 {
954 match *self {
955 Self::H(_) => 1,
956 }
957 }
958}
959
960impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {}
961
962#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
963pub enum UnionWithVector {
964 Unused(u8),
965 VectorOfUint8(Vec<u8>),
966 S(String),
967 VectorS3A1(Vec<StructSize3Align1>),
968 VectorS3A2(Vec<StructSize3Align2>),
969 Handles(Vec<fidl::Handle>),
970 ArrayS3A1([StructSize3Align1; 2]),
971 ArrayS3A2([StructSize3Align2; 2]),
972 VectorUnion(Vec<UnionSize8Align4>),
973}
974
975impl UnionWithVector {
976 #[inline]
977 pub fn ordinal(&self) -> u64 {
978 match *self {
979 Self::Unused(_) => 1,
980 Self::VectorOfUint8(_) => 2,
981 Self::S(_) => 3,
982 Self::VectorS3A1(_) => 4,
983 Self::VectorS3A2(_) => 5,
984 Self::Handles(_) => 6,
985 Self::ArrayS3A1(_) => 7,
986 Self::ArrayS3A2(_) => 8,
987 Self::VectorUnion(_) => 9,
988 }
989 }
990}
991
992impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UnionWithVector {}
993
994#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
995pub enum VectorOfArrayOfEventInUnionWithReducedRights {
996 H(Vec<[fidl::Event; 1]>),
997}
998
999impl VectorOfArrayOfEventInUnionWithReducedRights {
1000 #[inline]
1001 pub fn ordinal(&self) -> u64 {
1002 match *self {
1003 Self::H(_) => 1,
1004 }
1005 }
1006}
1007
1008impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
1009 for VectorOfArrayOfEventInUnionWithReducedRights
1010{
1011}
1012
1013#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1014pub struct ComponentControllerMarker;
1015
1016impl fidl::endpoints::ProtocolMarker for ComponentControllerMarker {
1017 type Proxy = ComponentControllerProxy;
1018 type RequestStream = ComponentControllerRequestStream;
1019 #[cfg(target_os = "fuchsia")]
1020 type SynchronousProxy = ComponentControllerSynchronousProxy;
1021
1022 const DEBUG_NAME: &'static str = "(anonymous) ComponentController";
1023}
1024
1025pub trait ComponentControllerProxyInterface: Send + Sync {}
1026#[derive(Debug)]
1027#[cfg(target_os = "fuchsia")]
1028pub struct ComponentControllerSynchronousProxy {
1029 client: fidl::client::sync::Client,
1030}
1031
1032#[cfg(target_os = "fuchsia")]
1033impl fidl::endpoints::SynchronousProxy for ComponentControllerSynchronousProxy {
1034 type Proxy = ComponentControllerProxy;
1035 type Protocol = ComponentControllerMarker;
1036
1037 fn from_channel(inner: fidl::Channel) -> Self {
1038 Self::new(inner)
1039 }
1040
1041 fn into_channel(self) -> fidl::Channel {
1042 self.client.into_channel()
1043 }
1044
1045 fn as_channel(&self) -> &fidl::Channel {
1046 self.client.as_channel()
1047 }
1048}
1049
1050#[cfg(target_os = "fuchsia")]
1051impl ComponentControllerSynchronousProxy {
1052 pub fn new(channel: fidl::Channel) -> Self {
1053 let protocol_name =
1054 <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1055 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1056 }
1057
1058 pub fn into_channel(self) -> fidl::Channel {
1059 self.client.into_channel()
1060 }
1061
1062 pub fn wait_for_event(
1065 &self,
1066 deadline: zx::MonotonicInstant,
1067 ) -> Result<ComponentControllerEvent, fidl::Error> {
1068 ComponentControllerEvent::decode(self.client.wait_for_event(deadline)?)
1069 }
1070}
1071
1072#[cfg(target_os = "fuchsia")]
1073impl From<ComponentControllerSynchronousProxy> for zx::Handle {
1074 fn from(value: ComponentControllerSynchronousProxy) -> Self {
1075 value.into_channel().into()
1076 }
1077}
1078
1079#[cfg(target_os = "fuchsia")]
1080impl From<fidl::Channel> for ComponentControllerSynchronousProxy {
1081 fn from(value: fidl::Channel) -> Self {
1082 Self::new(value)
1083 }
1084}
1085
1086#[cfg(target_os = "fuchsia")]
1087impl fidl::endpoints::FromClient for ComponentControllerSynchronousProxy {
1088 type Protocol = ComponentControllerMarker;
1089
1090 fn from_client(value: fidl::endpoints::ClientEnd<ComponentControllerMarker>) -> Self {
1091 Self::new(value.into_channel())
1092 }
1093}
1094
1095#[derive(Debug, Clone)]
1096pub struct ComponentControllerProxy {
1097 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1098}
1099
1100impl fidl::endpoints::Proxy for ComponentControllerProxy {
1101 type Protocol = ComponentControllerMarker;
1102
1103 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1104 Self::new(inner)
1105 }
1106
1107 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1108 self.client.into_channel().map_err(|client| Self { client })
1109 }
1110
1111 fn as_channel(&self) -> &::fidl::AsyncChannel {
1112 self.client.as_channel()
1113 }
1114}
1115
1116impl ComponentControllerProxy {
1117 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1119 let protocol_name =
1120 <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1121 Self { client: fidl::client::Client::new(channel, protocol_name) }
1122 }
1123
1124 pub fn take_event_stream(&self) -> ComponentControllerEventStream {
1130 ComponentControllerEventStream { event_receiver: self.client.take_event_receiver() }
1131 }
1132}
1133
1134impl ComponentControllerProxyInterface for ComponentControllerProxy {}
1135
1136pub struct ComponentControllerEventStream {
1137 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1138}
1139
1140impl std::marker::Unpin for ComponentControllerEventStream {}
1141
1142impl futures::stream::FusedStream for ComponentControllerEventStream {
1143 fn is_terminated(&self) -> bool {
1144 self.event_receiver.is_terminated()
1145 }
1146}
1147
1148impl futures::Stream for ComponentControllerEventStream {
1149 type Item = Result<ComponentControllerEvent, fidl::Error>;
1150
1151 fn poll_next(
1152 mut self: std::pin::Pin<&mut Self>,
1153 cx: &mut std::task::Context<'_>,
1154 ) -> std::task::Poll<Option<Self::Item>> {
1155 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1156 &mut self.event_receiver,
1157 cx
1158 )?) {
1159 Some(buf) => std::task::Poll::Ready(Some(ComponentControllerEvent::decode(buf))),
1160 None => std::task::Poll::Ready(None),
1161 }
1162 }
1163}
1164
1165#[derive(Debug)]
1166pub enum ComponentControllerEvent {}
1167
1168impl ComponentControllerEvent {
1169 fn decode(
1171 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1172 ) -> Result<ComponentControllerEvent, fidl::Error> {
1173 let (bytes, _handles) = buf.split_mut();
1174 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1175 debug_assert_eq!(tx_header.tx_id, 0);
1176 match tx_header.ordinal {
1177 _ => Err(fidl::Error::UnknownOrdinal {
1178 ordinal: tx_header.ordinal,
1179 protocol_name:
1180 <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1181 }),
1182 }
1183 }
1184}
1185
1186pub struct ComponentControllerRequestStream {
1188 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1189 is_terminated: bool,
1190}
1191
1192impl std::marker::Unpin for ComponentControllerRequestStream {}
1193
1194impl futures::stream::FusedStream for ComponentControllerRequestStream {
1195 fn is_terminated(&self) -> bool {
1196 self.is_terminated
1197 }
1198}
1199
1200impl fidl::endpoints::RequestStream for ComponentControllerRequestStream {
1201 type Protocol = ComponentControllerMarker;
1202 type ControlHandle = ComponentControllerControlHandle;
1203
1204 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1205 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1206 }
1207
1208 fn control_handle(&self) -> Self::ControlHandle {
1209 ComponentControllerControlHandle { inner: self.inner.clone() }
1210 }
1211
1212 fn into_inner(
1213 self,
1214 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1215 {
1216 (self.inner, self.is_terminated)
1217 }
1218
1219 fn from_inner(
1220 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1221 is_terminated: bool,
1222 ) -> Self {
1223 Self { inner, is_terminated }
1224 }
1225}
1226
1227impl futures::Stream for ComponentControllerRequestStream {
1228 type Item = Result<ComponentControllerRequest, fidl::Error>;
1229
1230 fn poll_next(
1231 mut self: std::pin::Pin<&mut Self>,
1232 cx: &mut std::task::Context<'_>,
1233 ) -> std::task::Poll<Option<Self::Item>> {
1234 let this = &mut *self;
1235 if this.inner.check_shutdown(cx) {
1236 this.is_terminated = true;
1237 return std::task::Poll::Ready(None);
1238 }
1239 if this.is_terminated {
1240 panic!("polled ComponentControllerRequestStream after completion");
1241 }
1242 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1243 |bytes, handles| {
1244 match this.inner.channel().read_etc(cx, bytes, handles) {
1245 std::task::Poll::Ready(Ok(())) => {}
1246 std::task::Poll::Pending => return std::task::Poll::Pending,
1247 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1248 this.is_terminated = true;
1249 return std::task::Poll::Ready(None);
1250 }
1251 std::task::Poll::Ready(Err(e)) => {
1252 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1253 e.into(),
1254 ))));
1255 }
1256 }
1257
1258 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1260
1261 std::task::Poll::Ready(Some(match header.ordinal {
1262 _ => Err(fidl::Error::UnknownOrdinal {
1263 ordinal: header.ordinal,
1264 protocol_name: <ComponentControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1265 }),
1266 }))
1267 },
1268 )
1269 }
1270}
1271
1272#[derive(Debug)]
1273pub enum ComponentControllerRequest {}
1274
1275impl ComponentControllerRequest {
1276 pub fn method_name(&self) -> &'static str {
1278 match *self {}
1279 }
1280}
1281
1282#[derive(Debug, Clone)]
1283pub struct ComponentControllerControlHandle {
1284 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1285}
1286
1287impl fidl::endpoints::ControlHandle for ComponentControllerControlHandle {
1288 fn shutdown(&self) {
1289 self.inner.shutdown()
1290 }
1291 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1292 self.inner.shutdown_with_epitaph(status)
1293 }
1294
1295 fn is_closed(&self) -> bool {
1296 self.inner.channel().is_closed()
1297 }
1298 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1299 self.inner.channel().on_closed()
1300 }
1301
1302 #[cfg(target_os = "fuchsia")]
1303 fn signal_peer(
1304 &self,
1305 clear_mask: zx::Signals,
1306 set_mask: zx::Signals,
1307 ) -> Result<(), zx_status::Status> {
1308 use fidl::Peered;
1309 self.inner.channel().signal_peer(clear_mask, set_mask)
1310 }
1311}
1312
1313impl ComponentControllerControlHandle {}
1314
1315#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1316pub struct ProtocolMarker;
1317
1318impl fidl::endpoints::ProtocolMarker for ProtocolMarker {
1319 type Proxy = ProtocolProxy;
1320 type RequestStream = ProtocolRequestStream;
1321 #[cfg(target_os = "fuchsia")]
1322 type SynchronousProxy = ProtocolSynchronousProxy;
1323
1324 const DEBUG_NAME: &'static str = "(anonymous) Protocol";
1325}
1326
1327pub trait ProtocolProxyInterface: Send + Sync {}
1328#[derive(Debug)]
1329#[cfg(target_os = "fuchsia")]
1330pub struct ProtocolSynchronousProxy {
1331 client: fidl::client::sync::Client,
1332}
1333
1334#[cfg(target_os = "fuchsia")]
1335impl fidl::endpoints::SynchronousProxy for ProtocolSynchronousProxy {
1336 type Proxy = ProtocolProxy;
1337 type Protocol = ProtocolMarker;
1338
1339 fn from_channel(inner: fidl::Channel) -> Self {
1340 Self::new(inner)
1341 }
1342
1343 fn into_channel(self) -> fidl::Channel {
1344 self.client.into_channel()
1345 }
1346
1347 fn as_channel(&self) -> &fidl::Channel {
1348 self.client.as_channel()
1349 }
1350}
1351
1352#[cfg(target_os = "fuchsia")]
1353impl ProtocolSynchronousProxy {
1354 pub fn new(channel: fidl::Channel) -> Self {
1355 let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1356 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1357 }
1358
1359 pub fn into_channel(self) -> fidl::Channel {
1360 self.client.into_channel()
1361 }
1362
1363 pub fn wait_for_event(
1366 &self,
1367 deadline: zx::MonotonicInstant,
1368 ) -> Result<ProtocolEvent, fidl::Error> {
1369 ProtocolEvent::decode(self.client.wait_for_event(deadline)?)
1370 }
1371}
1372
1373#[cfg(target_os = "fuchsia")]
1374impl From<ProtocolSynchronousProxy> for zx::Handle {
1375 fn from(value: ProtocolSynchronousProxy) -> Self {
1376 value.into_channel().into()
1377 }
1378}
1379
1380#[cfg(target_os = "fuchsia")]
1381impl From<fidl::Channel> for ProtocolSynchronousProxy {
1382 fn from(value: fidl::Channel) -> Self {
1383 Self::new(value)
1384 }
1385}
1386
1387#[cfg(target_os = "fuchsia")]
1388impl fidl::endpoints::FromClient for ProtocolSynchronousProxy {
1389 type Protocol = ProtocolMarker;
1390
1391 fn from_client(value: fidl::endpoints::ClientEnd<ProtocolMarker>) -> Self {
1392 Self::new(value.into_channel())
1393 }
1394}
1395
1396#[derive(Debug, Clone)]
1397pub struct ProtocolProxy {
1398 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1399}
1400
1401impl fidl::endpoints::Proxy for ProtocolProxy {
1402 type Protocol = ProtocolMarker;
1403
1404 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1405 Self::new(inner)
1406 }
1407
1408 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1409 self.client.into_channel().map_err(|client| Self { client })
1410 }
1411
1412 fn as_channel(&self) -> &::fidl::AsyncChannel {
1413 self.client.as_channel()
1414 }
1415}
1416
1417impl ProtocolProxy {
1418 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1420 let protocol_name = <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1421 Self { client: fidl::client::Client::new(channel, protocol_name) }
1422 }
1423
1424 pub fn take_event_stream(&self) -> ProtocolEventStream {
1430 ProtocolEventStream { event_receiver: self.client.take_event_receiver() }
1431 }
1432}
1433
1434impl ProtocolProxyInterface for ProtocolProxy {}
1435
1436pub struct ProtocolEventStream {
1437 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1438}
1439
1440impl std::marker::Unpin for ProtocolEventStream {}
1441
1442impl futures::stream::FusedStream for ProtocolEventStream {
1443 fn is_terminated(&self) -> bool {
1444 self.event_receiver.is_terminated()
1445 }
1446}
1447
1448impl futures::Stream for ProtocolEventStream {
1449 type Item = Result<ProtocolEvent, fidl::Error>;
1450
1451 fn poll_next(
1452 mut self: std::pin::Pin<&mut Self>,
1453 cx: &mut std::task::Context<'_>,
1454 ) -> std::task::Poll<Option<Self::Item>> {
1455 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1456 &mut self.event_receiver,
1457 cx
1458 )?) {
1459 Some(buf) => std::task::Poll::Ready(Some(ProtocolEvent::decode(buf))),
1460 None => std::task::Poll::Ready(None),
1461 }
1462 }
1463}
1464
1465#[derive(Debug)]
1466pub enum ProtocolEvent {}
1467
1468impl ProtocolEvent {
1469 fn decode(
1471 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1472 ) -> Result<ProtocolEvent, fidl::Error> {
1473 let (bytes, _handles) = buf.split_mut();
1474 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1475 debug_assert_eq!(tx_header.tx_id, 0);
1476 match tx_header.ordinal {
1477 _ => Err(fidl::Error::UnknownOrdinal {
1478 ordinal: tx_header.ordinal,
1479 protocol_name: <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1480 }),
1481 }
1482 }
1483}
1484
1485pub struct ProtocolRequestStream {
1487 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1488 is_terminated: bool,
1489}
1490
1491impl std::marker::Unpin for ProtocolRequestStream {}
1492
1493impl futures::stream::FusedStream for ProtocolRequestStream {
1494 fn is_terminated(&self) -> bool {
1495 self.is_terminated
1496 }
1497}
1498
1499impl fidl::endpoints::RequestStream for ProtocolRequestStream {
1500 type Protocol = ProtocolMarker;
1501 type ControlHandle = ProtocolControlHandle;
1502
1503 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1504 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1505 }
1506
1507 fn control_handle(&self) -> Self::ControlHandle {
1508 ProtocolControlHandle { inner: self.inner.clone() }
1509 }
1510
1511 fn into_inner(
1512 self,
1513 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1514 {
1515 (self.inner, self.is_terminated)
1516 }
1517
1518 fn from_inner(
1519 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1520 is_terminated: bool,
1521 ) -> Self {
1522 Self { inner, is_terminated }
1523 }
1524}
1525
1526impl futures::Stream for ProtocolRequestStream {
1527 type Item = Result<ProtocolRequest, fidl::Error>;
1528
1529 fn poll_next(
1530 mut self: std::pin::Pin<&mut Self>,
1531 cx: &mut std::task::Context<'_>,
1532 ) -> std::task::Poll<Option<Self::Item>> {
1533 let this = &mut *self;
1534 if this.inner.check_shutdown(cx) {
1535 this.is_terminated = true;
1536 return std::task::Poll::Ready(None);
1537 }
1538 if this.is_terminated {
1539 panic!("polled ProtocolRequestStream after completion");
1540 }
1541 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1542 |bytes, handles| {
1543 match this.inner.channel().read_etc(cx, bytes, handles) {
1544 std::task::Poll::Ready(Ok(())) => {}
1545 std::task::Poll::Pending => return std::task::Poll::Pending,
1546 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1547 this.is_terminated = true;
1548 return std::task::Poll::Ready(None);
1549 }
1550 std::task::Poll::Ready(Err(e)) => {
1551 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1552 e.into(),
1553 ))));
1554 }
1555 }
1556
1557 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1559
1560 std::task::Poll::Ready(Some(match header.ordinal {
1561 _ => Err(fidl::Error::UnknownOrdinal {
1562 ordinal: header.ordinal,
1563 protocol_name:
1564 <ProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1565 }),
1566 }))
1567 },
1568 )
1569 }
1570}
1571
1572#[derive(Debug)]
1573pub enum ProtocolRequest {}
1574
1575impl ProtocolRequest {
1576 pub fn method_name(&self) -> &'static str {
1578 match *self {}
1579 }
1580}
1581
1582#[derive(Debug, Clone)]
1583pub struct ProtocolControlHandle {
1584 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1585}
1586
1587impl fidl::endpoints::ControlHandle for ProtocolControlHandle {
1588 fn shutdown(&self) {
1589 self.inner.shutdown()
1590 }
1591 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1592 self.inner.shutdown_with_epitaph(status)
1593 }
1594
1595 fn is_closed(&self) -> bool {
1596 self.inner.channel().is_closed()
1597 }
1598 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1599 self.inner.channel().on_closed()
1600 }
1601
1602 #[cfg(target_os = "fuchsia")]
1603 fn signal_peer(
1604 &self,
1605 clear_mask: zx::Signals,
1606 set_mask: zx::Signals,
1607 ) -> Result<(), zx_status::Status> {
1608 use fidl::Peered;
1609 self.inner.channel().signal_peer(clear_mask, set_mask)
1610 }
1611}
1612
1613impl ProtocolControlHandle {}
1614
1615mod internal {
1616 use super::*;
1617
1618 impl fidl::encoding::ResourceTypeMarker for AlternatingHandlesAndFailures {
1619 type Borrowed<'a> = &'a mut Self;
1620 fn take_or_borrow<'a>(
1621 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1622 ) -> Self::Borrowed<'a> {
1623 value
1624 }
1625 }
1626
1627 unsafe impl fidl::encoding::TypeMarker for AlternatingHandlesAndFailures {
1628 type Owned = Self;
1629
1630 #[inline(always)]
1631 fn inline_align(_context: fidl::encoding::Context) -> usize {
1632 8
1633 }
1634
1635 #[inline(always)]
1636 fn inline_size(_context: fidl::encoding::Context) -> usize {
1637 56
1638 }
1639 }
1640
1641 unsafe impl
1642 fidl::encoding::Encode<
1643 AlternatingHandlesAndFailures,
1644 fidl::encoding::DefaultFuchsiaResourceDialect,
1645 > for &mut AlternatingHandlesAndFailures
1646 {
1647 #[inline]
1648 unsafe fn encode(
1649 self,
1650 encoder: &mut fidl::encoding::Encoder<
1651 '_,
1652 fidl::encoding::DefaultFuchsiaResourceDialect,
1653 >,
1654 offset: usize,
1655 _depth: fidl::encoding::Depth,
1656 ) -> fidl::Result<()> {
1657 encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1658 fidl::encoding::Encode::<
1660 AlternatingHandlesAndFailures,
1661 fidl::encoding::DefaultFuchsiaResourceDialect,
1662 >::encode(
1663 (
1664 <fidl::encoding::HandleType<
1665 fidl::Handle,
1666 { fidl::ObjectType::NONE.into_raw() },
1667 2147483648,
1668 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1669 &mut self.h1
1670 ),
1671 <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1672 &self.failure_trigger1,
1673 ),
1674 <fidl::encoding::HandleType<
1675 fidl::Handle,
1676 { fidl::ObjectType::NONE.into_raw() },
1677 2147483648,
1678 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1679 &mut self.h2
1680 ),
1681 <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
1682 &self.failure_trigger2,
1683 ),
1684 <fidl::encoding::HandleType<
1685 fidl::Handle,
1686 { fidl::ObjectType::NONE.into_raw() },
1687 2147483648,
1688 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1689 &mut self.h3
1690 ),
1691 ),
1692 encoder,
1693 offset,
1694 _depth,
1695 )
1696 }
1697 }
1698 unsafe impl<
1699 T0: fidl::encoding::Encode<
1700 fidl::encoding::HandleType<
1701 fidl::Handle,
1702 { fidl::ObjectType::NONE.into_raw() },
1703 2147483648,
1704 >,
1705 fidl::encoding::DefaultFuchsiaResourceDialect,
1706 >,
1707 T1: fidl::encoding::Encode<
1708 fidl::encoding::BoundedString<1>,
1709 fidl::encoding::DefaultFuchsiaResourceDialect,
1710 >,
1711 T2: fidl::encoding::Encode<
1712 fidl::encoding::HandleType<
1713 fidl::Handle,
1714 { fidl::ObjectType::NONE.into_raw() },
1715 2147483648,
1716 >,
1717 fidl::encoding::DefaultFuchsiaResourceDialect,
1718 >,
1719 T3: fidl::encoding::Encode<
1720 fidl::encoding::BoundedString<1>,
1721 fidl::encoding::DefaultFuchsiaResourceDialect,
1722 >,
1723 T4: fidl::encoding::Encode<
1724 fidl::encoding::HandleType<
1725 fidl::Handle,
1726 { fidl::ObjectType::NONE.into_raw() },
1727 2147483648,
1728 >,
1729 fidl::encoding::DefaultFuchsiaResourceDialect,
1730 >,
1731 >
1732 fidl::encoding::Encode<
1733 AlternatingHandlesAndFailures,
1734 fidl::encoding::DefaultFuchsiaResourceDialect,
1735 > for (T0, T1, T2, T3, T4)
1736 {
1737 #[inline]
1738 unsafe fn encode(
1739 self,
1740 encoder: &mut fidl::encoding::Encoder<
1741 '_,
1742 fidl::encoding::DefaultFuchsiaResourceDialect,
1743 >,
1744 offset: usize,
1745 depth: fidl::encoding::Depth,
1746 ) -> fidl::Result<()> {
1747 encoder.debug_check_bounds::<AlternatingHandlesAndFailures>(offset);
1748 unsafe {
1751 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1752 (ptr as *mut u64).write_unaligned(0);
1753 }
1754 unsafe {
1755 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1756 (ptr as *mut u64).write_unaligned(0);
1757 }
1758 unsafe {
1759 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
1760 (ptr as *mut u64).write_unaligned(0);
1761 }
1762 self.0.encode(encoder, offset + 0, depth)?;
1764 self.1.encode(encoder, offset + 8, depth)?;
1765 self.2.encode(encoder, offset + 24, depth)?;
1766 self.3.encode(encoder, offset + 32, depth)?;
1767 self.4.encode(encoder, offset + 48, depth)?;
1768 Ok(())
1769 }
1770 }
1771
1772 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1773 for AlternatingHandlesAndFailures
1774 {
1775 #[inline(always)]
1776 fn new_empty() -> Self {
1777 Self {
1778 h1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1779 failure_trigger1: fidl::new_empty!(
1780 fidl::encoding::BoundedString<1>,
1781 fidl::encoding::DefaultFuchsiaResourceDialect
1782 ),
1783 h2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1784 failure_trigger2: fidl::new_empty!(
1785 fidl::encoding::BoundedString<1>,
1786 fidl::encoding::DefaultFuchsiaResourceDialect
1787 ),
1788 h3: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1789 }
1790 }
1791
1792 #[inline]
1793 unsafe fn decode(
1794 &mut self,
1795 decoder: &mut fidl::encoding::Decoder<
1796 '_,
1797 fidl::encoding::DefaultFuchsiaResourceDialect,
1798 >,
1799 offset: usize,
1800 _depth: fidl::encoding::Depth,
1801 ) -> fidl::Result<()> {
1802 decoder.debug_check_bounds::<Self>(offset);
1803 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1805 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1806 let mask = 0xffffffff00000000u64;
1807 let maskedval = padval & mask;
1808 if maskedval != 0 {
1809 return Err(fidl::Error::NonZeroPadding {
1810 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1811 });
1812 }
1813 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1814 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1815 let mask = 0xffffffff00000000u64;
1816 let maskedval = padval & mask;
1817 if maskedval != 0 {
1818 return Err(fidl::Error::NonZeroPadding {
1819 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1820 });
1821 }
1822 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
1823 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1824 let mask = 0xffffffff00000000u64;
1825 let maskedval = padval & mask;
1826 if maskedval != 0 {
1827 return Err(fidl::Error::NonZeroPadding {
1828 padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
1829 });
1830 }
1831 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h1, decoder, offset + 0, _depth)?;
1832 fidl::decode!(
1833 fidl::encoding::BoundedString<1>,
1834 fidl::encoding::DefaultFuchsiaResourceDialect,
1835 &mut self.failure_trigger1,
1836 decoder,
1837 offset + 8,
1838 _depth
1839 )?;
1840 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h2, decoder, offset + 24, _depth)?;
1841 fidl::decode!(
1842 fidl::encoding::BoundedString<1>,
1843 fidl::encoding::DefaultFuchsiaResourceDialect,
1844 &mut self.failure_trigger2,
1845 decoder,
1846 offset + 32,
1847 _depth
1848 )?;
1849 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h3, decoder, offset + 48, _depth)?;
1850 Ok(())
1851 }
1852 }
1853
1854 impl fidl::encoding::ResourceTypeMarker for ArrayOfArrayOfNonnullableHandles {
1855 type Borrowed<'a> = &'a mut Self;
1856 fn take_or_borrow<'a>(
1857 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1858 ) -> Self::Borrowed<'a> {
1859 value
1860 }
1861 }
1862
1863 unsafe impl fidl::encoding::TypeMarker for ArrayOfArrayOfNonnullableHandles {
1864 type Owned = Self;
1865
1866 #[inline(always)]
1867 fn inline_align(_context: fidl::encoding::Context) -> usize {
1868 4
1869 }
1870
1871 #[inline(always)]
1872 fn inline_size(_context: fidl::encoding::Context) -> usize {
1873 48
1874 }
1875 }
1876
1877 unsafe impl
1878 fidl::encoding::Encode<
1879 ArrayOfArrayOfNonnullableHandles,
1880 fidl::encoding::DefaultFuchsiaResourceDialect,
1881 > for &mut ArrayOfArrayOfNonnullableHandles
1882 {
1883 #[inline]
1884 unsafe fn encode(
1885 self,
1886 encoder: &mut fidl::encoding::Encoder<
1887 '_,
1888 fidl::encoding::DefaultFuchsiaResourceDialect,
1889 >,
1890 offset: usize,
1891 _depth: fidl::encoding::Depth,
1892 ) -> fidl::Result<()> {
1893 encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1894 fidl::encoding::Encode::<
1896 ArrayOfArrayOfNonnullableHandles,
1897 fidl::encoding::DefaultFuchsiaResourceDialect,
1898 >::encode(
1899 (<fidl::encoding::Array<
1900 fidl::encoding::Array<
1901 fidl::encoding::HandleType<
1902 fidl::Handle,
1903 { fidl::ObjectType::NONE.into_raw() },
1904 2147483648,
1905 >,
1906 3,
1907 >,
1908 4,
1909 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1910 &mut self.handles
1911 ),),
1912 encoder,
1913 offset,
1914 _depth,
1915 )
1916 }
1917 }
1918 unsafe impl<
1919 T0: fidl::encoding::Encode<
1920 fidl::encoding::Array<
1921 fidl::encoding::Array<
1922 fidl::encoding::HandleType<
1923 fidl::Handle,
1924 { fidl::ObjectType::NONE.into_raw() },
1925 2147483648,
1926 >,
1927 3,
1928 >,
1929 4,
1930 >,
1931 fidl::encoding::DefaultFuchsiaResourceDialect,
1932 >,
1933 >
1934 fidl::encoding::Encode<
1935 ArrayOfArrayOfNonnullableHandles,
1936 fidl::encoding::DefaultFuchsiaResourceDialect,
1937 > for (T0,)
1938 {
1939 #[inline]
1940 unsafe fn encode(
1941 self,
1942 encoder: &mut fidl::encoding::Encoder<
1943 '_,
1944 fidl::encoding::DefaultFuchsiaResourceDialect,
1945 >,
1946 offset: usize,
1947 depth: fidl::encoding::Depth,
1948 ) -> fidl::Result<()> {
1949 encoder.debug_check_bounds::<ArrayOfArrayOfNonnullableHandles>(offset);
1950 self.0.encode(encoder, offset + 0, depth)?;
1954 Ok(())
1955 }
1956 }
1957
1958 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1959 for ArrayOfArrayOfNonnullableHandles
1960 {
1961 #[inline(always)]
1962 fn new_empty() -> Self {
1963 Self {
1964 handles: fidl::new_empty!(
1965 fidl::encoding::Array<
1966 fidl::encoding::Array<
1967 fidl::encoding::HandleType<
1968 fidl::Handle,
1969 { fidl::ObjectType::NONE.into_raw() },
1970 2147483648,
1971 >,
1972 3,
1973 >,
1974 4,
1975 >,
1976 fidl::encoding::DefaultFuchsiaResourceDialect
1977 ),
1978 }
1979 }
1980
1981 #[inline]
1982 unsafe fn decode(
1983 &mut self,
1984 decoder: &mut fidl::encoding::Decoder<
1985 '_,
1986 fidl::encoding::DefaultFuchsiaResourceDialect,
1987 >,
1988 offset: usize,
1989 _depth: fidl::encoding::Depth,
1990 ) -> fidl::Result<()> {
1991 decoder.debug_check_bounds::<Self>(offset);
1992 fidl::decode!(
1994 fidl::encoding::Array<
1995 fidl::encoding::Array<
1996 fidl::encoding::HandleType<
1997 fidl::Handle,
1998 { fidl::ObjectType::NONE.into_raw() },
1999 2147483648,
2000 >,
2001 3,
2002 >,
2003 4,
2004 >,
2005 fidl::encoding::DefaultFuchsiaResourceDialect,
2006 &mut self.handles,
2007 decoder,
2008 offset + 0,
2009 _depth
2010 )?;
2011 Ok(())
2012 }
2013 }
2014
2015 impl fidl::encoding::ResourceTypeMarker for ArrayOfHandles {
2016 type Borrowed<'a> = &'a mut Self;
2017 fn take_or_borrow<'a>(
2018 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2019 ) -> Self::Borrowed<'a> {
2020 value
2021 }
2022 }
2023
2024 unsafe impl fidl::encoding::TypeMarker for ArrayOfHandles {
2025 type Owned = Self;
2026
2027 #[inline(always)]
2028 fn inline_align(_context: fidl::encoding::Context) -> usize {
2029 4
2030 }
2031
2032 #[inline(always)]
2033 fn inline_size(_context: fidl::encoding::Context) -> usize {
2034 12
2035 }
2036 }
2037
2038 unsafe impl
2039 fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2040 for &mut ArrayOfHandles
2041 {
2042 #[inline]
2043 unsafe fn encode(
2044 self,
2045 encoder: &mut fidl::encoding::Encoder<
2046 '_,
2047 fidl::encoding::DefaultFuchsiaResourceDialect,
2048 >,
2049 offset: usize,
2050 _depth: fidl::encoding::Depth,
2051 ) -> fidl::Result<()> {
2052 encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2053 fidl::encoding::Encode::<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2055 (
2056 <fidl::encoding::Array<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, 3> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.a),
2057 ),
2058 encoder, offset, _depth
2059 )
2060 }
2061 }
2062 unsafe impl<
2063 T0: fidl::encoding::Encode<
2064 fidl::encoding::Array<
2065 fidl::encoding::HandleType<
2066 fidl::Handle,
2067 { fidl::ObjectType::NONE.into_raw() },
2068 2147483648,
2069 >,
2070 3,
2071 >,
2072 fidl::encoding::DefaultFuchsiaResourceDialect,
2073 >,
2074 > fidl::encoding::Encode<ArrayOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
2075 for (T0,)
2076 {
2077 #[inline]
2078 unsafe fn encode(
2079 self,
2080 encoder: &mut fidl::encoding::Encoder<
2081 '_,
2082 fidl::encoding::DefaultFuchsiaResourceDialect,
2083 >,
2084 offset: usize,
2085 depth: fidl::encoding::Depth,
2086 ) -> fidl::Result<()> {
2087 encoder.debug_check_bounds::<ArrayOfHandles>(offset);
2088 self.0.encode(encoder, offset + 0, depth)?;
2092 Ok(())
2093 }
2094 }
2095
2096 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2097 for ArrayOfHandles
2098 {
2099 #[inline(always)]
2100 fn new_empty() -> Self {
2101 Self {
2102 a: fidl::new_empty!(
2103 fidl::encoding::Array<
2104 fidl::encoding::HandleType<
2105 fidl::Handle,
2106 { fidl::ObjectType::NONE.into_raw() },
2107 2147483648,
2108 >,
2109 3,
2110 >,
2111 fidl::encoding::DefaultFuchsiaResourceDialect
2112 ),
2113 }
2114 }
2115
2116 #[inline]
2117 unsafe fn decode(
2118 &mut self,
2119 decoder: &mut fidl::encoding::Decoder<
2120 '_,
2121 fidl::encoding::DefaultFuchsiaResourceDialect,
2122 >,
2123 offset: usize,
2124 _depth: fidl::encoding::Depth,
2125 ) -> fidl::Result<()> {
2126 decoder.debug_check_bounds::<Self>(offset);
2127 fidl::decode!(
2129 fidl::encoding::Array<
2130 fidl::encoding::HandleType<
2131 fidl::Handle,
2132 { fidl::ObjectType::NONE.into_raw() },
2133 2147483648,
2134 >,
2135 3,
2136 >,
2137 fidl::encoding::DefaultFuchsiaResourceDialect,
2138 &mut self.a,
2139 decoder,
2140 offset + 0,
2141 _depth
2142 )?;
2143 Ok(())
2144 }
2145 }
2146
2147 impl fidl::encoding::ResourceTypeMarker for ArrayOfNonnullableHandles {
2148 type Borrowed<'a> = &'a mut Self;
2149 fn take_or_borrow<'a>(
2150 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2151 ) -> Self::Borrowed<'a> {
2152 value
2153 }
2154 }
2155
2156 unsafe impl fidl::encoding::TypeMarker for ArrayOfNonnullableHandles {
2157 type Owned = Self;
2158
2159 #[inline(always)]
2160 fn inline_align(_context: fidl::encoding::Context) -> usize {
2161 4
2162 }
2163
2164 #[inline(always)]
2165 fn inline_size(_context: fidl::encoding::Context) -> usize {
2166 16
2167 }
2168 }
2169
2170 unsafe impl
2171 fidl::encoding::Encode<
2172 ArrayOfNonnullableHandles,
2173 fidl::encoding::DefaultFuchsiaResourceDialect,
2174 > for &mut ArrayOfNonnullableHandles
2175 {
2176 #[inline]
2177 unsafe fn encode(
2178 self,
2179 encoder: &mut fidl::encoding::Encoder<
2180 '_,
2181 fidl::encoding::DefaultFuchsiaResourceDialect,
2182 >,
2183 offset: usize,
2184 _depth: fidl::encoding::Depth,
2185 ) -> fidl::Result<()> {
2186 encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2187 fidl::encoding::Encode::<
2189 ArrayOfNonnullableHandles,
2190 fidl::encoding::DefaultFuchsiaResourceDialect,
2191 >::encode(
2192 (<fidl::encoding::Array<
2193 fidl::encoding::HandleType<
2194 fidl::Handle,
2195 { fidl::ObjectType::NONE.into_raw() },
2196 2147483648,
2197 >,
2198 4,
2199 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2200 &mut self.handles
2201 ),),
2202 encoder,
2203 offset,
2204 _depth,
2205 )
2206 }
2207 }
2208 unsafe impl<
2209 T0: fidl::encoding::Encode<
2210 fidl::encoding::Array<
2211 fidl::encoding::HandleType<
2212 fidl::Handle,
2213 { fidl::ObjectType::NONE.into_raw() },
2214 2147483648,
2215 >,
2216 4,
2217 >,
2218 fidl::encoding::DefaultFuchsiaResourceDialect,
2219 >,
2220 >
2221 fidl::encoding::Encode<
2222 ArrayOfNonnullableHandles,
2223 fidl::encoding::DefaultFuchsiaResourceDialect,
2224 > for (T0,)
2225 {
2226 #[inline]
2227 unsafe fn encode(
2228 self,
2229 encoder: &mut fidl::encoding::Encoder<
2230 '_,
2231 fidl::encoding::DefaultFuchsiaResourceDialect,
2232 >,
2233 offset: usize,
2234 depth: fidl::encoding::Depth,
2235 ) -> fidl::Result<()> {
2236 encoder.debug_check_bounds::<ArrayOfNonnullableHandles>(offset);
2237 self.0.encode(encoder, offset + 0, depth)?;
2241 Ok(())
2242 }
2243 }
2244
2245 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2246 for ArrayOfNonnullableHandles
2247 {
2248 #[inline(always)]
2249 fn new_empty() -> Self {
2250 Self {
2251 handles: fidl::new_empty!(
2252 fidl::encoding::Array<
2253 fidl::encoding::HandleType<
2254 fidl::Handle,
2255 { fidl::ObjectType::NONE.into_raw() },
2256 2147483648,
2257 >,
2258 4,
2259 >,
2260 fidl::encoding::DefaultFuchsiaResourceDialect
2261 ),
2262 }
2263 }
2264
2265 #[inline]
2266 unsafe fn decode(
2267 &mut self,
2268 decoder: &mut fidl::encoding::Decoder<
2269 '_,
2270 fidl::encoding::DefaultFuchsiaResourceDialect,
2271 >,
2272 offset: usize,
2273 _depth: fidl::encoding::Depth,
2274 ) -> fidl::Result<()> {
2275 decoder.debug_check_bounds::<Self>(offset);
2276 fidl::decode!(
2278 fidl::encoding::Array<
2279 fidl::encoding::HandleType<
2280 fidl::Handle,
2281 { fidl::ObjectType::NONE.into_raw() },
2282 2147483648,
2283 >,
2284 4,
2285 >,
2286 fidl::encoding::DefaultFuchsiaResourceDialect,
2287 &mut self.handles,
2288 decoder,
2289 offset + 0,
2290 _depth
2291 )?;
2292 Ok(())
2293 }
2294 }
2295
2296 impl fidl::encoding::ResourceTypeMarker for ArrayOfNullableHandles {
2297 type Borrowed<'a> = &'a mut Self;
2298 fn take_or_borrow<'a>(
2299 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2300 ) -> Self::Borrowed<'a> {
2301 value
2302 }
2303 }
2304
2305 unsafe impl fidl::encoding::TypeMarker for ArrayOfNullableHandles {
2306 type Owned = Self;
2307
2308 #[inline(always)]
2309 fn inline_align(_context: fidl::encoding::Context) -> usize {
2310 4
2311 }
2312
2313 #[inline(always)]
2314 fn inline_size(_context: fidl::encoding::Context) -> usize {
2315 20
2316 }
2317 }
2318
2319 unsafe impl
2320 fidl::encoding::Encode<
2321 ArrayOfNullableHandles,
2322 fidl::encoding::DefaultFuchsiaResourceDialect,
2323 > for &mut ArrayOfNullableHandles
2324 {
2325 #[inline]
2326 unsafe fn encode(
2327 self,
2328 encoder: &mut fidl::encoding::Encoder<
2329 '_,
2330 fidl::encoding::DefaultFuchsiaResourceDialect,
2331 >,
2332 offset: usize,
2333 _depth: fidl::encoding::Depth,
2334 ) -> fidl::Result<()> {
2335 encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2336 fidl::encoding::Encode::<
2338 ArrayOfNullableHandles,
2339 fidl::encoding::DefaultFuchsiaResourceDialect,
2340 >::encode(
2341 (<fidl::encoding::Array<
2342 fidl::encoding::Optional<
2343 fidl::encoding::HandleType<
2344 fidl::Handle,
2345 { fidl::ObjectType::NONE.into_raw() },
2346 2147483648,
2347 >,
2348 >,
2349 5,
2350 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2351 &mut self.handles
2352 ),),
2353 encoder,
2354 offset,
2355 _depth,
2356 )
2357 }
2358 }
2359 unsafe impl<
2360 T0: fidl::encoding::Encode<
2361 fidl::encoding::Array<
2362 fidl::encoding::Optional<
2363 fidl::encoding::HandleType<
2364 fidl::Handle,
2365 { fidl::ObjectType::NONE.into_raw() },
2366 2147483648,
2367 >,
2368 >,
2369 5,
2370 >,
2371 fidl::encoding::DefaultFuchsiaResourceDialect,
2372 >,
2373 >
2374 fidl::encoding::Encode<
2375 ArrayOfNullableHandles,
2376 fidl::encoding::DefaultFuchsiaResourceDialect,
2377 > for (T0,)
2378 {
2379 #[inline]
2380 unsafe fn encode(
2381 self,
2382 encoder: &mut fidl::encoding::Encoder<
2383 '_,
2384 fidl::encoding::DefaultFuchsiaResourceDialect,
2385 >,
2386 offset: usize,
2387 depth: fidl::encoding::Depth,
2388 ) -> fidl::Result<()> {
2389 encoder.debug_check_bounds::<ArrayOfNullableHandles>(offset);
2390 self.0.encode(encoder, offset + 0, depth)?;
2394 Ok(())
2395 }
2396 }
2397
2398 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2399 for ArrayOfNullableHandles
2400 {
2401 #[inline(always)]
2402 fn new_empty() -> Self {
2403 Self {
2404 handles: fidl::new_empty!(
2405 fidl::encoding::Array<
2406 fidl::encoding::Optional<
2407 fidl::encoding::HandleType<
2408 fidl::Handle,
2409 { fidl::ObjectType::NONE.into_raw() },
2410 2147483648,
2411 >,
2412 >,
2413 5,
2414 >,
2415 fidl::encoding::DefaultFuchsiaResourceDialect
2416 ),
2417 }
2418 }
2419
2420 #[inline]
2421 unsafe fn decode(
2422 &mut self,
2423 decoder: &mut fidl::encoding::Decoder<
2424 '_,
2425 fidl::encoding::DefaultFuchsiaResourceDialect,
2426 >,
2427 offset: usize,
2428 _depth: fidl::encoding::Depth,
2429 ) -> fidl::Result<()> {
2430 decoder.debug_check_bounds::<Self>(offset);
2431 fidl::decode!(
2433 fidl::encoding::Array<
2434 fidl::encoding::Optional<
2435 fidl::encoding::HandleType<
2436 fidl::Handle,
2437 { fidl::ObjectType::NONE.into_raw() },
2438 2147483648,
2439 >,
2440 >,
2441 5,
2442 >,
2443 fidl::encoding::DefaultFuchsiaResourceDialect,
2444 &mut self.handles,
2445 decoder,
2446 offset + 0,
2447 _depth
2448 )?;
2449 Ok(())
2450 }
2451 }
2452
2453 impl fidl::encoding::ResourceTypeMarker for ArrayOfOptionalHandles {
2454 type Borrowed<'a> = &'a mut Self;
2455 fn take_or_borrow<'a>(
2456 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2457 ) -> Self::Borrowed<'a> {
2458 value
2459 }
2460 }
2461
2462 unsafe impl fidl::encoding::TypeMarker for ArrayOfOptionalHandles {
2463 type Owned = Self;
2464
2465 #[inline(always)]
2466 fn inline_align(_context: fidl::encoding::Context) -> usize {
2467 4
2468 }
2469
2470 #[inline(always)]
2471 fn inline_size(_context: fidl::encoding::Context) -> usize {
2472 12
2473 }
2474 }
2475
2476 unsafe impl
2477 fidl::encoding::Encode<
2478 ArrayOfOptionalHandles,
2479 fidl::encoding::DefaultFuchsiaResourceDialect,
2480 > for &mut ArrayOfOptionalHandles
2481 {
2482 #[inline]
2483 unsafe fn encode(
2484 self,
2485 encoder: &mut fidl::encoding::Encoder<
2486 '_,
2487 fidl::encoding::DefaultFuchsiaResourceDialect,
2488 >,
2489 offset: usize,
2490 _depth: fidl::encoding::Depth,
2491 ) -> fidl::Result<()> {
2492 encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2493 fidl::encoding::Encode::<
2495 ArrayOfOptionalHandles,
2496 fidl::encoding::DefaultFuchsiaResourceDialect,
2497 >::encode(
2498 (<fidl::encoding::Array<
2499 fidl::encoding::Optional<
2500 fidl::encoding::HandleType<
2501 fidl::Handle,
2502 { fidl::ObjectType::NONE.into_raw() },
2503 2147483648,
2504 >,
2505 >,
2506 3,
2507 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2508 &mut self.a
2509 ),),
2510 encoder,
2511 offset,
2512 _depth,
2513 )
2514 }
2515 }
2516 unsafe impl<
2517 T0: fidl::encoding::Encode<
2518 fidl::encoding::Array<
2519 fidl::encoding::Optional<
2520 fidl::encoding::HandleType<
2521 fidl::Handle,
2522 { fidl::ObjectType::NONE.into_raw() },
2523 2147483648,
2524 >,
2525 >,
2526 3,
2527 >,
2528 fidl::encoding::DefaultFuchsiaResourceDialect,
2529 >,
2530 >
2531 fidl::encoding::Encode<
2532 ArrayOfOptionalHandles,
2533 fidl::encoding::DefaultFuchsiaResourceDialect,
2534 > for (T0,)
2535 {
2536 #[inline]
2537 unsafe fn encode(
2538 self,
2539 encoder: &mut fidl::encoding::Encoder<
2540 '_,
2541 fidl::encoding::DefaultFuchsiaResourceDialect,
2542 >,
2543 offset: usize,
2544 depth: fidl::encoding::Depth,
2545 ) -> fidl::Result<()> {
2546 encoder.debug_check_bounds::<ArrayOfOptionalHandles>(offset);
2547 self.0.encode(encoder, offset + 0, depth)?;
2551 Ok(())
2552 }
2553 }
2554
2555 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2556 for ArrayOfOptionalHandles
2557 {
2558 #[inline(always)]
2559 fn new_empty() -> Self {
2560 Self {
2561 a: fidl::new_empty!(
2562 fidl::encoding::Array<
2563 fidl::encoding::Optional<
2564 fidl::encoding::HandleType<
2565 fidl::Handle,
2566 { fidl::ObjectType::NONE.into_raw() },
2567 2147483648,
2568 >,
2569 >,
2570 3,
2571 >,
2572 fidl::encoding::DefaultFuchsiaResourceDialect
2573 ),
2574 }
2575 }
2576
2577 #[inline]
2578 unsafe fn decode(
2579 &mut self,
2580 decoder: &mut fidl::encoding::Decoder<
2581 '_,
2582 fidl::encoding::DefaultFuchsiaResourceDialect,
2583 >,
2584 offset: usize,
2585 _depth: fidl::encoding::Depth,
2586 ) -> fidl::Result<()> {
2587 decoder.debug_check_bounds::<Self>(offset);
2588 fidl::decode!(
2590 fidl::encoding::Array<
2591 fidl::encoding::Optional<
2592 fidl::encoding::HandleType<
2593 fidl::Handle,
2594 { fidl::ObjectType::NONE.into_raw() },
2595 2147483648,
2596 >,
2597 >,
2598 3,
2599 >,
2600 fidl::encoding::DefaultFuchsiaResourceDialect,
2601 &mut self.a,
2602 decoder,
2603 offset + 0,
2604 _depth
2605 )?;
2606 Ok(())
2607 }
2608 }
2609
2610 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2611 type Borrowed<'a> = &'a mut Self;
2612 fn take_or_borrow<'a>(
2613 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2614 ) -> Self::Borrowed<'a> {
2615 value
2616 }
2617 }
2618
2619 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithDefaultRights {
2620 type Owned = Self;
2621
2622 #[inline(always)]
2623 fn inline_align(_context: fidl::encoding::Context) -> usize {
2624 8
2625 }
2626
2627 #[inline(always)]
2628 fn inline_size(_context: fidl::encoding::Context) -> usize {
2629 16
2630 }
2631 }
2632
2633 unsafe impl
2634 fidl::encoding::Encode<
2635 ArrayOfVectorOfEventInStructWithDefaultRights,
2636 fidl::encoding::DefaultFuchsiaResourceDialect,
2637 > for &mut ArrayOfVectorOfEventInStructWithDefaultRights
2638 {
2639 #[inline]
2640 unsafe fn encode(
2641 self,
2642 encoder: &mut fidl::encoding::Encoder<
2643 '_,
2644 fidl::encoding::DefaultFuchsiaResourceDialect,
2645 >,
2646 offset: usize,
2647 _depth: fidl::encoding::Depth,
2648 ) -> fidl::Result<()> {
2649 encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2650 fidl::encoding::Encode::<
2652 ArrayOfVectorOfEventInStructWithDefaultRights,
2653 fidl::encoding::DefaultFuchsiaResourceDialect,
2654 >::encode(
2655 (<fidl::encoding::Array<
2656 fidl::encoding::Vector<
2657 fidl::encoding::HandleType<
2658 fidl::Event,
2659 { fidl::ObjectType::EVENT.into_raw() },
2660 53251,
2661 >,
2662 1,
2663 >,
2664 1,
2665 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2666 &mut self.h
2667 ),),
2668 encoder,
2669 offset,
2670 _depth,
2671 )
2672 }
2673 }
2674 unsafe impl<
2675 T0: fidl::encoding::Encode<
2676 fidl::encoding::Array<
2677 fidl::encoding::Vector<
2678 fidl::encoding::HandleType<
2679 fidl::Event,
2680 { fidl::ObjectType::EVENT.into_raw() },
2681 53251,
2682 >,
2683 1,
2684 >,
2685 1,
2686 >,
2687 fidl::encoding::DefaultFuchsiaResourceDialect,
2688 >,
2689 >
2690 fidl::encoding::Encode<
2691 ArrayOfVectorOfEventInStructWithDefaultRights,
2692 fidl::encoding::DefaultFuchsiaResourceDialect,
2693 > for (T0,)
2694 {
2695 #[inline]
2696 unsafe fn encode(
2697 self,
2698 encoder: &mut fidl::encoding::Encoder<
2699 '_,
2700 fidl::encoding::DefaultFuchsiaResourceDialect,
2701 >,
2702 offset: usize,
2703 depth: fidl::encoding::Depth,
2704 ) -> fidl::Result<()> {
2705 encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithDefaultRights>(offset);
2706 self.0.encode(encoder, offset + 0, depth)?;
2710 Ok(())
2711 }
2712 }
2713
2714 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2715 for ArrayOfVectorOfEventInStructWithDefaultRights
2716 {
2717 #[inline(always)]
2718 fn new_empty() -> Self {
2719 Self {
2720 h: fidl::new_empty!(
2721 fidl::encoding::Array<
2722 fidl::encoding::Vector<
2723 fidl::encoding::HandleType<
2724 fidl::Event,
2725 { fidl::ObjectType::EVENT.into_raw() },
2726 53251,
2727 >,
2728 1,
2729 >,
2730 1,
2731 >,
2732 fidl::encoding::DefaultFuchsiaResourceDialect
2733 ),
2734 }
2735 }
2736
2737 #[inline]
2738 unsafe fn decode(
2739 &mut self,
2740 decoder: &mut fidl::encoding::Decoder<
2741 '_,
2742 fidl::encoding::DefaultFuchsiaResourceDialect,
2743 >,
2744 offset: usize,
2745 _depth: fidl::encoding::Depth,
2746 ) -> fidl::Result<()> {
2747 decoder.debug_check_bounds::<Self>(offset);
2748 fidl::decode!(
2750 fidl::encoding::Array<
2751 fidl::encoding::Vector<
2752 fidl::encoding::HandleType<
2753 fidl::Event,
2754 { fidl::ObjectType::EVENT.into_raw() },
2755 53251,
2756 >,
2757 1,
2758 >,
2759 1,
2760 >,
2761 fidl::encoding::DefaultFuchsiaResourceDialect,
2762 &mut self.h,
2763 decoder,
2764 offset + 0,
2765 _depth
2766 )?;
2767 Ok(())
2768 }
2769 }
2770
2771 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2772 type Borrowed<'a> = &'a mut Self;
2773 fn take_or_borrow<'a>(
2774 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2775 ) -> Self::Borrowed<'a> {
2776 value
2777 }
2778 }
2779
2780 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInStructWithReducedRights {
2781 type Owned = Self;
2782
2783 #[inline(always)]
2784 fn inline_align(_context: fidl::encoding::Context) -> usize {
2785 8
2786 }
2787
2788 #[inline(always)]
2789 fn inline_size(_context: fidl::encoding::Context) -> usize {
2790 16
2791 }
2792 }
2793
2794 unsafe impl
2795 fidl::encoding::Encode<
2796 ArrayOfVectorOfEventInStructWithReducedRights,
2797 fidl::encoding::DefaultFuchsiaResourceDialect,
2798 > for &mut ArrayOfVectorOfEventInStructWithReducedRights
2799 {
2800 #[inline]
2801 unsafe fn encode(
2802 self,
2803 encoder: &mut fidl::encoding::Encoder<
2804 '_,
2805 fidl::encoding::DefaultFuchsiaResourceDialect,
2806 >,
2807 offset: usize,
2808 _depth: fidl::encoding::Depth,
2809 ) -> fidl::Result<()> {
2810 encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2811 fidl::encoding::Encode::<
2813 ArrayOfVectorOfEventInStructWithReducedRights,
2814 fidl::encoding::DefaultFuchsiaResourceDialect,
2815 >::encode(
2816 (<fidl::encoding::Array<
2817 fidl::encoding::Vector<
2818 fidl::encoding::HandleType<
2819 fidl::Event,
2820 { fidl::ObjectType::EVENT.into_raw() },
2821 49155,
2822 >,
2823 1,
2824 >,
2825 1,
2826 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2827 &mut self.h
2828 ),),
2829 encoder,
2830 offset,
2831 _depth,
2832 )
2833 }
2834 }
2835 unsafe impl<
2836 T0: fidl::encoding::Encode<
2837 fidl::encoding::Array<
2838 fidl::encoding::Vector<
2839 fidl::encoding::HandleType<
2840 fidl::Event,
2841 { fidl::ObjectType::EVENT.into_raw() },
2842 49155,
2843 >,
2844 1,
2845 >,
2846 1,
2847 >,
2848 fidl::encoding::DefaultFuchsiaResourceDialect,
2849 >,
2850 >
2851 fidl::encoding::Encode<
2852 ArrayOfVectorOfEventInStructWithReducedRights,
2853 fidl::encoding::DefaultFuchsiaResourceDialect,
2854 > for (T0,)
2855 {
2856 #[inline]
2857 unsafe fn encode(
2858 self,
2859 encoder: &mut fidl::encoding::Encoder<
2860 '_,
2861 fidl::encoding::DefaultFuchsiaResourceDialect,
2862 >,
2863 offset: usize,
2864 depth: fidl::encoding::Depth,
2865 ) -> fidl::Result<()> {
2866 encoder.debug_check_bounds::<ArrayOfVectorOfEventInStructWithReducedRights>(offset);
2867 self.0.encode(encoder, offset + 0, depth)?;
2871 Ok(())
2872 }
2873 }
2874
2875 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2876 for ArrayOfVectorOfEventInStructWithReducedRights
2877 {
2878 #[inline(always)]
2879 fn new_empty() -> Self {
2880 Self {
2881 h: fidl::new_empty!(
2882 fidl::encoding::Array<
2883 fidl::encoding::Vector<
2884 fidl::encoding::HandleType<
2885 fidl::Event,
2886 { fidl::ObjectType::EVENT.into_raw() },
2887 49155,
2888 >,
2889 1,
2890 >,
2891 1,
2892 >,
2893 fidl::encoding::DefaultFuchsiaResourceDialect
2894 ),
2895 }
2896 }
2897
2898 #[inline]
2899 unsafe fn decode(
2900 &mut self,
2901 decoder: &mut fidl::encoding::Decoder<
2902 '_,
2903 fidl::encoding::DefaultFuchsiaResourceDialect,
2904 >,
2905 offset: usize,
2906 _depth: fidl::encoding::Depth,
2907 ) -> fidl::Result<()> {
2908 decoder.debug_check_bounds::<Self>(offset);
2909 fidl::decode!(
2911 fidl::encoding::Array<
2912 fidl::encoding::Vector<
2913 fidl::encoding::HandleType<
2914 fidl::Event,
2915 { fidl::ObjectType::EVENT.into_raw() },
2916 49155,
2917 >,
2918 1,
2919 >,
2920 1,
2921 >,
2922 fidl::encoding::DefaultFuchsiaResourceDialect,
2923 &mut self.h,
2924 decoder,
2925 offset + 0,
2926 _depth
2927 )?;
2928 Ok(())
2929 }
2930 }
2931
2932 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2933 type Borrowed<'a> = &'a mut Self;
2934 fn take_or_borrow<'a>(
2935 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2936 ) -> Self::Borrowed<'a> {
2937 value
2938 }
2939 }
2940
2941 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
2942 type Owned = Self;
2943
2944 #[inline(always)]
2945 fn inline_align(_context: fidl::encoding::Context) -> usize {
2946 8
2947 }
2948
2949 #[inline(always)]
2950 fn inline_size(_context: fidl::encoding::Context) -> usize {
2951 16
2952 }
2953 }
2954
2955 unsafe impl
2956 fidl::encoding::Encode<
2957 ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
2958 fidl::encoding::DefaultFuchsiaResourceDialect,
2959 > for &mut ArrayOfVectorOfEventInTableWithDefaultRightsStruct
2960 {
2961 #[inline]
2962 unsafe fn encode(
2963 self,
2964 encoder: &mut fidl::encoding::Encoder<
2965 '_,
2966 fidl::encoding::DefaultFuchsiaResourceDialect,
2967 >,
2968 offset: usize,
2969 _depth: fidl::encoding::Depth,
2970 ) -> fidl::Result<()> {
2971 encoder
2972 .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
2973 fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2975 (
2976 <ArrayOfVectorOfEventInTableWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
2977 ),
2978 encoder, offset, _depth
2979 )
2980 }
2981 }
2982 unsafe impl<
2983 T0: fidl::encoding::Encode<
2984 ArrayOfVectorOfEventInTableWithDefaultRights,
2985 fidl::encoding::DefaultFuchsiaResourceDialect,
2986 >,
2987 >
2988 fidl::encoding::Encode<
2989 ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
2990 fidl::encoding::DefaultFuchsiaResourceDialect,
2991 > for (T0,)
2992 {
2993 #[inline]
2994 unsafe fn encode(
2995 self,
2996 encoder: &mut fidl::encoding::Encoder<
2997 '_,
2998 fidl::encoding::DefaultFuchsiaResourceDialect,
2999 >,
3000 offset: usize,
3001 depth: fidl::encoding::Depth,
3002 ) -> fidl::Result<()> {
3003 encoder
3004 .debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct>(offset);
3005 self.0.encode(encoder, offset + 0, depth)?;
3009 Ok(())
3010 }
3011 }
3012
3013 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3014 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
3015 {
3016 #[inline(always)]
3017 fn new_empty() -> Self {
3018 Self {
3019 t: fidl::new_empty!(
3020 ArrayOfVectorOfEventInTableWithDefaultRights,
3021 fidl::encoding::DefaultFuchsiaResourceDialect
3022 ),
3023 }
3024 }
3025
3026 #[inline]
3027 unsafe fn decode(
3028 &mut self,
3029 decoder: &mut fidl::encoding::Decoder<
3030 '_,
3031 fidl::encoding::DefaultFuchsiaResourceDialect,
3032 >,
3033 offset: usize,
3034 _depth: fidl::encoding::Depth,
3035 ) -> fidl::Result<()> {
3036 decoder.debug_check_bounds::<Self>(offset);
3037 fidl::decode!(
3039 ArrayOfVectorOfEventInTableWithDefaultRights,
3040 fidl::encoding::DefaultFuchsiaResourceDialect,
3041 &mut self.t,
3042 decoder,
3043 offset + 0,
3044 _depth
3045 )?;
3046 Ok(())
3047 }
3048 }
3049
3050 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3051 type Borrowed<'a> = &'a mut Self;
3052 fn take_or_borrow<'a>(
3053 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3054 ) -> Self::Borrowed<'a> {
3055 value
3056 }
3057 }
3058
3059 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRightsStruct {
3060 type Owned = Self;
3061
3062 #[inline(always)]
3063 fn inline_align(_context: fidl::encoding::Context) -> usize {
3064 8
3065 }
3066
3067 #[inline(always)]
3068 fn inline_size(_context: fidl::encoding::Context) -> usize {
3069 16
3070 }
3071 }
3072
3073 unsafe impl
3074 fidl::encoding::Encode<
3075 ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3076 fidl::encoding::DefaultFuchsiaResourceDialect,
3077 > for &mut ArrayOfVectorOfEventInTableWithReducedRightsStruct
3078 {
3079 #[inline]
3080 unsafe fn encode(
3081 self,
3082 encoder: &mut fidl::encoding::Encoder<
3083 '_,
3084 fidl::encoding::DefaultFuchsiaResourceDialect,
3085 >,
3086 offset: usize,
3087 _depth: fidl::encoding::Depth,
3088 ) -> fidl::Result<()> {
3089 encoder
3090 .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3091 fidl::encoding::Encode::<ArrayOfVectorOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3093 (
3094 <ArrayOfVectorOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
3095 ),
3096 encoder, offset, _depth
3097 )
3098 }
3099 }
3100 unsafe impl<
3101 T0: fidl::encoding::Encode<
3102 ArrayOfVectorOfEventInTableWithReducedRights,
3103 fidl::encoding::DefaultFuchsiaResourceDialect,
3104 >,
3105 >
3106 fidl::encoding::Encode<
3107 ArrayOfVectorOfEventInTableWithReducedRightsStruct,
3108 fidl::encoding::DefaultFuchsiaResourceDialect,
3109 > for (T0,)
3110 {
3111 #[inline]
3112 unsafe fn encode(
3113 self,
3114 encoder: &mut fidl::encoding::Encoder<
3115 '_,
3116 fidl::encoding::DefaultFuchsiaResourceDialect,
3117 >,
3118 offset: usize,
3119 depth: fidl::encoding::Depth,
3120 ) -> fidl::Result<()> {
3121 encoder
3122 .debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRightsStruct>(offset);
3123 self.0.encode(encoder, offset + 0, depth)?;
3127 Ok(())
3128 }
3129 }
3130
3131 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3132 for ArrayOfVectorOfEventInTableWithReducedRightsStruct
3133 {
3134 #[inline(always)]
3135 fn new_empty() -> Self {
3136 Self {
3137 t: fidl::new_empty!(
3138 ArrayOfVectorOfEventInTableWithReducedRights,
3139 fidl::encoding::DefaultFuchsiaResourceDialect
3140 ),
3141 }
3142 }
3143
3144 #[inline]
3145 unsafe fn decode(
3146 &mut self,
3147 decoder: &mut fidl::encoding::Decoder<
3148 '_,
3149 fidl::encoding::DefaultFuchsiaResourceDialect,
3150 >,
3151 offset: usize,
3152 _depth: fidl::encoding::Depth,
3153 ) -> fidl::Result<()> {
3154 decoder.debug_check_bounds::<Self>(offset);
3155 fidl::decode!(
3157 ArrayOfVectorOfEventInTableWithReducedRights,
3158 fidl::encoding::DefaultFuchsiaResourceDialect,
3159 &mut self.t,
3160 decoder,
3161 offset + 0,
3162 _depth
3163 )?;
3164 Ok(())
3165 }
3166 }
3167
3168 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3169 type Borrowed<'a> = &'a mut Self;
3170 fn take_or_borrow<'a>(
3171 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3172 ) -> Self::Borrowed<'a> {
3173 value
3174 }
3175 }
3176
3177 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
3178 type Owned = Self;
3179
3180 #[inline(always)]
3181 fn inline_align(_context: fidl::encoding::Context) -> usize {
3182 8
3183 }
3184
3185 #[inline(always)]
3186 fn inline_size(_context: fidl::encoding::Context) -> usize {
3187 16
3188 }
3189 }
3190
3191 unsafe impl
3192 fidl::encoding::Encode<
3193 ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3194 fidl::encoding::DefaultFuchsiaResourceDialect,
3195 > for &mut ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3196 {
3197 #[inline]
3198 unsafe fn encode(
3199 self,
3200 encoder: &mut fidl::encoding::Encoder<
3201 '_,
3202 fidl::encoding::DefaultFuchsiaResourceDialect,
3203 >,
3204 offset: usize,
3205 _depth: fidl::encoding::Depth,
3206 ) -> fidl::Result<()> {
3207 encoder
3208 .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3209 fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3211 (
3212 <ArrayOfVectorOfEventInUnionWithDefaultRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3213 ),
3214 encoder, offset, _depth
3215 )
3216 }
3217 }
3218 unsafe impl<
3219 T0: fidl::encoding::Encode<
3220 ArrayOfVectorOfEventInUnionWithDefaultRights,
3221 fidl::encoding::DefaultFuchsiaResourceDialect,
3222 >,
3223 >
3224 fidl::encoding::Encode<
3225 ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
3226 fidl::encoding::DefaultFuchsiaResourceDialect,
3227 > for (T0,)
3228 {
3229 #[inline]
3230 unsafe fn encode(
3231 self,
3232 encoder: &mut fidl::encoding::Encoder<
3233 '_,
3234 fidl::encoding::DefaultFuchsiaResourceDialect,
3235 >,
3236 offset: usize,
3237 depth: fidl::encoding::Depth,
3238 ) -> fidl::Result<()> {
3239 encoder
3240 .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>(offset);
3241 self.0.encode(encoder, offset + 0, depth)?;
3245 Ok(())
3246 }
3247 }
3248
3249 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3250 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
3251 {
3252 #[inline(always)]
3253 fn new_empty() -> Self {
3254 Self {
3255 u: fidl::new_empty!(
3256 ArrayOfVectorOfEventInUnionWithDefaultRights,
3257 fidl::encoding::DefaultFuchsiaResourceDialect
3258 ),
3259 }
3260 }
3261
3262 #[inline]
3263 unsafe fn decode(
3264 &mut self,
3265 decoder: &mut fidl::encoding::Decoder<
3266 '_,
3267 fidl::encoding::DefaultFuchsiaResourceDialect,
3268 >,
3269 offset: usize,
3270 _depth: fidl::encoding::Depth,
3271 ) -> fidl::Result<()> {
3272 decoder.debug_check_bounds::<Self>(offset);
3273 fidl::decode!(
3275 ArrayOfVectorOfEventInUnionWithDefaultRights,
3276 fidl::encoding::DefaultFuchsiaResourceDialect,
3277 &mut self.u,
3278 decoder,
3279 offset + 0,
3280 _depth
3281 )?;
3282 Ok(())
3283 }
3284 }
3285
3286 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3287 type Borrowed<'a> = &'a mut Self;
3288 fn take_or_borrow<'a>(
3289 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3290 ) -> Self::Borrowed<'a> {
3291 value
3292 }
3293 }
3294
3295 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
3296 type Owned = Self;
3297
3298 #[inline(always)]
3299 fn inline_align(_context: fidl::encoding::Context) -> usize {
3300 8
3301 }
3302
3303 #[inline(always)]
3304 fn inline_size(_context: fidl::encoding::Context) -> usize {
3305 16
3306 }
3307 }
3308
3309 unsafe impl
3310 fidl::encoding::Encode<
3311 ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3312 fidl::encoding::DefaultFuchsiaResourceDialect,
3313 > for &mut ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3314 {
3315 #[inline]
3316 unsafe fn encode(
3317 self,
3318 encoder: &mut fidl::encoding::Encoder<
3319 '_,
3320 fidl::encoding::DefaultFuchsiaResourceDialect,
3321 >,
3322 offset: usize,
3323 _depth: fidl::encoding::Depth,
3324 ) -> fidl::Result<()> {
3325 encoder
3326 .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3327 fidl::encoding::Encode::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3329 (
3330 <ArrayOfVectorOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
3331 ),
3332 encoder, offset, _depth
3333 )
3334 }
3335 }
3336 unsafe impl<
3337 T0: fidl::encoding::Encode<
3338 ArrayOfVectorOfEventInUnionWithReducedRights,
3339 fidl::encoding::DefaultFuchsiaResourceDialect,
3340 >,
3341 >
3342 fidl::encoding::Encode<
3343 ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
3344 fidl::encoding::DefaultFuchsiaResourceDialect,
3345 > for (T0,)
3346 {
3347 #[inline]
3348 unsafe fn encode(
3349 self,
3350 encoder: &mut fidl::encoding::Encoder<
3351 '_,
3352 fidl::encoding::DefaultFuchsiaResourceDialect,
3353 >,
3354 offset: usize,
3355 depth: fidl::encoding::Depth,
3356 ) -> fidl::Result<()> {
3357 encoder
3358 .debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct>(offset);
3359 self.0.encode(encoder, offset + 0, depth)?;
3363 Ok(())
3364 }
3365 }
3366
3367 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3368 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
3369 {
3370 #[inline(always)]
3371 fn new_empty() -> Self {
3372 Self {
3373 u: fidl::new_empty!(
3374 ArrayOfVectorOfEventInUnionWithReducedRights,
3375 fidl::encoding::DefaultFuchsiaResourceDialect
3376 ),
3377 }
3378 }
3379
3380 #[inline]
3381 unsafe fn decode(
3382 &mut self,
3383 decoder: &mut fidl::encoding::Decoder<
3384 '_,
3385 fidl::encoding::DefaultFuchsiaResourceDialect,
3386 >,
3387 offset: usize,
3388 _depth: fidl::encoding::Depth,
3389 ) -> fidl::Result<()> {
3390 decoder.debug_check_bounds::<Self>(offset);
3391 fidl::decode!(
3393 ArrayOfVectorOfEventInUnionWithReducedRights,
3394 fidl::encoding::DefaultFuchsiaResourceDialect,
3395 &mut self.u,
3396 decoder,
3397 offset + 0,
3398 _depth
3399 )?;
3400 Ok(())
3401 }
3402 }
3403
3404 impl fidl::encoding::ResourceTypeMarker for Bounded32NonnullableVectorOfHandles {
3405 type Borrowed<'a> = &'a mut Self;
3406 fn take_or_borrow<'a>(
3407 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3408 ) -> Self::Borrowed<'a> {
3409 value
3410 }
3411 }
3412
3413 unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfHandles {
3414 type Owned = Self;
3415
3416 #[inline(always)]
3417 fn inline_align(_context: fidl::encoding::Context) -> usize {
3418 8
3419 }
3420
3421 #[inline(always)]
3422 fn inline_size(_context: fidl::encoding::Context) -> usize {
3423 16
3424 }
3425 }
3426
3427 unsafe impl
3428 fidl::encoding::Encode<
3429 Bounded32NonnullableVectorOfHandles,
3430 fidl::encoding::DefaultFuchsiaResourceDialect,
3431 > for &mut Bounded32NonnullableVectorOfHandles
3432 {
3433 #[inline]
3434 unsafe fn encode(
3435 self,
3436 encoder: &mut fidl::encoding::Encoder<
3437 '_,
3438 fidl::encoding::DefaultFuchsiaResourceDialect,
3439 >,
3440 offset: usize,
3441 _depth: fidl::encoding::Depth,
3442 ) -> fidl::Result<()> {
3443 encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3444 fidl::encoding::Encode::<
3446 Bounded32NonnullableVectorOfHandles,
3447 fidl::encoding::DefaultFuchsiaResourceDialect,
3448 >::encode(
3449 (<fidl::encoding::Vector<
3450 fidl::encoding::HandleType<
3451 fidl::Handle,
3452 { fidl::ObjectType::NONE.into_raw() },
3453 2147483648,
3454 >,
3455 32,
3456 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3457 &mut self.vh0
3458 ),),
3459 encoder,
3460 offset,
3461 _depth,
3462 )
3463 }
3464 }
3465 unsafe impl<
3466 T0: fidl::encoding::Encode<
3467 fidl::encoding::Vector<
3468 fidl::encoding::HandleType<
3469 fidl::Handle,
3470 { fidl::ObjectType::NONE.into_raw() },
3471 2147483648,
3472 >,
3473 32,
3474 >,
3475 fidl::encoding::DefaultFuchsiaResourceDialect,
3476 >,
3477 >
3478 fidl::encoding::Encode<
3479 Bounded32NonnullableVectorOfHandles,
3480 fidl::encoding::DefaultFuchsiaResourceDialect,
3481 > for (T0,)
3482 {
3483 #[inline]
3484 unsafe fn encode(
3485 self,
3486 encoder: &mut fidl::encoding::Encoder<
3487 '_,
3488 fidl::encoding::DefaultFuchsiaResourceDialect,
3489 >,
3490 offset: usize,
3491 depth: fidl::encoding::Depth,
3492 ) -> fidl::Result<()> {
3493 encoder.debug_check_bounds::<Bounded32NonnullableVectorOfHandles>(offset);
3494 self.0.encode(encoder, offset + 0, depth)?;
3498 Ok(())
3499 }
3500 }
3501
3502 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3503 for Bounded32NonnullableVectorOfHandles
3504 {
3505 #[inline(always)]
3506 fn new_empty() -> Self {
3507 Self {
3508 vh0: fidl::new_empty!(
3509 fidl::encoding::Vector<
3510 fidl::encoding::HandleType<
3511 fidl::Handle,
3512 { fidl::ObjectType::NONE.into_raw() },
3513 2147483648,
3514 >,
3515 32,
3516 >,
3517 fidl::encoding::DefaultFuchsiaResourceDialect
3518 ),
3519 }
3520 }
3521
3522 #[inline]
3523 unsafe fn decode(
3524 &mut self,
3525 decoder: &mut fidl::encoding::Decoder<
3526 '_,
3527 fidl::encoding::DefaultFuchsiaResourceDialect,
3528 >,
3529 offset: usize,
3530 _depth: fidl::encoding::Depth,
3531 ) -> fidl::Result<()> {
3532 decoder.debug_check_bounds::<Self>(offset);
3533 fidl::decode!(
3535 fidl::encoding::Vector<
3536 fidl::encoding::HandleType<
3537 fidl::Handle,
3538 { fidl::ObjectType::NONE.into_raw() },
3539 2147483648,
3540 >,
3541 32,
3542 >,
3543 fidl::encoding::DefaultFuchsiaResourceDialect,
3544 &mut self.vh0,
3545 decoder,
3546 offset + 0,
3547 _depth
3548 )?;
3549 Ok(())
3550 }
3551 }
3552
3553 impl fidl::encoding::ResourceTypeMarker for Bounded32NullableVectorOfHandles {
3554 type Borrowed<'a> = &'a mut Self;
3555 fn take_or_borrow<'a>(
3556 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3557 ) -> Self::Borrowed<'a> {
3558 value
3559 }
3560 }
3561
3562 unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfHandles {
3563 type Owned = Self;
3564
3565 #[inline(always)]
3566 fn inline_align(_context: fidl::encoding::Context) -> usize {
3567 8
3568 }
3569
3570 #[inline(always)]
3571 fn inline_size(_context: fidl::encoding::Context) -> usize {
3572 16
3573 }
3574 }
3575
3576 unsafe impl
3577 fidl::encoding::Encode<
3578 Bounded32NullableVectorOfHandles,
3579 fidl::encoding::DefaultFuchsiaResourceDialect,
3580 > for &mut Bounded32NullableVectorOfHandles
3581 {
3582 #[inline]
3583 unsafe fn encode(
3584 self,
3585 encoder: &mut fidl::encoding::Encoder<
3586 '_,
3587 fidl::encoding::DefaultFuchsiaResourceDialect,
3588 >,
3589 offset: usize,
3590 _depth: fidl::encoding::Depth,
3591 ) -> fidl::Result<()> {
3592 encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3593 fidl::encoding::Encode::<
3595 Bounded32NullableVectorOfHandles,
3596 fidl::encoding::DefaultFuchsiaResourceDialect,
3597 >::encode(
3598 (<fidl::encoding::Optional<
3599 fidl::encoding::Vector<
3600 fidl::encoding::HandleType<
3601 fidl::Handle,
3602 { fidl::ObjectType::NONE.into_raw() },
3603 2147483648,
3604 >,
3605 32,
3606 >,
3607 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3608 &mut self.vh0
3609 ),),
3610 encoder,
3611 offset,
3612 _depth,
3613 )
3614 }
3615 }
3616 unsafe impl<
3617 T0: fidl::encoding::Encode<
3618 fidl::encoding::Optional<
3619 fidl::encoding::Vector<
3620 fidl::encoding::HandleType<
3621 fidl::Handle,
3622 { fidl::ObjectType::NONE.into_raw() },
3623 2147483648,
3624 >,
3625 32,
3626 >,
3627 >,
3628 fidl::encoding::DefaultFuchsiaResourceDialect,
3629 >,
3630 >
3631 fidl::encoding::Encode<
3632 Bounded32NullableVectorOfHandles,
3633 fidl::encoding::DefaultFuchsiaResourceDialect,
3634 > for (T0,)
3635 {
3636 #[inline]
3637 unsafe fn encode(
3638 self,
3639 encoder: &mut fidl::encoding::Encoder<
3640 '_,
3641 fidl::encoding::DefaultFuchsiaResourceDialect,
3642 >,
3643 offset: usize,
3644 depth: fidl::encoding::Depth,
3645 ) -> fidl::Result<()> {
3646 encoder.debug_check_bounds::<Bounded32NullableVectorOfHandles>(offset);
3647 self.0.encode(encoder, offset + 0, depth)?;
3651 Ok(())
3652 }
3653 }
3654
3655 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3656 for Bounded32NullableVectorOfHandles
3657 {
3658 #[inline(always)]
3659 fn new_empty() -> Self {
3660 Self {
3661 vh0: fidl::new_empty!(
3662 fidl::encoding::Optional<
3663 fidl::encoding::Vector<
3664 fidl::encoding::HandleType<
3665 fidl::Handle,
3666 { fidl::ObjectType::NONE.into_raw() },
3667 2147483648,
3668 >,
3669 32,
3670 >,
3671 >,
3672 fidl::encoding::DefaultFuchsiaResourceDialect
3673 ),
3674 }
3675 }
3676
3677 #[inline]
3678 unsafe fn decode(
3679 &mut self,
3680 decoder: &mut fidl::encoding::Decoder<
3681 '_,
3682 fidl::encoding::DefaultFuchsiaResourceDialect,
3683 >,
3684 offset: usize,
3685 _depth: fidl::encoding::Depth,
3686 ) -> fidl::Result<()> {
3687 decoder.debug_check_bounds::<Self>(offset);
3688 fidl::decode!(
3690 fidl::encoding::Optional<
3691 fidl::encoding::Vector<
3692 fidl::encoding::HandleType<
3693 fidl::Handle,
3694 { fidl::ObjectType::NONE.into_raw() },
3695 2147483648,
3696 >,
3697 32,
3698 >,
3699 >,
3700 fidl::encoding::DefaultFuchsiaResourceDialect,
3701 &mut self.vh0,
3702 decoder,
3703 offset + 0,
3704 _depth
3705 )?;
3706 Ok(())
3707 }
3708 }
3709
3710 impl fidl::encoding::ResourceTypeMarker for BoxOfSingleHandle {
3711 type Borrowed<'a> = &'a mut Self;
3712 fn take_or_borrow<'a>(
3713 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3714 ) -> Self::Borrowed<'a> {
3715 value
3716 }
3717 }
3718
3719 unsafe impl fidl::encoding::TypeMarker for BoxOfSingleHandle {
3720 type Owned = Self;
3721
3722 #[inline(always)]
3723 fn inline_align(_context: fidl::encoding::Context) -> usize {
3724 8
3725 }
3726
3727 #[inline(always)]
3728 fn inline_size(_context: fidl::encoding::Context) -> usize {
3729 8
3730 }
3731 }
3732
3733 unsafe impl
3734 fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3735 for &mut BoxOfSingleHandle
3736 {
3737 #[inline]
3738 unsafe fn encode(
3739 self,
3740 encoder: &mut fidl::encoding::Encoder<
3741 '_,
3742 fidl::encoding::DefaultFuchsiaResourceDialect,
3743 >,
3744 offset: usize,
3745 _depth: fidl::encoding::Depth,
3746 ) -> fidl::Result<()> {
3747 encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3748 fidl::encoding::Encode::<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3750 (
3751 <fidl::encoding::Boxed<SingleHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3752 ),
3753 encoder, offset, _depth
3754 )
3755 }
3756 }
3757 unsafe impl<
3758 T0: fidl::encoding::Encode<
3759 fidl::encoding::Boxed<SingleHandle>,
3760 fidl::encoding::DefaultFuchsiaResourceDialect,
3761 >,
3762 > fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3763 for (T0,)
3764 {
3765 #[inline]
3766 unsafe fn encode(
3767 self,
3768 encoder: &mut fidl::encoding::Encoder<
3769 '_,
3770 fidl::encoding::DefaultFuchsiaResourceDialect,
3771 >,
3772 offset: usize,
3773 depth: fidl::encoding::Depth,
3774 ) -> fidl::Result<()> {
3775 encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3776 self.0.encode(encoder, offset + 0, depth)?;
3780 Ok(())
3781 }
3782 }
3783
3784 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3785 for BoxOfSingleHandle
3786 {
3787 #[inline(always)]
3788 fn new_empty() -> Self {
3789 Self {
3790 b: fidl::new_empty!(
3791 fidl::encoding::Boxed<SingleHandle>,
3792 fidl::encoding::DefaultFuchsiaResourceDialect
3793 ),
3794 }
3795 }
3796
3797 #[inline]
3798 unsafe fn decode(
3799 &mut self,
3800 decoder: &mut fidl::encoding::Decoder<
3801 '_,
3802 fidl::encoding::DefaultFuchsiaResourceDialect,
3803 >,
3804 offset: usize,
3805 _depth: fidl::encoding::Depth,
3806 ) -> fidl::Result<()> {
3807 decoder.debug_check_bounds::<Self>(offset);
3808 fidl::decode!(
3810 fidl::encoding::Boxed<SingleHandle>,
3811 fidl::encoding::DefaultFuchsiaResourceDialect,
3812 &mut self.b,
3813 decoder,
3814 offset + 0,
3815 _depth
3816 )?;
3817 Ok(())
3818 }
3819 }
3820
3821 impl fidl::encoding::ResourceTypeMarker for BoxOfSingleOptionalHandle {
3822 type Borrowed<'a> = &'a mut Self;
3823 fn take_or_borrow<'a>(
3824 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3825 ) -> Self::Borrowed<'a> {
3826 value
3827 }
3828 }
3829
3830 unsafe impl fidl::encoding::TypeMarker for BoxOfSingleOptionalHandle {
3831 type Owned = Self;
3832
3833 #[inline(always)]
3834 fn inline_align(_context: fidl::encoding::Context) -> usize {
3835 8
3836 }
3837
3838 #[inline(always)]
3839 fn inline_size(_context: fidl::encoding::Context) -> usize {
3840 8
3841 }
3842 }
3843
3844 unsafe impl
3845 fidl::encoding::Encode<
3846 BoxOfSingleOptionalHandle,
3847 fidl::encoding::DefaultFuchsiaResourceDialect,
3848 > for &mut BoxOfSingleOptionalHandle
3849 {
3850 #[inline]
3851 unsafe fn encode(
3852 self,
3853 encoder: &mut fidl::encoding::Encoder<
3854 '_,
3855 fidl::encoding::DefaultFuchsiaResourceDialect,
3856 >,
3857 offset: usize,
3858 _depth: fidl::encoding::Depth,
3859 ) -> fidl::Result<()> {
3860 encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3861 fidl::encoding::Encode::<BoxOfSingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3863 (
3864 <fidl::encoding::Boxed<SingleOptionalHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3865 ),
3866 encoder, offset, _depth
3867 )
3868 }
3869 }
3870 unsafe impl<
3871 T0: fidl::encoding::Encode<
3872 fidl::encoding::Boxed<SingleOptionalHandle>,
3873 fidl::encoding::DefaultFuchsiaResourceDialect,
3874 >,
3875 >
3876 fidl::encoding::Encode<
3877 BoxOfSingleOptionalHandle,
3878 fidl::encoding::DefaultFuchsiaResourceDialect,
3879 > for (T0,)
3880 {
3881 #[inline]
3882 unsafe fn encode(
3883 self,
3884 encoder: &mut fidl::encoding::Encoder<
3885 '_,
3886 fidl::encoding::DefaultFuchsiaResourceDialect,
3887 >,
3888 offset: usize,
3889 depth: fidl::encoding::Depth,
3890 ) -> fidl::Result<()> {
3891 encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3892 self.0.encode(encoder, offset + 0, depth)?;
3896 Ok(())
3897 }
3898 }
3899
3900 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3901 for BoxOfSingleOptionalHandle
3902 {
3903 #[inline(always)]
3904 fn new_empty() -> Self {
3905 Self {
3906 b: fidl::new_empty!(
3907 fidl::encoding::Boxed<SingleOptionalHandle>,
3908 fidl::encoding::DefaultFuchsiaResourceDialect
3909 ),
3910 }
3911 }
3912
3913 #[inline]
3914 unsafe fn decode(
3915 &mut self,
3916 decoder: &mut fidl::encoding::Decoder<
3917 '_,
3918 fidl::encoding::DefaultFuchsiaResourceDialect,
3919 >,
3920 offset: usize,
3921 _depth: fidl::encoding::Depth,
3922 ) -> fidl::Result<()> {
3923 decoder.debug_check_bounds::<Self>(offset);
3924 fidl::decode!(
3926 fidl::encoding::Boxed<SingleOptionalHandle>,
3927 fidl::encoding::DefaultFuchsiaResourceDialect,
3928 &mut self.b,
3929 decoder,
3930 offset + 0,
3931 _depth
3932 )?;
3933 Ok(())
3934 }
3935 }
3936
3937 impl fidl::encoding::ResourceTypeMarker for CreateComponentRequest {
3938 type Borrowed<'a> = &'a mut Self;
3939 fn take_or_borrow<'a>(
3940 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3941 ) -> Self::Borrowed<'a> {
3942 value
3943 }
3944 }
3945
3946 unsafe impl fidl::encoding::TypeMarker for CreateComponentRequest {
3947 type Owned = Self;
3948
3949 #[inline(always)]
3950 fn inline_align(_context: fidl::encoding::Context) -> usize {
3951 8
3952 }
3953
3954 #[inline(always)]
3955 fn inline_size(_context: fidl::encoding::Context) -> usize {
3956 80
3957 }
3958 }
3959
3960 unsafe impl
3961 fidl::encoding::Encode<
3962 CreateComponentRequest,
3963 fidl::encoding::DefaultFuchsiaResourceDialect,
3964 > for &mut CreateComponentRequest
3965 {
3966 #[inline]
3967 unsafe fn encode(
3968 self,
3969 encoder: &mut fidl::encoding::Encoder<
3970 '_,
3971 fidl::encoding::DefaultFuchsiaResourceDialect,
3972 >,
3973 offset: usize,
3974 _depth: fidl::encoding::Depth,
3975 ) -> fidl::Result<()> {
3976 encoder.debug_check_bounds::<CreateComponentRequest>(offset);
3977 fidl::encoding::Encode::<
3979 CreateComponentRequest,
3980 fidl::encoding::DefaultFuchsiaResourceDialect,
3981 >::encode(
3982 (
3983 <LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3984 &mut self.launch_info,
3985 ),
3986 <fidl::encoding::Optional<
3987 fidl::encoding::Endpoint<
3988 fidl::endpoints::ServerEnd<ComponentControllerMarker>,
3989 >,
3990 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3991 &mut self.controller
3992 ),
3993 ),
3994 encoder,
3995 offset,
3996 _depth,
3997 )
3998 }
3999 }
4000 unsafe impl<
4001 T0: fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>,
4002 T1: fidl::encoding::Encode<
4003 fidl::encoding::Optional<
4004 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4005 >,
4006 fidl::encoding::DefaultFuchsiaResourceDialect,
4007 >,
4008 >
4009 fidl::encoding::Encode<
4010 CreateComponentRequest,
4011 fidl::encoding::DefaultFuchsiaResourceDialect,
4012 > for (T0, T1)
4013 {
4014 #[inline]
4015 unsafe fn encode(
4016 self,
4017 encoder: &mut fidl::encoding::Encoder<
4018 '_,
4019 fidl::encoding::DefaultFuchsiaResourceDialect,
4020 >,
4021 offset: usize,
4022 depth: fidl::encoding::Depth,
4023 ) -> fidl::Result<()> {
4024 encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4025 unsafe {
4028 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
4029 (ptr as *mut u64).write_unaligned(0);
4030 }
4031 self.0.encode(encoder, offset + 0, depth)?;
4033 self.1.encode(encoder, offset + 72, depth)?;
4034 Ok(())
4035 }
4036 }
4037
4038 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4039 for CreateComponentRequest
4040 {
4041 #[inline(always)]
4042 fn new_empty() -> Self {
4043 Self {
4044 launch_info: fidl::new_empty!(
4045 LaunchInfo,
4046 fidl::encoding::DefaultFuchsiaResourceDialect
4047 ),
4048 controller: fidl::new_empty!(
4049 fidl::encoding::Optional<
4050 fidl::encoding::Endpoint<
4051 fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4052 >,
4053 >,
4054 fidl::encoding::DefaultFuchsiaResourceDialect
4055 ),
4056 }
4057 }
4058
4059 #[inline]
4060 unsafe fn decode(
4061 &mut self,
4062 decoder: &mut fidl::encoding::Decoder<
4063 '_,
4064 fidl::encoding::DefaultFuchsiaResourceDialect,
4065 >,
4066 offset: usize,
4067 _depth: fidl::encoding::Depth,
4068 ) -> fidl::Result<()> {
4069 decoder.debug_check_bounds::<Self>(offset);
4070 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
4072 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4073 let mask = 0xffffffff00000000u64;
4074 let maskedval = padval & mask;
4075 if maskedval != 0 {
4076 return Err(fidl::Error::NonZeroPadding {
4077 padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
4078 });
4079 }
4080 fidl::decode!(
4081 LaunchInfo,
4082 fidl::encoding::DefaultFuchsiaResourceDialect,
4083 &mut self.launch_info,
4084 decoder,
4085 offset + 0,
4086 _depth
4087 )?;
4088 fidl::decode!(
4089 fidl::encoding::Optional<
4090 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4091 >,
4092 fidl::encoding::DefaultFuchsiaResourceDialect,
4093 &mut self.controller,
4094 decoder,
4095 offset + 72,
4096 _depth
4097 )?;
4098 Ok(())
4099 }
4100 }
4101
4102 impl fidl::encoding::ResourceTypeMarker for EmptyResourceTableStruct {
4103 type Borrowed<'a> = &'a mut Self;
4104 fn take_or_borrow<'a>(
4105 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4106 ) -> Self::Borrowed<'a> {
4107 value
4108 }
4109 }
4110
4111 unsafe impl fidl::encoding::TypeMarker for EmptyResourceTableStruct {
4112 type Owned = Self;
4113
4114 #[inline(always)]
4115 fn inline_align(_context: fidl::encoding::Context) -> usize {
4116 8
4117 }
4118
4119 #[inline(always)]
4120 fn inline_size(_context: fidl::encoding::Context) -> usize {
4121 16
4122 }
4123 }
4124
4125 unsafe impl
4126 fidl::encoding::Encode<
4127 EmptyResourceTableStruct,
4128 fidl::encoding::DefaultFuchsiaResourceDialect,
4129 > for &mut EmptyResourceTableStruct
4130 {
4131 #[inline]
4132 unsafe fn encode(
4133 self,
4134 encoder: &mut fidl::encoding::Encoder<
4135 '_,
4136 fidl::encoding::DefaultFuchsiaResourceDialect,
4137 >,
4138 offset: usize,
4139 _depth: fidl::encoding::Depth,
4140 ) -> fidl::Result<()> {
4141 encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4142 fidl::encoding::Encode::<
4144 EmptyResourceTableStruct,
4145 fidl::encoding::DefaultFuchsiaResourceDialect,
4146 >::encode(
4147 (<EmptyResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4148 &mut self.table,
4149 ),),
4150 encoder,
4151 offset,
4152 _depth,
4153 )
4154 }
4155 }
4156 unsafe impl<
4157 T0: fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4158 >
4159 fidl::encoding::Encode<
4160 EmptyResourceTableStruct,
4161 fidl::encoding::DefaultFuchsiaResourceDialect,
4162 > for (T0,)
4163 {
4164 #[inline]
4165 unsafe fn encode(
4166 self,
4167 encoder: &mut fidl::encoding::Encoder<
4168 '_,
4169 fidl::encoding::DefaultFuchsiaResourceDialect,
4170 >,
4171 offset: usize,
4172 depth: fidl::encoding::Depth,
4173 ) -> fidl::Result<()> {
4174 encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4175 self.0.encode(encoder, offset + 0, depth)?;
4179 Ok(())
4180 }
4181 }
4182
4183 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4184 for EmptyResourceTableStruct
4185 {
4186 #[inline(always)]
4187 fn new_empty() -> Self {
4188 Self {
4189 table: fidl::new_empty!(
4190 EmptyResourceTable,
4191 fidl::encoding::DefaultFuchsiaResourceDialect
4192 ),
4193 }
4194 }
4195
4196 #[inline]
4197 unsafe fn decode(
4198 &mut self,
4199 decoder: &mut fidl::encoding::Decoder<
4200 '_,
4201 fidl::encoding::DefaultFuchsiaResourceDialect,
4202 >,
4203 offset: usize,
4204 _depth: fidl::encoding::Depth,
4205 ) -> fidl::Result<()> {
4206 decoder.debug_check_bounds::<Self>(offset);
4207 fidl::decode!(
4209 EmptyResourceTable,
4210 fidl::encoding::DefaultFuchsiaResourceDialect,
4211 &mut self.table,
4212 decoder,
4213 offset + 0,
4214 _depth
4215 )?;
4216 Ok(())
4217 }
4218 }
4219
4220 impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnionStruct {
4221 type Borrowed<'a> = &'a mut Self;
4222 fn take_or_borrow<'a>(
4223 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4224 ) -> Self::Borrowed<'a> {
4225 value
4226 }
4227 }
4228
4229 unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnionStruct {
4230 type Owned = Self;
4231
4232 #[inline(always)]
4233 fn inline_align(_context: fidl::encoding::Context) -> usize {
4234 8
4235 }
4236
4237 #[inline(always)]
4238 fn inline_size(_context: fidl::encoding::Context) -> usize {
4239 16
4240 }
4241 }
4242
4243 unsafe impl
4244 fidl::encoding::Encode<
4245 EnvelopeInliningTestUnionStruct,
4246 fidl::encoding::DefaultFuchsiaResourceDialect,
4247 > for &mut EnvelopeInliningTestUnionStruct
4248 {
4249 #[inline]
4250 unsafe fn encode(
4251 self,
4252 encoder: &mut fidl::encoding::Encoder<
4253 '_,
4254 fidl::encoding::DefaultFuchsiaResourceDialect,
4255 >,
4256 offset: usize,
4257 _depth: fidl::encoding::Depth,
4258 ) -> fidl::Result<()> {
4259 encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4260 fidl::encoding::Encode::<EnvelopeInliningTestUnionStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4262 (
4263 <EnvelopeInliningTestUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
4264 ),
4265 encoder, offset, _depth
4266 )
4267 }
4268 }
4269 unsafe impl<
4270 T0: fidl::encoding::Encode<
4271 EnvelopeInliningTestUnion,
4272 fidl::encoding::DefaultFuchsiaResourceDialect,
4273 >,
4274 >
4275 fidl::encoding::Encode<
4276 EnvelopeInliningTestUnionStruct,
4277 fidl::encoding::DefaultFuchsiaResourceDialect,
4278 > for (T0,)
4279 {
4280 #[inline]
4281 unsafe fn encode(
4282 self,
4283 encoder: &mut fidl::encoding::Encoder<
4284 '_,
4285 fidl::encoding::DefaultFuchsiaResourceDialect,
4286 >,
4287 offset: usize,
4288 depth: fidl::encoding::Depth,
4289 ) -> fidl::Result<()> {
4290 encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4291 self.0.encode(encoder, offset + 0, depth)?;
4295 Ok(())
4296 }
4297 }
4298
4299 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4300 for EnvelopeInliningTestUnionStruct
4301 {
4302 #[inline(always)]
4303 fn new_empty() -> Self {
4304 Self {
4305 u: fidl::new_empty!(
4306 EnvelopeInliningTestUnion,
4307 fidl::encoding::DefaultFuchsiaResourceDialect
4308 ),
4309 }
4310 }
4311
4312 #[inline]
4313 unsafe fn decode(
4314 &mut self,
4315 decoder: &mut fidl::encoding::Decoder<
4316 '_,
4317 fidl::encoding::DefaultFuchsiaResourceDialect,
4318 >,
4319 offset: usize,
4320 _depth: fidl::encoding::Depth,
4321 ) -> fidl::Result<()> {
4322 decoder.debug_check_bounds::<Self>(offset);
4323 fidl::decode!(
4325 EnvelopeInliningTestUnion,
4326 fidl::encoding::DefaultFuchsiaResourceDialect,
4327 &mut self.u,
4328 decoder,
4329 offset + 0,
4330 _depth
4331 )?;
4332 Ok(())
4333 }
4334 }
4335
4336 impl fidl::encoding::ResourceTypeMarker for EventWithDefaultRights {
4337 type Borrowed<'a> = &'a mut Self;
4338 fn take_or_borrow<'a>(
4339 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4340 ) -> Self::Borrowed<'a> {
4341 value
4342 }
4343 }
4344
4345 unsafe impl fidl::encoding::TypeMarker for EventWithDefaultRights {
4346 type Owned = Self;
4347
4348 #[inline(always)]
4349 fn inline_align(_context: fidl::encoding::Context) -> usize {
4350 4
4351 }
4352
4353 #[inline(always)]
4354 fn inline_size(_context: fidl::encoding::Context) -> usize {
4355 4
4356 }
4357 }
4358
4359 unsafe impl
4360 fidl::encoding::Encode<
4361 EventWithDefaultRights,
4362 fidl::encoding::DefaultFuchsiaResourceDialect,
4363 > for &mut EventWithDefaultRights
4364 {
4365 #[inline]
4366 unsafe fn encode(
4367 self,
4368 encoder: &mut fidl::encoding::Encoder<
4369 '_,
4370 fidl::encoding::DefaultFuchsiaResourceDialect,
4371 >,
4372 offset: usize,
4373 _depth: fidl::encoding::Depth,
4374 ) -> fidl::Result<()> {
4375 encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4376 fidl::encoding::Encode::<
4378 EventWithDefaultRights,
4379 fidl::encoding::DefaultFuchsiaResourceDialect,
4380 >::encode(
4381 (<fidl::encoding::HandleType<
4382 fidl::Event,
4383 { fidl::ObjectType::EVENT.into_raw() },
4384 53251,
4385 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4386 &mut self.h
4387 ),),
4388 encoder,
4389 offset,
4390 _depth,
4391 )
4392 }
4393 }
4394 unsafe impl<
4395 T0: fidl::encoding::Encode<
4396 fidl::encoding::HandleType<
4397 fidl::Event,
4398 { fidl::ObjectType::EVENT.into_raw() },
4399 53251,
4400 >,
4401 fidl::encoding::DefaultFuchsiaResourceDialect,
4402 >,
4403 >
4404 fidl::encoding::Encode<
4405 EventWithDefaultRights,
4406 fidl::encoding::DefaultFuchsiaResourceDialect,
4407 > for (T0,)
4408 {
4409 #[inline]
4410 unsafe fn encode(
4411 self,
4412 encoder: &mut fidl::encoding::Encoder<
4413 '_,
4414 fidl::encoding::DefaultFuchsiaResourceDialect,
4415 >,
4416 offset: usize,
4417 depth: fidl::encoding::Depth,
4418 ) -> fidl::Result<()> {
4419 encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4420 self.0.encode(encoder, offset + 0, depth)?;
4424 Ok(())
4425 }
4426 }
4427
4428 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4429 for EventWithDefaultRights
4430 {
4431 #[inline(always)]
4432 fn new_empty() -> Self {
4433 Self {
4434 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect),
4435 }
4436 }
4437
4438 #[inline]
4439 unsafe fn decode(
4440 &mut self,
4441 decoder: &mut fidl::encoding::Decoder<
4442 '_,
4443 fidl::encoding::DefaultFuchsiaResourceDialect,
4444 >,
4445 offset: usize,
4446 _depth: fidl::encoding::Depth,
4447 ) -> fidl::Result<()> {
4448 decoder.debug_check_bounds::<Self>(offset);
4449 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4451 Ok(())
4452 }
4453 }
4454
4455 impl fidl::encoding::ResourceTypeMarker for EventWithReducedRights {
4456 type Borrowed<'a> = &'a mut Self;
4457 fn take_or_borrow<'a>(
4458 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4459 ) -> Self::Borrowed<'a> {
4460 value
4461 }
4462 }
4463
4464 unsafe impl fidl::encoding::TypeMarker for EventWithReducedRights {
4465 type Owned = Self;
4466
4467 #[inline(always)]
4468 fn inline_align(_context: fidl::encoding::Context) -> usize {
4469 4
4470 }
4471
4472 #[inline(always)]
4473 fn inline_size(_context: fidl::encoding::Context) -> usize {
4474 4
4475 }
4476 }
4477
4478 unsafe impl
4479 fidl::encoding::Encode<
4480 EventWithReducedRights,
4481 fidl::encoding::DefaultFuchsiaResourceDialect,
4482 > for &mut EventWithReducedRights
4483 {
4484 #[inline]
4485 unsafe fn encode(
4486 self,
4487 encoder: &mut fidl::encoding::Encoder<
4488 '_,
4489 fidl::encoding::DefaultFuchsiaResourceDialect,
4490 >,
4491 offset: usize,
4492 _depth: fidl::encoding::Depth,
4493 ) -> fidl::Result<()> {
4494 encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4495 fidl::encoding::Encode::<
4497 EventWithReducedRights,
4498 fidl::encoding::DefaultFuchsiaResourceDialect,
4499 >::encode(
4500 (<fidl::encoding::HandleType<
4501 fidl::Event,
4502 { fidl::ObjectType::EVENT.into_raw() },
4503 49155,
4504 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4505 &mut self.h
4506 ),),
4507 encoder,
4508 offset,
4509 _depth,
4510 )
4511 }
4512 }
4513 unsafe impl<
4514 T0: fidl::encoding::Encode<
4515 fidl::encoding::HandleType<
4516 fidl::Event,
4517 { fidl::ObjectType::EVENT.into_raw() },
4518 49155,
4519 >,
4520 fidl::encoding::DefaultFuchsiaResourceDialect,
4521 >,
4522 >
4523 fidl::encoding::Encode<
4524 EventWithReducedRights,
4525 fidl::encoding::DefaultFuchsiaResourceDialect,
4526 > for (T0,)
4527 {
4528 #[inline]
4529 unsafe fn encode(
4530 self,
4531 encoder: &mut fidl::encoding::Encoder<
4532 '_,
4533 fidl::encoding::DefaultFuchsiaResourceDialect,
4534 >,
4535 offset: usize,
4536 depth: fidl::encoding::Depth,
4537 ) -> fidl::Result<()> {
4538 encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4539 self.0.encode(encoder, offset + 0, depth)?;
4543 Ok(())
4544 }
4545 }
4546
4547 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4548 for EventWithReducedRights
4549 {
4550 #[inline(always)]
4551 fn new_empty() -> Self {
4552 Self {
4553 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
4554 }
4555 }
4556
4557 #[inline]
4558 unsafe fn decode(
4559 &mut self,
4560 decoder: &mut fidl::encoding::Decoder<
4561 '_,
4562 fidl::encoding::DefaultFuchsiaResourceDialect,
4563 >,
4564 offset: usize,
4565 _depth: fidl::encoding::Depth,
4566 ) -> fidl::Result<()> {
4567 decoder.debug_check_bounds::<Self>(offset);
4568 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4570 Ok(())
4571 }
4572 }
4573
4574 impl fidl::encoding::ResourceTypeMarker for FidlvizDemo {
4575 type Borrowed<'a> = &'a mut Self;
4576 fn take_or_borrow<'a>(
4577 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4578 ) -> Self::Borrowed<'a> {
4579 value
4580 }
4581 }
4582
4583 unsafe impl fidl::encoding::TypeMarker for FidlvizDemo {
4584 type Owned = Self;
4585
4586 #[inline(always)]
4587 fn inline_align(_context: fidl::encoding::Context) -> usize {
4588 8
4589 }
4590
4591 #[inline(always)]
4592 fn inline_size(_context: fidl::encoding::Context) -> usize {
4593 248
4594 }
4595 }
4596
4597 unsafe impl fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4598 for &mut FidlvizDemo
4599 {
4600 #[inline]
4601 unsafe fn encode(
4602 self,
4603 encoder: &mut fidl::encoding::Encoder<
4604 '_,
4605 fidl::encoding::DefaultFuchsiaResourceDialect,
4606 >,
4607 offset: usize,
4608 _depth: fidl::encoding::Depth,
4609 ) -> fidl::Result<()> {
4610 encoder.debug_check_bounds::<FidlvizDemo>(offset);
4611 fidl::encoding::Encode::<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4613 (
4614 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
4615 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
4616 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
4617 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
4618 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
4619 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
4620 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
4621 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
4622 <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
4623 <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f10),
4624 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f11),
4625 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f12),
4626 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f13),
4627 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.f14),
4628 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f15),
4629 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f16),
4630 <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f17),
4631 <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f18),
4632 <fidl::encoding::UnboundedVector<f64> as fidl::encoding::ValueTypeMarker>::borrow(&self.f19),
4633 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f20),
4634 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.f21),
4635 <FidlvizBits as fidl::encoding::ValueTypeMarker>::borrow(&self.f22),
4636 <FidlvizEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.f23),
4637 <FidlvizStruct1 as fidl::encoding::ValueTypeMarker>::borrow(&self.f24),
4638 <FidlvizStruct2 as fidl::encoding::ValueTypeMarker>::borrow(&self.f25),
4639 <fidl::encoding::Boxed<FidlvizStruct1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f26),
4640 <fidl::encoding::Boxed<FidlvizStruct2> as fidl::encoding::ValueTypeMarker>::borrow(&self.f27),
4641 <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f28),
4642 <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f29),
4643 <fidl::encoding::OptionalUnion<FidlvizUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.f30),
4644 <FidlvizUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.f31),
4645 ),
4646 encoder, offset, _depth
4647 )
4648 }
4649 }
4650 unsafe impl<
4651 T0: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4652 T1: fidl::encoding::Encode<i8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4653 T2: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4654 T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4655 T4: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4656 T5: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4657 T6: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4658 T7: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4659 T8: fidl::encoding::Encode<f32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4660 T9: fidl::encoding::Encode<f64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4661 T10: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4662 T11: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4663 T12: fidl::encoding::Encode<
4664 fidl::encoding::UnboundedString,
4665 fidl::encoding::DefaultFuchsiaResourceDialect,
4666 >,
4667 T13: fidl::encoding::Encode<
4668 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4669 fidl::encoding::DefaultFuchsiaResourceDialect,
4670 >,
4671 T14: fidl::encoding::Encode<
4672 fidl::encoding::UnboundedString,
4673 fidl::encoding::DefaultFuchsiaResourceDialect,
4674 >,
4675 T15: fidl::encoding::Encode<
4676 fidl::encoding::Optional<
4677 fidl::encoding::HandleType<
4678 fidl::Handle,
4679 { fidl::ObjectType::NONE.into_raw() },
4680 2147483648,
4681 >,
4682 >,
4683 fidl::encoding::DefaultFuchsiaResourceDialect,
4684 >,
4685 T16: fidl::encoding::Encode<
4686 fidl::encoding::HandleType<
4687 fidl::Handle,
4688 { fidl::ObjectType::NONE.into_raw() },
4689 2147483648,
4690 >,
4691 fidl::encoding::DefaultFuchsiaResourceDialect,
4692 >,
4693 T17: fidl::encoding::Encode<
4694 fidl::encoding::Array<u8, 3>,
4695 fidl::encoding::DefaultFuchsiaResourceDialect,
4696 >,
4697 T18: fidl::encoding::Encode<
4698 fidl::encoding::UnboundedVector<f64>,
4699 fidl::encoding::DefaultFuchsiaResourceDialect,
4700 >,
4701 T19: fidl::encoding::Encode<
4702 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4703 fidl::encoding::DefaultFuchsiaResourceDialect,
4704 >,
4705 T20: fidl::encoding::Encode<
4706 fidl::encoding::UnboundedVector<u8>,
4707 fidl::encoding::DefaultFuchsiaResourceDialect,
4708 >,
4709 T21: fidl::encoding::Encode<FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect>,
4710 T22: fidl::encoding::Encode<FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
4711 T23: fidl::encoding::Encode<FidlvizStruct1, fidl::encoding::DefaultFuchsiaResourceDialect>,
4712 T24: fidl::encoding::Encode<FidlvizStruct2, fidl::encoding::DefaultFuchsiaResourceDialect>,
4713 T25: fidl::encoding::Encode<
4714 fidl::encoding::Boxed<FidlvizStruct1>,
4715 fidl::encoding::DefaultFuchsiaResourceDialect,
4716 >,
4717 T26: fidl::encoding::Encode<
4718 fidl::encoding::Boxed<FidlvizStruct2>,
4719 fidl::encoding::DefaultFuchsiaResourceDialect,
4720 >,
4721 T27: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4722 T28: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4723 T29: fidl::encoding::Encode<
4724 fidl::encoding::OptionalUnion<FidlvizUnion>,
4725 fidl::encoding::DefaultFuchsiaResourceDialect,
4726 >,
4727 T30: fidl::encoding::Encode<FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
4728 > fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4729 for (
4730 T0,
4731 T1,
4732 T2,
4733 T3,
4734 T4,
4735 T5,
4736 T6,
4737 T7,
4738 T8,
4739 T9,
4740 T10,
4741 T11,
4742 T12,
4743 T13,
4744 T14,
4745 T15,
4746 T16,
4747 T17,
4748 T18,
4749 T19,
4750 T20,
4751 T21,
4752 T22,
4753 T23,
4754 T24,
4755 T25,
4756 T26,
4757 T27,
4758 T28,
4759 T29,
4760 T30,
4761 )
4762 {
4763 #[inline]
4764 unsafe fn encode(
4765 self,
4766 encoder: &mut fidl::encoding::Encoder<
4767 '_,
4768 fidl::encoding::DefaultFuchsiaResourceDialect,
4769 >,
4770 offset: usize,
4771 depth: fidl::encoding::Depth,
4772 ) -> fidl::Result<()> {
4773 encoder.debug_check_bounds::<FidlvizDemo>(offset);
4774 unsafe {
4777 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4778 (ptr as *mut u64).write_unaligned(0);
4779 }
4780 unsafe {
4781 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
4782 (ptr as *mut u64).write_unaligned(0);
4783 }
4784 unsafe {
4785 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(152);
4786 (ptr as *mut u64).write_unaligned(0);
4787 }
4788 self.0.encode(encoder, offset + 0, depth)?;
4790 self.1.encode(encoder, offset + 1, depth)?;
4791 self.2.encode(encoder, offset + 2, depth)?;
4792 self.3.encode(encoder, offset + 4, depth)?;
4793 self.4.encode(encoder, offset + 8, depth)?;
4794 self.5.encode(encoder, offset + 16, depth)?;
4795 self.6.encode(encoder, offset + 17, depth)?;
4796 self.7.encode(encoder, offset + 18, depth)?;
4797 self.8.encode(encoder, offset + 20, depth)?;
4798 self.9.encode(encoder, offset + 24, depth)?;
4799 self.10.encode(encoder, offset + 32, depth)?;
4800 self.11.encode(encoder, offset + 33, depth)?;
4801 self.12.encode(encoder, offset + 40, depth)?;
4802 self.13.encode(encoder, offset + 56, depth)?;
4803 self.14.encode(encoder, offset + 72, depth)?;
4804 self.15.encode(encoder, offset + 88, depth)?;
4805 self.16.encode(encoder, offset + 92, depth)?;
4806 self.17.encode(encoder, offset + 96, depth)?;
4807 self.18.encode(encoder, offset + 104, depth)?;
4808 self.19.encode(encoder, offset + 120, depth)?;
4809 self.20.encode(encoder, offset + 136, depth)?;
4810 self.21.encode(encoder, offset + 152, depth)?;
4811 self.22.encode(encoder, offset + 153, depth)?;
4812 self.23.encode(encoder, offset + 154, depth)?;
4813 self.24.encode(encoder, offset + 160, depth)?;
4814 self.25.encode(encoder, offset + 168, depth)?;
4815 self.26.encode(encoder, offset + 176, depth)?;
4816 self.27.encode(encoder, offset + 184, depth)?;
4817 self.28.encode(encoder, offset + 200, depth)?;
4818 self.29.encode(encoder, offset + 216, depth)?;
4819 self.30.encode(encoder, offset + 232, depth)?;
4820 Ok(())
4821 }
4822 }
4823
4824 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {
4825 #[inline(always)]
4826 fn new_empty() -> Self {
4827 Self {
4828 f1: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4829 f2: fidl::new_empty!(i8, fidl::encoding::DefaultFuchsiaResourceDialect),
4830 f3: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4831 f4: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4832 f5: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
4833 f6: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4834 f7: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4835 f8: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4836 f9: fidl::new_empty!(f32, fidl::encoding::DefaultFuchsiaResourceDialect),
4837 f10: fidl::new_empty!(f64, fidl::encoding::DefaultFuchsiaResourceDialect),
4838 f11: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4839 f12: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4840 f13: fidl::new_empty!(
4841 fidl::encoding::UnboundedString,
4842 fidl::encoding::DefaultFuchsiaResourceDialect
4843 ),
4844 f14: fidl::new_empty!(
4845 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4846 fidl::encoding::DefaultFuchsiaResourceDialect
4847 ),
4848 f15: fidl::new_empty!(
4849 fidl::encoding::UnboundedString,
4850 fidl::encoding::DefaultFuchsiaResourceDialect
4851 ),
4852 f16: fidl::new_empty!(
4853 fidl::encoding::Optional<
4854 fidl::encoding::HandleType<
4855 fidl::Handle,
4856 { fidl::ObjectType::NONE.into_raw() },
4857 2147483648,
4858 >,
4859 >,
4860 fidl::encoding::DefaultFuchsiaResourceDialect
4861 ),
4862 f17: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
4863 f18: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
4864 f19: fidl::new_empty!(
4865 fidl::encoding::UnboundedVector<f64>,
4866 fidl::encoding::DefaultFuchsiaResourceDialect
4867 ),
4868 f20: fidl::new_empty!(
4869 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4870 fidl::encoding::DefaultFuchsiaResourceDialect
4871 ),
4872 f21: fidl::new_empty!(
4873 fidl::encoding::UnboundedVector<u8>,
4874 fidl::encoding::DefaultFuchsiaResourceDialect
4875 ),
4876 f22: fidl::new_empty!(FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect),
4877 f23: fidl::new_empty!(FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect),
4878 f24: fidl::new_empty!(
4879 FidlvizStruct1,
4880 fidl::encoding::DefaultFuchsiaResourceDialect
4881 ),
4882 f25: fidl::new_empty!(
4883 FidlvizStruct2,
4884 fidl::encoding::DefaultFuchsiaResourceDialect
4885 ),
4886 f26: fidl::new_empty!(
4887 fidl::encoding::Boxed<FidlvizStruct1>,
4888 fidl::encoding::DefaultFuchsiaResourceDialect
4889 ),
4890 f27: fidl::new_empty!(
4891 fidl::encoding::Boxed<FidlvizStruct2>,
4892 fidl::encoding::DefaultFuchsiaResourceDialect
4893 ),
4894 f28: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4895 f29: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4896 f30: fidl::new_empty!(
4897 fidl::encoding::OptionalUnion<FidlvizUnion>,
4898 fidl::encoding::DefaultFuchsiaResourceDialect
4899 ),
4900 f31: fidl::new_empty!(FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect),
4901 }
4902 }
4903
4904 #[inline]
4905 unsafe fn decode(
4906 &mut self,
4907 decoder: &mut fidl::encoding::Decoder<
4908 '_,
4909 fidl::encoding::DefaultFuchsiaResourceDialect,
4910 >,
4911 offset: usize,
4912 _depth: fidl::encoding::Depth,
4913 ) -> fidl::Result<()> {
4914 decoder.debug_check_bounds::<Self>(offset);
4915 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4917 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4918 let mask = 0xffffffffffff0000u64;
4919 let maskedval = padval & mask;
4920 if maskedval != 0 {
4921 return Err(fidl::Error::NonZeroPadding {
4922 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4923 });
4924 }
4925 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
4926 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4927 let mask = 0xffffffffff000000u64;
4928 let maskedval = padval & mask;
4929 if maskedval != 0 {
4930 return Err(fidl::Error::NonZeroPadding {
4931 padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
4932 });
4933 }
4934 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(152) };
4935 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4936 let mask = 0xffffffffff000000u64;
4937 let maskedval = padval & mask;
4938 if maskedval != 0 {
4939 return Err(fidl::Error::NonZeroPadding {
4940 padding_start: offset + 152 + ((mask as u64).trailing_zeros() / 8) as usize,
4941 });
4942 }
4943 fidl::decode!(
4944 u8,
4945 fidl::encoding::DefaultFuchsiaResourceDialect,
4946 &mut self.f1,
4947 decoder,
4948 offset + 0,
4949 _depth
4950 )?;
4951 fidl::decode!(
4952 i8,
4953 fidl::encoding::DefaultFuchsiaResourceDialect,
4954 &mut self.f2,
4955 decoder,
4956 offset + 1,
4957 _depth
4958 )?;
4959 fidl::decode!(
4960 u16,
4961 fidl::encoding::DefaultFuchsiaResourceDialect,
4962 &mut self.f3,
4963 decoder,
4964 offset + 2,
4965 _depth
4966 )?;
4967 fidl::decode!(
4968 u32,
4969 fidl::encoding::DefaultFuchsiaResourceDialect,
4970 &mut self.f4,
4971 decoder,
4972 offset + 4,
4973 _depth
4974 )?;
4975 fidl::decode!(
4976 u64,
4977 fidl::encoding::DefaultFuchsiaResourceDialect,
4978 &mut self.f5,
4979 decoder,
4980 offset + 8,
4981 _depth
4982 )?;
4983 fidl::decode!(
4984 u8,
4985 fidl::encoding::DefaultFuchsiaResourceDialect,
4986 &mut self.f6,
4987 decoder,
4988 offset + 16,
4989 _depth
4990 )?;
4991 fidl::decode!(
4992 u8,
4993 fidl::encoding::DefaultFuchsiaResourceDialect,
4994 &mut self.f7,
4995 decoder,
4996 offset + 17,
4997 _depth
4998 )?;
4999 fidl::decode!(
5000 u16,
5001 fidl::encoding::DefaultFuchsiaResourceDialect,
5002 &mut self.f8,
5003 decoder,
5004 offset + 18,
5005 _depth
5006 )?;
5007 fidl::decode!(
5008 f32,
5009 fidl::encoding::DefaultFuchsiaResourceDialect,
5010 &mut self.f9,
5011 decoder,
5012 offset + 20,
5013 _depth
5014 )?;
5015 fidl::decode!(
5016 f64,
5017 fidl::encoding::DefaultFuchsiaResourceDialect,
5018 &mut self.f10,
5019 decoder,
5020 offset + 24,
5021 _depth
5022 )?;
5023 fidl::decode!(
5024 bool,
5025 fidl::encoding::DefaultFuchsiaResourceDialect,
5026 &mut self.f11,
5027 decoder,
5028 offset + 32,
5029 _depth
5030 )?;
5031 fidl::decode!(
5032 bool,
5033 fidl::encoding::DefaultFuchsiaResourceDialect,
5034 &mut self.f12,
5035 decoder,
5036 offset + 33,
5037 _depth
5038 )?;
5039 fidl::decode!(
5040 fidl::encoding::UnboundedString,
5041 fidl::encoding::DefaultFuchsiaResourceDialect,
5042 &mut self.f13,
5043 decoder,
5044 offset + 40,
5045 _depth
5046 )?;
5047 fidl::decode!(
5048 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5049 fidl::encoding::DefaultFuchsiaResourceDialect,
5050 &mut self.f14,
5051 decoder,
5052 offset + 56,
5053 _depth
5054 )?;
5055 fidl::decode!(
5056 fidl::encoding::UnboundedString,
5057 fidl::encoding::DefaultFuchsiaResourceDialect,
5058 &mut self.f15,
5059 decoder,
5060 offset + 72,
5061 _depth
5062 )?;
5063 fidl::decode!(
5064 fidl::encoding::Optional<
5065 fidl::encoding::HandleType<
5066 fidl::Handle,
5067 { fidl::ObjectType::NONE.into_raw() },
5068 2147483648,
5069 >,
5070 >,
5071 fidl::encoding::DefaultFuchsiaResourceDialect,
5072 &mut self.f16,
5073 decoder,
5074 offset + 88,
5075 _depth
5076 )?;
5077 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f17, decoder, offset + 92, _depth)?;
5078 fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f18, decoder, offset + 96, _depth)?;
5079 fidl::decode!(
5080 fidl::encoding::UnboundedVector<f64>,
5081 fidl::encoding::DefaultFuchsiaResourceDialect,
5082 &mut self.f19,
5083 decoder,
5084 offset + 104,
5085 _depth
5086 )?;
5087 fidl::decode!(
5088 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
5089 fidl::encoding::DefaultFuchsiaResourceDialect,
5090 &mut self.f20,
5091 decoder,
5092 offset + 120,
5093 _depth
5094 )?;
5095 fidl::decode!(
5096 fidl::encoding::UnboundedVector<u8>,
5097 fidl::encoding::DefaultFuchsiaResourceDialect,
5098 &mut self.f21,
5099 decoder,
5100 offset + 136,
5101 _depth
5102 )?;
5103 fidl::decode!(
5104 FidlvizBits,
5105 fidl::encoding::DefaultFuchsiaResourceDialect,
5106 &mut self.f22,
5107 decoder,
5108 offset + 152,
5109 _depth
5110 )?;
5111 fidl::decode!(
5112 FidlvizEnum,
5113 fidl::encoding::DefaultFuchsiaResourceDialect,
5114 &mut self.f23,
5115 decoder,
5116 offset + 153,
5117 _depth
5118 )?;
5119 fidl::decode!(
5120 FidlvizStruct1,
5121 fidl::encoding::DefaultFuchsiaResourceDialect,
5122 &mut self.f24,
5123 decoder,
5124 offset + 154,
5125 _depth
5126 )?;
5127 fidl::decode!(
5128 FidlvizStruct2,
5129 fidl::encoding::DefaultFuchsiaResourceDialect,
5130 &mut self.f25,
5131 decoder,
5132 offset + 160,
5133 _depth
5134 )?;
5135 fidl::decode!(
5136 fidl::encoding::Boxed<FidlvizStruct1>,
5137 fidl::encoding::DefaultFuchsiaResourceDialect,
5138 &mut self.f26,
5139 decoder,
5140 offset + 168,
5141 _depth
5142 )?;
5143 fidl::decode!(
5144 fidl::encoding::Boxed<FidlvizStruct2>,
5145 fidl::encoding::DefaultFuchsiaResourceDialect,
5146 &mut self.f27,
5147 decoder,
5148 offset + 176,
5149 _depth
5150 )?;
5151 fidl::decode!(
5152 FidlvizTable,
5153 fidl::encoding::DefaultFuchsiaResourceDialect,
5154 &mut self.f28,
5155 decoder,
5156 offset + 184,
5157 _depth
5158 )?;
5159 fidl::decode!(
5160 FidlvizTable,
5161 fidl::encoding::DefaultFuchsiaResourceDialect,
5162 &mut self.f29,
5163 decoder,
5164 offset + 200,
5165 _depth
5166 )?;
5167 fidl::decode!(
5168 fidl::encoding::OptionalUnion<FidlvizUnion>,
5169 fidl::encoding::DefaultFuchsiaResourceDialect,
5170 &mut self.f30,
5171 decoder,
5172 offset + 216,
5173 _depth
5174 )?;
5175 fidl::decode!(
5176 FidlvizUnion,
5177 fidl::encoding::DefaultFuchsiaResourceDialect,
5178 &mut self.f31,
5179 decoder,
5180 offset + 232,
5181 _depth
5182 )?;
5183 Ok(())
5184 }
5185 }
5186
5187 impl fidl::encoding::ResourceTypeMarker for GoldenHandleBasicRightsStruct {
5188 type Borrowed<'a> = &'a mut Self;
5189 fn take_or_borrow<'a>(
5190 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5191 ) -> Self::Borrowed<'a> {
5192 value
5193 }
5194 }
5195
5196 unsafe impl fidl::encoding::TypeMarker for GoldenHandleBasicRightsStruct {
5197 type Owned = Self;
5198
5199 #[inline(always)]
5200 fn inline_align(_context: fidl::encoding::Context) -> usize {
5201 4
5202 }
5203
5204 #[inline(always)]
5205 fn inline_size(_context: fidl::encoding::Context) -> usize {
5206 4
5207 }
5208 }
5209
5210 unsafe impl
5211 fidl::encoding::Encode<
5212 GoldenHandleBasicRightsStruct,
5213 fidl::encoding::DefaultFuchsiaResourceDialect,
5214 > for &mut GoldenHandleBasicRightsStruct
5215 {
5216 #[inline]
5217 unsafe fn encode(
5218 self,
5219 encoder: &mut fidl::encoding::Encoder<
5220 '_,
5221 fidl::encoding::DefaultFuchsiaResourceDialect,
5222 >,
5223 offset: usize,
5224 _depth: fidl::encoding::Depth,
5225 ) -> fidl::Result<()> {
5226 encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5227 fidl::encoding::Encode::<
5229 GoldenHandleBasicRightsStruct,
5230 fidl::encoding::DefaultFuchsiaResourceDialect,
5231 >::encode(
5232 (<fidl::encoding::HandleType<
5233 fidl::Event,
5234 { fidl::ObjectType::EVENT.into_raw() },
5235 49155,
5236 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5237 &mut self.v
5238 ),),
5239 encoder,
5240 offset,
5241 _depth,
5242 )
5243 }
5244 }
5245 unsafe impl<
5246 T0: fidl::encoding::Encode<
5247 fidl::encoding::HandleType<
5248 fidl::Event,
5249 { fidl::ObjectType::EVENT.into_raw() },
5250 49155,
5251 >,
5252 fidl::encoding::DefaultFuchsiaResourceDialect,
5253 >,
5254 >
5255 fidl::encoding::Encode<
5256 GoldenHandleBasicRightsStruct,
5257 fidl::encoding::DefaultFuchsiaResourceDialect,
5258 > for (T0,)
5259 {
5260 #[inline]
5261 unsafe fn encode(
5262 self,
5263 encoder: &mut fidl::encoding::Encoder<
5264 '_,
5265 fidl::encoding::DefaultFuchsiaResourceDialect,
5266 >,
5267 offset: usize,
5268 depth: fidl::encoding::Depth,
5269 ) -> fidl::Result<()> {
5270 encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5271 self.0.encode(encoder, offset + 0, depth)?;
5275 Ok(())
5276 }
5277 }
5278
5279 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5280 for GoldenHandleBasicRightsStruct
5281 {
5282 #[inline(always)]
5283 fn new_empty() -> Self {
5284 Self {
5285 v: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
5286 }
5287 }
5288
5289 #[inline]
5290 unsafe fn decode(
5291 &mut self,
5292 decoder: &mut fidl::encoding::Decoder<
5293 '_,
5294 fidl::encoding::DefaultFuchsiaResourceDialect,
5295 >,
5296 offset: usize,
5297 _depth: fidl::encoding::Depth,
5298 ) -> fidl::Result<()> {
5299 decoder.debug_check_bounds::<Self>(offset);
5300 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.v, decoder, offset + 0, _depth)?;
5302 Ok(())
5303 }
5304 }
5305
5306 impl fidl::encoding::ResourceTypeMarker for GoldenNullableHandleStruct {
5307 type Borrowed<'a> = &'a mut Self;
5308 fn take_or_borrow<'a>(
5309 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5310 ) -> Self::Borrowed<'a> {
5311 value
5312 }
5313 }
5314
5315 unsafe impl fidl::encoding::TypeMarker for GoldenNullableHandleStruct {
5316 type Owned = Self;
5317
5318 #[inline(always)]
5319 fn inline_align(_context: fidl::encoding::Context) -> usize {
5320 4
5321 }
5322
5323 #[inline(always)]
5324 fn inline_size(_context: fidl::encoding::Context) -> usize {
5325 4
5326 }
5327 }
5328
5329 unsafe impl
5330 fidl::encoding::Encode<
5331 GoldenNullableHandleStruct,
5332 fidl::encoding::DefaultFuchsiaResourceDialect,
5333 > for &mut GoldenNullableHandleStruct
5334 {
5335 #[inline]
5336 unsafe fn encode(
5337 self,
5338 encoder: &mut fidl::encoding::Encoder<
5339 '_,
5340 fidl::encoding::DefaultFuchsiaResourceDialect,
5341 >,
5342 offset: usize,
5343 _depth: fidl::encoding::Depth,
5344 ) -> fidl::Result<()> {
5345 encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5346 fidl::encoding::Encode::<
5348 GoldenNullableHandleStruct,
5349 fidl::encoding::DefaultFuchsiaResourceDialect,
5350 >::encode(
5351 (<fidl::encoding::Optional<
5352 fidl::encoding::HandleType<
5353 fidl::Handle,
5354 { fidl::ObjectType::NONE.into_raw() },
5355 2147483648,
5356 >,
5357 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5358 &mut self.v
5359 ),),
5360 encoder,
5361 offset,
5362 _depth,
5363 )
5364 }
5365 }
5366 unsafe impl<
5367 T0: fidl::encoding::Encode<
5368 fidl::encoding::Optional<
5369 fidl::encoding::HandleType<
5370 fidl::Handle,
5371 { fidl::ObjectType::NONE.into_raw() },
5372 2147483648,
5373 >,
5374 >,
5375 fidl::encoding::DefaultFuchsiaResourceDialect,
5376 >,
5377 >
5378 fidl::encoding::Encode<
5379 GoldenNullableHandleStruct,
5380 fidl::encoding::DefaultFuchsiaResourceDialect,
5381 > for (T0,)
5382 {
5383 #[inline]
5384 unsafe fn encode(
5385 self,
5386 encoder: &mut fidl::encoding::Encoder<
5387 '_,
5388 fidl::encoding::DefaultFuchsiaResourceDialect,
5389 >,
5390 offset: usize,
5391 depth: fidl::encoding::Depth,
5392 ) -> fidl::Result<()> {
5393 encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5394 self.0.encode(encoder, offset + 0, depth)?;
5398 Ok(())
5399 }
5400 }
5401
5402 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5403 for GoldenNullableHandleStruct
5404 {
5405 #[inline(always)]
5406 fn new_empty() -> Self {
5407 Self {
5408 v: fidl::new_empty!(
5409 fidl::encoding::Optional<
5410 fidl::encoding::HandleType<
5411 fidl::Handle,
5412 { fidl::ObjectType::NONE.into_raw() },
5413 2147483648,
5414 >,
5415 >,
5416 fidl::encoding::DefaultFuchsiaResourceDialect
5417 ),
5418 }
5419 }
5420
5421 #[inline]
5422 unsafe fn decode(
5423 &mut self,
5424 decoder: &mut fidl::encoding::Decoder<
5425 '_,
5426 fidl::encoding::DefaultFuchsiaResourceDialect,
5427 >,
5428 offset: usize,
5429 _depth: fidl::encoding::Depth,
5430 ) -> fidl::Result<()> {
5431 decoder.debug_check_bounds::<Self>(offset);
5432 fidl::decode!(
5434 fidl::encoding::Optional<
5435 fidl::encoding::HandleType<
5436 fidl::Handle,
5437 { fidl::ObjectType::NONE.into_raw() },
5438 2147483648,
5439 >,
5440 >,
5441 fidl::encoding::DefaultFuchsiaResourceDialect,
5442 &mut self.v,
5443 decoder,
5444 offset + 0,
5445 _depth
5446 )?;
5447 Ok(())
5448 }
5449 }
5450
5451 impl fidl::encoding::ResourceTypeMarker for LaunchInfo {
5452 type Borrowed<'a> = &'a mut Self;
5453 fn take_or_borrow<'a>(
5454 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5455 ) -> Self::Borrowed<'a> {
5456 value
5457 }
5458 }
5459
5460 unsafe impl fidl::encoding::TypeMarker for LaunchInfo {
5461 type Owned = Self;
5462
5463 #[inline(always)]
5464 fn inline_align(_context: fidl::encoding::Context) -> usize {
5465 8
5466 }
5467
5468 #[inline(always)]
5469 fn inline_size(_context: fidl::encoding::Context) -> usize {
5470 72
5471 }
5472 }
5473
5474 unsafe impl fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5475 for &mut LaunchInfo
5476 {
5477 #[inline]
5478 unsafe fn encode(
5479 self,
5480 encoder: &mut fidl::encoding::Encoder<
5481 '_,
5482 fidl::encoding::DefaultFuchsiaResourceDialect,
5483 >,
5484 offset: usize,
5485 _depth: fidl::encoding::Depth,
5486 ) -> fidl::Result<()> {
5487 encoder.debug_check_bounds::<LaunchInfo>(offset);
5488 fidl::encoding::Encode::<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5490 (
5491 <fidl::encoding::BoundedString<200> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
5492 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.arguments),
5493 <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.out),
5494 <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.err),
5495 <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),
5496 <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.flat_namespace),
5497 <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.additional_services),
5498 ),
5499 encoder, offset, _depth
5500 )
5501 }
5502 }
5503 unsafe impl<
5504 T0: fidl::encoding::Encode<
5505 fidl::encoding::BoundedString<200>,
5506 fidl::encoding::DefaultFuchsiaResourceDialect,
5507 >,
5508 T1: fidl::encoding::Encode<
5509 fidl::encoding::Optional<
5510 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5511 >,
5512 fidl::encoding::DefaultFuchsiaResourceDialect,
5513 >,
5514 T2: fidl::encoding::Encode<
5515 fidl::encoding::Boxed<TransformerEmptyStruct>,
5516 fidl::encoding::DefaultFuchsiaResourceDialect,
5517 >,
5518 T3: fidl::encoding::Encode<
5519 fidl::encoding::Boxed<TransformerEmptyStruct>,
5520 fidl::encoding::DefaultFuchsiaResourceDialect,
5521 >,
5522 T4: fidl::encoding::Encode<
5523 fidl::encoding::Optional<
5524 fidl::encoding::HandleType<
5525 fidl::Channel,
5526 { fidl::ObjectType::CHANNEL.into_raw() },
5527 2147483648,
5528 >,
5529 >,
5530 fidl::encoding::DefaultFuchsiaResourceDialect,
5531 >,
5532 T5: fidl::encoding::Encode<
5533 fidl::encoding::Boxed<TransformerEmptyStruct>,
5534 fidl::encoding::DefaultFuchsiaResourceDialect,
5535 >,
5536 T6: fidl::encoding::Encode<
5537 fidl::encoding::Boxed<TransformerEmptyStruct>,
5538 fidl::encoding::DefaultFuchsiaResourceDialect,
5539 >,
5540 > fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5541 for (T0, T1, T2, T3, T4, T5, T6)
5542 {
5543 #[inline]
5544 unsafe fn encode(
5545 self,
5546 encoder: &mut fidl::encoding::Encoder<
5547 '_,
5548 fidl::encoding::DefaultFuchsiaResourceDialect,
5549 >,
5550 offset: usize,
5551 depth: fidl::encoding::Depth,
5552 ) -> fidl::Result<()> {
5553 encoder.debug_check_bounds::<LaunchInfo>(offset);
5554 unsafe {
5557 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
5558 (ptr as *mut u64).write_unaligned(0);
5559 }
5560 self.0.encode(encoder, offset + 0, depth)?;
5562 self.1.encode(encoder, offset + 16, depth)?;
5563 self.2.encode(encoder, offset + 32, depth)?;
5564 self.3.encode(encoder, offset + 40, depth)?;
5565 self.4.encode(encoder, offset + 48, depth)?;
5566 self.5.encode(encoder, offset + 56, depth)?;
5567 self.6.encode(encoder, offset + 64, depth)?;
5568 Ok(())
5569 }
5570 }
5571
5572 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {
5573 #[inline(always)]
5574 fn new_empty() -> Self {
5575 Self {
5576 url: fidl::new_empty!(
5577 fidl::encoding::BoundedString<200>,
5578 fidl::encoding::DefaultFuchsiaResourceDialect
5579 ),
5580 arguments: fidl::new_empty!(
5581 fidl::encoding::Optional<
5582 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5583 >,
5584 fidl::encoding::DefaultFuchsiaResourceDialect
5585 ),
5586 out: fidl::new_empty!(
5587 fidl::encoding::Boxed<TransformerEmptyStruct>,
5588 fidl::encoding::DefaultFuchsiaResourceDialect
5589 ),
5590 err: fidl::new_empty!(
5591 fidl::encoding::Boxed<TransformerEmptyStruct>,
5592 fidl::encoding::DefaultFuchsiaResourceDialect
5593 ),
5594 directory_request: fidl::new_empty!(
5595 fidl::encoding::Optional<
5596 fidl::encoding::HandleType<
5597 fidl::Channel,
5598 { fidl::ObjectType::CHANNEL.into_raw() },
5599 2147483648,
5600 >,
5601 >,
5602 fidl::encoding::DefaultFuchsiaResourceDialect
5603 ),
5604 flat_namespace: fidl::new_empty!(
5605 fidl::encoding::Boxed<TransformerEmptyStruct>,
5606 fidl::encoding::DefaultFuchsiaResourceDialect
5607 ),
5608 additional_services: fidl::new_empty!(
5609 fidl::encoding::Boxed<TransformerEmptyStruct>,
5610 fidl::encoding::DefaultFuchsiaResourceDialect
5611 ),
5612 }
5613 }
5614
5615 #[inline]
5616 unsafe fn decode(
5617 &mut self,
5618 decoder: &mut fidl::encoding::Decoder<
5619 '_,
5620 fidl::encoding::DefaultFuchsiaResourceDialect,
5621 >,
5622 offset: usize,
5623 _depth: fidl::encoding::Depth,
5624 ) -> fidl::Result<()> {
5625 decoder.debug_check_bounds::<Self>(offset);
5626 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
5628 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5629 let mask = 0xffffffff00000000u64;
5630 let maskedval = padval & mask;
5631 if maskedval != 0 {
5632 return Err(fidl::Error::NonZeroPadding {
5633 padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
5634 });
5635 }
5636 fidl::decode!(
5637 fidl::encoding::BoundedString<200>,
5638 fidl::encoding::DefaultFuchsiaResourceDialect,
5639 &mut self.url,
5640 decoder,
5641 offset + 0,
5642 _depth
5643 )?;
5644 fidl::decode!(
5645 fidl::encoding::Optional<
5646 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5647 >,
5648 fidl::encoding::DefaultFuchsiaResourceDialect,
5649 &mut self.arguments,
5650 decoder,
5651 offset + 16,
5652 _depth
5653 )?;
5654 fidl::decode!(
5655 fidl::encoding::Boxed<TransformerEmptyStruct>,
5656 fidl::encoding::DefaultFuchsiaResourceDialect,
5657 &mut self.out,
5658 decoder,
5659 offset + 32,
5660 _depth
5661 )?;
5662 fidl::decode!(
5663 fidl::encoding::Boxed<TransformerEmptyStruct>,
5664 fidl::encoding::DefaultFuchsiaResourceDialect,
5665 &mut self.err,
5666 decoder,
5667 offset + 40,
5668 _depth
5669 )?;
5670 fidl::decode!(
5671 fidl::encoding::Optional<
5672 fidl::encoding::HandleType<
5673 fidl::Channel,
5674 { fidl::ObjectType::CHANNEL.into_raw() },
5675 2147483648,
5676 >,
5677 >,
5678 fidl::encoding::DefaultFuchsiaResourceDialect,
5679 &mut self.directory_request,
5680 decoder,
5681 offset + 48,
5682 _depth
5683 )?;
5684 fidl::decode!(
5685 fidl::encoding::Boxed<TransformerEmptyStruct>,
5686 fidl::encoding::DefaultFuchsiaResourceDialect,
5687 &mut self.flat_namespace,
5688 decoder,
5689 offset + 56,
5690 _depth
5691 )?;
5692 fidl::decode!(
5693 fidl::encoding::Boxed<TransformerEmptyStruct>,
5694 fidl::encoding::DefaultFuchsiaResourceDialect,
5695 &mut self.additional_services,
5696 decoder,
5697 offset + 64,
5698 _depth
5699 )?;
5700 Ok(())
5701 }
5702 }
5703
5704 impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5705 type Borrowed<'a> = &'a mut Self;
5706 fn take_or_borrow<'a>(
5707 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5708 ) -> Self::Borrowed<'a> {
5709 value
5710 }
5711 }
5712
5713 unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5714 type Owned = Self;
5715
5716 #[inline(always)]
5717 fn inline_align(_context: fidl::encoding::Context) -> usize {
5718 8
5719 }
5720
5721 #[inline(always)]
5722 fn inline_size(_context: fidl::encoding::Context) -> usize {
5723 32
5724 }
5725 }
5726
5727 unsafe impl
5728 fidl::encoding::Encode<
5729 MultipleBoundedNonnullableVectorsOfHandles,
5730 fidl::encoding::DefaultFuchsiaResourceDialect,
5731 > for &mut MultipleBoundedNonnullableVectorsOfHandles
5732 {
5733 #[inline]
5734 unsafe fn encode(
5735 self,
5736 encoder: &mut fidl::encoding::Encoder<
5737 '_,
5738 fidl::encoding::DefaultFuchsiaResourceDialect,
5739 >,
5740 offset: usize,
5741 _depth: fidl::encoding::Depth,
5742 ) -> fidl::Result<()> {
5743 encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5744 fidl::encoding::Encode::<
5746 MultipleBoundedNonnullableVectorsOfHandles,
5747 fidl::encoding::DefaultFuchsiaResourceDialect,
5748 >::encode(
5749 (
5750 <fidl::encoding::Vector<
5751 fidl::encoding::HandleType<
5752 fidl::Handle,
5753 { fidl::ObjectType::NONE.into_raw() },
5754 2147483648,
5755 >,
5756 2,
5757 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5758 &mut self.vh0
5759 ),
5760 <fidl::encoding::Vector<
5761 fidl::encoding::HandleType<
5762 fidl::Handle,
5763 { fidl::ObjectType::NONE.into_raw() },
5764 2147483648,
5765 >,
5766 32,
5767 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5768 &mut self.vh1
5769 ),
5770 ),
5771 encoder,
5772 offset,
5773 _depth,
5774 )
5775 }
5776 }
5777 unsafe impl<
5778 T0: fidl::encoding::Encode<
5779 fidl::encoding::Vector<
5780 fidl::encoding::HandleType<
5781 fidl::Handle,
5782 { fidl::ObjectType::NONE.into_raw() },
5783 2147483648,
5784 >,
5785 2,
5786 >,
5787 fidl::encoding::DefaultFuchsiaResourceDialect,
5788 >,
5789 T1: fidl::encoding::Encode<
5790 fidl::encoding::Vector<
5791 fidl::encoding::HandleType<
5792 fidl::Handle,
5793 { fidl::ObjectType::NONE.into_raw() },
5794 2147483648,
5795 >,
5796 32,
5797 >,
5798 fidl::encoding::DefaultFuchsiaResourceDialect,
5799 >,
5800 >
5801 fidl::encoding::Encode<
5802 MultipleBoundedNonnullableVectorsOfHandles,
5803 fidl::encoding::DefaultFuchsiaResourceDialect,
5804 > for (T0, T1)
5805 {
5806 #[inline]
5807 unsafe fn encode(
5808 self,
5809 encoder: &mut fidl::encoding::Encoder<
5810 '_,
5811 fidl::encoding::DefaultFuchsiaResourceDialect,
5812 >,
5813 offset: usize,
5814 depth: fidl::encoding::Depth,
5815 ) -> fidl::Result<()> {
5816 encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5817 self.0.encode(encoder, offset + 0, depth)?;
5821 self.1.encode(encoder, offset + 16, depth)?;
5822 Ok(())
5823 }
5824 }
5825
5826 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5827 for MultipleBoundedNonnullableVectorsOfHandles
5828 {
5829 #[inline(always)]
5830 fn new_empty() -> Self {
5831 Self {
5832 vh0: fidl::new_empty!(
5833 fidl::encoding::Vector<
5834 fidl::encoding::HandleType<
5835 fidl::Handle,
5836 { fidl::ObjectType::NONE.into_raw() },
5837 2147483648,
5838 >,
5839 2,
5840 >,
5841 fidl::encoding::DefaultFuchsiaResourceDialect
5842 ),
5843 vh1: fidl::new_empty!(
5844 fidl::encoding::Vector<
5845 fidl::encoding::HandleType<
5846 fidl::Handle,
5847 { fidl::ObjectType::NONE.into_raw() },
5848 2147483648,
5849 >,
5850 32,
5851 >,
5852 fidl::encoding::DefaultFuchsiaResourceDialect
5853 ),
5854 }
5855 }
5856
5857 #[inline]
5858 unsafe fn decode(
5859 &mut self,
5860 decoder: &mut fidl::encoding::Decoder<
5861 '_,
5862 fidl::encoding::DefaultFuchsiaResourceDialect,
5863 >,
5864 offset: usize,
5865 _depth: fidl::encoding::Depth,
5866 ) -> fidl::Result<()> {
5867 decoder.debug_check_bounds::<Self>(offset);
5868 fidl::decode!(
5870 fidl::encoding::Vector<
5871 fidl::encoding::HandleType<
5872 fidl::Handle,
5873 { fidl::ObjectType::NONE.into_raw() },
5874 2147483648,
5875 >,
5876 2,
5877 >,
5878 fidl::encoding::DefaultFuchsiaResourceDialect,
5879 &mut self.vh0,
5880 decoder,
5881 offset + 0,
5882 _depth
5883 )?;
5884 fidl::decode!(
5885 fidl::encoding::Vector<
5886 fidl::encoding::HandleType<
5887 fidl::Handle,
5888 { fidl::ObjectType::NONE.into_raw() },
5889 2147483648,
5890 >,
5891 32,
5892 >,
5893 fidl::encoding::DefaultFuchsiaResourceDialect,
5894 &mut self.vh1,
5895 decoder,
5896 offset + 16,
5897 _depth
5898 )?;
5899 Ok(())
5900 }
5901 }
5902
5903 impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNullableVectorsOfHandles {
5904 type Borrowed<'a> = &'a mut Self;
5905 fn take_or_borrow<'a>(
5906 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5907 ) -> Self::Borrowed<'a> {
5908 value
5909 }
5910 }
5911
5912 unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfHandles {
5913 type Owned = Self;
5914
5915 #[inline(always)]
5916 fn inline_align(_context: fidl::encoding::Context) -> usize {
5917 8
5918 }
5919
5920 #[inline(always)]
5921 fn inline_size(_context: fidl::encoding::Context) -> usize {
5922 32
5923 }
5924 }
5925
5926 unsafe impl
5927 fidl::encoding::Encode<
5928 MultipleBoundedNullableVectorsOfHandles,
5929 fidl::encoding::DefaultFuchsiaResourceDialect,
5930 > for &mut MultipleBoundedNullableVectorsOfHandles
5931 {
5932 #[inline]
5933 unsafe fn encode(
5934 self,
5935 encoder: &mut fidl::encoding::Encoder<
5936 '_,
5937 fidl::encoding::DefaultFuchsiaResourceDialect,
5938 >,
5939 offset: usize,
5940 _depth: fidl::encoding::Depth,
5941 ) -> fidl::Result<()> {
5942 encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
5943 fidl::encoding::Encode::<
5945 MultipleBoundedNullableVectorsOfHandles,
5946 fidl::encoding::DefaultFuchsiaResourceDialect,
5947 >::encode(
5948 (
5949 <fidl::encoding::Optional<
5950 fidl::encoding::Vector<
5951 fidl::encoding::HandleType<
5952 fidl::Handle,
5953 { fidl::ObjectType::NONE.into_raw() },
5954 2147483648,
5955 >,
5956 2,
5957 >,
5958 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5959 &mut self.vh0
5960 ),
5961 <fidl::encoding::Optional<
5962 fidl::encoding::Vector<
5963 fidl::encoding::HandleType<
5964 fidl::Handle,
5965 { fidl::ObjectType::NONE.into_raw() },
5966 2147483648,
5967 >,
5968 32,
5969 >,
5970 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5971 &mut self.vh1
5972 ),
5973 ),
5974 encoder,
5975 offset,
5976 _depth,
5977 )
5978 }
5979 }
5980 unsafe impl<
5981 T0: fidl::encoding::Encode<
5982 fidl::encoding::Optional<
5983 fidl::encoding::Vector<
5984 fidl::encoding::HandleType<
5985 fidl::Handle,
5986 { fidl::ObjectType::NONE.into_raw() },
5987 2147483648,
5988 >,
5989 2,
5990 >,
5991 >,
5992 fidl::encoding::DefaultFuchsiaResourceDialect,
5993 >,
5994 T1: fidl::encoding::Encode<
5995 fidl::encoding::Optional<
5996 fidl::encoding::Vector<
5997 fidl::encoding::HandleType<
5998 fidl::Handle,
5999 { fidl::ObjectType::NONE.into_raw() },
6000 2147483648,
6001 >,
6002 32,
6003 >,
6004 >,
6005 fidl::encoding::DefaultFuchsiaResourceDialect,
6006 >,
6007 >
6008 fidl::encoding::Encode<
6009 MultipleBoundedNullableVectorsOfHandles,
6010 fidl::encoding::DefaultFuchsiaResourceDialect,
6011 > for (T0, T1)
6012 {
6013 #[inline]
6014 unsafe fn encode(
6015 self,
6016 encoder: &mut fidl::encoding::Encoder<
6017 '_,
6018 fidl::encoding::DefaultFuchsiaResourceDialect,
6019 >,
6020 offset: usize,
6021 depth: fidl::encoding::Depth,
6022 ) -> fidl::Result<()> {
6023 encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
6024 self.0.encode(encoder, offset + 0, depth)?;
6028 self.1.encode(encoder, offset + 16, depth)?;
6029 Ok(())
6030 }
6031 }
6032
6033 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6034 for MultipleBoundedNullableVectorsOfHandles
6035 {
6036 #[inline(always)]
6037 fn new_empty() -> Self {
6038 Self {
6039 vh0: fidl::new_empty!(
6040 fidl::encoding::Optional<
6041 fidl::encoding::Vector<
6042 fidl::encoding::HandleType<
6043 fidl::Handle,
6044 { fidl::ObjectType::NONE.into_raw() },
6045 2147483648,
6046 >,
6047 2,
6048 >,
6049 >,
6050 fidl::encoding::DefaultFuchsiaResourceDialect
6051 ),
6052 vh1: fidl::new_empty!(
6053 fidl::encoding::Optional<
6054 fidl::encoding::Vector<
6055 fidl::encoding::HandleType<
6056 fidl::Handle,
6057 { fidl::ObjectType::NONE.into_raw() },
6058 2147483648,
6059 >,
6060 32,
6061 >,
6062 >,
6063 fidl::encoding::DefaultFuchsiaResourceDialect
6064 ),
6065 }
6066 }
6067
6068 #[inline]
6069 unsafe fn decode(
6070 &mut self,
6071 decoder: &mut fidl::encoding::Decoder<
6072 '_,
6073 fidl::encoding::DefaultFuchsiaResourceDialect,
6074 >,
6075 offset: usize,
6076 _depth: fidl::encoding::Depth,
6077 ) -> fidl::Result<()> {
6078 decoder.debug_check_bounds::<Self>(offset);
6079 fidl::decode!(
6081 fidl::encoding::Optional<
6082 fidl::encoding::Vector<
6083 fidl::encoding::HandleType<
6084 fidl::Handle,
6085 { fidl::ObjectType::NONE.into_raw() },
6086 2147483648,
6087 >,
6088 2,
6089 >,
6090 >,
6091 fidl::encoding::DefaultFuchsiaResourceDialect,
6092 &mut self.vh0,
6093 decoder,
6094 offset + 0,
6095 _depth
6096 )?;
6097 fidl::decode!(
6098 fidl::encoding::Optional<
6099 fidl::encoding::Vector<
6100 fidl::encoding::HandleType<
6101 fidl::Handle,
6102 { fidl::ObjectType::NONE.into_raw() },
6103 2147483648,
6104 >,
6105 32,
6106 >,
6107 >,
6108 fidl::encoding::DefaultFuchsiaResourceDialect,
6109 &mut self.vh1,
6110 decoder,
6111 offset + 16,
6112 _depth
6113 )?;
6114 Ok(())
6115 }
6116 }
6117
6118 impl fidl::encoding::ResourceTypeMarker for MultipleHandleSubtypes {
6119 type Borrowed<'a> = &'a mut Self;
6120 fn take_or_borrow<'a>(
6121 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6122 ) -> Self::Borrowed<'a> {
6123 value
6124 }
6125 }
6126
6127 unsafe impl fidl::encoding::TypeMarker for MultipleHandleSubtypes {
6128 type Owned = Self;
6129
6130 #[inline(always)]
6131 fn inline_align(_context: fidl::encoding::Context) -> usize {
6132 4
6133 }
6134
6135 #[inline(always)]
6136 fn inline_size(_context: fidl::encoding::Context) -> usize {
6137 12
6138 }
6139 }
6140
6141 unsafe impl
6142 fidl::encoding::Encode<
6143 MultipleHandleSubtypes,
6144 fidl::encoding::DefaultFuchsiaResourceDialect,
6145 > for &mut MultipleHandleSubtypes
6146 {
6147 #[inline]
6148 unsafe fn encode(
6149 self,
6150 encoder: &mut fidl::encoding::Encoder<
6151 '_,
6152 fidl::encoding::DefaultFuchsiaResourceDialect,
6153 >,
6154 offset: usize,
6155 _depth: fidl::encoding::Depth,
6156 ) -> fidl::Result<()> {
6157 encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6158 fidl::encoding::Encode::<
6160 MultipleHandleSubtypes,
6161 fidl::encoding::DefaultFuchsiaResourceDialect,
6162 >::encode(
6163 (
6164 <fidl::encoding::HandleType<
6165 fidl::Handle,
6166 { fidl::ObjectType::NONE.into_raw() },
6167 2147483648,
6168 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6169 &mut self.untyped
6170 ),
6171 <fidl::encoding::HandleType<
6172 fidl::Event,
6173 { fidl::ObjectType::EVENT.into_raw() },
6174 2147483648,
6175 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6176 &mut self.event
6177 ),
6178 <fidl::encoding::HandleType<
6179 fidl::Channel,
6180 { fidl::ObjectType::CHANNEL.into_raw() },
6181 2147483648,
6182 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6183 &mut self.channel
6184 ),
6185 ),
6186 encoder,
6187 offset,
6188 _depth,
6189 )
6190 }
6191 }
6192 unsafe impl<
6193 T0: fidl::encoding::Encode<
6194 fidl::encoding::HandleType<
6195 fidl::Handle,
6196 { fidl::ObjectType::NONE.into_raw() },
6197 2147483648,
6198 >,
6199 fidl::encoding::DefaultFuchsiaResourceDialect,
6200 >,
6201 T1: fidl::encoding::Encode<
6202 fidl::encoding::HandleType<
6203 fidl::Event,
6204 { fidl::ObjectType::EVENT.into_raw() },
6205 2147483648,
6206 >,
6207 fidl::encoding::DefaultFuchsiaResourceDialect,
6208 >,
6209 T2: fidl::encoding::Encode<
6210 fidl::encoding::HandleType<
6211 fidl::Channel,
6212 { fidl::ObjectType::CHANNEL.into_raw() },
6213 2147483648,
6214 >,
6215 fidl::encoding::DefaultFuchsiaResourceDialect,
6216 >,
6217 >
6218 fidl::encoding::Encode<
6219 MultipleHandleSubtypes,
6220 fidl::encoding::DefaultFuchsiaResourceDialect,
6221 > for (T0, T1, T2)
6222 {
6223 #[inline]
6224 unsafe fn encode(
6225 self,
6226 encoder: &mut fidl::encoding::Encoder<
6227 '_,
6228 fidl::encoding::DefaultFuchsiaResourceDialect,
6229 >,
6230 offset: usize,
6231 depth: fidl::encoding::Depth,
6232 ) -> fidl::Result<()> {
6233 encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6234 self.0.encode(encoder, offset + 0, depth)?;
6238 self.1.encode(encoder, offset + 4, depth)?;
6239 self.2.encode(encoder, offset + 8, depth)?;
6240 Ok(())
6241 }
6242 }
6243
6244 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6245 for MultipleHandleSubtypes
6246 {
6247 #[inline(always)]
6248 fn new_empty() -> Self {
6249 Self {
6250 untyped: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6251 event: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6252 channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6253 }
6254 }
6255
6256 #[inline]
6257 unsafe fn decode(
6258 &mut self,
6259 decoder: &mut fidl::encoding::Decoder<
6260 '_,
6261 fidl::encoding::DefaultFuchsiaResourceDialect,
6262 >,
6263 offset: usize,
6264 _depth: fidl::encoding::Depth,
6265 ) -> fidl::Result<()> {
6266 decoder.debug_check_bounds::<Self>(offset);
6267 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.untyped, decoder, offset + 0, _depth)?;
6269 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.event, decoder, offset + 4, _depth)?;
6270 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 8, _depth)?;
6271 Ok(())
6272 }
6273 }
6274
6275 impl fidl::encoding::ResourceTypeMarker for MultipleNonnullableHandles {
6276 type Borrowed<'a> = &'a mut Self;
6277 fn take_or_borrow<'a>(
6278 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6279 ) -> Self::Borrowed<'a> {
6280 value
6281 }
6282 }
6283
6284 unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableHandles {
6285 type Owned = Self;
6286
6287 #[inline(always)]
6288 fn inline_align(_context: fidl::encoding::Context) -> usize {
6289 8
6290 }
6291
6292 #[inline(always)]
6293 fn inline_size(_context: fidl::encoding::Context) -> usize {
6294 32
6295 }
6296 }
6297
6298 unsafe impl
6299 fidl::encoding::Encode<
6300 MultipleNonnullableHandles,
6301 fidl::encoding::DefaultFuchsiaResourceDialect,
6302 > for &mut MultipleNonnullableHandles
6303 {
6304 #[inline]
6305 unsafe fn encode(
6306 self,
6307 encoder: &mut fidl::encoding::Encoder<
6308 '_,
6309 fidl::encoding::DefaultFuchsiaResourceDialect,
6310 >,
6311 offset: usize,
6312 _depth: fidl::encoding::Depth,
6313 ) -> fidl::Result<()> {
6314 encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6315 fidl::encoding::Encode::<
6317 MultipleNonnullableHandles,
6318 fidl::encoding::DefaultFuchsiaResourceDialect,
6319 >::encode(
6320 (
6321 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6322 <fidl::encoding::HandleType<
6323 fidl::Handle,
6324 { fidl::ObjectType::NONE.into_raw() },
6325 2147483648,
6326 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6327 &mut self.handle0
6328 ),
6329 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6330 <fidl::encoding::HandleType<
6331 fidl::Channel,
6332 { fidl::ObjectType::CHANNEL.into_raw() },
6333 2147483648,
6334 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6335 &mut self.handle1
6336 ),
6337 <fidl::encoding::HandleType<
6338 fidl::Event,
6339 { fidl::ObjectType::EVENT.into_raw() },
6340 2147483648,
6341 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6342 &mut self.handle2
6343 ),
6344 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6345 ),
6346 encoder,
6347 offset,
6348 _depth,
6349 )
6350 }
6351 }
6352 unsafe impl<
6353 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6354 T1: fidl::encoding::Encode<
6355 fidl::encoding::HandleType<
6356 fidl::Handle,
6357 { fidl::ObjectType::NONE.into_raw() },
6358 2147483648,
6359 >,
6360 fidl::encoding::DefaultFuchsiaResourceDialect,
6361 >,
6362 T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6363 T3: fidl::encoding::Encode<
6364 fidl::encoding::HandleType<
6365 fidl::Channel,
6366 { fidl::ObjectType::CHANNEL.into_raw() },
6367 2147483648,
6368 >,
6369 fidl::encoding::DefaultFuchsiaResourceDialect,
6370 >,
6371 T4: fidl::encoding::Encode<
6372 fidl::encoding::HandleType<
6373 fidl::Event,
6374 { fidl::ObjectType::EVENT.into_raw() },
6375 2147483648,
6376 >,
6377 fidl::encoding::DefaultFuchsiaResourceDialect,
6378 >,
6379 T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6380 >
6381 fidl::encoding::Encode<
6382 MultipleNonnullableHandles,
6383 fidl::encoding::DefaultFuchsiaResourceDialect,
6384 > for (T0, T1, T2, T3, T4, T5)
6385 {
6386 #[inline]
6387 unsafe fn encode(
6388 self,
6389 encoder: &mut fidl::encoding::Encoder<
6390 '_,
6391 fidl::encoding::DefaultFuchsiaResourceDialect,
6392 >,
6393 offset: usize,
6394 depth: fidl::encoding::Depth,
6395 ) -> fidl::Result<()> {
6396 encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6397 self.0.encode(encoder, offset + 0, depth)?;
6401 self.1.encode(encoder, offset + 4, depth)?;
6402 self.2.encode(encoder, offset + 8, depth)?;
6403 self.3.encode(encoder, offset + 16, depth)?;
6404 self.4.encode(encoder, offset + 20, depth)?;
6405 self.5.encode(encoder, offset + 24, depth)?;
6406 Ok(())
6407 }
6408 }
6409
6410 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6411 for MultipleNonnullableHandles
6412 {
6413 #[inline(always)]
6414 fn new_empty() -> Self {
6415 Self {
6416 data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6417 handle0: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6418 data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6419 handle1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6420 handle2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6421 data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6422 }
6423 }
6424
6425 #[inline]
6426 unsafe fn decode(
6427 &mut self,
6428 decoder: &mut fidl::encoding::Decoder<
6429 '_,
6430 fidl::encoding::DefaultFuchsiaResourceDialect,
6431 >,
6432 offset: usize,
6433 _depth: fidl::encoding::Depth,
6434 ) -> fidl::Result<()> {
6435 decoder.debug_check_bounds::<Self>(offset);
6436 fidl::decode!(
6438 u32,
6439 fidl::encoding::DefaultFuchsiaResourceDialect,
6440 &mut self.data0,
6441 decoder,
6442 offset + 0,
6443 _depth
6444 )?;
6445 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle0, decoder, offset + 4, _depth)?;
6446 fidl::decode!(
6447 u64,
6448 fidl::encoding::DefaultFuchsiaResourceDialect,
6449 &mut self.data1,
6450 decoder,
6451 offset + 8,
6452 _depth
6453 )?;
6454 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle1, decoder, offset + 16, _depth)?;
6455 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle2, decoder, offset + 20, _depth)?;
6456 fidl::decode!(
6457 u64,
6458 fidl::encoding::DefaultFuchsiaResourceDialect,
6459 &mut self.data2,
6460 decoder,
6461 offset + 24,
6462 _depth
6463 )?;
6464 Ok(())
6465 }
6466 }
6467
6468 impl fidl::encoding::ResourceTypeMarker for MultipleNullableHandles {
6469 type Borrowed<'a> = &'a mut Self;
6470 fn take_or_borrow<'a>(
6471 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6472 ) -> Self::Borrowed<'a> {
6473 value
6474 }
6475 }
6476
6477 unsafe impl fidl::encoding::TypeMarker for MultipleNullableHandles {
6478 type Owned = Self;
6479
6480 #[inline(always)]
6481 fn inline_align(_context: fidl::encoding::Context) -> usize {
6482 8
6483 }
6484
6485 #[inline(always)]
6486 fn inline_size(_context: fidl::encoding::Context) -> usize {
6487 32
6488 }
6489 }
6490
6491 unsafe impl
6492 fidl::encoding::Encode<
6493 MultipleNullableHandles,
6494 fidl::encoding::DefaultFuchsiaResourceDialect,
6495 > for &mut MultipleNullableHandles
6496 {
6497 #[inline]
6498 unsafe fn encode(
6499 self,
6500 encoder: &mut fidl::encoding::Encoder<
6501 '_,
6502 fidl::encoding::DefaultFuchsiaResourceDialect,
6503 >,
6504 offset: usize,
6505 _depth: fidl::encoding::Depth,
6506 ) -> fidl::Result<()> {
6507 encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6508 fidl::encoding::Encode::<
6510 MultipleNullableHandles,
6511 fidl::encoding::DefaultFuchsiaResourceDialect,
6512 >::encode(
6513 (
6514 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6515 <fidl::encoding::Optional<
6516 fidl::encoding::HandleType<
6517 fidl::Handle,
6518 { fidl::ObjectType::NONE.into_raw() },
6519 2147483648,
6520 >,
6521 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6522 &mut self.handle0
6523 ),
6524 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6525 <fidl::encoding::Optional<
6526 fidl::encoding::HandleType<
6527 fidl::Channel,
6528 { fidl::ObjectType::CHANNEL.into_raw() },
6529 2147483648,
6530 >,
6531 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6532 &mut self.handle1
6533 ),
6534 <fidl::encoding::Optional<
6535 fidl::encoding::HandleType<
6536 fidl::Event,
6537 { fidl::ObjectType::EVENT.into_raw() },
6538 2147483648,
6539 >,
6540 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6541 &mut self.handle2
6542 ),
6543 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6544 ),
6545 encoder,
6546 offset,
6547 _depth,
6548 )
6549 }
6550 }
6551 unsafe impl<
6552 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6553 T1: fidl::encoding::Encode<
6554 fidl::encoding::Optional<
6555 fidl::encoding::HandleType<
6556 fidl::Handle,
6557 { fidl::ObjectType::NONE.into_raw() },
6558 2147483648,
6559 >,
6560 >,
6561 fidl::encoding::DefaultFuchsiaResourceDialect,
6562 >,
6563 T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6564 T3: fidl::encoding::Encode<
6565 fidl::encoding::Optional<
6566 fidl::encoding::HandleType<
6567 fidl::Channel,
6568 { fidl::ObjectType::CHANNEL.into_raw() },
6569 2147483648,
6570 >,
6571 >,
6572 fidl::encoding::DefaultFuchsiaResourceDialect,
6573 >,
6574 T4: fidl::encoding::Encode<
6575 fidl::encoding::Optional<
6576 fidl::encoding::HandleType<
6577 fidl::Event,
6578 { fidl::ObjectType::EVENT.into_raw() },
6579 2147483648,
6580 >,
6581 >,
6582 fidl::encoding::DefaultFuchsiaResourceDialect,
6583 >,
6584 T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6585 >
6586 fidl::encoding::Encode<
6587 MultipleNullableHandles,
6588 fidl::encoding::DefaultFuchsiaResourceDialect,
6589 > for (T0, T1, T2, T3, T4, T5)
6590 {
6591 #[inline]
6592 unsafe fn encode(
6593 self,
6594 encoder: &mut fidl::encoding::Encoder<
6595 '_,
6596 fidl::encoding::DefaultFuchsiaResourceDialect,
6597 >,
6598 offset: usize,
6599 depth: fidl::encoding::Depth,
6600 ) -> fidl::Result<()> {
6601 encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6602 self.0.encode(encoder, offset + 0, depth)?;
6606 self.1.encode(encoder, offset + 4, depth)?;
6607 self.2.encode(encoder, offset + 8, depth)?;
6608 self.3.encode(encoder, offset + 16, depth)?;
6609 self.4.encode(encoder, offset + 20, depth)?;
6610 self.5.encode(encoder, offset + 24, depth)?;
6611 Ok(())
6612 }
6613 }
6614
6615 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6616 for MultipleNullableHandles
6617 {
6618 #[inline(always)]
6619 fn new_empty() -> Self {
6620 Self {
6621 data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6622 handle0: fidl::new_empty!(
6623 fidl::encoding::Optional<
6624 fidl::encoding::HandleType<
6625 fidl::Handle,
6626 { fidl::ObjectType::NONE.into_raw() },
6627 2147483648,
6628 >,
6629 >,
6630 fidl::encoding::DefaultFuchsiaResourceDialect
6631 ),
6632 data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6633 handle1: fidl::new_empty!(
6634 fidl::encoding::Optional<
6635 fidl::encoding::HandleType<
6636 fidl::Channel,
6637 { fidl::ObjectType::CHANNEL.into_raw() },
6638 2147483648,
6639 >,
6640 >,
6641 fidl::encoding::DefaultFuchsiaResourceDialect
6642 ),
6643 handle2: fidl::new_empty!(
6644 fidl::encoding::Optional<
6645 fidl::encoding::HandleType<
6646 fidl::Event,
6647 { fidl::ObjectType::EVENT.into_raw() },
6648 2147483648,
6649 >,
6650 >,
6651 fidl::encoding::DefaultFuchsiaResourceDialect
6652 ),
6653 data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6654 }
6655 }
6656
6657 #[inline]
6658 unsafe fn decode(
6659 &mut self,
6660 decoder: &mut fidl::encoding::Decoder<
6661 '_,
6662 fidl::encoding::DefaultFuchsiaResourceDialect,
6663 >,
6664 offset: usize,
6665 _depth: fidl::encoding::Depth,
6666 ) -> fidl::Result<()> {
6667 decoder.debug_check_bounds::<Self>(offset);
6668 fidl::decode!(
6670 u32,
6671 fidl::encoding::DefaultFuchsiaResourceDialect,
6672 &mut self.data0,
6673 decoder,
6674 offset + 0,
6675 _depth
6676 )?;
6677 fidl::decode!(
6678 fidl::encoding::Optional<
6679 fidl::encoding::HandleType<
6680 fidl::Handle,
6681 { fidl::ObjectType::NONE.into_raw() },
6682 2147483648,
6683 >,
6684 >,
6685 fidl::encoding::DefaultFuchsiaResourceDialect,
6686 &mut self.handle0,
6687 decoder,
6688 offset + 4,
6689 _depth
6690 )?;
6691 fidl::decode!(
6692 u64,
6693 fidl::encoding::DefaultFuchsiaResourceDialect,
6694 &mut self.data1,
6695 decoder,
6696 offset + 8,
6697 _depth
6698 )?;
6699 fidl::decode!(
6700 fidl::encoding::Optional<
6701 fidl::encoding::HandleType<
6702 fidl::Channel,
6703 { fidl::ObjectType::CHANNEL.into_raw() },
6704 2147483648,
6705 >,
6706 >,
6707 fidl::encoding::DefaultFuchsiaResourceDialect,
6708 &mut self.handle1,
6709 decoder,
6710 offset + 16,
6711 _depth
6712 )?;
6713 fidl::decode!(
6714 fidl::encoding::Optional<
6715 fidl::encoding::HandleType<
6716 fidl::Event,
6717 { fidl::ObjectType::EVENT.into_raw() },
6718 2147483648,
6719 >,
6720 >,
6721 fidl::encoding::DefaultFuchsiaResourceDialect,
6722 &mut self.handle2,
6723 decoder,
6724 offset + 20,
6725 _depth
6726 )?;
6727 fidl::decode!(
6728 u64,
6729 fidl::encoding::DefaultFuchsiaResourceDialect,
6730 &mut self.data2,
6731 decoder,
6732 offset + 24,
6733 _depth
6734 )?;
6735 Ok(())
6736 }
6737 }
6738
6739 impl fidl::encoding::ResourceTypeMarker for NonnullableHandle {
6740 type Borrowed<'a> = &'a mut Self;
6741 fn take_or_borrow<'a>(
6742 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6743 ) -> Self::Borrowed<'a> {
6744 value
6745 }
6746 }
6747
6748 unsafe impl fidl::encoding::TypeMarker for NonnullableHandle {
6749 type Owned = Self;
6750
6751 #[inline(always)]
6752 fn inline_align(_context: fidl::encoding::Context) -> usize {
6753 4
6754 }
6755
6756 #[inline(always)]
6757 fn inline_size(_context: fidl::encoding::Context) -> usize {
6758 4
6759 }
6760 }
6761
6762 unsafe impl
6763 fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6764 for &mut NonnullableHandle
6765 {
6766 #[inline]
6767 unsafe fn encode(
6768 self,
6769 encoder: &mut fidl::encoding::Encoder<
6770 '_,
6771 fidl::encoding::DefaultFuchsiaResourceDialect,
6772 >,
6773 offset: usize,
6774 _depth: fidl::encoding::Depth,
6775 ) -> fidl::Result<()> {
6776 encoder.debug_check_bounds::<NonnullableHandle>(offset);
6777 fidl::encoding::Encode::<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6779 (
6780 <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
6781 ),
6782 encoder, offset, _depth
6783 )
6784 }
6785 }
6786 unsafe impl<
6787 T0: fidl::encoding::Encode<
6788 fidl::encoding::HandleType<
6789 fidl::Handle,
6790 { fidl::ObjectType::NONE.into_raw() },
6791 2147483648,
6792 >,
6793 fidl::encoding::DefaultFuchsiaResourceDialect,
6794 >,
6795 > fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6796 for (T0,)
6797 {
6798 #[inline]
6799 unsafe fn encode(
6800 self,
6801 encoder: &mut fidl::encoding::Encoder<
6802 '_,
6803 fidl::encoding::DefaultFuchsiaResourceDialect,
6804 >,
6805 offset: usize,
6806 depth: fidl::encoding::Depth,
6807 ) -> fidl::Result<()> {
6808 encoder.debug_check_bounds::<NonnullableHandle>(offset);
6809 self.0.encode(encoder, offset + 0, depth)?;
6813 Ok(())
6814 }
6815 }
6816
6817 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6818 for NonnullableHandle
6819 {
6820 #[inline(always)]
6821 fn new_empty() -> Self {
6822 Self {
6823 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6824 }
6825 }
6826
6827 #[inline]
6828 unsafe fn decode(
6829 &mut self,
6830 decoder: &mut fidl::encoding::Decoder<
6831 '_,
6832 fidl::encoding::DefaultFuchsiaResourceDialect,
6833 >,
6834 offset: usize,
6835 _depth: fidl::encoding::Depth,
6836 ) -> fidl::Result<()> {
6837 decoder.debug_check_bounds::<Self>(offset);
6838 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
6840 Ok(())
6841 }
6842 }
6843
6844 impl fidl::encoding::ResourceTypeMarker for NonnullableHandleArray {
6845 type Borrowed<'a> = &'a mut Self;
6846 fn take_or_borrow<'a>(
6847 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6848 ) -> Self::Borrowed<'a> {
6849 value
6850 }
6851 }
6852
6853 unsafe impl fidl::encoding::TypeMarker for NonnullableHandleArray {
6854 type Owned = Self;
6855
6856 #[inline(always)]
6857 fn inline_align(_context: fidl::encoding::Context) -> usize {
6858 4
6859 }
6860
6861 #[inline(always)]
6862 fn inline_size(_context: fidl::encoding::Context) -> usize {
6863 16
6864 }
6865 }
6866
6867 unsafe impl
6868 fidl::encoding::Encode<
6869 NonnullableHandleArray,
6870 fidl::encoding::DefaultFuchsiaResourceDialect,
6871 > for &mut NonnullableHandleArray
6872 {
6873 #[inline]
6874 unsafe fn encode(
6875 self,
6876 encoder: &mut fidl::encoding::Encoder<
6877 '_,
6878 fidl::encoding::DefaultFuchsiaResourceDialect,
6879 >,
6880 offset: usize,
6881 _depth: fidl::encoding::Depth,
6882 ) -> fidl::Result<()> {
6883 encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6884 fidl::encoding::Encode::<
6886 NonnullableHandleArray,
6887 fidl::encoding::DefaultFuchsiaResourceDialect,
6888 >::encode(
6889 (<fidl::encoding::Array<
6890 fidl::encoding::HandleType<
6891 fidl::Handle,
6892 { fidl::ObjectType::NONE.into_raw() },
6893 2147483648,
6894 >,
6895 4,
6896 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6897 &mut self.handles
6898 ),),
6899 encoder,
6900 offset,
6901 _depth,
6902 )
6903 }
6904 }
6905 unsafe impl<
6906 T0: fidl::encoding::Encode<
6907 fidl::encoding::Array<
6908 fidl::encoding::HandleType<
6909 fidl::Handle,
6910 { fidl::ObjectType::NONE.into_raw() },
6911 2147483648,
6912 >,
6913 4,
6914 >,
6915 fidl::encoding::DefaultFuchsiaResourceDialect,
6916 >,
6917 >
6918 fidl::encoding::Encode<
6919 NonnullableHandleArray,
6920 fidl::encoding::DefaultFuchsiaResourceDialect,
6921 > for (T0,)
6922 {
6923 #[inline]
6924 unsafe fn encode(
6925 self,
6926 encoder: &mut fidl::encoding::Encoder<
6927 '_,
6928 fidl::encoding::DefaultFuchsiaResourceDialect,
6929 >,
6930 offset: usize,
6931 depth: fidl::encoding::Depth,
6932 ) -> fidl::Result<()> {
6933 encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6934 self.0.encode(encoder, offset + 0, depth)?;
6938 Ok(())
6939 }
6940 }
6941
6942 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6943 for NonnullableHandleArray
6944 {
6945 #[inline(always)]
6946 fn new_empty() -> Self {
6947 Self {
6948 handles: fidl::new_empty!(
6949 fidl::encoding::Array<
6950 fidl::encoding::HandleType<
6951 fidl::Handle,
6952 { fidl::ObjectType::NONE.into_raw() },
6953 2147483648,
6954 >,
6955 4,
6956 >,
6957 fidl::encoding::DefaultFuchsiaResourceDialect
6958 ),
6959 }
6960 }
6961
6962 #[inline]
6963 unsafe fn decode(
6964 &mut self,
6965 decoder: &mut fidl::encoding::Decoder<
6966 '_,
6967 fidl::encoding::DefaultFuchsiaResourceDialect,
6968 >,
6969 offset: usize,
6970 _depth: fidl::encoding::Depth,
6971 ) -> fidl::Result<()> {
6972 decoder.debug_check_bounds::<Self>(offset);
6973 fidl::decode!(
6975 fidl::encoding::Array<
6976 fidl::encoding::HandleType<
6977 fidl::Handle,
6978 { fidl::ObjectType::NONE.into_raw() },
6979 2147483648,
6980 >,
6981 4,
6982 >,
6983 fidl::encoding::DefaultFuchsiaResourceDialect,
6984 &mut self.handles,
6985 decoder,
6986 offset + 0,
6987 _depth
6988 )?;
6989 Ok(())
6990 }
6991 }
6992
6993 impl fidl::encoding::ResourceTypeMarker for NullableHandle {
6994 type Borrowed<'a> = &'a mut Self;
6995 fn take_or_borrow<'a>(
6996 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6997 ) -> Self::Borrowed<'a> {
6998 value
6999 }
7000 }
7001
7002 unsafe impl fidl::encoding::TypeMarker for NullableHandle {
7003 type Owned = Self;
7004
7005 #[inline(always)]
7006 fn inline_align(_context: fidl::encoding::Context) -> usize {
7007 4
7008 }
7009
7010 #[inline(always)]
7011 fn inline_size(_context: fidl::encoding::Context) -> usize {
7012 4
7013 }
7014 }
7015
7016 unsafe impl
7017 fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7018 for &mut NullableHandle
7019 {
7020 #[inline]
7021 unsafe fn encode(
7022 self,
7023 encoder: &mut fidl::encoding::Encoder<
7024 '_,
7025 fidl::encoding::DefaultFuchsiaResourceDialect,
7026 >,
7027 offset: usize,
7028 _depth: fidl::encoding::Depth,
7029 ) -> fidl::Result<()> {
7030 encoder.debug_check_bounds::<NullableHandle>(offset);
7031 fidl::encoding::Encode::<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7033 (
7034 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7035 ),
7036 encoder, offset, _depth
7037 )
7038 }
7039 }
7040 unsafe impl<
7041 T0: fidl::encoding::Encode<
7042 fidl::encoding::Optional<
7043 fidl::encoding::HandleType<
7044 fidl::Handle,
7045 { fidl::ObjectType::NONE.into_raw() },
7046 2147483648,
7047 >,
7048 >,
7049 fidl::encoding::DefaultFuchsiaResourceDialect,
7050 >,
7051 > fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7052 for (T0,)
7053 {
7054 #[inline]
7055 unsafe fn encode(
7056 self,
7057 encoder: &mut fidl::encoding::Encoder<
7058 '_,
7059 fidl::encoding::DefaultFuchsiaResourceDialect,
7060 >,
7061 offset: usize,
7062 depth: fidl::encoding::Depth,
7063 ) -> fidl::Result<()> {
7064 encoder.debug_check_bounds::<NullableHandle>(offset);
7065 self.0.encode(encoder, offset + 0, depth)?;
7069 Ok(())
7070 }
7071 }
7072
7073 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7074 for NullableHandle
7075 {
7076 #[inline(always)]
7077 fn new_empty() -> Self {
7078 Self {
7079 h: fidl::new_empty!(
7080 fidl::encoding::Optional<
7081 fidl::encoding::HandleType<
7082 fidl::Handle,
7083 { fidl::ObjectType::NONE.into_raw() },
7084 2147483648,
7085 >,
7086 >,
7087 fidl::encoding::DefaultFuchsiaResourceDialect
7088 ),
7089 }
7090 }
7091
7092 #[inline]
7093 unsafe fn decode(
7094 &mut self,
7095 decoder: &mut fidl::encoding::Decoder<
7096 '_,
7097 fidl::encoding::DefaultFuchsiaResourceDialect,
7098 >,
7099 offset: usize,
7100 _depth: fidl::encoding::Depth,
7101 ) -> fidl::Result<()> {
7102 decoder.debug_check_bounds::<Self>(offset);
7103 fidl::decode!(
7105 fidl::encoding::Optional<
7106 fidl::encoding::HandleType<
7107 fidl::Handle,
7108 { fidl::ObjectType::NONE.into_raw() },
7109 2147483648,
7110 >,
7111 >,
7112 fidl::encoding::DefaultFuchsiaResourceDialect,
7113 &mut self.h,
7114 decoder,
7115 offset + 0,
7116 _depth
7117 )?;
7118 Ok(())
7119 }
7120 }
7121
7122 impl fidl::encoding::ResourceTypeMarker for OutOfLineArrayOfNonnullableHandles {
7123 type Borrowed<'a> = &'a mut Self;
7124 fn take_or_borrow<'a>(
7125 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7126 ) -> Self::Borrowed<'a> {
7127 value
7128 }
7129 }
7130
7131 unsafe impl fidl::encoding::TypeMarker for OutOfLineArrayOfNonnullableHandles {
7132 type Owned = Self;
7133
7134 #[inline(always)]
7135 fn inline_align(_context: fidl::encoding::Context) -> usize {
7136 8
7137 }
7138
7139 #[inline(always)]
7140 fn inline_size(_context: fidl::encoding::Context) -> usize {
7141 8
7142 }
7143 }
7144
7145 unsafe impl
7146 fidl::encoding::Encode<
7147 OutOfLineArrayOfNonnullableHandles,
7148 fidl::encoding::DefaultFuchsiaResourceDialect,
7149 > for &mut OutOfLineArrayOfNonnullableHandles
7150 {
7151 #[inline]
7152 unsafe fn encode(
7153 self,
7154 encoder: &mut fidl::encoding::Encoder<
7155 '_,
7156 fidl::encoding::DefaultFuchsiaResourceDialect,
7157 >,
7158 offset: usize,
7159 _depth: fidl::encoding::Depth,
7160 ) -> fidl::Result<()> {
7161 encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7162 fidl::encoding::Encode::<OutOfLineArrayOfNonnullableHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7164 (
7165 <fidl::encoding::Boxed<NonnullableHandleArray> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
7166 ),
7167 encoder, offset, _depth
7168 )
7169 }
7170 }
7171 unsafe impl<
7172 T0: fidl::encoding::Encode<
7173 fidl::encoding::Boxed<NonnullableHandleArray>,
7174 fidl::encoding::DefaultFuchsiaResourceDialect,
7175 >,
7176 >
7177 fidl::encoding::Encode<
7178 OutOfLineArrayOfNonnullableHandles,
7179 fidl::encoding::DefaultFuchsiaResourceDialect,
7180 > for (T0,)
7181 {
7182 #[inline]
7183 unsafe fn encode(
7184 self,
7185 encoder: &mut fidl::encoding::Encoder<
7186 '_,
7187 fidl::encoding::DefaultFuchsiaResourceDialect,
7188 >,
7189 offset: usize,
7190 depth: fidl::encoding::Depth,
7191 ) -> fidl::Result<()> {
7192 encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7193 self.0.encode(encoder, offset + 0, depth)?;
7197 Ok(())
7198 }
7199 }
7200
7201 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7202 for OutOfLineArrayOfNonnullableHandles
7203 {
7204 #[inline(always)]
7205 fn new_empty() -> Self {
7206 Self {
7207 handles: fidl::new_empty!(
7208 fidl::encoding::Boxed<NonnullableHandleArray>,
7209 fidl::encoding::DefaultFuchsiaResourceDialect
7210 ),
7211 }
7212 }
7213
7214 #[inline]
7215 unsafe fn decode(
7216 &mut self,
7217 decoder: &mut fidl::encoding::Decoder<
7218 '_,
7219 fidl::encoding::DefaultFuchsiaResourceDialect,
7220 >,
7221 offset: usize,
7222 _depth: fidl::encoding::Depth,
7223 ) -> fidl::Result<()> {
7224 decoder.debug_check_bounds::<Self>(offset);
7225 fidl::decode!(
7227 fidl::encoding::Boxed<NonnullableHandleArray>,
7228 fidl::encoding::DefaultFuchsiaResourceDialect,
7229 &mut self.handles,
7230 decoder,
7231 offset + 0,
7232 _depth
7233 )?;
7234 Ok(())
7235 }
7236 }
7237
7238 impl fidl::encoding::ResourceTypeMarker for Sandwich6 {
7239 type Borrowed<'a> = &'a mut Self;
7240 fn take_or_borrow<'a>(
7241 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7242 ) -> Self::Borrowed<'a> {
7243 value
7244 }
7245 }
7246
7247 unsafe impl fidl::encoding::TypeMarker for Sandwich6 {
7248 type Owned = Self;
7249
7250 #[inline(always)]
7251 fn inline_align(_context: fidl::encoding::Context) -> usize {
7252 8
7253 }
7254
7255 #[inline(always)]
7256 fn inline_size(_context: fidl::encoding::Context) -> usize {
7257 32
7258 }
7259 }
7260
7261 unsafe impl fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7262 for &mut Sandwich6
7263 {
7264 #[inline]
7265 unsafe fn encode(
7266 self,
7267 encoder: &mut fidl::encoding::Encoder<
7268 '_,
7269 fidl::encoding::DefaultFuchsiaResourceDialect,
7270 >,
7271 offset: usize,
7272 _depth: fidl::encoding::Depth,
7273 ) -> fidl::Result<()> {
7274 encoder.debug_check_bounds::<Sandwich6>(offset);
7275 fidl::encoding::Encode::<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7277 (
7278 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
7279 <UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.the_union),
7280 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
7281 ),
7282 encoder, offset, _depth
7283 )
7284 }
7285 }
7286 unsafe impl<
7287 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7288 T1: fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>,
7289 T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7290 > fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7291 for (T0, T1, T2)
7292 {
7293 #[inline]
7294 unsafe fn encode(
7295 self,
7296 encoder: &mut fidl::encoding::Encoder<
7297 '_,
7298 fidl::encoding::DefaultFuchsiaResourceDialect,
7299 >,
7300 offset: usize,
7301 depth: fidl::encoding::Depth,
7302 ) -> fidl::Result<()> {
7303 encoder.debug_check_bounds::<Sandwich6>(offset);
7304 unsafe {
7307 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7308 (ptr as *mut u64).write_unaligned(0);
7309 }
7310 unsafe {
7311 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
7312 (ptr as *mut u64).write_unaligned(0);
7313 }
7314 self.0.encode(encoder, offset + 0, depth)?;
7316 self.1.encode(encoder, offset + 8, depth)?;
7317 self.2.encode(encoder, offset + 24, depth)?;
7318 Ok(())
7319 }
7320 }
7321
7322 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {
7323 #[inline(always)]
7324 fn new_empty() -> Self {
7325 Self {
7326 before: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7327 the_union: fidl::new_empty!(
7328 UnionWithVector,
7329 fidl::encoding::DefaultFuchsiaResourceDialect
7330 ),
7331 after: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7332 }
7333 }
7334
7335 #[inline]
7336 unsafe fn decode(
7337 &mut self,
7338 decoder: &mut fidl::encoding::Decoder<
7339 '_,
7340 fidl::encoding::DefaultFuchsiaResourceDialect,
7341 >,
7342 offset: usize,
7343 _depth: fidl::encoding::Depth,
7344 ) -> fidl::Result<()> {
7345 decoder.debug_check_bounds::<Self>(offset);
7346 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7348 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7349 let mask = 0xffffffff00000000u64;
7350 let maskedval = padval & mask;
7351 if maskedval != 0 {
7352 return Err(fidl::Error::NonZeroPadding {
7353 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7354 });
7355 }
7356 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
7357 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7358 let mask = 0xffffffff00000000u64;
7359 let maskedval = padval & mask;
7360 if maskedval != 0 {
7361 return Err(fidl::Error::NonZeroPadding {
7362 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
7363 });
7364 }
7365 fidl::decode!(
7366 u32,
7367 fidl::encoding::DefaultFuchsiaResourceDialect,
7368 &mut self.before,
7369 decoder,
7370 offset + 0,
7371 _depth
7372 )?;
7373 fidl::decode!(
7374 UnionWithVector,
7375 fidl::encoding::DefaultFuchsiaResourceDialect,
7376 &mut self.the_union,
7377 decoder,
7378 offset + 8,
7379 _depth
7380 )?;
7381 fidl::decode!(
7382 u32,
7383 fidl::encoding::DefaultFuchsiaResourceDialect,
7384 &mut self.after,
7385 decoder,
7386 offset + 24,
7387 _depth
7388 )?;
7389 Ok(())
7390 }
7391 }
7392
7393 impl fidl::encoding::ResourceTypeMarker for ShortStringThenHandle {
7394 type Borrowed<'a> = &'a mut Self;
7395 fn take_or_borrow<'a>(
7396 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7397 ) -> Self::Borrowed<'a> {
7398 value
7399 }
7400 }
7401
7402 unsafe impl fidl::encoding::TypeMarker for ShortStringThenHandle {
7403 type Owned = Self;
7404
7405 #[inline(always)]
7406 fn inline_align(_context: fidl::encoding::Context) -> usize {
7407 8
7408 }
7409
7410 #[inline(always)]
7411 fn inline_size(_context: fidl::encoding::Context) -> usize {
7412 24
7413 }
7414 }
7415
7416 unsafe impl
7417 fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7418 for &mut ShortStringThenHandle
7419 {
7420 #[inline]
7421 unsafe fn encode(
7422 self,
7423 encoder: &mut fidl::encoding::Encoder<
7424 '_,
7425 fidl::encoding::DefaultFuchsiaResourceDialect,
7426 >,
7427 offset: usize,
7428 _depth: fidl::encoding::Depth,
7429 ) -> fidl::Result<()> {
7430 encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7431 fidl::encoding::Encode::<
7433 ShortStringThenHandle,
7434 fidl::encoding::DefaultFuchsiaResourceDialect,
7435 >::encode(
7436 (
7437 <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
7438 &self.s,
7439 ),
7440 <fidl::encoding::HandleType<
7441 fidl::Handle,
7442 { fidl::ObjectType::NONE.into_raw() },
7443 2147483648,
7444 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7445 &mut self.h
7446 ),
7447 ),
7448 encoder,
7449 offset,
7450 _depth,
7451 )
7452 }
7453 }
7454 unsafe impl<
7455 T0: fidl::encoding::Encode<
7456 fidl::encoding::BoundedString<1>,
7457 fidl::encoding::DefaultFuchsiaResourceDialect,
7458 >,
7459 T1: fidl::encoding::Encode<
7460 fidl::encoding::HandleType<
7461 fidl::Handle,
7462 { fidl::ObjectType::NONE.into_raw() },
7463 2147483648,
7464 >,
7465 fidl::encoding::DefaultFuchsiaResourceDialect,
7466 >,
7467 >
7468 fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7469 for (T0, T1)
7470 {
7471 #[inline]
7472 unsafe fn encode(
7473 self,
7474 encoder: &mut fidl::encoding::Encoder<
7475 '_,
7476 fidl::encoding::DefaultFuchsiaResourceDialect,
7477 >,
7478 offset: usize,
7479 depth: fidl::encoding::Depth,
7480 ) -> fidl::Result<()> {
7481 encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7482 unsafe {
7485 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7486 (ptr as *mut u64).write_unaligned(0);
7487 }
7488 self.0.encode(encoder, offset + 0, depth)?;
7490 self.1.encode(encoder, offset + 16, depth)?;
7491 Ok(())
7492 }
7493 }
7494
7495 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7496 for ShortStringThenHandle
7497 {
7498 #[inline(always)]
7499 fn new_empty() -> Self {
7500 Self {
7501 s: fidl::new_empty!(
7502 fidl::encoding::BoundedString<1>,
7503 fidl::encoding::DefaultFuchsiaResourceDialect
7504 ),
7505 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7506 }
7507 }
7508
7509 #[inline]
7510 unsafe fn decode(
7511 &mut self,
7512 decoder: &mut fidl::encoding::Decoder<
7513 '_,
7514 fidl::encoding::DefaultFuchsiaResourceDialect,
7515 >,
7516 offset: usize,
7517 _depth: fidl::encoding::Depth,
7518 ) -> fidl::Result<()> {
7519 decoder.debug_check_bounds::<Self>(offset);
7520 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7522 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7523 let mask = 0xffffffff00000000u64;
7524 let maskedval = padval & mask;
7525 if maskedval != 0 {
7526 return Err(fidl::Error::NonZeroPadding {
7527 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7528 });
7529 }
7530 fidl::decode!(
7531 fidl::encoding::BoundedString<1>,
7532 fidl::encoding::DefaultFuchsiaResourceDialect,
7533 &mut self.s,
7534 decoder,
7535 offset + 0,
7536 _depth
7537 )?;
7538 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 16, _depth)?;
7539 Ok(())
7540 }
7541 }
7542
7543 impl fidl::encoding::ResourceTypeMarker for SingleHandle {
7544 type Borrowed<'a> = &'a mut Self;
7545 fn take_or_borrow<'a>(
7546 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7547 ) -> Self::Borrowed<'a> {
7548 value
7549 }
7550 }
7551
7552 unsafe impl fidl::encoding::TypeMarker for SingleHandle {
7553 type Owned = Self;
7554
7555 #[inline(always)]
7556 fn inline_align(_context: fidl::encoding::Context) -> usize {
7557 4
7558 }
7559
7560 #[inline(always)]
7561 fn inline_size(_context: fidl::encoding::Context) -> usize {
7562 4
7563 }
7564 }
7565
7566 unsafe impl fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7567 for &mut SingleHandle
7568 {
7569 #[inline]
7570 unsafe fn encode(
7571 self,
7572 encoder: &mut fidl::encoding::Encoder<
7573 '_,
7574 fidl::encoding::DefaultFuchsiaResourceDialect,
7575 >,
7576 offset: usize,
7577 _depth: fidl::encoding::Depth,
7578 ) -> fidl::Result<()> {
7579 encoder.debug_check_bounds::<SingleHandle>(offset);
7580 fidl::encoding::Encode::<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7582 (
7583 <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7584 ),
7585 encoder, offset, _depth
7586 )
7587 }
7588 }
7589 unsafe impl<
7590 T0: fidl::encoding::Encode<
7591 fidl::encoding::HandleType<
7592 fidl::Handle,
7593 { fidl::ObjectType::NONE.into_raw() },
7594 2147483648,
7595 >,
7596 fidl::encoding::DefaultFuchsiaResourceDialect,
7597 >,
7598 > fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
7599 {
7600 #[inline]
7601 unsafe fn encode(
7602 self,
7603 encoder: &mut fidl::encoding::Encoder<
7604 '_,
7605 fidl::encoding::DefaultFuchsiaResourceDialect,
7606 >,
7607 offset: usize,
7608 depth: fidl::encoding::Depth,
7609 ) -> fidl::Result<()> {
7610 encoder.debug_check_bounds::<SingleHandle>(offset);
7611 self.0.encode(encoder, offset + 0, depth)?;
7615 Ok(())
7616 }
7617 }
7618
7619 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {
7620 #[inline(always)]
7621 fn new_empty() -> Self {
7622 Self {
7623 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7624 }
7625 }
7626
7627 #[inline]
7628 unsafe fn decode(
7629 &mut self,
7630 decoder: &mut fidl::encoding::Decoder<
7631 '_,
7632 fidl::encoding::DefaultFuchsiaResourceDialect,
7633 >,
7634 offset: usize,
7635 _depth: fidl::encoding::Depth,
7636 ) -> fidl::Result<()> {
7637 decoder.debug_check_bounds::<Self>(offset);
7638 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
7640 Ok(())
7641 }
7642 }
7643
7644 impl fidl::encoding::ResourceTypeMarker for SingleOptionalHandle {
7645 type Borrowed<'a> = &'a mut Self;
7646 fn take_or_borrow<'a>(
7647 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7648 ) -> Self::Borrowed<'a> {
7649 value
7650 }
7651 }
7652
7653 unsafe impl fidl::encoding::TypeMarker for SingleOptionalHandle {
7654 type Owned = Self;
7655
7656 #[inline(always)]
7657 fn inline_align(_context: fidl::encoding::Context) -> usize {
7658 4
7659 }
7660
7661 #[inline(always)]
7662 fn inline_size(_context: fidl::encoding::Context) -> usize {
7663 4
7664 }
7665 }
7666
7667 unsafe impl
7668 fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7669 for &mut SingleOptionalHandle
7670 {
7671 #[inline]
7672 unsafe fn encode(
7673 self,
7674 encoder: &mut fidl::encoding::Encoder<
7675 '_,
7676 fidl::encoding::DefaultFuchsiaResourceDialect,
7677 >,
7678 offset: usize,
7679 _depth: fidl::encoding::Depth,
7680 ) -> fidl::Result<()> {
7681 encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7682 fidl::encoding::Encode::<
7684 SingleOptionalHandle,
7685 fidl::encoding::DefaultFuchsiaResourceDialect,
7686 >::encode(
7687 (<fidl::encoding::Optional<
7688 fidl::encoding::HandleType<
7689 fidl::Handle,
7690 { fidl::ObjectType::NONE.into_raw() },
7691 2147483648,
7692 >,
7693 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7694 &mut self.h
7695 ),),
7696 encoder,
7697 offset,
7698 _depth,
7699 )
7700 }
7701 }
7702 unsafe impl<
7703 T0: fidl::encoding::Encode<
7704 fidl::encoding::Optional<
7705 fidl::encoding::HandleType<
7706 fidl::Handle,
7707 { fidl::ObjectType::NONE.into_raw() },
7708 2147483648,
7709 >,
7710 >,
7711 fidl::encoding::DefaultFuchsiaResourceDialect,
7712 >,
7713 >
7714 fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7715 for (T0,)
7716 {
7717 #[inline]
7718 unsafe fn encode(
7719 self,
7720 encoder: &mut fidl::encoding::Encoder<
7721 '_,
7722 fidl::encoding::DefaultFuchsiaResourceDialect,
7723 >,
7724 offset: usize,
7725 depth: fidl::encoding::Depth,
7726 ) -> fidl::Result<()> {
7727 encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7728 self.0.encode(encoder, offset + 0, depth)?;
7732 Ok(())
7733 }
7734 }
7735
7736 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7737 for SingleOptionalHandle
7738 {
7739 #[inline(always)]
7740 fn new_empty() -> Self {
7741 Self {
7742 h: fidl::new_empty!(
7743 fidl::encoding::Optional<
7744 fidl::encoding::HandleType<
7745 fidl::Handle,
7746 { fidl::ObjectType::NONE.into_raw() },
7747 2147483648,
7748 >,
7749 >,
7750 fidl::encoding::DefaultFuchsiaResourceDialect
7751 ),
7752 }
7753 }
7754
7755 #[inline]
7756 unsafe fn decode(
7757 &mut self,
7758 decoder: &mut fidl::encoding::Decoder<
7759 '_,
7760 fidl::encoding::DefaultFuchsiaResourceDialect,
7761 >,
7762 offset: usize,
7763 _depth: fidl::encoding::Depth,
7764 ) -> fidl::Result<()> {
7765 decoder.debug_check_bounds::<Self>(offset);
7766 fidl::decode!(
7768 fidl::encoding::Optional<
7769 fidl::encoding::HandleType<
7770 fidl::Handle,
7771 { fidl::ObjectType::NONE.into_raw() },
7772 2147483648,
7773 >,
7774 >,
7775 fidl::encoding::DefaultFuchsiaResourceDialect,
7776 &mut self.h,
7777 decoder,
7778 offset + 0,
7779 _depth
7780 )?;
7781 Ok(())
7782 }
7783 }
7784
7785 impl fidl::encoding::ResourceTypeMarker for StructOfEndpoints {
7786 type Borrowed<'a> = &'a mut Self;
7787 fn take_or_borrow<'a>(
7788 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7789 ) -> Self::Borrowed<'a> {
7790 value
7791 }
7792 }
7793
7794 unsafe impl fidl::encoding::TypeMarker for StructOfEndpoints {
7795 type Owned = Self;
7796
7797 #[inline(always)]
7798 fn inline_align(_context: fidl::encoding::Context) -> usize {
7799 4
7800 }
7801
7802 #[inline(always)]
7803 fn inline_size(_context: fidl::encoding::Context) -> usize {
7804 16
7805 }
7806 }
7807
7808 unsafe impl
7809 fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7810 for &mut StructOfEndpoints
7811 {
7812 #[inline]
7813 unsafe fn encode(
7814 self,
7815 encoder: &mut fidl::encoding::Encoder<
7816 '_,
7817 fidl::encoding::DefaultFuchsiaResourceDialect,
7818 >,
7819 offset: usize,
7820 _depth: fidl::encoding::Depth,
7821 ) -> fidl::Result<()> {
7822 encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7823 fidl::encoding::Encode::<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7825 (
7826 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.client_end),
7827 <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_client_end),
7828 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
7829 <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_server_end),
7830 ),
7831 encoder, offset, _depth
7832 )
7833 }
7834 }
7835 unsafe impl<
7836 T0: fidl::encoding::Encode<
7837 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7838 fidl::encoding::DefaultFuchsiaResourceDialect,
7839 >,
7840 T1: fidl::encoding::Encode<
7841 fidl::encoding::Optional<
7842 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7843 >,
7844 fidl::encoding::DefaultFuchsiaResourceDialect,
7845 >,
7846 T2: fidl::encoding::Encode<
7847 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7848 fidl::encoding::DefaultFuchsiaResourceDialect,
7849 >,
7850 T3: fidl::encoding::Encode<
7851 fidl::encoding::Optional<
7852 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7853 >,
7854 fidl::encoding::DefaultFuchsiaResourceDialect,
7855 >,
7856 > fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7857 for (T0, T1, T2, T3)
7858 {
7859 #[inline]
7860 unsafe fn encode(
7861 self,
7862 encoder: &mut fidl::encoding::Encoder<
7863 '_,
7864 fidl::encoding::DefaultFuchsiaResourceDialect,
7865 >,
7866 offset: usize,
7867 depth: fidl::encoding::Depth,
7868 ) -> fidl::Result<()> {
7869 encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7870 self.0.encode(encoder, offset + 0, depth)?;
7874 self.1.encode(encoder, offset + 4, depth)?;
7875 self.2.encode(encoder, offset + 8, depth)?;
7876 self.3.encode(encoder, offset + 12, depth)?;
7877 Ok(())
7878 }
7879 }
7880
7881 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7882 for StructOfEndpoints
7883 {
7884 #[inline(always)]
7885 fn new_empty() -> Self {
7886 Self {
7887 client_end: fidl::new_empty!(
7888 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7889 fidl::encoding::DefaultFuchsiaResourceDialect
7890 ),
7891 optional_client_end: fidl::new_empty!(
7892 fidl::encoding::Optional<
7893 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7894 >,
7895 fidl::encoding::DefaultFuchsiaResourceDialect
7896 ),
7897 server_end: fidl::new_empty!(
7898 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7899 fidl::encoding::DefaultFuchsiaResourceDialect
7900 ),
7901 optional_server_end: fidl::new_empty!(
7902 fidl::encoding::Optional<
7903 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7904 >,
7905 fidl::encoding::DefaultFuchsiaResourceDialect
7906 ),
7907 }
7908 }
7909
7910 #[inline]
7911 unsafe fn decode(
7912 &mut self,
7913 decoder: &mut fidl::encoding::Decoder<
7914 '_,
7915 fidl::encoding::DefaultFuchsiaResourceDialect,
7916 >,
7917 offset: usize,
7918 _depth: fidl::encoding::Depth,
7919 ) -> fidl::Result<()> {
7920 decoder.debug_check_bounds::<Self>(offset);
7921 fidl::decode!(
7923 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7924 fidl::encoding::DefaultFuchsiaResourceDialect,
7925 &mut self.client_end,
7926 decoder,
7927 offset + 0,
7928 _depth
7929 )?;
7930 fidl::decode!(
7931 fidl::encoding::Optional<
7932 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7933 >,
7934 fidl::encoding::DefaultFuchsiaResourceDialect,
7935 &mut self.optional_client_end,
7936 decoder,
7937 offset + 4,
7938 _depth
7939 )?;
7940 fidl::decode!(
7941 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7942 fidl::encoding::DefaultFuchsiaResourceDialect,
7943 &mut self.server_end,
7944 decoder,
7945 offset + 8,
7946 _depth
7947 )?;
7948 fidl::decode!(
7949 fidl::encoding::Optional<
7950 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7951 >,
7952 fidl::encoding::DefaultFuchsiaResourceDialect,
7953 &mut self.optional_server_end,
7954 decoder,
7955 offset + 12,
7956 _depth
7957 )?;
7958 Ok(())
7959 }
7960 }
7961
7962 impl fidl::encoding::ResourceTypeMarker for StructOfOptionalUnionOfHandle {
7963 type Borrowed<'a> = &'a mut Self;
7964 fn take_or_borrow<'a>(
7965 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7966 ) -> Self::Borrowed<'a> {
7967 value
7968 }
7969 }
7970
7971 unsafe impl fidl::encoding::TypeMarker for StructOfOptionalUnionOfHandle {
7972 type Owned = Self;
7973
7974 #[inline(always)]
7975 fn inline_align(_context: fidl::encoding::Context) -> usize {
7976 8
7977 }
7978
7979 #[inline(always)]
7980 fn inline_size(_context: fidl::encoding::Context) -> usize {
7981 16
7982 }
7983 }
7984
7985 unsafe impl
7986 fidl::encoding::Encode<
7987 StructOfOptionalUnionOfHandle,
7988 fidl::encoding::DefaultFuchsiaResourceDialect,
7989 > for &mut StructOfOptionalUnionOfHandle
7990 {
7991 #[inline]
7992 unsafe fn encode(
7993 self,
7994 encoder: &mut fidl::encoding::Encoder<
7995 '_,
7996 fidl::encoding::DefaultFuchsiaResourceDialect,
7997 >,
7998 offset: usize,
7999 _depth: fidl::encoding::Depth,
8000 ) -> fidl::Result<()> {
8001 encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8002 fidl::encoding::Encode::<StructOfOptionalUnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8004 (
8005 <fidl::encoding::OptionalUnion<UnionOfHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
8006 ),
8007 encoder, offset, _depth
8008 )
8009 }
8010 }
8011 unsafe impl<
8012 T0: fidl::encoding::Encode<
8013 fidl::encoding::OptionalUnion<UnionOfHandle>,
8014 fidl::encoding::DefaultFuchsiaResourceDialect,
8015 >,
8016 >
8017 fidl::encoding::Encode<
8018 StructOfOptionalUnionOfHandle,
8019 fidl::encoding::DefaultFuchsiaResourceDialect,
8020 > for (T0,)
8021 {
8022 #[inline]
8023 unsafe fn encode(
8024 self,
8025 encoder: &mut fidl::encoding::Encoder<
8026 '_,
8027 fidl::encoding::DefaultFuchsiaResourceDialect,
8028 >,
8029 offset: usize,
8030 depth: fidl::encoding::Depth,
8031 ) -> fidl::Result<()> {
8032 encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8033 self.0.encode(encoder, offset + 0, depth)?;
8037 Ok(())
8038 }
8039 }
8040
8041 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8042 for StructOfOptionalUnionOfHandle
8043 {
8044 #[inline(always)]
8045 fn new_empty() -> Self {
8046 Self {
8047 u: fidl::new_empty!(
8048 fidl::encoding::OptionalUnion<UnionOfHandle>,
8049 fidl::encoding::DefaultFuchsiaResourceDialect
8050 ),
8051 }
8052 }
8053
8054 #[inline]
8055 unsafe fn decode(
8056 &mut self,
8057 decoder: &mut fidl::encoding::Decoder<
8058 '_,
8059 fidl::encoding::DefaultFuchsiaResourceDialect,
8060 >,
8061 offset: usize,
8062 _depth: fidl::encoding::Depth,
8063 ) -> fidl::Result<()> {
8064 decoder.debug_check_bounds::<Self>(offset);
8065 fidl::decode!(
8067 fidl::encoding::OptionalUnion<UnionOfHandle>,
8068 fidl::encoding::DefaultFuchsiaResourceDialect,
8069 &mut self.u,
8070 decoder,
8071 offset + 0,
8072 _depth
8073 )?;
8074 Ok(())
8075 }
8076 }
8077
8078 impl fidl::encoding::ResourceTypeMarker for StructOfSimpleResourceTable {
8079 type Borrowed<'a> = &'a mut Self;
8080 fn take_or_borrow<'a>(
8081 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8082 ) -> Self::Borrowed<'a> {
8083 value
8084 }
8085 }
8086
8087 unsafe impl fidl::encoding::TypeMarker for StructOfSimpleResourceTable {
8088 type Owned = Self;
8089
8090 #[inline(always)]
8091 fn inline_align(_context: fidl::encoding::Context) -> usize {
8092 8
8093 }
8094
8095 #[inline(always)]
8096 fn inline_size(_context: fidl::encoding::Context) -> usize {
8097 16
8098 }
8099 }
8100
8101 unsafe impl
8102 fidl::encoding::Encode<
8103 StructOfSimpleResourceTable,
8104 fidl::encoding::DefaultFuchsiaResourceDialect,
8105 > for &mut StructOfSimpleResourceTable
8106 {
8107 #[inline]
8108 unsafe fn encode(
8109 self,
8110 encoder: &mut fidl::encoding::Encoder<
8111 '_,
8112 fidl::encoding::DefaultFuchsiaResourceDialect,
8113 >,
8114 offset: usize,
8115 _depth: fidl::encoding::Depth,
8116 ) -> fidl::Result<()> {
8117 encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8118 fidl::encoding::Encode::<
8120 StructOfSimpleResourceTable,
8121 fidl::encoding::DefaultFuchsiaResourceDialect,
8122 >::encode(
8123 (<SimpleResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8124 &mut self.table,
8125 ),),
8126 encoder,
8127 offset,
8128 _depth,
8129 )
8130 }
8131 }
8132 unsafe impl<
8133 T0: fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
8134 >
8135 fidl::encoding::Encode<
8136 StructOfSimpleResourceTable,
8137 fidl::encoding::DefaultFuchsiaResourceDialect,
8138 > for (T0,)
8139 {
8140 #[inline]
8141 unsafe fn encode(
8142 self,
8143 encoder: &mut fidl::encoding::Encoder<
8144 '_,
8145 fidl::encoding::DefaultFuchsiaResourceDialect,
8146 >,
8147 offset: usize,
8148 depth: fidl::encoding::Depth,
8149 ) -> fidl::Result<()> {
8150 encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8151 self.0.encode(encoder, offset + 0, depth)?;
8155 Ok(())
8156 }
8157 }
8158
8159 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8160 for StructOfSimpleResourceTable
8161 {
8162 #[inline(always)]
8163 fn new_empty() -> Self {
8164 Self {
8165 table: fidl::new_empty!(
8166 SimpleResourceTable,
8167 fidl::encoding::DefaultFuchsiaResourceDialect
8168 ),
8169 }
8170 }
8171
8172 #[inline]
8173 unsafe fn decode(
8174 &mut self,
8175 decoder: &mut fidl::encoding::Decoder<
8176 '_,
8177 fidl::encoding::DefaultFuchsiaResourceDialect,
8178 >,
8179 offset: usize,
8180 _depth: fidl::encoding::Depth,
8181 ) -> fidl::Result<()> {
8182 decoder.debug_check_bounds::<Self>(offset);
8183 fidl::decode!(
8185 SimpleResourceTable,
8186 fidl::encoding::DefaultFuchsiaResourceDialect,
8187 &mut self.table,
8188 decoder,
8189 offset + 0,
8190 _depth
8191 )?;
8192 Ok(())
8193 }
8194 }
8195
8196 impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandleStruct {
8197 type Borrowed<'a> = &'a mut Self;
8198 fn take_or_borrow<'a>(
8199 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8200 ) -> Self::Borrowed<'a> {
8201 value
8202 }
8203 }
8204
8205 unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandleStruct {
8206 type Owned = Self;
8207
8208 #[inline(always)]
8209 fn inline_align(_context: fidl::encoding::Context) -> usize {
8210 8
8211 }
8212
8213 #[inline(always)]
8214 fn inline_size(_context: fidl::encoding::Context) -> usize {
8215 16
8216 }
8217 }
8218
8219 unsafe impl
8220 fidl::encoding::Encode<
8221 TableFieldInlinedHandleStruct,
8222 fidl::encoding::DefaultFuchsiaResourceDialect,
8223 > for &mut TableFieldInlinedHandleStruct
8224 {
8225 #[inline]
8226 unsafe fn encode(
8227 self,
8228 encoder: &mut fidl::encoding::Encoder<
8229 '_,
8230 fidl::encoding::DefaultFuchsiaResourceDialect,
8231 >,
8232 offset: usize,
8233 _depth: fidl::encoding::Depth,
8234 ) -> fidl::Result<()> {
8235 encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8236 fidl::encoding::Encode::<
8238 TableFieldInlinedHandleStruct,
8239 fidl::encoding::DefaultFuchsiaResourceDialect,
8240 >::encode(
8241 (<TableFieldInlinedHandle as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8242 &mut self.t,
8243 ),),
8244 encoder,
8245 offset,
8246 _depth,
8247 )
8248 }
8249 }
8250 unsafe impl<
8251 T0: fidl::encoding::Encode<
8252 TableFieldInlinedHandle,
8253 fidl::encoding::DefaultFuchsiaResourceDialect,
8254 >,
8255 >
8256 fidl::encoding::Encode<
8257 TableFieldInlinedHandleStruct,
8258 fidl::encoding::DefaultFuchsiaResourceDialect,
8259 > for (T0,)
8260 {
8261 #[inline]
8262 unsafe fn encode(
8263 self,
8264 encoder: &mut fidl::encoding::Encoder<
8265 '_,
8266 fidl::encoding::DefaultFuchsiaResourceDialect,
8267 >,
8268 offset: usize,
8269 depth: fidl::encoding::Depth,
8270 ) -> fidl::Result<()> {
8271 encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8272 self.0.encode(encoder, offset + 0, depth)?;
8276 Ok(())
8277 }
8278 }
8279
8280 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8281 for TableFieldInlinedHandleStruct
8282 {
8283 #[inline(always)]
8284 fn new_empty() -> Self {
8285 Self {
8286 t: fidl::new_empty!(
8287 TableFieldInlinedHandle,
8288 fidl::encoding::DefaultFuchsiaResourceDialect
8289 ),
8290 }
8291 }
8292
8293 #[inline]
8294 unsafe fn decode(
8295 &mut self,
8296 decoder: &mut fidl::encoding::Decoder<
8297 '_,
8298 fidl::encoding::DefaultFuchsiaResourceDialect,
8299 >,
8300 offset: usize,
8301 _depth: fidl::encoding::Depth,
8302 ) -> fidl::Result<()> {
8303 decoder.debug_check_bounds::<Self>(offset);
8304 fidl::decode!(
8306 TableFieldInlinedHandle,
8307 fidl::encoding::DefaultFuchsiaResourceDialect,
8308 &mut self.t,
8309 decoder,
8310 offset + 0,
8311 _depth
8312 )?;
8313 Ok(())
8314 }
8315 }
8316
8317 impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResourceStruct {
8318 type Borrowed<'a> = &'a mut Self;
8319 fn take_or_borrow<'a>(
8320 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8321 ) -> Self::Borrowed<'a> {
8322 value
8323 }
8324 }
8325
8326 unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResourceStruct {
8327 type Owned = Self;
8328
8329 #[inline(always)]
8330 fn inline_align(_context: fidl::encoding::Context) -> usize {
8331 8
8332 }
8333
8334 #[inline(always)]
8335 fn inline_size(_context: fidl::encoding::Context) -> usize {
8336 16
8337 }
8338 }
8339
8340 unsafe impl
8341 fidl::encoding::Encode<
8342 TableFieldUnknownResourceStruct,
8343 fidl::encoding::DefaultFuchsiaResourceDialect,
8344 > for &mut TableFieldUnknownResourceStruct
8345 {
8346 #[inline]
8347 unsafe fn encode(
8348 self,
8349 encoder: &mut fidl::encoding::Encoder<
8350 '_,
8351 fidl::encoding::DefaultFuchsiaResourceDialect,
8352 >,
8353 offset: usize,
8354 _depth: fidl::encoding::Depth,
8355 ) -> fidl::Result<()> {
8356 encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8357 fidl::encoding::Encode::<TableFieldUnknownResourceStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8359 (
8360 <TableFieldUnknownResource as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8361 ),
8362 encoder, offset, _depth
8363 )
8364 }
8365 }
8366 unsafe impl<
8367 T0: fidl::encoding::Encode<
8368 TableFieldUnknownResource,
8369 fidl::encoding::DefaultFuchsiaResourceDialect,
8370 >,
8371 >
8372 fidl::encoding::Encode<
8373 TableFieldUnknownResourceStruct,
8374 fidl::encoding::DefaultFuchsiaResourceDialect,
8375 > for (T0,)
8376 {
8377 #[inline]
8378 unsafe fn encode(
8379 self,
8380 encoder: &mut fidl::encoding::Encoder<
8381 '_,
8382 fidl::encoding::DefaultFuchsiaResourceDialect,
8383 >,
8384 offset: usize,
8385 depth: fidl::encoding::Depth,
8386 ) -> fidl::Result<()> {
8387 encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8388 self.0.encode(encoder, offset + 0, depth)?;
8392 Ok(())
8393 }
8394 }
8395
8396 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8397 for TableFieldUnknownResourceStruct
8398 {
8399 #[inline(always)]
8400 fn new_empty() -> Self {
8401 Self {
8402 t: fidl::new_empty!(
8403 TableFieldUnknownResource,
8404 fidl::encoding::DefaultFuchsiaResourceDialect
8405 ),
8406 }
8407 }
8408
8409 #[inline]
8410 unsafe fn decode(
8411 &mut self,
8412 decoder: &mut fidl::encoding::Decoder<
8413 '_,
8414 fidl::encoding::DefaultFuchsiaResourceDialect,
8415 >,
8416 offset: usize,
8417 _depth: fidl::encoding::Depth,
8418 ) -> fidl::Result<()> {
8419 decoder.debug_check_bounds::<Self>(offset);
8420 fidl::decode!(
8422 TableFieldUnknownResource,
8423 fidl::encoding::DefaultFuchsiaResourceDialect,
8424 &mut self.t,
8425 decoder,
8426 offset + 0,
8427 _depth
8428 )?;
8429 Ok(())
8430 }
8431 }
8432
8433 impl fidl::encoding::ResourceTypeMarker for TableOfEndpoints {
8434 type Borrowed<'a> = &'a mut Self;
8435 fn take_or_borrow<'a>(
8436 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8437 ) -> Self::Borrowed<'a> {
8438 value
8439 }
8440 }
8441
8442 unsafe impl fidl::encoding::TypeMarker for TableOfEndpoints {
8443 type Owned = Self;
8444
8445 #[inline(always)]
8446 fn inline_align(_context: fidl::encoding::Context) -> usize {
8447 8
8448 }
8449
8450 #[inline(always)]
8451 fn inline_size(_context: fidl::encoding::Context) -> usize {
8452 16
8453 }
8454 }
8455
8456 unsafe impl
8457 fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8458 for &mut TableOfEndpoints
8459 {
8460 #[inline]
8461 unsafe fn encode(
8462 self,
8463 encoder: &mut fidl::encoding::Encoder<
8464 '_,
8465 fidl::encoding::DefaultFuchsiaResourceDialect,
8466 >,
8467 offset: usize,
8468 _depth: fidl::encoding::Depth,
8469 ) -> fidl::Result<()> {
8470 encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8471 fidl::encoding::Encode::<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8473 (
8474 <TableOfEndpointsTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8475 ),
8476 encoder, offset, _depth
8477 )
8478 }
8479 }
8480 unsafe impl<
8481 T0: fidl::encoding::Encode<
8482 TableOfEndpointsTable,
8483 fidl::encoding::DefaultFuchsiaResourceDialect,
8484 >,
8485 > fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8486 for (T0,)
8487 {
8488 #[inline]
8489 unsafe fn encode(
8490 self,
8491 encoder: &mut fidl::encoding::Encoder<
8492 '_,
8493 fidl::encoding::DefaultFuchsiaResourceDialect,
8494 >,
8495 offset: usize,
8496 depth: fidl::encoding::Depth,
8497 ) -> fidl::Result<()> {
8498 encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8499 self.0.encode(encoder, offset + 0, depth)?;
8503 Ok(())
8504 }
8505 }
8506
8507 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8508 for TableOfEndpoints
8509 {
8510 #[inline(always)]
8511 fn new_empty() -> Self {
8512 Self {
8513 t: fidl::new_empty!(
8514 TableOfEndpointsTable,
8515 fidl::encoding::DefaultFuchsiaResourceDialect
8516 ),
8517 }
8518 }
8519
8520 #[inline]
8521 unsafe fn decode(
8522 &mut self,
8523 decoder: &mut fidl::encoding::Decoder<
8524 '_,
8525 fidl::encoding::DefaultFuchsiaResourceDialect,
8526 >,
8527 offset: usize,
8528 _depth: fidl::encoding::Depth,
8529 ) -> fidl::Result<()> {
8530 decoder.debug_check_bounds::<Self>(offset);
8531 fidl::decode!(
8533 TableOfEndpointsTable,
8534 fidl::encoding::DefaultFuchsiaResourceDialect,
8535 &mut self.t,
8536 decoder,
8537 offset + 0,
8538 _depth
8539 )?;
8540 Ok(())
8541 }
8542 }
8543
8544 impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwichStruct {
8545 type Borrowed<'a> = &'a mut Self;
8546 fn take_or_borrow<'a>(
8547 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8548 ) -> Self::Borrowed<'a> {
8549 value
8550 }
8551 }
8552
8553 unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwichStruct {
8554 type Owned = Self;
8555
8556 #[inline(always)]
8557 fn inline_align(_context: fidl::encoding::Context) -> usize {
8558 8
8559 }
8560
8561 #[inline(always)]
8562 fn inline_size(_context: fidl::encoding::Context) -> usize {
8563 16
8564 }
8565 }
8566
8567 unsafe impl
8568 fidl::encoding::Encode<
8569 TableUnionWithVectorReservedSandwichStruct,
8570 fidl::encoding::DefaultFuchsiaResourceDialect,
8571 > for &mut TableUnionWithVectorReservedSandwichStruct
8572 {
8573 #[inline]
8574 unsafe fn encode(
8575 self,
8576 encoder: &mut fidl::encoding::Encoder<
8577 '_,
8578 fidl::encoding::DefaultFuchsiaResourceDialect,
8579 >,
8580 offset: usize,
8581 _depth: fidl::encoding::Depth,
8582 ) -> fidl::Result<()> {
8583 encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8584 fidl::encoding::Encode::<TableUnionWithVectorReservedSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8586 (
8587 <TableUnionWithVectorReservedSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8588 ),
8589 encoder, offset, _depth
8590 )
8591 }
8592 }
8593 unsafe impl<
8594 T0: fidl::encoding::Encode<
8595 TableUnionWithVectorReservedSandwich,
8596 fidl::encoding::DefaultFuchsiaResourceDialect,
8597 >,
8598 >
8599 fidl::encoding::Encode<
8600 TableUnionWithVectorReservedSandwichStruct,
8601 fidl::encoding::DefaultFuchsiaResourceDialect,
8602 > for (T0,)
8603 {
8604 #[inline]
8605 unsafe fn encode(
8606 self,
8607 encoder: &mut fidl::encoding::Encoder<
8608 '_,
8609 fidl::encoding::DefaultFuchsiaResourceDialect,
8610 >,
8611 offset: usize,
8612 depth: fidl::encoding::Depth,
8613 ) -> fidl::Result<()> {
8614 encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8615 self.0.encode(encoder, offset + 0, depth)?;
8619 Ok(())
8620 }
8621 }
8622
8623 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8624 for TableUnionWithVectorReservedSandwichStruct
8625 {
8626 #[inline(always)]
8627 fn new_empty() -> Self {
8628 Self {
8629 table: fidl::new_empty!(
8630 TableUnionWithVectorReservedSandwich,
8631 fidl::encoding::DefaultFuchsiaResourceDialect
8632 ),
8633 }
8634 }
8635
8636 #[inline]
8637 unsafe fn decode(
8638 &mut self,
8639 decoder: &mut fidl::encoding::Decoder<
8640 '_,
8641 fidl::encoding::DefaultFuchsiaResourceDialect,
8642 >,
8643 offset: usize,
8644 _depth: fidl::encoding::Depth,
8645 ) -> fidl::Result<()> {
8646 decoder.debug_check_bounds::<Self>(offset);
8647 fidl::decode!(
8649 TableUnionWithVectorReservedSandwich,
8650 fidl::encoding::DefaultFuchsiaResourceDialect,
8651 &mut self.table,
8652 decoder,
8653 offset + 0,
8654 _depth
8655 )?;
8656 Ok(())
8657 }
8658 }
8659
8660 impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwichStruct {
8661 type Borrowed<'a> = &'a mut Self;
8662 fn take_or_borrow<'a>(
8663 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8664 ) -> Self::Borrowed<'a> {
8665 value
8666 }
8667 }
8668
8669 unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwichStruct {
8670 type Owned = Self;
8671
8672 #[inline(always)]
8673 fn inline_align(_context: fidl::encoding::Context) -> usize {
8674 8
8675 }
8676
8677 #[inline(always)]
8678 fn inline_size(_context: fidl::encoding::Context) -> usize {
8679 16
8680 }
8681 }
8682
8683 unsafe impl
8684 fidl::encoding::Encode<
8685 TableUnionWithVectorStructSandwichStruct,
8686 fidl::encoding::DefaultFuchsiaResourceDialect,
8687 > for &mut TableUnionWithVectorStructSandwichStruct
8688 {
8689 #[inline]
8690 unsafe fn encode(
8691 self,
8692 encoder: &mut fidl::encoding::Encoder<
8693 '_,
8694 fidl::encoding::DefaultFuchsiaResourceDialect,
8695 >,
8696 offset: usize,
8697 _depth: fidl::encoding::Depth,
8698 ) -> fidl::Result<()> {
8699 encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8700 fidl::encoding::Encode::<TableUnionWithVectorStructSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8702 (
8703 <TableUnionWithVectorStructSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8704 ),
8705 encoder, offset, _depth
8706 )
8707 }
8708 }
8709 unsafe impl<
8710 T0: fidl::encoding::Encode<
8711 TableUnionWithVectorStructSandwich,
8712 fidl::encoding::DefaultFuchsiaResourceDialect,
8713 >,
8714 >
8715 fidl::encoding::Encode<
8716 TableUnionWithVectorStructSandwichStruct,
8717 fidl::encoding::DefaultFuchsiaResourceDialect,
8718 > for (T0,)
8719 {
8720 #[inline]
8721 unsafe fn encode(
8722 self,
8723 encoder: &mut fidl::encoding::Encoder<
8724 '_,
8725 fidl::encoding::DefaultFuchsiaResourceDialect,
8726 >,
8727 offset: usize,
8728 depth: fidl::encoding::Depth,
8729 ) -> fidl::Result<()> {
8730 encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8731 self.0.encode(encoder, offset + 0, depth)?;
8735 Ok(())
8736 }
8737 }
8738
8739 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8740 for TableUnionWithVectorStructSandwichStruct
8741 {
8742 #[inline(always)]
8743 fn new_empty() -> Self {
8744 Self {
8745 table: fidl::new_empty!(
8746 TableUnionWithVectorStructSandwich,
8747 fidl::encoding::DefaultFuchsiaResourceDialect
8748 ),
8749 }
8750 }
8751
8752 #[inline]
8753 unsafe fn decode(
8754 &mut self,
8755 decoder: &mut fidl::encoding::Decoder<
8756 '_,
8757 fidl::encoding::DefaultFuchsiaResourceDialect,
8758 >,
8759 offset: usize,
8760 _depth: fidl::encoding::Depth,
8761 ) -> fidl::Result<()> {
8762 decoder.debug_check_bounds::<Self>(offset);
8763 fidl::decode!(
8765 TableUnionWithVectorStructSandwich,
8766 fidl::encoding::DefaultFuchsiaResourceDialect,
8767 &mut self.table,
8768 decoder,
8769 offset + 0,
8770 _depth
8771 )?;
8772 Ok(())
8773 }
8774 }
8775
8776 impl fidl::encoding::ResourceTypeMarker for TestFlexibleResourceXUnionInStruct {
8777 type Borrowed<'a> = &'a mut Self;
8778 fn take_or_borrow<'a>(
8779 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8780 ) -> Self::Borrowed<'a> {
8781 value
8782 }
8783 }
8784
8785 unsafe impl fidl::encoding::TypeMarker for TestFlexibleResourceXUnionInStruct {
8786 type Owned = Self;
8787
8788 #[inline(always)]
8789 fn inline_align(_context: fidl::encoding::Context) -> usize {
8790 8
8791 }
8792
8793 #[inline(always)]
8794 fn inline_size(_context: fidl::encoding::Context) -> usize {
8795 16
8796 }
8797 }
8798
8799 unsafe impl
8800 fidl::encoding::Encode<
8801 TestFlexibleResourceXUnionInStruct,
8802 fidl::encoding::DefaultFuchsiaResourceDialect,
8803 > for &mut TestFlexibleResourceXUnionInStruct
8804 {
8805 #[inline]
8806 unsafe fn encode(
8807 self,
8808 encoder: &mut fidl::encoding::Encoder<
8809 '_,
8810 fidl::encoding::DefaultFuchsiaResourceDialect,
8811 >,
8812 offset: usize,
8813 _depth: fidl::encoding::Depth,
8814 ) -> fidl::Result<()> {
8815 encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8816 fidl::encoding::Encode::<
8818 TestFlexibleResourceXUnionInStruct,
8819 fidl::encoding::DefaultFuchsiaResourceDialect,
8820 >::encode(
8821 (<SampleResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8822 &mut self.xu,
8823 ),),
8824 encoder,
8825 offset,
8826 _depth,
8827 )
8828 }
8829 }
8830 unsafe impl<
8831 T0: fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
8832 >
8833 fidl::encoding::Encode<
8834 TestFlexibleResourceXUnionInStruct,
8835 fidl::encoding::DefaultFuchsiaResourceDialect,
8836 > for (T0,)
8837 {
8838 #[inline]
8839 unsafe fn encode(
8840 self,
8841 encoder: &mut fidl::encoding::Encoder<
8842 '_,
8843 fidl::encoding::DefaultFuchsiaResourceDialect,
8844 >,
8845 offset: usize,
8846 depth: fidl::encoding::Depth,
8847 ) -> fidl::Result<()> {
8848 encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8849 self.0.encode(encoder, offset + 0, depth)?;
8853 Ok(())
8854 }
8855 }
8856
8857 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8858 for TestFlexibleResourceXUnionInStruct
8859 {
8860 #[inline(always)]
8861 fn new_empty() -> Self {
8862 Self {
8863 xu: fidl::new_empty!(
8864 SampleResourceXUnion,
8865 fidl::encoding::DefaultFuchsiaResourceDialect
8866 ),
8867 }
8868 }
8869
8870 #[inline]
8871 unsafe fn decode(
8872 &mut self,
8873 decoder: &mut fidl::encoding::Decoder<
8874 '_,
8875 fidl::encoding::DefaultFuchsiaResourceDialect,
8876 >,
8877 offset: usize,
8878 _depth: fidl::encoding::Depth,
8879 ) -> fidl::Result<()> {
8880 decoder.debug_check_bounds::<Self>(offset);
8881 fidl::decode!(
8883 SampleResourceXUnion,
8884 fidl::encoding::DefaultFuchsiaResourceDialect,
8885 &mut self.xu,
8886 decoder,
8887 offset + 0,
8888 _depth
8889 )?;
8890 Ok(())
8891 }
8892 }
8893
8894 impl fidl::encoding::ResourceTypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8895 type Borrowed<'a> = &'a mut Self;
8896 fn take_or_borrow<'a>(
8897 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8898 ) -> Self::Borrowed<'a> {
8899 value
8900 }
8901 }
8902
8903 unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8904 type Owned = Self;
8905
8906 #[inline(always)]
8907 fn inline_align(_context: fidl::encoding::Context) -> usize {
8908 8
8909 }
8910
8911 #[inline(always)]
8912 fn inline_size(_context: fidl::encoding::Context) -> usize {
8913 16
8914 }
8915 }
8916
8917 unsafe impl
8918 fidl::encoding::Encode<
8919 TestOptionalFlexibleResourceXUnionInStruct,
8920 fidl::encoding::DefaultFuchsiaResourceDialect,
8921 > for &mut TestOptionalFlexibleResourceXUnionInStruct
8922 {
8923 #[inline]
8924 unsafe fn encode(
8925 self,
8926 encoder: &mut fidl::encoding::Encoder<
8927 '_,
8928 fidl::encoding::DefaultFuchsiaResourceDialect,
8929 >,
8930 offset: usize,
8931 _depth: fidl::encoding::Depth,
8932 ) -> fidl::Result<()> {
8933 encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8934 fidl::encoding::Encode::<TestOptionalFlexibleResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8936 (
8937 <fidl::encoding::OptionalUnion<SampleResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
8938 ),
8939 encoder, offset, _depth
8940 )
8941 }
8942 }
8943 unsafe impl<
8944 T0: fidl::encoding::Encode<
8945 fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8946 fidl::encoding::DefaultFuchsiaResourceDialect,
8947 >,
8948 >
8949 fidl::encoding::Encode<
8950 TestOptionalFlexibleResourceXUnionInStruct,
8951 fidl::encoding::DefaultFuchsiaResourceDialect,
8952 > for (T0,)
8953 {
8954 #[inline]
8955 unsafe fn encode(
8956 self,
8957 encoder: &mut fidl::encoding::Encoder<
8958 '_,
8959 fidl::encoding::DefaultFuchsiaResourceDialect,
8960 >,
8961 offset: usize,
8962 depth: fidl::encoding::Depth,
8963 ) -> fidl::Result<()> {
8964 encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8965 self.0.encode(encoder, offset + 0, depth)?;
8969 Ok(())
8970 }
8971 }
8972
8973 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8974 for TestOptionalFlexibleResourceXUnionInStruct
8975 {
8976 #[inline(always)]
8977 fn new_empty() -> Self {
8978 Self {
8979 xu: fidl::new_empty!(
8980 fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8981 fidl::encoding::DefaultFuchsiaResourceDialect
8982 ),
8983 }
8984 }
8985
8986 #[inline]
8987 unsafe fn decode(
8988 &mut self,
8989 decoder: &mut fidl::encoding::Decoder<
8990 '_,
8991 fidl::encoding::DefaultFuchsiaResourceDialect,
8992 >,
8993 offset: usize,
8994 _depth: fidl::encoding::Depth,
8995 ) -> fidl::Result<()> {
8996 decoder.debug_check_bounds::<Self>(offset);
8997 fidl::decode!(
8999 fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9000 fidl::encoding::DefaultFuchsiaResourceDialect,
9001 &mut self.xu,
9002 decoder,
9003 offset + 0,
9004 _depth
9005 )?;
9006 Ok(())
9007 }
9008 }
9009
9010 impl fidl::encoding::ResourceTypeMarker for TestOptionalStrictResourceXUnionInStruct {
9011 type Borrowed<'a> = &'a mut Self;
9012 fn take_or_borrow<'a>(
9013 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9014 ) -> Self::Borrowed<'a> {
9015 value
9016 }
9017 }
9018
9019 unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictResourceXUnionInStruct {
9020 type Owned = Self;
9021
9022 #[inline(always)]
9023 fn inline_align(_context: fidl::encoding::Context) -> usize {
9024 8
9025 }
9026
9027 #[inline(always)]
9028 fn inline_size(_context: fidl::encoding::Context) -> usize {
9029 16
9030 }
9031 }
9032
9033 unsafe impl
9034 fidl::encoding::Encode<
9035 TestOptionalStrictResourceXUnionInStruct,
9036 fidl::encoding::DefaultFuchsiaResourceDialect,
9037 > for &mut TestOptionalStrictResourceXUnionInStruct
9038 {
9039 #[inline]
9040 unsafe fn encode(
9041 self,
9042 encoder: &mut fidl::encoding::Encoder<
9043 '_,
9044 fidl::encoding::DefaultFuchsiaResourceDialect,
9045 >,
9046 offset: usize,
9047 _depth: fidl::encoding::Depth,
9048 ) -> fidl::Result<()> {
9049 encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9050 fidl::encoding::Encode::<TestOptionalStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9052 (
9053 <fidl::encoding::OptionalUnion<SampleStrictResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9054 ),
9055 encoder, offset, _depth
9056 )
9057 }
9058 }
9059 unsafe impl<
9060 T0: fidl::encoding::Encode<
9061 fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9062 fidl::encoding::DefaultFuchsiaResourceDialect,
9063 >,
9064 >
9065 fidl::encoding::Encode<
9066 TestOptionalStrictResourceXUnionInStruct,
9067 fidl::encoding::DefaultFuchsiaResourceDialect,
9068 > for (T0,)
9069 {
9070 #[inline]
9071 unsafe fn encode(
9072 self,
9073 encoder: &mut fidl::encoding::Encoder<
9074 '_,
9075 fidl::encoding::DefaultFuchsiaResourceDialect,
9076 >,
9077 offset: usize,
9078 depth: fidl::encoding::Depth,
9079 ) -> fidl::Result<()> {
9080 encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9081 self.0.encode(encoder, offset + 0, depth)?;
9085 Ok(())
9086 }
9087 }
9088
9089 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9090 for TestOptionalStrictResourceXUnionInStruct
9091 {
9092 #[inline(always)]
9093 fn new_empty() -> Self {
9094 Self {
9095 xu: fidl::new_empty!(
9096 fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9097 fidl::encoding::DefaultFuchsiaResourceDialect
9098 ),
9099 }
9100 }
9101
9102 #[inline]
9103 unsafe fn decode(
9104 &mut self,
9105 decoder: &mut fidl::encoding::Decoder<
9106 '_,
9107 fidl::encoding::DefaultFuchsiaResourceDialect,
9108 >,
9109 offset: usize,
9110 _depth: fidl::encoding::Depth,
9111 ) -> fidl::Result<()> {
9112 decoder.debug_check_bounds::<Self>(offset);
9113 fidl::decode!(
9115 fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9116 fidl::encoding::DefaultFuchsiaResourceDialect,
9117 &mut self.xu,
9118 decoder,
9119 offset + 0,
9120 _depth
9121 )?;
9122 Ok(())
9123 }
9124 }
9125
9126 impl fidl::encoding::ResourceTypeMarker for TestPackageResolverResolveRequest {
9127 type Borrowed<'a> = &'a mut Self;
9128 fn take_or_borrow<'a>(
9129 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9130 ) -> Self::Borrowed<'a> {
9131 value
9132 }
9133 }
9134
9135 unsafe impl fidl::encoding::TypeMarker for TestPackageResolverResolveRequest {
9136 type Owned = Self;
9137
9138 #[inline(always)]
9139 fn inline_align(_context: fidl::encoding::Context) -> usize {
9140 8
9141 }
9142
9143 #[inline(always)]
9144 fn inline_size(_context: fidl::encoding::Context) -> usize {
9145 40
9146 }
9147 }
9148
9149 unsafe impl
9150 fidl::encoding::Encode<
9151 TestPackageResolverResolveRequest,
9152 fidl::encoding::DefaultFuchsiaResourceDialect,
9153 > for &mut TestPackageResolverResolveRequest
9154 {
9155 #[inline]
9156 unsafe fn encode(
9157 self,
9158 encoder: &mut fidl::encoding::Encoder<
9159 '_,
9160 fidl::encoding::DefaultFuchsiaResourceDialect,
9161 >,
9162 offset: usize,
9163 _depth: fidl::encoding::Depth,
9164 ) -> fidl::Result<()> {
9165 encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9166 fidl::encoding::Encode::<TestPackageResolverResolveRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9168 (
9169 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),
9170 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.selectors),
9171 <UpdatePolicy as fidl::encoding::ValueTypeMarker>::borrow(&self.update_policy),
9172 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
9173 ),
9174 encoder, offset, _depth
9175 )
9176 }
9177 }
9178 unsafe impl<
9179 T0: fidl::encoding::Encode<
9180 fidl::encoding::UnboundedString,
9181 fidl::encoding::DefaultFuchsiaResourceDialect,
9182 >,
9183 T1: fidl::encoding::Encode<
9184 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9185 fidl::encoding::DefaultFuchsiaResourceDialect,
9186 >,
9187 T2: fidl::encoding::Encode<UpdatePolicy, fidl::encoding::DefaultFuchsiaResourceDialect>,
9188 T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
9189 >
9190 fidl::encoding::Encode<
9191 TestPackageResolverResolveRequest,
9192 fidl::encoding::DefaultFuchsiaResourceDialect,
9193 > for (T0, T1, T2, T3)
9194 {
9195 #[inline]
9196 unsafe fn encode(
9197 self,
9198 encoder: &mut fidl::encoding::Encoder<
9199 '_,
9200 fidl::encoding::DefaultFuchsiaResourceDialect,
9201 >,
9202 offset: usize,
9203 depth: fidl::encoding::Depth,
9204 ) -> fidl::Result<()> {
9205 encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9206 unsafe {
9209 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9210 (ptr as *mut u64).write_unaligned(0);
9211 }
9212 self.0.encode(encoder, offset + 0, depth)?;
9214 self.1.encode(encoder, offset + 16, depth)?;
9215 self.2.encode(encoder, offset + 32, depth)?;
9216 self.3.encode(encoder, offset + 36, depth)?;
9217 Ok(())
9218 }
9219 }
9220
9221 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9222 for TestPackageResolverResolveRequest
9223 {
9224 #[inline(always)]
9225 fn new_empty() -> Self {
9226 Self {
9227 package_url: fidl::new_empty!(
9228 fidl::encoding::UnboundedString,
9229 fidl::encoding::DefaultFuchsiaResourceDialect
9230 ),
9231 selectors: fidl::new_empty!(
9232 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9233 fidl::encoding::DefaultFuchsiaResourceDialect
9234 ),
9235 update_policy: fidl::new_empty!(
9236 UpdatePolicy,
9237 fidl::encoding::DefaultFuchsiaResourceDialect
9238 ),
9239 this_should_be_a_handle: fidl::new_empty!(
9240 u32,
9241 fidl::encoding::DefaultFuchsiaResourceDialect
9242 ),
9243 }
9244 }
9245
9246 #[inline]
9247 unsafe fn decode(
9248 &mut self,
9249 decoder: &mut fidl::encoding::Decoder<
9250 '_,
9251 fidl::encoding::DefaultFuchsiaResourceDialect,
9252 >,
9253 offset: usize,
9254 _depth: fidl::encoding::Depth,
9255 ) -> fidl::Result<()> {
9256 decoder.debug_check_bounds::<Self>(offset);
9257 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9259 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9260 let mask = 0xffff0000u64;
9261 let maskedval = padval & mask;
9262 if maskedval != 0 {
9263 return Err(fidl::Error::NonZeroPadding {
9264 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9265 });
9266 }
9267 fidl::decode!(
9268 fidl::encoding::UnboundedString,
9269 fidl::encoding::DefaultFuchsiaResourceDialect,
9270 &mut self.package_url,
9271 decoder,
9272 offset + 0,
9273 _depth
9274 )?;
9275 fidl::decode!(
9276 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9277 fidl::encoding::DefaultFuchsiaResourceDialect,
9278 &mut self.selectors,
9279 decoder,
9280 offset + 16,
9281 _depth
9282 )?;
9283 fidl::decode!(
9284 UpdatePolicy,
9285 fidl::encoding::DefaultFuchsiaResourceDialect,
9286 &mut self.update_policy,
9287 decoder,
9288 offset + 32,
9289 _depth
9290 )?;
9291 fidl::decode!(
9292 u32,
9293 fidl::encoding::DefaultFuchsiaResourceDialect,
9294 &mut self.this_should_be_a_handle,
9295 decoder,
9296 offset + 36,
9297 _depth
9298 )?;
9299 Ok(())
9300 }
9301 }
9302
9303 impl fidl::encoding::ResourceTypeMarker for TestStrictResourceXUnionInStruct {
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 TestStrictResourceXUnionInStruct {
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 TestStrictResourceXUnionInStruct,
9329 fidl::encoding::DefaultFuchsiaResourceDialect,
9330 > for &mut TestStrictResourceXUnionInStruct
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::<TestStrictResourceXUnionInStruct>(offset);
9343 fidl::encoding::Encode::<TestStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9345 (
9346 <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 SampleStrictResourceXUnion,
9355 fidl::encoding::DefaultFuchsiaResourceDialect,
9356 >,
9357 >
9358 fidl::encoding::Encode<
9359 TestStrictResourceXUnionInStruct,
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::<TestStrictResourceXUnionInStruct>(offset);
9374 self.0.encode(encoder, offset + 0, depth)?;
9378 Ok(())
9379 }
9380 }
9381
9382 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9383 for TestStrictResourceXUnionInStruct
9384 {
9385 #[inline(always)]
9386 fn new_empty() -> Self {
9387 Self {
9388 xu: fidl::new_empty!(
9389 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 fidl::decode!(
9408 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 UnboundedNonnullableVectorOfHandles {
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 UnboundedNonnullableVectorOfHandles {
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 16
9439 }
9440 }
9441
9442 unsafe impl
9443 fidl::encoding::Encode<
9444 UnboundedNonnullableVectorOfHandles,
9445 fidl::encoding::DefaultFuchsiaResourceDialect,
9446 > for &mut UnboundedNonnullableVectorOfHandles
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::<UnboundedNonnullableVectorOfHandles>(offset);
9459 fidl::encoding::Encode::<
9461 UnboundedNonnullableVectorOfHandles,
9462 fidl::encoding::DefaultFuchsiaResourceDialect,
9463 >::encode(
9464 (<fidl::encoding::UnboundedVector<
9465 fidl::encoding::HandleType<
9466 fidl::Handle,
9467 { fidl::ObjectType::NONE.into_raw() },
9468 2147483648,
9469 >,
9470 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9471 &mut self.vh0
9472 ),),
9473 encoder,
9474 offset,
9475 _depth,
9476 )
9477 }
9478 }
9479 unsafe impl<
9480 T0: fidl::encoding::Encode<
9481 fidl::encoding::UnboundedVector<
9482 fidl::encoding::HandleType<
9483 fidl::Handle,
9484 { fidl::ObjectType::NONE.into_raw() },
9485 2147483648,
9486 >,
9487 >,
9488 fidl::encoding::DefaultFuchsiaResourceDialect,
9489 >,
9490 >
9491 fidl::encoding::Encode<
9492 UnboundedNonnullableVectorOfHandles,
9493 fidl::encoding::DefaultFuchsiaResourceDialect,
9494 > for (T0,)
9495 {
9496 #[inline]
9497 unsafe fn encode(
9498 self,
9499 encoder: &mut fidl::encoding::Encoder<
9500 '_,
9501 fidl::encoding::DefaultFuchsiaResourceDialect,
9502 >,
9503 offset: usize,
9504 depth: fidl::encoding::Depth,
9505 ) -> fidl::Result<()> {
9506 encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9507 self.0.encode(encoder, offset + 0, depth)?;
9511 Ok(())
9512 }
9513 }
9514
9515 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9516 for UnboundedNonnullableVectorOfHandles
9517 {
9518 #[inline(always)]
9519 fn new_empty() -> Self {
9520 Self {
9521 vh0: fidl::new_empty!(
9522 fidl::encoding::UnboundedVector<
9523 fidl::encoding::HandleType<
9524 fidl::Handle,
9525 { fidl::ObjectType::NONE.into_raw() },
9526 2147483648,
9527 >,
9528 >,
9529 fidl::encoding::DefaultFuchsiaResourceDialect
9530 ),
9531 }
9532 }
9533
9534 #[inline]
9535 unsafe fn decode(
9536 &mut self,
9537 decoder: &mut fidl::encoding::Decoder<
9538 '_,
9539 fidl::encoding::DefaultFuchsiaResourceDialect,
9540 >,
9541 offset: usize,
9542 _depth: fidl::encoding::Depth,
9543 ) -> fidl::Result<()> {
9544 decoder.debug_check_bounds::<Self>(offset);
9545 fidl::decode!(
9547 fidl::encoding::UnboundedVector<
9548 fidl::encoding::HandleType<
9549 fidl::Handle,
9550 { fidl::ObjectType::NONE.into_raw() },
9551 2147483648,
9552 >,
9553 >,
9554 fidl::encoding::DefaultFuchsiaResourceDialect,
9555 &mut self.vh0,
9556 decoder,
9557 offset + 0,
9558 _depth
9559 )?;
9560 Ok(())
9561 }
9562 }
9563
9564 impl fidl::encoding::ResourceTypeMarker for UnboundedNullableVectorOfHandles {
9565 type Borrowed<'a> = &'a mut Self;
9566 fn take_or_borrow<'a>(
9567 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9568 ) -> Self::Borrowed<'a> {
9569 value
9570 }
9571 }
9572
9573 unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfHandles {
9574 type Owned = Self;
9575
9576 #[inline(always)]
9577 fn inline_align(_context: fidl::encoding::Context) -> usize {
9578 8
9579 }
9580
9581 #[inline(always)]
9582 fn inline_size(_context: fidl::encoding::Context) -> usize {
9583 16
9584 }
9585 }
9586
9587 unsafe impl
9588 fidl::encoding::Encode<
9589 UnboundedNullableVectorOfHandles,
9590 fidl::encoding::DefaultFuchsiaResourceDialect,
9591 > for &mut UnboundedNullableVectorOfHandles
9592 {
9593 #[inline]
9594 unsafe fn encode(
9595 self,
9596 encoder: &mut fidl::encoding::Encoder<
9597 '_,
9598 fidl::encoding::DefaultFuchsiaResourceDialect,
9599 >,
9600 offset: usize,
9601 _depth: fidl::encoding::Depth,
9602 ) -> fidl::Result<()> {
9603 encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9604 fidl::encoding::Encode::<
9606 UnboundedNullableVectorOfHandles,
9607 fidl::encoding::DefaultFuchsiaResourceDialect,
9608 >::encode(
9609 (<fidl::encoding::Optional<
9610 fidl::encoding::UnboundedVector<
9611 fidl::encoding::HandleType<
9612 fidl::Handle,
9613 { fidl::ObjectType::NONE.into_raw() },
9614 2147483648,
9615 >,
9616 >,
9617 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9618 &mut self.vh0
9619 ),),
9620 encoder,
9621 offset,
9622 _depth,
9623 )
9624 }
9625 }
9626 unsafe impl<
9627 T0: fidl::encoding::Encode<
9628 fidl::encoding::Optional<
9629 fidl::encoding::UnboundedVector<
9630 fidl::encoding::HandleType<
9631 fidl::Handle,
9632 { fidl::ObjectType::NONE.into_raw() },
9633 2147483648,
9634 >,
9635 >,
9636 >,
9637 fidl::encoding::DefaultFuchsiaResourceDialect,
9638 >,
9639 >
9640 fidl::encoding::Encode<
9641 UnboundedNullableVectorOfHandles,
9642 fidl::encoding::DefaultFuchsiaResourceDialect,
9643 > for (T0,)
9644 {
9645 #[inline]
9646 unsafe fn encode(
9647 self,
9648 encoder: &mut fidl::encoding::Encoder<
9649 '_,
9650 fidl::encoding::DefaultFuchsiaResourceDialect,
9651 >,
9652 offset: usize,
9653 depth: fidl::encoding::Depth,
9654 ) -> fidl::Result<()> {
9655 encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9656 self.0.encode(encoder, offset + 0, depth)?;
9660 Ok(())
9661 }
9662 }
9663
9664 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9665 for UnboundedNullableVectorOfHandles
9666 {
9667 #[inline(always)]
9668 fn new_empty() -> Self {
9669 Self {
9670 vh0: fidl::new_empty!(
9671 fidl::encoding::Optional<
9672 fidl::encoding::UnboundedVector<
9673 fidl::encoding::HandleType<
9674 fidl::Handle,
9675 { fidl::ObjectType::NONE.into_raw() },
9676 2147483648,
9677 >,
9678 >,
9679 >,
9680 fidl::encoding::DefaultFuchsiaResourceDialect
9681 ),
9682 }
9683 }
9684
9685 #[inline]
9686 unsafe fn decode(
9687 &mut self,
9688 decoder: &mut fidl::encoding::Decoder<
9689 '_,
9690 fidl::encoding::DefaultFuchsiaResourceDialect,
9691 >,
9692 offset: usize,
9693 _depth: fidl::encoding::Depth,
9694 ) -> fidl::Result<()> {
9695 decoder.debug_check_bounds::<Self>(offset);
9696 fidl::decode!(
9698 fidl::encoding::Optional<
9699 fidl::encoding::UnboundedVector<
9700 fidl::encoding::HandleType<
9701 fidl::Handle,
9702 { fidl::ObjectType::NONE.into_raw() },
9703 2147483648,
9704 >,
9705 >,
9706 >,
9707 fidl::encoding::DefaultFuchsiaResourceDialect,
9708 &mut self.vh0,
9709 decoder,
9710 offset + 0,
9711 _depth
9712 )?;
9713 Ok(())
9714 }
9715 }
9716
9717 impl fidl::encoding::ResourceTypeMarker for UnionOfEndpoints {
9718 type Borrowed<'a> = &'a mut Self;
9719 fn take_or_borrow<'a>(
9720 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9721 ) -> Self::Borrowed<'a> {
9722 value
9723 }
9724 }
9725
9726 unsafe impl fidl::encoding::TypeMarker for UnionOfEndpoints {
9727 type Owned = Self;
9728
9729 #[inline(always)]
9730 fn inline_align(_context: fidl::encoding::Context) -> usize {
9731 8
9732 }
9733
9734 #[inline(always)]
9735 fn inline_size(_context: fidl::encoding::Context) -> usize {
9736 16
9737 }
9738 }
9739
9740 unsafe impl
9741 fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9742 for &mut UnionOfEndpoints
9743 {
9744 #[inline]
9745 unsafe fn encode(
9746 self,
9747 encoder: &mut fidl::encoding::Encoder<
9748 '_,
9749 fidl::encoding::DefaultFuchsiaResourceDialect,
9750 >,
9751 offset: usize,
9752 _depth: fidl::encoding::Depth,
9753 ) -> fidl::Result<()> {
9754 encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9755 fidl::encoding::Encode::<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9757 (
9758 <UnionOfEndpointsUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
9759 ),
9760 encoder, offset, _depth
9761 )
9762 }
9763 }
9764 unsafe impl<
9765 T0: fidl::encoding::Encode<
9766 UnionOfEndpointsUnion,
9767 fidl::encoding::DefaultFuchsiaResourceDialect,
9768 >,
9769 > fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9770 for (T0,)
9771 {
9772 #[inline]
9773 unsafe fn encode(
9774 self,
9775 encoder: &mut fidl::encoding::Encoder<
9776 '_,
9777 fidl::encoding::DefaultFuchsiaResourceDialect,
9778 >,
9779 offset: usize,
9780 depth: fidl::encoding::Depth,
9781 ) -> fidl::Result<()> {
9782 encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9783 self.0.encode(encoder, offset + 0, depth)?;
9787 Ok(())
9788 }
9789 }
9790
9791 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9792 for UnionOfEndpoints
9793 {
9794 #[inline(always)]
9795 fn new_empty() -> Self {
9796 Self {
9797 u: fidl::new_empty!(
9798 UnionOfEndpointsUnion,
9799 fidl::encoding::DefaultFuchsiaResourceDialect
9800 ),
9801 }
9802 }
9803
9804 #[inline]
9805 unsafe fn decode(
9806 &mut self,
9807 decoder: &mut fidl::encoding::Decoder<
9808 '_,
9809 fidl::encoding::DefaultFuchsiaResourceDialect,
9810 >,
9811 offset: usize,
9812 _depth: fidl::encoding::Depth,
9813 ) -> fidl::Result<()> {
9814 decoder.debug_check_bounds::<Self>(offset);
9815 fidl::decode!(
9817 UnionOfEndpointsUnion,
9818 fidl::encoding::DefaultFuchsiaResourceDialect,
9819 &mut self.u,
9820 decoder,
9821 offset + 0,
9822 _depth
9823 )?;
9824 Ok(())
9825 }
9826 }
9827
9828 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9829 type Borrowed<'a> = &'a mut Self;
9830 fn take_or_borrow<'a>(
9831 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9832 ) -> Self::Borrowed<'a> {
9833 value
9834 }
9835 }
9836
9837 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9838 type Owned = Self;
9839
9840 #[inline(always)]
9841 fn inline_align(_context: fidl::encoding::Context) -> usize {
9842 8
9843 }
9844
9845 #[inline(always)]
9846 fn inline_size(_context: fidl::encoding::Context) -> usize {
9847 16
9848 }
9849 }
9850
9851 unsafe impl
9852 fidl::encoding::Encode<
9853 VectorOfArrayOfEventInStructWithDefaultRights,
9854 fidl::encoding::DefaultFuchsiaResourceDialect,
9855 > for &mut VectorOfArrayOfEventInStructWithDefaultRights
9856 {
9857 #[inline]
9858 unsafe fn encode(
9859 self,
9860 encoder: &mut fidl::encoding::Encoder<
9861 '_,
9862 fidl::encoding::DefaultFuchsiaResourceDialect,
9863 >,
9864 offset: usize,
9865 _depth: fidl::encoding::Depth,
9866 ) -> fidl::Result<()> {
9867 encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9868 fidl::encoding::Encode::<
9870 VectorOfArrayOfEventInStructWithDefaultRights,
9871 fidl::encoding::DefaultFuchsiaResourceDialect,
9872 >::encode(
9873 (<fidl::encoding::Vector<
9874 fidl::encoding::Array<
9875 fidl::encoding::HandleType<
9876 fidl::Event,
9877 { fidl::ObjectType::EVENT.into_raw() },
9878 53251,
9879 >,
9880 1,
9881 >,
9882 1,
9883 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9884 &mut self.h
9885 ),),
9886 encoder,
9887 offset,
9888 _depth,
9889 )
9890 }
9891 }
9892 unsafe impl<
9893 T0: fidl::encoding::Encode<
9894 fidl::encoding::Vector<
9895 fidl::encoding::Array<
9896 fidl::encoding::HandleType<
9897 fidl::Event,
9898 { fidl::ObjectType::EVENT.into_raw() },
9899 53251,
9900 >,
9901 1,
9902 >,
9903 1,
9904 >,
9905 fidl::encoding::DefaultFuchsiaResourceDialect,
9906 >,
9907 >
9908 fidl::encoding::Encode<
9909 VectorOfArrayOfEventInStructWithDefaultRights,
9910 fidl::encoding::DefaultFuchsiaResourceDialect,
9911 > for (T0,)
9912 {
9913 #[inline]
9914 unsafe fn encode(
9915 self,
9916 encoder: &mut fidl::encoding::Encoder<
9917 '_,
9918 fidl::encoding::DefaultFuchsiaResourceDialect,
9919 >,
9920 offset: usize,
9921 depth: fidl::encoding::Depth,
9922 ) -> fidl::Result<()> {
9923 encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9924 self.0.encode(encoder, offset + 0, depth)?;
9928 Ok(())
9929 }
9930 }
9931
9932 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9933 for VectorOfArrayOfEventInStructWithDefaultRights
9934 {
9935 #[inline(always)]
9936 fn new_empty() -> Self {
9937 Self {
9938 h: fidl::new_empty!(
9939 fidl::encoding::Vector<
9940 fidl::encoding::Array<
9941 fidl::encoding::HandleType<
9942 fidl::Event,
9943 { fidl::ObjectType::EVENT.into_raw() },
9944 53251,
9945 >,
9946 1,
9947 >,
9948 1,
9949 >,
9950 fidl::encoding::DefaultFuchsiaResourceDialect
9951 ),
9952 }
9953 }
9954
9955 #[inline]
9956 unsafe fn decode(
9957 &mut self,
9958 decoder: &mut fidl::encoding::Decoder<
9959 '_,
9960 fidl::encoding::DefaultFuchsiaResourceDialect,
9961 >,
9962 offset: usize,
9963 _depth: fidl::encoding::Depth,
9964 ) -> fidl::Result<()> {
9965 decoder.debug_check_bounds::<Self>(offset);
9966 fidl::decode!(
9968 fidl::encoding::Vector<
9969 fidl::encoding::Array<
9970 fidl::encoding::HandleType<
9971 fidl::Event,
9972 { fidl::ObjectType::EVENT.into_raw() },
9973 53251,
9974 >,
9975 1,
9976 >,
9977 1,
9978 >,
9979 fidl::encoding::DefaultFuchsiaResourceDialect,
9980 &mut self.h,
9981 decoder,
9982 offset + 0,
9983 _depth
9984 )?;
9985 Ok(())
9986 }
9987 }
9988
9989 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
9990 type Borrowed<'a> = &'a mut Self;
9991 fn take_or_borrow<'a>(
9992 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9993 ) -> Self::Borrowed<'a> {
9994 value
9995 }
9996 }
9997
9998 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
9999 type Owned = Self;
10000
10001 #[inline(always)]
10002 fn inline_align(_context: fidl::encoding::Context) -> usize {
10003 8
10004 }
10005
10006 #[inline(always)]
10007 fn inline_size(_context: fidl::encoding::Context) -> usize {
10008 16
10009 }
10010 }
10011
10012 unsafe impl
10013 fidl::encoding::Encode<
10014 VectorOfArrayOfEventInStructWithReducedRights,
10015 fidl::encoding::DefaultFuchsiaResourceDialect,
10016 > for &mut VectorOfArrayOfEventInStructWithReducedRights
10017 {
10018 #[inline]
10019 unsafe fn encode(
10020 self,
10021 encoder: &mut fidl::encoding::Encoder<
10022 '_,
10023 fidl::encoding::DefaultFuchsiaResourceDialect,
10024 >,
10025 offset: usize,
10026 _depth: fidl::encoding::Depth,
10027 ) -> fidl::Result<()> {
10028 encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10029 fidl::encoding::Encode::<
10031 VectorOfArrayOfEventInStructWithReducedRights,
10032 fidl::encoding::DefaultFuchsiaResourceDialect,
10033 >::encode(
10034 (<fidl::encoding::Vector<
10035 fidl::encoding::Array<
10036 fidl::encoding::HandleType<
10037 fidl::Event,
10038 { fidl::ObjectType::EVENT.into_raw() },
10039 49155,
10040 >,
10041 1,
10042 >,
10043 1,
10044 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10045 &mut self.h
10046 ),),
10047 encoder,
10048 offset,
10049 _depth,
10050 )
10051 }
10052 }
10053 unsafe impl<
10054 T0: fidl::encoding::Encode<
10055 fidl::encoding::Vector<
10056 fidl::encoding::Array<
10057 fidl::encoding::HandleType<
10058 fidl::Event,
10059 { fidl::ObjectType::EVENT.into_raw() },
10060 49155,
10061 >,
10062 1,
10063 >,
10064 1,
10065 >,
10066 fidl::encoding::DefaultFuchsiaResourceDialect,
10067 >,
10068 >
10069 fidl::encoding::Encode<
10070 VectorOfArrayOfEventInStructWithReducedRights,
10071 fidl::encoding::DefaultFuchsiaResourceDialect,
10072 > for (T0,)
10073 {
10074 #[inline]
10075 unsafe fn encode(
10076 self,
10077 encoder: &mut fidl::encoding::Encoder<
10078 '_,
10079 fidl::encoding::DefaultFuchsiaResourceDialect,
10080 >,
10081 offset: usize,
10082 depth: fidl::encoding::Depth,
10083 ) -> fidl::Result<()> {
10084 encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10085 self.0.encode(encoder, offset + 0, depth)?;
10089 Ok(())
10090 }
10091 }
10092
10093 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10094 for VectorOfArrayOfEventInStructWithReducedRights
10095 {
10096 #[inline(always)]
10097 fn new_empty() -> Self {
10098 Self {
10099 h: fidl::new_empty!(
10100 fidl::encoding::Vector<
10101 fidl::encoding::Array<
10102 fidl::encoding::HandleType<
10103 fidl::Event,
10104 { fidl::ObjectType::EVENT.into_raw() },
10105 49155,
10106 >,
10107 1,
10108 >,
10109 1,
10110 >,
10111 fidl::encoding::DefaultFuchsiaResourceDialect
10112 ),
10113 }
10114 }
10115
10116 #[inline]
10117 unsafe fn decode(
10118 &mut self,
10119 decoder: &mut fidl::encoding::Decoder<
10120 '_,
10121 fidl::encoding::DefaultFuchsiaResourceDialect,
10122 >,
10123 offset: usize,
10124 _depth: fidl::encoding::Depth,
10125 ) -> fidl::Result<()> {
10126 decoder.debug_check_bounds::<Self>(offset);
10127 fidl::decode!(
10129 fidl::encoding::Vector<
10130 fidl::encoding::Array<
10131 fidl::encoding::HandleType<
10132 fidl::Event,
10133 { fidl::ObjectType::EVENT.into_raw() },
10134 49155,
10135 >,
10136 1,
10137 >,
10138 1,
10139 >,
10140 fidl::encoding::DefaultFuchsiaResourceDialect,
10141 &mut self.h,
10142 decoder,
10143 offset + 0,
10144 _depth
10145 )?;
10146 Ok(())
10147 }
10148 }
10149
10150 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10151 type Borrowed<'a> = &'a mut Self;
10152 fn take_or_borrow<'a>(
10153 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10154 ) -> Self::Borrowed<'a> {
10155 value
10156 }
10157 }
10158
10159 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10160 type Owned = Self;
10161
10162 #[inline(always)]
10163 fn inline_align(_context: fidl::encoding::Context) -> usize {
10164 8
10165 }
10166
10167 #[inline(always)]
10168 fn inline_size(_context: fidl::encoding::Context) -> usize {
10169 16
10170 }
10171 }
10172
10173 unsafe impl
10174 fidl::encoding::Encode<
10175 VectorOfArrayOfEventInTableWithReducedRightsStruct,
10176 fidl::encoding::DefaultFuchsiaResourceDialect,
10177 > for &mut VectorOfArrayOfEventInTableWithReducedRightsStruct
10178 {
10179 #[inline]
10180 unsafe fn encode(
10181 self,
10182 encoder: &mut fidl::encoding::Encoder<
10183 '_,
10184 fidl::encoding::DefaultFuchsiaResourceDialect,
10185 >,
10186 offset: usize,
10187 _depth: fidl::encoding::Depth,
10188 ) -> fidl::Result<()> {
10189 encoder
10190 .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10191 fidl::encoding::Encode::<VectorOfArrayOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10193 (
10194 <VectorOfArrayOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
10195 ),
10196 encoder, offset, _depth
10197 )
10198 }
10199 }
10200 unsafe impl<
10201 T0: fidl::encoding::Encode<
10202 VectorOfArrayOfEventInTableWithReducedRights,
10203 fidl::encoding::DefaultFuchsiaResourceDialect,
10204 >,
10205 >
10206 fidl::encoding::Encode<
10207 VectorOfArrayOfEventInTableWithReducedRightsStruct,
10208 fidl::encoding::DefaultFuchsiaResourceDialect,
10209 > for (T0,)
10210 {
10211 #[inline]
10212 unsafe fn encode(
10213 self,
10214 encoder: &mut fidl::encoding::Encoder<
10215 '_,
10216 fidl::encoding::DefaultFuchsiaResourceDialect,
10217 >,
10218 offset: usize,
10219 depth: fidl::encoding::Depth,
10220 ) -> fidl::Result<()> {
10221 encoder
10222 .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10223 self.0.encode(encoder, offset + 0, depth)?;
10227 Ok(())
10228 }
10229 }
10230
10231 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10232 for VectorOfArrayOfEventInTableWithReducedRightsStruct
10233 {
10234 #[inline(always)]
10235 fn new_empty() -> Self {
10236 Self {
10237 t: fidl::new_empty!(
10238 VectorOfArrayOfEventInTableWithReducedRights,
10239 fidl::encoding::DefaultFuchsiaResourceDialect
10240 ),
10241 }
10242 }
10243
10244 #[inline]
10245 unsafe fn decode(
10246 &mut self,
10247 decoder: &mut fidl::encoding::Decoder<
10248 '_,
10249 fidl::encoding::DefaultFuchsiaResourceDialect,
10250 >,
10251 offset: usize,
10252 _depth: fidl::encoding::Depth,
10253 ) -> fidl::Result<()> {
10254 decoder.debug_check_bounds::<Self>(offset);
10255 fidl::decode!(
10257 VectorOfArrayOfEventInTableWithReducedRights,
10258 fidl::encoding::DefaultFuchsiaResourceDialect,
10259 &mut self.t,
10260 decoder,
10261 offset + 0,
10262 _depth
10263 )?;
10264 Ok(())
10265 }
10266 }
10267
10268 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10269 type Borrowed<'a> = &'a mut Self;
10270 fn take_or_borrow<'a>(
10271 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10272 ) -> Self::Borrowed<'a> {
10273 value
10274 }
10275 }
10276
10277 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10278 type Owned = Self;
10279
10280 #[inline(always)]
10281 fn inline_align(_context: fidl::encoding::Context) -> usize {
10282 8
10283 }
10284
10285 #[inline(always)]
10286 fn inline_size(_context: fidl::encoding::Context) -> usize {
10287 16
10288 }
10289 }
10290
10291 unsafe impl
10292 fidl::encoding::Encode<
10293 VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10294 fidl::encoding::DefaultFuchsiaResourceDialect,
10295 > for &mut VectorOfArrayOfEventInUnionWithReducedRightsStruct
10296 {
10297 #[inline]
10298 unsafe fn encode(
10299 self,
10300 encoder: &mut fidl::encoding::Encoder<
10301 '_,
10302 fidl::encoding::DefaultFuchsiaResourceDialect,
10303 >,
10304 offset: usize,
10305 _depth: fidl::encoding::Depth,
10306 ) -> fidl::Result<()> {
10307 encoder
10308 .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10309 fidl::encoding::Encode::<VectorOfArrayOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10311 (
10312 <VectorOfArrayOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10313 ),
10314 encoder, offset, _depth
10315 )
10316 }
10317 }
10318 unsafe impl<
10319 T0: fidl::encoding::Encode<
10320 VectorOfArrayOfEventInUnionWithReducedRights,
10321 fidl::encoding::DefaultFuchsiaResourceDialect,
10322 >,
10323 >
10324 fidl::encoding::Encode<
10325 VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10326 fidl::encoding::DefaultFuchsiaResourceDialect,
10327 > for (T0,)
10328 {
10329 #[inline]
10330 unsafe fn encode(
10331 self,
10332 encoder: &mut fidl::encoding::Encoder<
10333 '_,
10334 fidl::encoding::DefaultFuchsiaResourceDialect,
10335 >,
10336 offset: usize,
10337 depth: fidl::encoding::Depth,
10338 ) -> fidl::Result<()> {
10339 encoder
10340 .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10341 self.0.encode(encoder, offset + 0, depth)?;
10345 Ok(())
10346 }
10347 }
10348
10349 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10350 for VectorOfArrayOfEventInUnionWithReducedRightsStruct
10351 {
10352 #[inline(always)]
10353 fn new_empty() -> Self {
10354 Self {
10355 u: fidl::new_empty!(
10356 VectorOfArrayOfEventInUnionWithReducedRights,
10357 fidl::encoding::DefaultFuchsiaResourceDialect
10358 ),
10359 }
10360 }
10361
10362 #[inline]
10363 unsafe fn decode(
10364 &mut self,
10365 decoder: &mut fidl::encoding::Decoder<
10366 '_,
10367 fidl::encoding::DefaultFuchsiaResourceDialect,
10368 >,
10369 offset: usize,
10370 _depth: fidl::encoding::Depth,
10371 ) -> fidl::Result<()> {
10372 decoder.debug_check_bounds::<Self>(offset);
10373 fidl::decode!(
10375 VectorOfArrayOfEventInUnionWithReducedRights,
10376 fidl::encoding::DefaultFuchsiaResourceDialect,
10377 &mut self.u,
10378 decoder,
10379 offset + 0,
10380 _depth
10381 )?;
10382 Ok(())
10383 }
10384 }
10385
10386 impl fidl::encoding::ResourceTypeMarker for VectorOfHandles {
10387 type Borrowed<'a> = &'a mut Self;
10388 fn take_or_borrow<'a>(
10389 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10390 ) -> Self::Borrowed<'a> {
10391 value
10392 }
10393 }
10394
10395 unsafe impl fidl::encoding::TypeMarker for VectorOfHandles {
10396 type Owned = Self;
10397
10398 #[inline(always)]
10399 fn inline_align(_context: fidl::encoding::Context) -> usize {
10400 8
10401 }
10402
10403 #[inline(always)]
10404 fn inline_size(_context: fidl::encoding::Context) -> usize {
10405 16
10406 }
10407 }
10408
10409 unsafe impl
10410 fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10411 for &mut VectorOfHandles
10412 {
10413 #[inline]
10414 unsafe fn encode(
10415 self,
10416 encoder: &mut fidl::encoding::Encoder<
10417 '_,
10418 fidl::encoding::DefaultFuchsiaResourceDialect,
10419 >,
10420 offset: usize,
10421 _depth: fidl::encoding::Depth,
10422 ) -> fidl::Result<()> {
10423 encoder.debug_check_bounds::<VectorOfHandles>(offset);
10424 fidl::encoding::Encode::<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10426 (
10427 <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.v),
10428 ),
10429 encoder, offset, _depth
10430 )
10431 }
10432 }
10433 unsafe impl<
10434 T0: fidl::encoding::Encode<
10435 fidl::encoding::UnboundedVector<
10436 fidl::encoding::HandleType<
10437 fidl::Handle,
10438 { fidl::ObjectType::NONE.into_raw() },
10439 2147483648,
10440 >,
10441 >,
10442 fidl::encoding::DefaultFuchsiaResourceDialect,
10443 >,
10444 > fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10445 for (T0,)
10446 {
10447 #[inline]
10448 unsafe fn encode(
10449 self,
10450 encoder: &mut fidl::encoding::Encoder<
10451 '_,
10452 fidl::encoding::DefaultFuchsiaResourceDialect,
10453 >,
10454 offset: usize,
10455 depth: fidl::encoding::Depth,
10456 ) -> fidl::Result<()> {
10457 encoder.debug_check_bounds::<VectorOfHandles>(offset);
10458 self.0.encode(encoder, offset + 0, depth)?;
10462 Ok(())
10463 }
10464 }
10465
10466 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10467 for VectorOfHandles
10468 {
10469 #[inline(always)]
10470 fn new_empty() -> Self {
10471 Self {
10472 v: fidl::new_empty!(
10473 fidl::encoding::UnboundedVector<
10474 fidl::encoding::HandleType<
10475 fidl::Handle,
10476 { fidl::ObjectType::NONE.into_raw() },
10477 2147483648,
10478 >,
10479 >,
10480 fidl::encoding::DefaultFuchsiaResourceDialect
10481 ),
10482 }
10483 }
10484
10485 #[inline]
10486 unsafe fn decode(
10487 &mut self,
10488 decoder: &mut fidl::encoding::Decoder<
10489 '_,
10490 fidl::encoding::DefaultFuchsiaResourceDialect,
10491 >,
10492 offset: usize,
10493 _depth: fidl::encoding::Depth,
10494 ) -> fidl::Result<()> {
10495 decoder.debug_check_bounds::<Self>(offset);
10496 fidl::decode!(
10498 fidl::encoding::UnboundedVector<
10499 fidl::encoding::HandleType<
10500 fidl::Handle,
10501 { fidl::ObjectType::NONE.into_raw() },
10502 2147483648,
10503 >,
10504 >,
10505 fidl::encoding::DefaultFuchsiaResourceDialect,
10506 &mut self.v,
10507 decoder,
10508 offset + 0,
10509 _depth
10510 )?;
10511 Ok(())
10512 }
10513 }
10514
10515 impl fidl::encoding::ResourceTypeMarker for VectorOfOptionalHandles {
10516 type Borrowed<'a> = &'a mut Self;
10517 fn take_or_borrow<'a>(
10518 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10519 ) -> Self::Borrowed<'a> {
10520 value
10521 }
10522 }
10523
10524 unsafe impl fidl::encoding::TypeMarker for VectorOfOptionalHandles {
10525 type Owned = Self;
10526
10527 #[inline(always)]
10528 fn inline_align(_context: fidl::encoding::Context) -> usize {
10529 8
10530 }
10531
10532 #[inline(always)]
10533 fn inline_size(_context: fidl::encoding::Context) -> usize {
10534 16
10535 }
10536 }
10537
10538 unsafe impl
10539 fidl::encoding::Encode<
10540 VectorOfOptionalHandles,
10541 fidl::encoding::DefaultFuchsiaResourceDialect,
10542 > for &mut VectorOfOptionalHandles
10543 {
10544 #[inline]
10545 unsafe fn encode(
10546 self,
10547 encoder: &mut fidl::encoding::Encoder<
10548 '_,
10549 fidl::encoding::DefaultFuchsiaResourceDialect,
10550 >,
10551 offset: usize,
10552 _depth: fidl::encoding::Depth,
10553 ) -> fidl::Result<()> {
10554 encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10555 fidl::encoding::Encode::<
10557 VectorOfOptionalHandles,
10558 fidl::encoding::DefaultFuchsiaResourceDialect,
10559 >::encode(
10560 (<fidl::encoding::UnboundedVector<
10561 fidl::encoding::Optional<
10562 fidl::encoding::HandleType<
10563 fidl::Handle,
10564 { fidl::ObjectType::NONE.into_raw() },
10565 2147483648,
10566 >,
10567 >,
10568 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10569 &mut self.v
10570 ),),
10571 encoder,
10572 offset,
10573 _depth,
10574 )
10575 }
10576 }
10577 unsafe impl<
10578 T0: fidl::encoding::Encode<
10579 fidl::encoding::UnboundedVector<
10580 fidl::encoding::Optional<
10581 fidl::encoding::HandleType<
10582 fidl::Handle,
10583 { fidl::ObjectType::NONE.into_raw() },
10584 2147483648,
10585 >,
10586 >,
10587 >,
10588 fidl::encoding::DefaultFuchsiaResourceDialect,
10589 >,
10590 >
10591 fidl::encoding::Encode<
10592 VectorOfOptionalHandles,
10593 fidl::encoding::DefaultFuchsiaResourceDialect,
10594 > for (T0,)
10595 {
10596 #[inline]
10597 unsafe fn encode(
10598 self,
10599 encoder: &mut fidl::encoding::Encoder<
10600 '_,
10601 fidl::encoding::DefaultFuchsiaResourceDialect,
10602 >,
10603 offset: usize,
10604 depth: fidl::encoding::Depth,
10605 ) -> fidl::Result<()> {
10606 encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10607 self.0.encode(encoder, offset + 0, depth)?;
10611 Ok(())
10612 }
10613 }
10614
10615 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10616 for VectorOfOptionalHandles
10617 {
10618 #[inline(always)]
10619 fn new_empty() -> Self {
10620 Self {
10621 v: fidl::new_empty!(
10622 fidl::encoding::UnboundedVector<
10623 fidl::encoding::Optional<
10624 fidl::encoding::HandleType<
10625 fidl::Handle,
10626 { fidl::ObjectType::NONE.into_raw() },
10627 2147483648,
10628 >,
10629 >,
10630 >,
10631 fidl::encoding::DefaultFuchsiaResourceDialect
10632 ),
10633 }
10634 }
10635
10636 #[inline]
10637 unsafe fn decode(
10638 &mut self,
10639 decoder: &mut fidl::encoding::Decoder<
10640 '_,
10641 fidl::encoding::DefaultFuchsiaResourceDialect,
10642 >,
10643 offset: usize,
10644 _depth: fidl::encoding::Depth,
10645 ) -> fidl::Result<()> {
10646 decoder.debug_check_bounds::<Self>(offset);
10647 fidl::decode!(
10649 fidl::encoding::UnboundedVector<
10650 fidl::encoding::Optional<
10651 fidl::encoding::HandleType<
10652 fidl::Handle,
10653 { fidl::ObjectType::NONE.into_raw() },
10654 2147483648,
10655 >,
10656 >,
10657 >,
10658 fidl::encoding::DefaultFuchsiaResourceDialect,
10659 &mut self.v,
10660 decoder,
10661 offset + 0,
10662 _depth
10663 )?;
10664 Ok(())
10665 }
10666 }
10667
10668 impl fidl::encoding::ResourceTypeMarker for VectorOfUpTo2Handles {
10669 type Borrowed<'a> = &'a mut Self;
10670 fn take_or_borrow<'a>(
10671 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10672 ) -> Self::Borrowed<'a> {
10673 value
10674 }
10675 }
10676
10677 unsafe impl fidl::encoding::TypeMarker for VectorOfUpTo2Handles {
10678 type Owned = Self;
10679
10680 #[inline(always)]
10681 fn inline_align(_context: fidl::encoding::Context) -> usize {
10682 8
10683 }
10684
10685 #[inline(always)]
10686 fn inline_size(_context: fidl::encoding::Context) -> usize {
10687 16
10688 }
10689 }
10690
10691 unsafe impl
10692 fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10693 for &mut VectorOfUpTo2Handles
10694 {
10695 #[inline]
10696 unsafe fn encode(
10697 self,
10698 encoder: &mut fidl::encoding::Encoder<
10699 '_,
10700 fidl::encoding::DefaultFuchsiaResourceDialect,
10701 >,
10702 offset: usize,
10703 _depth: fidl::encoding::Depth,
10704 ) -> fidl::Result<()> {
10705 encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10706 fidl::encoding::Encode::<
10708 VectorOfUpTo2Handles,
10709 fidl::encoding::DefaultFuchsiaResourceDialect,
10710 >::encode(
10711 (<fidl::encoding::Vector<
10712 fidl::encoding::HandleType<
10713 fidl::Handle,
10714 { fidl::ObjectType::NONE.into_raw() },
10715 2147483648,
10716 >,
10717 2,
10718 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10719 &mut self.v
10720 ),),
10721 encoder,
10722 offset,
10723 _depth,
10724 )
10725 }
10726 }
10727 unsafe impl<
10728 T0: fidl::encoding::Encode<
10729 fidl::encoding::Vector<
10730 fidl::encoding::HandleType<
10731 fidl::Handle,
10732 { fidl::ObjectType::NONE.into_raw() },
10733 2147483648,
10734 >,
10735 2,
10736 >,
10737 fidl::encoding::DefaultFuchsiaResourceDialect,
10738 >,
10739 >
10740 fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10741 for (T0,)
10742 {
10743 #[inline]
10744 unsafe fn encode(
10745 self,
10746 encoder: &mut fidl::encoding::Encoder<
10747 '_,
10748 fidl::encoding::DefaultFuchsiaResourceDialect,
10749 >,
10750 offset: usize,
10751 depth: fidl::encoding::Depth,
10752 ) -> fidl::Result<()> {
10753 encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10754 self.0.encode(encoder, offset + 0, depth)?;
10758 Ok(())
10759 }
10760 }
10761
10762 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10763 for VectorOfUpTo2Handles
10764 {
10765 #[inline(always)]
10766 fn new_empty() -> Self {
10767 Self {
10768 v: fidl::new_empty!(
10769 fidl::encoding::Vector<
10770 fidl::encoding::HandleType<
10771 fidl::Handle,
10772 { fidl::ObjectType::NONE.into_raw() },
10773 2147483648,
10774 >,
10775 2,
10776 >,
10777 fidl::encoding::DefaultFuchsiaResourceDialect
10778 ),
10779 }
10780 }
10781
10782 #[inline]
10783 unsafe fn decode(
10784 &mut self,
10785 decoder: &mut fidl::encoding::Decoder<
10786 '_,
10787 fidl::encoding::DefaultFuchsiaResourceDialect,
10788 >,
10789 offset: usize,
10790 _depth: fidl::encoding::Depth,
10791 ) -> fidl::Result<()> {
10792 decoder.debug_check_bounds::<Self>(offset);
10793 fidl::decode!(
10795 fidl::encoding::Vector<
10796 fidl::encoding::HandleType<
10797 fidl::Handle,
10798 { fidl::ObjectType::NONE.into_raw() },
10799 2147483648,
10800 >,
10801 2,
10802 >,
10803 fidl::encoding::DefaultFuchsiaResourceDialect,
10804 &mut self.v,
10805 decoder,
10806 offset + 0,
10807 _depth
10808 )?;
10809 Ok(())
10810 }
10811 }
10812
10813 impl ArrayOfVectorOfEventInTableWithDefaultRights {
10814 #[inline(always)]
10815 fn max_ordinal_present(&self) -> u64 {
10816 if let Some(_) = self.h {
10817 return 1;
10818 }
10819 0
10820 }
10821 }
10822
10823 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10824 type Borrowed<'a> = &'a mut Self;
10825 fn take_or_borrow<'a>(
10826 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10827 ) -> Self::Borrowed<'a> {
10828 value
10829 }
10830 }
10831
10832 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10833 type Owned = Self;
10834
10835 #[inline(always)]
10836 fn inline_align(_context: fidl::encoding::Context) -> usize {
10837 8
10838 }
10839
10840 #[inline(always)]
10841 fn inline_size(_context: fidl::encoding::Context) -> usize {
10842 16
10843 }
10844 }
10845
10846 unsafe impl
10847 fidl::encoding::Encode<
10848 ArrayOfVectorOfEventInTableWithDefaultRights,
10849 fidl::encoding::DefaultFuchsiaResourceDialect,
10850 > for &mut ArrayOfVectorOfEventInTableWithDefaultRights
10851 {
10852 unsafe fn encode(
10853 self,
10854 encoder: &mut fidl::encoding::Encoder<
10855 '_,
10856 fidl::encoding::DefaultFuchsiaResourceDialect,
10857 >,
10858 offset: usize,
10859 mut depth: fidl::encoding::Depth,
10860 ) -> fidl::Result<()> {
10861 encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRights>(offset);
10862 let max_ordinal: u64 = self.max_ordinal_present();
10864 encoder.write_num(max_ordinal, offset);
10865 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10866 if max_ordinal == 0 {
10868 return Ok(());
10869 }
10870 depth.increment()?;
10871 let envelope_size = 8;
10872 let bytes_len = max_ordinal as usize * envelope_size;
10873 #[allow(unused_variables)]
10874 let offset = encoder.out_of_line_offset(bytes_len);
10875 let mut _prev_end_offset: usize = 0;
10876 if 1 > max_ordinal {
10877 return Ok(());
10878 }
10879
10880 let cur_offset: usize = (1 - 1) * envelope_size;
10883
10884 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10886
10887 fidl::encoding::encode_in_envelope_optional::<
10892 fidl::encoding::Array<
10893 fidl::encoding::Vector<
10894 fidl::encoding::HandleType<
10895 fidl::Event,
10896 { fidl::ObjectType::EVENT.into_raw() },
10897 53251,
10898 >,
10899 1,
10900 >,
10901 1,
10902 >,
10903 fidl::encoding::DefaultFuchsiaResourceDialect,
10904 >(
10905 self.h.as_mut().map(
10906 <fidl::encoding::Array<
10907 fidl::encoding::Vector<
10908 fidl::encoding::HandleType<
10909 fidl::Event,
10910 { fidl::ObjectType::EVENT.into_raw() },
10911 53251,
10912 >,
10913 1,
10914 >,
10915 1,
10916 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10917 ),
10918 encoder,
10919 offset + cur_offset,
10920 depth,
10921 )?;
10922
10923 _prev_end_offset = cur_offset + envelope_size;
10924
10925 Ok(())
10926 }
10927 }
10928
10929 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10930 for ArrayOfVectorOfEventInTableWithDefaultRights
10931 {
10932 #[inline(always)]
10933 fn new_empty() -> Self {
10934 Self::default()
10935 }
10936
10937 unsafe fn decode(
10938 &mut self,
10939 decoder: &mut fidl::encoding::Decoder<
10940 '_,
10941 fidl::encoding::DefaultFuchsiaResourceDialect,
10942 >,
10943 offset: usize,
10944 mut depth: fidl::encoding::Depth,
10945 ) -> fidl::Result<()> {
10946 decoder.debug_check_bounds::<Self>(offset);
10947 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10948 None => return Err(fidl::Error::NotNullable),
10949 Some(len) => len,
10950 };
10951 if len == 0 {
10953 return Ok(());
10954 };
10955 depth.increment()?;
10956 let envelope_size = 8;
10957 let bytes_len = len * envelope_size;
10958 let offset = decoder.out_of_line_offset(bytes_len)?;
10959 let mut _next_ordinal_to_read = 0;
10961 let mut next_offset = offset;
10962 let end_offset = offset + bytes_len;
10963 _next_ordinal_to_read += 1;
10964 if next_offset >= end_offset {
10965 return Ok(());
10966 }
10967
10968 while _next_ordinal_to_read < 1 {
10970 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10971 _next_ordinal_to_read += 1;
10972 next_offset += envelope_size;
10973 }
10974
10975 let next_out_of_line = decoder.next_out_of_line();
10976 let handles_before = decoder.remaining_handles();
10977 if let Some((inlined, num_bytes, num_handles)) =
10978 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10979 {
10980 let member_inline_size = <fidl::encoding::Array<
10981 fidl::encoding::Vector<
10982 fidl::encoding::HandleType<
10983 fidl::Event,
10984 { fidl::ObjectType::EVENT.into_raw() },
10985 53251,
10986 >,
10987 1,
10988 >,
10989 1,
10990 > as fidl::encoding::TypeMarker>::inline_size(
10991 decoder.context
10992 );
10993 if inlined != (member_inline_size <= 4) {
10994 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10995 }
10996 let inner_offset;
10997 let mut inner_depth = depth.clone();
10998 if inlined {
10999 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11000 inner_offset = next_offset;
11001 } else {
11002 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11003 inner_depth.increment()?;
11004 }
11005 let val_ref = self.h.get_or_insert_with(|| {
11006 fidl::new_empty!(
11007 fidl::encoding::Array<
11008 fidl::encoding::Vector<
11009 fidl::encoding::HandleType<
11010 fidl::Event,
11011 { fidl::ObjectType::EVENT.into_raw() },
11012 53251,
11013 >,
11014 1,
11015 >,
11016 1,
11017 >,
11018 fidl::encoding::DefaultFuchsiaResourceDialect
11019 )
11020 });
11021 fidl::decode!(
11022 fidl::encoding::Array<
11023 fidl::encoding::Vector<
11024 fidl::encoding::HandleType<
11025 fidl::Event,
11026 { fidl::ObjectType::EVENT.into_raw() },
11027 53251,
11028 >,
11029 1,
11030 >,
11031 1,
11032 >,
11033 fidl::encoding::DefaultFuchsiaResourceDialect,
11034 val_ref,
11035 decoder,
11036 inner_offset,
11037 inner_depth
11038 )?;
11039 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11040 {
11041 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11042 }
11043 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11044 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11045 }
11046 }
11047
11048 next_offset += envelope_size;
11049
11050 while next_offset < end_offset {
11052 _next_ordinal_to_read += 1;
11053 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11054 next_offset += envelope_size;
11055 }
11056
11057 Ok(())
11058 }
11059 }
11060
11061 impl ArrayOfVectorOfEventInTableWithReducedRights {
11062 #[inline(always)]
11063 fn max_ordinal_present(&self) -> u64 {
11064 if let Some(_) = self.h {
11065 return 1;
11066 }
11067 0
11068 }
11069 }
11070
11071 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11072 type Borrowed<'a> = &'a mut Self;
11073 fn take_or_borrow<'a>(
11074 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11075 ) -> Self::Borrowed<'a> {
11076 value
11077 }
11078 }
11079
11080 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11081 type Owned = Self;
11082
11083 #[inline(always)]
11084 fn inline_align(_context: fidl::encoding::Context) -> usize {
11085 8
11086 }
11087
11088 #[inline(always)]
11089 fn inline_size(_context: fidl::encoding::Context) -> usize {
11090 16
11091 }
11092 }
11093
11094 unsafe impl
11095 fidl::encoding::Encode<
11096 ArrayOfVectorOfEventInTableWithReducedRights,
11097 fidl::encoding::DefaultFuchsiaResourceDialect,
11098 > for &mut ArrayOfVectorOfEventInTableWithReducedRights
11099 {
11100 unsafe fn encode(
11101 self,
11102 encoder: &mut fidl::encoding::Encoder<
11103 '_,
11104 fidl::encoding::DefaultFuchsiaResourceDialect,
11105 >,
11106 offset: usize,
11107 mut depth: fidl::encoding::Depth,
11108 ) -> fidl::Result<()> {
11109 encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRights>(offset);
11110 let max_ordinal: u64 = self.max_ordinal_present();
11112 encoder.write_num(max_ordinal, offset);
11113 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11114 if max_ordinal == 0 {
11116 return Ok(());
11117 }
11118 depth.increment()?;
11119 let envelope_size = 8;
11120 let bytes_len = max_ordinal as usize * envelope_size;
11121 #[allow(unused_variables)]
11122 let offset = encoder.out_of_line_offset(bytes_len);
11123 let mut _prev_end_offset: usize = 0;
11124 if 1 > max_ordinal {
11125 return Ok(());
11126 }
11127
11128 let cur_offset: usize = (1 - 1) * envelope_size;
11131
11132 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11134
11135 fidl::encoding::encode_in_envelope_optional::<
11140 fidl::encoding::Array<
11141 fidl::encoding::Vector<
11142 fidl::encoding::HandleType<
11143 fidl::Event,
11144 { fidl::ObjectType::EVENT.into_raw() },
11145 49155,
11146 >,
11147 1,
11148 >,
11149 1,
11150 >,
11151 fidl::encoding::DefaultFuchsiaResourceDialect,
11152 >(
11153 self.h.as_mut().map(
11154 <fidl::encoding::Array<
11155 fidl::encoding::Vector<
11156 fidl::encoding::HandleType<
11157 fidl::Event,
11158 { fidl::ObjectType::EVENT.into_raw() },
11159 49155,
11160 >,
11161 1,
11162 >,
11163 1,
11164 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11165 ),
11166 encoder,
11167 offset + cur_offset,
11168 depth,
11169 )?;
11170
11171 _prev_end_offset = cur_offset + envelope_size;
11172
11173 Ok(())
11174 }
11175 }
11176
11177 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11178 for ArrayOfVectorOfEventInTableWithReducedRights
11179 {
11180 #[inline(always)]
11181 fn new_empty() -> Self {
11182 Self::default()
11183 }
11184
11185 unsafe fn decode(
11186 &mut self,
11187 decoder: &mut fidl::encoding::Decoder<
11188 '_,
11189 fidl::encoding::DefaultFuchsiaResourceDialect,
11190 >,
11191 offset: usize,
11192 mut depth: fidl::encoding::Depth,
11193 ) -> fidl::Result<()> {
11194 decoder.debug_check_bounds::<Self>(offset);
11195 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11196 None => return Err(fidl::Error::NotNullable),
11197 Some(len) => len,
11198 };
11199 if len == 0 {
11201 return Ok(());
11202 };
11203 depth.increment()?;
11204 let envelope_size = 8;
11205 let bytes_len = len * envelope_size;
11206 let offset = decoder.out_of_line_offset(bytes_len)?;
11207 let mut _next_ordinal_to_read = 0;
11209 let mut next_offset = offset;
11210 let end_offset = offset + bytes_len;
11211 _next_ordinal_to_read += 1;
11212 if next_offset >= end_offset {
11213 return Ok(());
11214 }
11215
11216 while _next_ordinal_to_read < 1 {
11218 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11219 _next_ordinal_to_read += 1;
11220 next_offset += envelope_size;
11221 }
11222
11223 let next_out_of_line = decoder.next_out_of_line();
11224 let handles_before = decoder.remaining_handles();
11225 if let Some((inlined, num_bytes, num_handles)) =
11226 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11227 {
11228 let member_inline_size = <fidl::encoding::Array<
11229 fidl::encoding::Vector<
11230 fidl::encoding::HandleType<
11231 fidl::Event,
11232 { fidl::ObjectType::EVENT.into_raw() },
11233 49155,
11234 >,
11235 1,
11236 >,
11237 1,
11238 > as fidl::encoding::TypeMarker>::inline_size(
11239 decoder.context
11240 );
11241 if inlined != (member_inline_size <= 4) {
11242 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11243 }
11244 let inner_offset;
11245 let mut inner_depth = depth.clone();
11246 if inlined {
11247 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11248 inner_offset = next_offset;
11249 } else {
11250 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11251 inner_depth.increment()?;
11252 }
11253 let val_ref = self.h.get_or_insert_with(|| {
11254 fidl::new_empty!(
11255 fidl::encoding::Array<
11256 fidl::encoding::Vector<
11257 fidl::encoding::HandleType<
11258 fidl::Event,
11259 { fidl::ObjectType::EVENT.into_raw() },
11260 49155,
11261 >,
11262 1,
11263 >,
11264 1,
11265 >,
11266 fidl::encoding::DefaultFuchsiaResourceDialect
11267 )
11268 });
11269 fidl::decode!(
11270 fidl::encoding::Array<
11271 fidl::encoding::Vector<
11272 fidl::encoding::HandleType<
11273 fidl::Event,
11274 { fidl::ObjectType::EVENT.into_raw() },
11275 49155,
11276 >,
11277 1,
11278 >,
11279 1,
11280 >,
11281 fidl::encoding::DefaultFuchsiaResourceDialect,
11282 val_ref,
11283 decoder,
11284 inner_offset,
11285 inner_depth
11286 )?;
11287 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11288 {
11289 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11290 }
11291 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11292 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11293 }
11294 }
11295
11296 next_offset += envelope_size;
11297
11298 while next_offset < end_offset {
11300 _next_ordinal_to_read += 1;
11301 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11302 next_offset += envelope_size;
11303 }
11304
11305 Ok(())
11306 }
11307 }
11308
11309 impl EmptyResourceTable {
11310 #[inline(always)]
11311 fn max_ordinal_present(&self) -> u64 {
11312 0
11313 }
11314 }
11315
11316 impl fidl::encoding::ResourceTypeMarker for EmptyResourceTable {
11317 type Borrowed<'a> = &'a mut Self;
11318 fn take_or_borrow<'a>(
11319 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11320 ) -> Self::Borrowed<'a> {
11321 value
11322 }
11323 }
11324
11325 unsafe impl fidl::encoding::TypeMarker for EmptyResourceTable {
11326 type Owned = Self;
11327
11328 #[inline(always)]
11329 fn inline_align(_context: fidl::encoding::Context) -> usize {
11330 8
11331 }
11332
11333 #[inline(always)]
11334 fn inline_size(_context: fidl::encoding::Context) -> usize {
11335 16
11336 }
11337 }
11338
11339 unsafe impl
11340 fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11341 for &mut EmptyResourceTable
11342 {
11343 unsafe fn encode(
11344 self,
11345 encoder: &mut fidl::encoding::Encoder<
11346 '_,
11347 fidl::encoding::DefaultFuchsiaResourceDialect,
11348 >,
11349 offset: usize,
11350 mut depth: fidl::encoding::Depth,
11351 ) -> fidl::Result<()> {
11352 encoder.debug_check_bounds::<EmptyResourceTable>(offset);
11353 let max_ordinal: u64 = self.max_ordinal_present();
11355 encoder.write_num(max_ordinal, offset);
11356 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11357 if max_ordinal == 0 {
11359 return Ok(());
11360 }
11361 depth.increment()?;
11362 let envelope_size = 8;
11363 let bytes_len = max_ordinal as usize * envelope_size;
11364 #[allow(unused_variables)]
11365 let offset = encoder.out_of_line_offset(bytes_len);
11366 let mut _prev_end_offset: usize = 0;
11367
11368 Ok(())
11369 }
11370 }
11371
11372 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11373 for EmptyResourceTable
11374 {
11375 #[inline(always)]
11376 fn new_empty() -> Self {
11377 Self::default()
11378 }
11379
11380 unsafe fn decode(
11381 &mut self,
11382 decoder: &mut fidl::encoding::Decoder<
11383 '_,
11384 fidl::encoding::DefaultFuchsiaResourceDialect,
11385 >,
11386 offset: usize,
11387 mut depth: fidl::encoding::Depth,
11388 ) -> fidl::Result<()> {
11389 decoder.debug_check_bounds::<Self>(offset);
11390 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11391 None => return Err(fidl::Error::NotNullable),
11392 Some(len) => len,
11393 };
11394 if len == 0 {
11396 return Ok(());
11397 };
11398 depth.increment()?;
11399 let envelope_size = 8;
11400 let bytes_len = len * envelope_size;
11401 let offset = decoder.out_of_line_offset(bytes_len)?;
11402 let mut _next_ordinal_to_read = 0;
11404 let mut next_offset = offset;
11405 let end_offset = offset + bytes_len;
11406
11407 while next_offset < end_offset {
11409 _next_ordinal_to_read += 1;
11410 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11411 next_offset += envelope_size;
11412 }
11413
11414 Ok(())
11415 }
11416 }
11417
11418 impl SimpleResourceTable {
11419 #[inline(always)]
11420 fn max_ordinal_present(&self) -> u64 {
11421 if let Some(_) = self.y {
11422 return 5;
11423 }
11424 if let Some(_) = self.x {
11425 return 1;
11426 }
11427 0
11428 }
11429 }
11430
11431 impl fidl::encoding::ResourceTypeMarker for SimpleResourceTable {
11432 type Borrowed<'a> = &'a mut Self;
11433 fn take_or_borrow<'a>(
11434 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11435 ) -> Self::Borrowed<'a> {
11436 value
11437 }
11438 }
11439
11440 unsafe impl fidl::encoding::TypeMarker for SimpleResourceTable {
11441 type Owned = Self;
11442
11443 #[inline(always)]
11444 fn inline_align(_context: fidl::encoding::Context) -> usize {
11445 8
11446 }
11447
11448 #[inline(always)]
11449 fn inline_size(_context: fidl::encoding::Context) -> usize {
11450 16
11451 }
11452 }
11453
11454 unsafe impl
11455 fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11456 for &mut SimpleResourceTable
11457 {
11458 unsafe fn encode(
11459 self,
11460 encoder: &mut fidl::encoding::Encoder<
11461 '_,
11462 fidl::encoding::DefaultFuchsiaResourceDialect,
11463 >,
11464 offset: usize,
11465 mut depth: fidl::encoding::Depth,
11466 ) -> fidl::Result<()> {
11467 encoder.debug_check_bounds::<SimpleResourceTable>(offset);
11468 let max_ordinal: u64 = self.max_ordinal_present();
11470 encoder.write_num(max_ordinal, offset);
11471 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11472 if max_ordinal == 0 {
11474 return Ok(());
11475 }
11476 depth.increment()?;
11477 let envelope_size = 8;
11478 let bytes_len = max_ordinal as usize * envelope_size;
11479 #[allow(unused_variables)]
11480 let offset = encoder.out_of_line_offset(bytes_len);
11481 let mut _prev_end_offset: usize = 0;
11482 if 1 > max_ordinal {
11483 return Ok(());
11484 }
11485
11486 let cur_offset: usize = (1 - 1) * envelope_size;
11489
11490 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11492
11493 fidl::encoding::encode_in_envelope_optional::<
11498 i64,
11499 fidl::encoding::DefaultFuchsiaResourceDialect,
11500 >(
11501 self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11502 encoder,
11503 offset + cur_offset,
11504 depth,
11505 )?;
11506
11507 _prev_end_offset = cur_offset + envelope_size;
11508 if 5 > max_ordinal {
11509 return Ok(());
11510 }
11511
11512 let cur_offset: usize = (5 - 1) * envelope_size;
11515
11516 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11518
11519 fidl::encoding::encode_in_envelope_optional::<
11524 i64,
11525 fidl::encoding::DefaultFuchsiaResourceDialect,
11526 >(
11527 self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11528 encoder,
11529 offset + cur_offset,
11530 depth,
11531 )?;
11532
11533 _prev_end_offset = cur_offset + envelope_size;
11534
11535 Ok(())
11536 }
11537 }
11538
11539 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11540 for SimpleResourceTable
11541 {
11542 #[inline(always)]
11543 fn new_empty() -> Self {
11544 Self::default()
11545 }
11546
11547 unsafe fn decode(
11548 &mut self,
11549 decoder: &mut fidl::encoding::Decoder<
11550 '_,
11551 fidl::encoding::DefaultFuchsiaResourceDialect,
11552 >,
11553 offset: usize,
11554 mut depth: fidl::encoding::Depth,
11555 ) -> fidl::Result<()> {
11556 decoder.debug_check_bounds::<Self>(offset);
11557 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11558 None => return Err(fidl::Error::NotNullable),
11559 Some(len) => len,
11560 };
11561 if len == 0 {
11563 return Ok(());
11564 };
11565 depth.increment()?;
11566 let envelope_size = 8;
11567 let bytes_len = len * envelope_size;
11568 let offset = decoder.out_of_line_offset(bytes_len)?;
11569 let mut _next_ordinal_to_read = 0;
11571 let mut next_offset = offset;
11572 let end_offset = offset + bytes_len;
11573 _next_ordinal_to_read += 1;
11574 if next_offset >= end_offset {
11575 return Ok(());
11576 }
11577
11578 while _next_ordinal_to_read < 1 {
11580 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11581 _next_ordinal_to_read += 1;
11582 next_offset += envelope_size;
11583 }
11584
11585 let next_out_of_line = decoder.next_out_of_line();
11586 let handles_before = decoder.remaining_handles();
11587 if let Some((inlined, num_bytes, num_handles)) =
11588 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11589 {
11590 let member_inline_size =
11591 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11592 if inlined != (member_inline_size <= 4) {
11593 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11594 }
11595 let inner_offset;
11596 let mut inner_depth = depth.clone();
11597 if inlined {
11598 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11599 inner_offset = next_offset;
11600 } else {
11601 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11602 inner_depth.increment()?;
11603 }
11604 let val_ref = self.x.get_or_insert_with(|| {
11605 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11606 });
11607 fidl::decode!(
11608 i64,
11609 fidl::encoding::DefaultFuchsiaResourceDialect,
11610 val_ref,
11611 decoder,
11612 inner_offset,
11613 inner_depth
11614 )?;
11615 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11616 {
11617 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11618 }
11619 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11620 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11621 }
11622 }
11623
11624 next_offset += envelope_size;
11625 _next_ordinal_to_read += 1;
11626 if next_offset >= end_offset {
11627 return Ok(());
11628 }
11629
11630 while _next_ordinal_to_read < 5 {
11632 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11633 _next_ordinal_to_read += 1;
11634 next_offset += envelope_size;
11635 }
11636
11637 let next_out_of_line = decoder.next_out_of_line();
11638 let handles_before = decoder.remaining_handles();
11639 if let Some((inlined, num_bytes, num_handles)) =
11640 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11641 {
11642 let member_inline_size =
11643 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11644 if inlined != (member_inline_size <= 4) {
11645 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11646 }
11647 let inner_offset;
11648 let mut inner_depth = depth.clone();
11649 if inlined {
11650 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11651 inner_offset = next_offset;
11652 } else {
11653 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11654 inner_depth.increment()?;
11655 }
11656 let val_ref = self.y.get_or_insert_with(|| {
11657 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11658 });
11659 fidl::decode!(
11660 i64,
11661 fidl::encoding::DefaultFuchsiaResourceDialect,
11662 val_ref,
11663 decoder,
11664 inner_offset,
11665 inner_depth
11666 )?;
11667 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11668 {
11669 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11670 }
11671 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11672 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11673 }
11674 }
11675
11676 next_offset += envelope_size;
11677
11678 while next_offset < end_offset {
11680 _next_ordinal_to_read += 1;
11681 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11682 next_offset += envelope_size;
11683 }
11684
11685 Ok(())
11686 }
11687 }
11688
11689 impl TableFieldInlinedHandle {
11690 #[inline(always)]
11691 fn max_ordinal_present(&self) -> u64 {
11692 if let Some(_) = self.f {
11693 return 1;
11694 }
11695 0
11696 }
11697 }
11698
11699 impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandle {
11700 type Borrowed<'a> = &'a mut Self;
11701 fn take_or_borrow<'a>(
11702 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11703 ) -> Self::Borrowed<'a> {
11704 value
11705 }
11706 }
11707
11708 unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandle {
11709 type Owned = Self;
11710
11711 #[inline(always)]
11712 fn inline_align(_context: fidl::encoding::Context) -> usize {
11713 8
11714 }
11715
11716 #[inline(always)]
11717 fn inline_size(_context: fidl::encoding::Context) -> usize {
11718 16
11719 }
11720 }
11721
11722 unsafe impl
11723 fidl::encoding::Encode<
11724 TableFieldInlinedHandle,
11725 fidl::encoding::DefaultFuchsiaResourceDialect,
11726 > for &mut TableFieldInlinedHandle
11727 {
11728 unsafe fn encode(
11729 self,
11730 encoder: &mut fidl::encoding::Encoder<
11731 '_,
11732 fidl::encoding::DefaultFuchsiaResourceDialect,
11733 >,
11734 offset: usize,
11735 mut depth: fidl::encoding::Depth,
11736 ) -> fidl::Result<()> {
11737 encoder.debug_check_bounds::<TableFieldInlinedHandle>(offset);
11738 let max_ordinal: u64 = self.max_ordinal_present();
11740 encoder.write_num(max_ordinal, offset);
11741 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11742 if max_ordinal == 0 {
11744 return Ok(());
11745 }
11746 depth.increment()?;
11747 let envelope_size = 8;
11748 let bytes_len = max_ordinal as usize * envelope_size;
11749 #[allow(unused_variables)]
11750 let offset = encoder.out_of_line_offset(bytes_len);
11751 let mut _prev_end_offset: usize = 0;
11752 if 1 > max_ordinal {
11753 return Ok(());
11754 }
11755
11756 let cur_offset: usize = (1 - 1) * envelope_size;
11759
11760 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11762
11763 fidl::encoding::encode_in_envelope_optional::<
11768 fidl::encoding::HandleType<
11769 fidl::Channel,
11770 { fidl::ObjectType::CHANNEL.into_raw() },
11771 2147483648,
11772 >,
11773 fidl::encoding::DefaultFuchsiaResourceDialect,
11774 >(
11775 self.f.as_mut().map(
11776 <fidl::encoding::HandleType<
11777 fidl::Channel,
11778 { fidl::ObjectType::CHANNEL.into_raw() },
11779 2147483648,
11780 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11781 ),
11782 encoder,
11783 offset + cur_offset,
11784 depth,
11785 )?;
11786
11787 _prev_end_offset = cur_offset + envelope_size;
11788
11789 Ok(())
11790 }
11791 }
11792
11793 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11794 for TableFieldInlinedHandle
11795 {
11796 #[inline(always)]
11797 fn new_empty() -> Self {
11798 Self::default()
11799 }
11800
11801 unsafe fn decode(
11802 &mut self,
11803 decoder: &mut fidl::encoding::Decoder<
11804 '_,
11805 fidl::encoding::DefaultFuchsiaResourceDialect,
11806 >,
11807 offset: usize,
11808 mut depth: fidl::encoding::Depth,
11809 ) -> fidl::Result<()> {
11810 decoder.debug_check_bounds::<Self>(offset);
11811 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11812 None => return Err(fidl::Error::NotNullable),
11813 Some(len) => len,
11814 };
11815 if len == 0 {
11817 return Ok(());
11818 };
11819 depth.increment()?;
11820 let envelope_size = 8;
11821 let bytes_len = len * envelope_size;
11822 let offset = decoder.out_of_line_offset(bytes_len)?;
11823 let mut _next_ordinal_to_read = 0;
11825 let mut next_offset = offset;
11826 let end_offset = offset + bytes_len;
11827 _next_ordinal_to_read += 1;
11828 if next_offset >= end_offset {
11829 return Ok(());
11830 }
11831
11832 while _next_ordinal_to_read < 1 {
11834 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11835 _next_ordinal_to_read += 1;
11836 next_offset += envelope_size;
11837 }
11838
11839 let next_out_of_line = decoder.next_out_of_line();
11840 let handles_before = decoder.remaining_handles();
11841 if let Some((inlined, num_bytes, num_handles)) =
11842 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11843 {
11844 let member_inline_size = <fidl::encoding::HandleType<
11845 fidl::Channel,
11846 { fidl::ObjectType::CHANNEL.into_raw() },
11847 2147483648,
11848 > as fidl::encoding::TypeMarker>::inline_size(
11849 decoder.context
11850 );
11851 if inlined != (member_inline_size <= 4) {
11852 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11853 }
11854 let inner_offset;
11855 let mut inner_depth = depth.clone();
11856 if inlined {
11857 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11858 inner_offset = next_offset;
11859 } else {
11860 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11861 inner_depth.increment()?;
11862 }
11863 let val_ref =
11864 self.f.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
11865 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11866 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11867 {
11868 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11869 }
11870 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11871 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11872 }
11873 }
11874
11875 next_offset += envelope_size;
11876
11877 while next_offset < end_offset {
11879 _next_ordinal_to_read += 1;
11880 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11881 next_offset += envelope_size;
11882 }
11883
11884 Ok(())
11885 }
11886 }
11887
11888 impl TableFieldUnknownResource {
11889 #[inline(always)]
11890 fn max_ordinal_present(&self) -> u64 {
11891 0
11892 }
11893 }
11894
11895 impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResource {
11896 type Borrowed<'a> = &'a mut Self;
11897 fn take_or_borrow<'a>(
11898 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11899 ) -> Self::Borrowed<'a> {
11900 value
11901 }
11902 }
11903
11904 unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResource {
11905 type Owned = Self;
11906
11907 #[inline(always)]
11908 fn inline_align(_context: fidl::encoding::Context) -> usize {
11909 8
11910 }
11911
11912 #[inline(always)]
11913 fn inline_size(_context: fidl::encoding::Context) -> usize {
11914 16
11915 }
11916 }
11917
11918 unsafe impl
11919 fidl::encoding::Encode<
11920 TableFieldUnknownResource,
11921 fidl::encoding::DefaultFuchsiaResourceDialect,
11922 > for &mut TableFieldUnknownResource
11923 {
11924 unsafe fn encode(
11925 self,
11926 encoder: &mut fidl::encoding::Encoder<
11927 '_,
11928 fidl::encoding::DefaultFuchsiaResourceDialect,
11929 >,
11930 offset: usize,
11931 mut depth: fidl::encoding::Depth,
11932 ) -> fidl::Result<()> {
11933 encoder.debug_check_bounds::<TableFieldUnknownResource>(offset);
11934 let max_ordinal: u64 = self.max_ordinal_present();
11936 encoder.write_num(max_ordinal, offset);
11937 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11938 if max_ordinal == 0 {
11940 return Ok(());
11941 }
11942 depth.increment()?;
11943 let envelope_size = 8;
11944 let bytes_len = max_ordinal as usize * envelope_size;
11945 #[allow(unused_variables)]
11946 let offset = encoder.out_of_line_offset(bytes_len);
11947 let mut _prev_end_offset: usize = 0;
11948
11949 Ok(())
11950 }
11951 }
11952
11953 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11954 for TableFieldUnknownResource
11955 {
11956 #[inline(always)]
11957 fn new_empty() -> Self {
11958 Self::default()
11959 }
11960
11961 unsafe fn decode(
11962 &mut self,
11963 decoder: &mut fidl::encoding::Decoder<
11964 '_,
11965 fidl::encoding::DefaultFuchsiaResourceDialect,
11966 >,
11967 offset: usize,
11968 mut depth: fidl::encoding::Depth,
11969 ) -> fidl::Result<()> {
11970 decoder.debug_check_bounds::<Self>(offset);
11971 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11972 None => return Err(fidl::Error::NotNullable),
11973 Some(len) => len,
11974 };
11975 if len == 0 {
11977 return Ok(());
11978 };
11979 depth.increment()?;
11980 let envelope_size = 8;
11981 let bytes_len = len * envelope_size;
11982 let offset = decoder.out_of_line_offset(bytes_len)?;
11983 let mut _next_ordinal_to_read = 0;
11985 let mut next_offset = offset;
11986 let end_offset = offset + bytes_len;
11987
11988 while next_offset < end_offset {
11990 _next_ordinal_to_read += 1;
11991 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11992 next_offset += envelope_size;
11993 }
11994
11995 Ok(())
11996 }
11997 }
11998
11999 impl TableOfEndpointsTable {
12000 #[inline(always)]
12001 fn max_ordinal_present(&self) -> u64 {
12002 if let Some(_) = self.server_end {
12003 return 2;
12004 }
12005 if let Some(_) = self.client_end {
12006 return 1;
12007 }
12008 0
12009 }
12010 }
12011
12012 impl fidl::encoding::ResourceTypeMarker for TableOfEndpointsTable {
12013 type Borrowed<'a> = &'a mut Self;
12014 fn take_or_borrow<'a>(
12015 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12016 ) -> Self::Borrowed<'a> {
12017 value
12018 }
12019 }
12020
12021 unsafe impl fidl::encoding::TypeMarker for TableOfEndpointsTable {
12022 type Owned = Self;
12023
12024 #[inline(always)]
12025 fn inline_align(_context: fidl::encoding::Context) -> usize {
12026 8
12027 }
12028
12029 #[inline(always)]
12030 fn inline_size(_context: fidl::encoding::Context) -> usize {
12031 16
12032 }
12033 }
12034
12035 unsafe impl
12036 fidl::encoding::Encode<TableOfEndpointsTable, fidl::encoding::DefaultFuchsiaResourceDialect>
12037 for &mut TableOfEndpointsTable
12038 {
12039 unsafe fn encode(
12040 self,
12041 encoder: &mut fidl::encoding::Encoder<
12042 '_,
12043 fidl::encoding::DefaultFuchsiaResourceDialect,
12044 >,
12045 offset: usize,
12046 mut depth: fidl::encoding::Depth,
12047 ) -> fidl::Result<()> {
12048 encoder.debug_check_bounds::<TableOfEndpointsTable>(offset);
12049 let max_ordinal: u64 = self.max_ordinal_present();
12051 encoder.write_num(max_ordinal, offset);
12052 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12053 if max_ordinal == 0 {
12055 return Ok(());
12056 }
12057 depth.increment()?;
12058 let envelope_size = 8;
12059 let bytes_len = max_ordinal as usize * envelope_size;
12060 #[allow(unused_variables)]
12061 let offset = encoder.out_of_line_offset(bytes_len);
12062 let mut _prev_end_offset: usize = 0;
12063 if 1 > max_ordinal {
12064 return Ok(());
12065 }
12066
12067 let cur_offset: usize = (1 - 1) * envelope_size;
12070
12071 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12073
12074 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12079 self.client_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12080 encoder, offset + cur_offset, depth
12081 )?;
12082
12083 _prev_end_offset = cur_offset + envelope_size;
12084 if 2 > max_ordinal {
12085 return Ok(());
12086 }
12087
12088 let cur_offset: usize = (2 - 1) * envelope_size;
12091
12092 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12094
12095 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12100 self.server_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12101 encoder, offset + cur_offset, depth
12102 )?;
12103
12104 _prev_end_offset = cur_offset + envelope_size;
12105
12106 Ok(())
12107 }
12108 }
12109
12110 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12111 for TableOfEndpointsTable
12112 {
12113 #[inline(always)]
12114 fn new_empty() -> Self {
12115 Self::default()
12116 }
12117
12118 unsafe fn decode(
12119 &mut self,
12120 decoder: &mut fidl::encoding::Decoder<
12121 '_,
12122 fidl::encoding::DefaultFuchsiaResourceDialect,
12123 >,
12124 offset: usize,
12125 mut depth: fidl::encoding::Depth,
12126 ) -> fidl::Result<()> {
12127 decoder.debug_check_bounds::<Self>(offset);
12128 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12129 None => return Err(fidl::Error::NotNullable),
12130 Some(len) => len,
12131 };
12132 if len == 0 {
12134 return Ok(());
12135 };
12136 depth.increment()?;
12137 let envelope_size = 8;
12138 let bytes_len = len * envelope_size;
12139 let offset = decoder.out_of_line_offset(bytes_len)?;
12140 let mut _next_ordinal_to_read = 0;
12142 let mut next_offset = offset;
12143 let end_offset = offset + bytes_len;
12144 _next_ordinal_to_read += 1;
12145 if next_offset >= end_offset {
12146 return Ok(());
12147 }
12148
12149 while _next_ordinal_to_read < 1 {
12151 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12152 _next_ordinal_to_read += 1;
12153 next_offset += envelope_size;
12154 }
12155
12156 let next_out_of_line = decoder.next_out_of_line();
12157 let handles_before = decoder.remaining_handles();
12158 if let Some((inlined, num_bytes, num_handles)) =
12159 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12160 {
12161 let member_inline_size = <fidl::encoding::Endpoint<
12162 fidl::endpoints::ClientEnd<ProtocolMarker>,
12163 > as fidl::encoding::TypeMarker>::inline_size(
12164 decoder.context
12165 );
12166 if inlined != (member_inline_size <= 4) {
12167 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12168 }
12169 let inner_offset;
12170 let mut inner_depth = depth.clone();
12171 if inlined {
12172 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12173 inner_offset = next_offset;
12174 } else {
12175 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12176 inner_depth.increment()?;
12177 }
12178 let val_ref = self.client_end.get_or_insert_with(|| {
12179 fidl::new_empty!(
12180 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12181 fidl::encoding::DefaultFuchsiaResourceDialect
12182 )
12183 });
12184 fidl::decode!(
12185 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12186 fidl::encoding::DefaultFuchsiaResourceDialect,
12187 val_ref,
12188 decoder,
12189 inner_offset,
12190 inner_depth
12191 )?;
12192 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12193 {
12194 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12195 }
12196 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12197 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12198 }
12199 }
12200
12201 next_offset += envelope_size;
12202 _next_ordinal_to_read += 1;
12203 if next_offset >= end_offset {
12204 return Ok(());
12205 }
12206
12207 while _next_ordinal_to_read < 2 {
12209 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12210 _next_ordinal_to_read += 1;
12211 next_offset += envelope_size;
12212 }
12213
12214 let next_out_of_line = decoder.next_out_of_line();
12215 let handles_before = decoder.remaining_handles();
12216 if let Some((inlined, num_bytes, num_handles)) =
12217 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12218 {
12219 let member_inline_size = <fidl::encoding::Endpoint<
12220 fidl::endpoints::ServerEnd<ProtocolMarker>,
12221 > as fidl::encoding::TypeMarker>::inline_size(
12222 decoder.context
12223 );
12224 if inlined != (member_inline_size <= 4) {
12225 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12226 }
12227 let inner_offset;
12228 let mut inner_depth = depth.clone();
12229 if inlined {
12230 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12231 inner_offset = next_offset;
12232 } else {
12233 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12234 inner_depth.increment()?;
12235 }
12236 let val_ref = self.server_end.get_or_insert_with(|| {
12237 fidl::new_empty!(
12238 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12239 fidl::encoding::DefaultFuchsiaResourceDialect
12240 )
12241 });
12242 fidl::decode!(
12243 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12244 fidl::encoding::DefaultFuchsiaResourceDialect,
12245 val_ref,
12246 decoder,
12247 inner_offset,
12248 inner_depth
12249 )?;
12250 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12251 {
12252 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12253 }
12254 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12255 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12256 }
12257 }
12258
12259 next_offset += envelope_size;
12260
12261 while next_offset < end_offset {
12263 _next_ordinal_to_read += 1;
12264 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12265 next_offset += envelope_size;
12266 }
12267
12268 Ok(())
12269 }
12270 }
12271
12272 impl TableUnionWithVectorReservedSandwich {
12273 #[inline(always)]
12274 fn max_ordinal_present(&self) -> u64 {
12275 if let Some(_) = self.uv {
12276 return 2;
12277 }
12278 0
12279 }
12280 }
12281
12282 impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwich {
12283 type Borrowed<'a> = &'a mut Self;
12284 fn take_or_borrow<'a>(
12285 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12286 ) -> Self::Borrowed<'a> {
12287 value
12288 }
12289 }
12290
12291 unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwich {
12292 type Owned = Self;
12293
12294 #[inline(always)]
12295 fn inline_align(_context: fidl::encoding::Context) -> usize {
12296 8
12297 }
12298
12299 #[inline(always)]
12300 fn inline_size(_context: fidl::encoding::Context) -> usize {
12301 16
12302 }
12303 }
12304
12305 unsafe impl
12306 fidl::encoding::Encode<
12307 TableUnionWithVectorReservedSandwich,
12308 fidl::encoding::DefaultFuchsiaResourceDialect,
12309 > for &mut TableUnionWithVectorReservedSandwich
12310 {
12311 unsafe fn encode(
12312 self,
12313 encoder: &mut fidl::encoding::Encoder<
12314 '_,
12315 fidl::encoding::DefaultFuchsiaResourceDialect,
12316 >,
12317 offset: usize,
12318 mut depth: fidl::encoding::Depth,
12319 ) -> fidl::Result<()> {
12320 encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwich>(offset);
12321 let max_ordinal: u64 = self.max_ordinal_present();
12323 encoder.write_num(max_ordinal, offset);
12324 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12325 if max_ordinal == 0 {
12327 return Ok(());
12328 }
12329 depth.increment()?;
12330 let envelope_size = 8;
12331 let bytes_len = max_ordinal as usize * envelope_size;
12332 #[allow(unused_variables)]
12333 let offset = encoder.out_of_line_offset(bytes_len);
12334 let mut _prev_end_offset: usize = 0;
12335 if 2 > max_ordinal {
12336 return Ok(());
12337 }
12338
12339 let cur_offset: usize = (2 - 1) * envelope_size;
12342
12343 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12345
12346 fidl::encoding::encode_in_envelope_optional::<
12351 UnionWithVector,
12352 fidl::encoding::DefaultFuchsiaResourceDialect,
12353 >(
12354 self.uv
12355 .as_mut()
12356 .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12357 encoder,
12358 offset + cur_offset,
12359 depth,
12360 )?;
12361
12362 _prev_end_offset = cur_offset + envelope_size;
12363
12364 Ok(())
12365 }
12366 }
12367
12368 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12369 for TableUnionWithVectorReservedSandwich
12370 {
12371 #[inline(always)]
12372 fn new_empty() -> Self {
12373 Self::default()
12374 }
12375
12376 unsafe fn decode(
12377 &mut self,
12378 decoder: &mut fidl::encoding::Decoder<
12379 '_,
12380 fidl::encoding::DefaultFuchsiaResourceDialect,
12381 >,
12382 offset: usize,
12383 mut depth: fidl::encoding::Depth,
12384 ) -> fidl::Result<()> {
12385 decoder.debug_check_bounds::<Self>(offset);
12386 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12387 None => return Err(fidl::Error::NotNullable),
12388 Some(len) => len,
12389 };
12390 if len == 0 {
12392 return Ok(());
12393 };
12394 depth.increment()?;
12395 let envelope_size = 8;
12396 let bytes_len = len * envelope_size;
12397 let offset = decoder.out_of_line_offset(bytes_len)?;
12398 let mut _next_ordinal_to_read = 0;
12400 let mut next_offset = offset;
12401 let end_offset = offset + bytes_len;
12402 _next_ordinal_to_read += 1;
12403 if next_offset >= end_offset {
12404 return Ok(());
12405 }
12406
12407 while _next_ordinal_to_read < 2 {
12409 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12410 _next_ordinal_to_read += 1;
12411 next_offset += envelope_size;
12412 }
12413
12414 let next_out_of_line = decoder.next_out_of_line();
12415 let handles_before = decoder.remaining_handles();
12416 if let Some((inlined, num_bytes, num_handles)) =
12417 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12418 {
12419 let member_inline_size =
12420 <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12421 if inlined != (member_inline_size <= 4) {
12422 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12423 }
12424 let inner_offset;
12425 let mut inner_depth = depth.clone();
12426 if inlined {
12427 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12428 inner_offset = next_offset;
12429 } else {
12430 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12431 inner_depth.increment()?;
12432 }
12433 let val_ref = self.uv.get_or_insert_with(|| {
12434 fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12435 });
12436 fidl::decode!(
12437 UnionWithVector,
12438 fidl::encoding::DefaultFuchsiaResourceDialect,
12439 val_ref,
12440 decoder,
12441 inner_offset,
12442 inner_depth
12443 )?;
12444 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12445 {
12446 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12447 }
12448 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12449 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12450 }
12451 }
12452
12453 next_offset += envelope_size;
12454
12455 while next_offset < end_offset {
12457 _next_ordinal_to_read += 1;
12458 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12459 next_offset += envelope_size;
12460 }
12461
12462 Ok(())
12463 }
12464 }
12465
12466 impl TableUnionWithVectorStructSandwich {
12467 #[inline(always)]
12468 fn max_ordinal_present(&self) -> u64 {
12469 if let Some(_) = self.s2 {
12470 return 3;
12471 }
12472 if let Some(_) = self.uv {
12473 return 2;
12474 }
12475 if let Some(_) = self.s1 {
12476 return 1;
12477 }
12478 0
12479 }
12480 }
12481
12482 impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwich {
12483 type Borrowed<'a> = &'a mut Self;
12484 fn take_or_borrow<'a>(
12485 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12486 ) -> Self::Borrowed<'a> {
12487 value
12488 }
12489 }
12490
12491 unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwich {
12492 type Owned = Self;
12493
12494 #[inline(always)]
12495 fn inline_align(_context: fidl::encoding::Context) -> usize {
12496 8
12497 }
12498
12499 #[inline(always)]
12500 fn inline_size(_context: fidl::encoding::Context) -> usize {
12501 16
12502 }
12503 }
12504
12505 unsafe impl
12506 fidl::encoding::Encode<
12507 TableUnionWithVectorStructSandwich,
12508 fidl::encoding::DefaultFuchsiaResourceDialect,
12509 > for &mut TableUnionWithVectorStructSandwich
12510 {
12511 unsafe fn encode(
12512 self,
12513 encoder: &mut fidl::encoding::Encoder<
12514 '_,
12515 fidl::encoding::DefaultFuchsiaResourceDialect,
12516 >,
12517 offset: usize,
12518 mut depth: fidl::encoding::Depth,
12519 ) -> fidl::Result<()> {
12520 encoder.debug_check_bounds::<TableUnionWithVectorStructSandwich>(offset);
12521 let max_ordinal: u64 = self.max_ordinal_present();
12523 encoder.write_num(max_ordinal, offset);
12524 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12525 if max_ordinal == 0 {
12527 return Ok(());
12528 }
12529 depth.increment()?;
12530 let envelope_size = 8;
12531 let bytes_len = max_ordinal as usize * envelope_size;
12532 #[allow(unused_variables)]
12533 let offset = encoder.out_of_line_offset(bytes_len);
12534 let mut _prev_end_offset: usize = 0;
12535 if 1 > max_ordinal {
12536 return Ok(());
12537 }
12538
12539 let cur_offset: usize = (1 - 1) * envelope_size;
12542
12543 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12545
12546 fidl::encoding::encode_in_envelope_optional::<
12551 StructSize3Align1,
12552 fidl::encoding::DefaultFuchsiaResourceDialect,
12553 >(
12554 self.s1
12555 .as_ref()
12556 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12557 encoder,
12558 offset + cur_offset,
12559 depth,
12560 )?;
12561
12562 _prev_end_offset = cur_offset + envelope_size;
12563 if 2 > max_ordinal {
12564 return Ok(());
12565 }
12566
12567 let cur_offset: usize = (2 - 1) * envelope_size;
12570
12571 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12573
12574 fidl::encoding::encode_in_envelope_optional::<
12579 UnionWithVector,
12580 fidl::encoding::DefaultFuchsiaResourceDialect,
12581 >(
12582 self.uv
12583 .as_mut()
12584 .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12585 encoder,
12586 offset + cur_offset,
12587 depth,
12588 )?;
12589
12590 _prev_end_offset = cur_offset + envelope_size;
12591 if 3 > max_ordinal {
12592 return Ok(());
12593 }
12594
12595 let cur_offset: usize = (3 - 1) * envelope_size;
12598
12599 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12601
12602 fidl::encoding::encode_in_envelope_optional::<
12607 StructSize3Align1,
12608 fidl::encoding::DefaultFuchsiaResourceDialect,
12609 >(
12610 self.s2
12611 .as_ref()
12612 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12613 encoder,
12614 offset + cur_offset,
12615 depth,
12616 )?;
12617
12618 _prev_end_offset = cur_offset + envelope_size;
12619
12620 Ok(())
12621 }
12622 }
12623
12624 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12625 for TableUnionWithVectorStructSandwich
12626 {
12627 #[inline(always)]
12628 fn new_empty() -> Self {
12629 Self::default()
12630 }
12631
12632 unsafe fn decode(
12633 &mut self,
12634 decoder: &mut fidl::encoding::Decoder<
12635 '_,
12636 fidl::encoding::DefaultFuchsiaResourceDialect,
12637 >,
12638 offset: usize,
12639 mut depth: fidl::encoding::Depth,
12640 ) -> fidl::Result<()> {
12641 decoder.debug_check_bounds::<Self>(offset);
12642 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12643 None => return Err(fidl::Error::NotNullable),
12644 Some(len) => len,
12645 };
12646 if len == 0 {
12648 return Ok(());
12649 };
12650 depth.increment()?;
12651 let envelope_size = 8;
12652 let bytes_len = len * envelope_size;
12653 let offset = decoder.out_of_line_offset(bytes_len)?;
12654 let mut _next_ordinal_to_read = 0;
12656 let mut next_offset = offset;
12657 let end_offset = offset + bytes_len;
12658 _next_ordinal_to_read += 1;
12659 if next_offset >= end_offset {
12660 return Ok(());
12661 }
12662
12663 while _next_ordinal_to_read < 1 {
12665 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12666 _next_ordinal_to_read += 1;
12667 next_offset += envelope_size;
12668 }
12669
12670 let next_out_of_line = decoder.next_out_of_line();
12671 let handles_before = decoder.remaining_handles();
12672 if let Some((inlined, num_bytes, num_handles)) =
12673 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12674 {
12675 let member_inline_size =
12676 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12677 if inlined != (member_inline_size <= 4) {
12678 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12679 }
12680 let inner_offset;
12681 let mut inner_depth = depth.clone();
12682 if inlined {
12683 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12684 inner_offset = next_offset;
12685 } else {
12686 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12687 inner_depth.increment()?;
12688 }
12689 let val_ref = self.s1.get_or_insert_with(|| {
12690 fidl::new_empty!(
12691 StructSize3Align1,
12692 fidl::encoding::DefaultFuchsiaResourceDialect
12693 )
12694 });
12695 fidl::decode!(
12696 StructSize3Align1,
12697 fidl::encoding::DefaultFuchsiaResourceDialect,
12698 val_ref,
12699 decoder,
12700 inner_offset,
12701 inner_depth
12702 )?;
12703 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12704 {
12705 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12706 }
12707 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12708 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12709 }
12710 }
12711
12712 next_offset += envelope_size;
12713 _next_ordinal_to_read += 1;
12714 if next_offset >= end_offset {
12715 return Ok(());
12716 }
12717
12718 while _next_ordinal_to_read < 2 {
12720 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12721 _next_ordinal_to_read += 1;
12722 next_offset += envelope_size;
12723 }
12724
12725 let next_out_of_line = decoder.next_out_of_line();
12726 let handles_before = decoder.remaining_handles();
12727 if let Some((inlined, num_bytes, num_handles)) =
12728 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12729 {
12730 let member_inline_size =
12731 <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12732 if inlined != (member_inline_size <= 4) {
12733 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12734 }
12735 let inner_offset;
12736 let mut inner_depth = depth.clone();
12737 if inlined {
12738 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12739 inner_offset = next_offset;
12740 } else {
12741 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12742 inner_depth.increment()?;
12743 }
12744 let val_ref = self.uv.get_or_insert_with(|| {
12745 fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12746 });
12747 fidl::decode!(
12748 UnionWithVector,
12749 fidl::encoding::DefaultFuchsiaResourceDialect,
12750 val_ref,
12751 decoder,
12752 inner_offset,
12753 inner_depth
12754 )?;
12755 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12756 {
12757 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12758 }
12759 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12760 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12761 }
12762 }
12763
12764 next_offset += envelope_size;
12765 _next_ordinal_to_read += 1;
12766 if next_offset >= end_offset {
12767 return Ok(());
12768 }
12769
12770 while _next_ordinal_to_read < 3 {
12772 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12773 _next_ordinal_to_read += 1;
12774 next_offset += envelope_size;
12775 }
12776
12777 let next_out_of_line = decoder.next_out_of_line();
12778 let handles_before = decoder.remaining_handles();
12779 if let Some((inlined, num_bytes, num_handles)) =
12780 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12781 {
12782 let member_inline_size =
12783 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12784 if inlined != (member_inline_size <= 4) {
12785 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12786 }
12787 let inner_offset;
12788 let mut inner_depth = depth.clone();
12789 if inlined {
12790 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12791 inner_offset = next_offset;
12792 } else {
12793 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12794 inner_depth.increment()?;
12795 }
12796 let val_ref = self.s2.get_or_insert_with(|| {
12797 fidl::new_empty!(
12798 StructSize3Align1,
12799 fidl::encoding::DefaultFuchsiaResourceDialect
12800 )
12801 });
12802 fidl::decode!(
12803 StructSize3Align1,
12804 fidl::encoding::DefaultFuchsiaResourceDialect,
12805 val_ref,
12806 decoder,
12807 inner_offset,
12808 inner_depth
12809 )?;
12810 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12811 {
12812 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12813 }
12814 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12815 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12816 }
12817 }
12818
12819 next_offset += envelope_size;
12820
12821 while next_offset < end_offset {
12823 _next_ordinal_to_read += 1;
12824 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12825 next_offset += envelope_size;
12826 }
12827
12828 Ok(())
12829 }
12830 }
12831
12832 impl VectorOfArrayOfEventInTableWithReducedRights {
12833 #[inline(always)]
12834 fn max_ordinal_present(&self) -> u64 {
12835 if let Some(_) = self.h {
12836 return 1;
12837 }
12838 0
12839 }
12840 }
12841
12842 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12843 type Borrowed<'a> = &'a mut Self;
12844 fn take_or_borrow<'a>(
12845 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12846 ) -> Self::Borrowed<'a> {
12847 value
12848 }
12849 }
12850
12851 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12852 type Owned = Self;
12853
12854 #[inline(always)]
12855 fn inline_align(_context: fidl::encoding::Context) -> usize {
12856 8
12857 }
12858
12859 #[inline(always)]
12860 fn inline_size(_context: fidl::encoding::Context) -> usize {
12861 16
12862 }
12863 }
12864
12865 unsafe impl
12866 fidl::encoding::Encode<
12867 VectorOfArrayOfEventInTableWithReducedRights,
12868 fidl::encoding::DefaultFuchsiaResourceDialect,
12869 > for &mut VectorOfArrayOfEventInTableWithReducedRights
12870 {
12871 unsafe fn encode(
12872 self,
12873 encoder: &mut fidl::encoding::Encoder<
12874 '_,
12875 fidl::encoding::DefaultFuchsiaResourceDialect,
12876 >,
12877 offset: usize,
12878 mut depth: fidl::encoding::Depth,
12879 ) -> fidl::Result<()> {
12880 encoder.debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRights>(offset);
12881 let max_ordinal: u64 = self.max_ordinal_present();
12883 encoder.write_num(max_ordinal, offset);
12884 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12885 if max_ordinal == 0 {
12887 return Ok(());
12888 }
12889 depth.increment()?;
12890 let envelope_size = 8;
12891 let bytes_len = max_ordinal as usize * envelope_size;
12892 #[allow(unused_variables)]
12893 let offset = encoder.out_of_line_offset(bytes_len);
12894 let mut _prev_end_offset: usize = 0;
12895 if 1 > max_ordinal {
12896 return Ok(());
12897 }
12898
12899 let cur_offset: usize = (1 - 1) * envelope_size;
12902
12903 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12905
12906 fidl::encoding::encode_in_envelope_optional::<
12911 fidl::encoding::Vector<
12912 fidl::encoding::Array<
12913 fidl::encoding::HandleType<
12914 fidl::Event,
12915 { fidl::ObjectType::EVENT.into_raw() },
12916 49155,
12917 >,
12918 1,
12919 >,
12920 1,
12921 >,
12922 fidl::encoding::DefaultFuchsiaResourceDialect,
12923 >(
12924 self.h.as_mut().map(
12925 <fidl::encoding::Vector<
12926 fidl::encoding::Array<
12927 fidl::encoding::HandleType<
12928 fidl::Event,
12929 { fidl::ObjectType::EVENT.into_raw() },
12930 49155,
12931 >,
12932 1,
12933 >,
12934 1,
12935 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12936 ),
12937 encoder,
12938 offset + cur_offset,
12939 depth,
12940 )?;
12941
12942 _prev_end_offset = cur_offset + envelope_size;
12943
12944 Ok(())
12945 }
12946 }
12947
12948 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12949 for VectorOfArrayOfEventInTableWithReducedRights
12950 {
12951 #[inline(always)]
12952 fn new_empty() -> Self {
12953 Self::default()
12954 }
12955
12956 unsafe fn decode(
12957 &mut self,
12958 decoder: &mut fidl::encoding::Decoder<
12959 '_,
12960 fidl::encoding::DefaultFuchsiaResourceDialect,
12961 >,
12962 offset: usize,
12963 mut depth: fidl::encoding::Depth,
12964 ) -> fidl::Result<()> {
12965 decoder.debug_check_bounds::<Self>(offset);
12966 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12967 None => return Err(fidl::Error::NotNullable),
12968 Some(len) => len,
12969 };
12970 if len == 0 {
12972 return Ok(());
12973 };
12974 depth.increment()?;
12975 let envelope_size = 8;
12976 let bytes_len = len * envelope_size;
12977 let offset = decoder.out_of_line_offset(bytes_len)?;
12978 let mut _next_ordinal_to_read = 0;
12980 let mut next_offset = offset;
12981 let end_offset = offset + bytes_len;
12982 _next_ordinal_to_read += 1;
12983 if next_offset >= end_offset {
12984 return Ok(());
12985 }
12986
12987 while _next_ordinal_to_read < 1 {
12989 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12990 _next_ordinal_to_read += 1;
12991 next_offset += envelope_size;
12992 }
12993
12994 let next_out_of_line = decoder.next_out_of_line();
12995 let handles_before = decoder.remaining_handles();
12996 if let Some((inlined, num_bytes, num_handles)) =
12997 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12998 {
12999 let member_inline_size = <fidl::encoding::Vector<
13000 fidl::encoding::Array<
13001 fidl::encoding::HandleType<
13002 fidl::Event,
13003 { fidl::ObjectType::EVENT.into_raw() },
13004 49155,
13005 >,
13006 1,
13007 >,
13008 1,
13009 > as fidl::encoding::TypeMarker>::inline_size(
13010 decoder.context
13011 );
13012 if inlined != (member_inline_size <= 4) {
13013 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13014 }
13015 let inner_offset;
13016 let mut inner_depth = depth.clone();
13017 if inlined {
13018 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13019 inner_offset = next_offset;
13020 } else {
13021 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13022 inner_depth.increment()?;
13023 }
13024 let val_ref = self.h.get_or_insert_with(|| {
13025 fidl::new_empty!(
13026 fidl::encoding::Vector<
13027 fidl::encoding::Array<
13028 fidl::encoding::HandleType<
13029 fidl::Event,
13030 { fidl::ObjectType::EVENT.into_raw() },
13031 49155,
13032 >,
13033 1,
13034 >,
13035 1,
13036 >,
13037 fidl::encoding::DefaultFuchsiaResourceDialect
13038 )
13039 });
13040 fidl::decode!(
13041 fidl::encoding::Vector<
13042 fidl::encoding::Array<
13043 fidl::encoding::HandleType<
13044 fidl::Event,
13045 { fidl::ObjectType::EVENT.into_raw() },
13046 49155,
13047 >,
13048 1,
13049 >,
13050 1,
13051 >,
13052 fidl::encoding::DefaultFuchsiaResourceDialect,
13053 val_ref,
13054 decoder,
13055 inner_offset,
13056 inner_depth
13057 )?;
13058 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13059 {
13060 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13061 }
13062 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13063 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13064 }
13065 }
13066
13067 next_offset += envelope_size;
13068
13069 while next_offset < end_offset {
13071 _next_ordinal_to_read += 1;
13072 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13073 next_offset += envelope_size;
13074 }
13075
13076 Ok(())
13077 }
13078 }
13079
13080 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13081 type Borrowed<'a> = &'a mut Self;
13082 fn take_or_borrow<'a>(
13083 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13084 ) -> Self::Borrowed<'a> {
13085 value
13086 }
13087 }
13088
13089 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13090 type Owned = Self;
13091
13092 #[inline(always)]
13093 fn inline_align(_context: fidl::encoding::Context) -> usize {
13094 8
13095 }
13096
13097 #[inline(always)]
13098 fn inline_size(_context: fidl::encoding::Context) -> usize {
13099 16
13100 }
13101 }
13102
13103 unsafe impl
13104 fidl::encoding::Encode<
13105 ArrayOfVectorOfEventInUnionWithDefaultRights,
13106 fidl::encoding::DefaultFuchsiaResourceDialect,
13107 > for &mut ArrayOfVectorOfEventInUnionWithDefaultRights
13108 {
13109 #[inline]
13110 unsafe fn encode(
13111 self,
13112 encoder: &mut fidl::encoding::Encoder<
13113 '_,
13114 fidl::encoding::DefaultFuchsiaResourceDialect,
13115 >,
13116 offset: usize,
13117 _depth: fidl::encoding::Depth,
13118 ) -> fidl::Result<()> {
13119 encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRights>(offset);
13120 encoder.write_num::<u64>(self.ordinal(), offset);
13121 match self {
13122 ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) => {
13123 fidl::encoding::encode_in_envelope::<
13124 fidl::encoding::Array<
13125 fidl::encoding::Vector<
13126 fidl::encoding::HandleType<
13127 fidl::Event,
13128 { fidl::ObjectType::EVENT.into_raw() },
13129 53251,
13130 >,
13131 1,
13132 >,
13133 1,
13134 >,
13135 fidl::encoding::DefaultFuchsiaResourceDialect,
13136 >(
13137 <fidl::encoding::Array<
13138 fidl::encoding::Vector<
13139 fidl::encoding::HandleType<
13140 fidl::Event,
13141 { fidl::ObjectType::EVENT.into_raw() },
13142 53251,
13143 >,
13144 1,
13145 >,
13146 1,
13147 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13148 val
13149 ),
13150 encoder,
13151 offset + 8,
13152 _depth,
13153 )
13154 }
13155 }
13156 }
13157 }
13158
13159 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13160 for ArrayOfVectorOfEventInUnionWithDefaultRights
13161 {
13162 #[inline(always)]
13163 fn new_empty() -> Self {
13164 Self::H(fidl::new_empty!(
13165 fidl::encoding::Array<
13166 fidl::encoding::Vector<
13167 fidl::encoding::HandleType<
13168 fidl::Event,
13169 { fidl::ObjectType::EVENT.into_raw() },
13170 53251,
13171 >,
13172 1,
13173 >,
13174 1,
13175 >,
13176 fidl::encoding::DefaultFuchsiaResourceDialect
13177 ))
13178 }
13179
13180 #[inline]
13181 unsafe fn decode(
13182 &mut self,
13183 decoder: &mut fidl::encoding::Decoder<
13184 '_,
13185 fidl::encoding::DefaultFuchsiaResourceDialect,
13186 >,
13187 offset: usize,
13188 mut depth: fidl::encoding::Depth,
13189 ) -> fidl::Result<()> {
13190 decoder.debug_check_bounds::<Self>(offset);
13191 #[allow(unused_variables)]
13192 let next_out_of_line = decoder.next_out_of_line();
13193 let handles_before = decoder.remaining_handles();
13194 let (ordinal, inlined, num_bytes, num_handles) =
13195 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13196
13197 let member_inline_size = match ordinal {
13198 1 => <fidl::encoding::Array<
13199 fidl::encoding::Vector<
13200 fidl::encoding::HandleType<
13201 fidl::Event,
13202 { fidl::ObjectType::EVENT.into_raw() },
13203 53251,
13204 >,
13205 1,
13206 >,
13207 1,
13208 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13209 _ => return Err(fidl::Error::UnknownUnionTag),
13210 };
13211
13212 if inlined != (member_inline_size <= 4) {
13213 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13214 }
13215 let _inner_offset;
13216 if inlined {
13217 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13218 _inner_offset = offset + 8;
13219 } else {
13220 depth.increment()?;
13221 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13222 }
13223 match ordinal {
13224 1 => {
13225 #[allow(irrefutable_let_patterns)]
13226 if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(_) = self {
13227 } else {
13229 *self = ArrayOfVectorOfEventInUnionWithDefaultRights::H(fidl::new_empty!(
13231 fidl::encoding::Array<
13232 fidl::encoding::Vector<
13233 fidl::encoding::HandleType<
13234 fidl::Event,
13235 { fidl::ObjectType::EVENT.into_raw() },
13236 53251,
13237 >,
13238 1,
13239 >,
13240 1,
13241 >,
13242 fidl::encoding::DefaultFuchsiaResourceDialect
13243 ));
13244 }
13245 #[allow(irrefutable_let_patterns)]
13246 if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) = self {
13247 fidl::decode!(
13248 fidl::encoding::Array<
13249 fidl::encoding::Vector<
13250 fidl::encoding::HandleType<
13251 fidl::Event,
13252 { fidl::ObjectType::EVENT.into_raw() },
13253 53251,
13254 >,
13255 1,
13256 >,
13257 1,
13258 >,
13259 fidl::encoding::DefaultFuchsiaResourceDialect,
13260 val,
13261 decoder,
13262 _inner_offset,
13263 depth
13264 )?;
13265 } else {
13266 unreachable!()
13267 }
13268 }
13269 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13270 }
13271 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13272 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13273 }
13274 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13275 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13276 }
13277 Ok(())
13278 }
13279 }
13280
13281 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13282 type Borrowed<'a> = &'a mut Self;
13283 fn take_or_borrow<'a>(
13284 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13285 ) -> Self::Borrowed<'a> {
13286 value
13287 }
13288 }
13289
13290 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13291 type Owned = Self;
13292
13293 #[inline(always)]
13294 fn inline_align(_context: fidl::encoding::Context) -> usize {
13295 8
13296 }
13297
13298 #[inline(always)]
13299 fn inline_size(_context: fidl::encoding::Context) -> usize {
13300 16
13301 }
13302 }
13303
13304 unsafe impl
13305 fidl::encoding::Encode<
13306 ArrayOfVectorOfEventInUnionWithReducedRights,
13307 fidl::encoding::DefaultFuchsiaResourceDialect,
13308 > for &mut ArrayOfVectorOfEventInUnionWithReducedRights
13309 {
13310 #[inline]
13311 unsafe fn encode(
13312 self,
13313 encoder: &mut fidl::encoding::Encoder<
13314 '_,
13315 fidl::encoding::DefaultFuchsiaResourceDialect,
13316 >,
13317 offset: usize,
13318 _depth: fidl::encoding::Depth,
13319 ) -> fidl::Result<()> {
13320 encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRights>(offset);
13321 encoder.write_num::<u64>(self.ordinal(), offset);
13322 match self {
13323 ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) => {
13324 fidl::encoding::encode_in_envelope::<
13325 fidl::encoding::Array<
13326 fidl::encoding::Vector<
13327 fidl::encoding::HandleType<
13328 fidl::Event,
13329 { fidl::ObjectType::EVENT.into_raw() },
13330 49155,
13331 >,
13332 1,
13333 >,
13334 1,
13335 >,
13336 fidl::encoding::DefaultFuchsiaResourceDialect,
13337 >(
13338 <fidl::encoding::Array<
13339 fidl::encoding::Vector<
13340 fidl::encoding::HandleType<
13341 fidl::Event,
13342 { fidl::ObjectType::EVENT.into_raw() },
13343 49155,
13344 >,
13345 1,
13346 >,
13347 1,
13348 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13349 val
13350 ),
13351 encoder,
13352 offset + 8,
13353 _depth,
13354 )
13355 }
13356 }
13357 }
13358 }
13359
13360 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13361 for ArrayOfVectorOfEventInUnionWithReducedRights
13362 {
13363 #[inline(always)]
13364 fn new_empty() -> Self {
13365 Self::H(fidl::new_empty!(
13366 fidl::encoding::Array<
13367 fidl::encoding::Vector<
13368 fidl::encoding::HandleType<
13369 fidl::Event,
13370 { fidl::ObjectType::EVENT.into_raw() },
13371 49155,
13372 >,
13373 1,
13374 >,
13375 1,
13376 >,
13377 fidl::encoding::DefaultFuchsiaResourceDialect
13378 ))
13379 }
13380
13381 #[inline]
13382 unsafe fn decode(
13383 &mut self,
13384 decoder: &mut fidl::encoding::Decoder<
13385 '_,
13386 fidl::encoding::DefaultFuchsiaResourceDialect,
13387 >,
13388 offset: usize,
13389 mut depth: fidl::encoding::Depth,
13390 ) -> fidl::Result<()> {
13391 decoder.debug_check_bounds::<Self>(offset);
13392 #[allow(unused_variables)]
13393 let next_out_of_line = decoder.next_out_of_line();
13394 let handles_before = decoder.remaining_handles();
13395 let (ordinal, inlined, num_bytes, num_handles) =
13396 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13397
13398 let member_inline_size = match ordinal {
13399 1 => <fidl::encoding::Array<
13400 fidl::encoding::Vector<
13401 fidl::encoding::HandleType<
13402 fidl::Event,
13403 { fidl::ObjectType::EVENT.into_raw() },
13404 49155,
13405 >,
13406 1,
13407 >,
13408 1,
13409 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13410 _ => return Err(fidl::Error::UnknownUnionTag),
13411 };
13412
13413 if inlined != (member_inline_size <= 4) {
13414 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13415 }
13416 let _inner_offset;
13417 if inlined {
13418 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13419 _inner_offset = offset + 8;
13420 } else {
13421 depth.increment()?;
13422 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13423 }
13424 match ordinal {
13425 1 => {
13426 #[allow(irrefutable_let_patterns)]
13427 if let ArrayOfVectorOfEventInUnionWithReducedRights::H(_) = self {
13428 } else {
13430 *self = ArrayOfVectorOfEventInUnionWithReducedRights::H(fidl::new_empty!(
13432 fidl::encoding::Array<
13433 fidl::encoding::Vector<
13434 fidl::encoding::HandleType<
13435 fidl::Event,
13436 { fidl::ObjectType::EVENT.into_raw() },
13437 49155,
13438 >,
13439 1,
13440 >,
13441 1,
13442 >,
13443 fidl::encoding::DefaultFuchsiaResourceDialect
13444 ));
13445 }
13446 #[allow(irrefutable_let_patterns)]
13447 if let ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) = self {
13448 fidl::decode!(
13449 fidl::encoding::Array<
13450 fidl::encoding::Vector<
13451 fidl::encoding::HandleType<
13452 fidl::Event,
13453 { fidl::ObjectType::EVENT.into_raw() },
13454 49155,
13455 >,
13456 1,
13457 >,
13458 1,
13459 >,
13460 fidl::encoding::DefaultFuchsiaResourceDialect,
13461 val,
13462 decoder,
13463 _inner_offset,
13464 depth
13465 )?;
13466 } else {
13467 unreachable!()
13468 }
13469 }
13470 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13471 }
13472 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13473 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13474 }
13475 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13476 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13477 }
13478 Ok(())
13479 }
13480 }
13481
13482 impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnion {
13483 type Borrowed<'a> = &'a mut Self;
13484 fn take_or_borrow<'a>(
13485 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13486 ) -> Self::Borrowed<'a> {
13487 value
13488 }
13489 }
13490
13491 unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnion {
13492 type Owned = Self;
13493
13494 #[inline(always)]
13495 fn inline_align(_context: fidl::encoding::Context) -> usize {
13496 8
13497 }
13498
13499 #[inline(always)]
13500 fn inline_size(_context: fidl::encoding::Context) -> usize {
13501 16
13502 }
13503 }
13504
13505 unsafe impl
13506 fidl::encoding::Encode<
13507 EnvelopeInliningTestUnion,
13508 fidl::encoding::DefaultFuchsiaResourceDialect,
13509 > for &mut EnvelopeInliningTestUnion
13510 {
13511 #[inline]
13512 unsafe fn encode(
13513 self,
13514 encoder: &mut fidl::encoding::Encoder<
13515 '_,
13516 fidl::encoding::DefaultFuchsiaResourceDialect,
13517 >,
13518 offset: usize,
13519 _depth: fidl::encoding::Depth,
13520 ) -> fidl::Result<()> {
13521 encoder.debug_check_bounds::<EnvelopeInliningTestUnion>(offset);
13522 encoder.write_num::<u64>(self.ordinal(), offset);
13523 match self {
13524 EnvelopeInliningTestUnion::Small(ref val) => fidl::encoding::encode_in_envelope::<
13525 u32,
13526 fidl::encoding::DefaultFuchsiaResourceDialect,
13527 >(
13528 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13529 encoder,
13530 offset + 8,
13531 _depth,
13532 ),
13533 EnvelopeInliningTestUnion::Large(ref val) => fidl::encoding::encode_in_envelope::<
13534 u64,
13535 fidl::encoding::DefaultFuchsiaResourceDialect,
13536 >(
13537 <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
13538 encoder,
13539 offset + 8,
13540 _depth,
13541 ),
13542 EnvelopeInliningTestUnion::Handle(ref mut val) => {
13543 fidl::encoding::encode_in_envelope::<
13544 fidl::encoding::HandleType<
13545 fidl::Handle,
13546 { fidl::ObjectType::NONE.into_raw() },
13547 2147483648,
13548 >,
13549 fidl::encoding::DefaultFuchsiaResourceDialect,
13550 >(
13551 <fidl::encoding::HandleType<
13552 fidl::Handle,
13553 { fidl::ObjectType::NONE.into_raw() },
13554 2147483648,
13555 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13556 val
13557 ),
13558 encoder,
13559 offset + 8,
13560 _depth,
13561 )
13562 }
13563 EnvelopeInliningTestUnion::__SourceBreaking { .. } => {
13564 Err(fidl::Error::UnknownUnionTag)
13565 }
13566 }
13567 }
13568 }
13569
13570 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13571 for EnvelopeInliningTestUnion
13572 {
13573 #[inline(always)]
13574 fn new_empty() -> Self {
13575 Self::__SourceBreaking { unknown_ordinal: 0 }
13576 }
13577
13578 #[inline]
13579 unsafe fn decode(
13580 &mut self,
13581 decoder: &mut fidl::encoding::Decoder<
13582 '_,
13583 fidl::encoding::DefaultFuchsiaResourceDialect,
13584 >,
13585 offset: usize,
13586 mut depth: fidl::encoding::Depth,
13587 ) -> fidl::Result<()> {
13588 decoder.debug_check_bounds::<Self>(offset);
13589 #[allow(unused_variables)]
13590 let next_out_of_line = decoder.next_out_of_line();
13591 let handles_before = decoder.remaining_handles();
13592 let (ordinal, inlined, num_bytes, num_handles) =
13593 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13594
13595 let member_inline_size = match ordinal {
13596 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13597 2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13598 3 => <fidl::encoding::HandleType<
13599 fidl::Handle,
13600 { fidl::ObjectType::NONE.into_raw() },
13601 2147483648,
13602 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13603 0 => return Err(fidl::Error::UnknownUnionTag),
13604 _ => num_bytes as usize,
13605 };
13606
13607 if inlined != (member_inline_size <= 4) {
13608 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13609 }
13610 let _inner_offset;
13611 if inlined {
13612 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13613 _inner_offset = offset + 8;
13614 } else {
13615 depth.increment()?;
13616 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13617 }
13618 match ordinal {
13619 1 => {
13620 #[allow(irrefutable_let_patterns)]
13621 if let EnvelopeInliningTestUnion::Small(_) = self {
13622 } else {
13624 *self = EnvelopeInliningTestUnion::Small(fidl::new_empty!(
13626 u32,
13627 fidl::encoding::DefaultFuchsiaResourceDialect
13628 ));
13629 }
13630 #[allow(irrefutable_let_patterns)]
13631 if let EnvelopeInliningTestUnion::Small(ref mut val) = self {
13632 fidl::decode!(
13633 u32,
13634 fidl::encoding::DefaultFuchsiaResourceDialect,
13635 val,
13636 decoder,
13637 _inner_offset,
13638 depth
13639 )?;
13640 } else {
13641 unreachable!()
13642 }
13643 }
13644 2 => {
13645 #[allow(irrefutable_let_patterns)]
13646 if let EnvelopeInliningTestUnion::Large(_) = self {
13647 } else {
13649 *self = EnvelopeInliningTestUnion::Large(fidl::new_empty!(
13651 u64,
13652 fidl::encoding::DefaultFuchsiaResourceDialect
13653 ));
13654 }
13655 #[allow(irrefutable_let_patterns)]
13656 if let EnvelopeInliningTestUnion::Large(ref mut val) = self {
13657 fidl::decode!(
13658 u64,
13659 fidl::encoding::DefaultFuchsiaResourceDialect,
13660 val,
13661 decoder,
13662 _inner_offset,
13663 depth
13664 )?;
13665 } else {
13666 unreachable!()
13667 }
13668 }
13669 3 => {
13670 #[allow(irrefutable_let_patterns)]
13671 if let EnvelopeInliningTestUnion::Handle(_) = self {
13672 } else {
13674 *self = EnvelopeInliningTestUnion::Handle(
13676 fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13677 );
13678 }
13679 #[allow(irrefutable_let_patterns)]
13680 if let EnvelopeInliningTestUnion::Handle(ref mut val) = self {
13681 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
13682 } else {
13683 unreachable!()
13684 }
13685 }
13686 #[allow(deprecated)]
13687 ordinal => {
13688 for _ in 0..num_handles {
13689 decoder.drop_next_handle()?;
13690 }
13691 *self =
13692 EnvelopeInliningTestUnion::__SourceBreaking { unknown_ordinal: ordinal };
13693 }
13694 }
13695 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13696 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13697 }
13698 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13699 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13700 }
13701 Ok(())
13702 }
13703 }
13704
13705 impl fidl::encoding::ResourceTypeMarker for SampleResourceXUnion {
13706 type Borrowed<'a> = &'a mut Self;
13707 fn take_or_borrow<'a>(
13708 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13709 ) -> Self::Borrowed<'a> {
13710 value
13711 }
13712 }
13713
13714 unsafe impl fidl::encoding::TypeMarker for SampleResourceXUnion {
13715 type Owned = Self;
13716
13717 #[inline(always)]
13718 fn inline_align(_context: fidl::encoding::Context) -> usize {
13719 8
13720 }
13721
13722 #[inline(always)]
13723 fn inline_size(_context: fidl::encoding::Context) -> usize {
13724 16
13725 }
13726 }
13727
13728 unsafe impl
13729 fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
13730 for &mut SampleResourceXUnion
13731 {
13732 #[inline]
13733 unsafe fn encode(
13734 self,
13735 encoder: &mut fidl::encoding::Encoder<
13736 '_,
13737 fidl::encoding::DefaultFuchsiaResourceDialect,
13738 >,
13739 offset: usize,
13740 _depth: fidl::encoding::Depth,
13741 ) -> fidl::Result<()> {
13742 encoder.debug_check_bounds::<SampleResourceXUnion>(offset);
13743 encoder.write_num::<u64>(self.ordinal(), offset);
13744 match self {
13745 SampleResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13746 u32,
13747 fidl::encoding::DefaultFuchsiaResourceDialect,
13748 >(
13749 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13750 encoder,
13751 offset + 8,
13752 _depth,
13753 ),
13754 SampleResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13755 SimpleUnion,
13756 fidl::encoding::DefaultFuchsiaResourceDialect,
13757 >(
13758 <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13759 encoder,
13760 offset + 8,
13761 _depth,
13762 ),
13763 SampleResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13764 SimpleTable,
13765 fidl::encoding::DefaultFuchsiaResourceDialect,
13766 >(
13767 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13768 encoder,
13769 offset + 8,
13770 _depth,
13771 ),
13772 SampleResourceXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
13773 }
13774 }
13775 }
13776
13777 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13778 for SampleResourceXUnion
13779 {
13780 #[inline(always)]
13781 fn new_empty() -> Self {
13782 Self::__SourceBreaking { unknown_ordinal: 0 }
13783 }
13784
13785 #[inline]
13786 unsafe fn decode(
13787 &mut self,
13788 decoder: &mut fidl::encoding::Decoder<
13789 '_,
13790 fidl::encoding::DefaultFuchsiaResourceDialect,
13791 >,
13792 offset: usize,
13793 mut depth: fidl::encoding::Depth,
13794 ) -> fidl::Result<()> {
13795 decoder.debug_check_bounds::<Self>(offset);
13796 #[allow(unused_variables)]
13797 let next_out_of_line = decoder.next_out_of_line();
13798 let handles_before = decoder.remaining_handles();
13799 let (ordinal, inlined, num_bytes, num_handles) =
13800 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13801
13802 let member_inline_size = match ordinal {
13803 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13804 2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13805 3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13806 0 => return Err(fidl::Error::UnknownUnionTag),
13807 _ => num_bytes as usize,
13808 };
13809
13810 if inlined != (member_inline_size <= 4) {
13811 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13812 }
13813 let _inner_offset;
13814 if inlined {
13815 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13816 _inner_offset = offset + 8;
13817 } else {
13818 depth.increment()?;
13819 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13820 }
13821 match ordinal {
13822 1 => {
13823 #[allow(irrefutable_let_patterns)]
13824 if let SampleResourceXUnion::U(_) = self {
13825 } else {
13827 *self = SampleResourceXUnion::U(fidl::new_empty!(
13829 u32,
13830 fidl::encoding::DefaultFuchsiaResourceDialect
13831 ));
13832 }
13833 #[allow(irrefutable_let_patterns)]
13834 if let SampleResourceXUnion::U(ref mut val) = self {
13835 fidl::decode!(
13836 u32,
13837 fidl::encoding::DefaultFuchsiaResourceDialect,
13838 val,
13839 decoder,
13840 _inner_offset,
13841 depth
13842 )?;
13843 } else {
13844 unreachable!()
13845 }
13846 }
13847 2 => {
13848 #[allow(irrefutable_let_patterns)]
13849 if let SampleResourceXUnion::Su(_) = self {
13850 } else {
13852 *self = SampleResourceXUnion::Su(fidl::new_empty!(
13854 SimpleUnion,
13855 fidl::encoding::DefaultFuchsiaResourceDialect
13856 ));
13857 }
13858 #[allow(irrefutable_let_patterns)]
13859 if let SampleResourceXUnion::Su(ref mut val) = self {
13860 fidl::decode!(
13861 SimpleUnion,
13862 fidl::encoding::DefaultFuchsiaResourceDialect,
13863 val,
13864 decoder,
13865 _inner_offset,
13866 depth
13867 )?;
13868 } else {
13869 unreachable!()
13870 }
13871 }
13872 3 => {
13873 #[allow(irrefutable_let_patterns)]
13874 if let SampleResourceXUnion::St(_) = self {
13875 } else {
13877 *self = SampleResourceXUnion::St(fidl::new_empty!(
13879 SimpleTable,
13880 fidl::encoding::DefaultFuchsiaResourceDialect
13881 ));
13882 }
13883 #[allow(irrefutable_let_patterns)]
13884 if let SampleResourceXUnion::St(ref mut val) = self {
13885 fidl::decode!(
13886 SimpleTable,
13887 fidl::encoding::DefaultFuchsiaResourceDialect,
13888 val,
13889 decoder,
13890 _inner_offset,
13891 depth
13892 )?;
13893 } else {
13894 unreachable!()
13895 }
13896 }
13897 #[allow(deprecated)]
13898 ordinal => {
13899 for _ in 0..num_handles {
13900 decoder.drop_next_handle()?;
13901 }
13902 *self = SampleResourceXUnion::__SourceBreaking { unknown_ordinal: ordinal };
13903 }
13904 }
13905 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13906 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13907 }
13908 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13909 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13910 }
13911 Ok(())
13912 }
13913 }
13914
13915 impl fidl::encoding::ResourceTypeMarker for SampleStrictResourceXUnion {
13916 type Borrowed<'a> = &'a mut Self;
13917 fn take_or_borrow<'a>(
13918 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13919 ) -> Self::Borrowed<'a> {
13920 value
13921 }
13922 }
13923
13924 unsafe impl fidl::encoding::TypeMarker for SampleStrictResourceXUnion {
13925 type Owned = Self;
13926
13927 #[inline(always)]
13928 fn inline_align(_context: fidl::encoding::Context) -> usize {
13929 8
13930 }
13931
13932 #[inline(always)]
13933 fn inline_size(_context: fidl::encoding::Context) -> usize {
13934 16
13935 }
13936 }
13937
13938 unsafe impl
13939 fidl::encoding::Encode<
13940 SampleStrictResourceXUnion,
13941 fidl::encoding::DefaultFuchsiaResourceDialect,
13942 > for &mut SampleStrictResourceXUnion
13943 {
13944 #[inline]
13945 unsafe fn encode(
13946 self,
13947 encoder: &mut fidl::encoding::Encoder<
13948 '_,
13949 fidl::encoding::DefaultFuchsiaResourceDialect,
13950 >,
13951 offset: usize,
13952 _depth: fidl::encoding::Depth,
13953 ) -> fidl::Result<()> {
13954 encoder.debug_check_bounds::<SampleStrictResourceXUnion>(offset);
13955 encoder.write_num::<u64>(self.ordinal(), offset);
13956 match self {
13957 SampleStrictResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13958 u32,
13959 fidl::encoding::DefaultFuchsiaResourceDialect,
13960 >(
13961 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13962 encoder,
13963 offset + 8,
13964 _depth,
13965 ),
13966 SampleStrictResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13967 SimpleUnion,
13968 fidl::encoding::DefaultFuchsiaResourceDialect,
13969 >(
13970 <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13971 encoder,
13972 offset + 8,
13973 _depth,
13974 ),
13975 SampleStrictResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13976 SimpleTable,
13977 fidl::encoding::DefaultFuchsiaResourceDialect,
13978 >(
13979 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13980 encoder,
13981 offset + 8,
13982 _depth,
13983 ),
13984 }
13985 }
13986 }
13987
13988 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13989 for SampleStrictResourceXUnion
13990 {
13991 #[inline(always)]
13992 fn new_empty() -> Self {
13993 Self::U(fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect))
13994 }
13995
13996 #[inline]
13997 unsafe fn decode(
13998 &mut self,
13999 decoder: &mut fidl::encoding::Decoder<
14000 '_,
14001 fidl::encoding::DefaultFuchsiaResourceDialect,
14002 >,
14003 offset: usize,
14004 mut depth: fidl::encoding::Depth,
14005 ) -> fidl::Result<()> {
14006 decoder.debug_check_bounds::<Self>(offset);
14007 #[allow(unused_variables)]
14008 let next_out_of_line = decoder.next_out_of_line();
14009 let handles_before = decoder.remaining_handles();
14010 let (ordinal, inlined, num_bytes, num_handles) =
14011 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14012
14013 let member_inline_size = match ordinal {
14014 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14015 2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14016 3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14017 _ => return Err(fidl::Error::UnknownUnionTag),
14018 };
14019
14020 if inlined != (member_inline_size <= 4) {
14021 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14022 }
14023 let _inner_offset;
14024 if inlined {
14025 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14026 _inner_offset = offset + 8;
14027 } else {
14028 depth.increment()?;
14029 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14030 }
14031 match ordinal {
14032 1 => {
14033 #[allow(irrefutable_let_patterns)]
14034 if let SampleStrictResourceXUnion::U(_) = self {
14035 } else {
14037 *self = SampleStrictResourceXUnion::U(fidl::new_empty!(
14039 u32,
14040 fidl::encoding::DefaultFuchsiaResourceDialect
14041 ));
14042 }
14043 #[allow(irrefutable_let_patterns)]
14044 if let SampleStrictResourceXUnion::U(ref mut val) = self {
14045 fidl::decode!(
14046 u32,
14047 fidl::encoding::DefaultFuchsiaResourceDialect,
14048 val,
14049 decoder,
14050 _inner_offset,
14051 depth
14052 )?;
14053 } else {
14054 unreachable!()
14055 }
14056 }
14057 2 => {
14058 #[allow(irrefutable_let_patterns)]
14059 if let SampleStrictResourceXUnion::Su(_) = self {
14060 } else {
14062 *self = SampleStrictResourceXUnion::Su(fidl::new_empty!(
14064 SimpleUnion,
14065 fidl::encoding::DefaultFuchsiaResourceDialect
14066 ));
14067 }
14068 #[allow(irrefutable_let_patterns)]
14069 if let SampleStrictResourceXUnion::Su(ref mut val) = self {
14070 fidl::decode!(
14071 SimpleUnion,
14072 fidl::encoding::DefaultFuchsiaResourceDialect,
14073 val,
14074 decoder,
14075 _inner_offset,
14076 depth
14077 )?;
14078 } else {
14079 unreachable!()
14080 }
14081 }
14082 3 => {
14083 #[allow(irrefutable_let_patterns)]
14084 if let SampleStrictResourceXUnion::St(_) = self {
14085 } else {
14087 *self = SampleStrictResourceXUnion::St(fidl::new_empty!(
14089 SimpleTable,
14090 fidl::encoding::DefaultFuchsiaResourceDialect
14091 ));
14092 }
14093 #[allow(irrefutable_let_patterns)]
14094 if let SampleStrictResourceXUnion::St(ref mut val) = self {
14095 fidl::decode!(
14096 SimpleTable,
14097 fidl::encoding::DefaultFuchsiaResourceDialect,
14098 val,
14099 decoder,
14100 _inner_offset,
14101 depth
14102 )?;
14103 } else {
14104 unreachable!()
14105 }
14106 }
14107 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14108 }
14109 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14110 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14111 }
14112 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14113 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14114 }
14115 Ok(())
14116 }
14117 }
14118
14119 impl fidl::encoding::ResourceTypeMarker for UnionOfEndpointsUnion {
14120 type Borrowed<'a> = &'a mut Self;
14121 fn take_or_borrow<'a>(
14122 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14123 ) -> Self::Borrowed<'a> {
14124 value
14125 }
14126 }
14127
14128 unsafe impl fidl::encoding::TypeMarker for UnionOfEndpointsUnion {
14129 type Owned = Self;
14130
14131 #[inline(always)]
14132 fn inline_align(_context: fidl::encoding::Context) -> usize {
14133 8
14134 }
14135
14136 #[inline(always)]
14137 fn inline_size(_context: fidl::encoding::Context) -> usize {
14138 16
14139 }
14140 }
14141
14142 unsafe impl
14143 fidl::encoding::Encode<UnionOfEndpointsUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14144 for &mut UnionOfEndpointsUnion
14145 {
14146 #[inline]
14147 unsafe fn encode(
14148 self,
14149 encoder: &mut fidl::encoding::Encoder<
14150 '_,
14151 fidl::encoding::DefaultFuchsiaResourceDialect,
14152 >,
14153 offset: usize,
14154 _depth: fidl::encoding::Depth,
14155 ) -> fidl::Result<()> {
14156 encoder.debug_check_bounds::<UnionOfEndpointsUnion>(offset);
14157 encoder.write_num::<u64>(self.ordinal(), offset);
14158 match self {
14159 UnionOfEndpointsUnion::ClientEnd(ref mut val) => {
14160 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14161 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14162 encoder, offset + 8, _depth
14163 )
14164 }
14165 UnionOfEndpointsUnion::ServerEnd(ref mut val) => {
14166 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14167 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14168 encoder, offset + 8, _depth
14169 )
14170 }
14171 UnionOfEndpointsUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14172 }
14173 }
14174 }
14175
14176 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14177 for UnionOfEndpointsUnion
14178 {
14179 #[inline(always)]
14180 fn new_empty() -> Self {
14181 Self::__SourceBreaking { unknown_ordinal: 0 }
14182 }
14183
14184 #[inline]
14185 unsafe fn decode(
14186 &mut self,
14187 decoder: &mut fidl::encoding::Decoder<
14188 '_,
14189 fidl::encoding::DefaultFuchsiaResourceDialect,
14190 >,
14191 offset: usize,
14192 mut depth: fidl::encoding::Depth,
14193 ) -> fidl::Result<()> {
14194 decoder.debug_check_bounds::<Self>(offset);
14195 #[allow(unused_variables)]
14196 let next_out_of_line = decoder.next_out_of_line();
14197 let handles_before = decoder.remaining_handles();
14198 let (ordinal, inlined, num_bytes, num_handles) =
14199 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14200
14201 let member_inline_size = match ordinal {
14202 1 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14203 2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14204 0 => return Err(fidl::Error::UnknownUnionTag),
14205 _ => num_bytes as usize,
14206 };
14207
14208 if inlined != (member_inline_size <= 4) {
14209 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14210 }
14211 let _inner_offset;
14212 if inlined {
14213 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14214 _inner_offset = offset + 8;
14215 } else {
14216 depth.increment()?;
14217 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14218 }
14219 match ordinal {
14220 1 => {
14221 #[allow(irrefutable_let_patterns)]
14222 if let UnionOfEndpointsUnion::ClientEnd(_) = self {
14223 } else {
14225 *self = UnionOfEndpointsUnion::ClientEnd(fidl::new_empty!(
14227 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14228 fidl::encoding::DefaultFuchsiaResourceDialect
14229 ));
14230 }
14231 #[allow(irrefutable_let_patterns)]
14232 if let UnionOfEndpointsUnion::ClientEnd(ref mut val) = self {
14233 fidl::decode!(
14234 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14235 fidl::encoding::DefaultFuchsiaResourceDialect,
14236 val,
14237 decoder,
14238 _inner_offset,
14239 depth
14240 )?;
14241 } else {
14242 unreachable!()
14243 }
14244 }
14245 2 => {
14246 #[allow(irrefutable_let_patterns)]
14247 if let UnionOfEndpointsUnion::ServerEnd(_) = self {
14248 } else {
14250 *self = UnionOfEndpointsUnion::ServerEnd(fidl::new_empty!(
14252 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14253 fidl::encoding::DefaultFuchsiaResourceDialect
14254 ));
14255 }
14256 #[allow(irrefutable_let_patterns)]
14257 if let UnionOfEndpointsUnion::ServerEnd(ref mut val) = self {
14258 fidl::decode!(
14259 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14260 fidl::encoding::DefaultFuchsiaResourceDialect,
14261 val,
14262 decoder,
14263 _inner_offset,
14264 depth
14265 )?;
14266 } else {
14267 unreachable!()
14268 }
14269 }
14270 #[allow(deprecated)]
14271 ordinal => {
14272 for _ in 0..num_handles {
14273 decoder.drop_next_handle()?;
14274 }
14275 *self = UnionOfEndpointsUnion::__SourceBreaking { unknown_ordinal: ordinal };
14276 }
14277 }
14278 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14279 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14280 }
14281 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14282 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14283 }
14284 Ok(())
14285 }
14286 }
14287
14288 impl fidl::encoding::ResourceTypeMarker for UnionOfHandle {
14289 type Borrowed<'a> = &'a mut Self;
14290 fn take_or_borrow<'a>(
14291 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14292 ) -> Self::Borrowed<'a> {
14293 value
14294 }
14295 }
14296
14297 unsafe impl fidl::encoding::TypeMarker for UnionOfHandle {
14298 type Owned = Self;
14299
14300 #[inline(always)]
14301 fn inline_align(_context: fidl::encoding::Context) -> usize {
14302 8
14303 }
14304
14305 #[inline(always)]
14306 fn inline_size(_context: fidl::encoding::Context) -> usize {
14307 16
14308 }
14309 }
14310
14311 unsafe impl fidl::encoding::Encode<UnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
14312 for &mut UnionOfHandle
14313 {
14314 #[inline]
14315 unsafe fn encode(
14316 self,
14317 encoder: &mut fidl::encoding::Encoder<
14318 '_,
14319 fidl::encoding::DefaultFuchsiaResourceDialect,
14320 >,
14321 offset: usize,
14322 _depth: fidl::encoding::Depth,
14323 ) -> fidl::Result<()> {
14324 encoder.debug_check_bounds::<UnionOfHandle>(offset);
14325 encoder.write_num::<u64>(self.ordinal(), offset);
14326 match self {
14327 UnionOfHandle::H(ref mut val) => fidl::encoding::encode_in_envelope::<
14328 fidl::encoding::HandleType<
14329 fidl::Handle,
14330 { fidl::ObjectType::NONE.into_raw() },
14331 2147483648,
14332 >,
14333 fidl::encoding::DefaultFuchsiaResourceDialect,
14334 >(
14335 <fidl::encoding::HandleType<
14336 fidl::Handle,
14337 { fidl::ObjectType::NONE.into_raw() },
14338 2147483648,
14339 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14340 val
14341 ),
14342 encoder,
14343 offset + 8,
14344 _depth,
14345 ),
14346 }
14347 }
14348 }
14349
14350 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {
14351 #[inline(always)]
14352 fn new_empty() -> Self {
14353 Self::H(
14354 fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14355 )
14356 }
14357
14358 #[inline]
14359 unsafe fn decode(
14360 &mut self,
14361 decoder: &mut fidl::encoding::Decoder<
14362 '_,
14363 fidl::encoding::DefaultFuchsiaResourceDialect,
14364 >,
14365 offset: usize,
14366 mut depth: fidl::encoding::Depth,
14367 ) -> fidl::Result<()> {
14368 decoder.debug_check_bounds::<Self>(offset);
14369 #[allow(unused_variables)]
14370 let next_out_of_line = decoder.next_out_of_line();
14371 let handles_before = decoder.remaining_handles();
14372 let (ordinal, inlined, num_bytes, num_handles) =
14373 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14374
14375 let member_inline_size = match ordinal {
14376 1 => <fidl::encoding::HandleType<
14377 fidl::Handle,
14378 { fidl::ObjectType::NONE.into_raw() },
14379 2147483648,
14380 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14381 _ => return Err(fidl::Error::UnknownUnionTag),
14382 };
14383
14384 if inlined != (member_inline_size <= 4) {
14385 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14386 }
14387 let _inner_offset;
14388 if inlined {
14389 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14390 _inner_offset = offset + 8;
14391 } else {
14392 depth.increment()?;
14393 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14394 }
14395 match ordinal {
14396 1 => {
14397 #[allow(irrefutable_let_patterns)]
14398 if let UnionOfHandle::H(_) = self {
14399 } else {
14401 *self = UnionOfHandle::H(
14403 fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14404 );
14405 }
14406 #[allow(irrefutable_let_patterns)]
14407 if let UnionOfHandle::H(ref mut val) = self {
14408 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14409 } else {
14410 unreachable!()
14411 }
14412 }
14413 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14414 }
14415 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14416 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14417 }
14418 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14419 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14420 }
14421 Ok(())
14422 }
14423 }
14424
14425 impl fidl::encoding::ResourceTypeMarker for UnionWithVector {
14426 type Borrowed<'a> = &'a mut Self;
14427 fn take_or_borrow<'a>(
14428 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14429 ) -> Self::Borrowed<'a> {
14430 value
14431 }
14432 }
14433
14434 unsafe impl fidl::encoding::TypeMarker for UnionWithVector {
14435 type Owned = Self;
14436
14437 #[inline(always)]
14438 fn inline_align(_context: fidl::encoding::Context) -> usize {
14439 8
14440 }
14441
14442 #[inline(always)]
14443 fn inline_size(_context: fidl::encoding::Context) -> usize {
14444 16
14445 }
14446 }
14447
14448 unsafe impl
14449 fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>
14450 for &mut UnionWithVector
14451 {
14452 #[inline]
14453 unsafe fn encode(
14454 self,
14455 encoder: &mut fidl::encoding::Encoder<
14456 '_,
14457 fidl::encoding::DefaultFuchsiaResourceDialect,
14458 >,
14459 offset: usize,
14460 _depth: fidl::encoding::Depth,
14461 ) -> fidl::Result<()> {
14462 encoder.debug_check_bounds::<UnionWithVector>(offset);
14463 encoder.write_num::<u64>(self.ordinal(), offset);
14464 match self {
14465 UnionWithVector::Unused(ref val) => {
14466 fidl::encoding::encode_in_envelope::<u8, fidl::encoding::DefaultFuchsiaResourceDialect>(
14467 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
14468 encoder, offset + 8, _depth
14469 )
14470 }
14471 UnionWithVector::VectorOfUint8(ref val) => {
14472 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14473 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(val),
14474 encoder, offset + 8, _depth
14475 )
14476 }
14477 UnionWithVector::S(ref val) => {
14478 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, fidl::encoding::DefaultFuchsiaResourceDialect>(
14479 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
14480 encoder, offset + 8, _depth
14481 )
14482 }
14483 UnionWithVector::VectorS3A1(ref val) => {
14484 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align1>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14485 <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::ValueTypeMarker>::borrow(val),
14486 encoder, offset + 8, _depth
14487 )
14488 }
14489 UnionWithVector::VectorS3A2(ref val) => {
14490 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14491 <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14492 encoder, offset + 8, _depth
14493 )
14494 }
14495 UnionWithVector::Handles(ref mut val) => {
14496 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14497 <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14498 encoder, offset + 8, _depth
14499 )
14500 }
14501 UnionWithVector::ArrayS3A1(ref val) => {
14502 fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14503 <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14504 encoder, offset + 8, _depth
14505 )
14506 }
14507 UnionWithVector::ArrayS3A2(ref val) => {
14508 fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14509 <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14510 encoder, offset + 8, _depth
14511 )
14512 }
14513 UnionWithVector::VectorUnion(ref val) => {
14514 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<UnionSize8Align4>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14515 <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(val),
14516 encoder, offset + 8, _depth
14517 )
14518 }
14519 }
14520 }
14521 }
14522
14523 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14524 for UnionWithVector
14525 {
14526 #[inline(always)]
14527 fn new_empty() -> Self {
14528 Self::Unused(fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect))
14529 }
14530
14531 #[inline]
14532 unsafe fn decode(
14533 &mut self,
14534 decoder: &mut fidl::encoding::Decoder<
14535 '_,
14536 fidl::encoding::DefaultFuchsiaResourceDialect,
14537 >,
14538 offset: usize,
14539 mut depth: fidl::encoding::Depth,
14540 ) -> fidl::Result<()> {
14541 decoder.debug_check_bounds::<Self>(offset);
14542 #[allow(unused_variables)]
14543 let next_out_of_line = decoder.next_out_of_line();
14544 let handles_before = decoder.remaining_handles();
14545 let (ordinal, inlined, num_bytes, num_handles) =
14546 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14547
14548 let member_inline_size = match ordinal {
14549 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14550 2 => <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14551 3 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14552 4 => <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14553 5 => <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14554 6 => <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14555 7 => <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14556 8 => <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14557 9 => <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14558 _ => return Err(fidl::Error::UnknownUnionTag),
14559 };
14560
14561 if inlined != (member_inline_size <= 4) {
14562 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14563 }
14564 let _inner_offset;
14565 if inlined {
14566 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14567 _inner_offset = offset + 8;
14568 } else {
14569 depth.increment()?;
14570 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14571 }
14572 match ordinal {
14573 1 => {
14574 #[allow(irrefutable_let_patterns)]
14575 if let UnionWithVector::Unused(_) = self {
14576 } else {
14578 *self = UnionWithVector::Unused(fidl::new_empty!(
14580 u8,
14581 fidl::encoding::DefaultFuchsiaResourceDialect
14582 ));
14583 }
14584 #[allow(irrefutable_let_patterns)]
14585 if let UnionWithVector::Unused(ref mut val) = self {
14586 fidl::decode!(
14587 u8,
14588 fidl::encoding::DefaultFuchsiaResourceDialect,
14589 val,
14590 decoder,
14591 _inner_offset,
14592 depth
14593 )?;
14594 } else {
14595 unreachable!()
14596 }
14597 }
14598 2 => {
14599 #[allow(irrefutable_let_patterns)]
14600 if let UnionWithVector::VectorOfUint8(_) = self {
14601 } else {
14603 *self = UnionWithVector::VectorOfUint8(fidl::new_empty!(
14605 fidl::encoding::UnboundedVector<u8>,
14606 fidl::encoding::DefaultFuchsiaResourceDialect
14607 ));
14608 }
14609 #[allow(irrefutable_let_patterns)]
14610 if let UnionWithVector::VectorOfUint8(ref mut val) = self {
14611 fidl::decode!(
14612 fidl::encoding::UnboundedVector<u8>,
14613 fidl::encoding::DefaultFuchsiaResourceDialect,
14614 val,
14615 decoder,
14616 _inner_offset,
14617 depth
14618 )?;
14619 } else {
14620 unreachable!()
14621 }
14622 }
14623 3 => {
14624 #[allow(irrefutable_let_patterns)]
14625 if let UnionWithVector::S(_) = self {
14626 } else {
14628 *self = UnionWithVector::S(fidl::new_empty!(
14630 fidl::encoding::UnboundedString,
14631 fidl::encoding::DefaultFuchsiaResourceDialect
14632 ));
14633 }
14634 #[allow(irrefutable_let_patterns)]
14635 if let UnionWithVector::S(ref mut val) = self {
14636 fidl::decode!(
14637 fidl::encoding::UnboundedString,
14638 fidl::encoding::DefaultFuchsiaResourceDialect,
14639 val,
14640 decoder,
14641 _inner_offset,
14642 depth
14643 )?;
14644 } else {
14645 unreachable!()
14646 }
14647 }
14648 4 => {
14649 #[allow(irrefutable_let_patterns)]
14650 if let UnionWithVector::VectorS3A1(_) = self {
14651 } else {
14653 *self = UnionWithVector::VectorS3A1(fidl::new_empty!(
14655 fidl::encoding::UnboundedVector<StructSize3Align1>,
14656 fidl::encoding::DefaultFuchsiaResourceDialect
14657 ));
14658 }
14659 #[allow(irrefutable_let_patterns)]
14660 if let UnionWithVector::VectorS3A1(ref mut val) = self {
14661 fidl::decode!(
14662 fidl::encoding::UnboundedVector<StructSize3Align1>,
14663 fidl::encoding::DefaultFuchsiaResourceDialect,
14664 val,
14665 decoder,
14666 _inner_offset,
14667 depth
14668 )?;
14669 } else {
14670 unreachable!()
14671 }
14672 }
14673 5 => {
14674 #[allow(irrefutable_let_patterns)]
14675 if let UnionWithVector::VectorS3A2(_) = self {
14676 } else {
14678 *self = UnionWithVector::VectorS3A2(fidl::new_empty!(
14680 fidl::encoding::UnboundedVector<StructSize3Align2>,
14681 fidl::encoding::DefaultFuchsiaResourceDialect
14682 ));
14683 }
14684 #[allow(irrefutable_let_patterns)]
14685 if let UnionWithVector::VectorS3A2(ref mut val) = self {
14686 fidl::decode!(
14687 fidl::encoding::UnboundedVector<StructSize3Align2>,
14688 fidl::encoding::DefaultFuchsiaResourceDialect,
14689 val,
14690 decoder,
14691 _inner_offset,
14692 depth
14693 )?;
14694 } else {
14695 unreachable!()
14696 }
14697 }
14698 6 => {
14699 #[allow(irrefutable_let_patterns)]
14700 if let UnionWithVector::Handles(_) = self {
14701 } else {
14703 *self = UnionWithVector::Handles(fidl::new_empty!(
14705 fidl::encoding::UnboundedVector<
14706 fidl::encoding::HandleType<
14707 fidl::Handle,
14708 { fidl::ObjectType::NONE.into_raw() },
14709 2147483648,
14710 >,
14711 >,
14712 fidl::encoding::DefaultFuchsiaResourceDialect
14713 ));
14714 }
14715 #[allow(irrefutable_let_patterns)]
14716 if let UnionWithVector::Handles(ref mut val) = self {
14717 fidl::decode!(
14718 fidl::encoding::UnboundedVector<
14719 fidl::encoding::HandleType<
14720 fidl::Handle,
14721 { fidl::ObjectType::NONE.into_raw() },
14722 2147483648,
14723 >,
14724 >,
14725 fidl::encoding::DefaultFuchsiaResourceDialect,
14726 val,
14727 decoder,
14728 _inner_offset,
14729 depth
14730 )?;
14731 } else {
14732 unreachable!()
14733 }
14734 }
14735 7 => {
14736 #[allow(irrefutable_let_patterns)]
14737 if let UnionWithVector::ArrayS3A1(_) = self {
14738 } else {
14740 *self = UnionWithVector::ArrayS3A1(
14742 fidl::new_empty!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14743 );
14744 }
14745 #[allow(irrefutable_let_patterns)]
14746 if let UnionWithVector::ArrayS3A1(ref mut val) = self {
14747 fidl::decode!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14748 } else {
14749 unreachable!()
14750 }
14751 }
14752 8 => {
14753 #[allow(irrefutable_let_patterns)]
14754 if let UnionWithVector::ArrayS3A2(_) = self {
14755 } else {
14757 *self = UnionWithVector::ArrayS3A2(
14759 fidl::new_empty!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14760 );
14761 }
14762 #[allow(irrefutable_let_patterns)]
14763 if let UnionWithVector::ArrayS3A2(ref mut val) = self {
14764 fidl::decode!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14765 } else {
14766 unreachable!()
14767 }
14768 }
14769 9 => {
14770 #[allow(irrefutable_let_patterns)]
14771 if let UnionWithVector::VectorUnion(_) = self {
14772 } else {
14774 *self = UnionWithVector::VectorUnion(fidl::new_empty!(
14776 fidl::encoding::UnboundedVector<UnionSize8Align4>,
14777 fidl::encoding::DefaultFuchsiaResourceDialect
14778 ));
14779 }
14780 #[allow(irrefutable_let_patterns)]
14781 if let UnionWithVector::VectorUnion(ref mut val) = self {
14782 fidl::decode!(
14783 fidl::encoding::UnboundedVector<UnionSize8Align4>,
14784 fidl::encoding::DefaultFuchsiaResourceDialect,
14785 val,
14786 decoder,
14787 _inner_offset,
14788 depth
14789 )?;
14790 } else {
14791 unreachable!()
14792 }
14793 }
14794 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14795 }
14796 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14797 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14798 }
14799 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14800 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14801 }
14802 Ok(())
14803 }
14804 }
14805
14806 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14807 type Borrowed<'a> = &'a mut Self;
14808 fn take_or_borrow<'a>(
14809 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14810 ) -> Self::Borrowed<'a> {
14811 value
14812 }
14813 }
14814
14815 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14816 type Owned = Self;
14817
14818 #[inline(always)]
14819 fn inline_align(_context: fidl::encoding::Context) -> usize {
14820 8
14821 }
14822
14823 #[inline(always)]
14824 fn inline_size(_context: fidl::encoding::Context) -> usize {
14825 16
14826 }
14827 }
14828
14829 unsafe impl
14830 fidl::encoding::Encode<
14831 VectorOfArrayOfEventInUnionWithReducedRights,
14832 fidl::encoding::DefaultFuchsiaResourceDialect,
14833 > for &mut VectorOfArrayOfEventInUnionWithReducedRights
14834 {
14835 #[inline]
14836 unsafe fn encode(
14837 self,
14838 encoder: &mut fidl::encoding::Encoder<
14839 '_,
14840 fidl::encoding::DefaultFuchsiaResourceDialect,
14841 >,
14842 offset: usize,
14843 _depth: fidl::encoding::Depth,
14844 ) -> fidl::Result<()> {
14845 encoder.debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRights>(offset);
14846 encoder.write_num::<u64>(self.ordinal(), offset);
14847 match self {
14848 VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) => {
14849 fidl::encoding::encode_in_envelope::<
14850 fidl::encoding::Vector<
14851 fidl::encoding::Array<
14852 fidl::encoding::HandleType<
14853 fidl::Event,
14854 { fidl::ObjectType::EVENT.into_raw() },
14855 49155,
14856 >,
14857 1,
14858 >,
14859 1,
14860 >,
14861 fidl::encoding::DefaultFuchsiaResourceDialect,
14862 >(
14863 <fidl::encoding::Vector<
14864 fidl::encoding::Array<
14865 fidl::encoding::HandleType<
14866 fidl::Event,
14867 { fidl::ObjectType::EVENT.into_raw() },
14868 49155,
14869 >,
14870 1,
14871 >,
14872 1,
14873 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14874 val
14875 ),
14876 encoder,
14877 offset + 8,
14878 _depth,
14879 )
14880 }
14881 }
14882 }
14883 }
14884
14885 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14886 for VectorOfArrayOfEventInUnionWithReducedRights
14887 {
14888 #[inline(always)]
14889 fn new_empty() -> Self {
14890 Self::H(fidl::new_empty!(
14891 fidl::encoding::Vector<
14892 fidl::encoding::Array<
14893 fidl::encoding::HandleType<
14894 fidl::Event,
14895 { fidl::ObjectType::EVENT.into_raw() },
14896 49155,
14897 >,
14898 1,
14899 >,
14900 1,
14901 >,
14902 fidl::encoding::DefaultFuchsiaResourceDialect
14903 ))
14904 }
14905
14906 #[inline]
14907 unsafe fn decode(
14908 &mut self,
14909 decoder: &mut fidl::encoding::Decoder<
14910 '_,
14911 fidl::encoding::DefaultFuchsiaResourceDialect,
14912 >,
14913 offset: usize,
14914 mut depth: fidl::encoding::Depth,
14915 ) -> fidl::Result<()> {
14916 decoder.debug_check_bounds::<Self>(offset);
14917 #[allow(unused_variables)]
14918 let next_out_of_line = decoder.next_out_of_line();
14919 let handles_before = decoder.remaining_handles();
14920 let (ordinal, inlined, num_bytes, num_handles) =
14921 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14922
14923 let member_inline_size = match ordinal {
14924 1 => <fidl::encoding::Vector<
14925 fidl::encoding::Array<
14926 fidl::encoding::HandleType<
14927 fidl::Event,
14928 { fidl::ObjectType::EVENT.into_raw() },
14929 49155,
14930 >,
14931 1,
14932 >,
14933 1,
14934 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14935 _ => return Err(fidl::Error::UnknownUnionTag),
14936 };
14937
14938 if inlined != (member_inline_size <= 4) {
14939 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14940 }
14941 let _inner_offset;
14942 if inlined {
14943 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14944 _inner_offset = offset + 8;
14945 } else {
14946 depth.increment()?;
14947 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14948 }
14949 match ordinal {
14950 1 => {
14951 #[allow(irrefutable_let_patterns)]
14952 if let VectorOfArrayOfEventInUnionWithReducedRights::H(_) = self {
14953 } else {
14955 *self = VectorOfArrayOfEventInUnionWithReducedRights::H(fidl::new_empty!(
14957 fidl::encoding::Vector<
14958 fidl::encoding::Array<
14959 fidl::encoding::HandleType<
14960 fidl::Event,
14961 { fidl::ObjectType::EVENT.into_raw() },
14962 49155,
14963 >,
14964 1,
14965 >,
14966 1,
14967 >,
14968 fidl::encoding::DefaultFuchsiaResourceDialect
14969 ));
14970 }
14971 #[allow(irrefutable_let_patterns)]
14972 if let VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) = self {
14973 fidl::decode!(
14974 fidl::encoding::Vector<
14975 fidl::encoding::Array<
14976 fidl::encoding::HandleType<
14977 fidl::Event,
14978 { fidl::ObjectType::EVENT.into_raw() },
14979 49155,
14980 >,
14981 1,
14982 >,
14983 1,
14984 >,
14985 fidl::encoding::DefaultFuchsiaResourceDialect,
14986 val,
14987 decoder,
14988 _inner_offset,
14989 depth
14990 )?;
14991 } else {
14992 unreachable!()
14993 }
14994 }
14995 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14996 }
14997 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14998 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14999 }
15000 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15001 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15002 }
15003 Ok(())
15004 }
15005 }
15006}