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 >
3763 fidl::encoding::Encode<BoxOfSingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
3764 for (T0,)
3765 {
3766 #[inline]
3767 unsafe fn encode(
3768 self,
3769 encoder: &mut fidl::encoding::Encoder<
3770 '_,
3771 fidl::encoding::DefaultFuchsiaResourceDialect,
3772 >,
3773 offset: usize,
3774 depth: fidl::encoding::Depth,
3775 ) -> fidl::Result<()> {
3776 encoder.debug_check_bounds::<BoxOfSingleHandle>(offset);
3777 self.0.encode(encoder, offset + 0, depth)?;
3781 Ok(())
3782 }
3783 }
3784
3785 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3786 for BoxOfSingleHandle
3787 {
3788 #[inline(always)]
3789 fn new_empty() -> Self {
3790 Self {
3791 b: fidl::new_empty!(
3792 fidl::encoding::Boxed<SingleHandle>,
3793 fidl::encoding::DefaultFuchsiaResourceDialect
3794 ),
3795 }
3796 }
3797
3798 #[inline]
3799 unsafe fn decode(
3800 &mut self,
3801 decoder: &mut fidl::encoding::Decoder<
3802 '_,
3803 fidl::encoding::DefaultFuchsiaResourceDialect,
3804 >,
3805 offset: usize,
3806 _depth: fidl::encoding::Depth,
3807 ) -> fidl::Result<()> {
3808 decoder.debug_check_bounds::<Self>(offset);
3809 fidl::decode!(
3811 fidl::encoding::Boxed<SingleHandle>,
3812 fidl::encoding::DefaultFuchsiaResourceDialect,
3813 &mut self.b,
3814 decoder,
3815 offset + 0,
3816 _depth
3817 )?;
3818 Ok(())
3819 }
3820 }
3821
3822 impl fidl::encoding::ResourceTypeMarker for BoxOfSingleOptionalHandle {
3823 type Borrowed<'a> = &'a mut Self;
3824 fn take_or_borrow<'a>(
3825 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3826 ) -> Self::Borrowed<'a> {
3827 value
3828 }
3829 }
3830
3831 unsafe impl fidl::encoding::TypeMarker for BoxOfSingleOptionalHandle {
3832 type Owned = Self;
3833
3834 #[inline(always)]
3835 fn inline_align(_context: fidl::encoding::Context) -> usize {
3836 8
3837 }
3838
3839 #[inline(always)]
3840 fn inline_size(_context: fidl::encoding::Context) -> usize {
3841 8
3842 }
3843 }
3844
3845 unsafe impl
3846 fidl::encoding::Encode<
3847 BoxOfSingleOptionalHandle,
3848 fidl::encoding::DefaultFuchsiaResourceDialect,
3849 > for &mut BoxOfSingleOptionalHandle
3850 {
3851 #[inline]
3852 unsafe fn encode(
3853 self,
3854 encoder: &mut fidl::encoding::Encoder<
3855 '_,
3856 fidl::encoding::DefaultFuchsiaResourceDialect,
3857 >,
3858 offset: usize,
3859 _depth: fidl::encoding::Depth,
3860 ) -> fidl::Result<()> {
3861 encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3862 fidl::encoding::Encode::<BoxOfSingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3864 (
3865 <fidl::encoding::Boxed<SingleOptionalHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.b),
3866 ),
3867 encoder, offset, _depth
3868 )
3869 }
3870 }
3871 unsafe impl<
3872 T0: fidl::encoding::Encode<
3873 fidl::encoding::Boxed<SingleOptionalHandle>,
3874 fidl::encoding::DefaultFuchsiaResourceDialect,
3875 >,
3876 >
3877 fidl::encoding::Encode<
3878 BoxOfSingleOptionalHandle,
3879 fidl::encoding::DefaultFuchsiaResourceDialect,
3880 > for (T0,)
3881 {
3882 #[inline]
3883 unsafe fn encode(
3884 self,
3885 encoder: &mut fidl::encoding::Encoder<
3886 '_,
3887 fidl::encoding::DefaultFuchsiaResourceDialect,
3888 >,
3889 offset: usize,
3890 depth: fidl::encoding::Depth,
3891 ) -> fidl::Result<()> {
3892 encoder.debug_check_bounds::<BoxOfSingleOptionalHandle>(offset);
3893 self.0.encode(encoder, offset + 0, depth)?;
3897 Ok(())
3898 }
3899 }
3900
3901 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3902 for BoxOfSingleOptionalHandle
3903 {
3904 #[inline(always)]
3905 fn new_empty() -> Self {
3906 Self {
3907 b: fidl::new_empty!(
3908 fidl::encoding::Boxed<SingleOptionalHandle>,
3909 fidl::encoding::DefaultFuchsiaResourceDialect
3910 ),
3911 }
3912 }
3913
3914 #[inline]
3915 unsafe fn decode(
3916 &mut self,
3917 decoder: &mut fidl::encoding::Decoder<
3918 '_,
3919 fidl::encoding::DefaultFuchsiaResourceDialect,
3920 >,
3921 offset: usize,
3922 _depth: fidl::encoding::Depth,
3923 ) -> fidl::Result<()> {
3924 decoder.debug_check_bounds::<Self>(offset);
3925 fidl::decode!(
3927 fidl::encoding::Boxed<SingleOptionalHandle>,
3928 fidl::encoding::DefaultFuchsiaResourceDialect,
3929 &mut self.b,
3930 decoder,
3931 offset + 0,
3932 _depth
3933 )?;
3934 Ok(())
3935 }
3936 }
3937
3938 impl fidl::encoding::ResourceTypeMarker for CreateComponentRequest {
3939 type Borrowed<'a> = &'a mut Self;
3940 fn take_or_borrow<'a>(
3941 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3942 ) -> Self::Borrowed<'a> {
3943 value
3944 }
3945 }
3946
3947 unsafe impl fidl::encoding::TypeMarker for CreateComponentRequest {
3948 type Owned = Self;
3949
3950 #[inline(always)]
3951 fn inline_align(_context: fidl::encoding::Context) -> usize {
3952 8
3953 }
3954
3955 #[inline(always)]
3956 fn inline_size(_context: fidl::encoding::Context) -> usize {
3957 80
3958 }
3959 }
3960
3961 unsafe impl
3962 fidl::encoding::Encode<
3963 CreateComponentRequest,
3964 fidl::encoding::DefaultFuchsiaResourceDialect,
3965 > for &mut CreateComponentRequest
3966 {
3967 #[inline]
3968 unsafe fn encode(
3969 self,
3970 encoder: &mut fidl::encoding::Encoder<
3971 '_,
3972 fidl::encoding::DefaultFuchsiaResourceDialect,
3973 >,
3974 offset: usize,
3975 _depth: fidl::encoding::Depth,
3976 ) -> fidl::Result<()> {
3977 encoder.debug_check_bounds::<CreateComponentRequest>(offset);
3978 fidl::encoding::Encode::<
3980 CreateComponentRequest,
3981 fidl::encoding::DefaultFuchsiaResourceDialect,
3982 >::encode(
3983 (
3984 <LaunchInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3985 &mut self.launch_info,
3986 ),
3987 <fidl::encoding::Optional<
3988 fidl::encoding::Endpoint<
3989 fidl::endpoints::ServerEnd<ComponentControllerMarker>,
3990 >,
3991 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
3992 &mut self.controller
3993 ),
3994 ),
3995 encoder,
3996 offset,
3997 _depth,
3998 )
3999 }
4000 }
4001 unsafe impl<
4002 T0: fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>,
4003 T1: fidl::encoding::Encode<
4004 fidl::encoding::Optional<
4005 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4006 >,
4007 fidl::encoding::DefaultFuchsiaResourceDialect,
4008 >,
4009 >
4010 fidl::encoding::Encode<
4011 CreateComponentRequest,
4012 fidl::encoding::DefaultFuchsiaResourceDialect,
4013 > for (T0, T1)
4014 {
4015 #[inline]
4016 unsafe fn encode(
4017 self,
4018 encoder: &mut fidl::encoding::Encoder<
4019 '_,
4020 fidl::encoding::DefaultFuchsiaResourceDialect,
4021 >,
4022 offset: usize,
4023 depth: fidl::encoding::Depth,
4024 ) -> fidl::Result<()> {
4025 encoder.debug_check_bounds::<CreateComponentRequest>(offset);
4026 unsafe {
4029 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
4030 (ptr as *mut u64).write_unaligned(0);
4031 }
4032 self.0.encode(encoder, offset + 0, depth)?;
4034 self.1.encode(encoder, offset + 72, depth)?;
4035 Ok(())
4036 }
4037 }
4038
4039 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4040 for CreateComponentRequest
4041 {
4042 #[inline(always)]
4043 fn new_empty() -> Self {
4044 Self {
4045 launch_info: fidl::new_empty!(
4046 LaunchInfo,
4047 fidl::encoding::DefaultFuchsiaResourceDialect
4048 ),
4049 controller: fidl::new_empty!(
4050 fidl::encoding::Optional<
4051 fidl::encoding::Endpoint<
4052 fidl::endpoints::ServerEnd<ComponentControllerMarker>,
4053 >,
4054 >,
4055 fidl::encoding::DefaultFuchsiaResourceDialect
4056 ),
4057 }
4058 }
4059
4060 #[inline]
4061 unsafe fn decode(
4062 &mut self,
4063 decoder: &mut fidl::encoding::Decoder<
4064 '_,
4065 fidl::encoding::DefaultFuchsiaResourceDialect,
4066 >,
4067 offset: usize,
4068 _depth: fidl::encoding::Depth,
4069 ) -> fidl::Result<()> {
4070 decoder.debug_check_bounds::<Self>(offset);
4071 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
4073 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4074 let mask = 0xffffffff00000000u64;
4075 let maskedval = padval & mask;
4076 if maskedval != 0 {
4077 return Err(fidl::Error::NonZeroPadding {
4078 padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
4079 });
4080 }
4081 fidl::decode!(
4082 LaunchInfo,
4083 fidl::encoding::DefaultFuchsiaResourceDialect,
4084 &mut self.launch_info,
4085 decoder,
4086 offset + 0,
4087 _depth
4088 )?;
4089 fidl::decode!(
4090 fidl::encoding::Optional<
4091 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ComponentControllerMarker>>,
4092 >,
4093 fidl::encoding::DefaultFuchsiaResourceDialect,
4094 &mut self.controller,
4095 decoder,
4096 offset + 72,
4097 _depth
4098 )?;
4099 Ok(())
4100 }
4101 }
4102
4103 impl fidl::encoding::ResourceTypeMarker for EmptyResourceTableStruct {
4104 type Borrowed<'a> = &'a mut Self;
4105 fn take_or_borrow<'a>(
4106 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4107 ) -> Self::Borrowed<'a> {
4108 value
4109 }
4110 }
4111
4112 unsafe impl fidl::encoding::TypeMarker for EmptyResourceTableStruct {
4113 type Owned = Self;
4114
4115 #[inline(always)]
4116 fn inline_align(_context: fidl::encoding::Context) -> usize {
4117 8
4118 }
4119
4120 #[inline(always)]
4121 fn inline_size(_context: fidl::encoding::Context) -> usize {
4122 16
4123 }
4124 }
4125
4126 unsafe impl
4127 fidl::encoding::Encode<
4128 EmptyResourceTableStruct,
4129 fidl::encoding::DefaultFuchsiaResourceDialect,
4130 > for &mut EmptyResourceTableStruct
4131 {
4132 #[inline]
4133 unsafe fn encode(
4134 self,
4135 encoder: &mut fidl::encoding::Encoder<
4136 '_,
4137 fidl::encoding::DefaultFuchsiaResourceDialect,
4138 >,
4139 offset: usize,
4140 _depth: fidl::encoding::Depth,
4141 ) -> fidl::Result<()> {
4142 encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4143 fidl::encoding::Encode::<
4145 EmptyResourceTableStruct,
4146 fidl::encoding::DefaultFuchsiaResourceDialect,
4147 >::encode(
4148 (<EmptyResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4149 &mut self.table,
4150 ),),
4151 encoder,
4152 offset,
4153 _depth,
4154 )
4155 }
4156 }
4157 unsafe impl<
4158 T0: fidl::encoding::Encode<
4159 EmptyResourceTable,
4160 fidl::encoding::DefaultFuchsiaResourceDialect,
4161 >,
4162 >
4163 fidl::encoding::Encode<
4164 EmptyResourceTableStruct,
4165 fidl::encoding::DefaultFuchsiaResourceDialect,
4166 > for (T0,)
4167 {
4168 #[inline]
4169 unsafe fn encode(
4170 self,
4171 encoder: &mut fidl::encoding::Encoder<
4172 '_,
4173 fidl::encoding::DefaultFuchsiaResourceDialect,
4174 >,
4175 offset: usize,
4176 depth: fidl::encoding::Depth,
4177 ) -> fidl::Result<()> {
4178 encoder.debug_check_bounds::<EmptyResourceTableStruct>(offset);
4179 self.0.encode(encoder, offset + 0, depth)?;
4183 Ok(())
4184 }
4185 }
4186
4187 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4188 for EmptyResourceTableStruct
4189 {
4190 #[inline(always)]
4191 fn new_empty() -> Self {
4192 Self {
4193 table: fidl::new_empty!(
4194 EmptyResourceTable,
4195 fidl::encoding::DefaultFuchsiaResourceDialect
4196 ),
4197 }
4198 }
4199
4200 #[inline]
4201 unsafe fn decode(
4202 &mut self,
4203 decoder: &mut fidl::encoding::Decoder<
4204 '_,
4205 fidl::encoding::DefaultFuchsiaResourceDialect,
4206 >,
4207 offset: usize,
4208 _depth: fidl::encoding::Depth,
4209 ) -> fidl::Result<()> {
4210 decoder.debug_check_bounds::<Self>(offset);
4211 fidl::decode!(
4213 EmptyResourceTable,
4214 fidl::encoding::DefaultFuchsiaResourceDialect,
4215 &mut self.table,
4216 decoder,
4217 offset + 0,
4218 _depth
4219 )?;
4220 Ok(())
4221 }
4222 }
4223
4224 impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnionStruct {
4225 type Borrowed<'a> = &'a mut Self;
4226 fn take_or_borrow<'a>(
4227 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4228 ) -> Self::Borrowed<'a> {
4229 value
4230 }
4231 }
4232
4233 unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnionStruct {
4234 type Owned = Self;
4235
4236 #[inline(always)]
4237 fn inline_align(_context: fidl::encoding::Context) -> usize {
4238 8
4239 }
4240
4241 #[inline(always)]
4242 fn inline_size(_context: fidl::encoding::Context) -> usize {
4243 16
4244 }
4245 }
4246
4247 unsafe impl
4248 fidl::encoding::Encode<
4249 EnvelopeInliningTestUnionStruct,
4250 fidl::encoding::DefaultFuchsiaResourceDialect,
4251 > for &mut EnvelopeInliningTestUnionStruct
4252 {
4253 #[inline]
4254 unsafe fn encode(
4255 self,
4256 encoder: &mut fidl::encoding::Encoder<
4257 '_,
4258 fidl::encoding::DefaultFuchsiaResourceDialect,
4259 >,
4260 offset: usize,
4261 _depth: fidl::encoding::Depth,
4262 ) -> fidl::Result<()> {
4263 encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4264 fidl::encoding::Encode::<EnvelopeInliningTestUnionStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4266 (
4267 <EnvelopeInliningTestUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
4268 ),
4269 encoder, offset, _depth
4270 )
4271 }
4272 }
4273 unsafe impl<
4274 T0: fidl::encoding::Encode<
4275 EnvelopeInliningTestUnion,
4276 fidl::encoding::DefaultFuchsiaResourceDialect,
4277 >,
4278 >
4279 fidl::encoding::Encode<
4280 EnvelopeInliningTestUnionStruct,
4281 fidl::encoding::DefaultFuchsiaResourceDialect,
4282 > for (T0,)
4283 {
4284 #[inline]
4285 unsafe fn encode(
4286 self,
4287 encoder: &mut fidl::encoding::Encoder<
4288 '_,
4289 fidl::encoding::DefaultFuchsiaResourceDialect,
4290 >,
4291 offset: usize,
4292 depth: fidl::encoding::Depth,
4293 ) -> fidl::Result<()> {
4294 encoder.debug_check_bounds::<EnvelopeInliningTestUnionStruct>(offset);
4295 self.0.encode(encoder, offset + 0, depth)?;
4299 Ok(())
4300 }
4301 }
4302
4303 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4304 for EnvelopeInliningTestUnionStruct
4305 {
4306 #[inline(always)]
4307 fn new_empty() -> Self {
4308 Self {
4309 u: fidl::new_empty!(
4310 EnvelopeInliningTestUnion,
4311 fidl::encoding::DefaultFuchsiaResourceDialect
4312 ),
4313 }
4314 }
4315
4316 #[inline]
4317 unsafe fn decode(
4318 &mut self,
4319 decoder: &mut fidl::encoding::Decoder<
4320 '_,
4321 fidl::encoding::DefaultFuchsiaResourceDialect,
4322 >,
4323 offset: usize,
4324 _depth: fidl::encoding::Depth,
4325 ) -> fidl::Result<()> {
4326 decoder.debug_check_bounds::<Self>(offset);
4327 fidl::decode!(
4329 EnvelopeInliningTestUnion,
4330 fidl::encoding::DefaultFuchsiaResourceDialect,
4331 &mut self.u,
4332 decoder,
4333 offset + 0,
4334 _depth
4335 )?;
4336 Ok(())
4337 }
4338 }
4339
4340 impl fidl::encoding::ResourceTypeMarker for EventWithDefaultRights {
4341 type Borrowed<'a> = &'a mut Self;
4342 fn take_or_borrow<'a>(
4343 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4344 ) -> Self::Borrowed<'a> {
4345 value
4346 }
4347 }
4348
4349 unsafe impl fidl::encoding::TypeMarker for EventWithDefaultRights {
4350 type Owned = Self;
4351
4352 #[inline(always)]
4353 fn inline_align(_context: fidl::encoding::Context) -> usize {
4354 4
4355 }
4356
4357 #[inline(always)]
4358 fn inline_size(_context: fidl::encoding::Context) -> usize {
4359 4
4360 }
4361 }
4362
4363 unsafe impl
4364 fidl::encoding::Encode<
4365 EventWithDefaultRights,
4366 fidl::encoding::DefaultFuchsiaResourceDialect,
4367 > for &mut EventWithDefaultRights
4368 {
4369 #[inline]
4370 unsafe fn encode(
4371 self,
4372 encoder: &mut fidl::encoding::Encoder<
4373 '_,
4374 fidl::encoding::DefaultFuchsiaResourceDialect,
4375 >,
4376 offset: usize,
4377 _depth: fidl::encoding::Depth,
4378 ) -> fidl::Result<()> {
4379 encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4380 fidl::encoding::Encode::<
4382 EventWithDefaultRights,
4383 fidl::encoding::DefaultFuchsiaResourceDialect,
4384 >::encode(
4385 (<fidl::encoding::HandleType<
4386 fidl::Event,
4387 { fidl::ObjectType::EVENT.into_raw() },
4388 53251,
4389 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4390 &mut self.h
4391 ),),
4392 encoder,
4393 offset,
4394 _depth,
4395 )
4396 }
4397 }
4398 unsafe impl<
4399 T0: fidl::encoding::Encode<
4400 fidl::encoding::HandleType<
4401 fidl::Event,
4402 { fidl::ObjectType::EVENT.into_raw() },
4403 53251,
4404 >,
4405 fidl::encoding::DefaultFuchsiaResourceDialect,
4406 >,
4407 >
4408 fidl::encoding::Encode<
4409 EventWithDefaultRights,
4410 fidl::encoding::DefaultFuchsiaResourceDialect,
4411 > for (T0,)
4412 {
4413 #[inline]
4414 unsafe fn encode(
4415 self,
4416 encoder: &mut fidl::encoding::Encoder<
4417 '_,
4418 fidl::encoding::DefaultFuchsiaResourceDialect,
4419 >,
4420 offset: usize,
4421 depth: fidl::encoding::Depth,
4422 ) -> fidl::Result<()> {
4423 encoder.debug_check_bounds::<EventWithDefaultRights>(offset);
4424 self.0.encode(encoder, offset + 0, depth)?;
4428 Ok(())
4429 }
4430 }
4431
4432 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4433 for EventWithDefaultRights
4434 {
4435 #[inline(always)]
4436 fn new_empty() -> Self {
4437 Self {
4438 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect),
4439 }
4440 }
4441
4442 #[inline]
4443 unsafe fn decode(
4444 &mut self,
4445 decoder: &mut fidl::encoding::Decoder<
4446 '_,
4447 fidl::encoding::DefaultFuchsiaResourceDialect,
4448 >,
4449 offset: usize,
4450 _depth: fidl::encoding::Depth,
4451 ) -> fidl::Result<()> {
4452 decoder.debug_check_bounds::<Self>(offset);
4453 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 53251>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4455 Ok(())
4456 }
4457 }
4458
4459 impl fidl::encoding::ResourceTypeMarker for EventWithReducedRights {
4460 type Borrowed<'a> = &'a mut Self;
4461 fn take_or_borrow<'a>(
4462 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4463 ) -> Self::Borrowed<'a> {
4464 value
4465 }
4466 }
4467
4468 unsafe impl fidl::encoding::TypeMarker for EventWithReducedRights {
4469 type Owned = Self;
4470
4471 #[inline(always)]
4472 fn inline_align(_context: fidl::encoding::Context) -> usize {
4473 4
4474 }
4475
4476 #[inline(always)]
4477 fn inline_size(_context: fidl::encoding::Context) -> usize {
4478 4
4479 }
4480 }
4481
4482 unsafe impl
4483 fidl::encoding::Encode<
4484 EventWithReducedRights,
4485 fidl::encoding::DefaultFuchsiaResourceDialect,
4486 > for &mut EventWithReducedRights
4487 {
4488 #[inline]
4489 unsafe fn encode(
4490 self,
4491 encoder: &mut fidl::encoding::Encoder<
4492 '_,
4493 fidl::encoding::DefaultFuchsiaResourceDialect,
4494 >,
4495 offset: usize,
4496 _depth: fidl::encoding::Depth,
4497 ) -> fidl::Result<()> {
4498 encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4499 fidl::encoding::Encode::<
4501 EventWithReducedRights,
4502 fidl::encoding::DefaultFuchsiaResourceDialect,
4503 >::encode(
4504 (<fidl::encoding::HandleType<
4505 fidl::Event,
4506 { fidl::ObjectType::EVENT.into_raw() },
4507 49155,
4508 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4509 &mut self.h
4510 ),),
4511 encoder,
4512 offset,
4513 _depth,
4514 )
4515 }
4516 }
4517 unsafe impl<
4518 T0: fidl::encoding::Encode<
4519 fidl::encoding::HandleType<
4520 fidl::Event,
4521 { fidl::ObjectType::EVENT.into_raw() },
4522 49155,
4523 >,
4524 fidl::encoding::DefaultFuchsiaResourceDialect,
4525 >,
4526 >
4527 fidl::encoding::Encode<
4528 EventWithReducedRights,
4529 fidl::encoding::DefaultFuchsiaResourceDialect,
4530 > for (T0,)
4531 {
4532 #[inline]
4533 unsafe fn encode(
4534 self,
4535 encoder: &mut fidl::encoding::Encoder<
4536 '_,
4537 fidl::encoding::DefaultFuchsiaResourceDialect,
4538 >,
4539 offset: usize,
4540 depth: fidl::encoding::Depth,
4541 ) -> fidl::Result<()> {
4542 encoder.debug_check_bounds::<EventWithReducedRights>(offset);
4543 self.0.encode(encoder, offset + 0, depth)?;
4547 Ok(())
4548 }
4549 }
4550
4551 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4552 for EventWithReducedRights
4553 {
4554 #[inline(always)]
4555 fn new_empty() -> Self {
4556 Self {
4557 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
4558 }
4559 }
4560
4561 #[inline]
4562 unsafe fn decode(
4563 &mut self,
4564 decoder: &mut fidl::encoding::Decoder<
4565 '_,
4566 fidl::encoding::DefaultFuchsiaResourceDialect,
4567 >,
4568 offset: usize,
4569 _depth: fidl::encoding::Depth,
4570 ) -> fidl::Result<()> {
4571 decoder.debug_check_bounds::<Self>(offset);
4572 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
4574 Ok(())
4575 }
4576 }
4577
4578 impl fidl::encoding::ResourceTypeMarker for FidlvizDemo {
4579 type Borrowed<'a> = &'a mut Self;
4580 fn take_or_borrow<'a>(
4581 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4582 ) -> Self::Borrowed<'a> {
4583 value
4584 }
4585 }
4586
4587 unsafe impl fidl::encoding::TypeMarker for FidlvizDemo {
4588 type Owned = Self;
4589
4590 #[inline(always)]
4591 fn inline_align(_context: fidl::encoding::Context) -> usize {
4592 8
4593 }
4594
4595 #[inline(always)]
4596 fn inline_size(_context: fidl::encoding::Context) -> usize {
4597 248
4598 }
4599 }
4600
4601 unsafe impl fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4602 for &mut FidlvizDemo
4603 {
4604 #[inline]
4605 unsafe fn encode(
4606 self,
4607 encoder: &mut fidl::encoding::Encoder<
4608 '_,
4609 fidl::encoding::DefaultFuchsiaResourceDialect,
4610 >,
4611 offset: usize,
4612 _depth: fidl::encoding::Depth,
4613 ) -> fidl::Result<()> {
4614 encoder.debug_check_bounds::<FidlvizDemo>(offset);
4615 fidl::encoding::Encode::<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4617 (
4618 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
4619 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
4620 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
4621 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
4622 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
4623 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
4624 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
4625 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
4626 <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
4627 <f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f10),
4628 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f11),
4629 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.f12),
4630 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f13),
4631 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.f14),
4632 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.f15),
4633 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f16),
4634 <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.f17),
4635 <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.f18),
4636 <fidl::encoding::UnboundedVector<f64> as fidl::encoding::ValueTypeMarker>::borrow(&self.f19),
4637 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.f20),
4638 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.f21),
4639 <FidlvizBits as fidl::encoding::ValueTypeMarker>::borrow(&self.f22),
4640 <FidlvizEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.f23),
4641 <FidlvizStruct1 as fidl::encoding::ValueTypeMarker>::borrow(&self.f24),
4642 <FidlvizStruct2 as fidl::encoding::ValueTypeMarker>::borrow(&self.f25),
4643 <fidl::encoding::Boxed<FidlvizStruct1> as fidl::encoding::ValueTypeMarker>::borrow(&self.f26),
4644 <fidl::encoding::Boxed<FidlvizStruct2> as fidl::encoding::ValueTypeMarker>::borrow(&self.f27),
4645 <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f28),
4646 <FidlvizTable as fidl::encoding::ValueTypeMarker>::borrow(&self.f29),
4647 <fidl::encoding::OptionalUnion<FidlvizUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.f30),
4648 <FidlvizUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.f31),
4649 ),
4650 encoder, offset, _depth
4651 )
4652 }
4653 }
4654 unsafe impl<
4655 T0: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4656 T1: fidl::encoding::Encode<i8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4657 T2: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4658 T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4659 T4: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4660 T5: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4661 T6: fidl::encoding::Encode<u8, fidl::encoding::DefaultFuchsiaResourceDialect>,
4662 T7: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
4663 T8: fidl::encoding::Encode<f32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4664 T9: fidl::encoding::Encode<f64, fidl::encoding::DefaultFuchsiaResourceDialect>,
4665 T10: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4666 T11: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
4667 T12: fidl::encoding::Encode<
4668 fidl::encoding::UnboundedString,
4669 fidl::encoding::DefaultFuchsiaResourceDialect,
4670 >,
4671 T13: fidl::encoding::Encode<
4672 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4673 fidl::encoding::DefaultFuchsiaResourceDialect,
4674 >,
4675 T14: fidl::encoding::Encode<
4676 fidl::encoding::UnboundedString,
4677 fidl::encoding::DefaultFuchsiaResourceDialect,
4678 >,
4679 T15: fidl::encoding::Encode<
4680 fidl::encoding::Optional<
4681 fidl::encoding::HandleType<
4682 fidl::Handle,
4683 { fidl::ObjectType::NONE.into_raw() },
4684 2147483648,
4685 >,
4686 >,
4687 fidl::encoding::DefaultFuchsiaResourceDialect,
4688 >,
4689 T16: fidl::encoding::Encode<
4690 fidl::encoding::HandleType<
4691 fidl::Handle,
4692 { fidl::ObjectType::NONE.into_raw() },
4693 2147483648,
4694 >,
4695 fidl::encoding::DefaultFuchsiaResourceDialect,
4696 >,
4697 T17: fidl::encoding::Encode<
4698 fidl::encoding::Array<u8, 3>,
4699 fidl::encoding::DefaultFuchsiaResourceDialect,
4700 >,
4701 T18: fidl::encoding::Encode<
4702 fidl::encoding::UnboundedVector<f64>,
4703 fidl::encoding::DefaultFuchsiaResourceDialect,
4704 >,
4705 T19: fidl::encoding::Encode<
4706 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4707 fidl::encoding::DefaultFuchsiaResourceDialect,
4708 >,
4709 T20: fidl::encoding::Encode<
4710 fidl::encoding::UnboundedVector<u8>,
4711 fidl::encoding::DefaultFuchsiaResourceDialect,
4712 >,
4713 T21: fidl::encoding::Encode<FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect>,
4714 T22: fidl::encoding::Encode<FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect>,
4715 T23: fidl::encoding::Encode<FidlvizStruct1, fidl::encoding::DefaultFuchsiaResourceDialect>,
4716 T24: fidl::encoding::Encode<FidlvizStruct2, fidl::encoding::DefaultFuchsiaResourceDialect>,
4717 T25: fidl::encoding::Encode<
4718 fidl::encoding::Boxed<FidlvizStruct1>,
4719 fidl::encoding::DefaultFuchsiaResourceDialect,
4720 >,
4721 T26: fidl::encoding::Encode<
4722 fidl::encoding::Boxed<FidlvizStruct2>,
4723 fidl::encoding::DefaultFuchsiaResourceDialect,
4724 >,
4725 T27: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4726 T28: fidl::encoding::Encode<FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect>,
4727 T29: fidl::encoding::Encode<
4728 fidl::encoding::OptionalUnion<FidlvizUnion>,
4729 fidl::encoding::DefaultFuchsiaResourceDialect,
4730 >,
4731 T30: fidl::encoding::Encode<FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect>,
4732 > fidl::encoding::Encode<FidlvizDemo, fidl::encoding::DefaultFuchsiaResourceDialect>
4733 for (
4734 T0,
4735 T1,
4736 T2,
4737 T3,
4738 T4,
4739 T5,
4740 T6,
4741 T7,
4742 T8,
4743 T9,
4744 T10,
4745 T11,
4746 T12,
4747 T13,
4748 T14,
4749 T15,
4750 T16,
4751 T17,
4752 T18,
4753 T19,
4754 T20,
4755 T21,
4756 T22,
4757 T23,
4758 T24,
4759 T25,
4760 T26,
4761 T27,
4762 T28,
4763 T29,
4764 T30,
4765 )
4766 {
4767 #[inline]
4768 unsafe fn encode(
4769 self,
4770 encoder: &mut fidl::encoding::Encoder<
4771 '_,
4772 fidl::encoding::DefaultFuchsiaResourceDialect,
4773 >,
4774 offset: usize,
4775 depth: fidl::encoding::Depth,
4776 ) -> fidl::Result<()> {
4777 encoder.debug_check_bounds::<FidlvizDemo>(offset);
4778 unsafe {
4781 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4782 (ptr as *mut u64).write_unaligned(0);
4783 }
4784 unsafe {
4785 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
4786 (ptr as *mut u64).write_unaligned(0);
4787 }
4788 unsafe {
4789 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(152);
4790 (ptr as *mut u64).write_unaligned(0);
4791 }
4792 self.0.encode(encoder, offset + 0, depth)?;
4794 self.1.encode(encoder, offset + 1, depth)?;
4795 self.2.encode(encoder, offset + 2, depth)?;
4796 self.3.encode(encoder, offset + 4, depth)?;
4797 self.4.encode(encoder, offset + 8, depth)?;
4798 self.5.encode(encoder, offset + 16, depth)?;
4799 self.6.encode(encoder, offset + 17, depth)?;
4800 self.7.encode(encoder, offset + 18, depth)?;
4801 self.8.encode(encoder, offset + 20, depth)?;
4802 self.9.encode(encoder, offset + 24, depth)?;
4803 self.10.encode(encoder, offset + 32, depth)?;
4804 self.11.encode(encoder, offset + 33, depth)?;
4805 self.12.encode(encoder, offset + 40, depth)?;
4806 self.13.encode(encoder, offset + 56, depth)?;
4807 self.14.encode(encoder, offset + 72, depth)?;
4808 self.15.encode(encoder, offset + 88, depth)?;
4809 self.16.encode(encoder, offset + 92, depth)?;
4810 self.17.encode(encoder, offset + 96, depth)?;
4811 self.18.encode(encoder, offset + 104, depth)?;
4812 self.19.encode(encoder, offset + 120, depth)?;
4813 self.20.encode(encoder, offset + 136, depth)?;
4814 self.21.encode(encoder, offset + 152, depth)?;
4815 self.22.encode(encoder, offset + 153, depth)?;
4816 self.23.encode(encoder, offset + 154, depth)?;
4817 self.24.encode(encoder, offset + 160, depth)?;
4818 self.25.encode(encoder, offset + 168, depth)?;
4819 self.26.encode(encoder, offset + 176, depth)?;
4820 self.27.encode(encoder, offset + 184, depth)?;
4821 self.28.encode(encoder, offset + 200, depth)?;
4822 self.29.encode(encoder, offset + 216, depth)?;
4823 self.30.encode(encoder, offset + 232, depth)?;
4824 Ok(())
4825 }
4826 }
4827
4828 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FidlvizDemo {
4829 #[inline(always)]
4830 fn new_empty() -> Self {
4831 Self {
4832 f1: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4833 f2: fidl::new_empty!(i8, fidl::encoding::DefaultFuchsiaResourceDialect),
4834 f3: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4835 f4: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4836 f5: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
4837 f6: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4838 f7: fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect),
4839 f8: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
4840 f9: fidl::new_empty!(f32, fidl::encoding::DefaultFuchsiaResourceDialect),
4841 f10: fidl::new_empty!(f64, fidl::encoding::DefaultFuchsiaResourceDialect),
4842 f11: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4843 f12: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
4844 f13: fidl::new_empty!(
4845 fidl::encoding::UnboundedString,
4846 fidl::encoding::DefaultFuchsiaResourceDialect
4847 ),
4848 f14: fidl::new_empty!(
4849 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
4850 fidl::encoding::DefaultFuchsiaResourceDialect
4851 ),
4852 f15: fidl::new_empty!(
4853 fidl::encoding::UnboundedString,
4854 fidl::encoding::DefaultFuchsiaResourceDialect
4855 ),
4856 f16: fidl::new_empty!(
4857 fidl::encoding::Optional<
4858 fidl::encoding::HandleType<
4859 fidl::Handle,
4860 { fidl::ObjectType::NONE.into_raw() },
4861 2147483648,
4862 >,
4863 >,
4864 fidl::encoding::DefaultFuchsiaResourceDialect
4865 ),
4866 f17: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
4867 f18: fidl::new_empty!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect),
4868 f19: fidl::new_empty!(
4869 fidl::encoding::UnboundedVector<f64>,
4870 fidl::encoding::DefaultFuchsiaResourceDialect
4871 ),
4872 f20: fidl::new_empty!(
4873 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
4874 fidl::encoding::DefaultFuchsiaResourceDialect
4875 ),
4876 f21: fidl::new_empty!(
4877 fidl::encoding::UnboundedVector<u8>,
4878 fidl::encoding::DefaultFuchsiaResourceDialect
4879 ),
4880 f22: fidl::new_empty!(FidlvizBits, fidl::encoding::DefaultFuchsiaResourceDialect),
4881 f23: fidl::new_empty!(FidlvizEnum, fidl::encoding::DefaultFuchsiaResourceDialect),
4882 f24: fidl::new_empty!(
4883 FidlvizStruct1,
4884 fidl::encoding::DefaultFuchsiaResourceDialect
4885 ),
4886 f25: fidl::new_empty!(
4887 FidlvizStruct2,
4888 fidl::encoding::DefaultFuchsiaResourceDialect
4889 ),
4890 f26: fidl::new_empty!(
4891 fidl::encoding::Boxed<FidlvizStruct1>,
4892 fidl::encoding::DefaultFuchsiaResourceDialect
4893 ),
4894 f27: fidl::new_empty!(
4895 fidl::encoding::Boxed<FidlvizStruct2>,
4896 fidl::encoding::DefaultFuchsiaResourceDialect
4897 ),
4898 f28: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4899 f29: fidl::new_empty!(FidlvizTable, fidl::encoding::DefaultFuchsiaResourceDialect),
4900 f30: fidl::new_empty!(
4901 fidl::encoding::OptionalUnion<FidlvizUnion>,
4902 fidl::encoding::DefaultFuchsiaResourceDialect
4903 ),
4904 f31: fidl::new_empty!(FidlvizUnion, fidl::encoding::DefaultFuchsiaResourceDialect),
4905 }
4906 }
4907
4908 #[inline]
4909 unsafe fn decode(
4910 &mut self,
4911 decoder: &mut fidl::encoding::Decoder<
4912 '_,
4913 fidl::encoding::DefaultFuchsiaResourceDialect,
4914 >,
4915 offset: usize,
4916 _depth: fidl::encoding::Depth,
4917 ) -> fidl::Result<()> {
4918 decoder.debug_check_bounds::<Self>(offset);
4919 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4921 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4922 let mask = 0xffffffffffff0000u64;
4923 let maskedval = padval & mask;
4924 if maskedval != 0 {
4925 return Err(fidl::Error::NonZeroPadding {
4926 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4927 });
4928 }
4929 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
4930 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4931 let mask = 0xffffffffff000000u64;
4932 let maskedval = padval & mask;
4933 if maskedval != 0 {
4934 return Err(fidl::Error::NonZeroPadding {
4935 padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
4936 });
4937 }
4938 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(152) };
4939 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4940 let mask = 0xffffffffff000000u64;
4941 let maskedval = padval & mask;
4942 if maskedval != 0 {
4943 return Err(fidl::Error::NonZeroPadding {
4944 padding_start: offset + 152 + ((mask as u64).trailing_zeros() / 8) as usize,
4945 });
4946 }
4947 fidl::decode!(
4948 u8,
4949 fidl::encoding::DefaultFuchsiaResourceDialect,
4950 &mut self.f1,
4951 decoder,
4952 offset + 0,
4953 _depth
4954 )?;
4955 fidl::decode!(
4956 i8,
4957 fidl::encoding::DefaultFuchsiaResourceDialect,
4958 &mut self.f2,
4959 decoder,
4960 offset + 1,
4961 _depth
4962 )?;
4963 fidl::decode!(
4964 u16,
4965 fidl::encoding::DefaultFuchsiaResourceDialect,
4966 &mut self.f3,
4967 decoder,
4968 offset + 2,
4969 _depth
4970 )?;
4971 fidl::decode!(
4972 u32,
4973 fidl::encoding::DefaultFuchsiaResourceDialect,
4974 &mut self.f4,
4975 decoder,
4976 offset + 4,
4977 _depth
4978 )?;
4979 fidl::decode!(
4980 u64,
4981 fidl::encoding::DefaultFuchsiaResourceDialect,
4982 &mut self.f5,
4983 decoder,
4984 offset + 8,
4985 _depth
4986 )?;
4987 fidl::decode!(
4988 u8,
4989 fidl::encoding::DefaultFuchsiaResourceDialect,
4990 &mut self.f6,
4991 decoder,
4992 offset + 16,
4993 _depth
4994 )?;
4995 fidl::decode!(
4996 u8,
4997 fidl::encoding::DefaultFuchsiaResourceDialect,
4998 &mut self.f7,
4999 decoder,
5000 offset + 17,
5001 _depth
5002 )?;
5003 fidl::decode!(
5004 u16,
5005 fidl::encoding::DefaultFuchsiaResourceDialect,
5006 &mut self.f8,
5007 decoder,
5008 offset + 18,
5009 _depth
5010 )?;
5011 fidl::decode!(
5012 f32,
5013 fidl::encoding::DefaultFuchsiaResourceDialect,
5014 &mut self.f9,
5015 decoder,
5016 offset + 20,
5017 _depth
5018 )?;
5019 fidl::decode!(
5020 f64,
5021 fidl::encoding::DefaultFuchsiaResourceDialect,
5022 &mut self.f10,
5023 decoder,
5024 offset + 24,
5025 _depth
5026 )?;
5027 fidl::decode!(
5028 bool,
5029 fidl::encoding::DefaultFuchsiaResourceDialect,
5030 &mut self.f11,
5031 decoder,
5032 offset + 32,
5033 _depth
5034 )?;
5035 fidl::decode!(
5036 bool,
5037 fidl::encoding::DefaultFuchsiaResourceDialect,
5038 &mut self.f12,
5039 decoder,
5040 offset + 33,
5041 _depth
5042 )?;
5043 fidl::decode!(
5044 fidl::encoding::UnboundedString,
5045 fidl::encoding::DefaultFuchsiaResourceDialect,
5046 &mut self.f13,
5047 decoder,
5048 offset + 40,
5049 _depth
5050 )?;
5051 fidl::decode!(
5052 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5053 fidl::encoding::DefaultFuchsiaResourceDialect,
5054 &mut self.f14,
5055 decoder,
5056 offset + 56,
5057 _depth
5058 )?;
5059 fidl::decode!(
5060 fidl::encoding::UnboundedString,
5061 fidl::encoding::DefaultFuchsiaResourceDialect,
5062 &mut self.f15,
5063 decoder,
5064 offset + 72,
5065 _depth
5066 )?;
5067 fidl::decode!(
5068 fidl::encoding::Optional<
5069 fidl::encoding::HandleType<
5070 fidl::Handle,
5071 { fidl::ObjectType::NONE.into_raw() },
5072 2147483648,
5073 >,
5074 >,
5075 fidl::encoding::DefaultFuchsiaResourceDialect,
5076 &mut self.f16,
5077 decoder,
5078 offset + 88,
5079 _depth
5080 )?;
5081 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f17, decoder, offset + 92, _depth)?;
5082 fidl::decode!(fidl::encoding::Array<u8, 3>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.f18, decoder, offset + 96, _depth)?;
5083 fidl::decode!(
5084 fidl::encoding::UnboundedVector<f64>,
5085 fidl::encoding::DefaultFuchsiaResourceDialect,
5086 &mut self.f19,
5087 decoder,
5088 offset + 104,
5089 _depth
5090 )?;
5091 fidl::decode!(
5092 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
5093 fidl::encoding::DefaultFuchsiaResourceDialect,
5094 &mut self.f20,
5095 decoder,
5096 offset + 120,
5097 _depth
5098 )?;
5099 fidl::decode!(
5100 fidl::encoding::UnboundedVector<u8>,
5101 fidl::encoding::DefaultFuchsiaResourceDialect,
5102 &mut self.f21,
5103 decoder,
5104 offset + 136,
5105 _depth
5106 )?;
5107 fidl::decode!(
5108 FidlvizBits,
5109 fidl::encoding::DefaultFuchsiaResourceDialect,
5110 &mut self.f22,
5111 decoder,
5112 offset + 152,
5113 _depth
5114 )?;
5115 fidl::decode!(
5116 FidlvizEnum,
5117 fidl::encoding::DefaultFuchsiaResourceDialect,
5118 &mut self.f23,
5119 decoder,
5120 offset + 153,
5121 _depth
5122 )?;
5123 fidl::decode!(
5124 FidlvizStruct1,
5125 fidl::encoding::DefaultFuchsiaResourceDialect,
5126 &mut self.f24,
5127 decoder,
5128 offset + 154,
5129 _depth
5130 )?;
5131 fidl::decode!(
5132 FidlvizStruct2,
5133 fidl::encoding::DefaultFuchsiaResourceDialect,
5134 &mut self.f25,
5135 decoder,
5136 offset + 160,
5137 _depth
5138 )?;
5139 fidl::decode!(
5140 fidl::encoding::Boxed<FidlvizStruct1>,
5141 fidl::encoding::DefaultFuchsiaResourceDialect,
5142 &mut self.f26,
5143 decoder,
5144 offset + 168,
5145 _depth
5146 )?;
5147 fidl::decode!(
5148 fidl::encoding::Boxed<FidlvizStruct2>,
5149 fidl::encoding::DefaultFuchsiaResourceDialect,
5150 &mut self.f27,
5151 decoder,
5152 offset + 176,
5153 _depth
5154 )?;
5155 fidl::decode!(
5156 FidlvizTable,
5157 fidl::encoding::DefaultFuchsiaResourceDialect,
5158 &mut self.f28,
5159 decoder,
5160 offset + 184,
5161 _depth
5162 )?;
5163 fidl::decode!(
5164 FidlvizTable,
5165 fidl::encoding::DefaultFuchsiaResourceDialect,
5166 &mut self.f29,
5167 decoder,
5168 offset + 200,
5169 _depth
5170 )?;
5171 fidl::decode!(
5172 fidl::encoding::OptionalUnion<FidlvizUnion>,
5173 fidl::encoding::DefaultFuchsiaResourceDialect,
5174 &mut self.f30,
5175 decoder,
5176 offset + 216,
5177 _depth
5178 )?;
5179 fidl::decode!(
5180 FidlvizUnion,
5181 fidl::encoding::DefaultFuchsiaResourceDialect,
5182 &mut self.f31,
5183 decoder,
5184 offset + 232,
5185 _depth
5186 )?;
5187 Ok(())
5188 }
5189 }
5190
5191 impl fidl::encoding::ResourceTypeMarker for GoldenHandleBasicRightsStruct {
5192 type Borrowed<'a> = &'a mut Self;
5193 fn take_or_borrow<'a>(
5194 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5195 ) -> Self::Borrowed<'a> {
5196 value
5197 }
5198 }
5199
5200 unsafe impl fidl::encoding::TypeMarker for GoldenHandleBasicRightsStruct {
5201 type Owned = Self;
5202
5203 #[inline(always)]
5204 fn inline_align(_context: fidl::encoding::Context) -> usize {
5205 4
5206 }
5207
5208 #[inline(always)]
5209 fn inline_size(_context: fidl::encoding::Context) -> usize {
5210 4
5211 }
5212 }
5213
5214 unsafe impl
5215 fidl::encoding::Encode<
5216 GoldenHandleBasicRightsStruct,
5217 fidl::encoding::DefaultFuchsiaResourceDialect,
5218 > for &mut GoldenHandleBasicRightsStruct
5219 {
5220 #[inline]
5221 unsafe fn encode(
5222 self,
5223 encoder: &mut fidl::encoding::Encoder<
5224 '_,
5225 fidl::encoding::DefaultFuchsiaResourceDialect,
5226 >,
5227 offset: usize,
5228 _depth: fidl::encoding::Depth,
5229 ) -> fidl::Result<()> {
5230 encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5231 fidl::encoding::Encode::<
5233 GoldenHandleBasicRightsStruct,
5234 fidl::encoding::DefaultFuchsiaResourceDialect,
5235 >::encode(
5236 (<fidl::encoding::HandleType<
5237 fidl::Event,
5238 { fidl::ObjectType::EVENT.into_raw() },
5239 49155,
5240 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5241 &mut self.v
5242 ),),
5243 encoder,
5244 offset,
5245 _depth,
5246 )
5247 }
5248 }
5249 unsafe impl<
5250 T0: fidl::encoding::Encode<
5251 fidl::encoding::HandleType<
5252 fidl::Event,
5253 { fidl::ObjectType::EVENT.into_raw() },
5254 49155,
5255 >,
5256 fidl::encoding::DefaultFuchsiaResourceDialect,
5257 >,
5258 >
5259 fidl::encoding::Encode<
5260 GoldenHandleBasicRightsStruct,
5261 fidl::encoding::DefaultFuchsiaResourceDialect,
5262 > for (T0,)
5263 {
5264 #[inline]
5265 unsafe fn encode(
5266 self,
5267 encoder: &mut fidl::encoding::Encoder<
5268 '_,
5269 fidl::encoding::DefaultFuchsiaResourceDialect,
5270 >,
5271 offset: usize,
5272 depth: fidl::encoding::Depth,
5273 ) -> fidl::Result<()> {
5274 encoder.debug_check_bounds::<GoldenHandleBasicRightsStruct>(offset);
5275 self.0.encode(encoder, offset + 0, depth)?;
5279 Ok(())
5280 }
5281 }
5282
5283 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5284 for GoldenHandleBasicRightsStruct
5285 {
5286 #[inline(always)]
5287 fn new_empty() -> Self {
5288 Self {
5289 v: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect),
5290 }
5291 }
5292
5293 #[inline]
5294 unsafe fn decode(
5295 &mut self,
5296 decoder: &mut fidl::encoding::Decoder<
5297 '_,
5298 fidl::encoding::DefaultFuchsiaResourceDialect,
5299 >,
5300 offset: usize,
5301 _depth: fidl::encoding::Depth,
5302 ) -> fidl::Result<()> {
5303 decoder.debug_check_bounds::<Self>(offset);
5304 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 49155>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.v, decoder, offset + 0, _depth)?;
5306 Ok(())
5307 }
5308 }
5309
5310 impl fidl::encoding::ResourceTypeMarker for GoldenNullableHandleStruct {
5311 type Borrowed<'a> = &'a mut Self;
5312 fn take_or_borrow<'a>(
5313 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5314 ) -> Self::Borrowed<'a> {
5315 value
5316 }
5317 }
5318
5319 unsafe impl fidl::encoding::TypeMarker for GoldenNullableHandleStruct {
5320 type Owned = Self;
5321
5322 #[inline(always)]
5323 fn inline_align(_context: fidl::encoding::Context) -> usize {
5324 4
5325 }
5326
5327 #[inline(always)]
5328 fn inline_size(_context: fidl::encoding::Context) -> usize {
5329 4
5330 }
5331 }
5332
5333 unsafe impl
5334 fidl::encoding::Encode<
5335 GoldenNullableHandleStruct,
5336 fidl::encoding::DefaultFuchsiaResourceDialect,
5337 > for &mut GoldenNullableHandleStruct
5338 {
5339 #[inline]
5340 unsafe fn encode(
5341 self,
5342 encoder: &mut fidl::encoding::Encoder<
5343 '_,
5344 fidl::encoding::DefaultFuchsiaResourceDialect,
5345 >,
5346 offset: usize,
5347 _depth: fidl::encoding::Depth,
5348 ) -> fidl::Result<()> {
5349 encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5350 fidl::encoding::Encode::<
5352 GoldenNullableHandleStruct,
5353 fidl::encoding::DefaultFuchsiaResourceDialect,
5354 >::encode(
5355 (<fidl::encoding::Optional<
5356 fidl::encoding::HandleType<
5357 fidl::Handle,
5358 { fidl::ObjectType::NONE.into_raw() },
5359 2147483648,
5360 >,
5361 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5362 &mut self.v
5363 ),),
5364 encoder,
5365 offset,
5366 _depth,
5367 )
5368 }
5369 }
5370 unsafe impl<
5371 T0: fidl::encoding::Encode<
5372 fidl::encoding::Optional<
5373 fidl::encoding::HandleType<
5374 fidl::Handle,
5375 { fidl::ObjectType::NONE.into_raw() },
5376 2147483648,
5377 >,
5378 >,
5379 fidl::encoding::DefaultFuchsiaResourceDialect,
5380 >,
5381 >
5382 fidl::encoding::Encode<
5383 GoldenNullableHandleStruct,
5384 fidl::encoding::DefaultFuchsiaResourceDialect,
5385 > for (T0,)
5386 {
5387 #[inline]
5388 unsafe fn encode(
5389 self,
5390 encoder: &mut fidl::encoding::Encoder<
5391 '_,
5392 fidl::encoding::DefaultFuchsiaResourceDialect,
5393 >,
5394 offset: usize,
5395 depth: fidl::encoding::Depth,
5396 ) -> fidl::Result<()> {
5397 encoder.debug_check_bounds::<GoldenNullableHandleStruct>(offset);
5398 self.0.encode(encoder, offset + 0, depth)?;
5402 Ok(())
5403 }
5404 }
5405
5406 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5407 for GoldenNullableHandleStruct
5408 {
5409 #[inline(always)]
5410 fn new_empty() -> Self {
5411 Self {
5412 v: fidl::new_empty!(
5413 fidl::encoding::Optional<
5414 fidl::encoding::HandleType<
5415 fidl::Handle,
5416 { fidl::ObjectType::NONE.into_raw() },
5417 2147483648,
5418 >,
5419 >,
5420 fidl::encoding::DefaultFuchsiaResourceDialect
5421 ),
5422 }
5423 }
5424
5425 #[inline]
5426 unsafe fn decode(
5427 &mut self,
5428 decoder: &mut fidl::encoding::Decoder<
5429 '_,
5430 fidl::encoding::DefaultFuchsiaResourceDialect,
5431 >,
5432 offset: usize,
5433 _depth: fidl::encoding::Depth,
5434 ) -> fidl::Result<()> {
5435 decoder.debug_check_bounds::<Self>(offset);
5436 fidl::decode!(
5438 fidl::encoding::Optional<
5439 fidl::encoding::HandleType<
5440 fidl::Handle,
5441 { fidl::ObjectType::NONE.into_raw() },
5442 2147483648,
5443 >,
5444 >,
5445 fidl::encoding::DefaultFuchsiaResourceDialect,
5446 &mut self.v,
5447 decoder,
5448 offset + 0,
5449 _depth
5450 )?;
5451 Ok(())
5452 }
5453 }
5454
5455 impl fidl::encoding::ResourceTypeMarker for LaunchInfo {
5456 type Borrowed<'a> = &'a mut Self;
5457 fn take_or_borrow<'a>(
5458 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5459 ) -> Self::Borrowed<'a> {
5460 value
5461 }
5462 }
5463
5464 unsafe impl fidl::encoding::TypeMarker for LaunchInfo {
5465 type Owned = Self;
5466
5467 #[inline(always)]
5468 fn inline_align(_context: fidl::encoding::Context) -> usize {
5469 8
5470 }
5471
5472 #[inline(always)]
5473 fn inline_size(_context: fidl::encoding::Context) -> usize {
5474 72
5475 }
5476 }
5477
5478 unsafe impl fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5479 for &mut LaunchInfo
5480 {
5481 #[inline]
5482 unsafe fn encode(
5483 self,
5484 encoder: &mut fidl::encoding::Encoder<
5485 '_,
5486 fidl::encoding::DefaultFuchsiaResourceDialect,
5487 >,
5488 offset: usize,
5489 _depth: fidl::encoding::Depth,
5490 ) -> fidl::Result<()> {
5491 encoder.debug_check_bounds::<LaunchInfo>(offset);
5492 fidl::encoding::Encode::<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5494 (
5495 <fidl::encoding::BoundedString<200> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
5496 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.arguments),
5497 <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.out),
5498 <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.err),
5499 <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),
5500 <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.flat_namespace),
5501 <fidl::encoding::Boxed<TransformerEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.additional_services),
5502 ),
5503 encoder, offset, _depth
5504 )
5505 }
5506 }
5507 unsafe impl<
5508 T0: fidl::encoding::Encode<
5509 fidl::encoding::BoundedString<200>,
5510 fidl::encoding::DefaultFuchsiaResourceDialect,
5511 >,
5512 T1: fidl::encoding::Encode<
5513 fidl::encoding::Optional<
5514 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5515 >,
5516 fidl::encoding::DefaultFuchsiaResourceDialect,
5517 >,
5518 T2: fidl::encoding::Encode<
5519 fidl::encoding::Boxed<TransformerEmptyStruct>,
5520 fidl::encoding::DefaultFuchsiaResourceDialect,
5521 >,
5522 T3: fidl::encoding::Encode<
5523 fidl::encoding::Boxed<TransformerEmptyStruct>,
5524 fidl::encoding::DefaultFuchsiaResourceDialect,
5525 >,
5526 T4: fidl::encoding::Encode<
5527 fidl::encoding::Optional<
5528 fidl::encoding::HandleType<
5529 fidl::Channel,
5530 { fidl::ObjectType::CHANNEL.into_raw() },
5531 2147483648,
5532 >,
5533 >,
5534 fidl::encoding::DefaultFuchsiaResourceDialect,
5535 >,
5536 T5: fidl::encoding::Encode<
5537 fidl::encoding::Boxed<TransformerEmptyStruct>,
5538 fidl::encoding::DefaultFuchsiaResourceDialect,
5539 >,
5540 T6: fidl::encoding::Encode<
5541 fidl::encoding::Boxed<TransformerEmptyStruct>,
5542 fidl::encoding::DefaultFuchsiaResourceDialect,
5543 >,
5544 > fidl::encoding::Encode<LaunchInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
5545 for (T0, T1, T2, T3, T4, T5, T6)
5546 {
5547 #[inline]
5548 unsafe fn encode(
5549 self,
5550 encoder: &mut fidl::encoding::Encoder<
5551 '_,
5552 fidl::encoding::DefaultFuchsiaResourceDialect,
5553 >,
5554 offset: usize,
5555 depth: fidl::encoding::Depth,
5556 ) -> fidl::Result<()> {
5557 encoder.debug_check_bounds::<LaunchInfo>(offset);
5558 unsafe {
5561 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
5562 (ptr as *mut u64).write_unaligned(0);
5563 }
5564 self.0.encode(encoder, offset + 0, depth)?;
5566 self.1.encode(encoder, offset + 16, depth)?;
5567 self.2.encode(encoder, offset + 32, depth)?;
5568 self.3.encode(encoder, offset + 40, depth)?;
5569 self.4.encode(encoder, offset + 48, depth)?;
5570 self.5.encode(encoder, offset + 56, depth)?;
5571 self.6.encode(encoder, offset + 64, depth)?;
5572 Ok(())
5573 }
5574 }
5575
5576 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LaunchInfo {
5577 #[inline(always)]
5578 fn new_empty() -> Self {
5579 Self {
5580 url: fidl::new_empty!(
5581 fidl::encoding::BoundedString<200>,
5582 fidl::encoding::DefaultFuchsiaResourceDialect
5583 ),
5584 arguments: fidl::new_empty!(
5585 fidl::encoding::Optional<
5586 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5587 >,
5588 fidl::encoding::DefaultFuchsiaResourceDialect
5589 ),
5590 out: fidl::new_empty!(
5591 fidl::encoding::Boxed<TransformerEmptyStruct>,
5592 fidl::encoding::DefaultFuchsiaResourceDialect
5593 ),
5594 err: fidl::new_empty!(
5595 fidl::encoding::Boxed<TransformerEmptyStruct>,
5596 fidl::encoding::DefaultFuchsiaResourceDialect
5597 ),
5598 directory_request: fidl::new_empty!(
5599 fidl::encoding::Optional<
5600 fidl::encoding::HandleType<
5601 fidl::Channel,
5602 { fidl::ObjectType::CHANNEL.into_raw() },
5603 2147483648,
5604 >,
5605 >,
5606 fidl::encoding::DefaultFuchsiaResourceDialect
5607 ),
5608 flat_namespace: fidl::new_empty!(
5609 fidl::encoding::Boxed<TransformerEmptyStruct>,
5610 fidl::encoding::DefaultFuchsiaResourceDialect
5611 ),
5612 additional_services: fidl::new_empty!(
5613 fidl::encoding::Boxed<TransformerEmptyStruct>,
5614 fidl::encoding::DefaultFuchsiaResourceDialect
5615 ),
5616 }
5617 }
5618
5619 #[inline]
5620 unsafe fn decode(
5621 &mut self,
5622 decoder: &mut fidl::encoding::Decoder<
5623 '_,
5624 fidl::encoding::DefaultFuchsiaResourceDialect,
5625 >,
5626 offset: usize,
5627 _depth: fidl::encoding::Depth,
5628 ) -> fidl::Result<()> {
5629 decoder.debug_check_bounds::<Self>(offset);
5630 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
5632 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5633 let mask = 0xffffffff00000000u64;
5634 let maskedval = padval & mask;
5635 if maskedval != 0 {
5636 return Err(fidl::Error::NonZeroPadding {
5637 padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
5638 });
5639 }
5640 fidl::decode!(
5641 fidl::encoding::BoundedString<200>,
5642 fidl::encoding::DefaultFuchsiaResourceDialect,
5643 &mut self.url,
5644 decoder,
5645 offset + 0,
5646 _depth
5647 )?;
5648 fidl::decode!(
5649 fidl::encoding::Optional<
5650 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5651 >,
5652 fidl::encoding::DefaultFuchsiaResourceDialect,
5653 &mut self.arguments,
5654 decoder,
5655 offset + 16,
5656 _depth
5657 )?;
5658 fidl::decode!(
5659 fidl::encoding::Boxed<TransformerEmptyStruct>,
5660 fidl::encoding::DefaultFuchsiaResourceDialect,
5661 &mut self.out,
5662 decoder,
5663 offset + 32,
5664 _depth
5665 )?;
5666 fidl::decode!(
5667 fidl::encoding::Boxed<TransformerEmptyStruct>,
5668 fidl::encoding::DefaultFuchsiaResourceDialect,
5669 &mut self.err,
5670 decoder,
5671 offset + 40,
5672 _depth
5673 )?;
5674 fidl::decode!(
5675 fidl::encoding::Optional<
5676 fidl::encoding::HandleType<
5677 fidl::Channel,
5678 { fidl::ObjectType::CHANNEL.into_raw() },
5679 2147483648,
5680 >,
5681 >,
5682 fidl::encoding::DefaultFuchsiaResourceDialect,
5683 &mut self.directory_request,
5684 decoder,
5685 offset + 48,
5686 _depth
5687 )?;
5688 fidl::decode!(
5689 fidl::encoding::Boxed<TransformerEmptyStruct>,
5690 fidl::encoding::DefaultFuchsiaResourceDialect,
5691 &mut self.flat_namespace,
5692 decoder,
5693 offset + 56,
5694 _depth
5695 )?;
5696 fidl::decode!(
5697 fidl::encoding::Boxed<TransformerEmptyStruct>,
5698 fidl::encoding::DefaultFuchsiaResourceDialect,
5699 &mut self.additional_services,
5700 decoder,
5701 offset + 64,
5702 _depth
5703 )?;
5704 Ok(())
5705 }
5706 }
5707
5708 impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5709 type Borrowed<'a> = &'a mut Self;
5710 fn take_or_borrow<'a>(
5711 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5712 ) -> Self::Borrowed<'a> {
5713 value
5714 }
5715 }
5716
5717 unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfHandles {
5718 type Owned = Self;
5719
5720 #[inline(always)]
5721 fn inline_align(_context: fidl::encoding::Context) -> usize {
5722 8
5723 }
5724
5725 #[inline(always)]
5726 fn inline_size(_context: fidl::encoding::Context) -> usize {
5727 32
5728 }
5729 }
5730
5731 unsafe impl
5732 fidl::encoding::Encode<
5733 MultipleBoundedNonnullableVectorsOfHandles,
5734 fidl::encoding::DefaultFuchsiaResourceDialect,
5735 > for &mut MultipleBoundedNonnullableVectorsOfHandles
5736 {
5737 #[inline]
5738 unsafe fn encode(
5739 self,
5740 encoder: &mut fidl::encoding::Encoder<
5741 '_,
5742 fidl::encoding::DefaultFuchsiaResourceDialect,
5743 >,
5744 offset: usize,
5745 _depth: fidl::encoding::Depth,
5746 ) -> fidl::Result<()> {
5747 encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5748 fidl::encoding::Encode::<
5750 MultipleBoundedNonnullableVectorsOfHandles,
5751 fidl::encoding::DefaultFuchsiaResourceDialect,
5752 >::encode(
5753 (
5754 <fidl::encoding::Vector<
5755 fidl::encoding::HandleType<
5756 fidl::Handle,
5757 { fidl::ObjectType::NONE.into_raw() },
5758 2147483648,
5759 >,
5760 2,
5761 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5762 &mut self.vh0
5763 ),
5764 <fidl::encoding::Vector<
5765 fidl::encoding::HandleType<
5766 fidl::Handle,
5767 { fidl::ObjectType::NONE.into_raw() },
5768 2147483648,
5769 >,
5770 32,
5771 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5772 &mut self.vh1
5773 ),
5774 ),
5775 encoder,
5776 offset,
5777 _depth,
5778 )
5779 }
5780 }
5781 unsafe impl<
5782 T0: fidl::encoding::Encode<
5783 fidl::encoding::Vector<
5784 fidl::encoding::HandleType<
5785 fidl::Handle,
5786 { fidl::ObjectType::NONE.into_raw() },
5787 2147483648,
5788 >,
5789 2,
5790 >,
5791 fidl::encoding::DefaultFuchsiaResourceDialect,
5792 >,
5793 T1: fidl::encoding::Encode<
5794 fidl::encoding::Vector<
5795 fidl::encoding::HandleType<
5796 fidl::Handle,
5797 { fidl::ObjectType::NONE.into_raw() },
5798 2147483648,
5799 >,
5800 32,
5801 >,
5802 fidl::encoding::DefaultFuchsiaResourceDialect,
5803 >,
5804 >
5805 fidl::encoding::Encode<
5806 MultipleBoundedNonnullableVectorsOfHandles,
5807 fidl::encoding::DefaultFuchsiaResourceDialect,
5808 > for (T0, T1)
5809 {
5810 #[inline]
5811 unsafe fn encode(
5812 self,
5813 encoder: &mut fidl::encoding::Encoder<
5814 '_,
5815 fidl::encoding::DefaultFuchsiaResourceDialect,
5816 >,
5817 offset: usize,
5818 depth: fidl::encoding::Depth,
5819 ) -> fidl::Result<()> {
5820 encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfHandles>(offset);
5821 self.0.encode(encoder, offset + 0, depth)?;
5825 self.1.encode(encoder, offset + 16, depth)?;
5826 Ok(())
5827 }
5828 }
5829
5830 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5831 for MultipleBoundedNonnullableVectorsOfHandles
5832 {
5833 #[inline(always)]
5834 fn new_empty() -> Self {
5835 Self {
5836 vh0: fidl::new_empty!(
5837 fidl::encoding::Vector<
5838 fidl::encoding::HandleType<
5839 fidl::Handle,
5840 { fidl::ObjectType::NONE.into_raw() },
5841 2147483648,
5842 >,
5843 2,
5844 >,
5845 fidl::encoding::DefaultFuchsiaResourceDialect
5846 ),
5847 vh1: fidl::new_empty!(
5848 fidl::encoding::Vector<
5849 fidl::encoding::HandleType<
5850 fidl::Handle,
5851 { fidl::ObjectType::NONE.into_raw() },
5852 2147483648,
5853 >,
5854 32,
5855 >,
5856 fidl::encoding::DefaultFuchsiaResourceDialect
5857 ),
5858 }
5859 }
5860
5861 #[inline]
5862 unsafe fn decode(
5863 &mut self,
5864 decoder: &mut fidl::encoding::Decoder<
5865 '_,
5866 fidl::encoding::DefaultFuchsiaResourceDialect,
5867 >,
5868 offset: usize,
5869 _depth: fidl::encoding::Depth,
5870 ) -> fidl::Result<()> {
5871 decoder.debug_check_bounds::<Self>(offset);
5872 fidl::decode!(
5874 fidl::encoding::Vector<
5875 fidl::encoding::HandleType<
5876 fidl::Handle,
5877 { fidl::ObjectType::NONE.into_raw() },
5878 2147483648,
5879 >,
5880 2,
5881 >,
5882 fidl::encoding::DefaultFuchsiaResourceDialect,
5883 &mut self.vh0,
5884 decoder,
5885 offset + 0,
5886 _depth
5887 )?;
5888 fidl::decode!(
5889 fidl::encoding::Vector<
5890 fidl::encoding::HandleType<
5891 fidl::Handle,
5892 { fidl::ObjectType::NONE.into_raw() },
5893 2147483648,
5894 >,
5895 32,
5896 >,
5897 fidl::encoding::DefaultFuchsiaResourceDialect,
5898 &mut self.vh1,
5899 decoder,
5900 offset + 16,
5901 _depth
5902 )?;
5903 Ok(())
5904 }
5905 }
5906
5907 impl fidl::encoding::ResourceTypeMarker for MultipleBoundedNullableVectorsOfHandles {
5908 type Borrowed<'a> = &'a mut Self;
5909 fn take_or_borrow<'a>(
5910 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5911 ) -> Self::Borrowed<'a> {
5912 value
5913 }
5914 }
5915
5916 unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfHandles {
5917 type Owned = Self;
5918
5919 #[inline(always)]
5920 fn inline_align(_context: fidl::encoding::Context) -> usize {
5921 8
5922 }
5923
5924 #[inline(always)]
5925 fn inline_size(_context: fidl::encoding::Context) -> usize {
5926 32
5927 }
5928 }
5929
5930 unsafe impl
5931 fidl::encoding::Encode<
5932 MultipleBoundedNullableVectorsOfHandles,
5933 fidl::encoding::DefaultFuchsiaResourceDialect,
5934 > for &mut MultipleBoundedNullableVectorsOfHandles
5935 {
5936 #[inline]
5937 unsafe fn encode(
5938 self,
5939 encoder: &mut fidl::encoding::Encoder<
5940 '_,
5941 fidl::encoding::DefaultFuchsiaResourceDialect,
5942 >,
5943 offset: usize,
5944 _depth: fidl::encoding::Depth,
5945 ) -> fidl::Result<()> {
5946 encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
5947 fidl::encoding::Encode::<
5949 MultipleBoundedNullableVectorsOfHandles,
5950 fidl::encoding::DefaultFuchsiaResourceDialect,
5951 >::encode(
5952 (
5953 <fidl::encoding::Optional<
5954 fidl::encoding::Vector<
5955 fidl::encoding::HandleType<
5956 fidl::Handle,
5957 { fidl::ObjectType::NONE.into_raw() },
5958 2147483648,
5959 >,
5960 2,
5961 >,
5962 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5963 &mut self.vh0
5964 ),
5965 <fidl::encoding::Optional<
5966 fidl::encoding::Vector<
5967 fidl::encoding::HandleType<
5968 fidl::Handle,
5969 { fidl::ObjectType::NONE.into_raw() },
5970 2147483648,
5971 >,
5972 32,
5973 >,
5974 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5975 &mut self.vh1
5976 ),
5977 ),
5978 encoder,
5979 offset,
5980 _depth,
5981 )
5982 }
5983 }
5984 unsafe impl<
5985 T0: fidl::encoding::Encode<
5986 fidl::encoding::Optional<
5987 fidl::encoding::Vector<
5988 fidl::encoding::HandleType<
5989 fidl::Handle,
5990 { fidl::ObjectType::NONE.into_raw() },
5991 2147483648,
5992 >,
5993 2,
5994 >,
5995 >,
5996 fidl::encoding::DefaultFuchsiaResourceDialect,
5997 >,
5998 T1: fidl::encoding::Encode<
5999 fidl::encoding::Optional<
6000 fidl::encoding::Vector<
6001 fidl::encoding::HandleType<
6002 fidl::Handle,
6003 { fidl::ObjectType::NONE.into_raw() },
6004 2147483648,
6005 >,
6006 32,
6007 >,
6008 >,
6009 fidl::encoding::DefaultFuchsiaResourceDialect,
6010 >,
6011 >
6012 fidl::encoding::Encode<
6013 MultipleBoundedNullableVectorsOfHandles,
6014 fidl::encoding::DefaultFuchsiaResourceDialect,
6015 > for (T0, T1)
6016 {
6017 #[inline]
6018 unsafe fn encode(
6019 self,
6020 encoder: &mut fidl::encoding::Encoder<
6021 '_,
6022 fidl::encoding::DefaultFuchsiaResourceDialect,
6023 >,
6024 offset: usize,
6025 depth: fidl::encoding::Depth,
6026 ) -> fidl::Result<()> {
6027 encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfHandles>(offset);
6028 self.0.encode(encoder, offset + 0, depth)?;
6032 self.1.encode(encoder, offset + 16, depth)?;
6033 Ok(())
6034 }
6035 }
6036
6037 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6038 for MultipleBoundedNullableVectorsOfHandles
6039 {
6040 #[inline(always)]
6041 fn new_empty() -> Self {
6042 Self {
6043 vh0: fidl::new_empty!(
6044 fidl::encoding::Optional<
6045 fidl::encoding::Vector<
6046 fidl::encoding::HandleType<
6047 fidl::Handle,
6048 { fidl::ObjectType::NONE.into_raw() },
6049 2147483648,
6050 >,
6051 2,
6052 >,
6053 >,
6054 fidl::encoding::DefaultFuchsiaResourceDialect
6055 ),
6056 vh1: fidl::new_empty!(
6057 fidl::encoding::Optional<
6058 fidl::encoding::Vector<
6059 fidl::encoding::HandleType<
6060 fidl::Handle,
6061 { fidl::ObjectType::NONE.into_raw() },
6062 2147483648,
6063 >,
6064 32,
6065 >,
6066 >,
6067 fidl::encoding::DefaultFuchsiaResourceDialect
6068 ),
6069 }
6070 }
6071
6072 #[inline]
6073 unsafe fn decode(
6074 &mut self,
6075 decoder: &mut fidl::encoding::Decoder<
6076 '_,
6077 fidl::encoding::DefaultFuchsiaResourceDialect,
6078 >,
6079 offset: usize,
6080 _depth: fidl::encoding::Depth,
6081 ) -> fidl::Result<()> {
6082 decoder.debug_check_bounds::<Self>(offset);
6083 fidl::decode!(
6085 fidl::encoding::Optional<
6086 fidl::encoding::Vector<
6087 fidl::encoding::HandleType<
6088 fidl::Handle,
6089 { fidl::ObjectType::NONE.into_raw() },
6090 2147483648,
6091 >,
6092 2,
6093 >,
6094 >,
6095 fidl::encoding::DefaultFuchsiaResourceDialect,
6096 &mut self.vh0,
6097 decoder,
6098 offset + 0,
6099 _depth
6100 )?;
6101 fidl::decode!(
6102 fidl::encoding::Optional<
6103 fidl::encoding::Vector<
6104 fidl::encoding::HandleType<
6105 fidl::Handle,
6106 { fidl::ObjectType::NONE.into_raw() },
6107 2147483648,
6108 >,
6109 32,
6110 >,
6111 >,
6112 fidl::encoding::DefaultFuchsiaResourceDialect,
6113 &mut self.vh1,
6114 decoder,
6115 offset + 16,
6116 _depth
6117 )?;
6118 Ok(())
6119 }
6120 }
6121
6122 impl fidl::encoding::ResourceTypeMarker for MultipleHandleSubtypes {
6123 type Borrowed<'a> = &'a mut Self;
6124 fn take_or_borrow<'a>(
6125 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6126 ) -> Self::Borrowed<'a> {
6127 value
6128 }
6129 }
6130
6131 unsafe impl fidl::encoding::TypeMarker for MultipleHandleSubtypes {
6132 type Owned = Self;
6133
6134 #[inline(always)]
6135 fn inline_align(_context: fidl::encoding::Context) -> usize {
6136 4
6137 }
6138
6139 #[inline(always)]
6140 fn inline_size(_context: fidl::encoding::Context) -> usize {
6141 12
6142 }
6143 }
6144
6145 unsafe impl
6146 fidl::encoding::Encode<
6147 MultipleHandleSubtypes,
6148 fidl::encoding::DefaultFuchsiaResourceDialect,
6149 > for &mut MultipleHandleSubtypes
6150 {
6151 #[inline]
6152 unsafe fn encode(
6153 self,
6154 encoder: &mut fidl::encoding::Encoder<
6155 '_,
6156 fidl::encoding::DefaultFuchsiaResourceDialect,
6157 >,
6158 offset: usize,
6159 _depth: fidl::encoding::Depth,
6160 ) -> fidl::Result<()> {
6161 encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6162 fidl::encoding::Encode::<
6164 MultipleHandleSubtypes,
6165 fidl::encoding::DefaultFuchsiaResourceDialect,
6166 >::encode(
6167 (
6168 <fidl::encoding::HandleType<
6169 fidl::Handle,
6170 { fidl::ObjectType::NONE.into_raw() },
6171 2147483648,
6172 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6173 &mut self.untyped
6174 ),
6175 <fidl::encoding::HandleType<
6176 fidl::Event,
6177 { fidl::ObjectType::EVENT.into_raw() },
6178 2147483648,
6179 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6180 &mut self.event
6181 ),
6182 <fidl::encoding::HandleType<
6183 fidl::Channel,
6184 { fidl::ObjectType::CHANNEL.into_raw() },
6185 2147483648,
6186 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6187 &mut self.channel
6188 ),
6189 ),
6190 encoder,
6191 offset,
6192 _depth,
6193 )
6194 }
6195 }
6196 unsafe impl<
6197 T0: fidl::encoding::Encode<
6198 fidl::encoding::HandleType<
6199 fidl::Handle,
6200 { fidl::ObjectType::NONE.into_raw() },
6201 2147483648,
6202 >,
6203 fidl::encoding::DefaultFuchsiaResourceDialect,
6204 >,
6205 T1: fidl::encoding::Encode<
6206 fidl::encoding::HandleType<
6207 fidl::Event,
6208 { fidl::ObjectType::EVENT.into_raw() },
6209 2147483648,
6210 >,
6211 fidl::encoding::DefaultFuchsiaResourceDialect,
6212 >,
6213 T2: fidl::encoding::Encode<
6214 fidl::encoding::HandleType<
6215 fidl::Channel,
6216 { fidl::ObjectType::CHANNEL.into_raw() },
6217 2147483648,
6218 >,
6219 fidl::encoding::DefaultFuchsiaResourceDialect,
6220 >,
6221 >
6222 fidl::encoding::Encode<
6223 MultipleHandleSubtypes,
6224 fidl::encoding::DefaultFuchsiaResourceDialect,
6225 > for (T0, T1, T2)
6226 {
6227 #[inline]
6228 unsafe fn encode(
6229 self,
6230 encoder: &mut fidl::encoding::Encoder<
6231 '_,
6232 fidl::encoding::DefaultFuchsiaResourceDialect,
6233 >,
6234 offset: usize,
6235 depth: fidl::encoding::Depth,
6236 ) -> fidl::Result<()> {
6237 encoder.debug_check_bounds::<MultipleHandleSubtypes>(offset);
6238 self.0.encode(encoder, offset + 0, depth)?;
6242 self.1.encode(encoder, offset + 4, depth)?;
6243 self.2.encode(encoder, offset + 8, depth)?;
6244 Ok(())
6245 }
6246 }
6247
6248 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6249 for MultipleHandleSubtypes
6250 {
6251 #[inline(always)]
6252 fn new_empty() -> Self {
6253 Self {
6254 untyped: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6255 event: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6256 channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6257 }
6258 }
6259
6260 #[inline]
6261 unsafe fn decode(
6262 &mut self,
6263 decoder: &mut fidl::encoding::Decoder<
6264 '_,
6265 fidl::encoding::DefaultFuchsiaResourceDialect,
6266 >,
6267 offset: usize,
6268 _depth: fidl::encoding::Depth,
6269 ) -> fidl::Result<()> {
6270 decoder.debug_check_bounds::<Self>(offset);
6271 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.untyped, decoder, offset + 0, _depth)?;
6273 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.event, decoder, offset + 4, _depth)?;
6274 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.channel, decoder, offset + 8, _depth)?;
6275 Ok(())
6276 }
6277 }
6278
6279 impl fidl::encoding::ResourceTypeMarker for MultipleNonnullableHandles {
6280 type Borrowed<'a> = &'a mut Self;
6281 fn take_or_borrow<'a>(
6282 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6283 ) -> Self::Borrowed<'a> {
6284 value
6285 }
6286 }
6287
6288 unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableHandles {
6289 type Owned = Self;
6290
6291 #[inline(always)]
6292 fn inline_align(_context: fidl::encoding::Context) -> usize {
6293 8
6294 }
6295
6296 #[inline(always)]
6297 fn inline_size(_context: fidl::encoding::Context) -> usize {
6298 32
6299 }
6300 }
6301
6302 unsafe impl
6303 fidl::encoding::Encode<
6304 MultipleNonnullableHandles,
6305 fidl::encoding::DefaultFuchsiaResourceDialect,
6306 > for &mut MultipleNonnullableHandles
6307 {
6308 #[inline]
6309 unsafe fn encode(
6310 self,
6311 encoder: &mut fidl::encoding::Encoder<
6312 '_,
6313 fidl::encoding::DefaultFuchsiaResourceDialect,
6314 >,
6315 offset: usize,
6316 _depth: fidl::encoding::Depth,
6317 ) -> fidl::Result<()> {
6318 encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6319 fidl::encoding::Encode::<
6321 MultipleNonnullableHandles,
6322 fidl::encoding::DefaultFuchsiaResourceDialect,
6323 >::encode(
6324 (
6325 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6326 <fidl::encoding::HandleType<
6327 fidl::Handle,
6328 { fidl::ObjectType::NONE.into_raw() },
6329 2147483648,
6330 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6331 &mut self.handle0
6332 ),
6333 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6334 <fidl::encoding::HandleType<
6335 fidl::Channel,
6336 { fidl::ObjectType::CHANNEL.into_raw() },
6337 2147483648,
6338 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6339 &mut self.handle1
6340 ),
6341 <fidl::encoding::HandleType<
6342 fidl::Event,
6343 { fidl::ObjectType::EVENT.into_raw() },
6344 2147483648,
6345 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6346 &mut self.handle2
6347 ),
6348 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6349 ),
6350 encoder,
6351 offset,
6352 _depth,
6353 )
6354 }
6355 }
6356 unsafe impl<
6357 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6358 T1: fidl::encoding::Encode<
6359 fidl::encoding::HandleType<
6360 fidl::Handle,
6361 { fidl::ObjectType::NONE.into_raw() },
6362 2147483648,
6363 >,
6364 fidl::encoding::DefaultFuchsiaResourceDialect,
6365 >,
6366 T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6367 T3: fidl::encoding::Encode<
6368 fidl::encoding::HandleType<
6369 fidl::Channel,
6370 { fidl::ObjectType::CHANNEL.into_raw() },
6371 2147483648,
6372 >,
6373 fidl::encoding::DefaultFuchsiaResourceDialect,
6374 >,
6375 T4: fidl::encoding::Encode<
6376 fidl::encoding::HandleType<
6377 fidl::Event,
6378 { fidl::ObjectType::EVENT.into_raw() },
6379 2147483648,
6380 >,
6381 fidl::encoding::DefaultFuchsiaResourceDialect,
6382 >,
6383 T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6384 >
6385 fidl::encoding::Encode<
6386 MultipleNonnullableHandles,
6387 fidl::encoding::DefaultFuchsiaResourceDialect,
6388 > for (T0, T1, T2, T3, T4, T5)
6389 {
6390 #[inline]
6391 unsafe fn encode(
6392 self,
6393 encoder: &mut fidl::encoding::Encoder<
6394 '_,
6395 fidl::encoding::DefaultFuchsiaResourceDialect,
6396 >,
6397 offset: usize,
6398 depth: fidl::encoding::Depth,
6399 ) -> fidl::Result<()> {
6400 encoder.debug_check_bounds::<MultipleNonnullableHandles>(offset);
6401 self.0.encode(encoder, offset + 0, depth)?;
6405 self.1.encode(encoder, offset + 4, depth)?;
6406 self.2.encode(encoder, offset + 8, depth)?;
6407 self.3.encode(encoder, offset + 16, depth)?;
6408 self.4.encode(encoder, offset + 20, depth)?;
6409 self.5.encode(encoder, offset + 24, depth)?;
6410 Ok(())
6411 }
6412 }
6413
6414 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6415 for MultipleNonnullableHandles
6416 {
6417 #[inline(always)]
6418 fn new_empty() -> Self {
6419 Self {
6420 data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6421 handle0: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6422 data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6423 handle1: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6424 handle2: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6425 data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6426 }
6427 }
6428
6429 #[inline]
6430 unsafe fn decode(
6431 &mut self,
6432 decoder: &mut fidl::encoding::Decoder<
6433 '_,
6434 fidl::encoding::DefaultFuchsiaResourceDialect,
6435 >,
6436 offset: usize,
6437 _depth: fidl::encoding::Depth,
6438 ) -> fidl::Result<()> {
6439 decoder.debug_check_bounds::<Self>(offset);
6440 fidl::decode!(
6442 u32,
6443 fidl::encoding::DefaultFuchsiaResourceDialect,
6444 &mut self.data0,
6445 decoder,
6446 offset + 0,
6447 _depth
6448 )?;
6449 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle0, decoder, offset + 4, _depth)?;
6450 fidl::decode!(
6451 u64,
6452 fidl::encoding::DefaultFuchsiaResourceDialect,
6453 &mut self.data1,
6454 decoder,
6455 offset + 8,
6456 _depth
6457 )?;
6458 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle1, decoder, offset + 16, _depth)?;
6459 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle2, decoder, offset + 20, _depth)?;
6460 fidl::decode!(
6461 u64,
6462 fidl::encoding::DefaultFuchsiaResourceDialect,
6463 &mut self.data2,
6464 decoder,
6465 offset + 24,
6466 _depth
6467 )?;
6468 Ok(())
6469 }
6470 }
6471
6472 impl fidl::encoding::ResourceTypeMarker for MultipleNullableHandles {
6473 type Borrowed<'a> = &'a mut Self;
6474 fn take_or_borrow<'a>(
6475 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6476 ) -> Self::Borrowed<'a> {
6477 value
6478 }
6479 }
6480
6481 unsafe impl fidl::encoding::TypeMarker for MultipleNullableHandles {
6482 type Owned = Self;
6483
6484 #[inline(always)]
6485 fn inline_align(_context: fidl::encoding::Context) -> usize {
6486 8
6487 }
6488
6489 #[inline(always)]
6490 fn inline_size(_context: fidl::encoding::Context) -> usize {
6491 32
6492 }
6493 }
6494
6495 unsafe impl
6496 fidl::encoding::Encode<
6497 MultipleNullableHandles,
6498 fidl::encoding::DefaultFuchsiaResourceDialect,
6499 > for &mut MultipleNullableHandles
6500 {
6501 #[inline]
6502 unsafe fn encode(
6503 self,
6504 encoder: &mut fidl::encoding::Encoder<
6505 '_,
6506 fidl::encoding::DefaultFuchsiaResourceDialect,
6507 >,
6508 offset: usize,
6509 _depth: fidl::encoding::Depth,
6510 ) -> fidl::Result<()> {
6511 encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6512 fidl::encoding::Encode::<
6514 MultipleNullableHandles,
6515 fidl::encoding::DefaultFuchsiaResourceDialect,
6516 >::encode(
6517 (
6518 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data0),
6519 <fidl::encoding::Optional<
6520 fidl::encoding::HandleType<
6521 fidl::Handle,
6522 { fidl::ObjectType::NONE.into_raw() },
6523 2147483648,
6524 >,
6525 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6526 &mut self.handle0
6527 ),
6528 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data1),
6529 <fidl::encoding::Optional<
6530 fidl::encoding::HandleType<
6531 fidl::Channel,
6532 { fidl::ObjectType::CHANNEL.into_raw() },
6533 2147483648,
6534 >,
6535 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6536 &mut self.handle1
6537 ),
6538 <fidl::encoding::Optional<
6539 fidl::encoding::HandleType<
6540 fidl::Event,
6541 { fidl::ObjectType::EVENT.into_raw() },
6542 2147483648,
6543 >,
6544 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6545 &mut self.handle2
6546 ),
6547 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.data2),
6548 ),
6549 encoder,
6550 offset,
6551 _depth,
6552 )
6553 }
6554 }
6555 unsafe impl<
6556 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6557 T1: fidl::encoding::Encode<
6558 fidl::encoding::Optional<
6559 fidl::encoding::HandleType<
6560 fidl::Handle,
6561 { fidl::ObjectType::NONE.into_raw() },
6562 2147483648,
6563 >,
6564 >,
6565 fidl::encoding::DefaultFuchsiaResourceDialect,
6566 >,
6567 T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6568 T3: fidl::encoding::Encode<
6569 fidl::encoding::Optional<
6570 fidl::encoding::HandleType<
6571 fidl::Channel,
6572 { fidl::ObjectType::CHANNEL.into_raw() },
6573 2147483648,
6574 >,
6575 >,
6576 fidl::encoding::DefaultFuchsiaResourceDialect,
6577 >,
6578 T4: fidl::encoding::Encode<
6579 fidl::encoding::Optional<
6580 fidl::encoding::HandleType<
6581 fidl::Event,
6582 { fidl::ObjectType::EVENT.into_raw() },
6583 2147483648,
6584 >,
6585 >,
6586 fidl::encoding::DefaultFuchsiaResourceDialect,
6587 >,
6588 T5: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
6589 >
6590 fidl::encoding::Encode<
6591 MultipleNullableHandles,
6592 fidl::encoding::DefaultFuchsiaResourceDialect,
6593 > for (T0, T1, T2, T3, T4, T5)
6594 {
6595 #[inline]
6596 unsafe fn encode(
6597 self,
6598 encoder: &mut fidl::encoding::Encoder<
6599 '_,
6600 fidl::encoding::DefaultFuchsiaResourceDialect,
6601 >,
6602 offset: usize,
6603 depth: fidl::encoding::Depth,
6604 ) -> fidl::Result<()> {
6605 encoder.debug_check_bounds::<MultipleNullableHandles>(offset);
6606 self.0.encode(encoder, offset + 0, depth)?;
6610 self.1.encode(encoder, offset + 4, depth)?;
6611 self.2.encode(encoder, offset + 8, depth)?;
6612 self.3.encode(encoder, offset + 16, depth)?;
6613 self.4.encode(encoder, offset + 20, depth)?;
6614 self.5.encode(encoder, offset + 24, depth)?;
6615 Ok(())
6616 }
6617 }
6618
6619 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6620 for MultipleNullableHandles
6621 {
6622 #[inline(always)]
6623 fn new_empty() -> Self {
6624 Self {
6625 data0: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6626 handle0: fidl::new_empty!(
6627 fidl::encoding::Optional<
6628 fidl::encoding::HandleType<
6629 fidl::Handle,
6630 { fidl::ObjectType::NONE.into_raw() },
6631 2147483648,
6632 >,
6633 >,
6634 fidl::encoding::DefaultFuchsiaResourceDialect
6635 ),
6636 data1: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6637 handle1: fidl::new_empty!(
6638 fidl::encoding::Optional<
6639 fidl::encoding::HandleType<
6640 fidl::Channel,
6641 { fidl::ObjectType::CHANNEL.into_raw() },
6642 2147483648,
6643 >,
6644 >,
6645 fidl::encoding::DefaultFuchsiaResourceDialect
6646 ),
6647 handle2: fidl::new_empty!(
6648 fidl::encoding::Optional<
6649 fidl::encoding::HandleType<
6650 fidl::Event,
6651 { fidl::ObjectType::EVENT.into_raw() },
6652 2147483648,
6653 >,
6654 >,
6655 fidl::encoding::DefaultFuchsiaResourceDialect
6656 ),
6657 data2: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
6658 }
6659 }
6660
6661 #[inline]
6662 unsafe fn decode(
6663 &mut self,
6664 decoder: &mut fidl::encoding::Decoder<
6665 '_,
6666 fidl::encoding::DefaultFuchsiaResourceDialect,
6667 >,
6668 offset: usize,
6669 _depth: fidl::encoding::Depth,
6670 ) -> fidl::Result<()> {
6671 decoder.debug_check_bounds::<Self>(offset);
6672 fidl::decode!(
6674 u32,
6675 fidl::encoding::DefaultFuchsiaResourceDialect,
6676 &mut self.data0,
6677 decoder,
6678 offset + 0,
6679 _depth
6680 )?;
6681 fidl::decode!(
6682 fidl::encoding::Optional<
6683 fidl::encoding::HandleType<
6684 fidl::Handle,
6685 { fidl::ObjectType::NONE.into_raw() },
6686 2147483648,
6687 >,
6688 >,
6689 fidl::encoding::DefaultFuchsiaResourceDialect,
6690 &mut self.handle0,
6691 decoder,
6692 offset + 4,
6693 _depth
6694 )?;
6695 fidl::decode!(
6696 u64,
6697 fidl::encoding::DefaultFuchsiaResourceDialect,
6698 &mut self.data1,
6699 decoder,
6700 offset + 8,
6701 _depth
6702 )?;
6703 fidl::decode!(
6704 fidl::encoding::Optional<
6705 fidl::encoding::HandleType<
6706 fidl::Channel,
6707 { fidl::ObjectType::CHANNEL.into_raw() },
6708 2147483648,
6709 >,
6710 >,
6711 fidl::encoding::DefaultFuchsiaResourceDialect,
6712 &mut self.handle1,
6713 decoder,
6714 offset + 16,
6715 _depth
6716 )?;
6717 fidl::decode!(
6718 fidl::encoding::Optional<
6719 fidl::encoding::HandleType<
6720 fidl::Event,
6721 { fidl::ObjectType::EVENT.into_raw() },
6722 2147483648,
6723 >,
6724 >,
6725 fidl::encoding::DefaultFuchsiaResourceDialect,
6726 &mut self.handle2,
6727 decoder,
6728 offset + 20,
6729 _depth
6730 )?;
6731 fidl::decode!(
6732 u64,
6733 fidl::encoding::DefaultFuchsiaResourceDialect,
6734 &mut self.data2,
6735 decoder,
6736 offset + 24,
6737 _depth
6738 )?;
6739 Ok(())
6740 }
6741 }
6742
6743 impl fidl::encoding::ResourceTypeMarker for NonnullableHandle {
6744 type Borrowed<'a> = &'a mut Self;
6745 fn take_or_borrow<'a>(
6746 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6747 ) -> Self::Borrowed<'a> {
6748 value
6749 }
6750 }
6751
6752 unsafe impl fidl::encoding::TypeMarker for NonnullableHandle {
6753 type Owned = Self;
6754
6755 #[inline(always)]
6756 fn inline_align(_context: fidl::encoding::Context) -> usize {
6757 4
6758 }
6759
6760 #[inline(always)]
6761 fn inline_size(_context: fidl::encoding::Context) -> usize {
6762 4
6763 }
6764 }
6765
6766 unsafe impl
6767 fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6768 for &mut NonnullableHandle
6769 {
6770 #[inline]
6771 unsafe fn encode(
6772 self,
6773 encoder: &mut fidl::encoding::Encoder<
6774 '_,
6775 fidl::encoding::DefaultFuchsiaResourceDialect,
6776 >,
6777 offset: usize,
6778 _depth: fidl::encoding::Depth,
6779 ) -> fidl::Result<()> {
6780 encoder.debug_check_bounds::<NonnullableHandle>(offset);
6781 fidl::encoding::Encode::<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6783 (
6784 <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
6785 ),
6786 encoder, offset, _depth
6787 )
6788 }
6789 }
6790 unsafe impl<
6791 T0: fidl::encoding::Encode<
6792 fidl::encoding::HandleType<
6793 fidl::Handle,
6794 { fidl::ObjectType::NONE.into_raw() },
6795 2147483648,
6796 >,
6797 fidl::encoding::DefaultFuchsiaResourceDialect,
6798 >,
6799 >
6800 fidl::encoding::Encode<NonnullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
6801 for (T0,)
6802 {
6803 #[inline]
6804 unsafe fn encode(
6805 self,
6806 encoder: &mut fidl::encoding::Encoder<
6807 '_,
6808 fidl::encoding::DefaultFuchsiaResourceDialect,
6809 >,
6810 offset: usize,
6811 depth: fidl::encoding::Depth,
6812 ) -> fidl::Result<()> {
6813 encoder.debug_check_bounds::<NonnullableHandle>(offset);
6814 self.0.encode(encoder, offset + 0, depth)?;
6818 Ok(())
6819 }
6820 }
6821
6822 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6823 for NonnullableHandle
6824 {
6825 #[inline(always)]
6826 fn new_empty() -> Self {
6827 Self {
6828 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6829 }
6830 }
6831
6832 #[inline]
6833 unsafe fn decode(
6834 &mut self,
6835 decoder: &mut fidl::encoding::Decoder<
6836 '_,
6837 fidl::encoding::DefaultFuchsiaResourceDialect,
6838 >,
6839 offset: usize,
6840 _depth: fidl::encoding::Depth,
6841 ) -> fidl::Result<()> {
6842 decoder.debug_check_bounds::<Self>(offset);
6843 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
6845 Ok(())
6846 }
6847 }
6848
6849 impl fidl::encoding::ResourceTypeMarker for NonnullableHandleArray {
6850 type Borrowed<'a> = &'a mut Self;
6851 fn take_or_borrow<'a>(
6852 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6853 ) -> Self::Borrowed<'a> {
6854 value
6855 }
6856 }
6857
6858 unsafe impl fidl::encoding::TypeMarker for NonnullableHandleArray {
6859 type Owned = Self;
6860
6861 #[inline(always)]
6862 fn inline_align(_context: fidl::encoding::Context) -> usize {
6863 4
6864 }
6865
6866 #[inline(always)]
6867 fn inline_size(_context: fidl::encoding::Context) -> usize {
6868 16
6869 }
6870 }
6871
6872 unsafe impl
6873 fidl::encoding::Encode<
6874 NonnullableHandleArray,
6875 fidl::encoding::DefaultFuchsiaResourceDialect,
6876 > for &mut NonnullableHandleArray
6877 {
6878 #[inline]
6879 unsafe fn encode(
6880 self,
6881 encoder: &mut fidl::encoding::Encoder<
6882 '_,
6883 fidl::encoding::DefaultFuchsiaResourceDialect,
6884 >,
6885 offset: usize,
6886 _depth: fidl::encoding::Depth,
6887 ) -> fidl::Result<()> {
6888 encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6889 fidl::encoding::Encode::<
6891 NonnullableHandleArray,
6892 fidl::encoding::DefaultFuchsiaResourceDialect,
6893 >::encode(
6894 (<fidl::encoding::Array<
6895 fidl::encoding::HandleType<
6896 fidl::Handle,
6897 { fidl::ObjectType::NONE.into_raw() },
6898 2147483648,
6899 >,
6900 4,
6901 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6902 &mut self.handles
6903 ),),
6904 encoder,
6905 offset,
6906 _depth,
6907 )
6908 }
6909 }
6910 unsafe impl<
6911 T0: fidl::encoding::Encode<
6912 fidl::encoding::Array<
6913 fidl::encoding::HandleType<
6914 fidl::Handle,
6915 { fidl::ObjectType::NONE.into_raw() },
6916 2147483648,
6917 >,
6918 4,
6919 >,
6920 fidl::encoding::DefaultFuchsiaResourceDialect,
6921 >,
6922 >
6923 fidl::encoding::Encode<
6924 NonnullableHandleArray,
6925 fidl::encoding::DefaultFuchsiaResourceDialect,
6926 > for (T0,)
6927 {
6928 #[inline]
6929 unsafe fn encode(
6930 self,
6931 encoder: &mut fidl::encoding::Encoder<
6932 '_,
6933 fidl::encoding::DefaultFuchsiaResourceDialect,
6934 >,
6935 offset: usize,
6936 depth: fidl::encoding::Depth,
6937 ) -> fidl::Result<()> {
6938 encoder.debug_check_bounds::<NonnullableHandleArray>(offset);
6939 self.0.encode(encoder, offset + 0, depth)?;
6943 Ok(())
6944 }
6945 }
6946
6947 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6948 for NonnullableHandleArray
6949 {
6950 #[inline(always)]
6951 fn new_empty() -> Self {
6952 Self {
6953 handles: fidl::new_empty!(
6954 fidl::encoding::Array<
6955 fidl::encoding::HandleType<
6956 fidl::Handle,
6957 { fidl::ObjectType::NONE.into_raw() },
6958 2147483648,
6959 >,
6960 4,
6961 >,
6962 fidl::encoding::DefaultFuchsiaResourceDialect
6963 ),
6964 }
6965 }
6966
6967 #[inline]
6968 unsafe fn decode(
6969 &mut self,
6970 decoder: &mut fidl::encoding::Decoder<
6971 '_,
6972 fidl::encoding::DefaultFuchsiaResourceDialect,
6973 >,
6974 offset: usize,
6975 _depth: fidl::encoding::Depth,
6976 ) -> fidl::Result<()> {
6977 decoder.debug_check_bounds::<Self>(offset);
6978 fidl::decode!(
6980 fidl::encoding::Array<
6981 fidl::encoding::HandleType<
6982 fidl::Handle,
6983 { fidl::ObjectType::NONE.into_raw() },
6984 2147483648,
6985 >,
6986 4,
6987 >,
6988 fidl::encoding::DefaultFuchsiaResourceDialect,
6989 &mut self.handles,
6990 decoder,
6991 offset + 0,
6992 _depth
6993 )?;
6994 Ok(())
6995 }
6996 }
6997
6998 impl fidl::encoding::ResourceTypeMarker for NullableHandle {
6999 type Borrowed<'a> = &'a mut Self;
7000 fn take_or_borrow<'a>(
7001 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7002 ) -> Self::Borrowed<'a> {
7003 value
7004 }
7005 }
7006
7007 unsafe impl fidl::encoding::TypeMarker for NullableHandle {
7008 type Owned = Self;
7009
7010 #[inline(always)]
7011 fn inline_align(_context: fidl::encoding::Context) -> usize {
7012 4
7013 }
7014
7015 #[inline(always)]
7016 fn inline_size(_context: fidl::encoding::Context) -> usize {
7017 4
7018 }
7019 }
7020
7021 unsafe impl
7022 fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7023 for &mut NullableHandle
7024 {
7025 #[inline]
7026 unsafe fn encode(
7027 self,
7028 encoder: &mut fidl::encoding::Encoder<
7029 '_,
7030 fidl::encoding::DefaultFuchsiaResourceDialect,
7031 >,
7032 offset: usize,
7033 _depth: fidl::encoding::Depth,
7034 ) -> fidl::Result<()> {
7035 encoder.debug_check_bounds::<NullableHandle>(offset);
7036 fidl::encoding::Encode::<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7038 (
7039 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7040 ),
7041 encoder, offset, _depth
7042 )
7043 }
7044 }
7045 unsafe impl<
7046 T0: fidl::encoding::Encode<
7047 fidl::encoding::Optional<
7048 fidl::encoding::HandleType<
7049 fidl::Handle,
7050 { fidl::ObjectType::NONE.into_raw() },
7051 2147483648,
7052 >,
7053 >,
7054 fidl::encoding::DefaultFuchsiaResourceDialect,
7055 >,
7056 > fidl::encoding::Encode<NullableHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7057 for (T0,)
7058 {
7059 #[inline]
7060 unsafe fn encode(
7061 self,
7062 encoder: &mut fidl::encoding::Encoder<
7063 '_,
7064 fidl::encoding::DefaultFuchsiaResourceDialect,
7065 >,
7066 offset: usize,
7067 depth: fidl::encoding::Depth,
7068 ) -> fidl::Result<()> {
7069 encoder.debug_check_bounds::<NullableHandle>(offset);
7070 self.0.encode(encoder, offset + 0, depth)?;
7074 Ok(())
7075 }
7076 }
7077
7078 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7079 for NullableHandle
7080 {
7081 #[inline(always)]
7082 fn new_empty() -> Self {
7083 Self {
7084 h: fidl::new_empty!(
7085 fidl::encoding::Optional<
7086 fidl::encoding::HandleType<
7087 fidl::Handle,
7088 { fidl::ObjectType::NONE.into_raw() },
7089 2147483648,
7090 >,
7091 >,
7092 fidl::encoding::DefaultFuchsiaResourceDialect
7093 ),
7094 }
7095 }
7096
7097 #[inline]
7098 unsafe fn decode(
7099 &mut self,
7100 decoder: &mut fidl::encoding::Decoder<
7101 '_,
7102 fidl::encoding::DefaultFuchsiaResourceDialect,
7103 >,
7104 offset: usize,
7105 _depth: fidl::encoding::Depth,
7106 ) -> fidl::Result<()> {
7107 decoder.debug_check_bounds::<Self>(offset);
7108 fidl::decode!(
7110 fidl::encoding::Optional<
7111 fidl::encoding::HandleType<
7112 fidl::Handle,
7113 { fidl::ObjectType::NONE.into_raw() },
7114 2147483648,
7115 >,
7116 >,
7117 fidl::encoding::DefaultFuchsiaResourceDialect,
7118 &mut self.h,
7119 decoder,
7120 offset + 0,
7121 _depth
7122 )?;
7123 Ok(())
7124 }
7125 }
7126
7127 impl fidl::encoding::ResourceTypeMarker for OutOfLineArrayOfNonnullableHandles {
7128 type Borrowed<'a> = &'a mut Self;
7129 fn take_or_borrow<'a>(
7130 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7131 ) -> Self::Borrowed<'a> {
7132 value
7133 }
7134 }
7135
7136 unsafe impl fidl::encoding::TypeMarker for OutOfLineArrayOfNonnullableHandles {
7137 type Owned = Self;
7138
7139 #[inline(always)]
7140 fn inline_align(_context: fidl::encoding::Context) -> usize {
7141 8
7142 }
7143
7144 #[inline(always)]
7145 fn inline_size(_context: fidl::encoding::Context) -> usize {
7146 8
7147 }
7148 }
7149
7150 unsafe impl
7151 fidl::encoding::Encode<
7152 OutOfLineArrayOfNonnullableHandles,
7153 fidl::encoding::DefaultFuchsiaResourceDialect,
7154 > for &mut OutOfLineArrayOfNonnullableHandles
7155 {
7156 #[inline]
7157 unsafe fn encode(
7158 self,
7159 encoder: &mut fidl::encoding::Encoder<
7160 '_,
7161 fidl::encoding::DefaultFuchsiaResourceDialect,
7162 >,
7163 offset: usize,
7164 _depth: fidl::encoding::Depth,
7165 ) -> fidl::Result<()> {
7166 encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7167 fidl::encoding::Encode::<OutOfLineArrayOfNonnullableHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7169 (
7170 <fidl::encoding::Boxed<NonnullableHandleArray> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.handles),
7171 ),
7172 encoder, offset, _depth
7173 )
7174 }
7175 }
7176 unsafe impl<
7177 T0: fidl::encoding::Encode<
7178 fidl::encoding::Boxed<NonnullableHandleArray>,
7179 fidl::encoding::DefaultFuchsiaResourceDialect,
7180 >,
7181 >
7182 fidl::encoding::Encode<
7183 OutOfLineArrayOfNonnullableHandles,
7184 fidl::encoding::DefaultFuchsiaResourceDialect,
7185 > for (T0,)
7186 {
7187 #[inline]
7188 unsafe fn encode(
7189 self,
7190 encoder: &mut fidl::encoding::Encoder<
7191 '_,
7192 fidl::encoding::DefaultFuchsiaResourceDialect,
7193 >,
7194 offset: usize,
7195 depth: fidl::encoding::Depth,
7196 ) -> fidl::Result<()> {
7197 encoder.debug_check_bounds::<OutOfLineArrayOfNonnullableHandles>(offset);
7198 self.0.encode(encoder, offset + 0, depth)?;
7202 Ok(())
7203 }
7204 }
7205
7206 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7207 for OutOfLineArrayOfNonnullableHandles
7208 {
7209 #[inline(always)]
7210 fn new_empty() -> Self {
7211 Self {
7212 handles: fidl::new_empty!(
7213 fidl::encoding::Boxed<NonnullableHandleArray>,
7214 fidl::encoding::DefaultFuchsiaResourceDialect
7215 ),
7216 }
7217 }
7218
7219 #[inline]
7220 unsafe fn decode(
7221 &mut self,
7222 decoder: &mut fidl::encoding::Decoder<
7223 '_,
7224 fidl::encoding::DefaultFuchsiaResourceDialect,
7225 >,
7226 offset: usize,
7227 _depth: fidl::encoding::Depth,
7228 ) -> fidl::Result<()> {
7229 decoder.debug_check_bounds::<Self>(offset);
7230 fidl::decode!(
7232 fidl::encoding::Boxed<NonnullableHandleArray>,
7233 fidl::encoding::DefaultFuchsiaResourceDialect,
7234 &mut self.handles,
7235 decoder,
7236 offset + 0,
7237 _depth
7238 )?;
7239 Ok(())
7240 }
7241 }
7242
7243 impl fidl::encoding::ResourceTypeMarker for Sandwich6 {
7244 type Borrowed<'a> = &'a mut Self;
7245 fn take_or_borrow<'a>(
7246 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7247 ) -> Self::Borrowed<'a> {
7248 value
7249 }
7250 }
7251
7252 unsafe impl fidl::encoding::TypeMarker for Sandwich6 {
7253 type Owned = Self;
7254
7255 #[inline(always)]
7256 fn inline_align(_context: fidl::encoding::Context) -> usize {
7257 8
7258 }
7259
7260 #[inline(always)]
7261 fn inline_size(_context: fidl::encoding::Context) -> usize {
7262 32
7263 }
7264 }
7265
7266 unsafe impl fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7267 for &mut Sandwich6
7268 {
7269 #[inline]
7270 unsafe fn encode(
7271 self,
7272 encoder: &mut fidl::encoding::Encoder<
7273 '_,
7274 fidl::encoding::DefaultFuchsiaResourceDialect,
7275 >,
7276 offset: usize,
7277 _depth: fidl::encoding::Depth,
7278 ) -> fidl::Result<()> {
7279 encoder.debug_check_bounds::<Sandwich6>(offset);
7280 fidl::encoding::Encode::<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7282 (
7283 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
7284 <UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.the_union),
7285 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
7286 ),
7287 encoder, offset, _depth
7288 )
7289 }
7290 }
7291 unsafe impl<
7292 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7293 T1: fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>,
7294 T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7295 > fidl::encoding::Encode<Sandwich6, fidl::encoding::DefaultFuchsiaResourceDialect>
7296 for (T0, T1, T2)
7297 {
7298 #[inline]
7299 unsafe fn encode(
7300 self,
7301 encoder: &mut fidl::encoding::Encoder<
7302 '_,
7303 fidl::encoding::DefaultFuchsiaResourceDialect,
7304 >,
7305 offset: usize,
7306 depth: fidl::encoding::Depth,
7307 ) -> fidl::Result<()> {
7308 encoder.debug_check_bounds::<Sandwich6>(offset);
7309 unsafe {
7312 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7313 (ptr as *mut u64).write_unaligned(0);
7314 }
7315 unsafe {
7316 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
7317 (ptr as *mut u64).write_unaligned(0);
7318 }
7319 self.0.encode(encoder, offset + 0, depth)?;
7321 self.1.encode(encoder, offset + 8, depth)?;
7322 self.2.encode(encoder, offset + 24, depth)?;
7323 Ok(())
7324 }
7325 }
7326
7327 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Sandwich6 {
7328 #[inline(always)]
7329 fn new_empty() -> Self {
7330 Self {
7331 before: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7332 the_union: fidl::new_empty!(
7333 UnionWithVector,
7334 fidl::encoding::DefaultFuchsiaResourceDialect
7335 ),
7336 after: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7337 }
7338 }
7339
7340 #[inline]
7341 unsafe fn decode(
7342 &mut self,
7343 decoder: &mut fidl::encoding::Decoder<
7344 '_,
7345 fidl::encoding::DefaultFuchsiaResourceDialect,
7346 >,
7347 offset: usize,
7348 _depth: fidl::encoding::Depth,
7349 ) -> fidl::Result<()> {
7350 decoder.debug_check_bounds::<Self>(offset);
7351 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7353 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7354 let mask = 0xffffffff00000000u64;
7355 let maskedval = padval & mask;
7356 if maskedval != 0 {
7357 return Err(fidl::Error::NonZeroPadding {
7358 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7359 });
7360 }
7361 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
7362 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7363 let mask = 0xffffffff00000000u64;
7364 let maskedval = padval & mask;
7365 if maskedval != 0 {
7366 return Err(fidl::Error::NonZeroPadding {
7367 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
7368 });
7369 }
7370 fidl::decode!(
7371 u32,
7372 fidl::encoding::DefaultFuchsiaResourceDialect,
7373 &mut self.before,
7374 decoder,
7375 offset + 0,
7376 _depth
7377 )?;
7378 fidl::decode!(
7379 UnionWithVector,
7380 fidl::encoding::DefaultFuchsiaResourceDialect,
7381 &mut self.the_union,
7382 decoder,
7383 offset + 8,
7384 _depth
7385 )?;
7386 fidl::decode!(
7387 u32,
7388 fidl::encoding::DefaultFuchsiaResourceDialect,
7389 &mut self.after,
7390 decoder,
7391 offset + 24,
7392 _depth
7393 )?;
7394 Ok(())
7395 }
7396 }
7397
7398 impl fidl::encoding::ResourceTypeMarker for ShortStringThenHandle {
7399 type Borrowed<'a> = &'a mut Self;
7400 fn take_or_borrow<'a>(
7401 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7402 ) -> Self::Borrowed<'a> {
7403 value
7404 }
7405 }
7406
7407 unsafe impl fidl::encoding::TypeMarker for ShortStringThenHandle {
7408 type Owned = Self;
7409
7410 #[inline(always)]
7411 fn inline_align(_context: fidl::encoding::Context) -> usize {
7412 8
7413 }
7414
7415 #[inline(always)]
7416 fn inline_size(_context: fidl::encoding::Context) -> usize {
7417 24
7418 }
7419 }
7420
7421 unsafe impl
7422 fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7423 for &mut ShortStringThenHandle
7424 {
7425 #[inline]
7426 unsafe fn encode(
7427 self,
7428 encoder: &mut fidl::encoding::Encoder<
7429 '_,
7430 fidl::encoding::DefaultFuchsiaResourceDialect,
7431 >,
7432 offset: usize,
7433 _depth: fidl::encoding::Depth,
7434 ) -> fidl::Result<()> {
7435 encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7436 fidl::encoding::Encode::<
7438 ShortStringThenHandle,
7439 fidl::encoding::DefaultFuchsiaResourceDialect,
7440 >::encode(
7441 (
7442 <fidl::encoding::BoundedString<1> as fidl::encoding::ValueTypeMarker>::borrow(
7443 &self.s,
7444 ),
7445 <fidl::encoding::HandleType<
7446 fidl::Handle,
7447 { fidl::ObjectType::NONE.into_raw() },
7448 2147483648,
7449 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7450 &mut self.h
7451 ),
7452 ),
7453 encoder,
7454 offset,
7455 _depth,
7456 )
7457 }
7458 }
7459 unsafe impl<
7460 T0: fidl::encoding::Encode<
7461 fidl::encoding::BoundedString<1>,
7462 fidl::encoding::DefaultFuchsiaResourceDialect,
7463 >,
7464 T1: fidl::encoding::Encode<
7465 fidl::encoding::HandleType<
7466 fidl::Handle,
7467 { fidl::ObjectType::NONE.into_raw() },
7468 2147483648,
7469 >,
7470 fidl::encoding::DefaultFuchsiaResourceDialect,
7471 >,
7472 >
7473 fidl::encoding::Encode<ShortStringThenHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7474 for (T0, T1)
7475 {
7476 #[inline]
7477 unsafe fn encode(
7478 self,
7479 encoder: &mut fidl::encoding::Encoder<
7480 '_,
7481 fidl::encoding::DefaultFuchsiaResourceDialect,
7482 >,
7483 offset: usize,
7484 depth: fidl::encoding::Depth,
7485 ) -> fidl::Result<()> {
7486 encoder.debug_check_bounds::<ShortStringThenHandle>(offset);
7487 unsafe {
7490 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7491 (ptr as *mut u64).write_unaligned(0);
7492 }
7493 self.0.encode(encoder, offset + 0, depth)?;
7495 self.1.encode(encoder, offset + 16, depth)?;
7496 Ok(())
7497 }
7498 }
7499
7500 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7501 for ShortStringThenHandle
7502 {
7503 #[inline(always)]
7504 fn new_empty() -> Self {
7505 Self {
7506 s: fidl::new_empty!(
7507 fidl::encoding::BoundedString<1>,
7508 fidl::encoding::DefaultFuchsiaResourceDialect
7509 ),
7510 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7511 }
7512 }
7513
7514 #[inline]
7515 unsafe fn decode(
7516 &mut self,
7517 decoder: &mut fidl::encoding::Decoder<
7518 '_,
7519 fidl::encoding::DefaultFuchsiaResourceDialect,
7520 >,
7521 offset: usize,
7522 _depth: fidl::encoding::Depth,
7523 ) -> fidl::Result<()> {
7524 decoder.debug_check_bounds::<Self>(offset);
7525 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7527 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7528 let mask = 0xffffffff00000000u64;
7529 let maskedval = padval & mask;
7530 if maskedval != 0 {
7531 return Err(fidl::Error::NonZeroPadding {
7532 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7533 });
7534 }
7535 fidl::decode!(
7536 fidl::encoding::BoundedString<1>,
7537 fidl::encoding::DefaultFuchsiaResourceDialect,
7538 &mut self.s,
7539 decoder,
7540 offset + 0,
7541 _depth
7542 )?;
7543 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 16, _depth)?;
7544 Ok(())
7545 }
7546 }
7547
7548 impl fidl::encoding::ResourceTypeMarker for SingleHandle {
7549 type Borrowed<'a> = &'a mut Self;
7550 fn take_or_borrow<'a>(
7551 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7552 ) -> Self::Borrowed<'a> {
7553 value
7554 }
7555 }
7556
7557 unsafe impl fidl::encoding::TypeMarker for SingleHandle {
7558 type Owned = Self;
7559
7560 #[inline(always)]
7561 fn inline_align(_context: fidl::encoding::Context) -> usize {
7562 4
7563 }
7564
7565 #[inline(always)]
7566 fn inline_size(_context: fidl::encoding::Context) -> usize {
7567 4
7568 }
7569 }
7570
7571 unsafe impl fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7572 for &mut SingleHandle
7573 {
7574 #[inline]
7575 unsafe fn encode(
7576 self,
7577 encoder: &mut fidl::encoding::Encoder<
7578 '_,
7579 fidl::encoding::DefaultFuchsiaResourceDialect,
7580 >,
7581 offset: usize,
7582 _depth: fidl::encoding::Depth,
7583 ) -> fidl::Result<()> {
7584 encoder.debug_check_bounds::<SingleHandle>(offset);
7585 fidl::encoding::Encode::<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7587 (
7588 <fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.h),
7589 ),
7590 encoder, offset, _depth
7591 )
7592 }
7593 }
7594 unsafe impl<
7595 T0: fidl::encoding::Encode<
7596 fidl::encoding::HandleType<
7597 fidl::Handle,
7598 { fidl::ObjectType::NONE.into_raw() },
7599 2147483648,
7600 >,
7601 fidl::encoding::DefaultFuchsiaResourceDialect,
7602 >,
7603 > fidl::encoding::Encode<SingleHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7604 for (T0,)
7605 {
7606 #[inline]
7607 unsafe fn encode(
7608 self,
7609 encoder: &mut fidl::encoding::Encoder<
7610 '_,
7611 fidl::encoding::DefaultFuchsiaResourceDialect,
7612 >,
7613 offset: usize,
7614 depth: fidl::encoding::Depth,
7615 ) -> fidl::Result<()> {
7616 encoder.debug_check_bounds::<SingleHandle>(offset);
7617 self.0.encode(encoder, offset + 0, depth)?;
7621 Ok(())
7622 }
7623 }
7624
7625 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SingleHandle {
7626 #[inline(always)]
7627 fn new_empty() -> Self {
7628 Self {
7629 h: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7630 }
7631 }
7632
7633 #[inline]
7634 unsafe fn decode(
7635 &mut self,
7636 decoder: &mut fidl::encoding::Decoder<
7637 '_,
7638 fidl::encoding::DefaultFuchsiaResourceDialect,
7639 >,
7640 offset: usize,
7641 _depth: fidl::encoding::Depth,
7642 ) -> fidl::Result<()> {
7643 decoder.debug_check_bounds::<Self>(offset);
7644 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.h, decoder, offset + 0, _depth)?;
7646 Ok(())
7647 }
7648 }
7649
7650 impl fidl::encoding::ResourceTypeMarker for SingleOptionalHandle {
7651 type Borrowed<'a> = &'a mut Self;
7652 fn take_or_borrow<'a>(
7653 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7654 ) -> Self::Borrowed<'a> {
7655 value
7656 }
7657 }
7658
7659 unsafe impl fidl::encoding::TypeMarker for SingleOptionalHandle {
7660 type Owned = Self;
7661
7662 #[inline(always)]
7663 fn inline_align(_context: fidl::encoding::Context) -> usize {
7664 4
7665 }
7666
7667 #[inline(always)]
7668 fn inline_size(_context: fidl::encoding::Context) -> usize {
7669 4
7670 }
7671 }
7672
7673 unsafe impl
7674 fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7675 for &mut SingleOptionalHandle
7676 {
7677 #[inline]
7678 unsafe fn encode(
7679 self,
7680 encoder: &mut fidl::encoding::Encoder<
7681 '_,
7682 fidl::encoding::DefaultFuchsiaResourceDialect,
7683 >,
7684 offset: usize,
7685 _depth: fidl::encoding::Depth,
7686 ) -> fidl::Result<()> {
7687 encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7688 fidl::encoding::Encode::<
7690 SingleOptionalHandle,
7691 fidl::encoding::DefaultFuchsiaResourceDialect,
7692 >::encode(
7693 (<fidl::encoding::Optional<
7694 fidl::encoding::HandleType<
7695 fidl::Handle,
7696 { fidl::ObjectType::NONE.into_raw() },
7697 2147483648,
7698 >,
7699 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7700 &mut self.h
7701 ),),
7702 encoder,
7703 offset,
7704 _depth,
7705 )
7706 }
7707 }
7708 unsafe impl<
7709 T0: fidl::encoding::Encode<
7710 fidl::encoding::Optional<
7711 fidl::encoding::HandleType<
7712 fidl::Handle,
7713 { fidl::ObjectType::NONE.into_raw() },
7714 2147483648,
7715 >,
7716 >,
7717 fidl::encoding::DefaultFuchsiaResourceDialect,
7718 >,
7719 >
7720 fidl::encoding::Encode<SingleOptionalHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
7721 for (T0,)
7722 {
7723 #[inline]
7724 unsafe fn encode(
7725 self,
7726 encoder: &mut fidl::encoding::Encoder<
7727 '_,
7728 fidl::encoding::DefaultFuchsiaResourceDialect,
7729 >,
7730 offset: usize,
7731 depth: fidl::encoding::Depth,
7732 ) -> fidl::Result<()> {
7733 encoder.debug_check_bounds::<SingleOptionalHandle>(offset);
7734 self.0.encode(encoder, offset + 0, depth)?;
7738 Ok(())
7739 }
7740 }
7741
7742 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7743 for SingleOptionalHandle
7744 {
7745 #[inline(always)]
7746 fn new_empty() -> Self {
7747 Self {
7748 h: fidl::new_empty!(
7749 fidl::encoding::Optional<
7750 fidl::encoding::HandleType<
7751 fidl::Handle,
7752 { fidl::ObjectType::NONE.into_raw() },
7753 2147483648,
7754 >,
7755 >,
7756 fidl::encoding::DefaultFuchsiaResourceDialect
7757 ),
7758 }
7759 }
7760
7761 #[inline]
7762 unsafe fn decode(
7763 &mut self,
7764 decoder: &mut fidl::encoding::Decoder<
7765 '_,
7766 fidl::encoding::DefaultFuchsiaResourceDialect,
7767 >,
7768 offset: usize,
7769 _depth: fidl::encoding::Depth,
7770 ) -> fidl::Result<()> {
7771 decoder.debug_check_bounds::<Self>(offset);
7772 fidl::decode!(
7774 fidl::encoding::Optional<
7775 fidl::encoding::HandleType<
7776 fidl::Handle,
7777 { fidl::ObjectType::NONE.into_raw() },
7778 2147483648,
7779 >,
7780 >,
7781 fidl::encoding::DefaultFuchsiaResourceDialect,
7782 &mut self.h,
7783 decoder,
7784 offset + 0,
7785 _depth
7786 )?;
7787 Ok(())
7788 }
7789 }
7790
7791 impl fidl::encoding::ResourceTypeMarker for StructOfEndpoints {
7792 type Borrowed<'a> = &'a mut Self;
7793 fn take_or_borrow<'a>(
7794 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7795 ) -> Self::Borrowed<'a> {
7796 value
7797 }
7798 }
7799
7800 unsafe impl fidl::encoding::TypeMarker for StructOfEndpoints {
7801 type Owned = Self;
7802
7803 #[inline(always)]
7804 fn inline_align(_context: fidl::encoding::Context) -> usize {
7805 4
7806 }
7807
7808 #[inline(always)]
7809 fn inline_size(_context: fidl::encoding::Context) -> usize {
7810 16
7811 }
7812 }
7813
7814 unsafe impl
7815 fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7816 for &mut StructOfEndpoints
7817 {
7818 #[inline]
7819 unsafe fn encode(
7820 self,
7821 encoder: &mut fidl::encoding::Encoder<
7822 '_,
7823 fidl::encoding::DefaultFuchsiaResourceDialect,
7824 >,
7825 offset: usize,
7826 _depth: fidl::encoding::Depth,
7827 ) -> fidl::Result<()> {
7828 encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7829 fidl::encoding::Encode::<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7831 (
7832 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.client_end),
7833 <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_client_end),
7834 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_end),
7835 <fidl::encoding::Optional<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.optional_server_end),
7836 ),
7837 encoder, offset, _depth
7838 )
7839 }
7840 }
7841 unsafe impl<
7842 T0: fidl::encoding::Encode<
7843 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7844 fidl::encoding::DefaultFuchsiaResourceDialect,
7845 >,
7846 T1: fidl::encoding::Encode<
7847 fidl::encoding::Optional<
7848 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7849 >,
7850 fidl::encoding::DefaultFuchsiaResourceDialect,
7851 >,
7852 T2: fidl::encoding::Encode<
7853 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7854 fidl::encoding::DefaultFuchsiaResourceDialect,
7855 >,
7856 T3: fidl::encoding::Encode<
7857 fidl::encoding::Optional<
7858 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7859 >,
7860 fidl::encoding::DefaultFuchsiaResourceDialect,
7861 >,
7862 >
7863 fidl::encoding::Encode<StructOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
7864 for (T0, T1, T2, T3)
7865 {
7866 #[inline]
7867 unsafe fn encode(
7868 self,
7869 encoder: &mut fidl::encoding::Encoder<
7870 '_,
7871 fidl::encoding::DefaultFuchsiaResourceDialect,
7872 >,
7873 offset: usize,
7874 depth: fidl::encoding::Depth,
7875 ) -> fidl::Result<()> {
7876 encoder.debug_check_bounds::<StructOfEndpoints>(offset);
7877 self.0.encode(encoder, offset + 0, depth)?;
7881 self.1.encode(encoder, offset + 4, depth)?;
7882 self.2.encode(encoder, offset + 8, depth)?;
7883 self.3.encode(encoder, offset + 12, depth)?;
7884 Ok(())
7885 }
7886 }
7887
7888 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7889 for StructOfEndpoints
7890 {
7891 #[inline(always)]
7892 fn new_empty() -> Self {
7893 Self {
7894 client_end: fidl::new_empty!(
7895 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7896 fidl::encoding::DefaultFuchsiaResourceDialect
7897 ),
7898 optional_client_end: fidl::new_empty!(
7899 fidl::encoding::Optional<
7900 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7901 >,
7902 fidl::encoding::DefaultFuchsiaResourceDialect
7903 ),
7904 server_end: fidl::new_empty!(
7905 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7906 fidl::encoding::DefaultFuchsiaResourceDialect
7907 ),
7908 optional_server_end: fidl::new_empty!(
7909 fidl::encoding::Optional<
7910 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7911 >,
7912 fidl::encoding::DefaultFuchsiaResourceDialect
7913 ),
7914 }
7915 }
7916
7917 #[inline]
7918 unsafe fn decode(
7919 &mut self,
7920 decoder: &mut fidl::encoding::Decoder<
7921 '_,
7922 fidl::encoding::DefaultFuchsiaResourceDialect,
7923 >,
7924 offset: usize,
7925 _depth: fidl::encoding::Depth,
7926 ) -> fidl::Result<()> {
7927 decoder.debug_check_bounds::<Self>(offset);
7928 fidl::decode!(
7930 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7931 fidl::encoding::DefaultFuchsiaResourceDialect,
7932 &mut self.client_end,
7933 decoder,
7934 offset + 0,
7935 _depth
7936 )?;
7937 fidl::decode!(
7938 fidl::encoding::Optional<
7939 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
7940 >,
7941 fidl::encoding::DefaultFuchsiaResourceDialect,
7942 &mut self.optional_client_end,
7943 decoder,
7944 offset + 4,
7945 _depth
7946 )?;
7947 fidl::decode!(
7948 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7949 fidl::encoding::DefaultFuchsiaResourceDialect,
7950 &mut self.server_end,
7951 decoder,
7952 offset + 8,
7953 _depth
7954 )?;
7955 fidl::decode!(
7956 fidl::encoding::Optional<
7957 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
7958 >,
7959 fidl::encoding::DefaultFuchsiaResourceDialect,
7960 &mut self.optional_server_end,
7961 decoder,
7962 offset + 12,
7963 _depth
7964 )?;
7965 Ok(())
7966 }
7967 }
7968
7969 impl fidl::encoding::ResourceTypeMarker for StructOfOptionalUnionOfHandle {
7970 type Borrowed<'a> = &'a mut Self;
7971 fn take_or_borrow<'a>(
7972 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7973 ) -> Self::Borrowed<'a> {
7974 value
7975 }
7976 }
7977
7978 unsafe impl fidl::encoding::TypeMarker for StructOfOptionalUnionOfHandle {
7979 type Owned = Self;
7980
7981 #[inline(always)]
7982 fn inline_align(_context: fidl::encoding::Context) -> usize {
7983 8
7984 }
7985
7986 #[inline(always)]
7987 fn inline_size(_context: fidl::encoding::Context) -> usize {
7988 16
7989 }
7990 }
7991
7992 unsafe impl
7993 fidl::encoding::Encode<
7994 StructOfOptionalUnionOfHandle,
7995 fidl::encoding::DefaultFuchsiaResourceDialect,
7996 > for &mut StructOfOptionalUnionOfHandle
7997 {
7998 #[inline]
7999 unsafe fn encode(
8000 self,
8001 encoder: &mut fidl::encoding::Encoder<
8002 '_,
8003 fidl::encoding::DefaultFuchsiaResourceDialect,
8004 >,
8005 offset: usize,
8006 _depth: fidl::encoding::Depth,
8007 ) -> fidl::Result<()> {
8008 encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8009 fidl::encoding::Encode::<StructOfOptionalUnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8011 (
8012 <fidl::encoding::OptionalUnion<UnionOfHandle> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
8013 ),
8014 encoder, offset, _depth
8015 )
8016 }
8017 }
8018 unsafe impl<
8019 T0: fidl::encoding::Encode<
8020 fidl::encoding::OptionalUnion<UnionOfHandle>,
8021 fidl::encoding::DefaultFuchsiaResourceDialect,
8022 >,
8023 >
8024 fidl::encoding::Encode<
8025 StructOfOptionalUnionOfHandle,
8026 fidl::encoding::DefaultFuchsiaResourceDialect,
8027 > for (T0,)
8028 {
8029 #[inline]
8030 unsafe fn encode(
8031 self,
8032 encoder: &mut fidl::encoding::Encoder<
8033 '_,
8034 fidl::encoding::DefaultFuchsiaResourceDialect,
8035 >,
8036 offset: usize,
8037 depth: fidl::encoding::Depth,
8038 ) -> fidl::Result<()> {
8039 encoder.debug_check_bounds::<StructOfOptionalUnionOfHandle>(offset);
8040 self.0.encode(encoder, offset + 0, depth)?;
8044 Ok(())
8045 }
8046 }
8047
8048 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8049 for StructOfOptionalUnionOfHandle
8050 {
8051 #[inline(always)]
8052 fn new_empty() -> Self {
8053 Self {
8054 u: fidl::new_empty!(
8055 fidl::encoding::OptionalUnion<UnionOfHandle>,
8056 fidl::encoding::DefaultFuchsiaResourceDialect
8057 ),
8058 }
8059 }
8060
8061 #[inline]
8062 unsafe fn decode(
8063 &mut self,
8064 decoder: &mut fidl::encoding::Decoder<
8065 '_,
8066 fidl::encoding::DefaultFuchsiaResourceDialect,
8067 >,
8068 offset: usize,
8069 _depth: fidl::encoding::Depth,
8070 ) -> fidl::Result<()> {
8071 decoder.debug_check_bounds::<Self>(offset);
8072 fidl::decode!(
8074 fidl::encoding::OptionalUnion<UnionOfHandle>,
8075 fidl::encoding::DefaultFuchsiaResourceDialect,
8076 &mut self.u,
8077 decoder,
8078 offset + 0,
8079 _depth
8080 )?;
8081 Ok(())
8082 }
8083 }
8084
8085 impl fidl::encoding::ResourceTypeMarker for StructOfSimpleResourceTable {
8086 type Borrowed<'a> = &'a mut Self;
8087 fn take_or_borrow<'a>(
8088 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8089 ) -> Self::Borrowed<'a> {
8090 value
8091 }
8092 }
8093
8094 unsafe impl fidl::encoding::TypeMarker for StructOfSimpleResourceTable {
8095 type Owned = Self;
8096
8097 #[inline(always)]
8098 fn inline_align(_context: fidl::encoding::Context) -> usize {
8099 8
8100 }
8101
8102 #[inline(always)]
8103 fn inline_size(_context: fidl::encoding::Context) -> usize {
8104 16
8105 }
8106 }
8107
8108 unsafe impl
8109 fidl::encoding::Encode<
8110 StructOfSimpleResourceTable,
8111 fidl::encoding::DefaultFuchsiaResourceDialect,
8112 > for &mut StructOfSimpleResourceTable
8113 {
8114 #[inline]
8115 unsafe fn encode(
8116 self,
8117 encoder: &mut fidl::encoding::Encoder<
8118 '_,
8119 fidl::encoding::DefaultFuchsiaResourceDialect,
8120 >,
8121 offset: usize,
8122 _depth: fidl::encoding::Depth,
8123 ) -> fidl::Result<()> {
8124 encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8125 fidl::encoding::Encode::<
8127 StructOfSimpleResourceTable,
8128 fidl::encoding::DefaultFuchsiaResourceDialect,
8129 >::encode(
8130 (<SimpleResourceTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8131 &mut self.table,
8132 ),),
8133 encoder,
8134 offset,
8135 _depth,
8136 )
8137 }
8138 }
8139 unsafe impl<
8140 T0: fidl::encoding::Encode<
8141 SimpleResourceTable,
8142 fidl::encoding::DefaultFuchsiaResourceDialect,
8143 >,
8144 >
8145 fidl::encoding::Encode<
8146 StructOfSimpleResourceTable,
8147 fidl::encoding::DefaultFuchsiaResourceDialect,
8148 > for (T0,)
8149 {
8150 #[inline]
8151 unsafe fn encode(
8152 self,
8153 encoder: &mut fidl::encoding::Encoder<
8154 '_,
8155 fidl::encoding::DefaultFuchsiaResourceDialect,
8156 >,
8157 offset: usize,
8158 depth: fidl::encoding::Depth,
8159 ) -> fidl::Result<()> {
8160 encoder.debug_check_bounds::<StructOfSimpleResourceTable>(offset);
8161 self.0.encode(encoder, offset + 0, depth)?;
8165 Ok(())
8166 }
8167 }
8168
8169 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8170 for StructOfSimpleResourceTable
8171 {
8172 #[inline(always)]
8173 fn new_empty() -> Self {
8174 Self {
8175 table: fidl::new_empty!(
8176 SimpleResourceTable,
8177 fidl::encoding::DefaultFuchsiaResourceDialect
8178 ),
8179 }
8180 }
8181
8182 #[inline]
8183 unsafe fn decode(
8184 &mut self,
8185 decoder: &mut fidl::encoding::Decoder<
8186 '_,
8187 fidl::encoding::DefaultFuchsiaResourceDialect,
8188 >,
8189 offset: usize,
8190 _depth: fidl::encoding::Depth,
8191 ) -> fidl::Result<()> {
8192 decoder.debug_check_bounds::<Self>(offset);
8193 fidl::decode!(
8195 SimpleResourceTable,
8196 fidl::encoding::DefaultFuchsiaResourceDialect,
8197 &mut self.table,
8198 decoder,
8199 offset + 0,
8200 _depth
8201 )?;
8202 Ok(())
8203 }
8204 }
8205
8206 impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandleStruct {
8207 type Borrowed<'a> = &'a mut Self;
8208 fn take_or_borrow<'a>(
8209 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8210 ) -> Self::Borrowed<'a> {
8211 value
8212 }
8213 }
8214
8215 unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandleStruct {
8216 type Owned = Self;
8217
8218 #[inline(always)]
8219 fn inline_align(_context: fidl::encoding::Context) -> usize {
8220 8
8221 }
8222
8223 #[inline(always)]
8224 fn inline_size(_context: fidl::encoding::Context) -> usize {
8225 16
8226 }
8227 }
8228
8229 unsafe impl
8230 fidl::encoding::Encode<
8231 TableFieldInlinedHandleStruct,
8232 fidl::encoding::DefaultFuchsiaResourceDialect,
8233 > for &mut TableFieldInlinedHandleStruct
8234 {
8235 #[inline]
8236 unsafe fn encode(
8237 self,
8238 encoder: &mut fidl::encoding::Encoder<
8239 '_,
8240 fidl::encoding::DefaultFuchsiaResourceDialect,
8241 >,
8242 offset: usize,
8243 _depth: fidl::encoding::Depth,
8244 ) -> fidl::Result<()> {
8245 encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8246 fidl::encoding::Encode::<
8248 TableFieldInlinedHandleStruct,
8249 fidl::encoding::DefaultFuchsiaResourceDialect,
8250 >::encode(
8251 (<TableFieldInlinedHandle as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8252 &mut self.t,
8253 ),),
8254 encoder,
8255 offset,
8256 _depth,
8257 )
8258 }
8259 }
8260 unsafe impl<
8261 T0: fidl::encoding::Encode<
8262 TableFieldInlinedHandle,
8263 fidl::encoding::DefaultFuchsiaResourceDialect,
8264 >,
8265 >
8266 fidl::encoding::Encode<
8267 TableFieldInlinedHandleStruct,
8268 fidl::encoding::DefaultFuchsiaResourceDialect,
8269 > for (T0,)
8270 {
8271 #[inline]
8272 unsafe fn encode(
8273 self,
8274 encoder: &mut fidl::encoding::Encoder<
8275 '_,
8276 fidl::encoding::DefaultFuchsiaResourceDialect,
8277 >,
8278 offset: usize,
8279 depth: fidl::encoding::Depth,
8280 ) -> fidl::Result<()> {
8281 encoder.debug_check_bounds::<TableFieldInlinedHandleStruct>(offset);
8282 self.0.encode(encoder, offset + 0, depth)?;
8286 Ok(())
8287 }
8288 }
8289
8290 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8291 for TableFieldInlinedHandleStruct
8292 {
8293 #[inline(always)]
8294 fn new_empty() -> Self {
8295 Self {
8296 t: fidl::new_empty!(
8297 TableFieldInlinedHandle,
8298 fidl::encoding::DefaultFuchsiaResourceDialect
8299 ),
8300 }
8301 }
8302
8303 #[inline]
8304 unsafe fn decode(
8305 &mut self,
8306 decoder: &mut fidl::encoding::Decoder<
8307 '_,
8308 fidl::encoding::DefaultFuchsiaResourceDialect,
8309 >,
8310 offset: usize,
8311 _depth: fidl::encoding::Depth,
8312 ) -> fidl::Result<()> {
8313 decoder.debug_check_bounds::<Self>(offset);
8314 fidl::decode!(
8316 TableFieldInlinedHandle,
8317 fidl::encoding::DefaultFuchsiaResourceDialect,
8318 &mut self.t,
8319 decoder,
8320 offset + 0,
8321 _depth
8322 )?;
8323 Ok(())
8324 }
8325 }
8326
8327 impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResourceStruct {
8328 type Borrowed<'a> = &'a mut Self;
8329 fn take_or_borrow<'a>(
8330 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8331 ) -> Self::Borrowed<'a> {
8332 value
8333 }
8334 }
8335
8336 unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResourceStruct {
8337 type Owned = Self;
8338
8339 #[inline(always)]
8340 fn inline_align(_context: fidl::encoding::Context) -> usize {
8341 8
8342 }
8343
8344 #[inline(always)]
8345 fn inline_size(_context: fidl::encoding::Context) -> usize {
8346 16
8347 }
8348 }
8349
8350 unsafe impl
8351 fidl::encoding::Encode<
8352 TableFieldUnknownResourceStruct,
8353 fidl::encoding::DefaultFuchsiaResourceDialect,
8354 > for &mut TableFieldUnknownResourceStruct
8355 {
8356 #[inline]
8357 unsafe fn encode(
8358 self,
8359 encoder: &mut fidl::encoding::Encoder<
8360 '_,
8361 fidl::encoding::DefaultFuchsiaResourceDialect,
8362 >,
8363 offset: usize,
8364 _depth: fidl::encoding::Depth,
8365 ) -> fidl::Result<()> {
8366 encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8367 fidl::encoding::Encode::<TableFieldUnknownResourceStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8369 (
8370 <TableFieldUnknownResource as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8371 ),
8372 encoder, offset, _depth
8373 )
8374 }
8375 }
8376 unsafe impl<
8377 T0: fidl::encoding::Encode<
8378 TableFieldUnknownResource,
8379 fidl::encoding::DefaultFuchsiaResourceDialect,
8380 >,
8381 >
8382 fidl::encoding::Encode<
8383 TableFieldUnknownResourceStruct,
8384 fidl::encoding::DefaultFuchsiaResourceDialect,
8385 > for (T0,)
8386 {
8387 #[inline]
8388 unsafe fn encode(
8389 self,
8390 encoder: &mut fidl::encoding::Encoder<
8391 '_,
8392 fidl::encoding::DefaultFuchsiaResourceDialect,
8393 >,
8394 offset: usize,
8395 depth: fidl::encoding::Depth,
8396 ) -> fidl::Result<()> {
8397 encoder.debug_check_bounds::<TableFieldUnknownResourceStruct>(offset);
8398 self.0.encode(encoder, offset + 0, depth)?;
8402 Ok(())
8403 }
8404 }
8405
8406 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8407 for TableFieldUnknownResourceStruct
8408 {
8409 #[inline(always)]
8410 fn new_empty() -> Self {
8411 Self {
8412 t: fidl::new_empty!(
8413 TableFieldUnknownResource,
8414 fidl::encoding::DefaultFuchsiaResourceDialect
8415 ),
8416 }
8417 }
8418
8419 #[inline]
8420 unsafe fn decode(
8421 &mut self,
8422 decoder: &mut fidl::encoding::Decoder<
8423 '_,
8424 fidl::encoding::DefaultFuchsiaResourceDialect,
8425 >,
8426 offset: usize,
8427 _depth: fidl::encoding::Depth,
8428 ) -> fidl::Result<()> {
8429 decoder.debug_check_bounds::<Self>(offset);
8430 fidl::decode!(
8432 TableFieldUnknownResource,
8433 fidl::encoding::DefaultFuchsiaResourceDialect,
8434 &mut self.t,
8435 decoder,
8436 offset + 0,
8437 _depth
8438 )?;
8439 Ok(())
8440 }
8441 }
8442
8443 impl fidl::encoding::ResourceTypeMarker for TableOfEndpoints {
8444 type Borrowed<'a> = &'a mut Self;
8445 fn take_or_borrow<'a>(
8446 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8447 ) -> Self::Borrowed<'a> {
8448 value
8449 }
8450 }
8451
8452 unsafe impl fidl::encoding::TypeMarker for TableOfEndpoints {
8453 type Owned = Self;
8454
8455 #[inline(always)]
8456 fn inline_align(_context: fidl::encoding::Context) -> usize {
8457 8
8458 }
8459
8460 #[inline(always)]
8461 fn inline_size(_context: fidl::encoding::Context) -> usize {
8462 16
8463 }
8464 }
8465
8466 unsafe impl
8467 fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8468 for &mut TableOfEndpoints
8469 {
8470 #[inline]
8471 unsafe fn encode(
8472 self,
8473 encoder: &mut fidl::encoding::Encoder<
8474 '_,
8475 fidl::encoding::DefaultFuchsiaResourceDialect,
8476 >,
8477 offset: usize,
8478 _depth: fidl::encoding::Depth,
8479 ) -> fidl::Result<()> {
8480 encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8481 fidl::encoding::Encode::<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8483 (
8484 <TableOfEndpointsTable as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
8485 ),
8486 encoder, offset, _depth
8487 )
8488 }
8489 }
8490 unsafe impl<
8491 T0: fidl::encoding::Encode<
8492 TableOfEndpointsTable,
8493 fidl::encoding::DefaultFuchsiaResourceDialect,
8494 >,
8495 >
8496 fidl::encoding::Encode<TableOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
8497 for (T0,)
8498 {
8499 #[inline]
8500 unsafe fn encode(
8501 self,
8502 encoder: &mut fidl::encoding::Encoder<
8503 '_,
8504 fidl::encoding::DefaultFuchsiaResourceDialect,
8505 >,
8506 offset: usize,
8507 depth: fidl::encoding::Depth,
8508 ) -> fidl::Result<()> {
8509 encoder.debug_check_bounds::<TableOfEndpoints>(offset);
8510 self.0.encode(encoder, offset + 0, depth)?;
8514 Ok(())
8515 }
8516 }
8517
8518 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8519 for TableOfEndpoints
8520 {
8521 #[inline(always)]
8522 fn new_empty() -> Self {
8523 Self {
8524 t: fidl::new_empty!(
8525 TableOfEndpointsTable,
8526 fidl::encoding::DefaultFuchsiaResourceDialect
8527 ),
8528 }
8529 }
8530
8531 #[inline]
8532 unsafe fn decode(
8533 &mut self,
8534 decoder: &mut fidl::encoding::Decoder<
8535 '_,
8536 fidl::encoding::DefaultFuchsiaResourceDialect,
8537 >,
8538 offset: usize,
8539 _depth: fidl::encoding::Depth,
8540 ) -> fidl::Result<()> {
8541 decoder.debug_check_bounds::<Self>(offset);
8542 fidl::decode!(
8544 TableOfEndpointsTable,
8545 fidl::encoding::DefaultFuchsiaResourceDialect,
8546 &mut self.t,
8547 decoder,
8548 offset + 0,
8549 _depth
8550 )?;
8551 Ok(())
8552 }
8553 }
8554
8555 impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwichStruct {
8556 type Borrowed<'a> = &'a mut Self;
8557 fn take_or_borrow<'a>(
8558 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8559 ) -> Self::Borrowed<'a> {
8560 value
8561 }
8562 }
8563
8564 unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwichStruct {
8565 type Owned = Self;
8566
8567 #[inline(always)]
8568 fn inline_align(_context: fidl::encoding::Context) -> usize {
8569 8
8570 }
8571
8572 #[inline(always)]
8573 fn inline_size(_context: fidl::encoding::Context) -> usize {
8574 16
8575 }
8576 }
8577
8578 unsafe impl
8579 fidl::encoding::Encode<
8580 TableUnionWithVectorReservedSandwichStruct,
8581 fidl::encoding::DefaultFuchsiaResourceDialect,
8582 > for &mut TableUnionWithVectorReservedSandwichStruct
8583 {
8584 #[inline]
8585 unsafe fn encode(
8586 self,
8587 encoder: &mut fidl::encoding::Encoder<
8588 '_,
8589 fidl::encoding::DefaultFuchsiaResourceDialect,
8590 >,
8591 offset: usize,
8592 _depth: fidl::encoding::Depth,
8593 ) -> fidl::Result<()> {
8594 encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8595 fidl::encoding::Encode::<TableUnionWithVectorReservedSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8597 (
8598 <TableUnionWithVectorReservedSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8599 ),
8600 encoder, offset, _depth
8601 )
8602 }
8603 }
8604 unsafe impl<
8605 T0: fidl::encoding::Encode<
8606 TableUnionWithVectorReservedSandwich,
8607 fidl::encoding::DefaultFuchsiaResourceDialect,
8608 >,
8609 >
8610 fidl::encoding::Encode<
8611 TableUnionWithVectorReservedSandwichStruct,
8612 fidl::encoding::DefaultFuchsiaResourceDialect,
8613 > for (T0,)
8614 {
8615 #[inline]
8616 unsafe fn encode(
8617 self,
8618 encoder: &mut fidl::encoding::Encoder<
8619 '_,
8620 fidl::encoding::DefaultFuchsiaResourceDialect,
8621 >,
8622 offset: usize,
8623 depth: fidl::encoding::Depth,
8624 ) -> fidl::Result<()> {
8625 encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwichStruct>(offset);
8626 self.0.encode(encoder, offset + 0, depth)?;
8630 Ok(())
8631 }
8632 }
8633
8634 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8635 for TableUnionWithVectorReservedSandwichStruct
8636 {
8637 #[inline(always)]
8638 fn new_empty() -> Self {
8639 Self {
8640 table: fidl::new_empty!(
8641 TableUnionWithVectorReservedSandwich,
8642 fidl::encoding::DefaultFuchsiaResourceDialect
8643 ),
8644 }
8645 }
8646
8647 #[inline]
8648 unsafe fn decode(
8649 &mut self,
8650 decoder: &mut fidl::encoding::Decoder<
8651 '_,
8652 fidl::encoding::DefaultFuchsiaResourceDialect,
8653 >,
8654 offset: usize,
8655 _depth: fidl::encoding::Depth,
8656 ) -> fidl::Result<()> {
8657 decoder.debug_check_bounds::<Self>(offset);
8658 fidl::decode!(
8660 TableUnionWithVectorReservedSandwich,
8661 fidl::encoding::DefaultFuchsiaResourceDialect,
8662 &mut self.table,
8663 decoder,
8664 offset + 0,
8665 _depth
8666 )?;
8667 Ok(())
8668 }
8669 }
8670
8671 impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwichStruct {
8672 type Borrowed<'a> = &'a mut Self;
8673 fn take_or_borrow<'a>(
8674 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8675 ) -> Self::Borrowed<'a> {
8676 value
8677 }
8678 }
8679
8680 unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwichStruct {
8681 type Owned = Self;
8682
8683 #[inline(always)]
8684 fn inline_align(_context: fidl::encoding::Context) -> usize {
8685 8
8686 }
8687
8688 #[inline(always)]
8689 fn inline_size(_context: fidl::encoding::Context) -> usize {
8690 16
8691 }
8692 }
8693
8694 unsafe impl
8695 fidl::encoding::Encode<
8696 TableUnionWithVectorStructSandwichStruct,
8697 fidl::encoding::DefaultFuchsiaResourceDialect,
8698 > for &mut TableUnionWithVectorStructSandwichStruct
8699 {
8700 #[inline]
8701 unsafe fn encode(
8702 self,
8703 encoder: &mut fidl::encoding::Encoder<
8704 '_,
8705 fidl::encoding::DefaultFuchsiaResourceDialect,
8706 >,
8707 offset: usize,
8708 _depth: fidl::encoding::Depth,
8709 ) -> fidl::Result<()> {
8710 encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8711 fidl::encoding::Encode::<TableUnionWithVectorStructSandwichStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8713 (
8714 <TableUnionWithVectorStructSandwich as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.table),
8715 ),
8716 encoder, offset, _depth
8717 )
8718 }
8719 }
8720 unsafe impl<
8721 T0: fidl::encoding::Encode<
8722 TableUnionWithVectorStructSandwich,
8723 fidl::encoding::DefaultFuchsiaResourceDialect,
8724 >,
8725 >
8726 fidl::encoding::Encode<
8727 TableUnionWithVectorStructSandwichStruct,
8728 fidl::encoding::DefaultFuchsiaResourceDialect,
8729 > for (T0,)
8730 {
8731 #[inline]
8732 unsafe fn encode(
8733 self,
8734 encoder: &mut fidl::encoding::Encoder<
8735 '_,
8736 fidl::encoding::DefaultFuchsiaResourceDialect,
8737 >,
8738 offset: usize,
8739 depth: fidl::encoding::Depth,
8740 ) -> fidl::Result<()> {
8741 encoder.debug_check_bounds::<TableUnionWithVectorStructSandwichStruct>(offset);
8742 self.0.encode(encoder, offset + 0, depth)?;
8746 Ok(())
8747 }
8748 }
8749
8750 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8751 for TableUnionWithVectorStructSandwichStruct
8752 {
8753 #[inline(always)]
8754 fn new_empty() -> Self {
8755 Self {
8756 table: fidl::new_empty!(
8757 TableUnionWithVectorStructSandwich,
8758 fidl::encoding::DefaultFuchsiaResourceDialect
8759 ),
8760 }
8761 }
8762
8763 #[inline]
8764 unsafe fn decode(
8765 &mut self,
8766 decoder: &mut fidl::encoding::Decoder<
8767 '_,
8768 fidl::encoding::DefaultFuchsiaResourceDialect,
8769 >,
8770 offset: usize,
8771 _depth: fidl::encoding::Depth,
8772 ) -> fidl::Result<()> {
8773 decoder.debug_check_bounds::<Self>(offset);
8774 fidl::decode!(
8776 TableUnionWithVectorStructSandwich,
8777 fidl::encoding::DefaultFuchsiaResourceDialect,
8778 &mut self.table,
8779 decoder,
8780 offset + 0,
8781 _depth
8782 )?;
8783 Ok(())
8784 }
8785 }
8786
8787 impl fidl::encoding::ResourceTypeMarker for TestFlexibleResourceXUnionInStruct {
8788 type Borrowed<'a> = &'a mut Self;
8789 fn take_or_borrow<'a>(
8790 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8791 ) -> Self::Borrowed<'a> {
8792 value
8793 }
8794 }
8795
8796 unsafe impl fidl::encoding::TypeMarker for TestFlexibleResourceXUnionInStruct {
8797 type Owned = Self;
8798
8799 #[inline(always)]
8800 fn inline_align(_context: fidl::encoding::Context) -> usize {
8801 8
8802 }
8803
8804 #[inline(always)]
8805 fn inline_size(_context: fidl::encoding::Context) -> usize {
8806 16
8807 }
8808 }
8809
8810 unsafe impl
8811 fidl::encoding::Encode<
8812 TestFlexibleResourceXUnionInStruct,
8813 fidl::encoding::DefaultFuchsiaResourceDialect,
8814 > for &mut TestFlexibleResourceXUnionInStruct
8815 {
8816 #[inline]
8817 unsafe fn encode(
8818 self,
8819 encoder: &mut fidl::encoding::Encoder<
8820 '_,
8821 fidl::encoding::DefaultFuchsiaResourceDialect,
8822 >,
8823 offset: usize,
8824 _depth: fidl::encoding::Depth,
8825 ) -> fidl::Result<()> {
8826 encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8827 fidl::encoding::Encode::<
8829 TestFlexibleResourceXUnionInStruct,
8830 fidl::encoding::DefaultFuchsiaResourceDialect,
8831 >::encode(
8832 (<SampleResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8833 &mut self.xu,
8834 ),),
8835 encoder,
8836 offset,
8837 _depth,
8838 )
8839 }
8840 }
8841 unsafe impl<
8842 T0: fidl::encoding::Encode<
8843 SampleResourceXUnion,
8844 fidl::encoding::DefaultFuchsiaResourceDialect,
8845 >,
8846 >
8847 fidl::encoding::Encode<
8848 TestFlexibleResourceXUnionInStruct,
8849 fidl::encoding::DefaultFuchsiaResourceDialect,
8850 > for (T0,)
8851 {
8852 #[inline]
8853 unsafe fn encode(
8854 self,
8855 encoder: &mut fidl::encoding::Encoder<
8856 '_,
8857 fidl::encoding::DefaultFuchsiaResourceDialect,
8858 >,
8859 offset: usize,
8860 depth: fidl::encoding::Depth,
8861 ) -> fidl::Result<()> {
8862 encoder.debug_check_bounds::<TestFlexibleResourceXUnionInStruct>(offset);
8863 self.0.encode(encoder, offset + 0, depth)?;
8867 Ok(())
8868 }
8869 }
8870
8871 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8872 for TestFlexibleResourceXUnionInStruct
8873 {
8874 #[inline(always)]
8875 fn new_empty() -> Self {
8876 Self {
8877 xu: fidl::new_empty!(
8878 SampleResourceXUnion,
8879 fidl::encoding::DefaultFuchsiaResourceDialect
8880 ),
8881 }
8882 }
8883
8884 #[inline]
8885 unsafe fn decode(
8886 &mut self,
8887 decoder: &mut fidl::encoding::Decoder<
8888 '_,
8889 fidl::encoding::DefaultFuchsiaResourceDialect,
8890 >,
8891 offset: usize,
8892 _depth: fidl::encoding::Depth,
8893 ) -> fidl::Result<()> {
8894 decoder.debug_check_bounds::<Self>(offset);
8895 fidl::decode!(
8897 SampleResourceXUnion,
8898 fidl::encoding::DefaultFuchsiaResourceDialect,
8899 &mut self.xu,
8900 decoder,
8901 offset + 0,
8902 _depth
8903 )?;
8904 Ok(())
8905 }
8906 }
8907
8908 impl fidl::encoding::ResourceTypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8909 type Borrowed<'a> = &'a mut Self;
8910 fn take_or_borrow<'a>(
8911 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8912 ) -> Self::Borrowed<'a> {
8913 value
8914 }
8915 }
8916
8917 unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleResourceXUnionInStruct {
8918 type Owned = Self;
8919
8920 #[inline(always)]
8921 fn inline_align(_context: fidl::encoding::Context) -> usize {
8922 8
8923 }
8924
8925 #[inline(always)]
8926 fn inline_size(_context: fidl::encoding::Context) -> usize {
8927 16
8928 }
8929 }
8930
8931 unsafe impl
8932 fidl::encoding::Encode<
8933 TestOptionalFlexibleResourceXUnionInStruct,
8934 fidl::encoding::DefaultFuchsiaResourceDialect,
8935 > for &mut TestOptionalFlexibleResourceXUnionInStruct
8936 {
8937 #[inline]
8938 unsafe fn encode(
8939 self,
8940 encoder: &mut fidl::encoding::Encoder<
8941 '_,
8942 fidl::encoding::DefaultFuchsiaResourceDialect,
8943 >,
8944 offset: usize,
8945 _depth: fidl::encoding::Depth,
8946 ) -> fidl::Result<()> {
8947 encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8948 fidl::encoding::Encode::<TestOptionalFlexibleResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8950 (
8951 <fidl::encoding::OptionalUnion<SampleResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
8952 ),
8953 encoder, offset, _depth
8954 )
8955 }
8956 }
8957 unsafe impl<
8958 T0: fidl::encoding::Encode<
8959 fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8960 fidl::encoding::DefaultFuchsiaResourceDialect,
8961 >,
8962 >
8963 fidl::encoding::Encode<
8964 TestOptionalFlexibleResourceXUnionInStruct,
8965 fidl::encoding::DefaultFuchsiaResourceDialect,
8966 > for (T0,)
8967 {
8968 #[inline]
8969 unsafe fn encode(
8970 self,
8971 encoder: &mut fidl::encoding::Encoder<
8972 '_,
8973 fidl::encoding::DefaultFuchsiaResourceDialect,
8974 >,
8975 offset: usize,
8976 depth: fidl::encoding::Depth,
8977 ) -> fidl::Result<()> {
8978 encoder.debug_check_bounds::<TestOptionalFlexibleResourceXUnionInStruct>(offset);
8979 self.0.encode(encoder, offset + 0, depth)?;
8983 Ok(())
8984 }
8985 }
8986
8987 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8988 for TestOptionalFlexibleResourceXUnionInStruct
8989 {
8990 #[inline(always)]
8991 fn new_empty() -> Self {
8992 Self {
8993 xu: fidl::new_empty!(
8994 fidl::encoding::OptionalUnion<SampleResourceXUnion>,
8995 fidl::encoding::DefaultFuchsiaResourceDialect
8996 ),
8997 }
8998 }
8999
9000 #[inline]
9001 unsafe fn decode(
9002 &mut self,
9003 decoder: &mut fidl::encoding::Decoder<
9004 '_,
9005 fidl::encoding::DefaultFuchsiaResourceDialect,
9006 >,
9007 offset: usize,
9008 _depth: fidl::encoding::Depth,
9009 ) -> fidl::Result<()> {
9010 decoder.debug_check_bounds::<Self>(offset);
9011 fidl::decode!(
9013 fidl::encoding::OptionalUnion<SampleResourceXUnion>,
9014 fidl::encoding::DefaultFuchsiaResourceDialect,
9015 &mut self.xu,
9016 decoder,
9017 offset + 0,
9018 _depth
9019 )?;
9020 Ok(())
9021 }
9022 }
9023
9024 impl fidl::encoding::ResourceTypeMarker for TestOptionalStrictResourceXUnionInStruct {
9025 type Borrowed<'a> = &'a mut Self;
9026 fn take_or_borrow<'a>(
9027 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9028 ) -> Self::Borrowed<'a> {
9029 value
9030 }
9031 }
9032
9033 unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictResourceXUnionInStruct {
9034 type Owned = Self;
9035
9036 #[inline(always)]
9037 fn inline_align(_context: fidl::encoding::Context) -> usize {
9038 8
9039 }
9040
9041 #[inline(always)]
9042 fn inline_size(_context: fidl::encoding::Context) -> usize {
9043 16
9044 }
9045 }
9046
9047 unsafe impl
9048 fidl::encoding::Encode<
9049 TestOptionalStrictResourceXUnionInStruct,
9050 fidl::encoding::DefaultFuchsiaResourceDialect,
9051 > for &mut TestOptionalStrictResourceXUnionInStruct
9052 {
9053 #[inline]
9054 unsafe fn encode(
9055 self,
9056 encoder: &mut fidl::encoding::Encoder<
9057 '_,
9058 fidl::encoding::DefaultFuchsiaResourceDialect,
9059 >,
9060 offset: usize,
9061 _depth: fidl::encoding::Depth,
9062 ) -> fidl::Result<()> {
9063 encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9064 fidl::encoding::Encode::<TestOptionalStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9066 (
9067 <fidl::encoding::OptionalUnion<SampleStrictResourceXUnion> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9068 ),
9069 encoder, offset, _depth
9070 )
9071 }
9072 }
9073 unsafe impl<
9074 T0: fidl::encoding::Encode<
9075 fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9076 fidl::encoding::DefaultFuchsiaResourceDialect,
9077 >,
9078 >
9079 fidl::encoding::Encode<
9080 TestOptionalStrictResourceXUnionInStruct,
9081 fidl::encoding::DefaultFuchsiaResourceDialect,
9082 > for (T0,)
9083 {
9084 #[inline]
9085 unsafe fn encode(
9086 self,
9087 encoder: &mut fidl::encoding::Encoder<
9088 '_,
9089 fidl::encoding::DefaultFuchsiaResourceDialect,
9090 >,
9091 offset: usize,
9092 depth: fidl::encoding::Depth,
9093 ) -> fidl::Result<()> {
9094 encoder.debug_check_bounds::<TestOptionalStrictResourceXUnionInStruct>(offset);
9095 self.0.encode(encoder, offset + 0, depth)?;
9099 Ok(())
9100 }
9101 }
9102
9103 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9104 for TestOptionalStrictResourceXUnionInStruct
9105 {
9106 #[inline(always)]
9107 fn new_empty() -> Self {
9108 Self {
9109 xu: fidl::new_empty!(
9110 fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9111 fidl::encoding::DefaultFuchsiaResourceDialect
9112 ),
9113 }
9114 }
9115
9116 #[inline]
9117 unsafe fn decode(
9118 &mut self,
9119 decoder: &mut fidl::encoding::Decoder<
9120 '_,
9121 fidl::encoding::DefaultFuchsiaResourceDialect,
9122 >,
9123 offset: usize,
9124 _depth: fidl::encoding::Depth,
9125 ) -> fidl::Result<()> {
9126 decoder.debug_check_bounds::<Self>(offset);
9127 fidl::decode!(
9129 fidl::encoding::OptionalUnion<SampleStrictResourceXUnion>,
9130 fidl::encoding::DefaultFuchsiaResourceDialect,
9131 &mut self.xu,
9132 decoder,
9133 offset + 0,
9134 _depth
9135 )?;
9136 Ok(())
9137 }
9138 }
9139
9140 impl fidl::encoding::ResourceTypeMarker for TestPackageResolverResolveRequest {
9141 type Borrowed<'a> = &'a mut Self;
9142 fn take_or_borrow<'a>(
9143 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9144 ) -> Self::Borrowed<'a> {
9145 value
9146 }
9147 }
9148
9149 unsafe impl fidl::encoding::TypeMarker for TestPackageResolverResolveRequest {
9150 type Owned = Self;
9151
9152 #[inline(always)]
9153 fn inline_align(_context: fidl::encoding::Context) -> usize {
9154 8
9155 }
9156
9157 #[inline(always)]
9158 fn inline_size(_context: fidl::encoding::Context) -> usize {
9159 40
9160 }
9161 }
9162
9163 unsafe impl
9164 fidl::encoding::Encode<
9165 TestPackageResolverResolveRequest,
9166 fidl::encoding::DefaultFuchsiaResourceDialect,
9167 > for &mut TestPackageResolverResolveRequest
9168 {
9169 #[inline]
9170 unsafe fn encode(
9171 self,
9172 encoder: &mut fidl::encoding::Encoder<
9173 '_,
9174 fidl::encoding::DefaultFuchsiaResourceDialect,
9175 >,
9176 offset: usize,
9177 _depth: fidl::encoding::Depth,
9178 ) -> fidl::Result<()> {
9179 encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9180 fidl::encoding::Encode::<TestPackageResolverResolveRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9182 (
9183 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),
9184 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.selectors),
9185 <UpdatePolicy as fidl::encoding::ValueTypeMarker>::borrow(&self.update_policy),
9186 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
9187 ),
9188 encoder, offset, _depth
9189 )
9190 }
9191 }
9192 unsafe impl<
9193 T0: fidl::encoding::Encode<
9194 fidl::encoding::UnboundedString,
9195 fidl::encoding::DefaultFuchsiaResourceDialect,
9196 >,
9197 T1: fidl::encoding::Encode<
9198 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9199 fidl::encoding::DefaultFuchsiaResourceDialect,
9200 >,
9201 T2: fidl::encoding::Encode<UpdatePolicy, fidl::encoding::DefaultFuchsiaResourceDialect>,
9202 T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
9203 >
9204 fidl::encoding::Encode<
9205 TestPackageResolverResolveRequest,
9206 fidl::encoding::DefaultFuchsiaResourceDialect,
9207 > for (T0, T1, T2, T3)
9208 {
9209 #[inline]
9210 unsafe fn encode(
9211 self,
9212 encoder: &mut fidl::encoding::Encoder<
9213 '_,
9214 fidl::encoding::DefaultFuchsiaResourceDialect,
9215 >,
9216 offset: usize,
9217 depth: fidl::encoding::Depth,
9218 ) -> fidl::Result<()> {
9219 encoder.debug_check_bounds::<TestPackageResolverResolveRequest>(offset);
9220 unsafe {
9223 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9224 (ptr as *mut u64).write_unaligned(0);
9225 }
9226 self.0.encode(encoder, offset + 0, depth)?;
9228 self.1.encode(encoder, offset + 16, depth)?;
9229 self.2.encode(encoder, offset + 32, depth)?;
9230 self.3.encode(encoder, offset + 36, depth)?;
9231 Ok(())
9232 }
9233 }
9234
9235 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9236 for TestPackageResolverResolveRequest
9237 {
9238 #[inline(always)]
9239 fn new_empty() -> Self {
9240 Self {
9241 package_url: fidl::new_empty!(
9242 fidl::encoding::UnboundedString,
9243 fidl::encoding::DefaultFuchsiaResourceDialect
9244 ),
9245 selectors: fidl::new_empty!(
9246 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9247 fidl::encoding::DefaultFuchsiaResourceDialect
9248 ),
9249 update_policy: fidl::new_empty!(
9250 UpdatePolicy,
9251 fidl::encoding::DefaultFuchsiaResourceDialect
9252 ),
9253 this_should_be_a_handle: fidl::new_empty!(
9254 u32,
9255 fidl::encoding::DefaultFuchsiaResourceDialect
9256 ),
9257 }
9258 }
9259
9260 #[inline]
9261 unsafe fn decode(
9262 &mut self,
9263 decoder: &mut fidl::encoding::Decoder<
9264 '_,
9265 fidl::encoding::DefaultFuchsiaResourceDialect,
9266 >,
9267 offset: usize,
9268 _depth: fidl::encoding::Depth,
9269 ) -> fidl::Result<()> {
9270 decoder.debug_check_bounds::<Self>(offset);
9271 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9273 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9274 let mask = 0xffff0000u64;
9275 let maskedval = padval & mask;
9276 if maskedval != 0 {
9277 return Err(fidl::Error::NonZeroPadding {
9278 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9279 });
9280 }
9281 fidl::decode!(
9282 fidl::encoding::UnboundedString,
9283 fidl::encoding::DefaultFuchsiaResourceDialect,
9284 &mut self.package_url,
9285 decoder,
9286 offset + 0,
9287 _depth
9288 )?;
9289 fidl::decode!(
9290 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
9291 fidl::encoding::DefaultFuchsiaResourceDialect,
9292 &mut self.selectors,
9293 decoder,
9294 offset + 16,
9295 _depth
9296 )?;
9297 fidl::decode!(
9298 UpdatePolicy,
9299 fidl::encoding::DefaultFuchsiaResourceDialect,
9300 &mut self.update_policy,
9301 decoder,
9302 offset + 32,
9303 _depth
9304 )?;
9305 fidl::decode!(
9306 u32,
9307 fidl::encoding::DefaultFuchsiaResourceDialect,
9308 &mut self.this_should_be_a_handle,
9309 decoder,
9310 offset + 36,
9311 _depth
9312 )?;
9313 Ok(())
9314 }
9315 }
9316
9317 impl fidl::encoding::ResourceTypeMarker for TestStrictResourceXUnionInStruct {
9318 type Borrowed<'a> = &'a mut Self;
9319 fn take_or_borrow<'a>(
9320 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9321 ) -> Self::Borrowed<'a> {
9322 value
9323 }
9324 }
9325
9326 unsafe impl fidl::encoding::TypeMarker for TestStrictResourceXUnionInStruct {
9327 type Owned = Self;
9328
9329 #[inline(always)]
9330 fn inline_align(_context: fidl::encoding::Context) -> usize {
9331 8
9332 }
9333
9334 #[inline(always)]
9335 fn inline_size(_context: fidl::encoding::Context) -> usize {
9336 16
9337 }
9338 }
9339
9340 unsafe impl
9341 fidl::encoding::Encode<
9342 TestStrictResourceXUnionInStruct,
9343 fidl::encoding::DefaultFuchsiaResourceDialect,
9344 > for &mut TestStrictResourceXUnionInStruct
9345 {
9346 #[inline]
9347 unsafe fn encode(
9348 self,
9349 encoder: &mut fidl::encoding::Encoder<
9350 '_,
9351 fidl::encoding::DefaultFuchsiaResourceDialect,
9352 >,
9353 offset: usize,
9354 _depth: fidl::encoding::Depth,
9355 ) -> fidl::Result<()> {
9356 encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9357 fidl::encoding::Encode::<TestStrictResourceXUnionInStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9359 (
9360 <SampleStrictResourceXUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.xu),
9361 ),
9362 encoder, offset, _depth
9363 )
9364 }
9365 }
9366 unsafe impl<
9367 T0: fidl::encoding::Encode<
9368 SampleStrictResourceXUnion,
9369 fidl::encoding::DefaultFuchsiaResourceDialect,
9370 >,
9371 >
9372 fidl::encoding::Encode<
9373 TestStrictResourceXUnionInStruct,
9374 fidl::encoding::DefaultFuchsiaResourceDialect,
9375 > for (T0,)
9376 {
9377 #[inline]
9378 unsafe fn encode(
9379 self,
9380 encoder: &mut fidl::encoding::Encoder<
9381 '_,
9382 fidl::encoding::DefaultFuchsiaResourceDialect,
9383 >,
9384 offset: usize,
9385 depth: fidl::encoding::Depth,
9386 ) -> fidl::Result<()> {
9387 encoder.debug_check_bounds::<TestStrictResourceXUnionInStruct>(offset);
9388 self.0.encode(encoder, offset + 0, depth)?;
9392 Ok(())
9393 }
9394 }
9395
9396 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9397 for TestStrictResourceXUnionInStruct
9398 {
9399 #[inline(always)]
9400 fn new_empty() -> Self {
9401 Self {
9402 xu: fidl::new_empty!(
9403 SampleStrictResourceXUnion,
9404 fidl::encoding::DefaultFuchsiaResourceDialect
9405 ),
9406 }
9407 }
9408
9409 #[inline]
9410 unsafe fn decode(
9411 &mut self,
9412 decoder: &mut fidl::encoding::Decoder<
9413 '_,
9414 fidl::encoding::DefaultFuchsiaResourceDialect,
9415 >,
9416 offset: usize,
9417 _depth: fidl::encoding::Depth,
9418 ) -> fidl::Result<()> {
9419 decoder.debug_check_bounds::<Self>(offset);
9420 fidl::decode!(
9422 SampleStrictResourceXUnion,
9423 fidl::encoding::DefaultFuchsiaResourceDialect,
9424 &mut self.xu,
9425 decoder,
9426 offset + 0,
9427 _depth
9428 )?;
9429 Ok(())
9430 }
9431 }
9432
9433 impl fidl::encoding::ResourceTypeMarker for UnboundedNonnullableVectorOfHandles {
9434 type Borrowed<'a> = &'a mut Self;
9435 fn take_or_borrow<'a>(
9436 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9437 ) -> Self::Borrowed<'a> {
9438 value
9439 }
9440 }
9441
9442 unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfHandles {
9443 type Owned = Self;
9444
9445 #[inline(always)]
9446 fn inline_align(_context: fidl::encoding::Context) -> usize {
9447 8
9448 }
9449
9450 #[inline(always)]
9451 fn inline_size(_context: fidl::encoding::Context) -> usize {
9452 16
9453 }
9454 }
9455
9456 unsafe impl
9457 fidl::encoding::Encode<
9458 UnboundedNonnullableVectorOfHandles,
9459 fidl::encoding::DefaultFuchsiaResourceDialect,
9460 > for &mut UnboundedNonnullableVectorOfHandles
9461 {
9462 #[inline]
9463 unsafe fn encode(
9464 self,
9465 encoder: &mut fidl::encoding::Encoder<
9466 '_,
9467 fidl::encoding::DefaultFuchsiaResourceDialect,
9468 >,
9469 offset: usize,
9470 _depth: fidl::encoding::Depth,
9471 ) -> fidl::Result<()> {
9472 encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9473 fidl::encoding::Encode::<
9475 UnboundedNonnullableVectorOfHandles,
9476 fidl::encoding::DefaultFuchsiaResourceDialect,
9477 >::encode(
9478 (<fidl::encoding::UnboundedVector<
9479 fidl::encoding::HandleType<
9480 fidl::Handle,
9481 { fidl::ObjectType::NONE.into_raw() },
9482 2147483648,
9483 >,
9484 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9485 &mut self.vh0
9486 ),),
9487 encoder,
9488 offset,
9489 _depth,
9490 )
9491 }
9492 }
9493 unsafe impl<
9494 T0: fidl::encoding::Encode<
9495 fidl::encoding::UnboundedVector<
9496 fidl::encoding::HandleType<
9497 fidl::Handle,
9498 { fidl::ObjectType::NONE.into_raw() },
9499 2147483648,
9500 >,
9501 >,
9502 fidl::encoding::DefaultFuchsiaResourceDialect,
9503 >,
9504 >
9505 fidl::encoding::Encode<
9506 UnboundedNonnullableVectorOfHandles,
9507 fidl::encoding::DefaultFuchsiaResourceDialect,
9508 > for (T0,)
9509 {
9510 #[inline]
9511 unsafe fn encode(
9512 self,
9513 encoder: &mut fidl::encoding::Encoder<
9514 '_,
9515 fidl::encoding::DefaultFuchsiaResourceDialect,
9516 >,
9517 offset: usize,
9518 depth: fidl::encoding::Depth,
9519 ) -> fidl::Result<()> {
9520 encoder.debug_check_bounds::<UnboundedNonnullableVectorOfHandles>(offset);
9521 self.0.encode(encoder, offset + 0, depth)?;
9525 Ok(())
9526 }
9527 }
9528
9529 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9530 for UnboundedNonnullableVectorOfHandles
9531 {
9532 #[inline(always)]
9533 fn new_empty() -> Self {
9534 Self {
9535 vh0: fidl::new_empty!(
9536 fidl::encoding::UnboundedVector<
9537 fidl::encoding::HandleType<
9538 fidl::Handle,
9539 { fidl::ObjectType::NONE.into_raw() },
9540 2147483648,
9541 >,
9542 >,
9543 fidl::encoding::DefaultFuchsiaResourceDialect
9544 ),
9545 }
9546 }
9547
9548 #[inline]
9549 unsafe fn decode(
9550 &mut self,
9551 decoder: &mut fidl::encoding::Decoder<
9552 '_,
9553 fidl::encoding::DefaultFuchsiaResourceDialect,
9554 >,
9555 offset: usize,
9556 _depth: fidl::encoding::Depth,
9557 ) -> fidl::Result<()> {
9558 decoder.debug_check_bounds::<Self>(offset);
9559 fidl::decode!(
9561 fidl::encoding::UnboundedVector<
9562 fidl::encoding::HandleType<
9563 fidl::Handle,
9564 { fidl::ObjectType::NONE.into_raw() },
9565 2147483648,
9566 >,
9567 >,
9568 fidl::encoding::DefaultFuchsiaResourceDialect,
9569 &mut self.vh0,
9570 decoder,
9571 offset + 0,
9572 _depth
9573 )?;
9574 Ok(())
9575 }
9576 }
9577
9578 impl fidl::encoding::ResourceTypeMarker for UnboundedNullableVectorOfHandles {
9579 type Borrowed<'a> = &'a mut Self;
9580 fn take_or_borrow<'a>(
9581 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9582 ) -> Self::Borrowed<'a> {
9583 value
9584 }
9585 }
9586
9587 unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfHandles {
9588 type Owned = Self;
9589
9590 #[inline(always)]
9591 fn inline_align(_context: fidl::encoding::Context) -> usize {
9592 8
9593 }
9594
9595 #[inline(always)]
9596 fn inline_size(_context: fidl::encoding::Context) -> usize {
9597 16
9598 }
9599 }
9600
9601 unsafe impl
9602 fidl::encoding::Encode<
9603 UnboundedNullableVectorOfHandles,
9604 fidl::encoding::DefaultFuchsiaResourceDialect,
9605 > for &mut UnboundedNullableVectorOfHandles
9606 {
9607 #[inline]
9608 unsafe fn encode(
9609 self,
9610 encoder: &mut fidl::encoding::Encoder<
9611 '_,
9612 fidl::encoding::DefaultFuchsiaResourceDialect,
9613 >,
9614 offset: usize,
9615 _depth: fidl::encoding::Depth,
9616 ) -> fidl::Result<()> {
9617 encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9618 fidl::encoding::Encode::<
9620 UnboundedNullableVectorOfHandles,
9621 fidl::encoding::DefaultFuchsiaResourceDialect,
9622 >::encode(
9623 (<fidl::encoding::Optional<
9624 fidl::encoding::UnboundedVector<
9625 fidl::encoding::HandleType<
9626 fidl::Handle,
9627 { fidl::ObjectType::NONE.into_raw() },
9628 2147483648,
9629 >,
9630 >,
9631 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9632 &mut self.vh0
9633 ),),
9634 encoder,
9635 offset,
9636 _depth,
9637 )
9638 }
9639 }
9640 unsafe impl<
9641 T0: fidl::encoding::Encode<
9642 fidl::encoding::Optional<
9643 fidl::encoding::UnboundedVector<
9644 fidl::encoding::HandleType<
9645 fidl::Handle,
9646 { fidl::ObjectType::NONE.into_raw() },
9647 2147483648,
9648 >,
9649 >,
9650 >,
9651 fidl::encoding::DefaultFuchsiaResourceDialect,
9652 >,
9653 >
9654 fidl::encoding::Encode<
9655 UnboundedNullableVectorOfHandles,
9656 fidl::encoding::DefaultFuchsiaResourceDialect,
9657 > for (T0,)
9658 {
9659 #[inline]
9660 unsafe fn encode(
9661 self,
9662 encoder: &mut fidl::encoding::Encoder<
9663 '_,
9664 fidl::encoding::DefaultFuchsiaResourceDialect,
9665 >,
9666 offset: usize,
9667 depth: fidl::encoding::Depth,
9668 ) -> fidl::Result<()> {
9669 encoder.debug_check_bounds::<UnboundedNullableVectorOfHandles>(offset);
9670 self.0.encode(encoder, offset + 0, depth)?;
9674 Ok(())
9675 }
9676 }
9677
9678 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9679 for UnboundedNullableVectorOfHandles
9680 {
9681 #[inline(always)]
9682 fn new_empty() -> Self {
9683 Self {
9684 vh0: fidl::new_empty!(
9685 fidl::encoding::Optional<
9686 fidl::encoding::UnboundedVector<
9687 fidl::encoding::HandleType<
9688 fidl::Handle,
9689 { fidl::ObjectType::NONE.into_raw() },
9690 2147483648,
9691 >,
9692 >,
9693 >,
9694 fidl::encoding::DefaultFuchsiaResourceDialect
9695 ),
9696 }
9697 }
9698
9699 #[inline]
9700 unsafe fn decode(
9701 &mut self,
9702 decoder: &mut fidl::encoding::Decoder<
9703 '_,
9704 fidl::encoding::DefaultFuchsiaResourceDialect,
9705 >,
9706 offset: usize,
9707 _depth: fidl::encoding::Depth,
9708 ) -> fidl::Result<()> {
9709 decoder.debug_check_bounds::<Self>(offset);
9710 fidl::decode!(
9712 fidl::encoding::Optional<
9713 fidl::encoding::UnboundedVector<
9714 fidl::encoding::HandleType<
9715 fidl::Handle,
9716 { fidl::ObjectType::NONE.into_raw() },
9717 2147483648,
9718 >,
9719 >,
9720 >,
9721 fidl::encoding::DefaultFuchsiaResourceDialect,
9722 &mut self.vh0,
9723 decoder,
9724 offset + 0,
9725 _depth
9726 )?;
9727 Ok(())
9728 }
9729 }
9730
9731 impl fidl::encoding::ResourceTypeMarker for UnionOfEndpoints {
9732 type Borrowed<'a> = &'a mut Self;
9733 fn take_or_borrow<'a>(
9734 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9735 ) -> Self::Borrowed<'a> {
9736 value
9737 }
9738 }
9739
9740 unsafe impl fidl::encoding::TypeMarker for UnionOfEndpoints {
9741 type Owned = Self;
9742
9743 #[inline(always)]
9744 fn inline_align(_context: fidl::encoding::Context) -> usize {
9745 8
9746 }
9747
9748 #[inline(always)]
9749 fn inline_size(_context: fidl::encoding::Context) -> usize {
9750 16
9751 }
9752 }
9753
9754 unsafe impl
9755 fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9756 for &mut UnionOfEndpoints
9757 {
9758 #[inline]
9759 unsafe fn encode(
9760 self,
9761 encoder: &mut fidl::encoding::Encoder<
9762 '_,
9763 fidl::encoding::DefaultFuchsiaResourceDialect,
9764 >,
9765 offset: usize,
9766 _depth: fidl::encoding::Depth,
9767 ) -> fidl::Result<()> {
9768 encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9769 fidl::encoding::Encode::<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9771 (
9772 <UnionOfEndpointsUnion as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
9773 ),
9774 encoder, offset, _depth
9775 )
9776 }
9777 }
9778 unsafe impl<
9779 T0: fidl::encoding::Encode<
9780 UnionOfEndpointsUnion,
9781 fidl::encoding::DefaultFuchsiaResourceDialect,
9782 >,
9783 >
9784 fidl::encoding::Encode<UnionOfEndpoints, fidl::encoding::DefaultFuchsiaResourceDialect>
9785 for (T0,)
9786 {
9787 #[inline]
9788 unsafe fn encode(
9789 self,
9790 encoder: &mut fidl::encoding::Encoder<
9791 '_,
9792 fidl::encoding::DefaultFuchsiaResourceDialect,
9793 >,
9794 offset: usize,
9795 depth: fidl::encoding::Depth,
9796 ) -> fidl::Result<()> {
9797 encoder.debug_check_bounds::<UnionOfEndpoints>(offset);
9798 self.0.encode(encoder, offset + 0, depth)?;
9802 Ok(())
9803 }
9804 }
9805
9806 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9807 for UnionOfEndpoints
9808 {
9809 #[inline(always)]
9810 fn new_empty() -> Self {
9811 Self {
9812 u: fidl::new_empty!(
9813 UnionOfEndpointsUnion,
9814 fidl::encoding::DefaultFuchsiaResourceDialect
9815 ),
9816 }
9817 }
9818
9819 #[inline]
9820 unsafe fn decode(
9821 &mut self,
9822 decoder: &mut fidl::encoding::Decoder<
9823 '_,
9824 fidl::encoding::DefaultFuchsiaResourceDialect,
9825 >,
9826 offset: usize,
9827 _depth: fidl::encoding::Depth,
9828 ) -> fidl::Result<()> {
9829 decoder.debug_check_bounds::<Self>(offset);
9830 fidl::decode!(
9832 UnionOfEndpointsUnion,
9833 fidl::encoding::DefaultFuchsiaResourceDialect,
9834 &mut self.u,
9835 decoder,
9836 offset + 0,
9837 _depth
9838 )?;
9839 Ok(())
9840 }
9841 }
9842
9843 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9844 type Borrowed<'a> = &'a mut Self;
9845 fn take_or_borrow<'a>(
9846 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9847 ) -> Self::Borrowed<'a> {
9848 value
9849 }
9850 }
9851
9852 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithDefaultRights {
9853 type Owned = Self;
9854
9855 #[inline(always)]
9856 fn inline_align(_context: fidl::encoding::Context) -> usize {
9857 8
9858 }
9859
9860 #[inline(always)]
9861 fn inline_size(_context: fidl::encoding::Context) -> usize {
9862 16
9863 }
9864 }
9865
9866 unsafe impl
9867 fidl::encoding::Encode<
9868 VectorOfArrayOfEventInStructWithDefaultRights,
9869 fidl::encoding::DefaultFuchsiaResourceDialect,
9870 > for &mut VectorOfArrayOfEventInStructWithDefaultRights
9871 {
9872 #[inline]
9873 unsafe fn encode(
9874 self,
9875 encoder: &mut fidl::encoding::Encoder<
9876 '_,
9877 fidl::encoding::DefaultFuchsiaResourceDialect,
9878 >,
9879 offset: usize,
9880 _depth: fidl::encoding::Depth,
9881 ) -> fidl::Result<()> {
9882 encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9883 fidl::encoding::Encode::<
9885 VectorOfArrayOfEventInStructWithDefaultRights,
9886 fidl::encoding::DefaultFuchsiaResourceDialect,
9887 >::encode(
9888 (<fidl::encoding::Vector<
9889 fidl::encoding::Array<
9890 fidl::encoding::HandleType<
9891 fidl::Event,
9892 { fidl::ObjectType::EVENT.into_raw() },
9893 53251,
9894 >,
9895 1,
9896 >,
9897 1,
9898 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9899 &mut self.h
9900 ),),
9901 encoder,
9902 offset,
9903 _depth,
9904 )
9905 }
9906 }
9907 unsafe impl<
9908 T0: fidl::encoding::Encode<
9909 fidl::encoding::Vector<
9910 fidl::encoding::Array<
9911 fidl::encoding::HandleType<
9912 fidl::Event,
9913 { fidl::ObjectType::EVENT.into_raw() },
9914 53251,
9915 >,
9916 1,
9917 >,
9918 1,
9919 >,
9920 fidl::encoding::DefaultFuchsiaResourceDialect,
9921 >,
9922 >
9923 fidl::encoding::Encode<
9924 VectorOfArrayOfEventInStructWithDefaultRights,
9925 fidl::encoding::DefaultFuchsiaResourceDialect,
9926 > for (T0,)
9927 {
9928 #[inline]
9929 unsafe fn encode(
9930 self,
9931 encoder: &mut fidl::encoding::Encoder<
9932 '_,
9933 fidl::encoding::DefaultFuchsiaResourceDialect,
9934 >,
9935 offset: usize,
9936 depth: fidl::encoding::Depth,
9937 ) -> fidl::Result<()> {
9938 encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithDefaultRights>(offset);
9939 self.0.encode(encoder, offset + 0, depth)?;
9943 Ok(())
9944 }
9945 }
9946
9947 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9948 for VectorOfArrayOfEventInStructWithDefaultRights
9949 {
9950 #[inline(always)]
9951 fn new_empty() -> Self {
9952 Self {
9953 h: fidl::new_empty!(
9954 fidl::encoding::Vector<
9955 fidl::encoding::Array<
9956 fidl::encoding::HandleType<
9957 fidl::Event,
9958 { fidl::ObjectType::EVENT.into_raw() },
9959 53251,
9960 >,
9961 1,
9962 >,
9963 1,
9964 >,
9965 fidl::encoding::DefaultFuchsiaResourceDialect
9966 ),
9967 }
9968 }
9969
9970 #[inline]
9971 unsafe fn decode(
9972 &mut self,
9973 decoder: &mut fidl::encoding::Decoder<
9974 '_,
9975 fidl::encoding::DefaultFuchsiaResourceDialect,
9976 >,
9977 offset: usize,
9978 _depth: fidl::encoding::Depth,
9979 ) -> fidl::Result<()> {
9980 decoder.debug_check_bounds::<Self>(offset);
9981 fidl::decode!(
9983 fidl::encoding::Vector<
9984 fidl::encoding::Array<
9985 fidl::encoding::HandleType<
9986 fidl::Event,
9987 { fidl::ObjectType::EVENT.into_raw() },
9988 53251,
9989 >,
9990 1,
9991 >,
9992 1,
9993 >,
9994 fidl::encoding::DefaultFuchsiaResourceDialect,
9995 &mut self.h,
9996 decoder,
9997 offset + 0,
9998 _depth
9999 )?;
10000 Ok(())
10001 }
10002 }
10003
10004 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10005 type Borrowed<'a> = &'a mut Self;
10006 fn take_or_borrow<'a>(
10007 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10008 ) -> Self::Borrowed<'a> {
10009 value
10010 }
10011 }
10012
10013 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInStructWithReducedRights {
10014 type Owned = Self;
10015
10016 #[inline(always)]
10017 fn inline_align(_context: fidl::encoding::Context) -> usize {
10018 8
10019 }
10020
10021 #[inline(always)]
10022 fn inline_size(_context: fidl::encoding::Context) -> usize {
10023 16
10024 }
10025 }
10026
10027 unsafe impl
10028 fidl::encoding::Encode<
10029 VectorOfArrayOfEventInStructWithReducedRights,
10030 fidl::encoding::DefaultFuchsiaResourceDialect,
10031 > for &mut VectorOfArrayOfEventInStructWithReducedRights
10032 {
10033 #[inline]
10034 unsafe fn encode(
10035 self,
10036 encoder: &mut fidl::encoding::Encoder<
10037 '_,
10038 fidl::encoding::DefaultFuchsiaResourceDialect,
10039 >,
10040 offset: usize,
10041 _depth: fidl::encoding::Depth,
10042 ) -> fidl::Result<()> {
10043 encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10044 fidl::encoding::Encode::<
10046 VectorOfArrayOfEventInStructWithReducedRights,
10047 fidl::encoding::DefaultFuchsiaResourceDialect,
10048 >::encode(
10049 (<fidl::encoding::Vector<
10050 fidl::encoding::Array<
10051 fidl::encoding::HandleType<
10052 fidl::Event,
10053 { fidl::ObjectType::EVENT.into_raw() },
10054 49155,
10055 >,
10056 1,
10057 >,
10058 1,
10059 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10060 &mut self.h
10061 ),),
10062 encoder,
10063 offset,
10064 _depth,
10065 )
10066 }
10067 }
10068 unsafe impl<
10069 T0: fidl::encoding::Encode<
10070 fidl::encoding::Vector<
10071 fidl::encoding::Array<
10072 fidl::encoding::HandleType<
10073 fidl::Event,
10074 { fidl::ObjectType::EVENT.into_raw() },
10075 49155,
10076 >,
10077 1,
10078 >,
10079 1,
10080 >,
10081 fidl::encoding::DefaultFuchsiaResourceDialect,
10082 >,
10083 >
10084 fidl::encoding::Encode<
10085 VectorOfArrayOfEventInStructWithReducedRights,
10086 fidl::encoding::DefaultFuchsiaResourceDialect,
10087 > for (T0,)
10088 {
10089 #[inline]
10090 unsafe fn encode(
10091 self,
10092 encoder: &mut fidl::encoding::Encoder<
10093 '_,
10094 fidl::encoding::DefaultFuchsiaResourceDialect,
10095 >,
10096 offset: usize,
10097 depth: fidl::encoding::Depth,
10098 ) -> fidl::Result<()> {
10099 encoder.debug_check_bounds::<VectorOfArrayOfEventInStructWithReducedRights>(offset);
10100 self.0.encode(encoder, offset + 0, depth)?;
10104 Ok(())
10105 }
10106 }
10107
10108 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10109 for VectorOfArrayOfEventInStructWithReducedRights
10110 {
10111 #[inline(always)]
10112 fn new_empty() -> Self {
10113 Self {
10114 h: fidl::new_empty!(
10115 fidl::encoding::Vector<
10116 fidl::encoding::Array<
10117 fidl::encoding::HandleType<
10118 fidl::Event,
10119 { fidl::ObjectType::EVENT.into_raw() },
10120 49155,
10121 >,
10122 1,
10123 >,
10124 1,
10125 >,
10126 fidl::encoding::DefaultFuchsiaResourceDialect
10127 ),
10128 }
10129 }
10130
10131 #[inline]
10132 unsafe fn decode(
10133 &mut self,
10134 decoder: &mut fidl::encoding::Decoder<
10135 '_,
10136 fidl::encoding::DefaultFuchsiaResourceDialect,
10137 >,
10138 offset: usize,
10139 _depth: fidl::encoding::Depth,
10140 ) -> fidl::Result<()> {
10141 decoder.debug_check_bounds::<Self>(offset);
10142 fidl::decode!(
10144 fidl::encoding::Vector<
10145 fidl::encoding::Array<
10146 fidl::encoding::HandleType<
10147 fidl::Event,
10148 { fidl::ObjectType::EVENT.into_raw() },
10149 49155,
10150 >,
10151 1,
10152 >,
10153 1,
10154 >,
10155 fidl::encoding::DefaultFuchsiaResourceDialect,
10156 &mut self.h,
10157 decoder,
10158 offset + 0,
10159 _depth
10160 )?;
10161 Ok(())
10162 }
10163 }
10164
10165 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10166 type Borrowed<'a> = &'a mut Self;
10167 fn take_or_borrow<'a>(
10168 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10169 ) -> Self::Borrowed<'a> {
10170 value
10171 }
10172 }
10173
10174 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRightsStruct {
10175 type Owned = Self;
10176
10177 #[inline(always)]
10178 fn inline_align(_context: fidl::encoding::Context) -> usize {
10179 8
10180 }
10181
10182 #[inline(always)]
10183 fn inline_size(_context: fidl::encoding::Context) -> usize {
10184 16
10185 }
10186 }
10187
10188 unsafe impl
10189 fidl::encoding::Encode<
10190 VectorOfArrayOfEventInTableWithReducedRightsStruct,
10191 fidl::encoding::DefaultFuchsiaResourceDialect,
10192 > for &mut VectorOfArrayOfEventInTableWithReducedRightsStruct
10193 {
10194 #[inline]
10195 unsafe fn encode(
10196 self,
10197 encoder: &mut fidl::encoding::Encoder<
10198 '_,
10199 fidl::encoding::DefaultFuchsiaResourceDialect,
10200 >,
10201 offset: usize,
10202 _depth: fidl::encoding::Depth,
10203 ) -> fidl::Result<()> {
10204 encoder
10205 .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10206 fidl::encoding::Encode::<VectorOfArrayOfEventInTableWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10208 (
10209 <VectorOfArrayOfEventInTableWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.t),
10210 ),
10211 encoder, offset, _depth
10212 )
10213 }
10214 }
10215 unsafe impl<
10216 T0: fidl::encoding::Encode<
10217 VectorOfArrayOfEventInTableWithReducedRights,
10218 fidl::encoding::DefaultFuchsiaResourceDialect,
10219 >,
10220 >
10221 fidl::encoding::Encode<
10222 VectorOfArrayOfEventInTableWithReducedRightsStruct,
10223 fidl::encoding::DefaultFuchsiaResourceDialect,
10224 > for (T0,)
10225 {
10226 #[inline]
10227 unsafe fn encode(
10228 self,
10229 encoder: &mut fidl::encoding::Encoder<
10230 '_,
10231 fidl::encoding::DefaultFuchsiaResourceDialect,
10232 >,
10233 offset: usize,
10234 depth: fidl::encoding::Depth,
10235 ) -> fidl::Result<()> {
10236 encoder
10237 .debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRightsStruct>(offset);
10238 self.0.encode(encoder, offset + 0, depth)?;
10242 Ok(())
10243 }
10244 }
10245
10246 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10247 for VectorOfArrayOfEventInTableWithReducedRightsStruct
10248 {
10249 #[inline(always)]
10250 fn new_empty() -> Self {
10251 Self {
10252 t: fidl::new_empty!(
10253 VectorOfArrayOfEventInTableWithReducedRights,
10254 fidl::encoding::DefaultFuchsiaResourceDialect
10255 ),
10256 }
10257 }
10258
10259 #[inline]
10260 unsafe fn decode(
10261 &mut self,
10262 decoder: &mut fidl::encoding::Decoder<
10263 '_,
10264 fidl::encoding::DefaultFuchsiaResourceDialect,
10265 >,
10266 offset: usize,
10267 _depth: fidl::encoding::Depth,
10268 ) -> fidl::Result<()> {
10269 decoder.debug_check_bounds::<Self>(offset);
10270 fidl::decode!(
10272 VectorOfArrayOfEventInTableWithReducedRights,
10273 fidl::encoding::DefaultFuchsiaResourceDialect,
10274 &mut self.t,
10275 decoder,
10276 offset + 0,
10277 _depth
10278 )?;
10279 Ok(())
10280 }
10281 }
10282
10283 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10284 type Borrowed<'a> = &'a mut Self;
10285 fn take_or_borrow<'a>(
10286 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10287 ) -> Self::Borrowed<'a> {
10288 value
10289 }
10290 }
10291
10292 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRightsStruct {
10293 type Owned = Self;
10294
10295 #[inline(always)]
10296 fn inline_align(_context: fidl::encoding::Context) -> usize {
10297 8
10298 }
10299
10300 #[inline(always)]
10301 fn inline_size(_context: fidl::encoding::Context) -> usize {
10302 16
10303 }
10304 }
10305
10306 unsafe impl
10307 fidl::encoding::Encode<
10308 VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10309 fidl::encoding::DefaultFuchsiaResourceDialect,
10310 > for &mut VectorOfArrayOfEventInUnionWithReducedRightsStruct
10311 {
10312 #[inline]
10313 unsafe fn encode(
10314 self,
10315 encoder: &mut fidl::encoding::Encoder<
10316 '_,
10317 fidl::encoding::DefaultFuchsiaResourceDialect,
10318 >,
10319 offset: usize,
10320 _depth: fidl::encoding::Depth,
10321 ) -> fidl::Result<()> {
10322 encoder
10323 .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10324 fidl::encoding::Encode::<VectorOfArrayOfEventInUnionWithReducedRightsStruct, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10326 (
10327 <VectorOfArrayOfEventInUnionWithReducedRights as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.u),
10328 ),
10329 encoder, offset, _depth
10330 )
10331 }
10332 }
10333 unsafe impl<
10334 T0: fidl::encoding::Encode<
10335 VectorOfArrayOfEventInUnionWithReducedRights,
10336 fidl::encoding::DefaultFuchsiaResourceDialect,
10337 >,
10338 >
10339 fidl::encoding::Encode<
10340 VectorOfArrayOfEventInUnionWithReducedRightsStruct,
10341 fidl::encoding::DefaultFuchsiaResourceDialect,
10342 > for (T0,)
10343 {
10344 #[inline]
10345 unsafe fn encode(
10346 self,
10347 encoder: &mut fidl::encoding::Encoder<
10348 '_,
10349 fidl::encoding::DefaultFuchsiaResourceDialect,
10350 >,
10351 offset: usize,
10352 depth: fidl::encoding::Depth,
10353 ) -> fidl::Result<()> {
10354 encoder
10355 .debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRightsStruct>(offset);
10356 self.0.encode(encoder, offset + 0, depth)?;
10360 Ok(())
10361 }
10362 }
10363
10364 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10365 for VectorOfArrayOfEventInUnionWithReducedRightsStruct
10366 {
10367 #[inline(always)]
10368 fn new_empty() -> Self {
10369 Self {
10370 u: fidl::new_empty!(
10371 VectorOfArrayOfEventInUnionWithReducedRights,
10372 fidl::encoding::DefaultFuchsiaResourceDialect
10373 ),
10374 }
10375 }
10376
10377 #[inline]
10378 unsafe fn decode(
10379 &mut self,
10380 decoder: &mut fidl::encoding::Decoder<
10381 '_,
10382 fidl::encoding::DefaultFuchsiaResourceDialect,
10383 >,
10384 offset: usize,
10385 _depth: fidl::encoding::Depth,
10386 ) -> fidl::Result<()> {
10387 decoder.debug_check_bounds::<Self>(offset);
10388 fidl::decode!(
10390 VectorOfArrayOfEventInUnionWithReducedRights,
10391 fidl::encoding::DefaultFuchsiaResourceDialect,
10392 &mut self.u,
10393 decoder,
10394 offset + 0,
10395 _depth
10396 )?;
10397 Ok(())
10398 }
10399 }
10400
10401 impl fidl::encoding::ResourceTypeMarker for VectorOfHandles {
10402 type Borrowed<'a> = &'a mut Self;
10403 fn take_or_borrow<'a>(
10404 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10405 ) -> Self::Borrowed<'a> {
10406 value
10407 }
10408 }
10409
10410 unsafe impl fidl::encoding::TypeMarker for VectorOfHandles {
10411 type Owned = Self;
10412
10413 #[inline(always)]
10414 fn inline_align(_context: fidl::encoding::Context) -> usize {
10415 8
10416 }
10417
10418 #[inline(always)]
10419 fn inline_size(_context: fidl::encoding::Context) -> usize {
10420 16
10421 }
10422 }
10423
10424 unsafe impl
10425 fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10426 for &mut VectorOfHandles
10427 {
10428 #[inline]
10429 unsafe fn encode(
10430 self,
10431 encoder: &mut fidl::encoding::Encoder<
10432 '_,
10433 fidl::encoding::DefaultFuchsiaResourceDialect,
10434 >,
10435 offset: usize,
10436 _depth: fidl::encoding::Depth,
10437 ) -> fidl::Result<()> {
10438 encoder.debug_check_bounds::<VectorOfHandles>(offset);
10439 fidl::encoding::Encode::<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10441 (
10442 <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.v),
10443 ),
10444 encoder, offset, _depth
10445 )
10446 }
10447 }
10448 unsafe impl<
10449 T0: fidl::encoding::Encode<
10450 fidl::encoding::UnboundedVector<
10451 fidl::encoding::HandleType<
10452 fidl::Handle,
10453 { fidl::ObjectType::NONE.into_raw() },
10454 2147483648,
10455 >,
10456 >,
10457 fidl::encoding::DefaultFuchsiaResourceDialect,
10458 >,
10459 > fidl::encoding::Encode<VectorOfHandles, fidl::encoding::DefaultFuchsiaResourceDialect>
10460 for (T0,)
10461 {
10462 #[inline]
10463 unsafe fn encode(
10464 self,
10465 encoder: &mut fidl::encoding::Encoder<
10466 '_,
10467 fidl::encoding::DefaultFuchsiaResourceDialect,
10468 >,
10469 offset: usize,
10470 depth: fidl::encoding::Depth,
10471 ) -> fidl::Result<()> {
10472 encoder.debug_check_bounds::<VectorOfHandles>(offset);
10473 self.0.encode(encoder, offset + 0, depth)?;
10477 Ok(())
10478 }
10479 }
10480
10481 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10482 for VectorOfHandles
10483 {
10484 #[inline(always)]
10485 fn new_empty() -> Self {
10486 Self {
10487 v: fidl::new_empty!(
10488 fidl::encoding::UnboundedVector<
10489 fidl::encoding::HandleType<
10490 fidl::Handle,
10491 { fidl::ObjectType::NONE.into_raw() },
10492 2147483648,
10493 >,
10494 >,
10495 fidl::encoding::DefaultFuchsiaResourceDialect
10496 ),
10497 }
10498 }
10499
10500 #[inline]
10501 unsafe fn decode(
10502 &mut self,
10503 decoder: &mut fidl::encoding::Decoder<
10504 '_,
10505 fidl::encoding::DefaultFuchsiaResourceDialect,
10506 >,
10507 offset: usize,
10508 _depth: fidl::encoding::Depth,
10509 ) -> fidl::Result<()> {
10510 decoder.debug_check_bounds::<Self>(offset);
10511 fidl::decode!(
10513 fidl::encoding::UnboundedVector<
10514 fidl::encoding::HandleType<
10515 fidl::Handle,
10516 { fidl::ObjectType::NONE.into_raw() },
10517 2147483648,
10518 >,
10519 >,
10520 fidl::encoding::DefaultFuchsiaResourceDialect,
10521 &mut self.v,
10522 decoder,
10523 offset + 0,
10524 _depth
10525 )?;
10526 Ok(())
10527 }
10528 }
10529
10530 impl fidl::encoding::ResourceTypeMarker for VectorOfOptionalHandles {
10531 type Borrowed<'a> = &'a mut Self;
10532 fn take_or_borrow<'a>(
10533 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10534 ) -> Self::Borrowed<'a> {
10535 value
10536 }
10537 }
10538
10539 unsafe impl fidl::encoding::TypeMarker for VectorOfOptionalHandles {
10540 type Owned = Self;
10541
10542 #[inline(always)]
10543 fn inline_align(_context: fidl::encoding::Context) -> usize {
10544 8
10545 }
10546
10547 #[inline(always)]
10548 fn inline_size(_context: fidl::encoding::Context) -> usize {
10549 16
10550 }
10551 }
10552
10553 unsafe impl
10554 fidl::encoding::Encode<
10555 VectorOfOptionalHandles,
10556 fidl::encoding::DefaultFuchsiaResourceDialect,
10557 > for &mut VectorOfOptionalHandles
10558 {
10559 #[inline]
10560 unsafe fn encode(
10561 self,
10562 encoder: &mut fidl::encoding::Encoder<
10563 '_,
10564 fidl::encoding::DefaultFuchsiaResourceDialect,
10565 >,
10566 offset: usize,
10567 _depth: fidl::encoding::Depth,
10568 ) -> fidl::Result<()> {
10569 encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10570 fidl::encoding::Encode::<
10572 VectorOfOptionalHandles,
10573 fidl::encoding::DefaultFuchsiaResourceDialect,
10574 >::encode(
10575 (<fidl::encoding::UnboundedVector<
10576 fidl::encoding::Optional<
10577 fidl::encoding::HandleType<
10578 fidl::Handle,
10579 { fidl::ObjectType::NONE.into_raw() },
10580 2147483648,
10581 >,
10582 >,
10583 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10584 &mut self.v
10585 ),),
10586 encoder,
10587 offset,
10588 _depth,
10589 )
10590 }
10591 }
10592 unsafe impl<
10593 T0: fidl::encoding::Encode<
10594 fidl::encoding::UnboundedVector<
10595 fidl::encoding::Optional<
10596 fidl::encoding::HandleType<
10597 fidl::Handle,
10598 { fidl::ObjectType::NONE.into_raw() },
10599 2147483648,
10600 >,
10601 >,
10602 >,
10603 fidl::encoding::DefaultFuchsiaResourceDialect,
10604 >,
10605 >
10606 fidl::encoding::Encode<
10607 VectorOfOptionalHandles,
10608 fidl::encoding::DefaultFuchsiaResourceDialect,
10609 > for (T0,)
10610 {
10611 #[inline]
10612 unsafe fn encode(
10613 self,
10614 encoder: &mut fidl::encoding::Encoder<
10615 '_,
10616 fidl::encoding::DefaultFuchsiaResourceDialect,
10617 >,
10618 offset: usize,
10619 depth: fidl::encoding::Depth,
10620 ) -> fidl::Result<()> {
10621 encoder.debug_check_bounds::<VectorOfOptionalHandles>(offset);
10622 self.0.encode(encoder, offset + 0, depth)?;
10626 Ok(())
10627 }
10628 }
10629
10630 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10631 for VectorOfOptionalHandles
10632 {
10633 #[inline(always)]
10634 fn new_empty() -> Self {
10635 Self {
10636 v: fidl::new_empty!(
10637 fidl::encoding::UnboundedVector<
10638 fidl::encoding::Optional<
10639 fidl::encoding::HandleType<
10640 fidl::Handle,
10641 { fidl::ObjectType::NONE.into_raw() },
10642 2147483648,
10643 >,
10644 >,
10645 >,
10646 fidl::encoding::DefaultFuchsiaResourceDialect
10647 ),
10648 }
10649 }
10650
10651 #[inline]
10652 unsafe fn decode(
10653 &mut self,
10654 decoder: &mut fidl::encoding::Decoder<
10655 '_,
10656 fidl::encoding::DefaultFuchsiaResourceDialect,
10657 >,
10658 offset: usize,
10659 _depth: fidl::encoding::Depth,
10660 ) -> fidl::Result<()> {
10661 decoder.debug_check_bounds::<Self>(offset);
10662 fidl::decode!(
10664 fidl::encoding::UnboundedVector<
10665 fidl::encoding::Optional<
10666 fidl::encoding::HandleType<
10667 fidl::Handle,
10668 { fidl::ObjectType::NONE.into_raw() },
10669 2147483648,
10670 >,
10671 >,
10672 >,
10673 fidl::encoding::DefaultFuchsiaResourceDialect,
10674 &mut self.v,
10675 decoder,
10676 offset + 0,
10677 _depth
10678 )?;
10679 Ok(())
10680 }
10681 }
10682
10683 impl fidl::encoding::ResourceTypeMarker for VectorOfUpTo2Handles {
10684 type Borrowed<'a> = &'a mut Self;
10685 fn take_or_borrow<'a>(
10686 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10687 ) -> Self::Borrowed<'a> {
10688 value
10689 }
10690 }
10691
10692 unsafe impl fidl::encoding::TypeMarker for VectorOfUpTo2Handles {
10693 type Owned = Self;
10694
10695 #[inline(always)]
10696 fn inline_align(_context: fidl::encoding::Context) -> usize {
10697 8
10698 }
10699
10700 #[inline(always)]
10701 fn inline_size(_context: fidl::encoding::Context) -> usize {
10702 16
10703 }
10704 }
10705
10706 unsafe impl
10707 fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10708 for &mut VectorOfUpTo2Handles
10709 {
10710 #[inline]
10711 unsafe fn encode(
10712 self,
10713 encoder: &mut fidl::encoding::Encoder<
10714 '_,
10715 fidl::encoding::DefaultFuchsiaResourceDialect,
10716 >,
10717 offset: usize,
10718 _depth: fidl::encoding::Depth,
10719 ) -> fidl::Result<()> {
10720 encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10721 fidl::encoding::Encode::<
10723 VectorOfUpTo2Handles,
10724 fidl::encoding::DefaultFuchsiaResourceDialect,
10725 >::encode(
10726 (<fidl::encoding::Vector<
10727 fidl::encoding::HandleType<
10728 fidl::Handle,
10729 { fidl::ObjectType::NONE.into_raw() },
10730 2147483648,
10731 >,
10732 2,
10733 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10734 &mut self.v
10735 ),),
10736 encoder,
10737 offset,
10738 _depth,
10739 )
10740 }
10741 }
10742 unsafe impl<
10743 T0: fidl::encoding::Encode<
10744 fidl::encoding::Vector<
10745 fidl::encoding::HandleType<
10746 fidl::Handle,
10747 { fidl::ObjectType::NONE.into_raw() },
10748 2147483648,
10749 >,
10750 2,
10751 >,
10752 fidl::encoding::DefaultFuchsiaResourceDialect,
10753 >,
10754 >
10755 fidl::encoding::Encode<VectorOfUpTo2Handles, fidl::encoding::DefaultFuchsiaResourceDialect>
10756 for (T0,)
10757 {
10758 #[inline]
10759 unsafe fn encode(
10760 self,
10761 encoder: &mut fidl::encoding::Encoder<
10762 '_,
10763 fidl::encoding::DefaultFuchsiaResourceDialect,
10764 >,
10765 offset: usize,
10766 depth: fidl::encoding::Depth,
10767 ) -> fidl::Result<()> {
10768 encoder.debug_check_bounds::<VectorOfUpTo2Handles>(offset);
10769 self.0.encode(encoder, offset + 0, depth)?;
10773 Ok(())
10774 }
10775 }
10776
10777 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10778 for VectorOfUpTo2Handles
10779 {
10780 #[inline(always)]
10781 fn new_empty() -> Self {
10782 Self {
10783 v: fidl::new_empty!(
10784 fidl::encoding::Vector<
10785 fidl::encoding::HandleType<
10786 fidl::Handle,
10787 { fidl::ObjectType::NONE.into_raw() },
10788 2147483648,
10789 >,
10790 2,
10791 >,
10792 fidl::encoding::DefaultFuchsiaResourceDialect
10793 ),
10794 }
10795 }
10796
10797 #[inline]
10798 unsafe fn decode(
10799 &mut self,
10800 decoder: &mut fidl::encoding::Decoder<
10801 '_,
10802 fidl::encoding::DefaultFuchsiaResourceDialect,
10803 >,
10804 offset: usize,
10805 _depth: fidl::encoding::Depth,
10806 ) -> fidl::Result<()> {
10807 decoder.debug_check_bounds::<Self>(offset);
10808 fidl::decode!(
10810 fidl::encoding::Vector<
10811 fidl::encoding::HandleType<
10812 fidl::Handle,
10813 { fidl::ObjectType::NONE.into_raw() },
10814 2147483648,
10815 >,
10816 2,
10817 >,
10818 fidl::encoding::DefaultFuchsiaResourceDialect,
10819 &mut self.v,
10820 decoder,
10821 offset + 0,
10822 _depth
10823 )?;
10824 Ok(())
10825 }
10826 }
10827
10828 impl ArrayOfVectorOfEventInTableWithDefaultRights {
10829 #[inline(always)]
10830 fn max_ordinal_present(&self) -> u64 {
10831 if let Some(_) = self.h {
10832 return 1;
10833 }
10834 0
10835 }
10836 }
10837
10838 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10839 type Borrowed<'a> = &'a mut Self;
10840 fn take_or_borrow<'a>(
10841 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10842 ) -> Self::Borrowed<'a> {
10843 value
10844 }
10845 }
10846
10847 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithDefaultRights {
10848 type Owned = Self;
10849
10850 #[inline(always)]
10851 fn inline_align(_context: fidl::encoding::Context) -> usize {
10852 8
10853 }
10854
10855 #[inline(always)]
10856 fn inline_size(_context: fidl::encoding::Context) -> usize {
10857 16
10858 }
10859 }
10860
10861 unsafe impl
10862 fidl::encoding::Encode<
10863 ArrayOfVectorOfEventInTableWithDefaultRights,
10864 fidl::encoding::DefaultFuchsiaResourceDialect,
10865 > for &mut ArrayOfVectorOfEventInTableWithDefaultRights
10866 {
10867 unsafe fn encode(
10868 self,
10869 encoder: &mut fidl::encoding::Encoder<
10870 '_,
10871 fidl::encoding::DefaultFuchsiaResourceDialect,
10872 >,
10873 offset: usize,
10874 mut depth: fidl::encoding::Depth,
10875 ) -> fidl::Result<()> {
10876 encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithDefaultRights>(offset);
10877 let max_ordinal: u64 = self.max_ordinal_present();
10879 encoder.write_num(max_ordinal, offset);
10880 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10881 if max_ordinal == 0 {
10883 return Ok(());
10884 }
10885 depth.increment()?;
10886 let envelope_size = 8;
10887 let bytes_len = max_ordinal as usize * envelope_size;
10888 #[allow(unused_variables)]
10889 let offset = encoder.out_of_line_offset(bytes_len);
10890 let mut _prev_end_offset: usize = 0;
10891 if 1 > max_ordinal {
10892 return Ok(());
10893 }
10894
10895 let cur_offset: usize = (1 - 1) * envelope_size;
10898
10899 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10901
10902 fidl::encoding::encode_in_envelope_optional::<
10907 fidl::encoding::Array<
10908 fidl::encoding::Vector<
10909 fidl::encoding::HandleType<
10910 fidl::Event,
10911 { fidl::ObjectType::EVENT.into_raw() },
10912 53251,
10913 >,
10914 1,
10915 >,
10916 1,
10917 >,
10918 fidl::encoding::DefaultFuchsiaResourceDialect,
10919 >(
10920 self.h.as_mut().map(
10921 <fidl::encoding::Array<
10922 fidl::encoding::Vector<
10923 fidl::encoding::HandleType<
10924 fidl::Event,
10925 { fidl::ObjectType::EVENT.into_raw() },
10926 53251,
10927 >,
10928 1,
10929 >,
10930 1,
10931 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10932 ),
10933 encoder,
10934 offset + cur_offset,
10935 depth,
10936 )?;
10937
10938 _prev_end_offset = cur_offset + envelope_size;
10939
10940 Ok(())
10941 }
10942 }
10943
10944 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10945 for ArrayOfVectorOfEventInTableWithDefaultRights
10946 {
10947 #[inline(always)]
10948 fn new_empty() -> Self {
10949 Self::default()
10950 }
10951
10952 unsafe fn decode(
10953 &mut self,
10954 decoder: &mut fidl::encoding::Decoder<
10955 '_,
10956 fidl::encoding::DefaultFuchsiaResourceDialect,
10957 >,
10958 offset: usize,
10959 mut depth: fidl::encoding::Depth,
10960 ) -> fidl::Result<()> {
10961 decoder.debug_check_bounds::<Self>(offset);
10962 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10963 None => return Err(fidl::Error::NotNullable),
10964 Some(len) => len,
10965 };
10966 if len == 0 {
10968 return Ok(());
10969 };
10970 depth.increment()?;
10971 let envelope_size = 8;
10972 let bytes_len = len * envelope_size;
10973 let offset = decoder.out_of_line_offset(bytes_len)?;
10974 let mut _next_ordinal_to_read = 0;
10976 let mut next_offset = offset;
10977 let end_offset = offset + bytes_len;
10978 _next_ordinal_to_read += 1;
10979 if next_offset >= end_offset {
10980 return Ok(());
10981 }
10982
10983 while _next_ordinal_to_read < 1 {
10985 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10986 _next_ordinal_to_read += 1;
10987 next_offset += envelope_size;
10988 }
10989
10990 let next_out_of_line = decoder.next_out_of_line();
10991 let handles_before = decoder.remaining_handles();
10992 if let Some((inlined, num_bytes, num_handles)) =
10993 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10994 {
10995 let member_inline_size = <fidl::encoding::Array<
10996 fidl::encoding::Vector<
10997 fidl::encoding::HandleType<
10998 fidl::Event,
10999 { fidl::ObjectType::EVENT.into_raw() },
11000 53251,
11001 >,
11002 1,
11003 >,
11004 1,
11005 > as fidl::encoding::TypeMarker>::inline_size(
11006 decoder.context
11007 );
11008 if inlined != (member_inline_size <= 4) {
11009 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11010 }
11011 let inner_offset;
11012 let mut inner_depth = depth.clone();
11013 if inlined {
11014 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11015 inner_offset = next_offset;
11016 } else {
11017 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11018 inner_depth.increment()?;
11019 }
11020 let val_ref = self.h.get_or_insert_with(|| {
11021 fidl::new_empty!(
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 )
11035 });
11036 fidl::decode!(
11037 fidl::encoding::Array<
11038 fidl::encoding::Vector<
11039 fidl::encoding::HandleType<
11040 fidl::Event,
11041 { fidl::ObjectType::EVENT.into_raw() },
11042 53251,
11043 >,
11044 1,
11045 >,
11046 1,
11047 >,
11048 fidl::encoding::DefaultFuchsiaResourceDialect,
11049 val_ref,
11050 decoder,
11051 inner_offset,
11052 inner_depth
11053 )?;
11054 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11055 {
11056 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11057 }
11058 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11059 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11060 }
11061 }
11062
11063 next_offset += envelope_size;
11064
11065 while next_offset < end_offset {
11067 _next_ordinal_to_read += 1;
11068 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11069 next_offset += envelope_size;
11070 }
11071
11072 Ok(())
11073 }
11074 }
11075
11076 impl ArrayOfVectorOfEventInTableWithReducedRights {
11077 #[inline(always)]
11078 fn max_ordinal_present(&self) -> u64 {
11079 if let Some(_) = self.h {
11080 return 1;
11081 }
11082 0
11083 }
11084 }
11085
11086 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11087 type Borrowed<'a> = &'a mut Self;
11088 fn take_or_borrow<'a>(
11089 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11090 ) -> Self::Borrowed<'a> {
11091 value
11092 }
11093 }
11094
11095 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInTableWithReducedRights {
11096 type Owned = Self;
11097
11098 #[inline(always)]
11099 fn inline_align(_context: fidl::encoding::Context) -> usize {
11100 8
11101 }
11102
11103 #[inline(always)]
11104 fn inline_size(_context: fidl::encoding::Context) -> usize {
11105 16
11106 }
11107 }
11108
11109 unsafe impl
11110 fidl::encoding::Encode<
11111 ArrayOfVectorOfEventInTableWithReducedRights,
11112 fidl::encoding::DefaultFuchsiaResourceDialect,
11113 > for &mut ArrayOfVectorOfEventInTableWithReducedRights
11114 {
11115 unsafe fn encode(
11116 self,
11117 encoder: &mut fidl::encoding::Encoder<
11118 '_,
11119 fidl::encoding::DefaultFuchsiaResourceDialect,
11120 >,
11121 offset: usize,
11122 mut depth: fidl::encoding::Depth,
11123 ) -> fidl::Result<()> {
11124 encoder.debug_check_bounds::<ArrayOfVectorOfEventInTableWithReducedRights>(offset);
11125 let max_ordinal: u64 = self.max_ordinal_present();
11127 encoder.write_num(max_ordinal, offset);
11128 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11129 if max_ordinal == 0 {
11131 return Ok(());
11132 }
11133 depth.increment()?;
11134 let envelope_size = 8;
11135 let bytes_len = max_ordinal as usize * envelope_size;
11136 #[allow(unused_variables)]
11137 let offset = encoder.out_of_line_offset(bytes_len);
11138 let mut _prev_end_offset: usize = 0;
11139 if 1 > max_ordinal {
11140 return Ok(());
11141 }
11142
11143 let cur_offset: usize = (1 - 1) * envelope_size;
11146
11147 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11149
11150 fidl::encoding::encode_in_envelope_optional::<
11155 fidl::encoding::Array<
11156 fidl::encoding::Vector<
11157 fidl::encoding::HandleType<
11158 fidl::Event,
11159 { fidl::ObjectType::EVENT.into_raw() },
11160 49155,
11161 >,
11162 1,
11163 >,
11164 1,
11165 >,
11166 fidl::encoding::DefaultFuchsiaResourceDialect,
11167 >(
11168 self.h.as_mut().map(
11169 <fidl::encoding::Array<
11170 fidl::encoding::Vector<
11171 fidl::encoding::HandleType<
11172 fidl::Event,
11173 { fidl::ObjectType::EVENT.into_raw() },
11174 49155,
11175 >,
11176 1,
11177 >,
11178 1,
11179 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11180 ),
11181 encoder,
11182 offset + cur_offset,
11183 depth,
11184 )?;
11185
11186 _prev_end_offset = cur_offset + envelope_size;
11187
11188 Ok(())
11189 }
11190 }
11191
11192 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11193 for ArrayOfVectorOfEventInTableWithReducedRights
11194 {
11195 #[inline(always)]
11196 fn new_empty() -> Self {
11197 Self::default()
11198 }
11199
11200 unsafe fn decode(
11201 &mut self,
11202 decoder: &mut fidl::encoding::Decoder<
11203 '_,
11204 fidl::encoding::DefaultFuchsiaResourceDialect,
11205 >,
11206 offset: usize,
11207 mut depth: fidl::encoding::Depth,
11208 ) -> fidl::Result<()> {
11209 decoder.debug_check_bounds::<Self>(offset);
11210 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11211 None => return Err(fidl::Error::NotNullable),
11212 Some(len) => len,
11213 };
11214 if len == 0 {
11216 return Ok(());
11217 };
11218 depth.increment()?;
11219 let envelope_size = 8;
11220 let bytes_len = len * envelope_size;
11221 let offset = decoder.out_of_line_offset(bytes_len)?;
11222 let mut _next_ordinal_to_read = 0;
11224 let mut next_offset = offset;
11225 let end_offset = offset + bytes_len;
11226 _next_ordinal_to_read += 1;
11227 if next_offset >= end_offset {
11228 return Ok(());
11229 }
11230
11231 while _next_ordinal_to_read < 1 {
11233 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11234 _next_ordinal_to_read += 1;
11235 next_offset += envelope_size;
11236 }
11237
11238 let next_out_of_line = decoder.next_out_of_line();
11239 let handles_before = decoder.remaining_handles();
11240 if let Some((inlined, num_bytes, num_handles)) =
11241 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11242 {
11243 let member_inline_size = <fidl::encoding::Array<
11244 fidl::encoding::Vector<
11245 fidl::encoding::HandleType<
11246 fidl::Event,
11247 { fidl::ObjectType::EVENT.into_raw() },
11248 49155,
11249 >,
11250 1,
11251 >,
11252 1,
11253 > as fidl::encoding::TypeMarker>::inline_size(
11254 decoder.context
11255 );
11256 if inlined != (member_inline_size <= 4) {
11257 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11258 }
11259 let inner_offset;
11260 let mut inner_depth = depth.clone();
11261 if inlined {
11262 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11263 inner_offset = next_offset;
11264 } else {
11265 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11266 inner_depth.increment()?;
11267 }
11268 let val_ref = self.h.get_or_insert_with(|| {
11269 fidl::new_empty!(
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 )
11283 });
11284 fidl::decode!(
11285 fidl::encoding::Array<
11286 fidl::encoding::Vector<
11287 fidl::encoding::HandleType<
11288 fidl::Event,
11289 { fidl::ObjectType::EVENT.into_raw() },
11290 49155,
11291 >,
11292 1,
11293 >,
11294 1,
11295 >,
11296 fidl::encoding::DefaultFuchsiaResourceDialect,
11297 val_ref,
11298 decoder,
11299 inner_offset,
11300 inner_depth
11301 )?;
11302 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11303 {
11304 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11305 }
11306 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11307 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11308 }
11309 }
11310
11311 next_offset += envelope_size;
11312
11313 while next_offset < end_offset {
11315 _next_ordinal_to_read += 1;
11316 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11317 next_offset += envelope_size;
11318 }
11319
11320 Ok(())
11321 }
11322 }
11323
11324 impl EmptyResourceTable {
11325 #[inline(always)]
11326 fn max_ordinal_present(&self) -> u64 {
11327 0
11328 }
11329 }
11330
11331 impl fidl::encoding::ResourceTypeMarker for EmptyResourceTable {
11332 type Borrowed<'a> = &'a mut Self;
11333 fn take_or_borrow<'a>(
11334 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11335 ) -> Self::Borrowed<'a> {
11336 value
11337 }
11338 }
11339
11340 unsafe impl fidl::encoding::TypeMarker for EmptyResourceTable {
11341 type Owned = Self;
11342
11343 #[inline(always)]
11344 fn inline_align(_context: fidl::encoding::Context) -> usize {
11345 8
11346 }
11347
11348 #[inline(always)]
11349 fn inline_size(_context: fidl::encoding::Context) -> usize {
11350 16
11351 }
11352 }
11353
11354 unsafe impl
11355 fidl::encoding::Encode<EmptyResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11356 for &mut EmptyResourceTable
11357 {
11358 unsafe fn encode(
11359 self,
11360 encoder: &mut fidl::encoding::Encoder<
11361 '_,
11362 fidl::encoding::DefaultFuchsiaResourceDialect,
11363 >,
11364 offset: usize,
11365 mut depth: fidl::encoding::Depth,
11366 ) -> fidl::Result<()> {
11367 encoder.debug_check_bounds::<EmptyResourceTable>(offset);
11368 let max_ordinal: u64 = self.max_ordinal_present();
11370 encoder.write_num(max_ordinal, offset);
11371 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11372 if max_ordinal == 0 {
11374 return Ok(());
11375 }
11376 depth.increment()?;
11377 let envelope_size = 8;
11378 let bytes_len = max_ordinal as usize * envelope_size;
11379 #[allow(unused_variables)]
11380 let offset = encoder.out_of_line_offset(bytes_len);
11381 let mut _prev_end_offset: usize = 0;
11382
11383 Ok(())
11384 }
11385 }
11386
11387 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11388 for EmptyResourceTable
11389 {
11390 #[inline(always)]
11391 fn new_empty() -> Self {
11392 Self::default()
11393 }
11394
11395 unsafe fn decode(
11396 &mut self,
11397 decoder: &mut fidl::encoding::Decoder<
11398 '_,
11399 fidl::encoding::DefaultFuchsiaResourceDialect,
11400 >,
11401 offset: usize,
11402 mut depth: fidl::encoding::Depth,
11403 ) -> fidl::Result<()> {
11404 decoder.debug_check_bounds::<Self>(offset);
11405 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11406 None => return Err(fidl::Error::NotNullable),
11407 Some(len) => len,
11408 };
11409 if len == 0 {
11411 return Ok(());
11412 };
11413 depth.increment()?;
11414 let envelope_size = 8;
11415 let bytes_len = len * envelope_size;
11416 let offset = decoder.out_of_line_offset(bytes_len)?;
11417 let mut _next_ordinal_to_read = 0;
11419 let mut next_offset = offset;
11420 let end_offset = offset + bytes_len;
11421
11422 while next_offset < end_offset {
11424 _next_ordinal_to_read += 1;
11425 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11426 next_offset += envelope_size;
11427 }
11428
11429 Ok(())
11430 }
11431 }
11432
11433 impl SimpleResourceTable {
11434 #[inline(always)]
11435 fn max_ordinal_present(&self) -> u64 {
11436 if let Some(_) = self.y {
11437 return 5;
11438 }
11439 if let Some(_) = self.x {
11440 return 1;
11441 }
11442 0
11443 }
11444 }
11445
11446 impl fidl::encoding::ResourceTypeMarker for SimpleResourceTable {
11447 type Borrowed<'a> = &'a mut Self;
11448 fn take_or_borrow<'a>(
11449 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11450 ) -> Self::Borrowed<'a> {
11451 value
11452 }
11453 }
11454
11455 unsafe impl fidl::encoding::TypeMarker for SimpleResourceTable {
11456 type Owned = Self;
11457
11458 #[inline(always)]
11459 fn inline_align(_context: fidl::encoding::Context) -> usize {
11460 8
11461 }
11462
11463 #[inline(always)]
11464 fn inline_size(_context: fidl::encoding::Context) -> usize {
11465 16
11466 }
11467 }
11468
11469 unsafe impl
11470 fidl::encoding::Encode<SimpleResourceTable, fidl::encoding::DefaultFuchsiaResourceDialect>
11471 for &mut SimpleResourceTable
11472 {
11473 unsafe fn encode(
11474 self,
11475 encoder: &mut fidl::encoding::Encoder<
11476 '_,
11477 fidl::encoding::DefaultFuchsiaResourceDialect,
11478 >,
11479 offset: usize,
11480 mut depth: fidl::encoding::Depth,
11481 ) -> fidl::Result<()> {
11482 encoder.debug_check_bounds::<SimpleResourceTable>(offset);
11483 let max_ordinal: u64 = self.max_ordinal_present();
11485 encoder.write_num(max_ordinal, offset);
11486 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11487 if max_ordinal == 0 {
11489 return Ok(());
11490 }
11491 depth.increment()?;
11492 let envelope_size = 8;
11493 let bytes_len = max_ordinal as usize * envelope_size;
11494 #[allow(unused_variables)]
11495 let offset = encoder.out_of_line_offset(bytes_len);
11496 let mut _prev_end_offset: usize = 0;
11497 if 1 > max_ordinal {
11498 return Ok(());
11499 }
11500
11501 let cur_offset: usize = (1 - 1) * envelope_size;
11504
11505 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11507
11508 fidl::encoding::encode_in_envelope_optional::<
11513 i64,
11514 fidl::encoding::DefaultFuchsiaResourceDialect,
11515 >(
11516 self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11517 encoder,
11518 offset + cur_offset,
11519 depth,
11520 )?;
11521
11522 _prev_end_offset = cur_offset + envelope_size;
11523 if 5 > max_ordinal {
11524 return Ok(());
11525 }
11526
11527 let cur_offset: usize = (5 - 1) * envelope_size;
11530
11531 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11533
11534 fidl::encoding::encode_in_envelope_optional::<
11539 i64,
11540 fidl::encoding::DefaultFuchsiaResourceDialect,
11541 >(
11542 self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
11543 encoder,
11544 offset + cur_offset,
11545 depth,
11546 )?;
11547
11548 _prev_end_offset = cur_offset + envelope_size;
11549
11550 Ok(())
11551 }
11552 }
11553
11554 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11555 for SimpleResourceTable
11556 {
11557 #[inline(always)]
11558 fn new_empty() -> Self {
11559 Self::default()
11560 }
11561
11562 unsafe fn decode(
11563 &mut self,
11564 decoder: &mut fidl::encoding::Decoder<
11565 '_,
11566 fidl::encoding::DefaultFuchsiaResourceDialect,
11567 >,
11568 offset: usize,
11569 mut depth: fidl::encoding::Depth,
11570 ) -> fidl::Result<()> {
11571 decoder.debug_check_bounds::<Self>(offset);
11572 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11573 None => return Err(fidl::Error::NotNullable),
11574 Some(len) => len,
11575 };
11576 if len == 0 {
11578 return Ok(());
11579 };
11580 depth.increment()?;
11581 let envelope_size = 8;
11582 let bytes_len = len * envelope_size;
11583 let offset = decoder.out_of_line_offset(bytes_len)?;
11584 let mut _next_ordinal_to_read = 0;
11586 let mut next_offset = offset;
11587 let end_offset = offset + bytes_len;
11588 _next_ordinal_to_read += 1;
11589 if next_offset >= end_offset {
11590 return Ok(());
11591 }
11592
11593 while _next_ordinal_to_read < 1 {
11595 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11596 _next_ordinal_to_read += 1;
11597 next_offset += envelope_size;
11598 }
11599
11600 let next_out_of_line = decoder.next_out_of_line();
11601 let handles_before = decoder.remaining_handles();
11602 if let Some((inlined, num_bytes, num_handles)) =
11603 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11604 {
11605 let member_inline_size =
11606 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11607 if inlined != (member_inline_size <= 4) {
11608 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11609 }
11610 let inner_offset;
11611 let mut inner_depth = depth.clone();
11612 if inlined {
11613 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11614 inner_offset = next_offset;
11615 } else {
11616 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11617 inner_depth.increment()?;
11618 }
11619 let val_ref = self.x.get_or_insert_with(|| {
11620 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11621 });
11622 fidl::decode!(
11623 i64,
11624 fidl::encoding::DefaultFuchsiaResourceDialect,
11625 val_ref,
11626 decoder,
11627 inner_offset,
11628 inner_depth
11629 )?;
11630 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11631 {
11632 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11633 }
11634 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11635 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11636 }
11637 }
11638
11639 next_offset += envelope_size;
11640 _next_ordinal_to_read += 1;
11641 if next_offset >= end_offset {
11642 return Ok(());
11643 }
11644
11645 while _next_ordinal_to_read < 5 {
11647 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11648 _next_ordinal_to_read += 1;
11649 next_offset += envelope_size;
11650 }
11651
11652 let next_out_of_line = decoder.next_out_of_line();
11653 let handles_before = decoder.remaining_handles();
11654 if let Some((inlined, num_bytes, num_handles)) =
11655 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11656 {
11657 let member_inline_size =
11658 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11659 if inlined != (member_inline_size <= 4) {
11660 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11661 }
11662 let inner_offset;
11663 let mut inner_depth = depth.clone();
11664 if inlined {
11665 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11666 inner_offset = next_offset;
11667 } else {
11668 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11669 inner_depth.increment()?;
11670 }
11671 let val_ref = self.y.get_or_insert_with(|| {
11672 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11673 });
11674 fidl::decode!(
11675 i64,
11676 fidl::encoding::DefaultFuchsiaResourceDialect,
11677 val_ref,
11678 decoder,
11679 inner_offset,
11680 inner_depth
11681 )?;
11682 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11683 {
11684 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11685 }
11686 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11687 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11688 }
11689 }
11690
11691 next_offset += envelope_size;
11692
11693 while next_offset < end_offset {
11695 _next_ordinal_to_read += 1;
11696 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11697 next_offset += envelope_size;
11698 }
11699
11700 Ok(())
11701 }
11702 }
11703
11704 impl TableFieldInlinedHandle {
11705 #[inline(always)]
11706 fn max_ordinal_present(&self) -> u64 {
11707 if let Some(_) = self.f {
11708 return 1;
11709 }
11710 0
11711 }
11712 }
11713
11714 impl fidl::encoding::ResourceTypeMarker for TableFieldInlinedHandle {
11715 type Borrowed<'a> = &'a mut Self;
11716 fn take_or_borrow<'a>(
11717 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11718 ) -> Self::Borrowed<'a> {
11719 value
11720 }
11721 }
11722
11723 unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedHandle {
11724 type Owned = Self;
11725
11726 #[inline(always)]
11727 fn inline_align(_context: fidl::encoding::Context) -> usize {
11728 8
11729 }
11730
11731 #[inline(always)]
11732 fn inline_size(_context: fidl::encoding::Context) -> usize {
11733 16
11734 }
11735 }
11736
11737 unsafe impl
11738 fidl::encoding::Encode<
11739 TableFieldInlinedHandle,
11740 fidl::encoding::DefaultFuchsiaResourceDialect,
11741 > for &mut TableFieldInlinedHandle
11742 {
11743 unsafe fn encode(
11744 self,
11745 encoder: &mut fidl::encoding::Encoder<
11746 '_,
11747 fidl::encoding::DefaultFuchsiaResourceDialect,
11748 >,
11749 offset: usize,
11750 mut depth: fidl::encoding::Depth,
11751 ) -> fidl::Result<()> {
11752 encoder.debug_check_bounds::<TableFieldInlinedHandle>(offset);
11753 let max_ordinal: u64 = self.max_ordinal_present();
11755 encoder.write_num(max_ordinal, offset);
11756 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11757 if max_ordinal == 0 {
11759 return Ok(());
11760 }
11761 depth.increment()?;
11762 let envelope_size = 8;
11763 let bytes_len = max_ordinal as usize * envelope_size;
11764 #[allow(unused_variables)]
11765 let offset = encoder.out_of_line_offset(bytes_len);
11766 let mut _prev_end_offset: usize = 0;
11767 if 1 > max_ordinal {
11768 return Ok(());
11769 }
11770
11771 let cur_offset: usize = (1 - 1) * envelope_size;
11774
11775 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11777
11778 fidl::encoding::encode_in_envelope_optional::<
11783 fidl::encoding::HandleType<
11784 fidl::Channel,
11785 { fidl::ObjectType::CHANNEL.into_raw() },
11786 2147483648,
11787 >,
11788 fidl::encoding::DefaultFuchsiaResourceDialect,
11789 >(
11790 self.f.as_mut().map(
11791 <fidl::encoding::HandleType<
11792 fidl::Channel,
11793 { fidl::ObjectType::CHANNEL.into_raw() },
11794 2147483648,
11795 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11796 ),
11797 encoder,
11798 offset + cur_offset,
11799 depth,
11800 )?;
11801
11802 _prev_end_offset = cur_offset + envelope_size;
11803
11804 Ok(())
11805 }
11806 }
11807
11808 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11809 for TableFieldInlinedHandle
11810 {
11811 #[inline(always)]
11812 fn new_empty() -> Self {
11813 Self::default()
11814 }
11815
11816 unsafe fn decode(
11817 &mut self,
11818 decoder: &mut fidl::encoding::Decoder<
11819 '_,
11820 fidl::encoding::DefaultFuchsiaResourceDialect,
11821 >,
11822 offset: usize,
11823 mut depth: fidl::encoding::Depth,
11824 ) -> fidl::Result<()> {
11825 decoder.debug_check_bounds::<Self>(offset);
11826 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11827 None => return Err(fidl::Error::NotNullable),
11828 Some(len) => len,
11829 };
11830 if len == 0 {
11832 return Ok(());
11833 };
11834 depth.increment()?;
11835 let envelope_size = 8;
11836 let bytes_len = len * envelope_size;
11837 let offset = decoder.out_of_line_offset(bytes_len)?;
11838 let mut _next_ordinal_to_read = 0;
11840 let mut next_offset = offset;
11841 let end_offset = offset + bytes_len;
11842 _next_ordinal_to_read += 1;
11843 if next_offset >= end_offset {
11844 return Ok(());
11845 }
11846
11847 while _next_ordinal_to_read < 1 {
11849 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11850 _next_ordinal_to_read += 1;
11851 next_offset += envelope_size;
11852 }
11853
11854 let next_out_of_line = decoder.next_out_of_line();
11855 let handles_before = decoder.remaining_handles();
11856 if let Some((inlined, num_bytes, num_handles)) =
11857 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11858 {
11859 let member_inline_size = <fidl::encoding::HandleType<
11860 fidl::Channel,
11861 { fidl::ObjectType::CHANNEL.into_raw() },
11862 2147483648,
11863 > as fidl::encoding::TypeMarker>::inline_size(
11864 decoder.context
11865 );
11866 if inlined != (member_inline_size <= 4) {
11867 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11868 }
11869 let inner_offset;
11870 let mut inner_depth = depth.clone();
11871 if inlined {
11872 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11873 inner_offset = next_offset;
11874 } else {
11875 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11876 inner_depth.increment()?;
11877 }
11878 let val_ref =
11879 self.f.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
11880 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11881 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11882 {
11883 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11884 }
11885 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11886 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11887 }
11888 }
11889
11890 next_offset += envelope_size;
11891
11892 while next_offset < end_offset {
11894 _next_ordinal_to_read += 1;
11895 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11896 next_offset += envelope_size;
11897 }
11898
11899 Ok(())
11900 }
11901 }
11902
11903 impl TableFieldUnknownResource {
11904 #[inline(always)]
11905 fn max_ordinal_present(&self) -> u64 {
11906 0
11907 }
11908 }
11909
11910 impl fidl::encoding::ResourceTypeMarker for TableFieldUnknownResource {
11911 type Borrowed<'a> = &'a mut Self;
11912 fn take_or_borrow<'a>(
11913 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11914 ) -> Self::Borrowed<'a> {
11915 value
11916 }
11917 }
11918
11919 unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownResource {
11920 type Owned = Self;
11921
11922 #[inline(always)]
11923 fn inline_align(_context: fidl::encoding::Context) -> usize {
11924 8
11925 }
11926
11927 #[inline(always)]
11928 fn inline_size(_context: fidl::encoding::Context) -> usize {
11929 16
11930 }
11931 }
11932
11933 unsafe impl
11934 fidl::encoding::Encode<
11935 TableFieldUnknownResource,
11936 fidl::encoding::DefaultFuchsiaResourceDialect,
11937 > for &mut TableFieldUnknownResource
11938 {
11939 unsafe fn encode(
11940 self,
11941 encoder: &mut fidl::encoding::Encoder<
11942 '_,
11943 fidl::encoding::DefaultFuchsiaResourceDialect,
11944 >,
11945 offset: usize,
11946 mut depth: fidl::encoding::Depth,
11947 ) -> fidl::Result<()> {
11948 encoder.debug_check_bounds::<TableFieldUnknownResource>(offset);
11949 let max_ordinal: u64 = self.max_ordinal_present();
11951 encoder.write_num(max_ordinal, offset);
11952 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11953 if max_ordinal == 0 {
11955 return Ok(());
11956 }
11957 depth.increment()?;
11958 let envelope_size = 8;
11959 let bytes_len = max_ordinal as usize * envelope_size;
11960 #[allow(unused_variables)]
11961 let offset = encoder.out_of_line_offset(bytes_len);
11962 let mut _prev_end_offset: usize = 0;
11963
11964 Ok(())
11965 }
11966 }
11967
11968 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11969 for TableFieldUnknownResource
11970 {
11971 #[inline(always)]
11972 fn new_empty() -> Self {
11973 Self::default()
11974 }
11975
11976 unsafe fn decode(
11977 &mut self,
11978 decoder: &mut fidl::encoding::Decoder<
11979 '_,
11980 fidl::encoding::DefaultFuchsiaResourceDialect,
11981 >,
11982 offset: usize,
11983 mut depth: fidl::encoding::Depth,
11984 ) -> fidl::Result<()> {
11985 decoder.debug_check_bounds::<Self>(offset);
11986 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11987 None => return Err(fidl::Error::NotNullable),
11988 Some(len) => len,
11989 };
11990 if len == 0 {
11992 return Ok(());
11993 };
11994 depth.increment()?;
11995 let envelope_size = 8;
11996 let bytes_len = len * envelope_size;
11997 let offset = decoder.out_of_line_offset(bytes_len)?;
11998 let mut _next_ordinal_to_read = 0;
12000 let mut next_offset = offset;
12001 let end_offset = offset + bytes_len;
12002
12003 while next_offset < end_offset {
12005 _next_ordinal_to_read += 1;
12006 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12007 next_offset += envelope_size;
12008 }
12009
12010 Ok(())
12011 }
12012 }
12013
12014 impl TableOfEndpointsTable {
12015 #[inline(always)]
12016 fn max_ordinal_present(&self) -> u64 {
12017 if let Some(_) = self.server_end {
12018 return 2;
12019 }
12020 if let Some(_) = self.client_end {
12021 return 1;
12022 }
12023 0
12024 }
12025 }
12026
12027 impl fidl::encoding::ResourceTypeMarker for TableOfEndpointsTable {
12028 type Borrowed<'a> = &'a mut Self;
12029 fn take_or_borrow<'a>(
12030 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12031 ) -> Self::Borrowed<'a> {
12032 value
12033 }
12034 }
12035
12036 unsafe impl fidl::encoding::TypeMarker for TableOfEndpointsTable {
12037 type Owned = Self;
12038
12039 #[inline(always)]
12040 fn inline_align(_context: fidl::encoding::Context) -> usize {
12041 8
12042 }
12043
12044 #[inline(always)]
12045 fn inline_size(_context: fidl::encoding::Context) -> usize {
12046 16
12047 }
12048 }
12049
12050 unsafe impl
12051 fidl::encoding::Encode<TableOfEndpointsTable, fidl::encoding::DefaultFuchsiaResourceDialect>
12052 for &mut TableOfEndpointsTable
12053 {
12054 unsafe fn encode(
12055 self,
12056 encoder: &mut fidl::encoding::Encoder<
12057 '_,
12058 fidl::encoding::DefaultFuchsiaResourceDialect,
12059 >,
12060 offset: usize,
12061 mut depth: fidl::encoding::Depth,
12062 ) -> fidl::Result<()> {
12063 encoder.debug_check_bounds::<TableOfEndpointsTable>(offset);
12064 let max_ordinal: u64 = self.max_ordinal_present();
12066 encoder.write_num(max_ordinal, offset);
12067 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12068 if max_ordinal == 0 {
12070 return Ok(());
12071 }
12072 depth.increment()?;
12073 let envelope_size = 8;
12074 let bytes_len = max_ordinal as usize * envelope_size;
12075 #[allow(unused_variables)]
12076 let offset = encoder.out_of_line_offset(bytes_len);
12077 let mut _prev_end_offset: usize = 0;
12078 if 1 > max_ordinal {
12079 return Ok(());
12080 }
12081
12082 let cur_offset: usize = (1 - 1) * envelope_size;
12085
12086 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12088
12089 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12094 self.client_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12095 encoder, offset + cur_offset, depth
12096 )?;
12097
12098 _prev_end_offset = cur_offset + envelope_size;
12099 if 2 > max_ordinal {
12100 return Ok(());
12101 }
12102
12103 let cur_offset: usize = (2 - 1) * envelope_size;
12106
12107 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12109
12110 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12115 self.server_end.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12116 encoder, offset + cur_offset, depth
12117 )?;
12118
12119 _prev_end_offset = cur_offset + envelope_size;
12120
12121 Ok(())
12122 }
12123 }
12124
12125 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12126 for TableOfEndpointsTable
12127 {
12128 #[inline(always)]
12129 fn new_empty() -> Self {
12130 Self::default()
12131 }
12132
12133 unsafe fn decode(
12134 &mut self,
12135 decoder: &mut fidl::encoding::Decoder<
12136 '_,
12137 fidl::encoding::DefaultFuchsiaResourceDialect,
12138 >,
12139 offset: usize,
12140 mut depth: fidl::encoding::Depth,
12141 ) -> fidl::Result<()> {
12142 decoder.debug_check_bounds::<Self>(offset);
12143 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12144 None => return Err(fidl::Error::NotNullable),
12145 Some(len) => len,
12146 };
12147 if len == 0 {
12149 return Ok(());
12150 };
12151 depth.increment()?;
12152 let envelope_size = 8;
12153 let bytes_len = len * envelope_size;
12154 let offset = decoder.out_of_line_offset(bytes_len)?;
12155 let mut _next_ordinal_to_read = 0;
12157 let mut next_offset = offset;
12158 let end_offset = offset + bytes_len;
12159 _next_ordinal_to_read += 1;
12160 if next_offset >= end_offset {
12161 return Ok(());
12162 }
12163
12164 while _next_ordinal_to_read < 1 {
12166 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12167 _next_ordinal_to_read += 1;
12168 next_offset += envelope_size;
12169 }
12170
12171 let next_out_of_line = decoder.next_out_of_line();
12172 let handles_before = decoder.remaining_handles();
12173 if let Some((inlined, num_bytes, num_handles)) =
12174 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12175 {
12176 let member_inline_size = <fidl::encoding::Endpoint<
12177 fidl::endpoints::ClientEnd<ProtocolMarker>,
12178 > as fidl::encoding::TypeMarker>::inline_size(
12179 decoder.context
12180 );
12181 if inlined != (member_inline_size <= 4) {
12182 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12183 }
12184 let inner_offset;
12185 let mut inner_depth = depth.clone();
12186 if inlined {
12187 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12188 inner_offset = next_offset;
12189 } else {
12190 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12191 inner_depth.increment()?;
12192 }
12193 let val_ref = self.client_end.get_or_insert_with(|| {
12194 fidl::new_empty!(
12195 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12196 fidl::encoding::DefaultFuchsiaResourceDialect
12197 )
12198 });
12199 fidl::decode!(
12200 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
12201 fidl::encoding::DefaultFuchsiaResourceDialect,
12202 val_ref,
12203 decoder,
12204 inner_offset,
12205 inner_depth
12206 )?;
12207 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12208 {
12209 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12210 }
12211 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12212 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12213 }
12214 }
12215
12216 next_offset += envelope_size;
12217 _next_ordinal_to_read += 1;
12218 if next_offset >= end_offset {
12219 return Ok(());
12220 }
12221
12222 while _next_ordinal_to_read < 2 {
12224 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12225 _next_ordinal_to_read += 1;
12226 next_offset += envelope_size;
12227 }
12228
12229 let next_out_of_line = decoder.next_out_of_line();
12230 let handles_before = decoder.remaining_handles();
12231 if let Some((inlined, num_bytes, num_handles)) =
12232 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12233 {
12234 let member_inline_size = <fidl::encoding::Endpoint<
12235 fidl::endpoints::ServerEnd<ProtocolMarker>,
12236 > as fidl::encoding::TypeMarker>::inline_size(
12237 decoder.context
12238 );
12239 if inlined != (member_inline_size <= 4) {
12240 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12241 }
12242 let inner_offset;
12243 let mut inner_depth = depth.clone();
12244 if inlined {
12245 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12246 inner_offset = next_offset;
12247 } else {
12248 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12249 inner_depth.increment()?;
12250 }
12251 let val_ref = self.server_end.get_or_insert_with(|| {
12252 fidl::new_empty!(
12253 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12254 fidl::encoding::DefaultFuchsiaResourceDialect
12255 )
12256 });
12257 fidl::decode!(
12258 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
12259 fidl::encoding::DefaultFuchsiaResourceDialect,
12260 val_ref,
12261 decoder,
12262 inner_offset,
12263 inner_depth
12264 )?;
12265 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12266 {
12267 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12268 }
12269 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12270 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12271 }
12272 }
12273
12274 next_offset += envelope_size;
12275
12276 while next_offset < end_offset {
12278 _next_ordinal_to_read += 1;
12279 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12280 next_offset += envelope_size;
12281 }
12282
12283 Ok(())
12284 }
12285 }
12286
12287 impl TableUnionWithVectorReservedSandwich {
12288 #[inline(always)]
12289 fn max_ordinal_present(&self) -> u64 {
12290 if let Some(_) = self.uv {
12291 return 2;
12292 }
12293 0
12294 }
12295 }
12296
12297 impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorReservedSandwich {
12298 type Borrowed<'a> = &'a mut Self;
12299 fn take_or_borrow<'a>(
12300 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12301 ) -> Self::Borrowed<'a> {
12302 value
12303 }
12304 }
12305
12306 unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorReservedSandwich {
12307 type Owned = Self;
12308
12309 #[inline(always)]
12310 fn inline_align(_context: fidl::encoding::Context) -> usize {
12311 8
12312 }
12313
12314 #[inline(always)]
12315 fn inline_size(_context: fidl::encoding::Context) -> usize {
12316 16
12317 }
12318 }
12319
12320 unsafe impl
12321 fidl::encoding::Encode<
12322 TableUnionWithVectorReservedSandwich,
12323 fidl::encoding::DefaultFuchsiaResourceDialect,
12324 > for &mut TableUnionWithVectorReservedSandwich
12325 {
12326 unsafe fn encode(
12327 self,
12328 encoder: &mut fidl::encoding::Encoder<
12329 '_,
12330 fidl::encoding::DefaultFuchsiaResourceDialect,
12331 >,
12332 offset: usize,
12333 mut depth: fidl::encoding::Depth,
12334 ) -> fidl::Result<()> {
12335 encoder.debug_check_bounds::<TableUnionWithVectorReservedSandwich>(offset);
12336 let max_ordinal: u64 = self.max_ordinal_present();
12338 encoder.write_num(max_ordinal, offset);
12339 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12340 if max_ordinal == 0 {
12342 return Ok(());
12343 }
12344 depth.increment()?;
12345 let envelope_size = 8;
12346 let bytes_len = max_ordinal as usize * envelope_size;
12347 #[allow(unused_variables)]
12348 let offset = encoder.out_of_line_offset(bytes_len);
12349 let mut _prev_end_offset: usize = 0;
12350 if 2 > max_ordinal {
12351 return Ok(());
12352 }
12353
12354 let cur_offset: usize = (2 - 1) * envelope_size;
12357
12358 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12360
12361 fidl::encoding::encode_in_envelope_optional::<
12366 UnionWithVector,
12367 fidl::encoding::DefaultFuchsiaResourceDialect,
12368 >(
12369 self.uv
12370 .as_mut()
12371 .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12372 encoder,
12373 offset + cur_offset,
12374 depth,
12375 )?;
12376
12377 _prev_end_offset = cur_offset + envelope_size;
12378
12379 Ok(())
12380 }
12381 }
12382
12383 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12384 for TableUnionWithVectorReservedSandwich
12385 {
12386 #[inline(always)]
12387 fn new_empty() -> Self {
12388 Self::default()
12389 }
12390
12391 unsafe fn decode(
12392 &mut self,
12393 decoder: &mut fidl::encoding::Decoder<
12394 '_,
12395 fidl::encoding::DefaultFuchsiaResourceDialect,
12396 >,
12397 offset: usize,
12398 mut depth: fidl::encoding::Depth,
12399 ) -> fidl::Result<()> {
12400 decoder.debug_check_bounds::<Self>(offset);
12401 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12402 None => return Err(fidl::Error::NotNullable),
12403 Some(len) => len,
12404 };
12405 if len == 0 {
12407 return Ok(());
12408 };
12409 depth.increment()?;
12410 let envelope_size = 8;
12411 let bytes_len = len * envelope_size;
12412 let offset = decoder.out_of_line_offset(bytes_len)?;
12413 let mut _next_ordinal_to_read = 0;
12415 let mut next_offset = offset;
12416 let end_offset = offset + bytes_len;
12417 _next_ordinal_to_read += 1;
12418 if next_offset >= end_offset {
12419 return Ok(());
12420 }
12421
12422 while _next_ordinal_to_read < 2 {
12424 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12425 _next_ordinal_to_read += 1;
12426 next_offset += envelope_size;
12427 }
12428
12429 let next_out_of_line = decoder.next_out_of_line();
12430 let handles_before = decoder.remaining_handles();
12431 if let Some((inlined, num_bytes, num_handles)) =
12432 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12433 {
12434 let member_inline_size =
12435 <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12436 if inlined != (member_inline_size <= 4) {
12437 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12438 }
12439 let inner_offset;
12440 let mut inner_depth = depth.clone();
12441 if inlined {
12442 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12443 inner_offset = next_offset;
12444 } else {
12445 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12446 inner_depth.increment()?;
12447 }
12448 let val_ref = self.uv.get_or_insert_with(|| {
12449 fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12450 });
12451 fidl::decode!(
12452 UnionWithVector,
12453 fidl::encoding::DefaultFuchsiaResourceDialect,
12454 val_ref,
12455 decoder,
12456 inner_offset,
12457 inner_depth
12458 )?;
12459 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12460 {
12461 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12462 }
12463 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12464 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12465 }
12466 }
12467
12468 next_offset += envelope_size;
12469
12470 while next_offset < end_offset {
12472 _next_ordinal_to_read += 1;
12473 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12474 next_offset += envelope_size;
12475 }
12476
12477 Ok(())
12478 }
12479 }
12480
12481 impl TableUnionWithVectorStructSandwich {
12482 #[inline(always)]
12483 fn max_ordinal_present(&self) -> u64 {
12484 if let Some(_) = self.s2 {
12485 return 3;
12486 }
12487 if let Some(_) = self.uv {
12488 return 2;
12489 }
12490 if let Some(_) = self.s1 {
12491 return 1;
12492 }
12493 0
12494 }
12495 }
12496
12497 impl fidl::encoding::ResourceTypeMarker for TableUnionWithVectorStructSandwich {
12498 type Borrowed<'a> = &'a mut Self;
12499 fn take_or_borrow<'a>(
12500 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12501 ) -> Self::Borrowed<'a> {
12502 value
12503 }
12504 }
12505
12506 unsafe impl fidl::encoding::TypeMarker for TableUnionWithVectorStructSandwich {
12507 type Owned = Self;
12508
12509 #[inline(always)]
12510 fn inline_align(_context: fidl::encoding::Context) -> usize {
12511 8
12512 }
12513
12514 #[inline(always)]
12515 fn inline_size(_context: fidl::encoding::Context) -> usize {
12516 16
12517 }
12518 }
12519
12520 unsafe impl
12521 fidl::encoding::Encode<
12522 TableUnionWithVectorStructSandwich,
12523 fidl::encoding::DefaultFuchsiaResourceDialect,
12524 > for &mut TableUnionWithVectorStructSandwich
12525 {
12526 unsafe fn encode(
12527 self,
12528 encoder: &mut fidl::encoding::Encoder<
12529 '_,
12530 fidl::encoding::DefaultFuchsiaResourceDialect,
12531 >,
12532 offset: usize,
12533 mut depth: fidl::encoding::Depth,
12534 ) -> fidl::Result<()> {
12535 encoder.debug_check_bounds::<TableUnionWithVectorStructSandwich>(offset);
12536 let max_ordinal: u64 = self.max_ordinal_present();
12538 encoder.write_num(max_ordinal, offset);
12539 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12540 if max_ordinal == 0 {
12542 return Ok(());
12543 }
12544 depth.increment()?;
12545 let envelope_size = 8;
12546 let bytes_len = max_ordinal as usize * envelope_size;
12547 #[allow(unused_variables)]
12548 let offset = encoder.out_of_line_offset(bytes_len);
12549 let mut _prev_end_offset: usize = 0;
12550 if 1 > max_ordinal {
12551 return Ok(());
12552 }
12553
12554 let cur_offset: usize = (1 - 1) * envelope_size;
12557
12558 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12560
12561 fidl::encoding::encode_in_envelope_optional::<
12566 StructSize3Align1,
12567 fidl::encoding::DefaultFuchsiaResourceDialect,
12568 >(
12569 self.s1
12570 .as_ref()
12571 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12572 encoder,
12573 offset + cur_offset,
12574 depth,
12575 )?;
12576
12577 _prev_end_offset = cur_offset + envelope_size;
12578 if 2 > max_ordinal {
12579 return Ok(());
12580 }
12581
12582 let cur_offset: usize = (2 - 1) * envelope_size;
12585
12586 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12588
12589 fidl::encoding::encode_in_envelope_optional::<
12594 UnionWithVector,
12595 fidl::encoding::DefaultFuchsiaResourceDialect,
12596 >(
12597 self.uv
12598 .as_mut()
12599 .map(<UnionWithVector as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12600 encoder,
12601 offset + cur_offset,
12602 depth,
12603 )?;
12604
12605 _prev_end_offset = cur_offset + envelope_size;
12606 if 3 > max_ordinal {
12607 return Ok(());
12608 }
12609
12610 let cur_offset: usize = (3 - 1) * envelope_size;
12613
12614 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12616
12617 fidl::encoding::encode_in_envelope_optional::<
12622 StructSize3Align1,
12623 fidl::encoding::DefaultFuchsiaResourceDialect,
12624 >(
12625 self.s2
12626 .as_ref()
12627 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
12628 encoder,
12629 offset + cur_offset,
12630 depth,
12631 )?;
12632
12633 _prev_end_offset = cur_offset + envelope_size;
12634
12635 Ok(())
12636 }
12637 }
12638
12639 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12640 for TableUnionWithVectorStructSandwich
12641 {
12642 #[inline(always)]
12643 fn new_empty() -> Self {
12644 Self::default()
12645 }
12646
12647 unsafe fn decode(
12648 &mut self,
12649 decoder: &mut fidl::encoding::Decoder<
12650 '_,
12651 fidl::encoding::DefaultFuchsiaResourceDialect,
12652 >,
12653 offset: usize,
12654 mut depth: fidl::encoding::Depth,
12655 ) -> fidl::Result<()> {
12656 decoder.debug_check_bounds::<Self>(offset);
12657 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12658 None => return Err(fidl::Error::NotNullable),
12659 Some(len) => len,
12660 };
12661 if len == 0 {
12663 return Ok(());
12664 };
12665 depth.increment()?;
12666 let envelope_size = 8;
12667 let bytes_len = len * envelope_size;
12668 let offset = decoder.out_of_line_offset(bytes_len)?;
12669 let mut _next_ordinal_to_read = 0;
12671 let mut next_offset = offset;
12672 let end_offset = offset + bytes_len;
12673 _next_ordinal_to_read += 1;
12674 if next_offset >= end_offset {
12675 return Ok(());
12676 }
12677
12678 while _next_ordinal_to_read < 1 {
12680 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12681 _next_ordinal_to_read += 1;
12682 next_offset += envelope_size;
12683 }
12684
12685 let next_out_of_line = decoder.next_out_of_line();
12686 let handles_before = decoder.remaining_handles();
12687 if let Some((inlined, num_bytes, num_handles)) =
12688 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12689 {
12690 let member_inline_size =
12691 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12692 if inlined != (member_inline_size <= 4) {
12693 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12694 }
12695 let inner_offset;
12696 let mut inner_depth = depth.clone();
12697 if inlined {
12698 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12699 inner_offset = next_offset;
12700 } else {
12701 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12702 inner_depth.increment()?;
12703 }
12704 let val_ref = self.s1.get_or_insert_with(|| {
12705 fidl::new_empty!(
12706 StructSize3Align1,
12707 fidl::encoding::DefaultFuchsiaResourceDialect
12708 )
12709 });
12710 fidl::decode!(
12711 StructSize3Align1,
12712 fidl::encoding::DefaultFuchsiaResourceDialect,
12713 val_ref,
12714 decoder,
12715 inner_offset,
12716 inner_depth
12717 )?;
12718 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12719 {
12720 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12721 }
12722 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12723 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12724 }
12725 }
12726
12727 next_offset += envelope_size;
12728 _next_ordinal_to_read += 1;
12729 if next_offset >= end_offset {
12730 return Ok(());
12731 }
12732
12733 while _next_ordinal_to_read < 2 {
12735 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12736 _next_ordinal_to_read += 1;
12737 next_offset += envelope_size;
12738 }
12739
12740 let next_out_of_line = decoder.next_out_of_line();
12741 let handles_before = decoder.remaining_handles();
12742 if let Some((inlined, num_bytes, num_handles)) =
12743 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12744 {
12745 let member_inline_size =
12746 <UnionWithVector as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12747 if inlined != (member_inline_size <= 4) {
12748 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12749 }
12750 let inner_offset;
12751 let mut inner_depth = depth.clone();
12752 if inlined {
12753 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12754 inner_offset = next_offset;
12755 } else {
12756 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12757 inner_depth.increment()?;
12758 }
12759 let val_ref = self.uv.get_or_insert_with(|| {
12760 fidl::new_empty!(UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect)
12761 });
12762 fidl::decode!(
12763 UnionWithVector,
12764 fidl::encoding::DefaultFuchsiaResourceDialect,
12765 val_ref,
12766 decoder,
12767 inner_offset,
12768 inner_depth
12769 )?;
12770 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12771 {
12772 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12773 }
12774 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12775 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12776 }
12777 }
12778
12779 next_offset += envelope_size;
12780 _next_ordinal_to_read += 1;
12781 if next_offset >= end_offset {
12782 return Ok(());
12783 }
12784
12785 while _next_ordinal_to_read < 3 {
12787 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12788 _next_ordinal_to_read += 1;
12789 next_offset += envelope_size;
12790 }
12791
12792 let next_out_of_line = decoder.next_out_of_line();
12793 let handles_before = decoder.remaining_handles();
12794 if let Some((inlined, num_bytes, num_handles)) =
12795 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12796 {
12797 let member_inline_size =
12798 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12799 if inlined != (member_inline_size <= 4) {
12800 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12801 }
12802 let inner_offset;
12803 let mut inner_depth = depth.clone();
12804 if inlined {
12805 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12806 inner_offset = next_offset;
12807 } else {
12808 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12809 inner_depth.increment()?;
12810 }
12811 let val_ref = self.s2.get_or_insert_with(|| {
12812 fidl::new_empty!(
12813 StructSize3Align1,
12814 fidl::encoding::DefaultFuchsiaResourceDialect
12815 )
12816 });
12817 fidl::decode!(
12818 StructSize3Align1,
12819 fidl::encoding::DefaultFuchsiaResourceDialect,
12820 val_ref,
12821 decoder,
12822 inner_offset,
12823 inner_depth
12824 )?;
12825 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12826 {
12827 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12828 }
12829 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12830 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12831 }
12832 }
12833
12834 next_offset += envelope_size;
12835
12836 while next_offset < end_offset {
12838 _next_ordinal_to_read += 1;
12839 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12840 next_offset += envelope_size;
12841 }
12842
12843 Ok(())
12844 }
12845 }
12846
12847 impl VectorOfArrayOfEventInTableWithReducedRights {
12848 #[inline(always)]
12849 fn max_ordinal_present(&self) -> u64 {
12850 if let Some(_) = self.h {
12851 return 1;
12852 }
12853 0
12854 }
12855 }
12856
12857 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12858 type Borrowed<'a> = &'a mut Self;
12859 fn take_or_borrow<'a>(
12860 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12861 ) -> Self::Borrowed<'a> {
12862 value
12863 }
12864 }
12865
12866 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInTableWithReducedRights {
12867 type Owned = Self;
12868
12869 #[inline(always)]
12870 fn inline_align(_context: fidl::encoding::Context) -> usize {
12871 8
12872 }
12873
12874 #[inline(always)]
12875 fn inline_size(_context: fidl::encoding::Context) -> usize {
12876 16
12877 }
12878 }
12879
12880 unsafe impl
12881 fidl::encoding::Encode<
12882 VectorOfArrayOfEventInTableWithReducedRights,
12883 fidl::encoding::DefaultFuchsiaResourceDialect,
12884 > for &mut VectorOfArrayOfEventInTableWithReducedRights
12885 {
12886 unsafe fn encode(
12887 self,
12888 encoder: &mut fidl::encoding::Encoder<
12889 '_,
12890 fidl::encoding::DefaultFuchsiaResourceDialect,
12891 >,
12892 offset: usize,
12893 mut depth: fidl::encoding::Depth,
12894 ) -> fidl::Result<()> {
12895 encoder.debug_check_bounds::<VectorOfArrayOfEventInTableWithReducedRights>(offset);
12896 let max_ordinal: u64 = self.max_ordinal_present();
12898 encoder.write_num(max_ordinal, offset);
12899 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12900 if max_ordinal == 0 {
12902 return Ok(());
12903 }
12904 depth.increment()?;
12905 let envelope_size = 8;
12906 let bytes_len = max_ordinal as usize * envelope_size;
12907 #[allow(unused_variables)]
12908 let offset = encoder.out_of_line_offset(bytes_len);
12909 let mut _prev_end_offset: usize = 0;
12910 if 1 > max_ordinal {
12911 return Ok(());
12912 }
12913
12914 let cur_offset: usize = (1 - 1) * envelope_size;
12917
12918 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12920
12921 fidl::encoding::encode_in_envelope_optional::<
12926 fidl::encoding::Vector<
12927 fidl::encoding::Array<
12928 fidl::encoding::HandleType<
12929 fidl::Event,
12930 { fidl::ObjectType::EVENT.into_raw() },
12931 49155,
12932 >,
12933 1,
12934 >,
12935 1,
12936 >,
12937 fidl::encoding::DefaultFuchsiaResourceDialect,
12938 >(
12939 self.h.as_mut().map(
12940 <fidl::encoding::Vector<
12941 fidl::encoding::Array<
12942 fidl::encoding::HandleType<
12943 fidl::Event,
12944 { fidl::ObjectType::EVENT.into_raw() },
12945 49155,
12946 >,
12947 1,
12948 >,
12949 1,
12950 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12951 ),
12952 encoder,
12953 offset + cur_offset,
12954 depth,
12955 )?;
12956
12957 _prev_end_offset = cur_offset + envelope_size;
12958
12959 Ok(())
12960 }
12961 }
12962
12963 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12964 for VectorOfArrayOfEventInTableWithReducedRights
12965 {
12966 #[inline(always)]
12967 fn new_empty() -> Self {
12968 Self::default()
12969 }
12970
12971 unsafe fn decode(
12972 &mut self,
12973 decoder: &mut fidl::encoding::Decoder<
12974 '_,
12975 fidl::encoding::DefaultFuchsiaResourceDialect,
12976 >,
12977 offset: usize,
12978 mut depth: fidl::encoding::Depth,
12979 ) -> fidl::Result<()> {
12980 decoder.debug_check_bounds::<Self>(offset);
12981 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12982 None => return Err(fidl::Error::NotNullable),
12983 Some(len) => len,
12984 };
12985 if len == 0 {
12987 return Ok(());
12988 };
12989 depth.increment()?;
12990 let envelope_size = 8;
12991 let bytes_len = len * envelope_size;
12992 let offset = decoder.out_of_line_offset(bytes_len)?;
12993 let mut _next_ordinal_to_read = 0;
12995 let mut next_offset = offset;
12996 let end_offset = offset + bytes_len;
12997 _next_ordinal_to_read += 1;
12998 if next_offset >= end_offset {
12999 return Ok(());
13000 }
13001
13002 while _next_ordinal_to_read < 1 {
13004 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13005 _next_ordinal_to_read += 1;
13006 next_offset += envelope_size;
13007 }
13008
13009 let next_out_of_line = decoder.next_out_of_line();
13010 let handles_before = decoder.remaining_handles();
13011 if let Some((inlined, num_bytes, num_handles)) =
13012 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13013 {
13014 let member_inline_size = <fidl::encoding::Vector<
13015 fidl::encoding::Array<
13016 fidl::encoding::HandleType<
13017 fidl::Event,
13018 { fidl::ObjectType::EVENT.into_raw() },
13019 49155,
13020 >,
13021 1,
13022 >,
13023 1,
13024 > as fidl::encoding::TypeMarker>::inline_size(
13025 decoder.context
13026 );
13027 if inlined != (member_inline_size <= 4) {
13028 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13029 }
13030 let inner_offset;
13031 let mut inner_depth = depth.clone();
13032 if inlined {
13033 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13034 inner_offset = next_offset;
13035 } else {
13036 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13037 inner_depth.increment()?;
13038 }
13039 let val_ref = self.h.get_or_insert_with(|| {
13040 fidl::new_empty!(
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 )
13054 });
13055 fidl::decode!(
13056 fidl::encoding::Vector<
13057 fidl::encoding::Array<
13058 fidl::encoding::HandleType<
13059 fidl::Event,
13060 { fidl::ObjectType::EVENT.into_raw() },
13061 49155,
13062 >,
13063 1,
13064 >,
13065 1,
13066 >,
13067 fidl::encoding::DefaultFuchsiaResourceDialect,
13068 val_ref,
13069 decoder,
13070 inner_offset,
13071 inner_depth
13072 )?;
13073 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13074 {
13075 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13076 }
13077 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13078 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13079 }
13080 }
13081
13082 next_offset += envelope_size;
13083
13084 while next_offset < end_offset {
13086 _next_ordinal_to_read += 1;
13087 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13088 next_offset += envelope_size;
13089 }
13090
13091 Ok(())
13092 }
13093 }
13094
13095 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13096 type Borrowed<'a> = &'a mut Self;
13097 fn take_or_borrow<'a>(
13098 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13099 ) -> Self::Borrowed<'a> {
13100 value
13101 }
13102 }
13103
13104 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithDefaultRights {
13105 type Owned = Self;
13106
13107 #[inline(always)]
13108 fn inline_align(_context: fidl::encoding::Context) -> usize {
13109 8
13110 }
13111
13112 #[inline(always)]
13113 fn inline_size(_context: fidl::encoding::Context) -> usize {
13114 16
13115 }
13116 }
13117
13118 unsafe impl
13119 fidl::encoding::Encode<
13120 ArrayOfVectorOfEventInUnionWithDefaultRights,
13121 fidl::encoding::DefaultFuchsiaResourceDialect,
13122 > for &mut ArrayOfVectorOfEventInUnionWithDefaultRights
13123 {
13124 #[inline]
13125 unsafe fn encode(
13126 self,
13127 encoder: &mut fidl::encoding::Encoder<
13128 '_,
13129 fidl::encoding::DefaultFuchsiaResourceDialect,
13130 >,
13131 offset: usize,
13132 _depth: fidl::encoding::Depth,
13133 ) -> fidl::Result<()> {
13134 encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithDefaultRights>(offset);
13135 encoder.write_num::<u64>(self.ordinal(), offset);
13136 match self {
13137 ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) => {
13138 fidl::encoding::encode_in_envelope::<
13139 fidl::encoding::Array<
13140 fidl::encoding::Vector<
13141 fidl::encoding::HandleType<
13142 fidl::Event,
13143 { fidl::ObjectType::EVENT.into_raw() },
13144 53251,
13145 >,
13146 1,
13147 >,
13148 1,
13149 >,
13150 fidl::encoding::DefaultFuchsiaResourceDialect,
13151 >(
13152 <fidl::encoding::Array<
13153 fidl::encoding::Vector<
13154 fidl::encoding::HandleType<
13155 fidl::Event,
13156 { fidl::ObjectType::EVENT.into_raw() },
13157 53251,
13158 >,
13159 1,
13160 >,
13161 1,
13162 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13163 val
13164 ),
13165 encoder,
13166 offset + 8,
13167 _depth,
13168 )
13169 }
13170 }
13171 }
13172 }
13173
13174 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13175 for ArrayOfVectorOfEventInUnionWithDefaultRights
13176 {
13177 #[inline(always)]
13178 fn new_empty() -> Self {
13179 Self::H(fidl::new_empty!(
13180 fidl::encoding::Array<
13181 fidl::encoding::Vector<
13182 fidl::encoding::HandleType<
13183 fidl::Event,
13184 { fidl::ObjectType::EVENT.into_raw() },
13185 53251,
13186 >,
13187 1,
13188 >,
13189 1,
13190 >,
13191 fidl::encoding::DefaultFuchsiaResourceDialect
13192 ))
13193 }
13194
13195 #[inline]
13196 unsafe fn decode(
13197 &mut self,
13198 decoder: &mut fidl::encoding::Decoder<
13199 '_,
13200 fidl::encoding::DefaultFuchsiaResourceDialect,
13201 >,
13202 offset: usize,
13203 mut depth: fidl::encoding::Depth,
13204 ) -> fidl::Result<()> {
13205 decoder.debug_check_bounds::<Self>(offset);
13206 #[allow(unused_variables)]
13207 let next_out_of_line = decoder.next_out_of_line();
13208 let handles_before = decoder.remaining_handles();
13209 let (ordinal, inlined, num_bytes, num_handles) =
13210 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13211
13212 let member_inline_size = match ordinal {
13213 1 => <fidl::encoding::Array<
13214 fidl::encoding::Vector<
13215 fidl::encoding::HandleType<
13216 fidl::Event,
13217 { fidl::ObjectType::EVENT.into_raw() },
13218 53251,
13219 >,
13220 1,
13221 >,
13222 1,
13223 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13224 _ => return Err(fidl::Error::UnknownUnionTag),
13225 };
13226
13227 if inlined != (member_inline_size <= 4) {
13228 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13229 }
13230 let _inner_offset;
13231 if inlined {
13232 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13233 _inner_offset = offset + 8;
13234 } else {
13235 depth.increment()?;
13236 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13237 }
13238 match ordinal {
13239 1 => {
13240 #[allow(irrefutable_let_patterns)]
13241 if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(_) = self {
13242 } else {
13244 *self = ArrayOfVectorOfEventInUnionWithDefaultRights::H(fidl::new_empty!(
13246 fidl::encoding::Array<
13247 fidl::encoding::Vector<
13248 fidl::encoding::HandleType<
13249 fidl::Event,
13250 { fidl::ObjectType::EVENT.into_raw() },
13251 53251,
13252 >,
13253 1,
13254 >,
13255 1,
13256 >,
13257 fidl::encoding::DefaultFuchsiaResourceDialect
13258 ));
13259 }
13260 #[allow(irrefutable_let_patterns)]
13261 if let ArrayOfVectorOfEventInUnionWithDefaultRights::H(ref mut val) = self {
13262 fidl::decode!(
13263 fidl::encoding::Array<
13264 fidl::encoding::Vector<
13265 fidl::encoding::HandleType<
13266 fidl::Event,
13267 { fidl::ObjectType::EVENT.into_raw() },
13268 53251,
13269 >,
13270 1,
13271 >,
13272 1,
13273 >,
13274 fidl::encoding::DefaultFuchsiaResourceDialect,
13275 val,
13276 decoder,
13277 _inner_offset,
13278 depth
13279 )?;
13280 } else {
13281 unreachable!()
13282 }
13283 }
13284 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13285 }
13286 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13287 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13288 }
13289 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13290 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13291 }
13292 Ok(())
13293 }
13294 }
13295
13296 impl fidl::encoding::ResourceTypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13297 type Borrowed<'a> = &'a mut Self;
13298 fn take_or_borrow<'a>(
13299 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13300 ) -> Self::Borrowed<'a> {
13301 value
13302 }
13303 }
13304
13305 unsafe impl fidl::encoding::TypeMarker for ArrayOfVectorOfEventInUnionWithReducedRights {
13306 type Owned = Self;
13307
13308 #[inline(always)]
13309 fn inline_align(_context: fidl::encoding::Context) -> usize {
13310 8
13311 }
13312
13313 #[inline(always)]
13314 fn inline_size(_context: fidl::encoding::Context) -> usize {
13315 16
13316 }
13317 }
13318
13319 unsafe impl
13320 fidl::encoding::Encode<
13321 ArrayOfVectorOfEventInUnionWithReducedRights,
13322 fidl::encoding::DefaultFuchsiaResourceDialect,
13323 > for &mut ArrayOfVectorOfEventInUnionWithReducedRights
13324 {
13325 #[inline]
13326 unsafe fn encode(
13327 self,
13328 encoder: &mut fidl::encoding::Encoder<
13329 '_,
13330 fidl::encoding::DefaultFuchsiaResourceDialect,
13331 >,
13332 offset: usize,
13333 _depth: fidl::encoding::Depth,
13334 ) -> fidl::Result<()> {
13335 encoder.debug_check_bounds::<ArrayOfVectorOfEventInUnionWithReducedRights>(offset);
13336 encoder.write_num::<u64>(self.ordinal(), offset);
13337 match self {
13338 ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) => {
13339 fidl::encoding::encode_in_envelope::<
13340 fidl::encoding::Array<
13341 fidl::encoding::Vector<
13342 fidl::encoding::HandleType<
13343 fidl::Event,
13344 { fidl::ObjectType::EVENT.into_raw() },
13345 49155,
13346 >,
13347 1,
13348 >,
13349 1,
13350 >,
13351 fidl::encoding::DefaultFuchsiaResourceDialect,
13352 >(
13353 <fidl::encoding::Array<
13354 fidl::encoding::Vector<
13355 fidl::encoding::HandleType<
13356 fidl::Event,
13357 { fidl::ObjectType::EVENT.into_raw() },
13358 49155,
13359 >,
13360 1,
13361 >,
13362 1,
13363 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13364 val
13365 ),
13366 encoder,
13367 offset + 8,
13368 _depth,
13369 )
13370 }
13371 }
13372 }
13373 }
13374
13375 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13376 for ArrayOfVectorOfEventInUnionWithReducedRights
13377 {
13378 #[inline(always)]
13379 fn new_empty() -> Self {
13380 Self::H(fidl::new_empty!(
13381 fidl::encoding::Array<
13382 fidl::encoding::Vector<
13383 fidl::encoding::HandleType<
13384 fidl::Event,
13385 { fidl::ObjectType::EVENT.into_raw() },
13386 49155,
13387 >,
13388 1,
13389 >,
13390 1,
13391 >,
13392 fidl::encoding::DefaultFuchsiaResourceDialect
13393 ))
13394 }
13395
13396 #[inline]
13397 unsafe fn decode(
13398 &mut self,
13399 decoder: &mut fidl::encoding::Decoder<
13400 '_,
13401 fidl::encoding::DefaultFuchsiaResourceDialect,
13402 >,
13403 offset: usize,
13404 mut depth: fidl::encoding::Depth,
13405 ) -> fidl::Result<()> {
13406 decoder.debug_check_bounds::<Self>(offset);
13407 #[allow(unused_variables)]
13408 let next_out_of_line = decoder.next_out_of_line();
13409 let handles_before = decoder.remaining_handles();
13410 let (ordinal, inlined, num_bytes, num_handles) =
13411 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13412
13413 let member_inline_size = match ordinal {
13414 1 => <fidl::encoding::Array<
13415 fidl::encoding::Vector<
13416 fidl::encoding::HandleType<
13417 fidl::Event,
13418 { fidl::ObjectType::EVENT.into_raw() },
13419 49155,
13420 >,
13421 1,
13422 >,
13423 1,
13424 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13425 _ => return Err(fidl::Error::UnknownUnionTag),
13426 };
13427
13428 if inlined != (member_inline_size <= 4) {
13429 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13430 }
13431 let _inner_offset;
13432 if inlined {
13433 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13434 _inner_offset = offset + 8;
13435 } else {
13436 depth.increment()?;
13437 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13438 }
13439 match ordinal {
13440 1 => {
13441 #[allow(irrefutable_let_patterns)]
13442 if let ArrayOfVectorOfEventInUnionWithReducedRights::H(_) = self {
13443 } else {
13445 *self = ArrayOfVectorOfEventInUnionWithReducedRights::H(fidl::new_empty!(
13447 fidl::encoding::Array<
13448 fidl::encoding::Vector<
13449 fidl::encoding::HandleType<
13450 fidl::Event,
13451 { fidl::ObjectType::EVENT.into_raw() },
13452 49155,
13453 >,
13454 1,
13455 >,
13456 1,
13457 >,
13458 fidl::encoding::DefaultFuchsiaResourceDialect
13459 ));
13460 }
13461 #[allow(irrefutable_let_patterns)]
13462 if let ArrayOfVectorOfEventInUnionWithReducedRights::H(ref mut val) = self {
13463 fidl::decode!(
13464 fidl::encoding::Array<
13465 fidl::encoding::Vector<
13466 fidl::encoding::HandleType<
13467 fidl::Event,
13468 { fidl::ObjectType::EVENT.into_raw() },
13469 49155,
13470 >,
13471 1,
13472 >,
13473 1,
13474 >,
13475 fidl::encoding::DefaultFuchsiaResourceDialect,
13476 val,
13477 decoder,
13478 _inner_offset,
13479 depth
13480 )?;
13481 } else {
13482 unreachable!()
13483 }
13484 }
13485 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13486 }
13487 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13488 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13489 }
13490 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13491 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13492 }
13493 Ok(())
13494 }
13495 }
13496
13497 impl fidl::encoding::ResourceTypeMarker for EnvelopeInliningTestUnion {
13498 type Borrowed<'a> = &'a mut Self;
13499 fn take_or_borrow<'a>(
13500 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13501 ) -> Self::Borrowed<'a> {
13502 value
13503 }
13504 }
13505
13506 unsafe impl fidl::encoding::TypeMarker for EnvelopeInliningTestUnion {
13507 type Owned = Self;
13508
13509 #[inline(always)]
13510 fn inline_align(_context: fidl::encoding::Context) -> usize {
13511 8
13512 }
13513
13514 #[inline(always)]
13515 fn inline_size(_context: fidl::encoding::Context) -> usize {
13516 16
13517 }
13518 }
13519
13520 unsafe impl
13521 fidl::encoding::Encode<
13522 EnvelopeInliningTestUnion,
13523 fidl::encoding::DefaultFuchsiaResourceDialect,
13524 > for &mut EnvelopeInliningTestUnion
13525 {
13526 #[inline]
13527 unsafe fn encode(
13528 self,
13529 encoder: &mut fidl::encoding::Encoder<
13530 '_,
13531 fidl::encoding::DefaultFuchsiaResourceDialect,
13532 >,
13533 offset: usize,
13534 _depth: fidl::encoding::Depth,
13535 ) -> fidl::Result<()> {
13536 encoder.debug_check_bounds::<EnvelopeInliningTestUnion>(offset);
13537 encoder.write_num::<u64>(self.ordinal(), offset);
13538 match self {
13539 EnvelopeInliningTestUnion::Small(ref val) => fidl::encoding::encode_in_envelope::<
13540 u32,
13541 fidl::encoding::DefaultFuchsiaResourceDialect,
13542 >(
13543 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13544 encoder,
13545 offset + 8,
13546 _depth,
13547 ),
13548 EnvelopeInliningTestUnion::Large(ref val) => fidl::encoding::encode_in_envelope::<
13549 u64,
13550 fidl::encoding::DefaultFuchsiaResourceDialect,
13551 >(
13552 <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
13553 encoder,
13554 offset + 8,
13555 _depth,
13556 ),
13557 EnvelopeInliningTestUnion::Handle(ref mut val) => {
13558 fidl::encoding::encode_in_envelope::<
13559 fidl::encoding::HandleType<
13560 fidl::Handle,
13561 { fidl::ObjectType::NONE.into_raw() },
13562 2147483648,
13563 >,
13564 fidl::encoding::DefaultFuchsiaResourceDialect,
13565 >(
13566 <fidl::encoding::HandleType<
13567 fidl::Handle,
13568 { fidl::ObjectType::NONE.into_raw() },
13569 2147483648,
13570 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13571 val
13572 ),
13573 encoder,
13574 offset + 8,
13575 _depth,
13576 )
13577 }
13578 EnvelopeInliningTestUnion::__SourceBreaking { .. } => {
13579 Err(fidl::Error::UnknownUnionTag)
13580 }
13581 }
13582 }
13583 }
13584
13585 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13586 for EnvelopeInliningTestUnion
13587 {
13588 #[inline(always)]
13589 fn new_empty() -> Self {
13590 Self::__SourceBreaking { unknown_ordinal: 0 }
13591 }
13592
13593 #[inline]
13594 unsafe fn decode(
13595 &mut self,
13596 decoder: &mut fidl::encoding::Decoder<
13597 '_,
13598 fidl::encoding::DefaultFuchsiaResourceDialect,
13599 >,
13600 offset: usize,
13601 mut depth: fidl::encoding::Depth,
13602 ) -> fidl::Result<()> {
13603 decoder.debug_check_bounds::<Self>(offset);
13604 #[allow(unused_variables)]
13605 let next_out_of_line = decoder.next_out_of_line();
13606 let handles_before = decoder.remaining_handles();
13607 let (ordinal, inlined, num_bytes, num_handles) =
13608 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13609
13610 let member_inline_size = match ordinal {
13611 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13612 2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13613 3 => <fidl::encoding::HandleType<
13614 fidl::Handle,
13615 { fidl::ObjectType::NONE.into_raw() },
13616 2147483648,
13617 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13618 0 => return Err(fidl::Error::UnknownUnionTag),
13619 _ => num_bytes as usize,
13620 };
13621
13622 if inlined != (member_inline_size <= 4) {
13623 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13624 }
13625 let _inner_offset;
13626 if inlined {
13627 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13628 _inner_offset = offset + 8;
13629 } else {
13630 depth.increment()?;
13631 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13632 }
13633 match ordinal {
13634 1 => {
13635 #[allow(irrefutable_let_patterns)]
13636 if let EnvelopeInliningTestUnion::Small(_) = self {
13637 } else {
13639 *self = EnvelopeInliningTestUnion::Small(fidl::new_empty!(
13641 u32,
13642 fidl::encoding::DefaultFuchsiaResourceDialect
13643 ));
13644 }
13645 #[allow(irrefutable_let_patterns)]
13646 if let EnvelopeInliningTestUnion::Small(ref mut val) = self {
13647 fidl::decode!(
13648 u32,
13649 fidl::encoding::DefaultFuchsiaResourceDialect,
13650 val,
13651 decoder,
13652 _inner_offset,
13653 depth
13654 )?;
13655 } else {
13656 unreachable!()
13657 }
13658 }
13659 2 => {
13660 #[allow(irrefutable_let_patterns)]
13661 if let EnvelopeInliningTestUnion::Large(_) = self {
13662 } else {
13664 *self = EnvelopeInliningTestUnion::Large(fidl::new_empty!(
13666 u64,
13667 fidl::encoding::DefaultFuchsiaResourceDialect
13668 ));
13669 }
13670 #[allow(irrefutable_let_patterns)]
13671 if let EnvelopeInliningTestUnion::Large(ref mut val) = self {
13672 fidl::decode!(
13673 u64,
13674 fidl::encoding::DefaultFuchsiaResourceDialect,
13675 val,
13676 decoder,
13677 _inner_offset,
13678 depth
13679 )?;
13680 } else {
13681 unreachable!()
13682 }
13683 }
13684 3 => {
13685 #[allow(irrefutable_let_patterns)]
13686 if let EnvelopeInliningTestUnion::Handle(_) = self {
13687 } else {
13689 *self = EnvelopeInliningTestUnion::Handle(
13691 fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
13692 );
13693 }
13694 #[allow(irrefutable_let_patterns)]
13695 if let EnvelopeInliningTestUnion::Handle(ref mut val) = self {
13696 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
13697 } else {
13698 unreachable!()
13699 }
13700 }
13701 #[allow(deprecated)]
13702 ordinal => {
13703 for _ in 0..num_handles {
13704 decoder.drop_next_handle()?;
13705 }
13706 *self =
13707 EnvelopeInliningTestUnion::__SourceBreaking { unknown_ordinal: ordinal };
13708 }
13709 }
13710 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13711 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13712 }
13713 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13714 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13715 }
13716 Ok(())
13717 }
13718 }
13719
13720 impl fidl::encoding::ResourceTypeMarker for SampleResourceXUnion {
13721 type Borrowed<'a> = &'a mut Self;
13722 fn take_or_borrow<'a>(
13723 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13724 ) -> Self::Borrowed<'a> {
13725 value
13726 }
13727 }
13728
13729 unsafe impl fidl::encoding::TypeMarker for SampleResourceXUnion {
13730 type Owned = Self;
13731
13732 #[inline(always)]
13733 fn inline_align(_context: fidl::encoding::Context) -> usize {
13734 8
13735 }
13736
13737 #[inline(always)]
13738 fn inline_size(_context: fidl::encoding::Context) -> usize {
13739 16
13740 }
13741 }
13742
13743 unsafe impl
13744 fidl::encoding::Encode<SampleResourceXUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
13745 for &mut SampleResourceXUnion
13746 {
13747 #[inline]
13748 unsafe fn encode(
13749 self,
13750 encoder: &mut fidl::encoding::Encoder<
13751 '_,
13752 fidl::encoding::DefaultFuchsiaResourceDialect,
13753 >,
13754 offset: usize,
13755 _depth: fidl::encoding::Depth,
13756 ) -> fidl::Result<()> {
13757 encoder.debug_check_bounds::<SampleResourceXUnion>(offset);
13758 encoder.write_num::<u64>(self.ordinal(), offset);
13759 match self {
13760 SampleResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13761 u32,
13762 fidl::encoding::DefaultFuchsiaResourceDialect,
13763 >(
13764 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13765 encoder,
13766 offset + 8,
13767 _depth,
13768 ),
13769 SampleResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13770 SimpleUnion,
13771 fidl::encoding::DefaultFuchsiaResourceDialect,
13772 >(
13773 <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13774 encoder,
13775 offset + 8,
13776 _depth,
13777 ),
13778 SampleResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13779 SimpleTable,
13780 fidl::encoding::DefaultFuchsiaResourceDialect,
13781 >(
13782 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13783 encoder,
13784 offset + 8,
13785 _depth,
13786 ),
13787 SampleResourceXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
13788 }
13789 }
13790 }
13791
13792 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13793 for SampleResourceXUnion
13794 {
13795 #[inline(always)]
13796 fn new_empty() -> Self {
13797 Self::__SourceBreaking { unknown_ordinal: 0 }
13798 }
13799
13800 #[inline]
13801 unsafe fn decode(
13802 &mut self,
13803 decoder: &mut fidl::encoding::Decoder<
13804 '_,
13805 fidl::encoding::DefaultFuchsiaResourceDialect,
13806 >,
13807 offset: usize,
13808 mut depth: fidl::encoding::Depth,
13809 ) -> fidl::Result<()> {
13810 decoder.debug_check_bounds::<Self>(offset);
13811 #[allow(unused_variables)]
13812 let next_out_of_line = decoder.next_out_of_line();
13813 let handles_before = decoder.remaining_handles();
13814 let (ordinal, inlined, num_bytes, num_handles) =
13815 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13816
13817 let member_inline_size = match ordinal {
13818 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13819 2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13820 3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13821 0 => return Err(fidl::Error::UnknownUnionTag),
13822 _ => num_bytes as usize,
13823 };
13824
13825 if inlined != (member_inline_size <= 4) {
13826 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13827 }
13828 let _inner_offset;
13829 if inlined {
13830 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13831 _inner_offset = offset + 8;
13832 } else {
13833 depth.increment()?;
13834 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13835 }
13836 match ordinal {
13837 1 => {
13838 #[allow(irrefutable_let_patterns)]
13839 if let SampleResourceXUnion::U(_) = self {
13840 } else {
13842 *self = SampleResourceXUnion::U(fidl::new_empty!(
13844 u32,
13845 fidl::encoding::DefaultFuchsiaResourceDialect
13846 ));
13847 }
13848 #[allow(irrefutable_let_patterns)]
13849 if let SampleResourceXUnion::U(ref mut val) = self {
13850 fidl::decode!(
13851 u32,
13852 fidl::encoding::DefaultFuchsiaResourceDialect,
13853 val,
13854 decoder,
13855 _inner_offset,
13856 depth
13857 )?;
13858 } else {
13859 unreachable!()
13860 }
13861 }
13862 2 => {
13863 #[allow(irrefutable_let_patterns)]
13864 if let SampleResourceXUnion::Su(_) = self {
13865 } else {
13867 *self = SampleResourceXUnion::Su(fidl::new_empty!(
13869 SimpleUnion,
13870 fidl::encoding::DefaultFuchsiaResourceDialect
13871 ));
13872 }
13873 #[allow(irrefutable_let_patterns)]
13874 if let SampleResourceXUnion::Su(ref mut val) = self {
13875 fidl::decode!(
13876 SimpleUnion,
13877 fidl::encoding::DefaultFuchsiaResourceDialect,
13878 val,
13879 decoder,
13880 _inner_offset,
13881 depth
13882 )?;
13883 } else {
13884 unreachable!()
13885 }
13886 }
13887 3 => {
13888 #[allow(irrefutable_let_patterns)]
13889 if let SampleResourceXUnion::St(_) = self {
13890 } else {
13892 *self = SampleResourceXUnion::St(fidl::new_empty!(
13894 SimpleTable,
13895 fidl::encoding::DefaultFuchsiaResourceDialect
13896 ));
13897 }
13898 #[allow(irrefutable_let_patterns)]
13899 if let SampleResourceXUnion::St(ref mut val) = self {
13900 fidl::decode!(
13901 SimpleTable,
13902 fidl::encoding::DefaultFuchsiaResourceDialect,
13903 val,
13904 decoder,
13905 _inner_offset,
13906 depth
13907 )?;
13908 } else {
13909 unreachable!()
13910 }
13911 }
13912 #[allow(deprecated)]
13913 ordinal => {
13914 for _ in 0..num_handles {
13915 decoder.drop_next_handle()?;
13916 }
13917 *self = SampleResourceXUnion::__SourceBreaking { unknown_ordinal: ordinal };
13918 }
13919 }
13920 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13921 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13922 }
13923 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13924 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13925 }
13926 Ok(())
13927 }
13928 }
13929
13930 impl fidl::encoding::ResourceTypeMarker for SampleStrictResourceXUnion {
13931 type Borrowed<'a> = &'a mut Self;
13932 fn take_or_borrow<'a>(
13933 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13934 ) -> Self::Borrowed<'a> {
13935 value
13936 }
13937 }
13938
13939 unsafe impl fidl::encoding::TypeMarker for SampleStrictResourceXUnion {
13940 type Owned = Self;
13941
13942 #[inline(always)]
13943 fn inline_align(_context: fidl::encoding::Context) -> usize {
13944 8
13945 }
13946
13947 #[inline(always)]
13948 fn inline_size(_context: fidl::encoding::Context) -> usize {
13949 16
13950 }
13951 }
13952
13953 unsafe impl
13954 fidl::encoding::Encode<
13955 SampleStrictResourceXUnion,
13956 fidl::encoding::DefaultFuchsiaResourceDialect,
13957 > for &mut SampleStrictResourceXUnion
13958 {
13959 #[inline]
13960 unsafe fn encode(
13961 self,
13962 encoder: &mut fidl::encoding::Encoder<
13963 '_,
13964 fidl::encoding::DefaultFuchsiaResourceDialect,
13965 >,
13966 offset: usize,
13967 _depth: fidl::encoding::Depth,
13968 ) -> fidl::Result<()> {
13969 encoder.debug_check_bounds::<SampleStrictResourceXUnion>(offset);
13970 encoder.write_num::<u64>(self.ordinal(), offset);
13971 match self {
13972 SampleStrictResourceXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<
13973 u32,
13974 fidl::encoding::DefaultFuchsiaResourceDialect,
13975 >(
13976 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13977 encoder,
13978 offset + 8,
13979 _depth,
13980 ),
13981 SampleStrictResourceXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<
13982 SimpleUnion,
13983 fidl::encoding::DefaultFuchsiaResourceDialect,
13984 >(
13985 <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
13986 encoder,
13987 offset + 8,
13988 _depth,
13989 ),
13990 SampleStrictResourceXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<
13991 SimpleTable,
13992 fidl::encoding::DefaultFuchsiaResourceDialect,
13993 >(
13994 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
13995 encoder,
13996 offset + 8,
13997 _depth,
13998 ),
13999 }
14000 }
14001 }
14002
14003 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14004 for SampleStrictResourceXUnion
14005 {
14006 #[inline(always)]
14007 fn new_empty() -> Self {
14008 Self::U(fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect))
14009 }
14010
14011 #[inline]
14012 unsafe fn decode(
14013 &mut self,
14014 decoder: &mut fidl::encoding::Decoder<
14015 '_,
14016 fidl::encoding::DefaultFuchsiaResourceDialect,
14017 >,
14018 offset: usize,
14019 mut depth: fidl::encoding::Depth,
14020 ) -> fidl::Result<()> {
14021 decoder.debug_check_bounds::<Self>(offset);
14022 #[allow(unused_variables)]
14023 let next_out_of_line = decoder.next_out_of_line();
14024 let handles_before = decoder.remaining_handles();
14025 let (ordinal, inlined, num_bytes, num_handles) =
14026 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14027
14028 let member_inline_size = match ordinal {
14029 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14030 2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14031 3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14032 _ => return Err(fidl::Error::UnknownUnionTag),
14033 };
14034
14035 if inlined != (member_inline_size <= 4) {
14036 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14037 }
14038 let _inner_offset;
14039 if inlined {
14040 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14041 _inner_offset = offset + 8;
14042 } else {
14043 depth.increment()?;
14044 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14045 }
14046 match ordinal {
14047 1 => {
14048 #[allow(irrefutable_let_patterns)]
14049 if let SampleStrictResourceXUnion::U(_) = self {
14050 } else {
14052 *self = SampleStrictResourceXUnion::U(fidl::new_empty!(
14054 u32,
14055 fidl::encoding::DefaultFuchsiaResourceDialect
14056 ));
14057 }
14058 #[allow(irrefutable_let_patterns)]
14059 if let SampleStrictResourceXUnion::U(ref mut val) = self {
14060 fidl::decode!(
14061 u32,
14062 fidl::encoding::DefaultFuchsiaResourceDialect,
14063 val,
14064 decoder,
14065 _inner_offset,
14066 depth
14067 )?;
14068 } else {
14069 unreachable!()
14070 }
14071 }
14072 2 => {
14073 #[allow(irrefutable_let_patterns)]
14074 if let SampleStrictResourceXUnion::Su(_) = self {
14075 } else {
14077 *self = SampleStrictResourceXUnion::Su(fidl::new_empty!(
14079 SimpleUnion,
14080 fidl::encoding::DefaultFuchsiaResourceDialect
14081 ));
14082 }
14083 #[allow(irrefutable_let_patterns)]
14084 if let SampleStrictResourceXUnion::Su(ref mut val) = self {
14085 fidl::decode!(
14086 SimpleUnion,
14087 fidl::encoding::DefaultFuchsiaResourceDialect,
14088 val,
14089 decoder,
14090 _inner_offset,
14091 depth
14092 )?;
14093 } else {
14094 unreachable!()
14095 }
14096 }
14097 3 => {
14098 #[allow(irrefutable_let_patterns)]
14099 if let SampleStrictResourceXUnion::St(_) = self {
14100 } else {
14102 *self = SampleStrictResourceXUnion::St(fidl::new_empty!(
14104 SimpleTable,
14105 fidl::encoding::DefaultFuchsiaResourceDialect
14106 ));
14107 }
14108 #[allow(irrefutable_let_patterns)]
14109 if let SampleStrictResourceXUnion::St(ref mut val) = self {
14110 fidl::decode!(
14111 SimpleTable,
14112 fidl::encoding::DefaultFuchsiaResourceDialect,
14113 val,
14114 decoder,
14115 _inner_offset,
14116 depth
14117 )?;
14118 } else {
14119 unreachable!()
14120 }
14121 }
14122 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14123 }
14124 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14125 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14126 }
14127 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14128 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14129 }
14130 Ok(())
14131 }
14132 }
14133
14134 impl fidl::encoding::ResourceTypeMarker for UnionOfEndpointsUnion {
14135 type Borrowed<'a> = &'a mut Self;
14136 fn take_or_borrow<'a>(
14137 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14138 ) -> Self::Borrowed<'a> {
14139 value
14140 }
14141 }
14142
14143 unsafe impl fidl::encoding::TypeMarker for UnionOfEndpointsUnion {
14144 type Owned = Self;
14145
14146 #[inline(always)]
14147 fn inline_align(_context: fidl::encoding::Context) -> usize {
14148 8
14149 }
14150
14151 #[inline(always)]
14152 fn inline_size(_context: fidl::encoding::Context) -> usize {
14153 16
14154 }
14155 }
14156
14157 unsafe impl
14158 fidl::encoding::Encode<UnionOfEndpointsUnion, fidl::encoding::DefaultFuchsiaResourceDialect>
14159 for &mut UnionOfEndpointsUnion
14160 {
14161 #[inline]
14162 unsafe fn encode(
14163 self,
14164 encoder: &mut fidl::encoding::Encoder<
14165 '_,
14166 fidl::encoding::DefaultFuchsiaResourceDialect,
14167 >,
14168 offset: usize,
14169 _depth: fidl::encoding::Depth,
14170 ) -> fidl::Result<()> {
14171 encoder.debug_check_bounds::<UnionOfEndpointsUnion>(offset);
14172 encoder.write_num::<u64>(self.ordinal(), offset);
14173 match self {
14174 UnionOfEndpointsUnion::ClientEnd(ref mut val) => {
14175 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14176 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14177 encoder, offset + 8, _depth
14178 )
14179 }
14180 UnionOfEndpointsUnion::ServerEnd(ref mut val) => {
14181 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14182 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14183 encoder, offset + 8, _depth
14184 )
14185 }
14186 UnionOfEndpointsUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14187 }
14188 }
14189 }
14190
14191 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14192 for UnionOfEndpointsUnion
14193 {
14194 #[inline(always)]
14195 fn new_empty() -> Self {
14196 Self::__SourceBreaking { unknown_ordinal: 0 }
14197 }
14198
14199 #[inline]
14200 unsafe fn decode(
14201 &mut self,
14202 decoder: &mut fidl::encoding::Decoder<
14203 '_,
14204 fidl::encoding::DefaultFuchsiaResourceDialect,
14205 >,
14206 offset: usize,
14207 mut depth: fidl::encoding::Depth,
14208 ) -> fidl::Result<()> {
14209 decoder.debug_check_bounds::<Self>(offset);
14210 #[allow(unused_variables)]
14211 let next_out_of_line = decoder.next_out_of_line();
14212 let handles_before = decoder.remaining_handles();
14213 let (ordinal, inlined, num_bytes, num_handles) =
14214 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14215
14216 let member_inline_size = match ordinal {
14217 1 => <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14218 2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14219 0 => return Err(fidl::Error::UnknownUnionTag),
14220 _ => num_bytes as usize,
14221 };
14222
14223 if inlined != (member_inline_size <= 4) {
14224 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14225 }
14226 let _inner_offset;
14227 if inlined {
14228 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14229 _inner_offset = offset + 8;
14230 } else {
14231 depth.increment()?;
14232 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14233 }
14234 match ordinal {
14235 1 => {
14236 #[allow(irrefutable_let_patterns)]
14237 if let UnionOfEndpointsUnion::ClientEnd(_) = self {
14238 } else {
14240 *self = UnionOfEndpointsUnion::ClientEnd(fidl::new_empty!(
14242 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14243 fidl::encoding::DefaultFuchsiaResourceDialect
14244 ));
14245 }
14246 #[allow(irrefutable_let_patterns)]
14247 if let UnionOfEndpointsUnion::ClientEnd(ref mut val) = self {
14248 fidl::decode!(
14249 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ProtocolMarker>>,
14250 fidl::encoding::DefaultFuchsiaResourceDialect,
14251 val,
14252 decoder,
14253 _inner_offset,
14254 depth
14255 )?;
14256 } else {
14257 unreachable!()
14258 }
14259 }
14260 2 => {
14261 #[allow(irrefutable_let_patterns)]
14262 if let UnionOfEndpointsUnion::ServerEnd(_) = self {
14263 } else {
14265 *self = UnionOfEndpointsUnion::ServerEnd(fidl::new_empty!(
14267 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14268 fidl::encoding::DefaultFuchsiaResourceDialect
14269 ));
14270 }
14271 #[allow(irrefutable_let_patterns)]
14272 if let UnionOfEndpointsUnion::ServerEnd(ref mut val) = self {
14273 fidl::decode!(
14274 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ProtocolMarker>>,
14275 fidl::encoding::DefaultFuchsiaResourceDialect,
14276 val,
14277 decoder,
14278 _inner_offset,
14279 depth
14280 )?;
14281 } else {
14282 unreachable!()
14283 }
14284 }
14285 #[allow(deprecated)]
14286 ordinal => {
14287 for _ in 0..num_handles {
14288 decoder.drop_next_handle()?;
14289 }
14290 *self = UnionOfEndpointsUnion::__SourceBreaking { unknown_ordinal: ordinal };
14291 }
14292 }
14293 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14294 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14295 }
14296 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14297 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14298 }
14299 Ok(())
14300 }
14301 }
14302
14303 impl fidl::encoding::ResourceTypeMarker for UnionOfHandle {
14304 type Borrowed<'a> = &'a mut Self;
14305 fn take_or_borrow<'a>(
14306 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14307 ) -> Self::Borrowed<'a> {
14308 value
14309 }
14310 }
14311
14312 unsafe impl fidl::encoding::TypeMarker for UnionOfHandle {
14313 type Owned = Self;
14314
14315 #[inline(always)]
14316 fn inline_align(_context: fidl::encoding::Context) -> usize {
14317 8
14318 }
14319
14320 #[inline(always)]
14321 fn inline_size(_context: fidl::encoding::Context) -> usize {
14322 16
14323 }
14324 }
14325
14326 unsafe impl fidl::encoding::Encode<UnionOfHandle, fidl::encoding::DefaultFuchsiaResourceDialect>
14327 for &mut UnionOfHandle
14328 {
14329 #[inline]
14330 unsafe fn encode(
14331 self,
14332 encoder: &mut fidl::encoding::Encoder<
14333 '_,
14334 fidl::encoding::DefaultFuchsiaResourceDialect,
14335 >,
14336 offset: usize,
14337 _depth: fidl::encoding::Depth,
14338 ) -> fidl::Result<()> {
14339 encoder.debug_check_bounds::<UnionOfHandle>(offset);
14340 encoder.write_num::<u64>(self.ordinal(), offset);
14341 match self {
14342 UnionOfHandle::H(ref mut val) => fidl::encoding::encode_in_envelope::<
14343 fidl::encoding::HandleType<
14344 fidl::Handle,
14345 { fidl::ObjectType::NONE.into_raw() },
14346 2147483648,
14347 >,
14348 fidl::encoding::DefaultFuchsiaResourceDialect,
14349 >(
14350 <fidl::encoding::HandleType<
14351 fidl::Handle,
14352 { fidl::ObjectType::NONE.into_raw() },
14353 2147483648,
14354 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14355 val
14356 ),
14357 encoder,
14358 offset + 8,
14359 _depth,
14360 ),
14361 }
14362 }
14363 }
14364
14365 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for UnionOfHandle {
14366 #[inline(always)]
14367 fn new_empty() -> Self {
14368 Self::H(
14369 fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14370 )
14371 }
14372
14373 #[inline]
14374 unsafe fn decode(
14375 &mut self,
14376 decoder: &mut fidl::encoding::Decoder<
14377 '_,
14378 fidl::encoding::DefaultFuchsiaResourceDialect,
14379 >,
14380 offset: usize,
14381 mut depth: fidl::encoding::Depth,
14382 ) -> fidl::Result<()> {
14383 decoder.debug_check_bounds::<Self>(offset);
14384 #[allow(unused_variables)]
14385 let next_out_of_line = decoder.next_out_of_line();
14386 let handles_before = decoder.remaining_handles();
14387 let (ordinal, inlined, num_bytes, num_handles) =
14388 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14389
14390 let member_inline_size = match ordinal {
14391 1 => <fidl::encoding::HandleType<
14392 fidl::Handle,
14393 { fidl::ObjectType::NONE.into_raw() },
14394 2147483648,
14395 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14396 _ => return Err(fidl::Error::UnknownUnionTag),
14397 };
14398
14399 if inlined != (member_inline_size <= 4) {
14400 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14401 }
14402 let _inner_offset;
14403 if inlined {
14404 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14405 _inner_offset = offset + 8;
14406 } else {
14407 depth.increment()?;
14408 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14409 }
14410 match ordinal {
14411 1 => {
14412 #[allow(irrefutable_let_patterns)]
14413 if let UnionOfHandle::H(_) = self {
14414 } else {
14416 *self = UnionOfHandle::H(
14418 fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14419 );
14420 }
14421 #[allow(irrefutable_let_patterns)]
14422 if let UnionOfHandle::H(ref mut val) = self {
14423 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14424 } else {
14425 unreachable!()
14426 }
14427 }
14428 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14429 }
14430 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14431 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14432 }
14433 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14434 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14435 }
14436 Ok(())
14437 }
14438 }
14439
14440 impl fidl::encoding::ResourceTypeMarker for UnionWithVector {
14441 type Borrowed<'a> = &'a mut Self;
14442 fn take_or_borrow<'a>(
14443 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14444 ) -> Self::Borrowed<'a> {
14445 value
14446 }
14447 }
14448
14449 unsafe impl fidl::encoding::TypeMarker for UnionWithVector {
14450 type Owned = Self;
14451
14452 #[inline(always)]
14453 fn inline_align(_context: fidl::encoding::Context) -> usize {
14454 8
14455 }
14456
14457 #[inline(always)]
14458 fn inline_size(_context: fidl::encoding::Context) -> usize {
14459 16
14460 }
14461 }
14462
14463 unsafe impl
14464 fidl::encoding::Encode<UnionWithVector, fidl::encoding::DefaultFuchsiaResourceDialect>
14465 for &mut UnionWithVector
14466 {
14467 #[inline]
14468 unsafe fn encode(
14469 self,
14470 encoder: &mut fidl::encoding::Encoder<
14471 '_,
14472 fidl::encoding::DefaultFuchsiaResourceDialect,
14473 >,
14474 offset: usize,
14475 _depth: fidl::encoding::Depth,
14476 ) -> fidl::Result<()> {
14477 encoder.debug_check_bounds::<UnionWithVector>(offset);
14478 encoder.write_num::<u64>(self.ordinal(), offset);
14479 match self {
14480 UnionWithVector::Unused(ref val) => {
14481 fidl::encoding::encode_in_envelope::<u8, fidl::encoding::DefaultFuchsiaResourceDialect>(
14482 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
14483 encoder, offset + 8, _depth
14484 )
14485 }
14486 UnionWithVector::VectorOfUint8(ref val) => {
14487 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14488 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(val),
14489 encoder, offset + 8, _depth
14490 )
14491 }
14492 UnionWithVector::S(ref val) => {
14493 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, fidl::encoding::DefaultFuchsiaResourceDialect>(
14494 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
14495 encoder, offset + 8, _depth
14496 )
14497 }
14498 UnionWithVector::VectorS3A1(ref val) => {
14499 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align1>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14500 <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::ValueTypeMarker>::borrow(val),
14501 encoder, offset + 8, _depth
14502 )
14503 }
14504 UnionWithVector::VectorS3A2(ref val) => {
14505 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<StructSize3Align2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14506 <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14507 encoder, offset + 8, _depth
14508 )
14509 }
14510 UnionWithVector::Handles(ref mut val) => {
14511 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14512 <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
14513 encoder, offset + 8, _depth
14514 )
14515 }
14516 UnionWithVector::ArrayS3A1(ref val) => {
14517 fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14518 <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14519 encoder, offset + 8, _depth
14520 )
14521 }
14522 UnionWithVector::ArrayS3A2(ref val) => {
14523 fidl::encoding::encode_in_envelope::<fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14524 <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::ValueTypeMarker>::borrow(val),
14525 encoder, offset + 8, _depth
14526 )
14527 }
14528 UnionWithVector::VectorUnion(ref val) => {
14529 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<UnionSize8Align4>, fidl::encoding::DefaultFuchsiaResourceDialect>(
14530 <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(val),
14531 encoder, offset + 8, _depth
14532 )
14533 }
14534 }
14535 }
14536 }
14537
14538 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14539 for UnionWithVector
14540 {
14541 #[inline(always)]
14542 fn new_empty() -> Self {
14543 Self::Unused(fidl::new_empty!(u8, fidl::encoding::DefaultFuchsiaResourceDialect))
14544 }
14545
14546 #[inline]
14547 unsafe fn decode(
14548 &mut self,
14549 decoder: &mut fidl::encoding::Decoder<
14550 '_,
14551 fidl::encoding::DefaultFuchsiaResourceDialect,
14552 >,
14553 offset: usize,
14554 mut depth: fidl::encoding::Depth,
14555 ) -> fidl::Result<()> {
14556 decoder.debug_check_bounds::<Self>(offset);
14557 #[allow(unused_variables)]
14558 let next_out_of_line = decoder.next_out_of_line();
14559 let handles_before = decoder.remaining_handles();
14560 let (ordinal, inlined, num_bytes, num_handles) =
14561 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14562
14563 let member_inline_size = match ordinal {
14564 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14565 2 => <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14566 3 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14567 4 => <fidl::encoding::UnboundedVector<StructSize3Align1> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14568 5 => <fidl::encoding::UnboundedVector<StructSize3Align2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14569 6 => <fidl::encoding::UnboundedVector<fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14570 7 => <fidl::encoding::Array<StructSize3Align1, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14571 8 => <fidl::encoding::Array<StructSize3Align2, 2> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14572 9 => <fidl::encoding::UnboundedVector<UnionSize8Align4> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14573 _ => return Err(fidl::Error::UnknownUnionTag),
14574 };
14575
14576 if inlined != (member_inline_size <= 4) {
14577 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14578 }
14579 let _inner_offset;
14580 if inlined {
14581 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14582 _inner_offset = offset + 8;
14583 } else {
14584 depth.increment()?;
14585 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14586 }
14587 match ordinal {
14588 1 => {
14589 #[allow(irrefutable_let_patterns)]
14590 if let UnionWithVector::Unused(_) = self {
14591 } else {
14593 *self = UnionWithVector::Unused(fidl::new_empty!(
14595 u8,
14596 fidl::encoding::DefaultFuchsiaResourceDialect
14597 ));
14598 }
14599 #[allow(irrefutable_let_patterns)]
14600 if let UnionWithVector::Unused(ref mut val) = self {
14601 fidl::decode!(
14602 u8,
14603 fidl::encoding::DefaultFuchsiaResourceDialect,
14604 val,
14605 decoder,
14606 _inner_offset,
14607 depth
14608 )?;
14609 } else {
14610 unreachable!()
14611 }
14612 }
14613 2 => {
14614 #[allow(irrefutable_let_patterns)]
14615 if let UnionWithVector::VectorOfUint8(_) = self {
14616 } else {
14618 *self = UnionWithVector::VectorOfUint8(fidl::new_empty!(
14620 fidl::encoding::UnboundedVector<u8>,
14621 fidl::encoding::DefaultFuchsiaResourceDialect
14622 ));
14623 }
14624 #[allow(irrefutable_let_patterns)]
14625 if let UnionWithVector::VectorOfUint8(ref mut val) = self {
14626 fidl::decode!(
14627 fidl::encoding::UnboundedVector<u8>,
14628 fidl::encoding::DefaultFuchsiaResourceDialect,
14629 val,
14630 decoder,
14631 _inner_offset,
14632 depth
14633 )?;
14634 } else {
14635 unreachable!()
14636 }
14637 }
14638 3 => {
14639 #[allow(irrefutable_let_patterns)]
14640 if let UnionWithVector::S(_) = self {
14641 } else {
14643 *self = UnionWithVector::S(fidl::new_empty!(
14645 fidl::encoding::UnboundedString,
14646 fidl::encoding::DefaultFuchsiaResourceDialect
14647 ));
14648 }
14649 #[allow(irrefutable_let_patterns)]
14650 if let UnionWithVector::S(ref mut val) = self {
14651 fidl::decode!(
14652 fidl::encoding::UnboundedString,
14653 fidl::encoding::DefaultFuchsiaResourceDialect,
14654 val,
14655 decoder,
14656 _inner_offset,
14657 depth
14658 )?;
14659 } else {
14660 unreachable!()
14661 }
14662 }
14663 4 => {
14664 #[allow(irrefutable_let_patterns)]
14665 if let UnionWithVector::VectorS3A1(_) = self {
14666 } else {
14668 *self = UnionWithVector::VectorS3A1(fidl::new_empty!(
14670 fidl::encoding::UnboundedVector<StructSize3Align1>,
14671 fidl::encoding::DefaultFuchsiaResourceDialect
14672 ));
14673 }
14674 #[allow(irrefutable_let_patterns)]
14675 if let UnionWithVector::VectorS3A1(ref mut val) = self {
14676 fidl::decode!(
14677 fidl::encoding::UnboundedVector<StructSize3Align1>,
14678 fidl::encoding::DefaultFuchsiaResourceDialect,
14679 val,
14680 decoder,
14681 _inner_offset,
14682 depth
14683 )?;
14684 } else {
14685 unreachable!()
14686 }
14687 }
14688 5 => {
14689 #[allow(irrefutable_let_patterns)]
14690 if let UnionWithVector::VectorS3A2(_) = self {
14691 } else {
14693 *self = UnionWithVector::VectorS3A2(fidl::new_empty!(
14695 fidl::encoding::UnboundedVector<StructSize3Align2>,
14696 fidl::encoding::DefaultFuchsiaResourceDialect
14697 ));
14698 }
14699 #[allow(irrefutable_let_patterns)]
14700 if let UnionWithVector::VectorS3A2(ref mut val) = self {
14701 fidl::decode!(
14702 fidl::encoding::UnboundedVector<StructSize3Align2>,
14703 fidl::encoding::DefaultFuchsiaResourceDialect,
14704 val,
14705 decoder,
14706 _inner_offset,
14707 depth
14708 )?;
14709 } else {
14710 unreachable!()
14711 }
14712 }
14713 6 => {
14714 #[allow(irrefutable_let_patterns)]
14715 if let UnionWithVector::Handles(_) = self {
14716 } else {
14718 *self = UnionWithVector::Handles(fidl::new_empty!(
14720 fidl::encoding::UnboundedVector<
14721 fidl::encoding::HandleType<
14722 fidl::Handle,
14723 { fidl::ObjectType::NONE.into_raw() },
14724 2147483648,
14725 >,
14726 >,
14727 fidl::encoding::DefaultFuchsiaResourceDialect
14728 ));
14729 }
14730 #[allow(irrefutable_let_patterns)]
14731 if let UnionWithVector::Handles(ref mut val) = self {
14732 fidl::decode!(
14733 fidl::encoding::UnboundedVector<
14734 fidl::encoding::HandleType<
14735 fidl::Handle,
14736 { fidl::ObjectType::NONE.into_raw() },
14737 2147483648,
14738 >,
14739 >,
14740 fidl::encoding::DefaultFuchsiaResourceDialect,
14741 val,
14742 decoder,
14743 _inner_offset,
14744 depth
14745 )?;
14746 } else {
14747 unreachable!()
14748 }
14749 }
14750 7 => {
14751 #[allow(irrefutable_let_patterns)]
14752 if let UnionWithVector::ArrayS3A1(_) = self {
14753 } else {
14755 *self = UnionWithVector::ArrayS3A1(
14757 fidl::new_empty!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14758 );
14759 }
14760 #[allow(irrefutable_let_patterns)]
14761 if let UnionWithVector::ArrayS3A1(ref mut val) = self {
14762 fidl::decode!(fidl::encoding::Array<StructSize3Align1, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14763 } else {
14764 unreachable!()
14765 }
14766 }
14767 8 => {
14768 #[allow(irrefutable_let_patterns)]
14769 if let UnionWithVector::ArrayS3A2(_) = self {
14770 } else {
14772 *self = UnionWithVector::ArrayS3A2(
14774 fidl::new_empty!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect),
14775 );
14776 }
14777 #[allow(irrefutable_let_patterns)]
14778 if let UnionWithVector::ArrayS3A2(ref mut val) = self {
14779 fidl::decode!(fidl::encoding::Array<StructSize3Align2, 2>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14780 } else {
14781 unreachable!()
14782 }
14783 }
14784 9 => {
14785 #[allow(irrefutable_let_patterns)]
14786 if let UnionWithVector::VectorUnion(_) = self {
14787 } else {
14789 *self = UnionWithVector::VectorUnion(fidl::new_empty!(
14791 fidl::encoding::UnboundedVector<UnionSize8Align4>,
14792 fidl::encoding::DefaultFuchsiaResourceDialect
14793 ));
14794 }
14795 #[allow(irrefutable_let_patterns)]
14796 if let UnionWithVector::VectorUnion(ref mut val) = self {
14797 fidl::decode!(
14798 fidl::encoding::UnboundedVector<UnionSize8Align4>,
14799 fidl::encoding::DefaultFuchsiaResourceDialect,
14800 val,
14801 decoder,
14802 _inner_offset,
14803 depth
14804 )?;
14805 } else {
14806 unreachable!()
14807 }
14808 }
14809 ordinal => panic!("unexpected ordinal {:?}", ordinal),
14810 }
14811 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14812 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14813 }
14814 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14815 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14816 }
14817 Ok(())
14818 }
14819 }
14820
14821 impl fidl::encoding::ResourceTypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14822 type Borrowed<'a> = &'a mut Self;
14823 fn take_or_borrow<'a>(
14824 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14825 ) -> Self::Borrowed<'a> {
14826 value
14827 }
14828 }
14829
14830 unsafe impl fidl::encoding::TypeMarker for VectorOfArrayOfEventInUnionWithReducedRights {
14831 type Owned = Self;
14832
14833 #[inline(always)]
14834 fn inline_align(_context: fidl::encoding::Context) -> usize {
14835 8
14836 }
14837
14838 #[inline(always)]
14839 fn inline_size(_context: fidl::encoding::Context) -> usize {
14840 16
14841 }
14842 }
14843
14844 unsafe impl
14845 fidl::encoding::Encode<
14846 VectorOfArrayOfEventInUnionWithReducedRights,
14847 fidl::encoding::DefaultFuchsiaResourceDialect,
14848 > for &mut VectorOfArrayOfEventInUnionWithReducedRights
14849 {
14850 #[inline]
14851 unsafe fn encode(
14852 self,
14853 encoder: &mut fidl::encoding::Encoder<
14854 '_,
14855 fidl::encoding::DefaultFuchsiaResourceDialect,
14856 >,
14857 offset: usize,
14858 _depth: fidl::encoding::Depth,
14859 ) -> fidl::Result<()> {
14860 encoder.debug_check_bounds::<VectorOfArrayOfEventInUnionWithReducedRights>(offset);
14861 encoder.write_num::<u64>(self.ordinal(), offset);
14862 match self {
14863 VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) => {
14864 fidl::encoding::encode_in_envelope::<
14865 fidl::encoding::Vector<
14866 fidl::encoding::Array<
14867 fidl::encoding::HandleType<
14868 fidl::Event,
14869 { fidl::ObjectType::EVENT.into_raw() },
14870 49155,
14871 >,
14872 1,
14873 >,
14874 1,
14875 >,
14876 fidl::encoding::DefaultFuchsiaResourceDialect,
14877 >(
14878 <fidl::encoding::Vector<
14879 fidl::encoding::Array<
14880 fidl::encoding::HandleType<
14881 fidl::Event,
14882 { fidl::ObjectType::EVENT.into_raw() },
14883 49155,
14884 >,
14885 1,
14886 >,
14887 1,
14888 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14889 val
14890 ),
14891 encoder,
14892 offset + 8,
14893 _depth,
14894 )
14895 }
14896 }
14897 }
14898 }
14899
14900 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14901 for VectorOfArrayOfEventInUnionWithReducedRights
14902 {
14903 #[inline(always)]
14904 fn new_empty() -> Self {
14905 Self::H(fidl::new_empty!(
14906 fidl::encoding::Vector<
14907 fidl::encoding::Array<
14908 fidl::encoding::HandleType<
14909 fidl::Event,
14910 { fidl::ObjectType::EVENT.into_raw() },
14911 49155,
14912 >,
14913 1,
14914 >,
14915 1,
14916 >,
14917 fidl::encoding::DefaultFuchsiaResourceDialect
14918 ))
14919 }
14920
14921 #[inline]
14922 unsafe fn decode(
14923 &mut self,
14924 decoder: &mut fidl::encoding::Decoder<
14925 '_,
14926 fidl::encoding::DefaultFuchsiaResourceDialect,
14927 >,
14928 offset: usize,
14929 mut depth: fidl::encoding::Depth,
14930 ) -> fidl::Result<()> {
14931 decoder.debug_check_bounds::<Self>(offset);
14932 #[allow(unused_variables)]
14933 let next_out_of_line = decoder.next_out_of_line();
14934 let handles_before = decoder.remaining_handles();
14935 let (ordinal, inlined, num_bytes, num_handles) =
14936 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14937
14938 let member_inline_size = match ordinal {
14939 1 => <fidl::encoding::Vector<
14940 fidl::encoding::Array<
14941 fidl::encoding::HandleType<
14942 fidl::Event,
14943 { fidl::ObjectType::EVENT.into_raw() },
14944 49155,
14945 >,
14946 1,
14947 >,
14948 1,
14949 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14950 _ => return Err(fidl::Error::UnknownUnionTag),
14951 };
14952
14953 if inlined != (member_inline_size <= 4) {
14954 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14955 }
14956 let _inner_offset;
14957 if inlined {
14958 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14959 _inner_offset = offset + 8;
14960 } else {
14961 depth.increment()?;
14962 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14963 }
14964 match ordinal {
14965 1 => {
14966 #[allow(irrefutable_let_patterns)]
14967 if let VectorOfArrayOfEventInUnionWithReducedRights::H(_) = self {
14968 } else {
14970 *self = VectorOfArrayOfEventInUnionWithReducedRights::H(fidl::new_empty!(
14972 fidl::encoding::Vector<
14973 fidl::encoding::Array<
14974 fidl::encoding::HandleType<
14975 fidl::Event,
14976 { fidl::ObjectType::EVENT.into_raw() },
14977 49155,
14978 >,
14979 1,
14980 >,
14981 1,
14982 >,
14983 fidl::encoding::DefaultFuchsiaResourceDialect
14984 ));
14985 }
14986 #[allow(irrefutable_let_patterns)]
14987 if let VectorOfArrayOfEventInUnionWithReducedRights::H(ref mut val) = self {
14988 fidl::decode!(
14989 fidl::encoding::Vector<
14990 fidl::encoding::Array<
14991 fidl::encoding::HandleType<
14992 fidl::Event,
14993 { fidl::ObjectType::EVENT.into_raw() },
14994 49155,
14995 >,
14996 1,
14997 >,
14998 1,
14999 >,
15000 fidl::encoding::DefaultFuchsiaResourceDialect,
15001 val,
15002 decoder,
15003 _inner_offset,
15004 depth
15005 )?;
15006 } else {
15007 unreachable!()
15008 }
15009 }
15010 ordinal => panic!("unexpected ordinal {:?}", ordinal),
15011 }
15012 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
15013 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15014 }
15015 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15016 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15017 }
15018 Ok(())
15019 }
15020 }
15021}