1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_test_conformance::natural::*;
8
9 #[derive(Debug, PartialEq)]
10 pub struct AlternatingHandlesAndFailures {
11 pub h1: ::fidl_next::fuchsia::zx::NullableHandle,
12
13 pub failure_trigger1: ::std::string::String,
14
15 pub h2: ::fidl_next::fuchsia::zx::NullableHandle,
16
17 pub failure_trigger2: ::std::string::String,
18
19 pub h3: ::fidl_next::fuchsia::zx::NullableHandle,
20 }
21
22 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
23 for AlternatingHandlesAndFailures
24 where
25 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
26 ___E: ::fidl_next::Encoder,
27 ___E: ::fidl_next::fuchsia::HandleEncoder,
28 {
29 #[inline]
30 fn encode(
31 self,
32 encoder_: &mut ___E,
33 out_: &mut ::core::mem::MaybeUninit<
34 crate::wire::AlternatingHandlesAndFailures<'static>,
35 >,
36 _: (),
37 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
38 ::fidl_next::munge! {
39 let crate::wire::AlternatingHandlesAndFailures {
40 h1,
41 failure_trigger1,
42 h2,
43 failure_trigger2,
44 h3,
45
46 } = out_;
47 }
48
49 ::fidl_next::Encode::encode(self.h1, encoder_, h1, ())?;
50
51 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h1.as_mut_ptr()) };
52
53 ::fidl_next::Encode::encode(self.failure_trigger1, encoder_, failure_trigger1, 1)?;
54
55 let mut _field =
56 unsafe { ::fidl_next::Slot::new_unchecked(failure_trigger1.as_mut_ptr()) };
57 ::fidl_next::Constrained::validate(_field, 1)?;
58
59 ::fidl_next::Encode::encode(self.h2, encoder_, h2, ())?;
60
61 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h2.as_mut_ptr()) };
62
63 ::fidl_next::Encode::encode(self.failure_trigger2, encoder_, failure_trigger2, 1)?;
64
65 let mut _field =
66 unsafe { ::fidl_next::Slot::new_unchecked(failure_trigger2.as_mut_ptr()) };
67 ::fidl_next::Constrained::validate(_field, 1)?;
68
69 ::fidl_next::Encode::encode(self.h3, encoder_, h3, ())?;
70
71 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h3.as_mut_ptr()) };
72
73 Ok(())
74 }
75 }
76
77 unsafe impl<___E>
78 ::fidl_next::EncodeOption<
79 ::fidl_next::wire::Box<'static, crate::wire::AlternatingHandlesAndFailures<'static>>,
80 ___E,
81 > for AlternatingHandlesAndFailures
82 where
83 ___E: ::fidl_next::Encoder + ?Sized,
84 AlternatingHandlesAndFailures:
85 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>,
86 {
87 #[inline]
88 fn encode_option(
89 this: ::core::option::Option<Self>,
90 encoder: &mut ___E,
91 out: &mut ::core::mem::MaybeUninit<
92 ::fidl_next::wire::Box<
93 'static,
94 crate::wire::AlternatingHandlesAndFailures<'static>,
95 >,
96 >,
97 _: (),
98 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
99 if let Some(inner) = this {
100 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
101 ::fidl_next::wire::Box::encode_present(out);
102 } else {
103 ::fidl_next::wire::Box::encode_absent(out);
104 }
105
106 Ok(())
107 }
108 }
109
110 impl<'de> ::fidl_next::FromWire<crate::wire::AlternatingHandlesAndFailures<'de>>
111 for AlternatingHandlesAndFailures
112 {
113 #[inline]
114 fn from_wire(wire: crate::wire::AlternatingHandlesAndFailures<'de>) -> Self {
115 Self {
116 h1: ::fidl_next::FromWire::from_wire(wire.h1),
117
118 failure_trigger1: ::fidl_next::FromWire::from_wire(wire.failure_trigger1),
119
120 h2: ::fidl_next::FromWire::from_wire(wire.h2),
121
122 failure_trigger2: ::fidl_next::FromWire::from_wire(wire.failure_trigger2),
123
124 h3: ::fidl_next::FromWire::from_wire(wire.h3),
125 }
126 }
127 }
128
129 #[derive(Debug, PartialEq)]
130 #[repr(C)]
131 pub struct ArrayOfArrayOfNonnullableHandles {
132 pub handles: [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4],
133 }
134
135 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
136 for ArrayOfArrayOfNonnullableHandles
137 where
138 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
139 ___E: ::fidl_next::fuchsia::HandleEncoder,
140 {
141 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
142 Self,
143 crate::wire::ArrayOfArrayOfNonnullableHandles,
144 > = unsafe {
145 ::fidl_next::CopyOptimization::enable_if(
146 true
147
148 && <
149 [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4] as ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>
150 >::COPY_OPTIMIZATION.is_enabled()
151
152 )
153 };
154
155 #[inline]
156 fn encode(
157 self,
158 encoder_: &mut ___E,
159 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
160 _: (),
161 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
162 ::fidl_next::munge! {
163 let crate::wire::ArrayOfArrayOfNonnullableHandles {
164 handles,
165
166 } = out_;
167 }
168
169 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
170
171 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
172
173 Ok(())
174 }
175 }
176
177 unsafe impl<___E>
178 ::fidl_next::EncodeOption<
179 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfArrayOfNonnullableHandles>,
180 ___E,
181 > for ArrayOfArrayOfNonnullableHandles
182 where
183 ___E: ::fidl_next::Encoder + ?Sized,
184 ArrayOfArrayOfNonnullableHandles:
185 ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>,
186 {
187 #[inline]
188 fn encode_option(
189 this: ::core::option::Option<Self>,
190 encoder: &mut ___E,
191 out: &mut ::core::mem::MaybeUninit<
192 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfArrayOfNonnullableHandles>,
193 >,
194 _: (),
195 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
196 if let Some(inner) = this {
197 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
198 ::fidl_next::wire::Box::encode_present(out);
199 } else {
200 ::fidl_next::wire::Box::encode_absent(out);
201 }
202
203 Ok(())
204 }
205 }
206
207 impl ::fidl_next::FromWire<crate::wire::ArrayOfArrayOfNonnullableHandles>
208 for ArrayOfArrayOfNonnullableHandles
209 {
210 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
211 crate::wire::ArrayOfArrayOfNonnullableHandles,
212 Self,
213 > = unsafe {
214 ::fidl_next::CopyOptimization::enable_if(
215 true
216
217 && <
218 [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4] as ::fidl_next::FromWire<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4]>
219 >::COPY_OPTIMIZATION.is_enabled()
220
221 )
222 };
223
224 #[inline]
225 fn from_wire(wire: crate::wire::ArrayOfArrayOfNonnullableHandles) -> Self {
226 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
227 }
228 }
229
230 #[derive(Debug, PartialEq)]
231 #[repr(C)]
232 pub struct ArrayOfHandles {
233 pub a: [::fidl_next::fuchsia::zx::NullableHandle; 3],
234 }
235
236 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E> for ArrayOfHandles
237 where
238 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
239 ___E: ::fidl_next::fuchsia::HandleEncoder,
240 {
241 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ArrayOfHandles> = unsafe {
242 ::fidl_next::CopyOptimization::enable_if(
243 true && <[::fidl_next::fuchsia::zx::NullableHandle; 3] as ::fidl_next::Encode<
244 [::fidl_next::wire::fuchsia::NullableHandle; 3],
245 ___E,
246 >>::COPY_OPTIMIZATION
247 .is_enabled(),
248 )
249 };
250
251 #[inline]
252 fn encode(
253 self,
254 encoder_: &mut ___E,
255 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
256 _: (),
257 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
258 ::fidl_next::munge! {
259 let crate::wire::ArrayOfHandles {
260 a,
261
262 } = out_;
263 }
264
265 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
266
267 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) };
268
269 Ok(())
270 }
271 }
272
273 unsafe impl<___E>
274 ::fidl_next::EncodeOption<
275 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfHandles>,
276 ___E,
277 > for ArrayOfHandles
278 where
279 ___E: ::fidl_next::Encoder + ?Sized,
280 ArrayOfHandles: ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E>,
281 {
282 #[inline]
283 fn encode_option(
284 this: ::core::option::Option<Self>,
285 encoder: &mut ___E,
286 out: &mut ::core::mem::MaybeUninit<
287 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfHandles>,
288 >,
289 _: (),
290 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
291 if let Some(inner) = this {
292 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
293 ::fidl_next::wire::Box::encode_present(out);
294 } else {
295 ::fidl_next::wire::Box::encode_absent(out);
296 }
297
298 Ok(())
299 }
300 }
301
302 impl ::fidl_next::FromWire<crate::wire::ArrayOfHandles> for ArrayOfHandles {
303 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ArrayOfHandles, Self> = unsafe {
304 ::fidl_next::CopyOptimization::enable_if(
305 true && <[::fidl_next::fuchsia::zx::NullableHandle; 3] as ::fidl_next::FromWire<
306 [::fidl_next::wire::fuchsia::NullableHandle; 3],
307 >>::COPY_OPTIMIZATION
308 .is_enabled(),
309 )
310 };
311
312 #[inline]
313 fn from_wire(wire: crate::wire::ArrayOfHandles) -> Self {
314 Self { a: ::fidl_next::FromWire::from_wire(wire.a) }
315 }
316 }
317
318 #[derive(Debug, PartialEq)]
319 #[repr(C)]
320 pub struct ArrayOfNonnullableHandles {
321 pub handles: [::fidl_next::fuchsia::zx::NullableHandle; 4],
322 }
323
324 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
325 for ArrayOfNonnullableHandles
326 where
327 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
328 ___E: ::fidl_next::fuchsia::HandleEncoder,
329 {
330 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
331 Self,
332 crate::wire::ArrayOfNonnullableHandles,
333 > = unsafe {
334 ::fidl_next::CopyOptimization::enable_if(
335 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::Encode<
336 [::fidl_next::wire::fuchsia::NullableHandle; 4],
337 ___E,
338 >>::COPY_OPTIMIZATION
339 .is_enabled(),
340 )
341 };
342
343 #[inline]
344 fn encode(
345 self,
346 encoder_: &mut ___E,
347 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
348 _: (),
349 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
350 ::fidl_next::munge! {
351 let crate::wire::ArrayOfNonnullableHandles {
352 handles,
353
354 } = out_;
355 }
356
357 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
358
359 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
360
361 Ok(())
362 }
363 }
364
365 unsafe impl<___E>
366 ::fidl_next::EncodeOption<
367 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNonnullableHandles>,
368 ___E,
369 > for ArrayOfNonnullableHandles
370 where
371 ___E: ::fidl_next::Encoder + ?Sized,
372 ArrayOfNonnullableHandles:
373 ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>,
374 {
375 #[inline]
376 fn encode_option(
377 this: ::core::option::Option<Self>,
378 encoder: &mut ___E,
379 out: &mut ::core::mem::MaybeUninit<
380 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNonnullableHandles>,
381 >,
382 _: (),
383 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
384 if let Some(inner) = this {
385 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
386 ::fidl_next::wire::Box::encode_present(out);
387 } else {
388 ::fidl_next::wire::Box::encode_absent(out);
389 }
390
391 Ok(())
392 }
393 }
394
395 impl ::fidl_next::FromWire<crate::wire::ArrayOfNonnullableHandles> for ArrayOfNonnullableHandles {
396 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
397 crate::wire::ArrayOfNonnullableHandles,
398 Self,
399 > = unsafe {
400 ::fidl_next::CopyOptimization::enable_if(
401 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::FromWire<
402 [::fidl_next::wire::fuchsia::NullableHandle; 4],
403 >>::COPY_OPTIMIZATION
404 .is_enabled(),
405 )
406 };
407
408 #[inline]
409 fn from_wire(wire: crate::wire::ArrayOfNonnullableHandles) -> Self {
410 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
411 }
412 }
413
414 #[derive(Debug, PartialEq)]
415 #[repr(C)]
416 pub struct ArrayOfNullableHandles {
417 pub handles: [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5],
418 }
419
420 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
421 for ArrayOfNullableHandles
422 where
423 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
424 ___E: ::fidl_next::fuchsia::HandleEncoder,
425 {
426 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
427 Self,
428 crate::wire::ArrayOfNullableHandles,
429 > = unsafe {
430 ::fidl_next::CopyOptimization::enable_if(
431 true
432
433 && <
434 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5] as ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>
435 >::COPY_OPTIMIZATION.is_enabled()
436
437 )
438 };
439
440 #[inline]
441 fn encode(
442 self,
443 encoder_: &mut ___E,
444 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
445 _: (),
446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
447 ::fidl_next::munge! {
448 let crate::wire::ArrayOfNullableHandles {
449 handles,
450
451 } = out_;
452 }
453
454 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
455
456 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
457
458 Ok(())
459 }
460 }
461
462 unsafe impl<___E>
463 ::fidl_next::EncodeOption<
464 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNullableHandles>,
465 ___E,
466 > for ArrayOfNullableHandles
467 where
468 ___E: ::fidl_next::Encoder + ?Sized,
469 ArrayOfNullableHandles: ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>,
470 {
471 #[inline]
472 fn encode_option(
473 this: ::core::option::Option<Self>,
474 encoder: &mut ___E,
475 out: &mut ::core::mem::MaybeUninit<
476 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNullableHandles>,
477 >,
478 _: (),
479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
480 if let Some(inner) = this {
481 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
482 ::fidl_next::wire::Box::encode_present(out);
483 } else {
484 ::fidl_next::wire::Box::encode_absent(out);
485 }
486
487 Ok(())
488 }
489 }
490
491 impl ::fidl_next::FromWire<crate::wire::ArrayOfNullableHandles> for ArrayOfNullableHandles {
492 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
493 crate::wire::ArrayOfNullableHandles,
494 Self,
495 > = unsafe {
496 ::fidl_next::CopyOptimization::enable_if(
497 true
498
499 && <
500 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5] as ::fidl_next::FromWire<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5]>
501 >::COPY_OPTIMIZATION.is_enabled()
502
503 )
504 };
505
506 #[inline]
507 fn from_wire(wire: crate::wire::ArrayOfNullableHandles) -> Self {
508 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
509 }
510 }
511
512 #[derive(Debug, PartialEq)]
513 #[repr(C)]
514 pub struct ArrayOfOptionalHandles {
515 pub a: [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3],
516 }
517
518 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
519 for ArrayOfOptionalHandles
520 where
521 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
522 ___E: ::fidl_next::fuchsia::HandleEncoder,
523 {
524 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
525 Self,
526 crate::wire::ArrayOfOptionalHandles,
527 > = unsafe {
528 ::fidl_next::CopyOptimization::enable_if(
529 true
530
531 && <
532 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3] as ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>
533 >::COPY_OPTIMIZATION.is_enabled()
534
535 )
536 };
537
538 #[inline]
539 fn encode(
540 self,
541 encoder_: &mut ___E,
542 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
543 _: (),
544 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
545 ::fidl_next::munge! {
546 let crate::wire::ArrayOfOptionalHandles {
547 a,
548
549 } = out_;
550 }
551
552 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
553
554 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) };
555
556 Ok(())
557 }
558 }
559
560 unsafe impl<___E>
561 ::fidl_next::EncodeOption<
562 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfOptionalHandles>,
563 ___E,
564 > for ArrayOfOptionalHandles
565 where
566 ___E: ::fidl_next::Encoder + ?Sized,
567 ArrayOfOptionalHandles: ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>,
568 {
569 #[inline]
570 fn encode_option(
571 this: ::core::option::Option<Self>,
572 encoder: &mut ___E,
573 out: &mut ::core::mem::MaybeUninit<
574 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfOptionalHandles>,
575 >,
576 _: (),
577 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
578 if let Some(inner) = this {
579 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
580 ::fidl_next::wire::Box::encode_present(out);
581 } else {
582 ::fidl_next::wire::Box::encode_absent(out);
583 }
584
585 Ok(())
586 }
587 }
588
589 impl ::fidl_next::FromWire<crate::wire::ArrayOfOptionalHandles> for ArrayOfOptionalHandles {
590 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
591 crate::wire::ArrayOfOptionalHandles,
592 Self,
593 > = unsafe {
594 ::fidl_next::CopyOptimization::enable_if(
595 true
596
597 && <
598 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3] as ::fidl_next::FromWire<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3]>
599 >::COPY_OPTIMIZATION.is_enabled()
600
601 )
602 };
603
604 #[inline]
605 fn from_wire(wire: crate::wire::ArrayOfOptionalHandles) -> Self {
606 Self { a: ::fidl_next::FromWire::from_wire(wire.a) }
607 }
608 }
609
610 #[derive(Debug, PartialEq)]
611 pub struct ArrayOfVectorOfEventInStructWithDefaultRights {
612 pub h: [::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1],
613 }
614
615 unsafe impl<___E>
616 ::fidl_next::Encode<
617 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
618 ___E,
619 > for ArrayOfVectorOfEventInStructWithDefaultRights
620 where
621 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
622 ___E: ::fidl_next::Encoder,
623 ___E: ::fidl_next::fuchsia::HandleEncoder,
624 {
625 #[inline]
626 fn encode(
627 self,
628 encoder_: &mut ___E,
629 out_: &mut ::core::mem::MaybeUninit<
630 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
631 >,
632 _: (),
633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
634 ::fidl_next::munge! {
635 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
636 h,
637
638 } = out_;
639 }
640
641 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
642
643 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
644 ::fidl_next::Constrained::validate(_field, (1, ()))?;
645
646 Ok(())
647 }
648 }
649
650 unsafe impl<___E>
651 ::fidl_next::EncodeOption<
652 ::fidl_next::wire::Box<
653 'static,
654 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
655 >,
656 ___E,
657 > for ArrayOfVectorOfEventInStructWithDefaultRights
658 where
659 ___E: ::fidl_next::Encoder + ?Sized,
660 ArrayOfVectorOfEventInStructWithDefaultRights: ::fidl_next::Encode<
661 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
662 ___E,
663 >,
664 {
665 #[inline]
666 fn encode_option(
667 this: ::core::option::Option<Self>,
668 encoder: &mut ___E,
669 out: &mut ::core::mem::MaybeUninit<
670 ::fidl_next::wire::Box<
671 'static,
672 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
673 >,
674 >,
675 _: (),
676 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
677 if let Some(inner) = this {
678 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
679 ::fidl_next::wire::Box::encode_present(out);
680 } else {
681 ::fidl_next::wire::Box::encode_absent(out);
682 }
683
684 Ok(())
685 }
686 }
687
688 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'de>>
689 for ArrayOfVectorOfEventInStructWithDefaultRights
690 {
691 #[inline]
692 fn from_wire(
693 wire: crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'de>,
694 ) -> Self {
695 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
696 }
697 }
698
699 #[derive(Debug, PartialEq)]
700 pub struct ArrayOfVectorOfEventInStructWithReducedRights {
701 pub h: [::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1],
702 }
703
704 unsafe impl<___E>
705 ::fidl_next::Encode<
706 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
707 ___E,
708 > for ArrayOfVectorOfEventInStructWithReducedRights
709 where
710 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
711 ___E: ::fidl_next::Encoder,
712 ___E: ::fidl_next::fuchsia::HandleEncoder,
713 {
714 #[inline]
715 fn encode(
716 self,
717 encoder_: &mut ___E,
718 out_: &mut ::core::mem::MaybeUninit<
719 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
720 >,
721 _: (),
722 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
723 ::fidl_next::munge! {
724 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
725 h,
726
727 } = out_;
728 }
729
730 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
731
732 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
733 ::fidl_next::Constrained::validate(_field, (1, ()))?;
734
735 Ok(())
736 }
737 }
738
739 unsafe impl<___E>
740 ::fidl_next::EncodeOption<
741 ::fidl_next::wire::Box<
742 'static,
743 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
744 >,
745 ___E,
746 > for ArrayOfVectorOfEventInStructWithReducedRights
747 where
748 ___E: ::fidl_next::Encoder + ?Sized,
749 ArrayOfVectorOfEventInStructWithReducedRights: ::fidl_next::Encode<
750 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
751 ___E,
752 >,
753 {
754 #[inline]
755 fn encode_option(
756 this: ::core::option::Option<Self>,
757 encoder: &mut ___E,
758 out: &mut ::core::mem::MaybeUninit<
759 ::fidl_next::wire::Box<
760 'static,
761 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
762 >,
763 >,
764 _: (),
765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
766 if let Some(inner) = this {
767 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
768 ::fidl_next::wire::Box::encode_present(out);
769 } else {
770 ::fidl_next::wire::Box::encode_absent(out);
771 }
772
773 Ok(())
774 }
775 }
776
777 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'de>>
778 for ArrayOfVectorOfEventInStructWithReducedRights
779 {
780 #[inline]
781 fn from_wire(
782 wire: crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'de>,
783 ) -> Self {
784 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
785 }
786 }
787
788 #[derive(Debug, Default, PartialEq)]
789 pub struct ArrayOfVectorOfEventInTableWithDefaultRights {
790 pub h: ::core::option::Option<[::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]>,
791 }
792
793 impl ArrayOfVectorOfEventInTableWithDefaultRights {
794 fn __max_ordinal(&self) -> usize {
795 if self.h.is_some() {
796 return 1;
797 }
798
799 0
800 }
801 }
802
803 unsafe impl<___E>
804 ::fidl_next::Encode<
805 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
806 ___E,
807 > for ArrayOfVectorOfEventInTableWithDefaultRights
808 where
809 ___E: ::fidl_next::Encoder + ?Sized,
810 ___E: ::fidl_next::fuchsia::HandleEncoder,
811 {
812 #[inline]
813 fn encode(
814 mut self,
815 encoder: &mut ___E,
816 out: &mut ::core::mem::MaybeUninit<
817 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
818 >,
819 _: (),
820 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
821 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights { table } = out);
822
823 let max_ord = self.__max_ordinal();
824
825 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
826 ::fidl_next::Wire::zero_padding(&mut out);
827
828 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
829 ::fidl_next::wire::Envelope,
830 >(encoder, max_ord);
831
832 for i in 1..=max_ord {
833 match i {
834 1 => {
835 if let Some(value) = self.h.take() {
836 ::fidl_next::wire::Envelope::encode_value::<
837 [::fidl_next::wire::Vector<
838 'static,
839 ::fidl_next::wire::fuchsia::Event,
840 >; 1],
841 ___E,
842 >(
843 value, preallocated.encoder, &mut out, (1, ())
844 )?;
845 } else {
846 ::fidl_next::wire::Envelope::encode_zero(&mut out)
847 }
848 }
849
850 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
851 }
852 unsafe {
853 preallocated.write_next(out.assume_init_ref());
854 }
855 }
856
857 ::fidl_next::wire::Table::encode_len(table, max_ord);
858
859 Ok(())
860 }
861 }
862
863 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>>
864 for ArrayOfVectorOfEventInTableWithDefaultRights
865 {
866 #[inline]
867 fn from_wire(
868 wire_: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>,
869 ) -> Self {
870 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
871
872 let h = wire_.table.get(1);
873
874 Self {
875
876
877 h: h.map(|envelope| ::fidl_next::FromWire::from_wire(
878 unsafe { envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>() }
879 )),
880
881 }
882 }
883 }
884
885 #[derive(Debug, PartialEq)]
886 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
887 pub t: crate::natural::ArrayOfVectorOfEventInTableWithDefaultRights,
888 }
889
890 unsafe impl<___E>
891 ::fidl_next::Encode<
892 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
893 ___E,
894 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
895 where
896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
897 ___E: ::fidl_next::Encoder,
898 ___E: ::fidl_next::fuchsia::HandleEncoder,
899 {
900 #[inline]
901 fn encode(
902 self,
903 encoder_: &mut ___E,
904 out_: &mut ::core::mem::MaybeUninit<
905 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
906 >,
907 _: (),
908 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
909 ::fidl_next::munge! {
910 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
911 t,
912
913 } = out_;
914 }
915
916 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
917
918 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
919
920 Ok(())
921 }
922 }
923
924 unsafe impl<___E>
925 ::fidl_next::EncodeOption<
926 ::fidl_next::wire::Box<
927 'static,
928 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
929 >,
930 ___E,
931 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
932 where
933 ___E: ::fidl_next::Encoder + ?Sized,
934 ArrayOfVectorOfEventInTableWithDefaultRightsStruct: ::fidl_next::Encode<
935 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
936 ___E,
937 >,
938 {
939 #[inline]
940 fn encode_option(
941 this: ::core::option::Option<Self>,
942 encoder: &mut ___E,
943 out: &mut ::core::mem::MaybeUninit<
944 ::fidl_next::wire::Box<
945 'static,
946 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
947 >,
948 >,
949 _: (),
950 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
951 if let Some(inner) = this {
952 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
953 ::fidl_next::wire::Box::encode_present(out);
954 } else {
955 ::fidl_next::wire::Box::encode_absent(out);
956 }
957
958 Ok(())
959 }
960 }
961
962 impl<'de>
963 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>>
964 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
965 {
966 #[inline]
967 fn from_wire(
968 wire: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>,
969 ) -> Self {
970 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
971 }
972 }
973
974 #[derive(Debug, Default, PartialEq)]
975 pub struct ArrayOfVectorOfEventInTableWithReducedRights {
976 pub h: ::core::option::Option<[::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]>,
977 }
978
979 impl ArrayOfVectorOfEventInTableWithReducedRights {
980 fn __max_ordinal(&self) -> usize {
981 if self.h.is_some() {
982 return 1;
983 }
984
985 0
986 }
987 }
988
989 unsafe impl<___E>
990 ::fidl_next::Encode<
991 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
992 ___E,
993 > for ArrayOfVectorOfEventInTableWithReducedRights
994 where
995 ___E: ::fidl_next::Encoder + ?Sized,
996 ___E: ::fidl_next::fuchsia::HandleEncoder,
997 {
998 #[inline]
999 fn encode(
1000 mut self,
1001 encoder: &mut ___E,
1002 out: &mut ::core::mem::MaybeUninit<
1003 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
1004 >,
1005 _: (),
1006 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1007 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInTableWithReducedRights { table } = out);
1008
1009 let max_ord = self.__max_ordinal();
1010
1011 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1012 ::fidl_next::Wire::zero_padding(&mut out);
1013
1014 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1015 ::fidl_next::wire::Envelope,
1016 >(encoder, max_ord);
1017
1018 for i in 1..=max_ord {
1019 match i {
1020 1 => {
1021 if let Some(value) = self.h.take() {
1022 ::fidl_next::wire::Envelope::encode_value::<
1023 [::fidl_next::wire::Vector<
1024 'static,
1025 ::fidl_next::wire::fuchsia::Event,
1026 >; 1],
1027 ___E,
1028 >(
1029 value, preallocated.encoder, &mut out, (1, ())
1030 )?;
1031 } else {
1032 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1033 }
1034 }
1035
1036 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1037 }
1038 unsafe {
1039 preallocated.write_next(out.assume_init_ref());
1040 }
1041 }
1042
1043 ::fidl_next::wire::Table::encode_len(table, max_ord);
1044
1045 Ok(())
1046 }
1047 }
1048
1049 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>>
1050 for ArrayOfVectorOfEventInTableWithReducedRights
1051 {
1052 #[inline]
1053 fn from_wire(
1054 wire_: crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>,
1055 ) -> Self {
1056 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1057
1058 let h = wire_.table.get(1);
1059
1060 Self {
1061
1062
1063 h: h.map(|envelope| ::fidl_next::FromWire::from_wire(
1064 unsafe { envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>() }
1065 )),
1066
1067 }
1068 }
1069 }
1070
1071 #[derive(Debug, PartialEq)]
1072 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct {
1073 pub t: crate::natural::ArrayOfVectorOfEventInTableWithReducedRights,
1074 }
1075
1076 unsafe impl<___E>
1077 ::fidl_next::Encode<
1078 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1079 ___E,
1080 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1081 where
1082 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1083 ___E: ::fidl_next::Encoder,
1084 ___E: ::fidl_next::fuchsia::HandleEncoder,
1085 {
1086 #[inline]
1087 fn encode(
1088 self,
1089 encoder_: &mut ___E,
1090 out_: &mut ::core::mem::MaybeUninit<
1091 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1092 >,
1093 _: (),
1094 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1095 ::fidl_next::munge! {
1096 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
1097 t,
1098
1099 } = out_;
1100 }
1101
1102 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
1103
1104 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
1105
1106 Ok(())
1107 }
1108 }
1109
1110 unsafe impl<___E>
1111 ::fidl_next::EncodeOption<
1112 ::fidl_next::wire::Box<
1113 'static,
1114 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1115 >,
1116 ___E,
1117 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1118 where
1119 ___E: ::fidl_next::Encoder + ?Sized,
1120 ArrayOfVectorOfEventInTableWithReducedRightsStruct: ::fidl_next::Encode<
1121 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1122 ___E,
1123 >,
1124 {
1125 #[inline]
1126 fn encode_option(
1127 this: ::core::option::Option<Self>,
1128 encoder: &mut ___E,
1129 out: &mut ::core::mem::MaybeUninit<
1130 ::fidl_next::wire::Box<
1131 'static,
1132 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1133 >,
1134 >,
1135 _: (),
1136 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1137 if let Some(inner) = this {
1138 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1139 ::fidl_next::wire::Box::encode_present(out);
1140 } else {
1141 ::fidl_next::wire::Box::encode_absent(out);
1142 }
1143
1144 Ok(())
1145 }
1146 }
1147
1148 impl<'de>
1149 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>>
1150 for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1151 {
1152 #[inline]
1153 fn from_wire(
1154 wire: crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>,
1155 ) -> Self {
1156 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
1157 }
1158 }
1159
1160 #[derive(Debug, PartialEq)]
1161 pub enum ArrayOfVectorOfEventInUnionWithDefaultRights {
1162 H([::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]),
1163 }
1164
1165 unsafe impl<___E>
1166 ::fidl_next::Encode<
1167 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1168 ___E,
1169 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1170 where
1171 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1172 ___E: ::fidl_next::Encoder,
1173 ___E: ::fidl_next::fuchsia::HandleEncoder,
1174 {
1175 #[inline]
1176 fn encode(
1177 self,
1178 encoder: &mut ___E,
1179 out: &mut ::core::mem::MaybeUninit<
1180 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1181 >,
1182 _: (),
1183 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1184 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights { raw, _phantom: _ } = out);
1185
1186 match self {
1187 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
1188 ___E,
1189 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
1190 >(value, 1, encoder, raw, (1, ()))?,
1191 }
1192
1193 Ok(())
1194 }
1195 }
1196
1197 unsafe impl<___E>
1198 ::fidl_next::EncodeOption<
1199 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1200 ___E,
1201 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1202 where
1203 ___E: ?Sized,
1204 ArrayOfVectorOfEventInUnionWithDefaultRights: ::fidl_next::Encode<
1205 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1206 ___E,
1207 >,
1208 {
1209 #[inline]
1210 fn encode_option(
1211 this: ::core::option::Option<Self>,
1212 encoder: &mut ___E,
1213 out: &mut ::core::mem::MaybeUninit<
1214 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1215 >,
1216 _: (),
1217 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1218 ::fidl_next::munge!(let crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights { raw, _phantom: _ } = &mut *out);
1219
1220 if let Some(inner) = this {
1221 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1222 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1223 } else {
1224 ::fidl_next::wire::Union::encode_absent(raw);
1225 }
1226
1227 Ok(())
1228 }
1229 }
1230
1231 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
1232 for ArrayOfVectorOfEventInUnionWithDefaultRights
1233 {
1234 #[inline]
1235 fn from_wire(wire: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>) -> Self {
1236 let wire = ::core::mem::ManuallyDrop::new(wire);
1237 match wire.raw.ordinal() {
1238 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
1239 wire.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
1240 })),
1241
1242 _ => unsafe { ::core::hint::unreachable_unchecked() },
1243 }
1244 }
1245 }
1246
1247 impl<'de>
1248 ::fidl_next::FromWireOption<
1249 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1250 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1251 {
1252 #[inline]
1253 fn from_wire_option(
1254 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1255 ) -> ::core::option::Option<Self> {
1256 if let Some(inner) = wire.into_option() {
1257 Some(::fidl_next::FromWire::from_wire(inner))
1258 } else {
1259 None
1260 }
1261 }
1262 }
1263
1264 impl<'de>
1265 ::fidl_next::FromWireOption<
1266 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1267 > for Box<ArrayOfVectorOfEventInUnionWithDefaultRights>
1268 {
1269 #[inline]
1270 fn from_wire_option(
1271 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1272 ) -> ::core::option::Option<Self> {
1273 <ArrayOfVectorOfEventInUnionWithDefaultRights as ::fidl_next::FromWireOption<
1274 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1275 >>::from_wire_option(wire)
1276 .map(Box::new)
1277 }
1278 }
1279
1280 #[derive(Debug, PartialEq)]
1281 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
1282 pub u: crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights,
1283 }
1284
1285 unsafe impl<___E>
1286 ::fidl_next::Encode<
1287 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1288 ___E,
1289 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1290 where
1291 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1292 ___E: ::fidl_next::Encoder,
1293 ___E: ::fidl_next::fuchsia::HandleEncoder,
1294 {
1295 #[inline]
1296 fn encode(
1297 self,
1298 encoder_: &mut ___E,
1299 out_: &mut ::core::mem::MaybeUninit<
1300 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1301 >,
1302 _: (),
1303 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1304 ::fidl_next::munge! {
1305 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
1306 u,
1307
1308 } = out_;
1309 }
1310
1311 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
1312
1313 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
1314
1315 Ok(())
1316 }
1317 }
1318
1319 unsafe impl<___E>
1320 ::fidl_next::EncodeOption<
1321 ::fidl_next::wire::Box<
1322 'static,
1323 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1324 >,
1325 ___E,
1326 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1327 where
1328 ___E: ::fidl_next::Encoder + ?Sized,
1329 ArrayOfVectorOfEventInUnionWithDefaultRightsStruct: ::fidl_next::Encode<
1330 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1331 ___E,
1332 >,
1333 {
1334 #[inline]
1335 fn encode_option(
1336 this: ::core::option::Option<Self>,
1337 encoder: &mut ___E,
1338 out: &mut ::core::mem::MaybeUninit<
1339 ::fidl_next::wire::Box<
1340 'static,
1341 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1342 >,
1343 >,
1344 _: (),
1345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1346 if let Some(inner) = this {
1347 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1348 ::fidl_next::wire::Box::encode_present(out);
1349 } else {
1350 ::fidl_next::wire::Box::encode_absent(out);
1351 }
1352
1353 Ok(())
1354 }
1355 }
1356
1357 impl<'de>
1358 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>>
1359 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1360 {
1361 #[inline]
1362 fn from_wire(
1363 wire: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>,
1364 ) -> Self {
1365 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
1366 }
1367 }
1368
1369 #[derive(Debug, PartialEq)]
1370 pub enum ArrayOfVectorOfEventInUnionWithReducedRights {
1371 H([::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]),
1372 }
1373
1374 unsafe impl<___E>
1375 ::fidl_next::Encode<
1376 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1377 ___E,
1378 > for ArrayOfVectorOfEventInUnionWithReducedRights
1379 where
1380 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1381 ___E: ::fidl_next::Encoder,
1382 ___E: ::fidl_next::fuchsia::HandleEncoder,
1383 {
1384 #[inline]
1385 fn encode(
1386 self,
1387 encoder: &mut ___E,
1388 out: &mut ::core::mem::MaybeUninit<
1389 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1390 >,
1391 _: (),
1392 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1393 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights { raw, _phantom: _ } = out);
1394
1395 match self {
1396 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
1397 ___E,
1398 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
1399 >(value, 1, encoder, raw, (1, ()))?,
1400 }
1401
1402 Ok(())
1403 }
1404 }
1405
1406 unsafe impl<___E>
1407 ::fidl_next::EncodeOption<
1408 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1409 ___E,
1410 > for ArrayOfVectorOfEventInUnionWithReducedRights
1411 where
1412 ___E: ?Sized,
1413 ArrayOfVectorOfEventInUnionWithReducedRights: ::fidl_next::Encode<
1414 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1415 ___E,
1416 >,
1417 {
1418 #[inline]
1419 fn encode_option(
1420 this: ::core::option::Option<Self>,
1421 encoder: &mut ___E,
1422 out: &mut ::core::mem::MaybeUninit<
1423 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1424 >,
1425 _: (),
1426 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1427 ::fidl_next::munge!(let crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights { raw, _phantom: _ } = &mut *out);
1428
1429 if let Some(inner) = this {
1430 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1431 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1432 } else {
1433 ::fidl_next::wire::Union::encode_absent(raw);
1434 }
1435
1436 Ok(())
1437 }
1438 }
1439
1440 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
1441 for ArrayOfVectorOfEventInUnionWithReducedRights
1442 {
1443 #[inline]
1444 fn from_wire(wire: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>) -> Self {
1445 let wire = ::core::mem::ManuallyDrop::new(wire);
1446 match wire.raw.ordinal() {
1447 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
1448 wire.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
1449 })),
1450
1451 _ => unsafe { ::core::hint::unreachable_unchecked() },
1452 }
1453 }
1454 }
1455
1456 impl<'de>
1457 ::fidl_next::FromWireOption<
1458 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1459 > for ArrayOfVectorOfEventInUnionWithReducedRights
1460 {
1461 #[inline]
1462 fn from_wire_option(
1463 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1464 ) -> ::core::option::Option<Self> {
1465 if let Some(inner) = wire.into_option() {
1466 Some(::fidl_next::FromWire::from_wire(inner))
1467 } else {
1468 None
1469 }
1470 }
1471 }
1472
1473 impl<'de>
1474 ::fidl_next::FromWireOption<
1475 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1476 > for Box<ArrayOfVectorOfEventInUnionWithReducedRights>
1477 {
1478 #[inline]
1479 fn from_wire_option(
1480 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1481 ) -> ::core::option::Option<Self> {
1482 <ArrayOfVectorOfEventInUnionWithReducedRights as ::fidl_next::FromWireOption<
1483 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1484 >>::from_wire_option(wire)
1485 .map(Box::new)
1486 }
1487 }
1488
1489 #[derive(Debug, PartialEq)]
1490 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
1491 pub u: crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights,
1492 }
1493
1494 unsafe impl<___E>
1495 ::fidl_next::Encode<
1496 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1497 ___E,
1498 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1499 where
1500 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1501 ___E: ::fidl_next::Encoder,
1502 ___E: ::fidl_next::fuchsia::HandleEncoder,
1503 {
1504 #[inline]
1505 fn encode(
1506 self,
1507 encoder_: &mut ___E,
1508 out_: &mut ::core::mem::MaybeUninit<
1509 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1510 >,
1511 _: (),
1512 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1513 ::fidl_next::munge! {
1514 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
1515 u,
1516
1517 } = out_;
1518 }
1519
1520 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
1521
1522 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
1523
1524 Ok(())
1525 }
1526 }
1527
1528 unsafe impl<___E>
1529 ::fidl_next::EncodeOption<
1530 ::fidl_next::wire::Box<
1531 'static,
1532 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1533 >,
1534 ___E,
1535 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1536 where
1537 ___E: ::fidl_next::Encoder + ?Sized,
1538 ArrayOfVectorOfEventInUnionWithReducedRightsStruct: ::fidl_next::Encode<
1539 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1540 ___E,
1541 >,
1542 {
1543 #[inline]
1544 fn encode_option(
1545 this: ::core::option::Option<Self>,
1546 encoder: &mut ___E,
1547 out: &mut ::core::mem::MaybeUninit<
1548 ::fidl_next::wire::Box<
1549 'static,
1550 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1551 >,
1552 >,
1553 _: (),
1554 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1555 if let Some(inner) = this {
1556 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1557 ::fidl_next::wire::Box::encode_present(out);
1558 } else {
1559 ::fidl_next::wire::Box::encode_absent(out);
1560 }
1561
1562 Ok(())
1563 }
1564 }
1565
1566 impl<'de>
1567 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>>
1568 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1569 {
1570 #[inline]
1571 fn from_wire(
1572 wire: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>,
1573 ) -> Self {
1574 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
1575 }
1576 }
1577
1578 #[derive(Debug, PartialEq)]
1579 pub struct Bounded32NonnullableVectorOfHandles {
1580 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
1581 }
1582
1583 unsafe impl<___E>
1584 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
1585 for Bounded32NonnullableVectorOfHandles
1586 where
1587 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1588 ___E: ::fidl_next::Encoder,
1589 ___E: ::fidl_next::fuchsia::HandleEncoder,
1590 {
1591 #[inline]
1592 fn encode(
1593 self,
1594 encoder_: &mut ___E,
1595 out_: &mut ::core::mem::MaybeUninit<
1596 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1597 >,
1598 _: (),
1599 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1600 ::fidl_next::munge! {
1601 let crate::wire::Bounded32NonnullableVectorOfHandles {
1602 vh0,
1603
1604 } = out_;
1605 }
1606
1607 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
1608
1609 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
1610 ::fidl_next::Constrained::validate(_field, (32, ()))?;
1611
1612 Ok(())
1613 }
1614 }
1615
1616 unsafe impl<___E>
1617 ::fidl_next::EncodeOption<
1618 ::fidl_next::wire::Box<
1619 'static,
1620 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1621 >,
1622 ___E,
1623 > for Bounded32NonnullableVectorOfHandles
1624 where
1625 ___E: ::fidl_next::Encoder + ?Sized,
1626 Bounded32NonnullableVectorOfHandles:
1627 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>,
1628 {
1629 #[inline]
1630 fn encode_option(
1631 this: ::core::option::Option<Self>,
1632 encoder: &mut ___E,
1633 out: &mut ::core::mem::MaybeUninit<
1634 ::fidl_next::wire::Box<
1635 'static,
1636 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1637 >,
1638 >,
1639 _: (),
1640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1641 if let Some(inner) = this {
1642 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1643 ::fidl_next::wire::Box::encode_present(out);
1644 } else {
1645 ::fidl_next::wire::Box::encode_absent(out);
1646 }
1647
1648 Ok(())
1649 }
1650 }
1651
1652 impl<'de> ::fidl_next::FromWire<crate::wire::Bounded32NonnullableVectorOfHandles<'de>>
1653 for Bounded32NonnullableVectorOfHandles
1654 {
1655 #[inline]
1656 fn from_wire(wire: crate::wire::Bounded32NonnullableVectorOfHandles<'de>) -> Self {
1657 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
1658 }
1659 }
1660
1661 #[derive(Debug, PartialEq)]
1662 pub struct Bounded32NullableVectorOfHandles {
1663 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
1664 }
1665
1666 unsafe impl<___E>
1667 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
1668 for Bounded32NullableVectorOfHandles
1669 where
1670 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1671 ___E: ::fidl_next::Encoder,
1672 ___E: ::fidl_next::fuchsia::HandleEncoder,
1673 {
1674 #[inline]
1675 fn encode(
1676 self,
1677 encoder_: &mut ___E,
1678 out_: &mut ::core::mem::MaybeUninit<
1679 crate::wire::Bounded32NullableVectorOfHandles<'static>,
1680 >,
1681 _: (),
1682 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1683 ::fidl_next::munge! {
1684 let crate::wire::Bounded32NullableVectorOfHandles {
1685 vh0,
1686
1687 } = out_;
1688 }
1689
1690 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
1691
1692 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
1693 ::fidl_next::Constrained::validate(_field, (32, ()))?;
1694
1695 Ok(())
1696 }
1697 }
1698
1699 unsafe impl<___E>
1700 ::fidl_next::EncodeOption<
1701 ::fidl_next::wire::Box<'static, crate::wire::Bounded32NullableVectorOfHandles<'static>>,
1702 ___E,
1703 > for Bounded32NullableVectorOfHandles
1704 where
1705 ___E: ::fidl_next::Encoder + ?Sized,
1706 Bounded32NullableVectorOfHandles:
1707 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>,
1708 {
1709 #[inline]
1710 fn encode_option(
1711 this: ::core::option::Option<Self>,
1712 encoder: &mut ___E,
1713 out: &mut ::core::mem::MaybeUninit<
1714 ::fidl_next::wire::Box<
1715 'static,
1716 crate::wire::Bounded32NullableVectorOfHandles<'static>,
1717 >,
1718 >,
1719 _: (),
1720 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1721 if let Some(inner) = this {
1722 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1723 ::fidl_next::wire::Box::encode_present(out);
1724 } else {
1725 ::fidl_next::wire::Box::encode_absent(out);
1726 }
1727
1728 Ok(())
1729 }
1730 }
1731
1732 impl<'de> ::fidl_next::FromWire<crate::wire::Bounded32NullableVectorOfHandles<'de>>
1733 for Bounded32NullableVectorOfHandles
1734 {
1735 #[inline]
1736 fn from_wire(wire: crate::wire::Bounded32NullableVectorOfHandles<'de>) -> Self {
1737 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
1738 }
1739 }
1740
1741 #[derive(Debug, PartialEq)]
1742 pub struct BoxOfSingleHandle {
1743 pub b: ::core::option::Option<::std::boxed::Box<crate::natural::SingleHandle>>,
1744 }
1745
1746 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
1747 for BoxOfSingleHandle
1748 where
1749 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1750 ___E: ::fidl_next::Encoder,
1751 ___E: ::fidl_next::fuchsia::HandleEncoder,
1752 {
1753 #[inline]
1754 fn encode(
1755 self,
1756 encoder_: &mut ___E,
1757 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
1758 _: (),
1759 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1760 ::fidl_next::munge! {
1761 let crate::wire::BoxOfSingleHandle {
1762 b,
1763
1764 } = out_;
1765 }
1766
1767 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
1768
1769 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) };
1770
1771 Ok(())
1772 }
1773 }
1774
1775 unsafe impl<___E>
1776 ::fidl_next::EncodeOption<
1777 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleHandle<'static>>,
1778 ___E,
1779 > for BoxOfSingleHandle
1780 where
1781 ___E: ::fidl_next::Encoder + ?Sized,
1782 BoxOfSingleHandle: ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>,
1783 {
1784 #[inline]
1785 fn encode_option(
1786 this: ::core::option::Option<Self>,
1787 encoder: &mut ___E,
1788 out: &mut ::core::mem::MaybeUninit<
1789 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleHandle<'static>>,
1790 >,
1791 _: (),
1792 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1793 if let Some(inner) = this {
1794 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1795 ::fidl_next::wire::Box::encode_present(out);
1796 } else {
1797 ::fidl_next::wire::Box::encode_absent(out);
1798 }
1799
1800 Ok(())
1801 }
1802 }
1803
1804 impl<'de> ::fidl_next::FromWire<crate::wire::BoxOfSingleHandle<'de>> for BoxOfSingleHandle {
1805 #[inline]
1806 fn from_wire(wire: crate::wire::BoxOfSingleHandle<'de>) -> Self {
1807 Self { b: ::fidl_next::FromWire::from_wire(wire.b) }
1808 }
1809 }
1810
1811 #[derive(Debug, PartialEq)]
1812 pub struct BoxOfSingleOptionalHandle {
1813 pub b: ::core::option::Option<::std::boxed::Box<crate::natural::SingleOptionalHandle>>,
1814 }
1815
1816 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
1817 for BoxOfSingleOptionalHandle
1818 where
1819 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1820 ___E: ::fidl_next::Encoder,
1821 ___E: ::fidl_next::fuchsia::HandleEncoder,
1822 {
1823 #[inline]
1824 fn encode(
1825 self,
1826 encoder_: &mut ___E,
1827 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
1828 _: (),
1829 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1830 ::fidl_next::munge! {
1831 let crate::wire::BoxOfSingleOptionalHandle {
1832 b,
1833
1834 } = out_;
1835 }
1836
1837 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
1838
1839 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) };
1840
1841 Ok(())
1842 }
1843 }
1844
1845 unsafe impl<___E>
1846 ::fidl_next::EncodeOption<
1847 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleOptionalHandle<'static>>,
1848 ___E,
1849 > for BoxOfSingleOptionalHandle
1850 where
1851 ___E: ::fidl_next::Encoder + ?Sized,
1852 BoxOfSingleOptionalHandle:
1853 ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>,
1854 {
1855 #[inline]
1856 fn encode_option(
1857 this: ::core::option::Option<Self>,
1858 encoder: &mut ___E,
1859 out: &mut ::core::mem::MaybeUninit<
1860 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleOptionalHandle<'static>>,
1861 >,
1862 _: (),
1863 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1864 if let Some(inner) = this {
1865 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1866 ::fidl_next::wire::Box::encode_present(out);
1867 } else {
1868 ::fidl_next::wire::Box::encode_absent(out);
1869 }
1870
1871 Ok(())
1872 }
1873 }
1874
1875 impl<'de> ::fidl_next::FromWire<crate::wire::BoxOfSingleOptionalHandle<'de>>
1876 for BoxOfSingleOptionalHandle
1877 {
1878 #[inline]
1879 fn from_wire(wire: crate::wire::BoxOfSingleOptionalHandle<'de>) -> Self {
1880 Self { b: ::fidl_next::FromWire::from_wire(wire.b) }
1881 }
1882 }
1883
1884 #[derive(Debug, PartialEq)]
1885 pub struct LaunchInfo {
1886 pub url: ::std::string::String,
1887
1888 pub arguments: ::core::option::Option<::std::vec::Vec<::std::string::String>>,
1889
1890 pub out: ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1891
1892 pub err: ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1893
1894 pub directory_request: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
1895
1896 pub flat_namespace:
1897 ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1898
1899 pub additional_services:
1900 ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1901 }
1902
1903 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E> for LaunchInfo
1904 where
1905 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1906 ___E: ::fidl_next::Encoder,
1907 ___E: ::fidl_next::fuchsia::HandleEncoder,
1908 {
1909 #[inline]
1910 fn encode(
1911 self,
1912 encoder_: &mut ___E,
1913 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
1914 _: (),
1915 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1916 ::fidl_next::munge! {
1917 let crate::wire::LaunchInfo {
1918 url,
1919 arguments,
1920 out,
1921 err,
1922 directory_request,
1923 flat_namespace,
1924 additional_services,
1925
1926 } = out_;
1927 }
1928
1929 ::fidl_next::Encode::encode(self.url, encoder_, url, 200)?;
1930
1931 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(url.as_mut_ptr()) };
1932 ::fidl_next::Constrained::validate(_field, 200)?;
1933
1934 ::fidl_next::Encode::encode(
1935 self.arguments,
1936 encoder_,
1937 arguments,
1938 (4294967295, 4294967295),
1939 )?;
1940
1941 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arguments.as_mut_ptr()) };
1942 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
1943
1944 ::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
1945
1946 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(out.as_mut_ptr()) };
1947
1948 ::fidl_next::Encode::encode(self.err, encoder_, err, ())?;
1949
1950 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(err.as_mut_ptr()) };
1951
1952 ::fidl_next::Encode::encode(self.directory_request, encoder_, directory_request, ())?;
1953
1954 let mut _field =
1955 unsafe { ::fidl_next::Slot::new_unchecked(directory_request.as_mut_ptr()) };
1956
1957 ::fidl_next::Encode::encode(self.flat_namespace, encoder_, flat_namespace, ())?;
1958
1959 let mut _field =
1960 unsafe { ::fidl_next::Slot::new_unchecked(flat_namespace.as_mut_ptr()) };
1961
1962 ::fidl_next::Encode::encode(
1963 self.additional_services,
1964 encoder_,
1965 additional_services,
1966 (),
1967 )?;
1968
1969 let mut _field =
1970 unsafe { ::fidl_next::Slot::new_unchecked(additional_services.as_mut_ptr()) };
1971
1972 Ok(())
1973 }
1974 }
1975
1976 unsafe impl<___E>
1977 ::fidl_next::EncodeOption<
1978 ::fidl_next::wire::Box<'static, crate::wire::LaunchInfo<'static>>,
1979 ___E,
1980 > for LaunchInfo
1981 where
1982 ___E: ::fidl_next::Encoder + ?Sized,
1983 LaunchInfo: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
1984 {
1985 #[inline]
1986 fn encode_option(
1987 this: ::core::option::Option<Self>,
1988 encoder: &mut ___E,
1989 out: &mut ::core::mem::MaybeUninit<
1990 ::fidl_next::wire::Box<'static, crate::wire::LaunchInfo<'static>>,
1991 >,
1992 _: (),
1993 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1994 if let Some(inner) = this {
1995 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1996 ::fidl_next::wire::Box::encode_present(out);
1997 } else {
1998 ::fidl_next::wire::Box::encode_absent(out);
1999 }
2000
2001 Ok(())
2002 }
2003 }
2004
2005 impl<'de> ::fidl_next::FromWire<crate::wire::LaunchInfo<'de>> for LaunchInfo {
2006 #[inline]
2007 fn from_wire(wire: crate::wire::LaunchInfo<'de>) -> Self {
2008 Self {
2009 url: ::fidl_next::FromWire::from_wire(wire.url),
2010
2011 arguments: ::fidl_next::FromWire::from_wire(wire.arguments),
2012
2013 out: ::fidl_next::FromWire::from_wire(wire.out),
2014
2015 err: ::fidl_next::FromWire::from_wire(wire.err),
2016
2017 directory_request: ::fidl_next::FromWire::from_wire(wire.directory_request),
2018
2019 flat_namespace: ::fidl_next::FromWire::from_wire(wire.flat_namespace),
2020
2021 additional_services: ::fidl_next::FromWire::from_wire(wire.additional_services),
2022 }
2023 }
2024 }
2025
2026 #[derive(Debug, PartialEq)]
2027 pub struct CreateComponentRequest {
2028 pub launch_info: crate::natural::LaunchInfo,
2029
2030 pub controller: ::core::option::Option<
2031 ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::fuchsia::zx::Channel>,
2032 >,
2033 }
2034
2035 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
2036 for CreateComponentRequest
2037 where
2038 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2039 ___E: ::fidl_next::Encoder,
2040 ___E: ::fidl_next::fuchsia::HandleEncoder,
2041 {
2042 #[inline]
2043 fn encode(
2044 self,
2045 encoder_: &mut ___E,
2046 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
2047 _: (),
2048 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2049 ::fidl_next::munge! {
2050 let crate::wire::CreateComponentRequest {
2051 launch_info,
2052 controller,
2053
2054 } = out_;
2055 }
2056
2057 ::fidl_next::Encode::encode(self.launch_info, encoder_, launch_info, ())?;
2058
2059 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(launch_info.as_mut_ptr()) };
2060
2061 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
2062
2063 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
2064
2065 Ok(())
2066 }
2067 }
2068
2069 unsafe impl<___E>
2070 ::fidl_next::EncodeOption<
2071 ::fidl_next::wire::Box<'static, crate::wire::CreateComponentRequest<'static>>,
2072 ___E,
2073 > for CreateComponentRequest
2074 where
2075 ___E: ::fidl_next::Encoder + ?Sized,
2076 CreateComponentRequest:
2077 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>,
2078 {
2079 #[inline]
2080 fn encode_option(
2081 this: ::core::option::Option<Self>,
2082 encoder: &mut ___E,
2083 out: &mut ::core::mem::MaybeUninit<
2084 ::fidl_next::wire::Box<'static, crate::wire::CreateComponentRequest<'static>>,
2085 >,
2086 _: (),
2087 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2088 if let Some(inner) = this {
2089 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2090 ::fidl_next::wire::Box::encode_present(out);
2091 } else {
2092 ::fidl_next::wire::Box::encode_absent(out);
2093 }
2094
2095 Ok(())
2096 }
2097 }
2098
2099 impl<'de> ::fidl_next::FromWire<crate::wire::CreateComponentRequest<'de>>
2100 for CreateComponentRequest
2101 {
2102 #[inline]
2103 fn from_wire(wire: crate::wire::CreateComponentRequest<'de>) -> Self {
2104 Self {
2105 launch_info: ::fidl_next::FromWire::from_wire(wire.launch_info),
2106
2107 controller: ::fidl_next::FromWire::from_wire(wire.controller),
2108 }
2109 }
2110 }
2111
2112 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2113 pub struct EmptyResourceTable {}
2114
2115 impl EmptyResourceTable {
2116 fn __max_ordinal(&self) -> usize {
2117 0
2118 }
2119 }
2120
2121 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyResourceTable<'static>, ___E>
2122 for EmptyResourceTable
2123 where
2124 ___E: ::fidl_next::Encoder + ?Sized,
2125 ___E: ::fidl_next::fuchsia::HandleEncoder,
2126 {
2127 #[inline]
2128 fn encode(
2129 mut self,
2130 encoder: &mut ___E,
2131 out: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTable<'static>>,
2132 _: (),
2133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2134 ::fidl_next::munge!(let crate::wire::EmptyResourceTable { table } = out);
2135
2136 let max_ord = self.__max_ordinal();
2137
2138 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2139 ::fidl_next::Wire::zero_padding(&mut out);
2140
2141 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2142 ::fidl_next::wire::Envelope,
2143 >(encoder, max_ord);
2144
2145 for i in 1..=max_ord {
2146 match i {
2147 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2148 }
2149 unsafe {
2150 preallocated.write_next(out.assume_init_ref());
2151 }
2152 }
2153
2154 ::fidl_next::wire::Table::encode_len(table, max_ord);
2155
2156 Ok(())
2157 }
2158 }
2159
2160 impl<'de> ::fidl_next::FromWire<crate::wire::EmptyResourceTable<'de>> for EmptyResourceTable {
2161 #[inline]
2162 fn from_wire(wire_: crate::wire::EmptyResourceTable<'de>) -> Self {
2163 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2164
2165 Self {}
2166 }
2167 }
2168
2169 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2170 pub struct EmptyResourceTableStruct {
2171 pub table: crate::natural::EmptyResourceTable,
2172 }
2173
2174 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
2175 for EmptyResourceTableStruct
2176 where
2177 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2178 ___E: ::fidl_next::Encoder,
2179 ___E: ::fidl_next::fuchsia::HandleEncoder,
2180 {
2181 #[inline]
2182 fn encode(
2183 self,
2184 encoder_: &mut ___E,
2185 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
2186 _: (),
2187 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2188 ::fidl_next::munge! {
2189 let crate::wire::EmptyResourceTableStruct {
2190 table,
2191
2192 } = out_;
2193 }
2194
2195 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
2196
2197 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
2198
2199 Ok(())
2200 }
2201 }
2202
2203 unsafe impl<___E>
2204 ::fidl_next::EncodeOption<
2205 ::fidl_next::wire::Box<'static, crate::wire::EmptyResourceTableStruct<'static>>,
2206 ___E,
2207 > for EmptyResourceTableStruct
2208 where
2209 ___E: ::fidl_next::Encoder + ?Sized,
2210 EmptyResourceTableStruct:
2211 ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>,
2212 {
2213 #[inline]
2214 fn encode_option(
2215 this: ::core::option::Option<Self>,
2216 encoder: &mut ___E,
2217 out: &mut ::core::mem::MaybeUninit<
2218 ::fidl_next::wire::Box<'static, crate::wire::EmptyResourceTableStruct<'static>>,
2219 >,
2220 _: (),
2221 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2222 if let Some(inner) = this {
2223 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2224 ::fidl_next::wire::Box::encode_present(out);
2225 } else {
2226 ::fidl_next::wire::Box::encode_absent(out);
2227 }
2228
2229 Ok(())
2230 }
2231 }
2232
2233 impl<'de> ::fidl_next::FromWire<crate::wire::EmptyResourceTableStruct<'de>>
2234 for EmptyResourceTableStruct
2235 {
2236 #[inline]
2237 fn from_wire(wire: crate::wire::EmptyResourceTableStruct<'de>) -> Self {
2238 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
2239 }
2240 }
2241
2242 #[derive(Debug, PartialEq)]
2243 pub enum EnvelopeInliningTestUnion {
2244 Small(u32),
2245
2246 Large(u64),
2247
2248 Handle(::fidl_next::fuchsia::zx::NullableHandle),
2249
2250 UnknownOrdinal_(u64),
2251 }
2252
2253 impl EnvelopeInliningTestUnion {
2254 pub fn is_unknown(&self) -> bool {
2255 #[allow(unreachable_patterns)]
2256 match self {
2257 Self::UnknownOrdinal_(_) => true,
2258 _ => false,
2259 }
2260 }
2261 }
2262
2263 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>
2264 for EnvelopeInliningTestUnion
2265 where
2266 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2267 ___E: ::fidl_next::Encoder,
2268 ___E: ::fidl_next::fuchsia::HandleEncoder,
2269 {
2270 #[inline]
2271 fn encode(
2272 self,
2273 encoder: &mut ___E,
2274 out: &mut ::core::mem::MaybeUninit<crate::wire::EnvelopeInliningTestUnion<'static>>,
2275 _: (),
2276 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2277 ::fidl_next::munge!(let crate::wire::EnvelopeInliningTestUnion { raw, _phantom: _ } = out);
2278
2279 match self {
2280 Self::Small(value) => ::fidl_next::wire::Union::encode_as::<
2281 ___E,
2282 ::fidl_next::wire::Uint32,
2283 >(value, 1, encoder, raw, ())?,
2284
2285 Self::Large(value) => ::fidl_next::wire::Union::encode_as::<
2286 ___E,
2287 ::fidl_next::wire::Uint64,
2288 >(value, 2, encoder, raw, ())?,
2289
2290 Self::Handle(value) => ::fidl_next::wire::Union::encode_as::<
2291 ___E,
2292 ::fidl_next::wire::fuchsia::NullableHandle,
2293 >(value, 3, encoder, raw, ())?,
2294
2295 Self::UnknownOrdinal_(ordinal) => {
2296 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
2297 }
2298 }
2299
2300 Ok(())
2301 }
2302 }
2303
2304 unsafe impl<___E>
2305 ::fidl_next::EncodeOption<crate::wire_optional::EnvelopeInliningTestUnion<'static>, ___E>
2306 for EnvelopeInliningTestUnion
2307 where
2308 ___E: ?Sized,
2309 EnvelopeInliningTestUnion:
2310 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
2311 {
2312 #[inline]
2313 fn encode_option(
2314 this: ::core::option::Option<Self>,
2315 encoder: &mut ___E,
2316 out: &mut ::core::mem::MaybeUninit<
2317 crate::wire_optional::EnvelopeInliningTestUnion<'static>,
2318 >,
2319 _: (),
2320 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2321 ::fidl_next::munge!(let crate::wire_optional::EnvelopeInliningTestUnion { raw, _phantom: _ } = &mut *out);
2322
2323 if let Some(inner) = this {
2324 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2325 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2326 } else {
2327 ::fidl_next::wire::Union::encode_absent(raw);
2328 }
2329
2330 Ok(())
2331 }
2332 }
2333
2334 impl<'de> ::fidl_next::FromWire<crate::wire::EnvelopeInliningTestUnion<'de>>
2335 for EnvelopeInliningTestUnion
2336 {
2337 #[inline]
2338 fn from_wire(wire: crate::wire::EnvelopeInliningTestUnion<'de>) -> Self {
2339 let wire = ::core::mem::ManuallyDrop::new(wire);
2340 match wire.raw.ordinal() {
2341 1 => Self::Small(::fidl_next::FromWire::from_wire(unsafe {
2342 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
2343 })),
2344
2345 2 => Self::Large(::fidl_next::FromWire::from_wire(unsafe {
2346 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint64>()
2347 })),
2348
2349 3 => Self::Handle(::fidl_next::FromWire::from_wire(unsafe {
2350 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
2351 })),
2352
2353 ord => return Self::UnknownOrdinal_(ord as u64),
2354 }
2355 }
2356 }
2357
2358 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EnvelopeInliningTestUnion<'de>>
2359 for EnvelopeInliningTestUnion
2360 {
2361 #[inline]
2362 fn from_wire_option(
2363 wire: crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2364 ) -> ::core::option::Option<Self> {
2365 if let Some(inner) = wire.into_option() {
2366 Some(::fidl_next::FromWire::from_wire(inner))
2367 } else {
2368 None
2369 }
2370 }
2371 }
2372
2373 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EnvelopeInliningTestUnion<'de>>
2374 for Box<EnvelopeInliningTestUnion>
2375 {
2376 #[inline]
2377 fn from_wire_option(
2378 wire: crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2379 ) -> ::core::option::Option<Self> {
2380 <EnvelopeInliningTestUnion as ::fidl_next::FromWireOption<
2381 crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2382 >>::from_wire_option(wire)
2383 .map(Box::new)
2384 }
2385 }
2386
2387 #[derive(Debug, PartialEq)]
2388 pub struct EnvelopeInliningTestUnionStruct {
2389 pub u: crate::natural::EnvelopeInliningTestUnion,
2390 }
2391
2392 unsafe impl<___E>
2393 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
2394 for EnvelopeInliningTestUnionStruct
2395 where
2396 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2397 ___E: ::fidl_next::Encoder,
2398 ___E: ::fidl_next::fuchsia::HandleEncoder,
2399 {
2400 #[inline]
2401 fn encode(
2402 self,
2403 encoder_: &mut ___E,
2404 out_: &mut ::core::mem::MaybeUninit<
2405 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
2406 >,
2407 _: (),
2408 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2409 ::fidl_next::munge! {
2410 let crate::wire::EnvelopeInliningTestUnionStruct {
2411 u,
2412
2413 } = out_;
2414 }
2415
2416 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
2417
2418 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
2419
2420 Ok(())
2421 }
2422 }
2423
2424 unsafe impl<___E>
2425 ::fidl_next::EncodeOption<
2426 ::fidl_next::wire::Box<'static, crate::wire::EnvelopeInliningTestUnionStruct<'static>>,
2427 ___E,
2428 > for EnvelopeInliningTestUnionStruct
2429 where
2430 ___E: ::fidl_next::Encoder + ?Sized,
2431 EnvelopeInliningTestUnionStruct:
2432 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>,
2433 {
2434 #[inline]
2435 fn encode_option(
2436 this: ::core::option::Option<Self>,
2437 encoder: &mut ___E,
2438 out: &mut ::core::mem::MaybeUninit<
2439 ::fidl_next::wire::Box<
2440 'static,
2441 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
2442 >,
2443 >,
2444 _: (),
2445 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2446 if let Some(inner) = this {
2447 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2448 ::fidl_next::wire::Box::encode_present(out);
2449 } else {
2450 ::fidl_next::wire::Box::encode_absent(out);
2451 }
2452
2453 Ok(())
2454 }
2455 }
2456
2457 impl<'de> ::fidl_next::FromWire<crate::wire::EnvelopeInliningTestUnionStruct<'de>>
2458 for EnvelopeInliningTestUnionStruct
2459 {
2460 #[inline]
2461 fn from_wire(wire: crate::wire::EnvelopeInliningTestUnionStruct<'de>) -> Self {
2462 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
2463 }
2464 }
2465
2466 #[derive(Debug, PartialEq)]
2467 #[repr(C)]
2468 pub struct EventWithDefaultRights {
2469 pub h: ::fidl_next::fuchsia::zx::Event,
2470 }
2471
2472 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
2473 for EventWithDefaultRights
2474 where
2475 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2476 ___E: ::fidl_next::fuchsia::HandleEncoder,
2477 {
2478 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2479 Self,
2480 crate::wire::EventWithDefaultRights,
2481 > = unsafe {
2482 ::fidl_next::CopyOptimization::enable_if(
2483 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
2484 ::fidl_next::wire::fuchsia::Event,
2485 ___E,
2486 >>::COPY_OPTIMIZATION
2487 .is_enabled(),
2488 )
2489 };
2490
2491 #[inline]
2492 fn encode(
2493 self,
2494 encoder_: &mut ___E,
2495 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
2496 _: (),
2497 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2498 ::fidl_next::munge! {
2499 let crate::wire::EventWithDefaultRights {
2500 h,
2501
2502 } = out_;
2503 }
2504
2505 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
2506
2507 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
2508
2509 Ok(())
2510 }
2511 }
2512
2513 unsafe impl<___E>
2514 ::fidl_next::EncodeOption<
2515 ::fidl_next::wire::Box<'static, crate::wire::EventWithDefaultRights>,
2516 ___E,
2517 > for EventWithDefaultRights
2518 where
2519 ___E: ::fidl_next::Encoder + ?Sized,
2520 EventWithDefaultRights: ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>,
2521 {
2522 #[inline]
2523 fn encode_option(
2524 this: ::core::option::Option<Self>,
2525 encoder: &mut ___E,
2526 out: &mut ::core::mem::MaybeUninit<
2527 ::fidl_next::wire::Box<'static, crate::wire::EventWithDefaultRights>,
2528 >,
2529 _: (),
2530 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2531 if let Some(inner) = this {
2532 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2533 ::fidl_next::wire::Box::encode_present(out);
2534 } else {
2535 ::fidl_next::wire::Box::encode_absent(out);
2536 }
2537
2538 Ok(())
2539 }
2540 }
2541
2542 impl ::fidl_next::FromWire<crate::wire::EventWithDefaultRights> for EventWithDefaultRights {
2543 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2544 crate::wire::EventWithDefaultRights,
2545 Self,
2546 > = unsafe {
2547 ::fidl_next::CopyOptimization::enable_if(
2548 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
2549 ::fidl_next::wire::fuchsia::Event,
2550 >>::COPY_OPTIMIZATION
2551 .is_enabled(),
2552 )
2553 };
2554
2555 #[inline]
2556 fn from_wire(wire: crate::wire::EventWithDefaultRights) -> Self {
2557 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
2558 }
2559 }
2560
2561 #[derive(Debug, PartialEq)]
2562 #[repr(C)]
2563 pub struct EventWithReducedRights {
2564 pub h: ::fidl_next::fuchsia::zx::Event,
2565 }
2566
2567 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
2568 for EventWithReducedRights
2569 where
2570 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2571 ___E: ::fidl_next::fuchsia::HandleEncoder,
2572 {
2573 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2574 Self,
2575 crate::wire::EventWithReducedRights,
2576 > = unsafe {
2577 ::fidl_next::CopyOptimization::enable_if(
2578 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
2579 ::fidl_next::wire::fuchsia::Event,
2580 ___E,
2581 >>::COPY_OPTIMIZATION
2582 .is_enabled(),
2583 )
2584 };
2585
2586 #[inline]
2587 fn encode(
2588 self,
2589 encoder_: &mut ___E,
2590 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
2591 _: (),
2592 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2593 ::fidl_next::munge! {
2594 let crate::wire::EventWithReducedRights {
2595 h,
2596
2597 } = out_;
2598 }
2599
2600 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
2601
2602 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
2603
2604 Ok(())
2605 }
2606 }
2607
2608 unsafe impl<___E>
2609 ::fidl_next::EncodeOption<
2610 ::fidl_next::wire::Box<'static, crate::wire::EventWithReducedRights>,
2611 ___E,
2612 > for EventWithReducedRights
2613 where
2614 ___E: ::fidl_next::Encoder + ?Sized,
2615 EventWithReducedRights: ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>,
2616 {
2617 #[inline]
2618 fn encode_option(
2619 this: ::core::option::Option<Self>,
2620 encoder: &mut ___E,
2621 out: &mut ::core::mem::MaybeUninit<
2622 ::fidl_next::wire::Box<'static, crate::wire::EventWithReducedRights>,
2623 >,
2624 _: (),
2625 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2626 if let Some(inner) = this {
2627 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2628 ::fidl_next::wire::Box::encode_present(out);
2629 } else {
2630 ::fidl_next::wire::Box::encode_absent(out);
2631 }
2632
2633 Ok(())
2634 }
2635 }
2636
2637 impl ::fidl_next::FromWire<crate::wire::EventWithReducedRights> for EventWithReducedRights {
2638 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2639 crate::wire::EventWithReducedRights,
2640 Self,
2641 > = unsafe {
2642 ::fidl_next::CopyOptimization::enable_if(
2643 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
2644 ::fidl_next::wire::fuchsia::Event,
2645 >>::COPY_OPTIMIZATION
2646 .is_enabled(),
2647 )
2648 };
2649
2650 #[inline]
2651 fn from_wire(wire: crate::wire::EventWithReducedRights) -> Self {
2652 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
2653 }
2654 }
2655
2656 #[derive(Debug, PartialEq)]
2657 pub struct FidlvizDemo {
2658 pub f1: u8,
2659
2660 pub f2: i8,
2661
2662 pub f3: u16,
2663
2664 pub f4: u32,
2665
2666 pub f5: u64,
2667
2668 pub f6: u8,
2669
2670 pub f7: u8,
2671
2672 pub f8: u16,
2673
2674 pub f9: f32,
2675
2676 pub f10: f64,
2677
2678 pub f11: bool,
2679
2680 pub f12: bool,
2681
2682 pub f13: ::std::string::String,
2683
2684 pub f14: ::core::option::Option<::std::string::String>,
2685
2686 pub f15: ::std::string::String,
2687
2688 pub f16: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
2689
2690 pub f17: ::fidl_next::fuchsia::zx::NullableHandle,
2691
2692 pub f18: [u8; 3],
2693
2694 pub f19: ::std::vec::Vec<f64>,
2695
2696 pub f20: ::core::option::Option<::std::vec::Vec<u8>>,
2697
2698 pub f21: ::std::vec::Vec<u8>,
2699
2700 pub f22: crate::natural::FidlvizBits,
2701
2702 pub f23: crate::natural::FidlvizEnum,
2703
2704 pub f24: crate::natural::FidlvizStruct1,
2705
2706 pub f25: crate::natural::FidlvizStruct2,
2707
2708 pub f26: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizStruct1>>,
2709
2710 pub f27: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizStruct2>>,
2711
2712 pub f28: crate::natural::FidlvizTable,
2713
2714 pub f29: crate::natural::FidlvizTable,
2715
2716 pub f30: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizUnion>>,
2717
2718 pub f31: crate::natural::FidlvizUnion,
2719 }
2720
2721 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E> for FidlvizDemo
2722 where
2723 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2724 ___E: ::fidl_next::Encoder,
2725 ___E: ::fidl_next::fuchsia::HandleEncoder,
2726 {
2727 #[inline]
2728 fn encode(
2729 self,
2730 encoder_: &mut ___E,
2731 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
2732 _: (),
2733 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2734 ::fidl_next::munge! {
2735 let crate::wire::FidlvizDemo {
2736 f1,
2737 f2,
2738 f3,
2739 f4,
2740 f5,
2741 f6,
2742 f7,
2743 f8,
2744 f9,
2745 f10,
2746 f11,
2747 f12,
2748 f13,
2749 f14,
2750 f15,
2751 f16,
2752 f17,
2753 f18,
2754 f19,
2755 f20,
2756 f21,
2757 f22,
2758 f23,
2759 f24,
2760 f25,
2761 f26,
2762 f27,
2763 f28,
2764 f29,
2765 f30,
2766 f31,
2767
2768 } = out_;
2769 }
2770
2771 ::fidl_next::Encode::encode(self.f1, encoder_, f1, ())?;
2772
2773 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f1.as_mut_ptr()) };
2774
2775 ::fidl_next::Encode::encode(self.f2, encoder_, f2, ())?;
2776
2777 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f2.as_mut_ptr()) };
2778
2779 ::fidl_next::Encode::encode(self.f3, encoder_, f3, ())?;
2780
2781 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f3.as_mut_ptr()) };
2782
2783 ::fidl_next::Encode::encode(self.f4, encoder_, f4, ())?;
2784
2785 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f4.as_mut_ptr()) };
2786
2787 ::fidl_next::Encode::encode(self.f5, encoder_, f5, ())?;
2788
2789 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f5.as_mut_ptr()) };
2790
2791 ::fidl_next::Encode::encode(self.f6, encoder_, f6, ())?;
2792
2793 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f6.as_mut_ptr()) };
2794
2795 ::fidl_next::Encode::encode(self.f7, encoder_, f7, ())?;
2796
2797 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f7.as_mut_ptr()) };
2798
2799 ::fidl_next::Encode::encode(self.f8, encoder_, f8, ())?;
2800
2801 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f8.as_mut_ptr()) };
2802
2803 ::fidl_next::Encode::encode(self.f9, encoder_, f9, ())?;
2804
2805 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f9.as_mut_ptr()) };
2806
2807 ::fidl_next::Encode::encode(self.f10, encoder_, f10, ())?;
2808
2809 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f10.as_mut_ptr()) };
2810
2811 ::fidl_next::Encode::encode(self.f11, encoder_, f11, ())?;
2812
2813 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f11.as_mut_ptr()) };
2814
2815 ::fidl_next::Encode::encode(self.f12, encoder_, f12, ())?;
2816
2817 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f12.as_mut_ptr()) };
2818
2819 ::fidl_next::Encode::encode(self.f13, encoder_, f13, 4294967295)?;
2820
2821 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f13.as_mut_ptr()) };
2822 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2823
2824 ::fidl_next::Encode::encode(self.f14, encoder_, f14, 4294967295)?;
2825
2826 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f14.as_mut_ptr()) };
2827 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2828
2829 ::fidl_next::Encode::encode(self.f15, encoder_, f15, 4294967295)?;
2830
2831 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f15.as_mut_ptr()) };
2832 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2833
2834 ::fidl_next::Encode::encode(self.f16, encoder_, f16, ())?;
2835
2836 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f16.as_mut_ptr()) };
2837
2838 ::fidl_next::Encode::encode(self.f17, encoder_, f17, ())?;
2839
2840 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f17.as_mut_ptr()) };
2841
2842 ::fidl_next::Encode::encode(self.f18, encoder_, f18, ())?;
2843
2844 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f18.as_mut_ptr()) };
2845
2846 ::fidl_next::Encode::encode(self.f19, encoder_, f19, (4294967295, ()))?;
2847
2848 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f19.as_mut_ptr()) };
2849 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2850
2851 ::fidl_next::Encode::encode(self.f20, encoder_, f20, (4294967295, ()))?;
2852
2853 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f20.as_mut_ptr()) };
2854 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2855
2856 ::fidl_next::Encode::encode(self.f21, encoder_, f21, (4294967295, ()))?;
2857
2858 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f21.as_mut_ptr()) };
2859 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2860
2861 ::fidl_next::Encode::encode(self.f22, encoder_, f22, ())?;
2862
2863 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f22.as_mut_ptr()) };
2864
2865 ::fidl_next::Encode::encode(self.f23, encoder_, f23, ())?;
2866
2867 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f23.as_mut_ptr()) };
2868
2869 ::fidl_next::Encode::encode(self.f24, encoder_, f24, ())?;
2870
2871 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f24.as_mut_ptr()) };
2872
2873 ::fidl_next::Encode::encode(self.f25, encoder_, f25, ())?;
2874
2875 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f25.as_mut_ptr()) };
2876
2877 ::fidl_next::Encode::encode(self.f26, encoder_, f26, ())?;
2878
2879 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f26.as_mut_ptr()) };
2880
2881 ::fidl_next::Encode::encode(self.f27, encoder_, f27, ())?;
2882
2883 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f27.as_mut_ptr()) };
2884
2885 ::fidl_next::Encode::encode(self.f28, encoder_, f28, ())?;
2886
2887 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f28.as_mut_ptr()) };
2888
2889 ::fidl_next::Encode::encode(self.f29, encoder_, f29, ())?;
2890
2891 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f29.as_mut_ptr()) };
2892
2893 ::fidl_next::Encode::encode(self.f30, encoder_, f30, ())?;
2894
2895 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f30.as_mut_ptr()) };
2896
2897 ::fidl_next::Encode::encode(self.f31, encoder_, f31, ())?;
2898
2899 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f31.as_mut_ptr()) };
2900
2901 Ok(())
2902 }
2903 }
2904
2905 unsafe impl<___E>
2906 ::fidl_next::EncodeOption<
2907 ::fidl_next::wire::Box<'static, crate::wire::FidlvizDemo<'static>>,
2908 ___E,
2909 > for FidlvizDemo
2910 where
2911 ___E: ::fidl_next::Encoder + ?Sized,
2912 FidlvizDemo: ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>,
2913 {
2914 #[inline]
2915 fn encode_option(
2916 this: ::core::option::Option<Self>,
2917 encoder: &mut ___E,
2918 out: &mut ::core::mem::MaybeUninit<
2919 ::fidl_next::wire::Box<'static, crate::wire::FidlvizDemo<'static>>,
2920 >,
2921 _: (),
2922 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2923 if let Some(inner) = this {
2924 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2925 ::fidl_next::wire::Box::encode_present(out);
2926 } else {
2927 ::fidl_next::wire::Box::encode_absent(out);
2928 }
2929
2930 Ok(())
2931 }
2932 }
2933
2934 impl<'de> ::fidl_next::FromWire<crate::wire::FidlvizDemo<'de>> for FidlvizDemo {
2935 #[inline]
2936 fn from_wire(wire: crate::wire::FidlvizDemo<'de>) -> Self {
2937 Self {
2938 f1: ::fidl_next::FromWire::from_wire(wire.f1),
2939
2940 f2: ::fidl_next::FromWire::from_wire(wire.f2),
2941
2942 f3: ::fidl_next::FromWire::from_wire(wire.f3),
2943
2944 f4: ::fidl_next::FromWire::from_wire(wire.f4),
2945
2946 f5: ::fidl_next::FromWire::from_wire(wire.f5),
2947
2948 f6: ::fidl_next::FromWire::from_wire(wire.f6),
2949
2950 f7: ::fidl_next::FromWire::from_wire(wire.f7),
2951
2952 f8: ::fidl_next::FromWire::from_wire(wire.f8),
2953
2954 f9: ::fidl_next::FromWire::from_wire(wire.f9),
2955
2956 f10: ::fidl_next::FromWire::from_wire(wire.f10),
2957
2958 f11: ::fidl_next::FromWire::from_wire(wire.f11),
2959
2960 f12: ::fidl_next::FromWire::from_wire(wire.f12),
2961
2962 f13: ::fidl_next::FromWire::from_wire(wire.f13),
2963
2964 f14: ::fidl_next::FromWire::from_wire(wire.f14),
2965
2966 f15: ::fidl_next::FromWire::from_wire(wire.f15),
2967
2968 f16: ::fidl_next::FromWire::from_wire(wire.f16),
2969
2970 f17: ::fidl_next::FromWire::from_wire(wire.f17),
2971
2972 f18: ::fidl_next::FromWire::from_wire(wire.f18),
2973
2974 f19: ::fidl_next::FromWire::from_wire(wire.f19),
2975
2976 f20: ::fidl_next::FromWire::from_wire(wire.f20),
2977
2978 f21: ::fidl_next::FromWire::from_wire(wire.f21),
2979
2980 f22: ::fidl_next::FromWire::from_wire(wire.f22),
2981
2982 f23: ::fidl_next::FromWire::from_wire(wire.f23),
2983
2984 f24: ::fidl_next::FromWire::from_wire(wire.f24),
2985
2986 f25: ::fidl_next::FromWire::from_wire(wire.f25),
2987
2988 f26: ::fidl_next::FromWire::from_wire(wire.f26),
2989
2990 f27: ::fidl_next::FromWire::from_wire(wire.f27),
2991
2992 f28: ::fidl_next::FromWire::from_wire(wire.f28),
2993
2994 f29: ::fidl_next::FromWire::from_wire(wire.f29),
2995
2996 f30: ::fidl_next::FromWire::from_wire(wire.f30),
2997
2998 f31: ::fidl_next::FromWire::from_wire(wire.f31),
2999 }
3000 }
3001 }
3002
3003 #[derive(Debug, PartialEq)]
3004 #[repr(C)]
3005 pub struct GoldenHandleBasicRightsStruct {
3006 pub v: ::fidl_next::fuchsia::zx::Event,
3007 }
3008
3009 unsafe impl<___E> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
3010 for GoldenHandleBasicRightsStruct
3011 where
3012 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3013 ___E: ::fidl_next::fuchsia::HandleEncoder,
3014 {
3015 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3016 Self,
3017 crate::wire::GoldenHandleBasicRightsStruct,
3018 > = unsafe {
3019 ::fidl_next::CopyOptimization::enable_if(
3020 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
3021 ::fidl_next::wire::fuchsia::Event,
3022 ___E,
3023 >>::COPY_OPTIMIZATION
3024 .is_enabled(),
3025 )
3026 };
3027
3028 #[inline]
3029 fn encode(
3030 self,
3031 encoder_: &mut ___E,
3032 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
3033 _: (),
3034 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3035 ::fidl_next::munge! {
3036 let crate::wire::GoldenHandleBasicRightsStruct {
3037 v,
3038
3039 } = out_;
3040 }
3041
3042 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
3043
3044 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
3045
3046 Ok(())
3047 }
3048 }
3049
3050 unsafe impl<___E>
3051 ::fidl_next::EncodeOption<
3052 ::fidl_next::wire::Box<'static, crate::wire::GoldenHandleBasicRightsStruct>,
3053 ___E,
3054 > for GoldenHandleBasicRightsStruct
3055 where
3056 ___E: ::fidl_next::Encoder + ?Sized,
3057 GoldenHandleBasicRightsStruct:
3058 ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>,
3059 {
3060 #[inline]
3061 fn encode_option(
3062 this: ::core::option::Option<Self>,
3063 encoder: &mut ___E,
3064 out: &mut ::core::mem::MaybeUninit<
3065 ::fidl_next::wire::Box<'static, crate::wire::GoldenHandleBasicRightsStruct>,
3066 >,
3067 _: (),
3068 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3069 if let Some(inner) = this {
3070 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3071 ::fidl_next::wire::Box::encode_present(out);
3072 } else {
3073 ::fidl_next::wire::Box::encode_absent(out);
3074 }
3075
3076 Ok(())
3077 }
3078 }
3079
3080 impl ::fidl_next::FromWire<crate::wire::GoldenHandleBasicRightsStruct>
3081 for GoldenHandleBasicRightsStruct
3082 {
3083 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3084 crate::wire::GoldenHandleBasicRightsStruct,
3085 Self,
3086 > = unsafe {
3087 ::fidl_next::CopyOptimization::enable_if(
3088 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3089 ::fidl_next::wire::fuchsia::Event,
3090 >>::COPY_OPTIMIZATION
3091 .is_enabled(),
3092 )
3093 };
3094
3095 #[inline]
3096 fn from_wire(wire: crate::wire::GoldenHandleBasicRightsStruct) -> Self {
3097 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
3098 }
3099 }
3100
3101 #[derive(Debug, PartialEq)]
3102 #[repr(C)]
3103 pub struct GoldenNullableHandleStruct {
3104 pub v: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
3105 }
3106
3107 unsafe impl<___E> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
3108 for GoldenNullableHandleStruct
3109 where
3110 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3111 ___E: ::fidl_next::fuchsia::HandleEncoder,
3112 {
3113 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3114 Self,
3115 crate::wire::GoldenNullableHandleStruct,
3116 > = unsafe {
3117 ::fidl_next::CopyOptimization::enable_if(
3118 true
3119
3120 && <
3121 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
3122 >::COPY_OPTIMIZATION.is_enabled()
3123
3124 )
3125 };
3126
3127 #[inline]
3128 fn encode(
3129 self,
3130 encoder_: &mut ___E,
3131 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
3132 _: (),
3133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3134 ::fidl_next::munge! {
3135 let crate::wire::GoldenNullableHandleStruct {
3136 v,
3137
3138 } = out_;
3139 }
3140
3141 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
3142
3143 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
3144
3145 Ok(())
3146 }
3147 }
3148
3149 unsafe impl<___E>
3150 ::fidl_next::EncodeOption<
3151 ::fidl_next::wire::Box<'static, crate::wire::GoldenNullableHandleStruct>,
3152 ___E,
3153 > for GoldenNullableHandleStruct
3154 where
3155 ___E: ::fidl_next::Encoder + ?Sized,
3156 GoldenNullableHandleStruct:
3157 ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>,
3158 {
3159 #[inline]
3160 fn encode_option(
3161 this: ::core::option::Option<Self>,
3162 encoder: &mut ___E,
3163 out: &mut ::core::mem::MaybeUninit<
3164 ::fidl_next::wire::Box<'static, crate::wire::GoldenNullableHandleStruct>,
3165 >,
3166 _: (),
3167 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3168 if let Some(inner) = this {
3169 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3170 ::fidl_next::wire::Box::encode_present(out);
3171 } else {
3172 ::fidl_next::wire::Box::encode_absent(out);
3173 }
3174
3175 Ok(())
3176 }
3177 }
3178
3179 impl ::fidl_next::FromWire<crate::wire::GoldenNullableHandleStruct> for GoldenNullableHandleStruct {
3180 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3181 crate::wire::GoldenNullableHandleStruct,
3182 Self,
3183 > = unsafe {
3184 ::fidl_next::CopyOptimization::enable_if(
3185 true
3186
3187 && <
3188 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
3189 >::COPY_OPTIMIZATION.is_enabled()
3190
3191 )
3192 };
3193
3194 #[inline]
3195 fn from_wire(wire: crate::wire::GoldenNullableHandleStruct) -> Self {
3196 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
3197 }
3198 }
3199
3200 #[derive(Debug, PartialEq)]
3201 pub struct MultipleBoundedNonnullableVectorsOfHandles {
3202 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
3203
3204 pub vh1: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
3205 }
3206
3207 unsafe impl<___E>
3208 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
3209 for MultipleBoundedNonnullableVectorsOfHandles
3210 where
3211 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3212 ___E: ::fidl_next::Encoder,
3213 ___E: ::fidl_next::fuchsia::HandleEncoder,
3214 {
3215 #[inline]
3216 fn encode(
3217 self,
3218 encoder_: &mut ___E,
3219 out_: &mut ::core::mem::MaybeUninit<
3220 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3221 >,
3222 _: (),
3223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3224 ::fidl_next::munge! {
3225 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
3226 vh0,
3227 vh1,
3228
3229 } = out_;
3230 }
3231
3232 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
3233
3234 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
3235 ::fidl_next::Constrained::validate(_field, (2, ()))?;
3236
3237 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
3238
3239 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh1.as_mut_ptr()) };
3240 ::fidl_next::Constrained::validate(_field, (32, ()))?;
3241
3242 Ok(())
3243 }
3244 }
3245
3246 unsafe impl<___E>
3247 ::fidl_next::EncodeOption<
3248 ::fidl_next::wire::Box<
3249 'static,
3250 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3251 >,
3252 ___E,
3253 > for MultipleBoundedNonnullableVectorsOfHandles
3254 where
3255 ___E: ::fidl_next::Encoder + ?Sized,
3256 MultipleBoundedNonnullableVectorsOfHandles: ::fidl_next::Encode<
3257 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3258 ___E,
3259 >,
3260 {
3261 #[inline]
3262 fn encode_option(
3263 this: ::core::option::Option<Self>,
3264 encoder: &mut ___E,
3265 out: &mut ::core::mem::MaybeUninit<
3266 ::fidl_next::wire::Box<
3267 'static,
3268 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3269 >,
3270 >,
3271 _: (),
3272 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3273 if let Some(inner) = this {
3274 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3275 ::fidl_next::wire::Box::encode_present(out);
3276 } else {
3277 ::fidl_next::wire::Box::encode_absent(out);
3278 }
3279
3280 Ok(())
3281 }
3282 }
3283
3284 impl<'de> ::fidl_next::FromWire<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'de>>
3285 for MultipleBoundedNonnullableVectorsOfHandles
3286 {
3287 #[inline]
3288 fn from_wire(wire: crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'de>) -> Self {
3289 Self {
3290 vh0: ::fidl_next::FromWire::from_wire(wire.vh0),
3291
3292 vh1: ::fidl_next::FromWire::from_wire(wire.vh1),
3293 }
3294 }
3295 }
3296
3297 #[derive(Debug, PartialEq)]
3298 pub struct MultipleBoundedNullableVectorsOfHandles {
3299 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
3300
3301 pub vh1: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
3302 }
3303
3304 unsafe impl<___E>
3305 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
3306 for MultipleBoundedNullableVectorsOfHandles
3307 where
3308 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3309 ___E: ::fidl_next::Encoder,
3310 ___E: ::fidl_next::fuchsia::HandleEncoder,
3311 {
3312 #[inline]
3313 fn encode(
3314 self,
3315 encoder_: &mut ___E,
3316 out_: &mut ::core::mem::MaybeUninit<
3317 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3318 >,
3319 _: (),
3320 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3321 ::fidl_next::munge! {
3322 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
3323 vh0,
3324 vh1,
3325
3326 } = out_;
3327 }
3328
3329 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
3330
3331 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
3332 ::fidl_next::Constrained::validate(_field, (2, ()))?;
3333
3334 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
3335
3336 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh1.as_mut_ptr()) };
3337 ::fidl_next::Constrained::validate(_field, (32, ()))?;
3338
3339 Ok(())
3340 }
3341 }
3342
3343 unsafe impl<___E>
3344 ::fidl_next::EncodeOption<
3345 ::fidl_next::wire::Box<
3346 'static,
3347 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3348 >,
3349 ___E,
3350 > for MultipleBoundedNullableVectorsOfHandles
3351 where
3352 ___E: ::fidl_next::Encoder + ?Sized,
3353 MultipleBoundedNullableVectorsOfHandles: ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>,
3354 {
3355 #[inline]
3356 fn encode_option(
3357 this: ::core::option::Option<Self>,
3358 encoder: &mut ___E,
3359 out: &mut ::core::mem::MaybeUninit<
3360 ::fidl_next::wire::Box<
3361 'static,
3362 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3363 >,
3364 >,
3365 _: (),
3366 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3367 if let Some(inner) = this {
3368 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3369 ::fidl_next::wire::Box::encode_present(out);
3370 } else {
3371 ::fidl_next::wire::Box::encode_absent(out);
3372 }
3373
3374 Ok(())
3375 }
3376 }
3377
3378 impl<'de> ::fidl_next::FromWire<crate::wire::MultipleBoundedNullableVectorsOfHandles<'de>>
3379 for MultipleBoundedNullableVectorsOfHandles
3380 {
3381 #[inline]
3382 fn from_wire(wire: crate::wire::MultipleBoundedNullableVectorsOfHandles<'de>) -> Self {
3383 Self {
3384 vh0: ::fidl_next::FromWire::from_wire(wire.vh0),
3385
3386 vh1: ::fidl_next::FromWire::from_wire(wire.vh1),
3387 }
3388 }
3389 }
3390
3391 #[derive(Debug, PartialEq)]
3392 #[repr(C)]
3393 pub struct MultipleHandleSubtypes {
3394 pub untyped: ::fidl_next::fuchsia::zx::NullableHandle,
3395
3396 pub event: ::fidl_next::fuchsia::zx::Event,
3397
3398 pub channel: ::fidl_next::fuchsia::zx::Channel,
3399 }
3400
3401 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
3402 for MultipleHandleSubtypes
3403 where
3404 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3405 ___E: ::fidl_next::fuchsia::HandleEncoder,
3406 {
3407 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3408 Self,
3409 crate::wire::MultipleHandleSubtypes,
3410 > = unsafe {
3411 ::fidl_next::CopyOptimization::enable_if(
3412 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
3413 ::fidl_next::wire::fuchsia::NullableHandle,
3414 ___E,
3415 >>::COPY_OPTIMIZATION
3416 .is_enabled()
3417 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
3418 ::fidl_next::wire::fuchsia::Event,
3419 ___E,
3420 >>::COPY_OPTIMIZATION
3421 .is_enabled()
3422 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<
3423 ::fidl_next::wire::fuchsia::Channel,
3424 ___E,
3425 >>::COPY_OPTIMIZATION
3426 .is_enabled(),
3427 )
3428 };
3429
3430 #[inline]
3431 fn encode(
3432 self,
3433 encoder_: &mut ___E,
3434 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
3435 _: (),
3436 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3437 ::fidl_next::munge! {
3438 let crate::wire::MultipleHandleSubtypes {
3439 untyped,
3440 event,
3441 channel,
3442
3443 } = out_;
3444 }
3445
3446 ::fidl_next::Encode::encode(self.untyped, encoder_, untyped, ())?;
3447
3448 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(untyped.as_mut_ptr()) };
3449
3450 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
3451
3452 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
3453
3454 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
3455
3456 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(channel.as_mut_ptr()) };
3457
3458 Ok(())
3459 }
3460 }
3461
3462 unsafe impl<___E>
3463 ::fidl_next::EncodeOption<
3464 ::fidl_next::wire::Box<'static, crate::wire::MultipleHandleSubtypes>,
3465 ___E,
3466 > for MultipleHandleSubtypes
3467 where
3468 ___E: ::fidl_next::Encoder + ?Sized,
3469 MultipleHandleSubtypes: ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>,
3470 {
3471 #[inline]
3472 fn encode_option(
3473 this: ::core::option::Option<Self>,
3474 encoder: &mut ___E,
3475 out: &mut ::core::mem::MaybeUninit<
3476 ::fidl_next::wire::Box<'static, crate::wire::MultipleHandleSubtypes>,
3477 >,
3478 _: (),
3479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3480 if let Some(inner) = this {
3481 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3482 ::fidl_next::wire::Box::encode_present(out);
3483 } else {
3484 ::fidl_next::wire::Box::encode_absent(out);
3485 }
3486
3487 Ok(())
3488 }
3489 }
3490
3491 impl ::fidl_next::FromWire<crate::wire::MultipleHandleSubtypes> for MultipleHandleSubtypes {
3492 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3493 crate::wire::MultipleHandleSubtypes,
3494 Self,
3495 > = unsafe {
3496 ::fidl_next::CopyOptimization::enable_if(
3497 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3498 ::fidl_next::wire::fuchsia::NullableHandle,
3499 >>::COPY_OPTIMIZATION
3500 .is_enabled()
3501 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3502 ::fidl_next::wire::fuchsia::Event,
3503 >>::COPY_OPTIMIZATION
3504 .is_enabled()
3505 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
3506 ::fidl_next::wire::fuchsia::Channel,
3507 >>::COPY_OPTIMIZATION
3508 .is_enabled(),
3509 )
3510 };
3511
3512 #[inline]
3513 fn from_wire(wire: crate::wire::MultipleHandleSubtypes) -> Self {
3514 Self {
3515 untyped: ::fidl_next::FromWire::from_wire(wire.untyped),
3516
3517 event: ::fidl_next::FromWire::from_wire(wire.event),
3518
3519 channel: ::fidl_next::FromWire::from_wire(wire.channel),
3520 }
3521 }
3522 }
3523
3524 #[derive(Debug, PartialEq)]
3525 #[repr(C)]
3526 pub struct MultipleNonnullableHandles {
3527 pub data0: u32,
3528
3529 pub handle0: ::fidl_next::fuchsia::zx::NullableHandle,
3530
3531 pub data1: u64,
3532
3533 pub handle1: ::fidl_next::fuchsia::zx::Channel,
3534
3535 pub handle2: ::fidl_next::fuchsia::zx::Event,
3536
3537 pub data2: u64,
3538 }
3539
3540 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
3541 for MultipleNonnullableHandles
3542 where
3543 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3544 ___E: ::fidl_next::fuchsia::HandleEncoder,
3545 {
3546 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3547 Self,
3548 crate::wire::MultipleNonnullableHandles,
3549 > = unsafe {
3550 ::fidl_next::CopyOptimization::enable_if(
3551 true
3552
3553 && <
3554 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3555 >::COPY_OPTIMIZATION.is_enabled()
3556
3557 && <
3558 ::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>
3559 >::COPY_OPTIMIZATION.is_enabled()
3560
3561 && <
3562 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3563 >::COPY_OPTIMIZATION.is_enabled()
3564
3565 && <
3566 ::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>
3567 >::COPY_OPTIMIZATION.is_enabled()
3568
3569 && <
3570 ::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>
3571 >::COPY_OPTIMIZATION.is_enabled()
3572
3573 && <
3574 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3575 >::COPY_OPTIMIZATION.is_enabled()
3576
3577 )
3578 };
3579
3580 #[inline]
3581 fn encode(
3582 self,
3583 encoder_: &mut ___E,
3584 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
3585 _: (),
3586 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3587 ::fidl_next::munge! {
3588 let crate::wire::MultipleNonnullableHandles {
3589 data0,
3590 handle0,
3591 data1,
3592 handle1,
3593 handle2,
3594 data2,
3595
3596 } = out_;
3597 }
3598
3599 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
3600
3601 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data0.as_mut_ptr()) };
3602
3603 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
3604
3605 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle0.as_mut_ptr()) };
3606
3607 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
3608
3609 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data1.as_mut_ptr()) };
3610
3611 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
3612
3613 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle1.as_mut_ptr()) };
3614
3615 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
3616
3617 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle2.as_mut_ptr()) };
3618
3619 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
3620
3621 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data2.as_mut_ptr()) };
3622
3623 Ok(())
3624 }
3625 }
3626
3627 unsafe impl<___E>
3628 ::fidl_next::EncodeOption<
3629 ::fidl_next::wire::Box<'static, crate::wire::MultipleNonnullableHandles>,
3630 ___E,
3631 > for MultipleNonnullableHandles
3632 where
3633 ___E: ::fidl_next::Encoder + ?Sized,
3634 MultipleNonnullableHandles:
3635 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>,
3636 {
3637 #[inline]
3638 fn encode_option(
3639 this: ::core::option::Option<Self>,
3640 encoder: &mut ___E,
3641 out: &mut ::core::mem::MaybeUninit<
3642 ::fidl_next::wire::Box<'static, crate::wire::MultipleNonnullableHandles>,
3643 >,
3644 _: (),
3645 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3646 if let Some(inner) = this {
3647 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3648 ::fidl_next::wire::Box::encode_present(out);
3649 } else {
3650 ::fidl_next::wire::Box::encode_absent(out);
3651 }
3652
3653 Ok(())
3654 }
3655 }
3656
3657 impl ::fidl_next::FromWire<crate::wire::MultipleNonnullableHandles> for MultipleNonnullableHandles {
3658 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3659 crate::wire::MultipleNonnullableHandles,
3660 Self,
3661 > = unsafe {
3662 ::fidl_next::CopyOptimization::enable_if(
3663 true
3664 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
3665 .is_enabled()
3666 && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3667 ::fidl_next::wire::fuchsia::NullableHandle,
3668 >>::COPY_OPTIMIZATION
3669 .is_enabled()
3670 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
3671 .is_enabled()
3672 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
3673 ::fidl_next::wire::fuchsia::Channel,
3674 >>::COPY_OPTIMIZATION
3675 .is_enabled()
3676 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3677 ::fidl_next::wire::fuchsia::Event,
3678 >>::COPY_OPTIMIZATION
3679 .is_enabled()
3680 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
3681 .is_enabled(),
3682 )
3683 };
3684
3685 #[inline]
3686 fn from_wire(wire: crate::wire::MultipleNonnullableHandles) -> Self {
3687 Self {
3688 data0: ::fidl_next::FromWire::from_wire(wire.data0),
3689
3690 handle0: ::fidl_next::FromWire::from_wire(wire.handle0),
3691
3692 data1: ::fidl_next::FromWire::from_wire(wire.data1),
3693
3694 handle1: ::fidl_next::FromWire::from_wire(wire.handle1),
3695
3696 handle2: ::fidl_next::FromWire::from_wire(wire.handle2),
3697
3698 data2: ::fidl_next::FromWire::from_wire(wire.data2),
3699 }
3700 }
3701 }
3702
3703 #[derive(Debug, PartialEq)]
3704 #[repr(C)]
3705 pub struct MultipleNullableHandles {
3706 pub data0: u32,
3707
3708 pub handle0: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
3709
3710 pub data1: u64,
3711
3712 pub handle1: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
3713
3714 pub handle2: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
3715
3716 pub data2: u64,
3717 }
3718
3719 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
3720 for MultipleNullableHandles
3721 where
3722 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3723 ___E: ::fidl_next::fuchsia::HandleEncoder,
3724 {
3725 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3726 Self,
3727 crate::wire::MultipleNullableHandles,
3728 > = unsafe {
3729 ::fidl_next::CopyOptimization::enable_if(
3730 true
3731
3732 && <
3733 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3734 >::COPY_OPTIMIZATION.is_enabled()
3735
3736 && <
3737 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
3738 >::COPY_OPTIMIZATION.is_enabled()
3739
3740 && <
3741 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3742 >::COPY_OPTIMIZATION.is_enabled()
3743
3744 && <
3745 ::core::option::Option<::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>
3746 >::COPY_OPTIMIZATION.is_enabled()
3747
3748 && <
3749 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>
3750 >::COPY_OPTIMIZATION.is_enabled()
3751
3752 && <
3753 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3754 >::COPY_OPTIMIZATION.is_enabled()
3755
3756 )
3757 };
3758
3759 #[inline]
3760 fn encode(
3761 self,
3762 encoder_: &mut ___E,
3763 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
3764 _: (),
3765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3766 ::fidl_next::munge! {
3767 let crate::wire::MultipleNullableHandles {
3768 data0,
3769 handle0,
3770 data1,
3771 handle1,
3772 handle2,
3773 data2,
3774
3775 } = out_;
3776 }
3777
3778 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
3779
3780 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data0.as_mut_ptr()) };
3781
3782 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
3783
3784 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle0.as_mut_ptr()) };
3785
3786 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
3787
3788 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data1.as_mut_ptr()) };
3789
3790 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
3791
3792 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle1.as_mut_ptr()) };
3793
3794 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
3795
3796 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle2.as_mut_ptr()) };
3797
3798 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
3799
3800 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data2.as_mut_ptr()) };
3801
3802 Ok(())
3803 }
3804 }
3805
3806 unsafe impl<___E>
3807 ::fidl_next::EncodeOption<
3808 ::fidl_next::wire::Box<'static, crate::wire::MultipleNullableHandles>,
3809 ___E,
3810 > for MultipleNullableHandles
3811 where
3812 ___E: ::fidl_next::Encoder + ?Sized,
3813 MultipleNullableHandles: ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>,
3814 {
3815 #[inline]
3816 fn encode_option(
3817 this: ::core::option::Option<Self>,
3818 encoder: &mut ___E,
3819 out: &mut ::core::mem::MaybeUninit<
3820 ::fidl_next::wire::Box<'static, crate::wire::MultipleNullableHandles>,
3821 >,
3822 _: (),
3823 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3824 if let Some(inner) = this {
3825 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3826 ::fidl_next::wire::Box::encode_present(out);
3827 } else {
3828 ::fidl_next::wire::Box::encode_absent(out);
3829 }
3830
3831 Ok(())
3832 }
3833 }
3834
3835 impl ::fidl_next::FromWire<crate::wire::MultipleNullableHandles> for MultipleNullableHandles {
3836 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3837 crate::wire::MultipleNullableHandles,
3838 Self,
3839 > = unsafe {
3840 ::fidl_next::CopyOptimization::enable_if(
3841 true
3842
3843 && <
3844 u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>
3845 >::COPY_OPTIMIZATION.is_enabled()
3846
3847 && <
3848 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
3849 >::COPY_OPTIMIZATION.is_enabled()
3850
3851 && <
3852 u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>
3853 >::COPY_OPTIMIZATION.is_enabled()
3854
3855 && <
3856 ::core::option::Option<::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalChannel>
3857 >::COPY_OPTIMIZATION.is_enabled()
3858
3859 && <
3860 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalEvent>
3861 >::COPY_OPTIMIZATION.is_enabled()
3862
3863 && <
3864 u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>
3865 >::COPY_OPTIMIZATION.is_enabled()
3866
3867 )
3868 };
3869
3870 #[inline]
3871 fn from_wire(wire: crate::wire::MultipleNullableHandles) -> Self {
3872 Self {
3873 data0: ::fidl_next::FromWire::from_wire(wire.data0),
3874
3875 handle0: ::fidl_next::FromWire::from_wire(wire.handle0),
3876
3877 data1: ::fidl_next::FromWire::from_wire(wire.data1),
3878
3879 handle1: ::fidl_next::FromWire::from_wire(wire.handle1),
3880
3881 handle2: ::fidl_next::FromWire::from_wire(wire.handle2),
3882
3883 data2: ::fidl_next::FromWire::from_wire(wire.data2),
3884 }
3885 }
3886 }
3887
3888 #[derive(Debug, PartialEq)]
3889 #[repr(C)]
3890 pub struct NonnullableHandle {
3891 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
3892 }
3893
3894 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E> for NonnullableHandle
3895 where
3896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3897 ___E: ::fidl_next::fuchsia::HandleEncoder,
3898 {
3899 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3900 Self,
3901 crate::wire::NonnullableHandle,
3902 > = unsafe {
3903 ::fidl_next::CopyOptimization::enable_if(
3904 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
3905 ::fidl_next::wire::fuchsia::NullableHandle,
3906 ___E,
3907 >>::COPY_OPTIMIZATION
3908 .is_enabled(),
3909 )
3910 };
3911
3912 #[inline]
3913 fn encode(
3914 self,
3915 encoder_: &mut ___E,
3916 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
3917 _: (),
3918 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3919 ::fidl_next::munge! {
3920 let crate::wire::NonnullableHandle {
3921 h,
3922
3923 } = out_;
3924 }
3925
3926 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
3927
3928 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
3929
3930 Ok(())
3931 }
3932 }
3933
3934 unsafe impl<___E>
3935 ::fidl_next::EncodeOption<
3936 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandle>,
3937 ___E,
3938 > for NonnullableHandle
3939 where
3940 ___E: ::fidl_next::Encoder + ?Sized,
3941 NonnullableHandle: ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>,
3942 {
3943 #[inline]
3944 fn encode_option(
3945 this: ::core::option::Option<Self>,
3946 encoder: &mut ___E,
3947 out: &mut ::core::mem::MaybeUninit<
3948 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandle>,
3949 >,
3950 _: (),
3951 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3952 if let Some(inner) = this {
3953 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3954 ::fidl_next::wire::Box::encode_present(out);
3955 } else {
3956 ::fidl_next::wire::Box::encode_absent(out);
3957 }
3958
3959 Ok(())
3960 }
3961 }
3962
3963 impl ::fidl_next::FromWire<crate::wire::NonnullableHandle> for NonnullableHandle {
3964 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3965 crate::wire::NonnullableHandle,
3966 Self,
3967 > = unsafe {
3968 ::fidl_next::CopyOptimization::enable_if(
3969 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3970 ::fidl_next::wire::fuchsia::NullableHandle,
3971 >>::COPY_OPTIMIZATION
3972 .is_enabled(),
3973 )
3974 };
3975
3976 #[inline]
3977 fn from_wire(wire: crate::wire::NonnullableHandle) -> Self {
3978 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
3979 }
3980 }
3981
3982 #[derive(Debug, PartialEq)]
3983 #[repr(C)]
3984 pub struct NonnullableHandleArray {
3985 pub handles: [::fidl_next::fuchsia::zx::NullableHandle; 4],
3986 }
3987
3988 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
3989 for NonnullableHandleArray
3990 where
3991 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3992 ___E: ::fidl_next::fuchsia::HandleEncoder,
3993 {
3994 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3995 Self,
3996 crate::wire::NonnullableHandleArray,
3997 > = unsafe {
3998 ::fidl_next::CopyOptimization::enable_if(
3999 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::Encode<
4000 [::fidl_next::wire::fuchsia::NullableHandle; 4],
4001 ___E,
4002 >>::COPY_OPTIMIZATION
4003 .is_enabled(),
4004 )
4005 };
4006
4007 #[inline]
4008 fn encode(
4009 self,
4010 encoder_: &mut ___E,
4011 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
4012 _: (),
4013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4014 ::fidl_next::munge! {
4015 let crate::wire::NonnullableHandleArray {
4016 handles,
4017
4018 } = out_;
4019 }
4020
4021 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
4022
4023 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
4024
4025 Ok(())
4026 }
4027 }
4028
4029 unsafe impl<___E>
4030 ::fidl_next::EncodeOption<
4031 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
4032 ___E,
4033 > for NonnullableHandleArray
4034 where
4035 ___E: ::fidl_next::Encoder + ?Sized,
4036 NonnullableHandleArray: ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>,
4037 {
4038 #[inline]
4039 fn encode_option(
4040 this: ::core::option::Option<Self>,
4041 encoder: &mut ___E,
4042 out: &mut ::core::mem::MaybeUninit<
4043 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
4044 >,
4045 _: (),
4046 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4047 if let Some(inner) = this {
4048 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4049 ::fidl_next::wire::Box::encode_present(out);
4050 } else {
4051 ::fidl_next::wire::Box::encode_absent(out);
4052 }
4053
4054 Ok(())
4055 }
4056 }
4057
4058 impl ::fidl_next::FromWire<crate::wire::NonnullableHandleArray> for NonnullableHandleArray {
4059 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4060 crate::wire::NonnullableHandleArray,
4061 Self,
4062 > = unsafe {
4063 ::fidl_next::CopyOptimization::enable_if(
4064 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::FromWire<
4065 [::fidl_next::wire::fuchsia::NullableHandle; 4],
4066 >>::COPY_OPTIMIZATION
4067 .is_enabled(),
4068 )
4069 };
4070
4071 #[inline]
4072 fn from_wire(wire: crate::wire::NonnullableHandleArray) -> Self {
4073 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
4074 }
4075 }
4076
4077 #[derive(Debug, PartialEq)]
4078 #[repr(C)]
4079 pub struct NullableHandle {
4080 pub h: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
4081 }
4082
4083 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NullableHandle, ___E> for NullableHandle
4084 where
4085 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4086 ___E: ::fidl_next::fuchsia::HandleEncoder,
4087 {
4088 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::NullableHandle> = unsafe {
4089 ::fidl_next::CopyOptimization::enable_if(
4090 true
4091
4092 && <
4093 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
4094 >::COPY_OPTIMIZATION.is_enabled()
4095
4096 )
4097 };
4098
4099 #[inline]
4100 fn encode(
4101 self,
4102 encoder_: &mut ___E,
4103 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
4104 _: (),
4105 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4106 ::fidl_next::munge! {
4107 let crate::wire::NullableHandle {
4108 h,
4109
4110 } = out_;
4111 }
4112
4113 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
4114
4115 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
4116
4117 Ok(())
4118 }
4119 }
4120
4121 unsafe impl<___E>
4122 ::fidl_next::EncodeOption<
4123 ::fidl_next::wire::Box<'static, crate::wire::NullableHandle>,
4124 ___E,
4125 > for NullableHandle
4126 where
4127 ___E: ::fidl_next::Encoder + ?Sized,
4128 NullableHandle: ::fidl_next::Encode<crate::wire::NullableHandle, ___E>,
4129 {
4130 #[inline]
4131 fn encode_option(
4132 this: ::core::option::Option<Self>,
4133 encoder: &mut ___E,
4134 out: &mut ::core::mem::MaybeUninit<
4135 ::fidl_next::wire::Box<'static, crate::wire::NullableHandle>,
4136 >,
4137 _: (),
4138 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4139 if let Some(inner) = this {
4140 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4141 ::fidl_next::wire::Box::encode_present(out);
4142 } else {
4143 ::fidl_next::wire::Box::encode_absent(out);
4144 }
4145
4146 Ok(())
4147 }
4148 }
4149
4150 impl ::fidl_next::FromWire<crate::wire::NullableHandle> for NullableHandle {
4151 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::NullableHandle, Self> = unsafe {
4152 ::fidl_next::CopyOptimization::enable_if(
4153 true
4154
4155 && <
4156 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
4157 >::COPY_OPTIMIZATION.is_enabled()
4158
4159 )
4160 };
4161
4162 #[inline]
4163 fn from_wire(wire: crate::wire::NullableHandle) -> Self {
4164 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
4165 }
4166 }
4167
4168 #[derive(Debug, PartialEq)]
4169 pub struct OutOfLineArrayOfNonnullableHandles {
4170 pub handles:
4171 ::core::option::Option<::std::boxed::Box<crate::natural::NonnullableHandleArray>>,
4172 }
4173
4174 unsafe impl<___E>
4175 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
4176 for OutOfLineArrayOfNonnullableHandles
4177 where
4178 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4179 ___E: ::fidl_next::Encoder,
4180 ___E: ::fidl_next::fuchsia::HandleEncoder,
4181 {
4182 #[inline]
4183 fn encode(
4184 self,
4185 encoder_: &mut ___E,
4186 out_: &mut ::core::mem::MaybeUninit<
4187 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4188 >,
4189 _: (),
4190 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4191 ::fidl_next::munge! {
4192 let crate::wire::OutOfLineArrayOfNonnullableHandles {
4193 handles,
4194
4195 } = out_;
4196 }
4197
4198 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
4199
4200 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
4201
4202 Ok(())
4203 }
4204 }
4205
4206 unsafe impl<___E>
4207 ::fidl_next::EncodeOption<
4208 ::fidl_next::wire::Box<
4209 'static,
4210 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4211 >,
4212 ___E,
4213 > for OutOfLineArrayOfNonnullableHandles
4214 where
4215 ___E: ::fidl_next::Encoder + ?Sized,
4216 OutOfLineArrayOfNonnullableHandles:
4217 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>,
4218 {
4219 #[inline]
4220 fn encode_option(
4221 this: ::core::option::Option<Self>,
4222 encoder: &mut ___E,
4223 out: &mut ::core::mem::MaybeUninit<
4224 ::fidl_next::wire::Box<
4225 'static,
4226 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4227 >,
4228 >,
4229 _: (),
4230 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4231 if let Some(inner) = this {
4232 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4233 ::fidl_next::wire::Box::encode_present(out);
4234 } else {
4235 ::fidl_next::wire::Box::encode_absent(out);
4236 }
4237
4238 Ok(())
4239 }
4240 }
4241
4242 impl<'de> ::fidl_next::FromWire<crate::wire::OutOfLineArrayOfNonnullableHandles<'de>>
4243 for OutOfLineArrayOfNonnullableHandles
4244 {
4245 #[inline]
4246 fn from_wire(wire: crate::wire::OutOfLineArrayOfNonnullableHandles<'de>) -> Self {
4247 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
4248 }
4249 }
4250
4251 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4252 pub enum SampleResourceXUnion {
4253 U(u32),
4254
4255 Su(crate::natural::SimpleUnion),
4256
4257 St(crate::natural::SimpleTable),
4258
4259 UnknownOrdinal_(u64),
4260 }
4261
4262 impl SampleResourceXUnion {
4263 pub fn is_unknown(&self) -> bool {
4264 #[allow(unreachable_patterns)]
4265 match self {
4266 Self::UnknownOrdinal_(_) => true,
4267 _ => false,
4268 }
4269 }
4270 }
4271
4272 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>
4273 for SampleResourceXUnion
4274 where
4275 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4276 ___E: ::fidl_next::Encoder,
4277 ___E: ::fidl_next::fuchsia::HandleEncoder,
4278 {
4279 #[inline]
4280 fn encode(
4281 self,
4282 encoder: &mut ___E,
4283 out: &mut ::core::mem::MaybeUninit<crate::wire::SampleResourceXUnion<'static>>,
4284 _: (),
4285 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4286 ::fidl_next::munge!(let crate::wire::SampleResourceXUnion { raw, _phantom: _ } = out);
4287
4288 match self {
4289 Self::U(value) => ::fidl_next::wire::Union::encode_as::<
4290 ___E,
4291 ::fidl_next::wire::Uint32,
4292 >(value, 1, encoder, raw, ())?,
4293
4294 Self::Su(value) => ::fidl_next::wire::Union::encode_as::<
4295 ___E,
4296 crate::wire::SimpleUnion<'static>,
4297 >(value, 2, encoder, raw, ())?,
4298
4299 Self::St(value) => ::fidl_next::wire::Union::encode_as::<
4300 ___E,
4301 crate::wire::SimpleTable<'static>,
4302 >(value, 3, encoder, raw, ())?,
4303
4304 Self::UnknownOrdinal_(ordinal) => {
4305 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
4306 }
4307 }
4308
4309 Ok(())
4310 }
4311 }
4312
4313 unsafe impl<___E>
4314 ::fidl_next::EncodeOption<crate::wire_optional::SampleResourceXUnion<'static>, ___E>
4315 for SampleResourceXUnion
4316 where
4317 ___E: ?Sized,
4318 SampleResourceXUnion: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
4319 {
4320 #[inline]
4321 fn encode_option(
4322 this: ::core::option::Option<Self>,
4323 encoder: &mut ___E,
4324 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SampleResourceXUnion<'static>>,
4325 _: (),
4326 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4327 ::fidl_next::munge!(let crate::wire_optional::SampleResourceXUnion { raw, _phantom: _ } = &mut *out);
4328
4329 if let Some(inner) = this {
4330 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4331 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4332 } else {
4333 ::fidl_next::wire::Union::encode_absent(raw);
4334 }
4335
4336 Ok(())
4337 }
4338 }
4339
4340 impl<'de> ::fidl_next::FromWire<crate::wire::SampleResourceXUnion<'de>> for SampleResourceXUnion {
4341 #[inline]
4342 fn from_wire(wire: crate::wire::SampleResourceXUnion<'de>) -> Self {
4343 let wire = ::core::mem::ManuallyDrop::new(wire);
4344 match wire.raw.ordinal() {
4345 1 => Self::U(::fidl_next::FromWire::from_wire(unsafe {
4346 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
4347 })),
4348
4349 2 => Self::Su(::fidl_next::FromWire::from_wire(unsafe {
4350 wire.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
4351 })),
4352
4353 3 => Self::St(::fidl_next::FromWire::from_wire(unsafe {
4354 wire.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
4355 })),
4356
4357 ord => return Self::UnknownOrdinal_(ord as u64),
4358 }
4359 }
4360 }
4361
4362 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleResourceXUnion<'de>>
4363 for SampleResourceXUnion
4364 {
4365 #[inline]
4366 fn from_wire_option(
4367 wire: crate::wire_optional::SampleResourceXUnion<'de>,
4368 ) -> ::core::option::Option<Self> {
4369 if let Some(inner) = wire.into_option() {
4370 Some(::fidl_next::FromWire::from_wire(inner))
4371 } else {
4372 None
4373 }
4374 }
4375 }
4376
4377 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleResourceXUnion<'de>>
4378 for Box<SampleResourceXUnion>
4379 {
4380 #[inline]
4381 fn from_wire_option(
4382 wire: crate::wire_optional::SampleResourceXUnion<'de>,
4383 ) -> ::core::option::Option<Self> {
4384 <SampleResourceXUnion as ::fidl_next::FromWireOption<
4385 crate::wire_optional::SampleResourceXUnion<'de>,
4386 >>::from_wire_option(wire)
4387 .map(Box::new)
4388 }
4389 }
4390
4391 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4392 pub enum SampleStrictResourceXUnion {
4393 U(u32),
4394
4395 Su(crate::natural::SimpleUnion),
4396
4397 St(crate::natural::SimpleTable),
4398 }
4399
4400 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>
4401 for SampleStrictResourceXUnion
4402 where
4403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4404 ___E: ::fidl_next::Encoder,
4405 ___E: ::fidl_next::fuchsia::HandleEncoder,
4406 {
4407 #[inline]
4408 fn encode(
4409 self,
4410 encoder: &mut ___E,
4411 out: &mut ::core::mem::MaybeUninit<crate::wire::SampleStrictResourceXUnion<'static>>,
4412 _: (),
4413 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4414 ::fidl_next::munge!(let crate::wire::SampleStrictResourceXUnion { raw, _phantom: _ } = out);
4415
4416 match self {
4417 Self::U(value) => ::fidl_next::wire::Union::encode_as::<
4418 ___E,
4419 ::fidl_next::wire::Uint32,
4420 >(value, 1, encoder, raw, ())?,
4421
4422 Self::Su(value) => ::fidl_next::wire::Union::encode_as::<
4423 ___E,
4424 crate::wire::SimpleUnion<'static>,
4425 >(value, 2, encoder, raw, ())?,
4426
4427 Self::St(value) => ::fidl_next::wire::Union::encode_as::<
4428 ___E,
4429 crate::wire::SimpleTable<'static>,
4430 >(value, 3, encoder, raw, ())?,
4431 }
4432
4433 Ok(())
4434 }
4435 }
4436
4437 unsafe impl<___E>
4438 ::fidl_next::EncodeOption<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>
4439 for SampleStrictResourceXUnion
4440 where
4441 ___E: ?Sized,
4442 SampleStrictResourceXUnion:
4443 ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
4444 {
4445 #[inline]
4446 fn encode_option(
4447 this: ::core::option::Option<Self>,
4448 encoder: &mut ___E,
4449 out: &mut ::core::mem::MaybeUninit<
4450 crate::wire_optional::SampleStrictResourceXUnion<'static>,
4451 >,
4452 _: (),
4453 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4454 ::fidl_next::munge!(let crate::wire_optional::SampleStrictResourceXUnion { raw, _phantom: _ } = &mut *out);
4455
4456 if let Some(inner) = this {
4457 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4458 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4459 } else {
4460 ::fidl_next::wire::Union::encode_absent(raw);
4461 }
4462
4463 Ok(())
4464 }
4465 }
4466
4467 impl<'de> ::fidl_next::FromWire<crate::wire::SampleStrictResourceXUnion<'de>>
4468 for SampleStrictResourceXUnion
4469 {
4470 #[inline]
4471 fn from_wire(wire: crate::wire::SampleStrictResourceXUnion<'de>) -> Self {
4472 let wire = ::core::mem::ManuallyDrop::new(wire);
4473 match wire.raw.ordinal() {
4474 1 => Self::U(::fidl_next::FromWire::from_wire(unsafe {
4475 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
4476 })),
4477
4478 2 => Self::Su(::fidl_next::FromWire::from_wire(unsafe {
4479 wire.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
4480 })),
4481
4482 3 => Self::St(::fidl_next::FromWire::from_wire(unsafe {
4483 wire.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
4484 })),
4485
4486 _ => unsafe { ::core::hint::unreachable_unchecked() },
4487 }
4488 }
4489 }
4490
4491 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleStrictResourceXUnion<'de>>
4492 for SampleStrictResourceXUnion
4493 {
4494 #[inline]
4495 fn from_wire_option(
4496 wire: crate::wire_optional::SampleStrictResourceXUnion<'de>,
4497 ) -> ::core::option::Option<Self> {
4498 if let Some(inner) = wire.into_option() {
4499 Some(::fidl_next::FromWire::from_wire(inner))
4500 } else {
4501 None
4502 }
4503 }
4504 }
4505
4506 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleStrictResourceXUnion<'de>>
4507 for Box<SampleStrictResourceXUnion>
4508 {
4509 #[inline]
4510 fn from_wire_option(
4511 wire: crate::wire_optional::SampleStrictResourceXUnion<'de>,
4512 ) -> ::core::option::Option<Self> {
4513 <SampleStrictResourceXUnion as ::fidl_next::FromWireOption<
4514 crate::wire_optional::SampleStrictResourceXUnion<'de>,
4515 >>::from_wire_option(wire)
4516 .map(Box::new)
4517 }
4518 }
4519
4520 #[derive(Debug, PartialEq)]
4521 pub enum UnionWithVector {
4522 Unused(u8),
4523
4524 VectorOfUint8(::std::vec::Vec<u8>),
4525
4526 S(::std::string::String),
4527
4528 VectorS3A1(::std::vec::Vec<crate::natural::StructSize3Align1>),
4529
4530 VectorS3A2(::std::vec::Vec<crate::natural::StructSize3Align2>),
4531
4532 Handles(::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>),
4533
4534 ArrayS3A1([crate::natural::StructSize3Align1; 2]),
4535
4536 ArrayS3A2([crate::natural::StructSize3Align2; 2]),
4537
4538 VectorUnion(::std::vec::Vec<crate::natural::UnionSize8Align4>),
4539 }
4540
4541 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>
4542 for UnionWithVector
4543 where
4544 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4545 ___E: ::fidl_next::Encoder,
4546 ___E: ::fidl_next::fuchsia::HandleEncoder,
4547 {
4548 #[inline]
4549 fn encode(
4550 self,
4551 encoder: &mut ___E,
4552 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionWithVector<'static>>,
4553 _: (),
4554 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4555 ::fidl_next::munge!(let crate::wire::UnionWithVector { raw, _phantom: _ } = out);
4556
4557 match self {
4558 Self::Unused(value) => {
4559 ::fidl_next::wire::Union::encode_as::<___E, u8>(value, 1, encoder, raw, ())?
4560 }
4561
4562 Self::VectorOfUint8(value) => {
4563 ::fidl_next::wire::Union::encode_as::<
4564 ___E,
4565 ::fidl_next::wire::Vector<'static, u8>,
4566 >(value, 2, encoder, raw, (4294967295, ()))?
4567 }
4568
4569 Self::S(value) => ::fidl_next::wire::Union::encode_as::<
4570 ___E,
4571 ::fidl_next::wire::String<'static>,
4572 >(value, 3, encoder, raw, 4294967295)?,
4573
4574 Self::VectorS3A1(value) => {
4575 ::fidl_next::wire::Union::encode_as::<
4576 ___E,
4577 ::fidl_next::wire::Vector<'static, crate::wire::StructSize3Align1>,
4578 >(value, 4, encoder, raw, (4294967295, ()))?
4579 }
4580
4581 Self::VectorS3A2(value) => {
4582 ::fidl_next::wire::Union::encode_as::<
4583 ___E,
4584 ::fidl_next::wire::Vector<'static, crate::wire::StructSize3Align2>,
4585 >(value, 5, encoder, raw, (4294967295, ()))?
4586 }
4587
4588 Self::Handles(value) => ::fidl_next::wire::Union::encode_as::<
4589 ___E,
4590 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
4591 >(value, 6, encoder, raw, (4294967295, ()))?,
4592
4593 Self::ArrayS3A1(value) => ::fidl_next::wire::Union::encode_as::<
4594 ___E,
4595 [crate::wire::StructSize3Align1; 2],
4596 >(value, 7, encoder, raw, ())?,
4597
4598 Self::ArrayS3A2(value) => ::fidl_next::wire::Union::encode_as::<
4599 ___E,
4600 [crate::wire::StructSize3Align2; 2],
4601 >(value, 8, encoder, raw, ())?,
4602
4603 Self::VectorUnion(value) => {
4604 ::fidl_next::wire::Union::encode_as::<
4605 ___E,
4606 ::fidl_next::wire::Vector<'static, crate::wire::UnionSize8Align4>,
4607 >(value, 9, encoder, raw, (4294967295, ()))?
4608 }
4609 }
4610
4611 Ok(())
4612 }
4613 }
4614
4615 unsafe impl<___E>
4616 ::fidl_next::EncodeOption<crate::wire_optional::UnionWithVector<'static>, ___E>
4617 for UnionWithVector
4618 where
4619 ___E: ?Sized,
4620 UnionWithVector: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
4621 {
4622 #[inline]
4623 fn encode_option(
4624 this: ::core::option::Option<Self>,
4625 encoder: &mut ___E,
4626 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::UnionWithVector<'static>>,
4627 _: (),
4628 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4629 ::fidl_next::munge!(let crate::wire_optional::UnionWithVector { raw, _phantom: _ } = &mut *out);
4630
4631 if let Some(inner) = this {
4632 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4633 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4634 } else {
4635 ::fidl_next::wire::Union::encode_absent(raw);
4636 }
4637
4638 Ok(())
4639 }
4640 }
4641
4642 impl<'de> ::fidl_next::FromWire<crate::wire::UnionWithVector<'de>> for UnionWithVector {
4643 #[inline]
4644 fn from_wire(wire: crate::wire::UnionWithVector<'de>) -> Self {
4645 let wire = ::core::mem::ManuallyDrop::new(wire);
4646 match wire.raw.ordinal() {
4647 1 => Self::Unused(::fidl_next::FromWire::from_wire(unsafe {
4648 wire.raw.get().read_unchecked::<u8>()
4649 })),
4650
4651 2 => Self::VectorOfUint8(::fidl_next::FromWire::from_wire(unsafe {
4652 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4653 })),
4654
4655 3 => Self::S(::fidl_next::FromWire::from_wire(unsafe {
4656 wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
4657 })),
4658
4659 4 => Self::VectorS3A1(::fidl_next::FromWire::from_wire(unsafe {
4660 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
4661 })),
4662
4663 5 => Self::VectorS3A2(::fidl_next::FromWire::from_wire(unsafe {
4664 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
4665 })),
4666
4667 6 => Self::Handles(::fidl_next::FromWire::from_wire(unsafe {
4668 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>>()
4669 })),
4670
4671 7 => Self::ArrayS3A1(::fidl_next::FromWire::from_wire(unsafe {
4672 wire.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
4673 })),
4674
4675 8 => Self::ArrayS3A2(::fidl_next::FromWire::from_wire(unsafe {
4676 wire.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
4677 })),
4678
4679 9 => Self::VectorUnion(::fidl_next::FromWire::from_wire(unsafe {
4680 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
4681 })),
4682
4683 _ => unsafe { ::core::hint::unreachable_unchecked() },
4684 }
4685 }
4686 }
4687
4688 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionWithVector<'de>>
4689 for UnionWithVector
4690 {
4691 #[inline]
4692 fn from_wire_option(
4693 wire: crate::wire_optional::UnionWithVector<'de>,
4694 ) -> ::core::option::Option<Self> {
4695 if let Some(inner) = wire.into_option() {
4696 Some(::fidl_next::FromWire::from_wire(inner))
4697 } else {
4698 None
4699 }
4700 }
4701 }
4702
4703 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionWithVector<'de>>
4704 for Box<UnionWithVector>
4705 {
4706 #[inline]
4707 fn from_wire_option(
4708 wire: crate::wire_optional::UnionWithVector<'de>,
4709 ) -> ::core::option::Option<Self> {
4710 <UnionWithVector as ::fidl_next::FromWireOption<
4711 crate::wire_optional::UnionWithVector<'de>,
4712 >>::from_wire_option(wire)
4713 .map(Box::new)
4714 }
4715 }
4716
4717 #[derive(Debug, PartialEq)]
4718 pub struct Sandwich6 {
4719 pub before: u32,
4720
4721 pub the_union: crate::natural::UnionWithVector,
4722
4723 pub after: u32,
4724 }
4725
4726 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E> for Sandwich6
4727 where
4728 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4729 ___E: ::fidl_next::Encoder,
4730 ___E: ::fidl_next::fuchsia::HandleEncoder,
4731 {
4732 #[inline]
4733 fn encode(
4734 self,
4735 encoder_: &mut ___E,
4736 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
4737 _: (),
4738 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4739 ::fidl_next::munge! {
4740 let crate::wire::Sandwich6 {
4741 before,
4742 the_union,
4743 after,
4744
4745 } = out_;
4746 }
4747
4748 ::fidl_next::Encode::encode(self.before, encoder_, before, ())?;
4749
4750 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(before.as_mut_ptr()) };
4751
4752 ::fidl_next::Encode::encode(self.the_union, encoder_, the_union, ())?;
4753
4754 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(the_union.as_mut_ptr()) };
4755
4756 ::fidl_next::Encode::encode(self.after, encoder_, after, ())?;
4757
4758 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(after.as_mut_ptr()) };
4759
4760 Ok(())
4761 }
4762 }
4763
4764 unsafe impl<___E>
4765 ::fidl_next::EncodeOption<
4766 ::fidl_next::wire::Box<'static, crate::wire::Sandwich6<'static>>,
4767 ___E,
4768 > for Sandwich6
4769 where
4770 ___E: ::fidl_next::Encoder + ?Sized,
4771 Sandwich6: ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>,
4772 {
4773 #[inline]
4774 fn encode_option(
4775 this: ::core::option::Option<Self>,
4776 encoder: &mut ___E,
4777 out: &mut ::core::mem::MaybeUninit<
4778 ::fidl_next::wire::Box<'static, crate::wire::Sandwich6<'static>>,
4779 >,
4780 _: (),
4781 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4782 if let Some(inner) = this {
4783 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4784 ::fidl_next::wire::Box::encode_present(out);
4785 } else {
4786 ::fidl_next::wire::Box::encode_absent(out);
4787 }
4788
4789 Ok(())
4790 }
4791 }
4792
4793 impl<'de> ::fidl_next::FromWire<crate::wire::Sandwich6<'de>> for Sandwich6 {
4794 #[inline]
4795 fn from_wire(wire: crate::wire::Sandwich6<'de>) -> Self {
4796 Self {
4797 before: ::fidl_next::FromWire::from_wire(wire.before),
4798
4799 the_union: ::fidl_next::FromWire::from_wire(wire.the_union),
4800
4801 after: ::fidl_next::FromWire::from_wire(wire.after),
4802 }
4803 }
4804 }
4805
4806 #[derive(Debug, PartialEq)]
4807 pub struct ShortStringThenHandle {
4808 pub s: ::std::string::String,
4809
4810 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
4811 }
4812
4813 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
4814 for ShortStringThenHandle
4815 where
4816 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4817 ___E: ::fidl_next::Encoder,
4818 ___E: ::fidl_next::fuchsia::HandleEncoder,
4819 {
4820 #[inline]
4821 fn encode(
4822 self,
4823 encoder_: &mut ___E,
4824 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
4825 _: (),
4826 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4827 ::fidl_next::munge! {
4828 let crate::wire::ShortStringThenHandle {
4829 s,
4830 h,
4831
4832 } = out_;
4833 }
4834
4835 ::fidl_next::Encode::encode(self.s, encoder_, s, 1)?;
4836
4837 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4838 ::fidl_next::Constrained::validate(_field, 1)?;
4839
4840 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
4841
4842 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
4843
4844 Ok(())
4845 }
4846 }
4847
4848 unsafe impl<___E>
4849 ::fidl_next::EncodeOption<
4850 ::fidl_next::wire::Box<'static, crate::wire::ShortStringThenHandle<'static>>,
4851 ___E,
4852 > for ShortStringThenHandle
4853 where
4854 ___E: ::fidl_next::Encoder + ?Sized,
4855 ShortStringThenHandle:
4856 ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>,
4857 {
4858 #[inline]
4859 fn encode_option(
4860 this: ::core::option::Option<Self>,
4861 encoder: &mut ___E,
4862 out: &mut ::core::mem::MaybeUninit<
4863 ::fidl_next::wire::Box<'static, crate::wire::ShortStringThenHandle<'static>>,
4864 >,
4865 _: (),
4866 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4867 if let Some(inner) = this {
4868 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4869 ::fidl_next::wire::Box::encode_present(out);
4870 } else {
4871 ::fidl_next::wire::Box::encode_absent(out);
4872 }
4873
4874 Ok(())
4875 }
4876 }
4877
4878 impl<'de> ::fidl_next::FromWire<crate::wire::ShortStringThenHandle<'de>> for ShortStringThenHandle {
4879 #[inline]
4880 fn from_wire(wire: crate::wire::ShortStringThenHandle<'de>) -> Self {
4881 Self {
4882 s: ::fidl_next::FromWire::from_wire(wire.s),
4883
4884 h: ::fidl_next::FromWire::from_wire(wire.h),
4885 }
4886 }
4887 }
4888
4889 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4890 pub struct SimpleResourceTable {
4891 pub x: ::core::option::Option<i64>,
4892
4893 pub y: ::core::option::Option<i64>,
4894 }
4895
4896 impl SimpleResourceTable {
4897 fn __max_ordinal(&self) -> usize {
4898 if self.y.is_some() {
4899 return 5;
4900 }
4901
4902 if self.x.is_some() {
4903 return 1;
4904 }
4905
4906 0
4907 }
4908 }
4909
4910 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>
4911 for SimpleResourceTable
4912 where
4913 ___E: ::fidl_next::Encoder + ?Sized,
4914 ___E: ::fidl_next::fuchsia::HandleEncoder,
4915 {
4916 #[inline]
4917 fn encode(
4918 mut self,
4919 encoder: &mut ___E,
4920 out: &mut ::core::mem::MaybeUninit<crate::wire::SimpleResourceTable<'static>>,
4921 _: (),
4922 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4923 ::fidl_next::munge!(let crate::wire::SimpleResourceTable { table } = out);
4924
4925 let max_ord = self.__max_ordinal();
4926
4927 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4928 ::fidl_next::Wire::zero_padding(&mut out);
4929
4930 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4931 ::fidl_next::wire::Envelope,
4932 >(encoder, max_ord);
4933
4934 for i in 1..=max_ord {
4935 match i {
4936 5 => {
4937 if let Some(value) = self.y.take() {
4938 ::fidl_next::wire::Envelope::encode_value::<
4939 ::fidl_next::wire::Int64,
4940 ___E,
4941 >(
4942 value, preallocated.encoder, &mut out, ()
4943 )?;
4944 } else {
4945 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4946 }
4947 }
4948
4949 1 => {
4950 if let Some(value) = self.x.take() {
4951 ::fidl_next::wire::Envelope::encode_value::<
4952 ::fidl_next::wire::Int64,
4953 ___E,
4954 >(
4955 value, preallocated.encoder, &mut out, ()
4956 )?;
4957 } else {
4958 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4959 }
4960 }
4961
4962 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4963 }
4964 unsafe {
4965 preallocated.write_next(out.assume_init_ref());
4966 }
4967 }
4968
4969 ::fidl_next::wire::Table::encode_len(table, max_ord);
4970
4971 Ok(())
4972 }
4973 }
4974
4975 impl<'de> ::fidl_next::FromWire<crate::wire::SimpleResourceTable<'de>> for SimpleResourceTable {
4976 #[inline]
4977 fn from_wire(wire_: crate::wire::SimpleResourceTable<'de>) -> Self {
4978 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4979
4980 let x = wire_.table.get(1);
4981
4982 let y = wire_.table.get(5);
4983
4984 Self {
4985 x: x.map(|envelope| {
4986 ::fidl_next::FromWire::from_wire(unsafe {
4987 envelope.read_unchecked::<::fidl_next::wire::Int64>()
4988 })
4989 }),
4990
4991 y: y.map(|envelope| {
4992 ::fidl_next::FromWire::from_wire(unsafe {
4993 envelope.read_unchecked::<::fidl_next::wire::Int64>()
4994 })
4995 }),
4996 }
4997 }
4998 }
4999
5000 #[derive(Debug, PartialEq)]
5001 #[repr(C)]
5002 pub struct SingleHandle {
5003 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
5004 }
5005
5006 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SingleHandle, ___E> for SingleHandle
5007 where
5008 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5009 ___E: ::fidl_next::fuchsia::HandleEncoder,
5010 {
5011 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::SingleHandle> = unsafe {
5012 ::fidl_next::CopyOptimization::enable_if(
5013 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
5014 ::fidl_next::wire::fuchsia::NullableHandle,
5015 ___E,
5016 >>::COPY_OPTIMIZATION
5017 .is_enabled(),
5018 )
5019 };
5020
5021 #[inline]
5022 fn encode(
5023 self,
5024 encoder_: &mut ___E,
5025 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
5026 _: (),
5027 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5028 ::fidl_next::munge! {
5029 let crate::wire::SingleHandle {
5030 h,
5031
5032 } = out_;
5033 }
5034
5035 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
5036
5037 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
5038
5039 Ok(())
5040 }
5041 }
5042
5043 unsafe impl<___E>
5044 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>
5045 for SingleHandle
5046 where
5047 ___E: ::fidl_next::Encoder + ?Sized,
5048 SingleHandle: ::fidl_next::Encode<crate::wire::SingleHandle, ___E>,
5049 {
5050 #[inline]
5051 fn encode_option(
5052 this: ::core::option::Option<Self>,
5053 encoder: &mut ___E,
5054 out: &mut ::core::mem::MaybeUninit<
5055 ::fidl_next::wire::Box<'static, crate::wire::SingleHandle>,
5056 >,
5057 _: (),
5058 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5059 if let Some(inner) = this {
5060 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5061 ::fidl_next::wire::Box::encode_present(out);
5062 } else {
5063 ::fidl_next::wire::Box::encode_absent(out);
5064 }
5065
5066 Ok(())
5067 }
5068 }
5069
5070 impl ::fidl_next::FromWire<crate::wire::SingleHandle> for SingleHandle {
5071 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::SingleHandle, Self> = unsafe {
5072 ::fidl_next::CopyOptimization::enable_if(
5073 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
5074 ::fidl_next::wire::fuchsia::NullableHandle,
5075 >>::COPY_OPTIMIZATION
5076 .is_enabled(),
5077 )
5078 };
5079
5080 #[inline]
5081 fn from_wire(wire: crate::wire::SingleHandle) -> Self {
5082 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
5083 }
5084 }
5085
5086 #[derive(Debug, PartialEq)]
5087 #[repr(C)]
5088 pub struct SingleOptionalHandle {
5089 pub h: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
5090 }
5091
5092 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
5093 for SingleOptionalHandle
5094 where
5095 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5096 ___E: ::fidl_next::fuchsia::HandleEncoder,
5097 {
5098 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5099 Self,
5100 crate::wire::SingleOptionalHandle,
5101 > = unsafe {
5102 ::fidl_next::CopyOptimization::enable_if(
5103 true
5104
5105 && <
5106 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
5107 >::COPY_OPTIMIZATION.is_enabled()
5108
5109 )
5110 };
5111
5112 #[inline]
5113 fn encode(
5114 self,
5115 encoder_: &mut ___E,
5116 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
5117 _: (),
5118 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5119 ::fidl_next::munge! {
5120 let crate::wire::SingleOptionalHandle {
5121 h,
5122
5123 } = out_;
5124 }
5125
5126 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
5127
5128 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
5129
5130 Ok(())
5131 }
5132 }
5133
5134 unsafe impl<___E>
5135 ::fidl_next::EncodeOption<
5136 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
5137 ___E,
5138 > for SingleOptionalHandle
5139 where
5140 ___E: ::fidl_next::Encoder + ?Sized,
5141 SingleOptionalHandle: ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>,
5142 {
5143 #[inline]
5144 fn encode_option(
5145 this: ::core::option::Option<Self>,
5146 encoder: &mut ___E,
5147 out: &mut ::core::mem::MaybeUninit<
5148 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
5149 >,
5150 _: (),
5151 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5152 if let Some(inner) = this {
5153 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5154 ::fidl_next::wire::Box::encode_present(out);
5155 } else {
5156 ::fidl_next::wire::Box::encode_absent(out);
5157 }
5158
5159 Ok(())
5160 }
5161 }
5162
5163 impl ::fidl_next::FromWire<crate::wire::SingleOptionalHandle> for SingleOptionalHandle {
5164 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5165 crate::wire::SingleOptionalHandle,
5166 Self,
5167 > = unsafe {
5168 ::fidl_next::CopyOptimization::enable_if(
5169 true
5170
5171 && <
5172 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
5173 >::COPY_OPTIMIZATION.is_enabled()
5174
5175 )
5176 };
5177
5178 #[inline]
5179 fn from_wire(wire: crate::wire::SingleOptionalHandle) -> Self {
5180 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
5181 }
5182 }
5183
5184 #[derive(Debug, PartialEq)]
5185 #[repr(C)]
5186 pub struct StructOfEndpoints {
5187 pub client_end: ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5188
5189 pub optional_client_end: ::core::option::Option<
5190 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5191 >,
5192
5193 pub server_end: ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5194
5195 pub optional_server_end: ::core::option::Option<
5196 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5197 >,
5198 }
5199
5200 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E> for StructOfEndpoints
5201 where
5202 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5203 ___E: ::fidl_next::fuchsia::HandleEncoder,
5204 {
5205 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5206 Self,
5207 crate::wire::StructOfEndpoints,
5208 > = unsafe {
5209 ::fidl_next::CopyOptimization::enable_if(
5210 true
5211
5212 && <
5213 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>, ___E>
5214 >::COPY_OPTIMIZATION.is_enabled()
5215
5216 && <
5217 ::core::option::Option<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>, ___E>
5218 >::COPY_OPTIMIZATION.is_enabled()
5219
5220 && <
5221 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>, ___E>
5222 >::COPY_OPTIMIZATION.is_enabled()
5223
5224 && <
5225 ::core::option::Option<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>, ___E>
5226 >::COPY_OPTIMIZATION.is_enabled()
5227
5228 )
5229 };
5230
5231 #[inline]
5232 fn encode(
5233 self,
5234 encoder_: &mut ___E,
5235 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
5236 _: (),
5237 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5238 ::fidl_next::munge! {
5239 let crate::wire::StructOfEndpoints {
5240 client_end,
5241 optional_client_end,
5242 server_end,
5243 optional_server_end,
5244
5245 } = out_;
5246 }
5247
5248 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
5249
5250 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_end.as_mut_ptr()) };
5251
5252 ::fidl_next::Encode::encode(
5253 self.optional_client_end,
5254 encoder_,
5255 optional_client_end,
5256 (),
5257 )?;
5258
5259 let mut _field =
5260 unsafe { ::fidl_next::Slot::new_unchecked(optional_client_end.as_mut_ptr()) };
5261
5262 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
5263
5264 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server_end.as_mut_ptr()) };
5265
5266 ::fidl_next::Encode::encode(
5267 self.optional_server_end,
5268 encoder_,
5269 optional_server_end,
5270 (),
5271 )?;
5272
5273 let mut _field =
5274 unsafe { ::fidl_next::Slot::new_unchecked(optional_server_end.as_mut_ptr()) };
5275
5276 Ok(())
5277 }
5278 }
5279
5280 unsafe impl<___E>
5281 ::fidl_next::EncodeOption<
5282 ::fidl_next::wire::Box<'static, crate::wire::StructOfEndpoints>,
5283 ___E,
5284 > for StructOfEndpoints
5285 where
5286 ___E: ::fidl_next::Encoder + ?Sized,
5287 StructOfEndpoints: ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>,
5288 {
5289 #[inline]
5290 fn encode_option(
5291 this: ::core::option::Option<Self>,
5292 encoder: &mut ___E,
5293 out: &mut ::core::mem::MaybeUninit<
5294 ::fidl_next::wire::Box<'static, crate::wire::StructOfEndpoints>,
5295 >,
5296 _: (),
5297 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5298 if let Some(inner) = this {
5299 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5300 ::fidl_next::wire::Box::encode_present(out);
5301 } else {
5302 ::fidl_next::wire::Box::encode_absent(out);
5303 }
5304
5305 Ok(())
5306 }
5307 }
5308
5309 impl ::fidl_next::FromWire<crate::wire::StructOfEndpoints> for StructOfEndpoints {
5310 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5311 crate::wire::StructOfEndpoints,
5312 Self,
5313 > = unsafe {
5314 ::fidl_next::CopyOptimization::enable_if(
5315 true
5316
5317 && <
5318 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>
5319 >::COPY_OPTIMIZATION.is_enabled()
5320
5321 && <
5322 ::core::option::Option<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>>
5323 >::COPY_OPTIMIZATION.is_enabled()
5324
5325 && <
5326 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>
5327 >::COPY_OPTIMIZATION.is_enabled()
5328
5329 && <
5330 ::core::option::Option<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>>
5331 >::COPY_OPTIMIZATION.is_enabled()
5332
5333 )
5334 };
5335
5336 #[inline]
5337 fn from_wire(wire: crate::wire::StructOfEndpoints) -> Self {
5338 Self {
5339 client_end: ::fidl_next::FromWire::from_wire(wire.client_end),
5340
5341 optional_client_end: ::fidl_next::FromWire::from_wire(wire.optional_client_end),
5342
5343 server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
5344
5345 optional_server_end: ::fidl_next::FromWire::from_wire(wire.optional_server_end),
5346 }
5347 }
5348 }
5349
5350 #[derive(Debug, PartialEq)]
5351 #[repr(C)]
5352 pub struct StructOfOptionalUnionOfHandle {
5353 pub u: ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>>,
5354 }
5355
5356 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
5357 for StructOfOptionalUnionOfHandle
5358 where
5359 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5360 ___E: ::fidl_next::fuchsia::HandleEncoder,
5361 {
5362 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5363 Self,
5364 crate::wire::StructOfOptionalUnionOfHandle,
5365 > = unsafe {
5366 ::fidl_next::CopyOptimization::enable_if(
5367 true
5368
5369 && <
5370 ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>> as ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>
5371 >::COPY_OPTIMIZATION.is_enabled()
5372
5373 )
5374 };
5375
5376 #[inline]
5377 fn encode(
5378 self,
5379 encoder_: &mut ___E,
5380 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
5381 _: (),
5382 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5383 ::fidl_next::munge! {
5384 let crate::wire::StructOfOptionalUnionOfHandle {
5385 u,
5386
5387 } = out_;
5388 }
5389
5390 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
5391
5392 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
5393
5394 Ok(())
5395 }
5396 }
5397
5398 unsafe impl<___E>
5399 ::fidl_next::EncodeOption<
5400 ::fidl_next::wire::Box<'static, crate::wire::StructOfOptionalUnionOfHandle>,
5401 ___E,
5402 > for StructOfOptionalUnionOfHandle
5403 where
5404 ___E: ::fidl_next::Encoder + ?Sized,
5405 StructOfOptionalUnionOfHandle:
5406 ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>,
5407 {
5408 #[inline]
5409 fn encode_option(
5410 this: ::core::option::Option<Self>,
5411 encoder: &mut ___E,
5412 out: &mut ::core::mem::MaybeUninit<
5413 ::fidl_next::wire::Box<'static, crate::wire::StructOfOptionalUnionOfHandle>,
5414 >,
5415 _: (),
5416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5417 if let Some(inner) = this {
5418 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5419 ::fidl_next::wire::Box::encode_present(out);
5420 } else {
5421 ::fidl_next::wire::Box::encode_absent(out);
5422 }
5423
5424 Ok(())
5425 }
5426 }
5427
5428 impl ::fidl_next::FromWire<crate::wire::StructOfOptionalUnionOfHandle>
5429 for StructOfOptionalUnionOfHandle
5430 {
5431 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5432 crate::wire::StructOfOptionalUnionOfHandle,
5433 Self,
5434 > = unsafe {
5435 ::fidl_next::CopyOptimization::enable_if(
5436 true
5437
5438 && <
5439 ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>> as ::fidl_next::FromWire<crate::wire_optional::UnionOfHandle>
5440 >::COPY_OPTIMIZATION.is_enabled()
5441
5442 )
5443 };
5444
5445 #[inline]
5446 fn from_wire(wire: crate::wire::StructOfOptionalUnionOfHandle) -> Self {
5447 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
5448 }
5449 }
5450
5451 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5452 pub struct StructOfSimpleResourceTable {
5453 pub table: crate::natural::SimpleResourceTable,
5454 }
5455
5456 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
5457 for StructOfSimpleResourceTable
5458 where
5459 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5460 ___E: ::fidl_next::Encoder,
5461 ___E: ::fidl_next::fuchsia::HandleEncoder,
5462 {
5463 #[inline]
5464 fn encode(
5465 self,
5466 encoder_: &mut ___E,
5467 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
5468 _: (),
5469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5470 ::fidl_next::munge! {
5471 let crate::wire::StructOfSimpleResourceTable {
5472 table,
5473
5474 } = out_;
5475 }
5476
5477 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
5478
5479 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
5480
5481 Ok(())
5482 }
5483 }
5484
5485 unsafe impl<___E>
5486 ::fidl_next::EncodeOption<
5487 ::fidl_next::wire::Box<'static, crate::wire::StructOfSimpleResourceTable<'static>>,
5488 ___E,
5489 > for StructOfSimpleResourceTable
5490 where
5491 ___E: ::fidl_next::Encoder + ?Sized,
5492 StructOfSimpleResourceTable:
5493 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>,
5494 {
5495 #[inline]
5496 fn encode_option(
5497 this: ::core::option::Option<Self>,
5498 encoder: &mut ___E,
5499 out: &mut ::core::mem::MaybeUninit<
5500 ::fidl_next::wire::Box<'static, crate::wire::StructOfSimpleResourceTable<'static>>,
5501 >,
5502 _: (),
5503 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5504 if let Some(inner) = this {
5505 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5506 ::fidl_next::wire::Box::encode_present(out);
5507 } else {
5508 ::fidl_next::wire::Box::encode_absent(out);
5509 }
5510
5511 Ok(())
5512 }
5513 }
5514
5515 impl<'de> ::fidl_next::FromWire<crate::wire::StructOfSimpleResourceTable<'de>>
5516 for StructOfSimpleResourceTable
5517 {
5518 #[inline]
5519 fn from_wire(wire: crate::wire::StructOfSimpleResourceTable<'de>) -> Self {
5520 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
5521 }
5522 }
5523
5524 #[derive(Debug, Default, PartialEq)]
5525 pub struct TableFieldInlinedHandle {
5526 pub f: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
5527 }
5528
5529 impl TableFieldInlinedHandle {
5530 fn __max_ordinal(&self) -> usize {
5531 if self.f.is_some() {
5532 return 1;
5533 }
5534
5535 0
5536 }
5537 }
5538
5539 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>
5540 for TableFieldInlinedHandle
5541 where
5542 ___E: ::fidl_next::Encoder + ?Sized,
5543 ___E: ::fidl_next::fuchsia::HandleEncoder,
5544 {
5545 #[inline]
5546 fn encode(
5547 mut self,
5548 encoder: &mut ___E,
5549 out: &mut ::core::mem::MaybeUninit<crate::wire::TableFieldInlinedHandle<'static>>,
5550 _: (),
5551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5552 ::fidl_next::munge!(let crate::wire::TableFieldInlinedHandle { table } = out);
5553
5554 let max_ord = self.__max_ordinal();
5555
5556 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5557 ::fidl_next::Wire::zero_padding(&mut out);
5558
5559 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5560 ::fidl_next::wire::Envelope,
5561 >(encoder, max_ord);
5562
5563 for i in 1..=max_ord {
5564 match i {
5565 1 => {
5566 if let Some(value) = self.f.take() {
5567 ::fidl_next::wire::Envelope::encode_value::<
5568 ::fidl_next::wire::fuchsia::Channel,
5569 ___E,
5570 >(
5571 value, preallocated.encoder, &mut out, ()
5572 )?;
5573 } else {
5574 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5575 }
5576 }
5577
5578 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5579 }
5580 unsafe {
5581 preallocated.write_next(out.assume_init_ref());
5582 }
5583 }
5584
5585 ::fidl_next::wire::Table::encode_len(table, max_ord);
5586
5587 Ok(())
5588 }
5589 }
5590
5591 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldInlinedHandle<'de>>
5592 for TableFieldInlinedHandle
5593 {
5594 #[inline]
5595 fn from_wire(wire_: crate::wire::TableFieldInlinedHandle<'de>) -> Self {
5596 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5597
5598 let f = wire_.table.get(1);
5599
5600 Self {
5601 f: f.map(|envelope| {
5602 ::fidl_next::FromWire::from_wire(unsafe {
5603 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
5604 })
5605 }),
5606 }
5607 }
5608 }
5609
5610 #[derive(Debug, PartialEq)]
5611 pub struct TableFieldInlinedHandleStruct {
5612 pub t: crate::natural::TableFieldInlinedHandle,
5613 }
5614
5615 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
5616 for TableFieldInlinedHandleStruct
5617 where
5618 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5619 ___E: ::fidl_next::Encoder,
5620 ___E: ::fidl_next::fuchsia::HandleEncoder,
5621 {
5622 #[inline]
5623 fn encode(
5624 self,
5625 encoder_: &mut ___E,
5626 out_: &mut ::core::mem::MaybeUninit<
5627 crate::wire::TableFieldInlinedHandleStruct<'static>,
5628 >,
5629 _: (),
5630 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5631 ::fidl_next::munge! {
5632 let crate::wire::TableFieldInlinedHandleStruct {
5633 t,
5634
5635 } = out_;
5636 }
5637
5638 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5639
5640 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5641
5642 Ok(())
5643 }
5644 }
5645
5646 unsafe impl<___E>
5647 ::fidl_next::EncodeOption<
5648 ::fidl_next::wire::Box<'static, crate::wire::TableFieldInlinedHandleStruct<'static>>,
5649 ___E,
5650 > for TableFieldInlinedHandleStruct
5651 where
5652 ___E: ::fidl_next::Encoder + ?Sized,
5653 TableFieldInlinedHandleStruct:
5654 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>,
5655 {
5656 #[inline]
5657 fn encode_option(
5658 this: ::core::option::Option<Self>,
5659 encoder: &mut ___E,
5660 out: &mut ::core::mem::MaybeUninit<
5661 ::fidl_next::wire::Box<
5662 'static,
5663 crate::wire::TableFieldInlinedHandleStruct<'static>,
5664 >,
5665 >,
5666 _: (),
5667 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5668 if let Some(inner) = this {
5669 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5670 ::fidl_next::wire::Box::encode_present(out);
5671 } else {
5672 ::fidl_next::wire::Box::encode_absent(out);
5673 }
5674
5675 Ok(())
5676 }
5677 }
5678
5679 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldInlinedHandleStruct<'de>>
5680 for TableFieldInlinedHandleStruct
5681 {
5682 #[inline]
5683 fn from_wire(wire: crate::wire::TableFieldInlinedHandleStruct<'de>) -> Self {
5684 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
5685 }
5686 }
5687
5688 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5689 pub struct TableFieldUnknownResource {}
5690
5691 impl TableFieldUnknownResource {
5692 fn __max_ordinal(&self) -> usize {
5693 0
5694 }
5695 }
5696
5697 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>
5698 for TableFieldUnknownResource
5699 where
5700 ___E: ::fidl_next::Encoder + ?Sized,
5701 ___E: ::fidl_next::fuchsia::HandleEncoder,
5702 {
5703 #[inline]
5704 fn encode(
5705 mut self,
5706 encoder: &mut ___E,
5707 out: &mut ::core::mem::MaybeUninit<crate::wire::TableFieldUnknownResource<'static>>,
5708 _: (),
5709 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5710 ::fidl_next::munge!(let crate::wire::TableFieldUnknownResource { table } = out);
5711
5712 let max_ord = self.__max_ordinal();
5713
5714 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5715 ::fidl_next::Wire::zero_padding(&mut out);
5716
5717 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5718 ::fidl_next::wire::Envelope,
5719 >(encoder, max_ord);
5720
5721 for i in 1..=max_ord {
5722 match i {
5723 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5724 }
5725 unsafe {
5726 preallocated.write_next(out.assume_init_ref());
5727 }
5728 }
5729
5730 ::fidl_next::wire::Table::encode_len(table, max_ord);
5731
5732 Ok(())
5733 }
5734 }
5735
5736 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldUnknownResource<'de>>
5737 for TableFieldUnknownResource
5738 {
5739 #[inline]
5740 fn from_wire(wire_: crate::wire::TableFieldUnknownResource<'de>) -> Self {
5741 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5742
5743 Self {}
5744 }
5745 }
5746
5747 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5748 pub struct TableFieldUnknownResourceStruct {
5749 pub t: crate::natural::TableFieldUnknownResource,
5750 }
5751
5752 unsafe impl<___E>
5753 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
5754 for TableFieldUnknownResourceStruct
5755 where
5756 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5757 ___E: ::fidl_next::Encoder,
5758 ___E: ::fidl_next::fuchsia::HandleEncoder,
5759 {
5760 #[inline]
5761 fn encode(
5762 self,
5763 encoder_: &mut ___E,
5764 out_: &mut ::core::mem::MaybeUninit<
5765 crate::wire::TableFieldUnknownResourceStruct<'static>,
5766 >,
5767 _: (),
5768 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5769 ::fidl_next::munge! {
5770 let crate::wire::TableFieldUnknownResourceStruct {
5771 t,
5772
5773 } = out_;
5774 }
5775
5776 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5777
5778 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5779
5780 Ok(())
5781 }
5782 }
5783
5784 unsafe impl<___E>
5785 ::fidl_next::EncodeOption<
5786 ::fidl_next::wire::Box<'static, crate::wire::TableFieldUnknownResourceStruct<'static>>,
5787 ___E,
5788 > for TableFieldUnknownResourceStruct
5789 where
5790 ___E: ::fidl_next::Encoder + ?Sized,
5791 TableFieldUnknownResourceStruct:
5792 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>,
5793 {
5794 #[inline]
5795 fn encode_option(
5796 this: ::core::option::Option<Self>,
5797 encoder: &mut ___E,
5798 out: &mut ::core::mem::MaybeUninit<
5799 ::fidl_next::wire::Box<
5800 'static,
5801 crate::wire::TableFieldUnknownResourceStruct<'static>,
5802 >,
5803 >,
5804 _: (),
5805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5806 if let Some(inner) = this {
5807 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5808 ::fidl_next::wire::Box::encode_present(out);
5809 } else {
5810 ::fidl_next::wire::Box::encode_absent(out);
5811 }
5812
5813 Ok(())
5814 }
5815 }
5816
5817 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldUnknownResourceStruct<'de>>
5818 for TableFieldUnknownResourceStruct
5819 {
5820 #[inline]
5821 fn from_wire(wire: crate::wire::TableFieldUnknownResourceStruct<'de>) -> Self {
5822 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
5823 }
5824 }
5825
5826 #[derive(Debug, Default, PartialEq)]
5827 pub struct TableOfEndpointsTable {
5828 pub client_end: ::core::option::Option<
5829 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5830 >,
5831
5832 pub server_end: ::core::option::Option<
5833 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5834 >,
5835 }
5836
5837 impl TableOfEndpointsTable {
5838 fn __max_ordinal(&self) -> usize {
5839 if self.server_end.is_some() {
5840 return 2;
5841 }
5842
5843 if self.client_end.is_some() {
5844 return 1;
5845 }
5846
5847 0
5848 }
5849 }
5850
5851 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>
5852 for TableOfEndpointsTable
5853 where
5854 ___E: ::fidl_next::Encoder + ?Sized,
5855 ___E: ::fidl_next::fuchsia::HandleEncoder,
5856 {
5857 #[inline]
5858 fn encode(
5859 mut self,
5860 encoder: &mut ___E,
5861 out: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpointsTable<'static>>,
5862 _: (),
5863 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5864 ::fidl_next::munge!(let crate::wire::TableOfEndpointsTable { table } = out);
5865
5866 let max_ord = self.__max_ordinal();
5867
5868 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5869 ::fidl_next::Wire::zero_padding(&mut out);
5870
5871 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5872 ::fidl_next::wire::Envelope,
5873 >(encoder, max_ord);
5874
5875 for i in 1..=max_ord {
5876 match i {
5877 2 => {
5878 if let Some(value) = self.server_end.take() {
5879 ::fidl_next::wire::Envelope::encode_value::<
5880 ::fidl_next::ServerEnd<
5881 crate::Protocol,
5882 ::fidl_next::wire::fuchsia::Channel,
5883 >,
5884 ___E,
5885 >(
5886 value, preallocated.encoder, &mut out, ()
5887 )?;
5888 } else {
5889 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5890 }
5891 }
5892
5893 1 => {
5894 if let Some(value) = self.client_end.take() {
5895 ::fidl_next::wire::Envelope::encode_value::<
5896 ::fidl_next::ClientEnd<
5897 crate::Protocol,
5898 ::fidl_next::wire::fuchsia::Channel,
5899 >,
5900 ___E,
5901 >(
5902 value, preallocated.encoder, &mut out, ()
5903 )?;
5904 } else {
5905 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5906 }
5907 }
5908
5909 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5910 }
5911 unsafe {
5912 preallocated.write_next(out.assume_init_ref());
5913 }
5914 }
5915
5916 ::fidl_next::wire::Table::encode_len(table, max_ord);
5917
5918 Ok(())
5919 }
5920 }
5921
5922 impl<'de> ::fidl_next::FromWire<crate::wire::TableOfEndpointsTable<'de>> for TableOfEndpointsTable {
5923 #[inline]
5924 fn from_wire(wire_: crate::wire::TableOfEndpointsTable<'de>) -> Self {
5925 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5926
5927 let client_end = wire_.table.get(1);
5928
5929 let server_end = wire_.table.get(2);
5930
5931 Self {
5932 client_end: client_end.map(|envelope| {
5933 ::fidl_next::FromWire::from_wire(unsafe {
5934 envelope.read_unchecked::<::fidl_next::ClientEnd<
5935 crate::Protocol,
5936 ::fidl_next::wire::fuchsia::Channel,
5937 >>()
5938 })
5939 }),
5940
5941 server_end: server_end.map(|envelope| {
5942 ::fidl_next::FromWire::from_wire(unsafe {
5943 envelope.read_unchecked::<::fidl_next::ServerEnd<
5944 crate::Protocol,
5945 ::fidl_next::wire::fuchsia::Channel,
5946 >>()
5947 })
5948 }),
5949 }
5950 }
5951 }
5952
5953 #[derive(Debug, PartialEq)]
5954 pub struct TableOfEndpoints {
5955 pub t: crate::natural::TableOfEndpointsTable,
5956 }
5957
5958 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
5959 for TableOfEndpoints
5960 where
5961 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5962 ___E: ::fidl_next::Encoder,
5963 ___E: ::fidl_next::fuchsia::HandleEncoder,
5964 {
5965 #[inline]
5966 fn encode(
5967 self,
5968 encoder_: &mut ___E,
5969 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
5970 _: (),
5971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5972 ::fidl_next::munge! {
5973 let crate::wire::TableOfEndpoints {
5974 t,
5975
5976 } = out_;
5977 }
5978
5979 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5980
5981 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5982
5983 Ok(())
5984 }
5985 }
5986
5987 unsafe impl<___E>
5988 ::fidl_next::EncodeOption<
5989 ::fidl_next::wire::Box<'static, crate::wire::TableOfEndpoints<'static>>,
5990 ___E,
5991 > for TableOfEndpoints
5992 where
5993 ___E: ::fidl_next::Encoder + ?Sized,
5994 TableOfEndpoints: ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>,
5995 {
5996 #[inline]
5997 fn encode_option(
5998 this: ::core::option::Option<Self>,
5999 encoder: &mut ___E,
6000 out: &mut ::core::mem::MaybeUninit<
6001 ::fidl_next::wire::Box<'static, crate::wire::TableOfEndpoints<'static>>,
6002 >,
6003 _: (),
6004 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6005 if let Some(inner) = this {
6006 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6007 ::fidl_next::wire::Box::encode_present(out);
6008 } else {
6009 ::fidl_next::wire::Box::encode_absent(out);
6010 }
6011
6012 Ok(())
6013 }
6014 }
6015
6016 impl<'de> ::fidl_next::FromWire<crate::wire::TableOfEndpoints<'de>> for TableOfEndpoints {
6017 #[inline]
6018 fn from_wire(wire: crate::wire::TableOfEndpoints<'de>) -> Self {
6019 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
6020 }
6021 }
6022
6023 #[derive(Debug, Default, PartialEq)]
6024 pub struct TableUnionWithVectorReservedSandwich {
6025 pub uv: ::core::option::Option<crate::natural::UnionWithVector>,
6026 }
6027
6028 impl TableUnionWithVectorReservedSandwich {
6029 fn __max_ordinal(&self) -> usize {
6030 if self.uv.is_some() {
6031 return 2;
6032 }
6033
6034 0
6035 }
6036 }
6037
6038 unsafe impl<___E>
6039 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>
6040 for TableUnionWithVectorReservedSandwich
6041 where
6042 ___E: ::fidl_next::Encoder + ?Sized,
6043 ___E: ::fidl_next::fuchsia::HandleEncoder,
6044 {
6045 #[inline]
6046 fn encode(
6047 mut self,
6048 encoder: &mut ___E,
6049 out: &mut ::core::mem::MaybeUninit<
6050 crate::wire::TableUnionWithVectorReservedSandwich<'static>,
6051 >,
6052 _: (),
6053 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6054 ::fidl_next::munge!(let crate::wire::TableUnionWithVectorReservedSandwich { table } = out);
6055
6056 let max_ord = self.__max_ordinal();
6057
6058 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6059 ::fidl_next::Wire::zero_padding(&mut out);
6060
6061 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6062 ::fidl_next::wire::Envelope,
6063 >(encoder, max_ord);
6064
6065 for i in 1..=max_ord {
6066 match i {
6067 2 => {
6068 if let Some(value) = self.uv.take() {
6069 ::fidl_next::wire::Envelope::encode_value::<
6070 crate::wire::UnionWithVector<'static>,
6071 ___E,
6072 >(
6073 value, preallocated.encoder, &mut out, ()
6074 )?;
6075 } else {
6076 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6077 }
6078 }
6079
6080 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6081 }
6082 unsafe {
6083 preallocated.write_next(out.assume_init_ref());
6084 }
6085 }
6086
6087 ::fidl_next::wire::Table::encode_len(table, max_ord);
6088
6089 Ok(())
6090 }
6091 }
6092
6093 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorReservedSandwich<'de>>
6094 for TableUnionWithVectorReservedSandwich
6095 {
6096 #[inline]
6097 fn from_wire(wire_: crate::wire::TableUnionWithVectorReservedSandwich<'de>) -> Self {
6098 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6099
6100 let uv = wire_.table.get(2);
6101
6102 Self {
6103 uv: uv.map(|envelope| {
6104 ::fidl_next::FromWire::from_wire(unsafe {
6105 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
6106 })
6107 }),
6108 }
6109 }
6110 }
6111
6112 #[derive(Debug, PartialEq)]
6113 pub struct TableUnionWithVectorReservedSandwichStruct {
6114 pub table: crate::natural::TableUnionWithVectorReservedSandwich,
6115 }
6116
6117 unsafe impl<___E>
6118 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
6119 for TableUnionWithVectorReservedSandwichStruct
6120 where
6121 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6122 ___E: ::fidl_next::Encoder,
6123 ___E: ::fidl_next::fuchsia::HandleEncoder,
6124 {
6125 #[inline]
6126 fn encode(
6127 self,
6128 encoder_: &mut ___E,
6129 out_: &mut ::core::mem::MaybeUninit<
6130 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6131 >,
6132 _: (),
6133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6134 ::fidl_next::munge! {
6135 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
6136 table,
6137
6138 } = out_;
6139 }
6140
6141 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
6142
6143 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
6144
6145 Ok(())
6146 }
6147 }
6148
6149 unsafe impl<___E>
6150 ::fidl_next::EncodeOption<
6151 ::fidl_next::wire::Box<
6152 'static,
6153 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6154 >,
6155 ___E,
6156 > for TableUnionWithVectorReservedSandwichStruct
6157 where
6158 ___E: ::fidl_next::Encoder + ?Sized,
6159 TableUnionWithVectorReservedSandwichStruct: ::fidl_next::Encode<
6160 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6161 ___E,
6162 >,
6163 {
6164 #[inline]
6165 fn encode_option(
6166 this: ::core::option::Option<Self>,
6167 encoder: &mut ___E,
6168 out: &mut ::core::mem::MaybeUninit<
6169 ::fidl_next::wire::Box<
6170 'static,
6171 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6172 >,
6173 >,
6174 _: (),
6175 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6176 if let Some(inner) = this {
6177 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6178 ::fidl_next::wire::Box::encode_present(out);
6179 } else {
6180 ::fidl_next::wire::Box::encode_absent(out);
6181 }
6182
6183 Ok(())
6184 }
6185 }
6186
6187 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorReservedSandwichStruct<'de>>
6188 for TableUnionWithVectorReservedSandwichStruct
6189 {
6190 #[inline]
6191 fn from_wire(wire: crate::wire::TableUnionWithVectorReservedSandwichStruct<'de>) -> Self {
6192 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
6193 }
6194 }
6195
6196 #[derive(Debug, Default, PartialEq)]
6197 pub struct TableUnionWithVectorStructSandwich {
6198 pub s1: ::core::option::Option<crate::natural::StructSize3Align1>,
6199
6200 pub uv: ::core::option::Option<crate::natural::UnionWithVector>,
6201
6202 pub s2: ::core::option::Option<crate::natural::StructSize3Align1>,
6203 }
6204
6205 impl TableUnionWithVectorStructSandwich {
6206 fn __max_ordinal(&self) -> usize {
6207 if self.s2.is_some() {
6208 return 3;
6209 }
6210
6211 if self.uv.is_some() {
6212 return 2;
6213 }
6214
6215 if self.s1.is_some() {
6216 return 1;
6217 }
6218
6219 0
6220 }
6221 }
6222
6223 unsafe impl<___E>
6224 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>
6225 for TableUnionWithVectorStructSandwich
6226 where
6227 ___E: ::fidl_next::Encoder + ?Sized,
6228 ___E: ::fidl_next::fuchsia::HandleEncoder,
6229 {
6230 #[inline]
6231 fn encode(
6232 mut self,
6233 encoder: &mut ___E,
6234 out: &mut ::core::mem::MaybeUninit<
6235 crate::wire::TableUnionWithVectorStructSandwich<'static>,
6236 >,
6237 _: (),
6238 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6239 ::fidl_next::munge!(let crate::wire::TableUnionWithVectorStructSandwich { table } = out);
6240
6241 let max_ord = self.__max_ordinal();
6242
6243 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6244 ::fidl_next::Wire::zero_padding(&mut out);
6245
6246 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6247 ::fidl_next::wire::Envelope,
6248 >(encoder, max_ord);
6249
6250 for i in 1..=max_ord {
6251 match i {
6252 3 => {
6253 if let Some(value) = self.s2.take() {
6254 ::fidl_next::wire::Envelope::encode_value::<
6255 crate::wire::StructSize3Align1,
6256 ___E,
6257 >(
6258 value, preallocated.encoder, &mut out, ()
6259 )?;
6260 } else {
6261 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6262 }
6263 }
6264
6265 2 => {
6266 if let Some(value) = self.uv.take() {
6267 ::fidl_next::wire::Envelope::encode_value::<
6268 crate::wire::UnionWithVector<'static>,
6269 ___E,
6270 >(
6271 value, preallocated.encoder, &mut out, ()
6272 )?;
6273 } else {
6274 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6275 }
6276 }
6277
6278 1 => {
6279 if let Some(value) = self.s1.take() {
6280 ::fidl_next::wire::Envelope::encode_value::<
6281 crate::wire::StructSize3Align1,
6282 ___E,
6283 >(
6284 value, preallocated.encoder, &mut out, ()
6285 )?;
6286 } else {
6287 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6288 }
6289 }
6290
6291 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6292 }
6293 unsafe {
6294 preallocated.write_next(out.assume_init_ref());
6295 }
6296 }
6297
6298 ::fidl_next::wire::Table::encode_len(table, max_ord);
6299
6300 Ok(())
6301 }
6302 }
6303
6304 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorStructSandwich<'de>>
6305 for TableUnionWithVectorStructSandwich
6306 {
6307 #[inline]
6308 fn from_wire(wire_: crate::wire::TableUnionWithVectorStructSandwich<'de>) -> Self {
6309 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6310
6311 let s1 = wire_.table.get(1);
6312
6313 let uv = wire_.table.get(2);
6314
6315 let s2 = wire_.table.get(3);
6316
6317 Self {
6318 s1: s1.map(|envelope| {
6319 ::fidl_next::FromWire::from_wire(unsafe {
6320 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
6321 })
6322 }),
6323
6324 uv: uv.map(|envelope| {
6325 ::fidl_next::FromWire::from_wire(unsafe {
6326 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
6327 })
6328 }),
6329
6330 s2: s2.map(|envelope| {
6331 ::fidl_next::FromWire::from_wire(unsafe {
6332 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
6333 })
6334 }),
6335 }
6336 }
6337 }
6338
6339 #[derive(Debug, PartialEq)]
6340 pub struct TableUnionWithVectorStructSandwichStruct {
6341 pub table: crate::natural::TableUnionWithVectorStructSandwich,
6342 }
6343
6344 unsafe impl<___E>
6345 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
6346 for TableUnionWithVectorStructSandwichStruct
6347 where
6348 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6349 ___E: ::fidl_next::Encoder,
6350 ___E: ::fidl_next::fuchsia::HandleEncoder,
6351 {
6352 #[inline]
6353 fn encode(
6354 self,
6355 encoder_: &mut ___E,
6356 out_: &mut ::core::mem::MaybeUninit<
6357 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6358 >,
6359 _: (),
6360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6361 ::fidl_next::munge! {
6362 let crate::wire::TableUnionWithVectorStructSandwichStruct {
6363 table,
6364
6365 } = out_;
6366 }
6367
6368 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
6369
6370 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
6371
6372 Ok(())
6373 }
6374 }
6375
6376 unsafe impl<___E>
6377 ::fidl_next::EncodeOption<
6378 ::fidl_next::wire::Box<
6379 'static,
6380 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6381 >,
6382 ___E,
6383 > for TableUnionWithVectorStructSandwichStruct
6384 where
6385 ___E: ::fidl_next::Encoder + ?Sized,
6386 TableUnionWithVectorStructSandwichStruct: ::fidl_next::Encode<
6387 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6388 ___E,
6389 >,
6390 {
6391 #[inline]
6392 fn encode_option(
6393 this: ::core::option::Option<Self>,
6394 encoder: &mut ___E,
6395 out: &mut ::core::mem::MaybeUninit<
6396 ::fidl_next::wire::Box<
6397 'static,
6398 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6399 >,
6400 >,
6401 _: (),
6402 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6403 if let Some(inner) = this {
6404 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6405 ::fidl_next::wire::Box::encode_present(out);
6406 } else {
6407 ::fidl_next::wire::Box::encode_absent(out);
6408 }
6409
6410 Ok(())
6411 }
6412 }
6413
6414 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorStructSandwichStruct<'de>>
6415 for TableUnionWithVectorStructSandwichStruct
6416 {
6417 #[inline]
6418 fn from_wire(wire: crate::wire::TableUnionWithVectorStructSandwichStruct<'de>) -> Self {
6419 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
6420 }
6421 }
6422
6423 #[derive(Debug, Default, PartialEq)]
6424 pub struct TableWithUnknownEnvelopesAfterKnownEnvelopes {
6425 pub a: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
6426 }
6427
6428 impl TableWithUnknownEnvelopesAfterKnownEnvelopes {
6429 fn __max_ordinal(&self) -> usize {
6430 if self.a.is_some() {
6431 return 1;
6432 }
6433
6434 0
6435 }
6436 }
6437
6438 unsafe impl<___E>
6439 ::fidl_next::Encode<
6440 crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'static>,
6441 ___E,
6442 > for TableWithUnknownEnvelopesAfterKnownEnvelopes
6443 where
6444 ___E: ::fidl_next::Encoder + ?Sized,
6445 ___E: ::fidl_next::fuchsia::HandleEncoder,
6446 {
6447 #[inline]
6448 fn encode(
6449 mut self,
6450 encoder: &mut ___E,
6451 out: &mut ::core::mem::MaybeUninit<
6452 crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'static>,
6453 >,
6454 _: (),
6455 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6456 ::fidl_next::munge!(let crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes { table } = out);
6457
6458 let max_ord = self.__max_ordinal();
6459
6460 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6461 ::fidl_next::Wire::zero_padding(&mut out);
6462
6463 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6464 ::fidl_next::wire::Envelope,
6465 >(encoder, max_ord);
6466
6467 for i in 1..=max_ord {
6468 match i {
6469 1 => {
6470 if let Some(value) = self.a.take() {
6471 ::fidl_next::wire::Envelope::encode_value::<
6472 ::fidl_next::wire::fuchsia::Event,
6473 ___E,
6474 >(
6475 value, preallocated.encoder, &mut out, ()
6476 )?;
6477 } else {
6478 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6479 }
6480 }
6481
6482 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6483 }
6484 unsafe {
6485 preallocated.write_next(out.assume_init_ref());
6486 }
6487 }
6488
6489 ::fidl_next::wire::Table::encode_len(table, max_ord);
6490
6491 Ok(())
6492 }
6493 }
6494
6495 impl<'de> ::fidl_next::FromWire<crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>>
6496 for TableWithUnknownEnvelopesAfterKnownEnvelopes
6497 {
6498 #[inline]
6499 fn from_wire(
6500 wire_: crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>,
6501 ) -> Self {
6502 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6503
6504 let a = wire_.table.get(1);
6505
6506 Self {
6507 a: a.map(|envelope| {
6508 ::fidl_next::FromWire::from_wire(unsafe {
6509 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
6510 })
6511 }),
6512 }
6513 }
6514 }
6515
6516 #[derive(Debug, PartialEq)]
6517 pub struct TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
6518 pub t: crate::natural::TableWithUnknownEnvelopesAfterKnownEnvelopes,
6519 }
6520
6521 unsafe impl<___E>
6522 ::fidl_next::Encode<
6523 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6524 ___E,
6525 > for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
6526 where
6527 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6528 ___E: ::fidl_next::Encoder,
6529 ___E: ::fidl_next::fuchsia::HandleEncoder,
6530 {
6531 #[inline]
6532 fn encode(
6533 self,
6534 encoder_: &mut ___E,
6535 out_: &mut ::core::mem::MaybeUninit<
6536 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6537 >,
6538 _: (),
6539 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6540 ::fidl_next::munge! {
6541 let crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
6542 t,
6543
6544 } = out_;
6545 }
6546
6547 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
6548
6549 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
6550
6551 Ok(())
6552 }
6553 }
6554
6555 unsafe impl<___E>
6556 ::fidl_next::EncodeOption<
6557 ::fidl_next::wire::Box<
6558 'static,
6559 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6560 >,
6561 ___E,
6562 > for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
6563 where
6564 ___E: ::fidl_next::Encoder + ?Sized,
6565 TableWithUnknownEnveloepsAfterKnownEnvelopesStruct: ::fidl_next::Encode<
6566 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6567 ___E,
6568 >,
6569 {
6570 #[inline]
6571 fn encode_option(
6572 this: ::core::option::Option<Self>,
6573 encoder: &mut ___E,
6574 out: &mut ::core::mem::MaybeUninit<
6575 ::fidl_next::wire::Box<
6576 'static,
6577 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6578 >,
6579 >,
6580 _: (),
6581 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6582 if let Some(inner) = this {
6583 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6584 ::fidl_next::wire::Box::encode_present(out);
6585 } else {
6586 ::fidl_next::wire::Box::encode_absent(out);
6587 }
6588
6589 Ok(())
6590 }
6591 }
6592
6593 impl<'de>
6594 ::fidl_next::FromWire<crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de>>
6595 for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
6596 {
6597 #[inline]
6598 fn from_wire(
6599 wire: crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de>,
6600 ) -> Self {
6601 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
6602 }
6603 }
6604
6605 #[derive(Debug, Default, PartialEq)]
6606 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopes {
6607 pub b: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
6608 }
6609
6610 impl TableWithUnknownEnvelopesBeforeKnownEnvelopes {
6611 fn __max_ordinal(&self) -> usize {
6612 if self.b.is_some() {
6613 return 2;
6614 }
6615
6616 0
6617 }
6618 }
6619
6620 unsafe impl<___E>
6621 ::fidl_next::Encode<
6622 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static>,
6623 ___E,
6624 > for TableWithUnknownEnvelopesBeforeKnownEnvelopes
6625 where
6626 ___E: ::fidl_next::Encoder + ?Sized,
6627 ___E: ::fidl_next::fuchsia::HandleEncoder,
6628 {
6629 #[inline]
6630 fn encode(
6631 mut self,
6632 encoder: &mut ___E,
6633 out: &mut ::core::mem::MaybeUninit<
6634 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static>,
6635 >,
6636 _: (),
6637 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6638 ::fidl_next::munge!(let crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes { table } = out);
6639
6640 let max_ord = self.__max_ordinal();
6641
6642 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6643 ::fidl_next::Wire::zero_padding(&mut out);
6644
6645 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6646 ::fidl_next::wire::Envelope,
6647 >(encoder, max_ord);
6648
6649 for i in 1..=max_ord {
6650 match i {
6651 2 => {
6652 if let Some(value) = self.b.take() {
6653 ::fidl_next::wire::Envelope::encode_value::<
6654 ::fidl_next::wire::fuchsia::Event,
6655 ___E,
6656 >(
6657 value, preallocated.encoder, &mut out, ()
6658 )?;
6659 } else {
6660 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6661 }
6662 }
6663
6664 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6665 }
6666 unsafe {
6667 preallocated.write_next(out.assume_init_ref());
6668 }
6669 }
6670
6671 ::fidl_next::wire::Table::encode_len(table, max_ord);
6672
6673 Ok(())
6674 }
6675 }
6676
6677 impl<'de> ::fidl_next::FromWire<crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>>
6678 for TableWithUnknownEnvelopesBeforeKnownEnvelopes
6679 {
6680 #[inline]
6681 fn from_wire(
6682 wire_: crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>,
6683 ) -> Self {
6684 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6685
6686 let b = wire_.table.get(2);
6687
6688 Self {
6689 b: b.map(|envelope| {
6690 ::fidl_next::FromWire::from_wire(unsafe {
6691 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
6692 })
6693 }),
6694 }
6695 }
6696 }
6697
6698 #[derive(Debug, PartialEq)]
6699 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
6700 pub t: crate::natural::TableWithUnknownEnvelopesBeforeKnownEnvelopes,
6701 }
6702
6703 unsafe impl<___E>
6704 ::fidl_next::Encode<
6705 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6706 ___E,
6707 > for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
6708 where
6709 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6710 ___E: ::fidl_next::Encoder,
6711 ___E: ::fidl_next::fuchsia::HandleEncoder,
6712 {
6713 #[inline]
6714 fn encode(
6715 self,
6716 encoder_: &mut ___E,
6717 out_: &mut ::core::mem::MaybeUninit<
6718 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6719 >,
6720 _: (),
6721 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6722 ::fidl_next::munge! {
6723 let crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
6724 t,
6725
6726 } = out_;
6727 }
6728
6729 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
6730
6731 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
6732
6733 Ok(())
6734 }
6735 }
6736
6737 unsafe impl<___E>
6738 ::fidl_next::EncodeOption<
6739 ::fidl_next::wire::Box<
6740 'static,
6741 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6742 >,
6743 ___E,
6744 > for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
6745 where
6746 ___E: ::fidl_next::Encoder + ?Sized,
6747 TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct: ::fidl_next::Encode<
6748 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6749 ___E,
6750 >,
6751 {
6752 #[inline]
6753 fn encode_option(
6754 this: ::core::option::Option<Self>,
6755 encoder: &mut ___E,
6756 out: &mut ::core::mem::MaybeUninit<
6757 ::fidl_next::wire::Box<
6758 'static,
6759 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6760 >,
6761 >,
6762 _: (),
6763 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6764 if let Some(inner) = this {
6765 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6766 ::fidl_next::wire::Box::encode_present(out);
6767 } else {
6768 ::fidl_next::wire::Box::encode_absent(out);
6769 }
6770
6771 Ok(())
6772 }
6773 }
6774
6775 impl<'de>
6776 ::fidl_next::FromWire<crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de>>
6777 for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
6778 {
6779 #[inline]
6780 fn from_wire(
6781 wire: crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de>,
6782 ) -> Self {
6783 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
6784 }
6785 }
6786
6787 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6788 pub struct TestFlexibleResourceXUnionInStruct {
6789 pub xu: crate::natural::SampleResourceXUnion,
6790 }
6791
6792 unsafe impl<___E>
6793 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
6794 for TestFlexibleResourceXUnionInStruct
6795 where
6796 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6797 ___E: ::fidl_next::Encoder,
6798 ___E: ::fidl_next::fuchsia::HandleEncoder,
6799 {
6800 #[inline]
6801 fn encode(
6802 self,
6803 encoder_: &mut ___E,
6804 out_: &mut ::core::mem::MaybeUninit<
6805 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6806 >,
6807 _: (),
6808 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6809 ::fidl_next::munge! {
6810 let crate::wire::TestFlexibleResourceXUnionInStruct {
6811 xu,
6812
6813 } = out_;
6814 }
6815
6816 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6817
6818 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6819
6820 Ok(())
6821 }
6822 }
6823
6824 unsafe impl<___E>
6825 ::fidl_next::EncodeOption<
6826 ::fidl_next::wire::Box<
6827 'static,
6828 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6829 >,
6830 ___E,
6831 > for TestFlexibleResourceXUnionInStruct
6832 where
6833 ___E: ::fidl_next::Encoder + ?Sized,
6834 TestFlexibleResourceXUnionInStruct:
6835 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>,
6836 {
6837 #[inline]
6838 fn encode_option(
6839 this: ::core::option::Option<Self>,
6840 encoder: &mut ___E,
6841 out: &mut ::core::mem::MaybeUninit<
6842 ::fidl_next::wire::Box<
6843 'static,
6844 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6845 >,
6846 >,
6847 _: (),
6848 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6849 if let Some(inner) = this {
6850 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6851 ::fidl_next::wire::Box::encode_present(out);
6852 } else {
6853 ::fidl_next::wire::Box::encode_absent(out);
6854 }
6855
6856 Ok(())
6857 }
6858 }
6859
6860 impl<'de> ::fidl_next::FromWire<crate::wire::TestFlexibleResourceXUnionInStruct<'de>>
6861 for TestFlexibleResourceXUnionInStruct
6862 {
6863 #[inline]
6864 fn from_wire(wire: crate::wire::TestFlexibleResourceXUnionInStruct<'de>) -> Self {
6865 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6866 }
6867 }
6868
6869 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6870 pub struct TestOptionalFlexibleResourceXUnionInStruct {
6871 pub xu: ::core::option::Option<::std::boxed::Box<crate::natural::SampleResourceXUnion>>,
6872 }
6873
6874 unsafe impl<___E>
6875 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
6876 for TestOptionalFlexibleResourceXUnionInStruct
6877 where
6878 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6879 ___E: ::fidl_next::Encoder,
6880 ___E: ::fidl_next::fuchsia::HandleEncoder,
6881 {
6882 #[inline]
6883 fn encode(
6884 self,
6885 encoder_: &mut ___E,
6886 out_: &mut ::core::mem::MaybeUninit<
6887 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6888 >,
6889 _: (),
6890 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6891 ::fidl_next::munge! {
6892 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
6893 xu,
6894
6895 } = out_;
6896 }
6897
6898 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6899
6900 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6901
6902 Ok(())
6903 }
6904 }
6905
6906 unsafe impl<___E>
6907 ::fidl_next::EncodeOption<
6908 ::fidl_next::wire::Box<
6909 'static,
6910 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6911 >,
6912 ___E,
6913 > for TestOptionalFlexibleResourceXUnionInStruct
6914 where
6915 ___E: ::fidl_next::Encoder + ?Sized,
6916 TestOptionalFlexibleResourceXUnionInStruct: ::fidl_next::Encode<
6917 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6918 ___E,
6919 >,
6920 {
6921 #[inline]
6922 fn encode_option(
6923 this: ::core::option::Option<Self>,
6924 encoder: &mut ___E,
6925 out: &mut ::core::mem::MaybeUninit<
6926 ::fidl_next::wire::Box<
6927 'static,
6928 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6929 >,
6930 >,
6931 _: (),
6932 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6933 if let Some(inner) = this {
6934 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6935 ::fidl_next::wire::Box::encode_present(out);
6936 } else {
6937 ::fidl_next::wire::Box::encode_absent(out);
6938 }
6939
6940 Ok(())
6941 }
6942 }
6943
6944 impl<'de> ::fidl_next::FromWire<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'de>>
6945 for TestOptionalFlexibleResourceXUnionInStruct
6946 {
6947 #[inline]
6948 fn from_wire(wire: crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'de>) -> Self {
6949 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6950 }
6951 }
6952
6953 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6954 pub struct TestOptionalStrictResourceXUnionInStruct {
6955 pub xu:
6956 ::core::option::Option<::std::boxed::Box<crate::natural::SampleStrictResourceXUnion>>,
6957 }
6958
6959 unsafe impl<___E>
6960 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
6961 for TestOptionalStrictResourceXUnionInStruct
6962 where
6963 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6964 ___E: ::fidl_next::Encoder,
6965 ___E: ::fidl_next::fuchsia::HandleEncoder,
6966 {
6967 #[inline]
6968 fn encode(
6969 self,
6970 encoder_: &mut ___E,
6971 out_: &mut ::core::mem::MaybeUninit<
6972 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6973 >,
6974 _: (),
6975 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6976 ::fidl_next::munge! {
6977 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
6978 xu,
6979
6980 } = out_;
6981 }
6982
6983 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6984
6985 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6986
6987 Ok(())
6988 }
6989 }
6990
6991 unsafe impl<___E>
6992 ::fidl_next::EncodeOption<
6993 ::fidl_next::wire::Box<
6994 'static,
6995 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6996 >,
6997 ___E,
6998 > for TestOptionalStrictResourceXUnionInStruct
6999 where
7000 ___E: ::fidl_next::Encoder + ?Sized,
7001 TestOptionalStrictResourceXUnionInStruct: ::fidl_next::Encode<
7002 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
7003 ___E,
7004 >,
7005 {
7006 #[inline]
7007 fn encode_option(
7008 this: ::core::option::Option<Self>,
7009 encoder: &mut ___E,
7010 out: &mut ::core::mem::MaybeUninit<
7011 ::fidl_next::wire::Box<
7012 'static,
7013 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
7014 >,
7015 >,
7016 _: (),
7017 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7018 if let Some(inner) = this {
7019 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7020 ::fidl_next::wire::Box::encode_present(out);
7021 } else {
7022 ::fidl_next::wire::Box::encode_absent(out);
7023 }
7024
7025 Ok(())
7026 }
7027 }
7028
7029 impl<'de> ::fidl_next::FromWire<crate::wire::TestOptionalStrictResourceXUnionInStruct<'de>>
7030 for TestOptionalStrictResourceXUnionInStruct
7031 {
7032 #[inline]
7033 fn from_wire(wire: crate::wire::TestOptionalStrictResourceXUnionInStruct<'de>) -> Self {
7034 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
7035 }
7036 }
7037
7038 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7039 pub struct TestPackageResolverResolveRequest {
7040 pub package_url: ::std::string::String,
7041
7042 pub selectors: ::std::vec::Vec<::std::string::String>,
7043
7044 pub update_policy: crate::natural::UpdatePolicy,
7045
7046 pub this_should_be_a_handle: u32,
7047 }
7048
7049 unsafe impl<___E>
7050 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
7051 for TestPackageResolverResolveRequest
7052 where
7053 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7054 ___E: ::fidl_next::Encoder,
7055 ___E: ::fidl_next::fuchsia::HandleEncoder,
7056 {
7057 #[inline]
7058 fn encode(
7059 self,
7060 encoder_: &mut ___E,
7061 out_: &mut ::core::mem::MaybeUninit<
7062 crate::wire::TestPackageResolverResolveRequest<'static>,
7063 >,
7064 _: (),
7065 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7066 ::fidl_next::munge! {
7067 let crate::wire::TestPackageResolverResolveRequest {
7068 package_url,
7069 selectors,
7070 update_policy,
7071 this_should_be_a_handle,
7072
7073 } = out_;
7074 }
7075
7076 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
7077
7078 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(package_url.as_mut_ptr()) };
7079 ::fidl_next::Constrained::validate(_field, 4294967295)?;
7080
7081 ::fidl_next::Encode::encode(
7082 self.selectors,
7083 encoder_,
7084 selectors,
7085 (4294967295, 4294967295),
7086 )?;
7087
7088 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(selectors.as_mut_ptr()) };
7089 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
7090
7091 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
7092
7093 let mut _field =
7094 unsafe { ::fidl_next::Slot::new_unchecked(update_policy.as_mut_ptr()) };
7095
7096 ::fidl_next::Encode::encode(
7097 self.this_should_be_a_handle,
7098 encoder_,
7099 this_should_be_a_handle,
7100 (),
7101 )?;
7102
7103 let mut _field =
7104 unsafe { ::fidl_next::Slot::new_unchecked(this_should_be_a_handle.as_mut_ptr()) };
7105
7106 Ok(())
7107 }
7108 }
7109
7110 unsafe impl<___E>
7111 ::fidl_next::EncodeOption<
7112 ::fidl_next::wire::Box<
7113 'static,
7114 crate::wire::TestPackageResolverResolveRequest<'static>,
7115 >,
7116 ___E,
7117 > for TestPackageResolverResolveRequest
7118 where
7119 ___E: ::fidl_next::Encoder + ?Sized,
7120 TestPackageResolverResolveRequest:
7121 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>,
7122 {
7123 #[inline]
7124 fn encode_option(
7125 this: ::core::option::Option<Self>,
7126 encoder: &mut ___E,
7127 out: &mut ::core::mem::MaybeUninit<
7128 ::fidl_next::wire::Box<
7129 'static,
7130 crate::wire::TestPackageResolverResolveRequest<'static>,
7131 >,
7132 >,
7133 _: (),
7134 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7135 if let Some(inner) = this {
7136 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7137 ::fidl_next::wire::Box::encode_present(out);
7138 } else {
7139 ::fidl_next::wire::Box::encode_absent(out);
7140 }
7141
7142 Ok(())
7143 }
7144 }
7145
7146 impl<'de> ::fidl_next::FromWire<crate::wire::TestPackageResolverResolveRequest<'de>>
7147 for TestPackageResolverResolveRequest
7148 {
7149 #[inline]
7150 fn from_wire(wire: crate::wire::TestPackageResolverResolveRequest<'de>) -> Self {
7151 Self {
7152 package_url: ::fidl_next::FromWire::from_wire(wire.package_url),
7153
7154 selectors: ::fidl_next::FromWire::from_wire(wire.selectors),
7155
7156 update_policy: ::fidl_next::FromWire::from_wire(wire.update_policy),
7157
7158 this_should_be_a_handle: ::fidl_next::FromWire::from_wire(
7159 wire.this_should_be_a_handle,
7160 ),
7161 }
7162 }
7163 }
7164
7165 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7166 pub struct TestStrictResourceXUnionInStruct {
7167 pub xu: crate::natural::SampleStrictResourceXUnion,
7168 }
7169
7170 unsafe impl<___E>
7171 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
7172 for TestStrictResourceXUnionInStruct
7173 where
7174 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7175 ___E: ::fidl_next::Encoder,
7176 ___E: ::fidl_next::fuchsia::HandleEncoder,
7177 {
7178 #[inline]
7179 fn encode(
7180 self,
7181 encoder_: &mut ___E,
7182 out_: &mut ::core::mem::MaybeUninit<
7183 crate::wire::TestStrictResourceXUnionInStruct<'static>,
7184 >,
7185 _: (),
7186 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7187 ::fidl_next::munge! {
7188 let crate::wire::TestStrictResourceXUnionInStruct {
7189 xu,
7190
7191 } = out_;
7192 }
7193
7194 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
7195
7196 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
7197
7198 Ok(())
7199 }
7200 }
7201
7202 unsafe impl<___E>
7203 ::fidl_next::EncodeOption<
7204 ::fidl_next::wire::Box<'static, crate::wire::TestStrictResourceXUnionInStruct<'static>>,
7205 ___E,
7206 > for TestStrictResourceXUnionInStruct
7207 where
7208 ___E: ::fidl_next::Encoder + ?Sized,
7209 TestStrictResourceXUnionInStruct:
7210 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>,
7211 {
7212 #[inline]
7213 fn encode_option(
7214 this: ::core::option::Option<Self>,
7215 encoder: &mut ___E,
7216 out: &mut ::core::mem::MaybeUninit<
7217 ::fidl_next::wire::Box<
7218 'static,
7219 crate::wire::TestStrictResourceXUnionInStruct<'static>,
7220 >,
7221 >,
7222 _: (),
7223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7224 if let Some(inner) = this {
7225 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7226 ::fidl_next::wire::Box::encode_present(out);
7227 } else {
7228 ::fidl_next::wire::Box::encode_absent(out);
7229 }
7230
7231 Ok(())
7232 }
7233 }
7234
7235 impl<'de> ::fidl_next::FromWire<crate::wire::TestStrictResourceXUnionInStruct<'de>>
7236 for TestStrictResourceXUnionInStruct
7237 {
7238 #[inline]
7239 fn from_wire(wire: crate::wire::TestStrictResourceXUnionInStruct<'de>) -> Self {
7240 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
7241 }
7242 }
7243
7244 #[derive(Debug, PartialEq)]
7245 pub struct UnboundedNonnullableVectorOfHandles {
7246 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
7247 }
7248
7249 unsafe impl<___E>
7250 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
7251 for UnboundedNonnullableVectorOfHandles
7252 where
7253 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7254 ___E: ::fidl_next::Encoder,
7255 ___E: ::fidl_next::fuchsia::HandleEncoder,
7256 {
7257 #[inline]
7258 fn encode(
7259 self,
7260 encoder_: &mut ___E,
7261 out_: &mut ::core::mem::MaybeUninit<
7262 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
7263 >,
7264 _: (),
7265 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7266 ::fidl_next::munge! {
7267 let crate::wire::UnboundedNonnullableVectorOfHandles {
7268 vh0,
7269
7270 } = out_;
7271 }
7272
7273 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
7274
7275 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
7276 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
7277
7278 Ok(())
7279 }
7280 }
7281
7282 unsafe impl<___E>
7283 ::fidl_next::EncodeOption<
7284 ::fidl_next::wire::Box<
7285 'static,
7286 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
7287 >,
7288 ___E,
7289 > for UnboundedNonnullableVectorOfHandles
7290 where
7291 ___E: ::fidl_next::Encoder + ?Sized,
7292 UnboundedNonnullableVectorOfHandles:
7293 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>,
7294 {
7295 #[inline]
7296 fn encode_option(
7297 this: ::core::option::Option<Self>,
7298 encoder: &mut ___E,
7299 out: &mut ::core::mem::MaybeUninit<
7300 ::fidl_next::wire::Box<
7301 'static,
7302 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
7303 >,
7304 >,
7305 _: (),
7306 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7307 if let Some(inner) = this {
7308 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7309 ::fidl_next::wire::Box::encode_present(out);
7310 } else {
7311 ::fidl_next::wire::Box::encode_absent(out);
7312 }
7313
7314 Ok(())
7315 }
7316 }
7317
7318 impl<'de> ::fidl_next::FromWire<crate::wire::UnboundedNonnullableVectorOfHandles<'de>>
7319 for UnboundedNonnullableVectorOfHandles
7320 {
7321 #[inline]
7322 fn from_wire(wire: crate::wire::UnboundedNonnullableVectorOfHandles<'de>) -> Self {
7323 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
7324 }
7325 }
7326
7327 #[derive(Debug, PartialEq)]
7328 pub struct UnboundedNullableVectorOfHandles {
7329 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
7330 }
7331
7332 unsafe impl<___E>
7333 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
7334 for UnboundedNullableVectorOfHandles
7335 where
7336 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7337 ___E: ::fidl_next::Encoder,
7338 ___E: ::fidl_next::fuchsia::HandleEncoder,
7339 {
7340 #[inline]
7341 fn encode(
7342 self,
7343 encoder_: &mut ___E,
7344 out_: &mut ::core::mem::MaybeUninit<
7345 crate::wire::UnboundedNullableVectorOfHandles<'static>,
7346 >,
7347 _: (),
7348 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7349 ::fidl_next::munge! {
7350 let crate::wire::UnboundedNullableVectorOfHandles {
7351 vh0,
7352
7353 } = out_;
7354 }
7355
7356 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
7357
7358 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
7359 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
7360
7361 Ok(())
7362 }
7363 }
7364
7365 unsafe impl<___E>
7366 ::fidl_next::EncodeOption<
7367 ::fidl_next::wire::Box<'static, crate::wire::UnboundedNullableVectorOfHandles<'static>>,
7368 ___E,
7369 > for UnboundedNullableVectorOfHandles
7370 where
7371 ___E: ::fidl_next::Encoder + ?Sized,
7372 UnboundedNullableVectorOfHandles:
7373 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>,
7374 {
7375 #[inline]
7376 fn encode_option(
7377 this: ::core::option::Option<Self>,
7378 encoder: &mut ___E,
7379 out: &mut ::core::mem::MaybeUninit<
7380 ::fidl_next::wire::Box<
7381 'static,
7382 crate::wire::UnboundedNullableVectorOfHandles<'static>,
7383 >,
7384 >,
7385 _: (),
7386 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7387 if let Some(inner) = this {
7388 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7389 ::fidl_next::wire::Box::encode_present(out);
7390 } else {
7391 ::fidl_next::wire::Box::encode_absent(out);
7392 }
7393
7394 Ok(())
7395 }
7396 }
7397
7398 impl<'de> ::fidl_next::FromWire<crate::wire::UnboundedNullableVectorOfHandles<'de>>
7399 for UnboundedNullableVectorOfHandles
7400 {
7401 #[inline]
7402 fn from_wire(wire: crate::wire::UnboundedNullableVectorOfHandles<'de>) -> Self {
7403 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
7404 }
7405 }
7406
7407 #[derive(Debug, PartialEq)]
7408 pub enum UnionOfEndpointsUnion {
7409 ClientEnd(::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>),
7410
7411 ServerEnd(::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>),
7412
7413 UnknownOrdinal_(u64),
7414 }
7415
7416 impl UnionOfEndpointsUnion {
7417 pub fn is_unknown(&self) -> bool {
7418 #[allow(unreachable_patterns)]
7419 match self {
7420 Self::UnknownOrdinal_(_) => true,
7421 _ => false,
7422 }
7423 }
7424 }
7425
7426 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>
7427 for UnionOfEndpointsUnion
7428 where
7429 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7430 ___E: ::fidl_next::Encoder,
7431 ___E: ::fidl_next::fuchsia::HandleEncoder,
7432 {
7433 #[inline]
7434 fn encode(
7435 self,
7436 encoder: &mut ___E,
7437 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpointsUnion<'static>>,
7438 _: (),
7439 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7440 ::fidl_next::munge!(let crate::wire::UnionOfEndpointsUnion { raw, _phantom: _ } = out);
7441
7442 match self {
7443 Self::ClientEnd(value) => ::fidl_next::wire::Union::encode_as::<
7444 ___E,
7445 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
7446 >(value, 1, encoder, raw, ())?,
7447
7448 Self::ServerEnd(value) => ::fidl_next::wire::Union::encode_as::<
7449 ___E,
7450 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
7451 >(value, 2, encoder, raw, ())?,
7452
7453 Self::UnknownOrdinal_(ordinal) => {
7454 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
7455 }
7456 }
7457
7458 Ok(())
7459 }
7460 }
7461
7462 unsafe impl<___E>
7463 ::fidl_next::EncodeOption<crate::wire_optional::UnionOfEndpointsUnion<'static>, ___E>
7464 for UnionOfEndpointsUnion
7465 where
7466 ___E: ?Sized,
7467 UnionOfEndpointsUnion:
7468 ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
7469 {
7470 #[inline]
7471 fn encode_option(
7472 this: ::core::option::Option<Self>,
7473 encoder: &mut ___E,
7474 out: &mut ::core::mem::MaybeUninit<
7475 crate::wire_optional::UnionOfEndpointsUnion<'static>,
7476 >,
7477 _: (),
7478 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7479 ::fidl_next::munge!(let crate::wire_optional::UnionOfEndpointsUnion { raw, _phantom: _ } = &mut *out);
7480
7481 if let Some(inner) = this {
7482 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7483 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7484 } else {
7485 ::fidl_next::wire::Union::encode_absent(raw);
7486 }
7487
7488 Ok(())
7489 }
7490 }
7491
7492 impl<'de> ::fidl_next::FromWire<crate::wire::UnionOfEndpointsUnion<'de>> for UnionOfEndpointsUnion {
7493 #[inline]
7494 fn from_wire(wire: crate::wire::UnionOfEndpointsUnion<'de>) -> Self {
7495 let wire = ::core::mem::ManuallyDrop::new(wire);
7496 match wire.raw.ordinal() {
7497 1 => Self::ClientEnd(::fidl_next::FromWire::from_wire(unsafe {
7498 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
7499 })),
7500
7501 2 => Self::ServerEnd(::fidl_next::FromWire::from_wire(unsafe {
7502 wire.raw.get().read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
7503 })),
7504
7505 ord => return Self::UnknownOrdinal_(ord as u64),
7506 }
7507 }
7508 }
7509
7510 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionOfEndpointsUnion<'de>>
7511 for UnionOfEndpointsUnion
7512 {
7513 #[inline]
7514 fn from_wire_option(
7515 wire: crate::wire_optional::UnionOfEndpointsUnion<'de>,
7516 ) -> ::core::option::Option<Self> {
7517 if let Some(inner) = wire.into_option() {
7518 Some(::fidl_next::FromWire::from_wire(inner))
7519 } else {
7520 None
7521 }
7522 }
7523 }
7524
7525 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionOfEndpointsUnion<'de>>
7526 for Box<UnionOfEndpointsUnion>
7527 {
7528 #[inline]
7529 fn from_wire_option(
7530 wire: crate::wire_optional::UnionOfEndpointsUnion<'de>,
7531 ) -> ::core::option::Option<Self> {
7532 <UnionOfEndpointsUnion as ::fidl_next::FromWireOption<
7533 crate::wire_optional::UnionOfEndpointsUnion<'de>,
7534 >>::from_wire_option(wire)
7535 .map(Box::new)
7536 }
7537 }
7538
7539 #[derive(Debug, PartialEq)]
7540 pub struct UnionOfEndpoints {
7541 pub u: crate::natural::UnionOfEndpointsUnion,
7542 }
7543
7544 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
7545 for UnionOfEndpoints
7546 where
7547 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7548 ___E: ::fidl_next::Encoder,
7549 ___E: ::fidl_next::fuchsia::HandleEncoder,
7550 {
7551 #[inline]
7552 fn encode(
7553 self,
7554 encoder_: &mut ___E,
7555 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
7556 _: (),
7557 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7558 ::fidl_next::munge! {
7559 let crate::wire::UnionOfEndpoints {
7560 u,
7561
7562 } = out_;
7563 }
7564
7565 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
7566
7567 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
7568
7569 Ok(())
7570 }
7571 }
7572
7573 unsafe impl<___E>
7574 ::fidl_next::EncodeOption<
7575 ::fidl_next::wire::Box<'static, crate::wire::UnionOfEndpoints<'static>>,
7576 ___E,
7577 > for UnionOfEndpoints
7578 where
7579 ___E: ::fidl_next::Encoder + ?Sized,
7580 UnionOfEndpoints: ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>,
7581 {
7582 #[inline]
7583 fn encode_option(
7584 this: ::core::option::Option<Self>,
7585 encoder: &mut ___E,
7586 out: &mut ::core::mem::MaybeUninit<
7587 ::fidl_next::wire::Box<'static, crate::wire::UnionOfEndpoints<'static>>,
7588 >,
7589 _: (),
7590 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7591 if let Some(inner) = this {
7592 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7593 ::fidl_next::wire::Box::encode_present(out);
7594 } else {
7595 ::fidl_next::wire::Box::encode_absent(out);
7596 }
7597
7598 Ok(())
7599 }
7600 }
7601
7602 impl<'de> ::fidl_next::FromWire<crate::wire::UnionOfEndpoints<'de>> for UnionOfEndpoints {
7603 #[inline]
7604 fn from_wire(wire: crate::wire::UnionOfEndpoints<'de>) -> Self {
7605 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
7606 }
7607 }
7608
7609 #[derive(Debug, PartialEq)]
7610 pub enum UnionOfHandle {
7611 H(::fidl_next::fuchsia::zx::NullableHandle),
7612 }
7613
7614 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfHandle, ___E> for UnionOfHandle
7615 where
7616 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7617 ___E: ::fidl_next::fuchsia::HandleEncoder,
7618 {
7619 #[inline]
7620 fn encode(
7621 self,
7622 encoder: &mut ___E,
7623 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfHandle>,
7624 _: (),
7625 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7626 ::fidl_next::munge!(let crate::wire::UnionOfHandle { raw, _phantom: _ } = out);
7627
7628 match self {
7629 Self::H(value) => ::fidl_next::wire::Union::encode_as_static::<
7630 ___E,
7631 ::fidl_next::wire::fuchsia::NullableHandle,
7632 >(value, 1, encoder, raw, ())?,
7633 }
7634
7635 Ok(())
7636 }
7637 }
7638
7639 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::UnionOfHandle, ___E>
7640 for UnionOfHandle
7641 where
7642 ___E: ?Sized,
7643 UnionOfHandle: ::fidl_next::Encode<crate::wire::UnionOfHandle, ___E>,
7644 {
7645 #[inline]
7646 fn encode_option(
7647 this: ::core::option::Option<Self>,
7648 encoder: &mut ___E,
7649 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::UnionOfHandle>,
7650 _: (),
7651 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7652 ::fidl_next::munge!(let crate::wire_optional::UnionOfHandle { raw, _phantom: _ } = &mut *out);
7653
7654 if let Some(inner) = this {
7655 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7656 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7657 } else {
7658 ::fidl_next::wire::Union::encode_absent(raw);
7659 }
7660
7661 Ok(())
7662 }
7663 }
7664
7665 impl ::fidl_next::FromWire<crate::wire::UnionOfHandle> for UnionOfHandle {
7666 #[inline]
7667 fn from_wire(wire: crate::wire::UnionOfHandle) -> Self {
7668 let wire = ::core::mem::ManuallyDrop::new(wire);
7669 match wire.raw.ordinal() {
7670 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
7671 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
7672 })),
7673
7674 _ => unsafe { ::core::hint::unreachable_unchecked() },
7675 }
7676 }
7677 }
7678
7679 impl ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle> for UnionOfHandle {
7680 #[inline]
7681 fn from_wire_option(
7682 wire: crate::wire_optional::UnionOfHandle,
7683 ) -> ::core::option::Option<Self> {
7684 if let Some(inner) = wire.into_option() {
7685 Some(::fidl_next::FromWire::from_wire(inner))
7686 } else {
7687 None
7688 }
7689 }
7690 }
7691
7692 impl ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle> for Box<UnionOfHandle> {
7693 #[inline]
7694 fn from_wire_option(
7695 wire: crate::wire_optional::UnionOfHandle,
7696 ) -> ::core::option::Option<Self> {
7697 <
7698 UnionOfHandle as ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle>
7699 >::from_wire_option(wire).map(Box::new)
7700 }
7701 }
7702
7703 #[derive(Debug, PartialEq)]
7704 pub struct VectorOfArrayOfEventInStructWithDefaultRights {
7705 pub h: ::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>,
7706 }
7707
7708 unsafe impl<___E>
7709 ::fidl_next::Encode<
7710 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7711 ___E,
7712 > for VectorOfArrayOfEventInStructWithDefaultRights
7713 where
7714 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7715 ___E: ::fidl_next::Encoder,
7716 ___E: ::fidl_next::fuchsia::HandleEncoder,
7717 {
7718 #[inline]
7719 fn encode(
7720 self,
7721 encoder_: &mut ___E,
7722 out_: &mut ::core::mem::MaybeUninit<
7723 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7724 >,
7725 _: (),
7726 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7727 ::fidl_next::munge! {
7728 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
7729 h,
7730
7731 } = out_;
7732 }
7733
7734 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
7735
7736 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
7737 ::fidl_next::Constrained::validate(_field, (1, ()))?;
7738
7739 Ok(())
7740 }
7741 }
7742
7743 unsafe impl<___E>
7744 ::fidl_next::EncodeOption<
7745 ::fidl_next::wire::Box<
7746 'static,
7747 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7748 >,
7749 ___E,
7750 > for VectorOfArrayOfEventInStructWithDefaultRights
7751 where
7752 ___E: ::fidl_next::Encoder + ?Sized,
7753 VectorOfArrayOfEventInStructWithDefaultRights: ::fidl_next::Encode<
7754 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7755 ___E,
7756 >,
7757 {
7758 #[inline]
7759 fn encode_option(
7760 this: ::core::option::Option<Self>,
7761 encoder: &mut ___E,
7762 out: &mut ::core::mem::MaybeUninit<
7763 ::fidl_next::wire::Box<
7764 'static,
7765 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7766 >,
7767 >,
7768 _: (),
7769 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7770 if let Some(inner) = this {
7771 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7772 ::fidl_next::wire::Box::encode_present(out);
7773 } else {
7774 ::fidl_next::wire::Box::encode_absent(out);
7775 }
7776
7777 Ok(())
7778 }
7779 }
7780
7781 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'de>>
7782 for VectorOfArrayOfEventInStructWithDefaultRights
7783 {
7784 #[inline]
7785 fn from_wire(
7786 wire: crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'de>,
7787 ) -> Self {
7788 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
7789 }
7790 }
7791
7792 #[derive(Debug, PartialEq)]
7793 pub struct VectorOfArrayOfEventInStructWithReducedRights {
7794 pub h: ::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>,
7795 }
7796
7797 unsafe impl<___E>
7798 ::fidl_next::Encode<
7799 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7800 ___E,
7801 > for VectorOfArrayOfEventInStructWithReducedRights
7802 where
7803 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7804 ___E: ::fidl_next::Encoder,
7805 ___E: ::fidl_next::fuchsia::HandleEncoder,
7806 {
7807 #[inline]
7808 fn encode(
7809 self,
7810 encoder_: &mut ___E,
7811 out_: &mut ::core::mem::MaybeUninit<
7812 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7813 >,
7814 _: (),
7815 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7816 ::fidl_next::munge! {
7817 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
7818 h,
7819
7820 } = out_;
7821 }
7822
7823 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
7824
7825 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
7826 ::fidl_next::Constrained::validate(_field, (1, ()))?;
7827
7828 Ok(())
7829 }
7830 }
7831
7832 unsafe impl<___E>
7833 ::fidl_next::EncodeOption<
7834 ::fidl_next::wire::Box<
7835 'static,
7836 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7837 >,
7838 ___E,
7839 > for VectorOfArrayOfEventInStructWithReducedRights
7840 where
7841 ___E: ::fidl_next::Encoder + ?Sized,
7842 VectorOfArrayOfEventInStructWithReducedRights: ::fidl_next::Encode<
7843 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7844 ___E,
7845 >,
7846 {
7847 #[inline]
7848 fn encode_option(
7849 this: ::core::option::Option<Self>,
7850 encoder: &mut ___E,
7851 out: &mut ::core::mem::MaybeUninit<
7852 ::fidl_next::wire::Box<
7853 'static,
7854 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7855 >,
7856 >,
7857 _: (),
7858 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7859 if let Some(inner) = this {
7860 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7861 ::fidl_next::wire::Box::encode_present(out);
7862 } else {
7863 ::fidl_next::wire::Box::encode_absent(out);
7864 }
7865
7866 Ok(())
7867 }
7868 }
7869
7870 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'de>>
7871 for VectorOfArrayOfEventInStructWithReducedRights
7872 {
7873 #[inline]
7874 fn from_wire(
7875 wire: crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'de>,
7876 ) -> Self {
7877 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
7878 }
7879 }
7880
7881 #[derive(Debug, Default, PartialEq)]
7882 pub struct VectorOfArrayOfEventInTableWithReducedRights {
7883 pub h: ::core::option::Option<::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>>,
7884 }
7885
7886 impl VectorOfArrayOfEventInTableWithReducedRights {
7887 fn __max_ordinal(&self) -> usize {
7888 if self.h.is_some() {
7889 return 1;
7890 }
7891
7892 0
7893 }
7894 }
7895
7896 unsafe impl<___E>
7897 ::fidl_next::Encode<
7898 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
7899 ___E,
7900 > for VectorOfArrayOfEventInTableWithReducedRights
7901 where
7902 ___E: ::fidl_next::Encoder + ?Sized,
7903 ___E: ::fidl_next::fuchsia::HandleEncoder,
7904 {
7905 #[inline]
7906 fn encode(
7907 mut self,
7908 encoder: &mut ___E,
7909 out: &mut ::core::mem::MaybeUninit<
7910 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
7911 >,
7912 _: (),
7913 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7914 ::fidl_next::munge!(let crate::wire::VectorOfArrayOfEventInTableWithReducedRights { table } = out);
7915
7916 let max_ord = self.__max_ordinal();
7917
7918 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7919 ::fidl_next::Wire::zero_padding(&mut out);
7920
7921 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7922 ::fidl_next::wire::Envelope,
7923 >(encoder, max_ord);
7924
7925 for i in 1..=max_ord {
7926 match i {
7927 1 => {
7928 if let Some(value) = self.h.take() {
7929 ::fidl_next::wire::Envelope::encode_value::<
7930 ::fidl_next::wire::Vector<
7931 'static,
7932 [::fidl_next::wire::fuchsia::Event; 1],
7933 >,
7934 ___E,
7935 >(
7936 value, preallocated.encoder, &mut out, (1, ())
7937 )?;
7938 } else {
7939 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7940 }
7941 }
7942
7943 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7944 }
7945 unsafe {
7946 preallocated.write_next(out.assume_init_ref());
7947 }
7948 }
7949
7950 ::fidl_next::wire::Table::encode_len(table, max_ord);
7951
7952 Ok(())
7953 }
7954 }
7955
7956 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>>
7957 for VectorOfArrayOfEventInTableWithReducedRights
7958 {
7959 #[inline]
7960 fn from_wire(
7961 wire_: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
7962 ) -> Self {
7963 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7964
7965 let h = wire_.table.get(1);
7966
7967 Self {
7968 h: h.map(|envelope| {
7969 ::fidl_next::FromWire::from_wire(unsafe {
7970 envelope.read_unchecked::<::fidl_next::wire::Vector<
7971 'de,
7972 [::fidl_next::wire::fuchsia::Event; 1],
7973 >>()
7974 })
7975 }),
7976 }
7977 }
7978 }
7979
7980 #[derive(Debug, PartialEq)]
7981 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct {
7982 pub t: crate::natural::VectorOfArrayOfEventInTableWithReducedRights,
7983 }
7984
7985 unsafe impl<___E>
7986 ::fidl_next::Encode<
7987 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7988 ___E,
7989 > for VectorOfArrayOfEventInTableWithReducedRightsStruct
7990 where
7991 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7992 ___E: ::fidl_next::Encoder,
7993 ___E: ::fidl_next::fuchsia::HandleEncoder,
7994 {
7995 #[inline]
7996 fn encode(
7997 self,
7998 encoder_: &mut ___E,
7999 out_: &mut ::core::mem::MaybeUninit<
8000 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
8001 >,
8002 _: (),
8003 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8004 ::fidl_next::munge! {
8005 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
8006 t,
8007
8008 } = out_;
8009 }
8010
8011 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
8012
8013 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
8014
8015 Ok(())
8016 }
8017 }
8018
8019 unsafe impl<___E>
8020 ::fidl_next::EncodeOption<
8021 ::fidl_next::wire::Box<
8022 'static,
8023 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
8024 >,
8025 ___E,
8026 > for VectorOfArrayOfEventInTableWithReducedRightsStruct
8027 where
8028 ___E: ::fidl_next::Encoder + ?Sized,
8029 VectorOfArrayOfEventInTableWithReducedRightsStruct: ::fidl_next::Encode<
8030 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
8031 ___E,
8032 >,
8033 {
8034 #[inline]
8035 fn encode_option(
8036 this: ::core::option::Option<Self>,
8037 encoder: &mut ___E,
8038 out: &mut ::core::mem::MaybeUninit<
8039 ::fidl_next::wire::Box<
8040 'static,
8041 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
8042 >,
8043 >,
8044 _: (),
8045 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8046 if let Some(inner) = this {
8047 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8048 ::fidl_next::wire::Box::encode_present(out);
8049 } else {
8050 ::fidl_next::wire::Box::encode_absent(out);
8051 }
8052
8053 Ok(())
8054 }
8055 }
8056
8057 impl<'de>
8058 ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>>
8059 for VectorOfArrayOfEventInTableWithReducedRightsStruct
8060 {
8061 #[inline]
8062 fn from_wire(
8063 wire: crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>,
8064 ) -> Self {
8065 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
8066 }
8067 }
8068
8069 #[derive(Debug, PartialEq)]
8070 pub enum VectorOfArrayOfEventInUnionWithReducedRights {
8071 H(::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>),
8072 }
8073
8074 unsafe impl<___E>
8075 ::fidl_next::Encode<
8076 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8077 ___E,
8078 > for VectorOfArrayOfEventInUnionWithReducedRights
8079 where
8080 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8081 ___E: ::fidl_next::Encoder,
8082 ___E: ::fidl_next::fuchsia::HandleEncoder,
8083 {
8084 #[inline]
8085 fn encode(
8086 self,
8087 encoder: &mut ___E,
8088 out: &mut ::core::mem::MaybeUninit<
8089 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8090 >,
8091 _: (),
8092 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8093 ::fidl_next::munge!(let crate::wire::VectorOfArrayOfEventInUnionWithReducedRights { raw, _phantom: _ } = out);
8094
8095 match self {
8096 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
8097 ___E,
8098 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
8099 >(value, 1, encoder, raw, (1, ()))?,
8100 }
8101
8102 Ok(())
8103 }
8104 }
8105
8106 unsafe impl<___E>
8107 ::fidl_next::EncodeOption<
8108 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8109 ___E,
8110 > for VectorOfArrayOfEventInUnionWithReducedRights
8111 where
8112 ___E: ?Sized,
8113 VectorOfArrayOfEventInUnionWithReducedRights: ::fidl_next::Encode<
8114 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8115 ___E,
8116 >,
8117 {
8118 #[inline]
8119 fn encode_option(
8120 this: ::core::option::Option<Self>,
8121 encoder: &mut ___E,
8122 out: &mut ::core::mem::MaybeUninit<
8123 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8124 >,
8125 _: (),
8126 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8127 ::fidl_next::munge!(let crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights { raw, _phantom: _ } = &mut *out);
8128
8129 if let Some(inner) = this {
8130 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
8131 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
8132 } else {
8133 ::fidl_next::wire::Union::encode_absent(raw);
8134 }
8135
8136 Ok(())
8137 }
8138 }
8139
8140 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
8141 for VectorOfArrayOfEventInUnionWithReducedRights
8142 {
8143 #[inline]
8144 fn from_wire(wire: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>) -> Self {
8145 let wire = ::core::mem::ManuallyDrop::new(wire);
8146 match wire.raw.ordinal() {
8147 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
8148 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
8149 })),
8150
8151 _ => unsafe { ::core::hint::unreachable_unchecked() },
8152 }
8153 }
8154 }
8155
8156 impl<'de>
8157 ::fidl_next::FromWireOption<
8158 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8159 > for VectorOfArrayOfEventInUnionWithReducedRights
8160 {
8161 #[inline]
8162 fn from_wire_option(
8163 wire: crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8164 ) -> ::core::option::Option<Self> {
8165 if let Some(inner) = wire.into_option() {
8166 Some(::fidl_next::FromWire::from_wire(inner))
8167 } else {
8168 None
8169 }
8170 }
8171 }
8172
8173 impl<'de>
8174 ::fidl_next::FromWireOption<
8175 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8176 > for Box<VectorOfArrayOfEventInUnionWithReducedRights>
8177 {
8178 #[inline]
8179 fn from_wire_option(
8180 wire: crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8181 ) -> ::core::option::Option<Self> {
8182 <VectorOfArrayOfEventInUnionWithReducedRights as ::fidl_next::FromWireOption<
8183 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8184 >>::from_wire_option(wire)
8185 .map(Box::new)
8186 }
8187 }
8188
8189 #[derive(Debug, PartialEq)]
8190 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct {
8191 pub u: crate::natural::VectorOfArrayOfEventInUnionWithReducedRights,
8192 }
8193
8194 unsafe impl<___E>
8195 ::fidl_next::Encode<
8196 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8197 ___E,
8198 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct
8199 where
8200 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8201 ___E: ::fidl_next::Encoder,
8202 ___E: ::fidl_next::fuchsia::HandleEncoder,
8203 {
8204 #[inline]
8205 fn encode(
8206 self,
8207 encoder_: &mut ___E,
8208 out_: &mut ::core::mem::MaybeUninit<
8209 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8210 >,
8211 _: (),
8212 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8213 ::fidl_next::munge! {
8214 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
8215 u,
8216
8217 } = out_;
8218 }
8219
8220 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
8221
8222 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
8223
8224 Ok(())
8225 }
8226 }
8227
8228 unsafe impl<___E>
8229 ::fidl_next::EncodeOption<
8230 ::fidl_next::wire::Box<
8231 'static,
8232 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8233 >,
8234 ___E,
8235 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct
8236 where
8237 ___E: ::fidl_next::Encoder + ?Sized,
8238 VectorOfArrayOfEventInUnionWithReducedRightsStruct: ::fidl_next::Encode<
8239 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8240 ___E,
8241 >,
8242 {
8243 #[inline]
8244 fn encode_option(
8245 this: ::core::option::Option<Self>,
8246 encoder: &mut ___E,
8247 out: &mut ::core::mem::MaybeUninit<
8248 ::fidl_next::wire::Box<
8249 'static,
8250 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8251 >,
8252 >,
8253 _: (),
8254 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8255 if let Some(inner) = this {
8256 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8257 ::fidl_next::wire::Box::encode_present(out);
8258 } else {
8259 ::fidl_next::wire::Box::encode_absent(out);
8260 }
8261
8262 Ok(())
8263 }
8264 }
8265
8266 impl<'de>
8267 ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>>
8268 for VectorOfArrayOfEventInUnionWithReducedRightsStruct
8269 {
8270 #[inline]
8271 fn from_wire(
8272 wire: crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>,
8273 ) -> Self {
8274 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
8275 }
8276 }
8277
8278 #[derive(Debug, PartialEq)]
8279 pub struct VectorOfHandles {
8280 pub v: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
8281 }
8282
8283 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
8284 for VectorOfHandles
8285 where
8286 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8287 ___E: ::fidl_next::Encoder,
8288 ___E: ::fidl_next::fuchsia::HandleEncoder,
8289 {
8290 #[inline]
8291 fn encode(
8292 self,
8293 encoder_: &mut ___E,
8294 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
8295 _: (),
8296 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8297 ::fidl_next::munge! {
8298 let crate::wire::VectorOfHandles {
8299 v,
8300
8301 } = out_;
8302 }
8303
8304 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
8305
8306 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8307 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
8308
8309 Ok(())
8310 }
8311 }
8312
8313 unsafe impl<___E>
8314 ::fidl_next::EncodeOption<
8315 ::fidl_next::wire::Box<'static, crate::wire::VectorOfHandles<'static>>,
8316 ___E,
8317 > for VectorOfHandles
8318 where
8319 ___E: ::fidl_next::Encoder + ?Sized,
8320 VectorOfHandles: ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>,
8321 {
8322 #[inline]
8323 fn encode_option(
8324 this: ::core::option::Option<Self>,
8325 encoder: &mut ___E,
8326 out: &mut ::core::mem::MaybeUninit<
8327 ::fidl_next::wire::Box<'static, crate::wire::VectorOfHandles<'static>>,
8328 >,
8329 _: (),
8330 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8331 if let Some(inner) = this {
8332 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8333 ::fidl_next::wire::Box::encode_present(out);
8334 } else {
8335 ::fidl_next::wire::Box::encode_absent(out);
8336 }
8337
8338 Ok(())
8339 }
8340 }
8341
8342 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfHandles<'de>> for VectorOfHandles {
8343 #[inline]
8344 fn from_wire(wire: crate::wire::VectorOfHandles<'de>) -> Self {
8345 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8346 }
8347 }
8348
8349 #[derive(Debug, PartialEq)]
8350 pub struct VectorOfOptionalHandles {
8351 pub v: ::std::vec::Vec<::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>>,
8352 }
8353
8354 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
8355 for VectorOfOptionalHandles
8356 where
8357 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8358 ___E: ::fidl_next::Encoder,
8359 ___E: ::fidl_next::fuchsia::HandleEncoder,
8360 {
8361 #[inline]
8362 fn encode(
8363 self,
8364 encoder_: &mut ___E,
8365 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
8366 _: (),
8367 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8368 ::fidl_next::munge! {
8369 let crate::wire::VectorOfOptionalHandles {
8370 v,
8371
8372 } = out_;
8373 }
8374
8375 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
8376
8377 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8378 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
8379
8380 Ok(())
8381 }
8382 }
8383
8384 unsafe impl<___E>
8385 ::fidl_next::EncodeOption<
8386 ::fidl_next::wire::Box<'static, crate::wire::VectorOfOptionalHandles<'static>>,
8387 ___E,
8388 > for VectorOfOptionalHandles
8389 where
8390 ___E: ::fidl_next::Encoder + ?Sized,
8391 VectorOfOptionalHandles:
8392 ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>,
8393 {
8394 #[inline]
8395 fn encode_option(
8396 this: ::core::option::Option<Self>,
8397 encoder: &mut ___E,
8398 out: &mut ::core::mem::MaybeUninit<
8399 ::fidl_next::wire::Box<'static, crate::wire::VectorOfOptionalHandles<'static>>,
8400 >,
8401 _: (),
8402 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8403 if let Some(inner) = this {
8404 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8405 ::fidl_next::wire::Box::encode_present(out);
8406 } else {
8407 ::fidl_next::wire::Box::encode_absent(out);
8408 }
8409
8410 Ok(())
8411 }
8412 }
8413
8414 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfOptionalHandles<'de>>
8415 for VectorOfOptionalHandles
8416 {
8417 #[inline]
8418 fn from_wire(wire: crate::wire::VectorOfOptionalHandles<'de>) -> Self {
8419 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8420 }
8421 }
8422
8423 #[derive(Debug, PartialEq)]
8424 pub struct VectorOfUpTo2Handles {
8425 pub v: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
8426 }
8427
8428 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
8429 for VectorOfUpTo2Handles
8430 where
8431 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8432 ___E: ::fidl_next::Encoder,
8433 ___E: ::fidl_next::fuchsia::HandleEncoder,
8434 {
8435 #[inline]
8436 fn encode(
8437 self,
8438 encoder_: &mut ___E,
8439 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
8440 _: (),
8441 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8442 ::fidl_next::munge! {
8443 let crate::wire::VectorOfUpTo2Handles {
8444 v,
8445
8446 } = out_;
8447 }
8448
8449 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
8450
8451 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8452 ::fidl_next::Constrained::validate(_field, (2, ()))?;
8453
8454 Ok(())
8455 }
8456 }
8457
8458 unsafe impl<___E>
8459 ::fidl_next::EncodeOption<
8460 ::fidl_next::wire::Box<'static, crate::wire::VectorOfUpTo2Handles<'static>>,
8461 ___E,
8462 > for VectorOfUpTo2Handles
8463 where
8464 ___E: ::fidl_next::Encoder + ?Sized,
8465 VectorOfUpTo2Handles: ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>,
8466 {
8467 #[inline]
8468 fn encode_option(
8469 this: ::core::option::Option<Self>,
8470 encoder: &mut ___E,
8471 out: &mut ::core::mem::MaybeUninit<
8472 ::fidl_next::wire::Box<'static, crate::wire::VectorOfUpTo2Handles<'static>>,
8473 >,
8474 _: (),
8475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8476 if let Some(inner) = this {
8477 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8478 ::fidl_next::wire::Box::encode_present(out);
8479 } else {
8480 ::fidl_next::wire::Box::encode_absent(out);
8481 }
8482
8483 Ok(())
8484 }
8485 }
8486
8487 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfUpTo2Handles<'de>> for VectorOfUpTo2Handles {
8488 #[inline]
8489 fn from_wire(wire: crate::wire::VectorOfUpTo2Handles<'de>) -> Self {
8490 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8491 }
8492 }
8493}
8494
8495pub mod wire {
8496
8497 pub use fidl_next_common_test_conformance::wire::*;
8498
8499 #[derive(Debug)]
8501 #[repr(C)]
8502 pub struct AlternatingHandlesAndFailures<'de> {
8503 pub h1: ::fidl_next::wire::fuchsia::NullableHandle,
8504
8505 pub failure_trigger1: ::fidl_next::wire::String<'de>,
8506
8507 pub h2: ::fidl_next::wire::fuchsia::NullableHandle,
8508
8509 pub failure_trigger2: ::fidl_next::wire::String<'de>,
8510
8511 pub h3: ::fidl_next::wire::fuchsia::NullableHandle,
8512 }
8513
8514 static_assertions::const_assert_eq!(
8515 std::mem::size_of::<AlternatingHandlesAndFailures<'_>>(),
8516 56
8517 );
8518 static_assertions::const_assert_eq!(
8519 std::mem::align_of::<AlternatingHandlesAndFailures<'_>>(),
8520 8
8521 );
8522
8523 static_assertions::const_assert_eq!(
8524 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h1),
8525 0
8526 );
8527
8528 static_assertions::const_assert_eq!(
8529 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, failure_trigger1),
8530 8
8531 );
8532
8533 static_assertions::const_assert_eq!(
8534 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h2),
8535 24
8536 );
8537
8538 static_assertions::const_assert_eq!(
8539 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, failure_trigger2),
8540 32
8541 );
8542
8543 static_assertions::const_assert_eq!(
8544 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h3),
8545 48
8546 );
8547
8548 impl ::fidl_next::Constrained for AlternatingHandlesAndFailures<'_> {
8549 type Constraint = ();
8550
8551 fn validate(
8552 _: ::fidl_next::Slot<'_, Self>,
8553 _: Self::Constraint,
8554 ) -> Result<(), ::fidl_next::ValidationError> {
8555 Ok(())
8556 }
8557 }
8558
8559 unsafe impl ::fidl_next::Wire for AlternatingHandlesAndFailures<'static> {
8560 type Narrowed<'de> = AlternatingHandlesAndFailures<'de>;
8561
8562 #[inline]
8563 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8564 ::fidl_next::munge! {
8565 let Self {
8566 h1,
8567 failure_trigger1,
8568 h2,
8569 failure_trigger2,
8570 h3,
8571
8572 } = &mut *out_;
8573 }
8574
8575 ::fidl_next::Wire::zero_padding(h1);
8576
8577 ::fidl_next::Wire::zero_padding(failure_trigger1);
8578
8579 ::fidl_next::Wire::zero_padding(h2);
8580
8581 ::fidl_next::Wire::zero_padding(failure_trigger2);
8582
8583 ::fidl_next::Wire::zero_padding(h3);
8584
8585 unsafe {
8586 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
8587 }
8588
8589 unsafe {
8590 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
8591 }
8592
8593 unsafe {
8594 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
8595 }
8596 }
8597 }
8598
8599 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AlternatingHandlesAndFailures<'de>
8600 where
8601 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8602 ___D: ::fidl_next::Decoder<'de>,
8603 ___D: ::fidl_next::fuchsia::HandleDecoder,
8604 {
8605 fn decode(
8606 slot_: ::fidl_next::Slot<'_, Self>,
8607 decoder_: &mut ___D,
8608 _: (),
8609 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8610 if slot_.as_bytes()[52..56] != [0u8; 4] {
8611 return Err(::fidl_next::DecodeError::InvalidPadding);
8612 }
8613
8614 if slot_.as_bytes()[28..32] != [0u8; 4] {
8615 return Err(::fidl_next::DecodeError::InvalidPadding);
8616 }
8617
8618 if slot_.as_bytes()[4..8] != [0u8; 4] {
8619 return Err(::fidl_next::DecodeError::InvalidPadding);
8620 }
8621
8622 ::fidl_next::munge! {
8623 let Self {
8624 mut h1,
8625 mut failure_trigger1,
8626 mut h2,
8627 mut failure_trigger2,
8628 mut h3,
8629
8630 } = slot_;
8631 }
8632
8633 let _field = h1.as_mut();
8634
8635 ::fidl_next::Decode::decode(h1.as_mut(), decoder_, ())?;
8636
8637 let _field = failure_trigger1.as_mut();
8638 ::fidl_next::Constrained::validate(_field, 1)?;
8639 ::fidl_next::Decode::decode(failure_trigger1.as_mut(), decoder_, 1)?;
8640
8641 let failure_trigger1 = unsafe { failure_trigger1.deref_unchecked() };
8642
8643 if failure_trigger1.len() > 1 {
8644 return Err(::fidl_next::DecodeError::VectorTooLong {
8645 size: failure_trigger1.len() as u64,
8646 limit: 1,
8647 });
8648 }
8649
8650 let _field = h2.as_mut();
8651
8652 ::fidl_next::Decode::decode(h2.as_mut(), decoder_, ())?;
8653
8654 let _field = failure_trigger2.as_mut();
8655 ::fidl_next::Constrained::validate(_field, 1)?;
8656 ::fidl_next::Decode::decode(failure_trigger2.as_mut(), decoder_, 1)?;
8657
8658 let failure_trigger2 = unsafe { failure_trigger2.deref_unchecked() };
8659
8660 if failure_trigger2.len() > 1 {
8661 return Err(::fidl_next::DecodeError::VectorTooLong {
8662 size: failure_trigger2.len() as u64,
8663 limit: 1,
8664 });
8665 }
8666
8667 let _field = h3.as_mut();
8668
8669 ::fidl_next::Decode::decode(h3.as_mut(), decoder_, ())?;
8670
8671 Ok(())
8672 }
8673 }
8674
8675 impl<'de> ::fidl_next::IntoNatural for AlternatingHandlesAndFailures<'de> {
8676 type Natural = crate::natural::AlternatingHandlesAndFailures;
8677 }
8678
8679 #[derive(Debug)]
8681 #[repr(C)]
8682 pub struct ArrayOfArrayOfNonnullableHandles {
8683 pub handles: [[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4],
8684 }
8685
8686 static_assertions::const_assert_eq!(
8687 std::mem::size_of::<ArrayOfArrayOfNonnullableHandles>(),
8688 48
8689 );
8690 static_assertions::const_assert_eq!(
8691 std::mem::align_of::<ArrayOfArrayOfNonnullableHandles>(),
8692 4
8693 );
8694
8695 static_assertions::const_assert_eq!(
8696 std::mem::offset_of!(ArrayOfArrayOfNonnullableHandles, handles),
8697 0
8698 );
8699
8700 impl ::fidl_next::Constrained for ArrayOfArrayOfNonnullableHandles {
8701 type Constraint = ();
8702
8703 fn validate(
8704 _: ::fidl_next::Slot<'_, Self>,
8705 _: Self::Constraint,
8706 ) -> Result<(), ::fidl_next::ValidationError> {
8707 Ok(())
8708 }
8709 }
8710
8711 unsafe impl ::fidl_next::Wire for ArrayOfArrayOfNonnullableHandles {
8712 type Narrowed<'de> = ArrayOfArrayOfNonnullableHandles;
8713
8714 #[inline]
8715 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8716 ::fidl_next::munge! {
8717 let Self {
8718 handles,
8719
8720 } = &mut *out_;
8721 }
8722
8723 ::fidl_next::Wire::zero_padding(handles);
8724 }
8725 }
8726
8727 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfArrayOfNonnullableHandles
8728 where
8729 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8730 ___D: ::fidl_next::fuchsia::HandleDecoder,
8731 {
8732 fn decode(
8733 slot_: ::fidl_next::Slot<'_, Self>,
8734 decoder_: &mut ___D,
8735 _: (),
8736 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8737 ::fidl_next::munge! {
8738 let Self {
8739 mut handles,
8740
8741 } = slot_;
8742 }
8743
8744 let _field = handles.as_mut();
8745
8746 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8747
8748 Ok(())
8749 }
8750 }
8751
8752 impl ::fidl_next::IntoNatural for ArrayOfArrayOfNonnullableHandles {
8753 type Natural = crate::natural::ArrayOfArrayOfNonnullableHandles;
8754 }
8755
8756 #[derive(Debug)]
8758 #[repr(C)]
8759 pub struct ArrayOfHandles {
8760 pub a: [::fidl_next::wire::fuchsia::NullableHandle; 3],
8761 }
8762
8763 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfHandles>(), 12);
8764 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfHandles>(), 4);
8765
8766 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfHandles, a), 0);
8767
8768 impl ::fidl_next::Constrained for ArrayOfHandles {
8769 type Constraint = ();
8770
8771 fn validate(
8772 _: ::fidl_next::Slot<'_, Self>,
8773 _: Self::Constraint,
8774 ) -> Result<(), ::fidl_next::ValidationError> {
8775 Ok(())
8776 }
8777 }
8778
8779 unsafe impl ::fidl_next::Wire for ArrayOfHandles {
8780 type Narrowed<'de> = ArrayOfHandles;
8781
8782 #[inline]
8783 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8784 ::fidl_next::munge! {
8785 let Self {
8786 a,
8787
8788 } = &mut *out_;
8789 }
8790
8791 ::fidl_next::Wire::zero_padding(a);
8792 }
8793 }
8794
8795 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfHandles
8796 where
8797 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8798 ___D: ::fidl_next::fuchsia::HandleDecoder,
8799 {
8800 fn decode(
8801 slot_: ::fidl_next::Slot<'_, Self>,
8802 decoder_: &mut ___D,
8803 _: (),
8804 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8805 ::fidl_next::munge! {
8806 let Self {
8807 mut a,
8808
8809 } = slot_;
8810 }
8811
8812 let _field = a.as_mut();
8813
8814 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
8815
8816 Ok(())
8817 }
8818 }
8819
8820 impl ::fidl_next::IntoNatural for ArrayOfHandles {
8821 type Natural = crate::natural::ArrayOfHandles;
8822 }
8823
8824 #[derive(Debug)]
8826 #[repr(C)]
8827 pub struct ArrayOfNonnullableHandles {
8828 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
8829 }
8830
8831 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNonnullableHandles>(), 16);
8832 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNonnullableHandles>(), 4);
8833
8834 static_assertions::const_assert_eq!(
8835 std::mem::offset_of!(ArrayOfNonnullableHandles, handles),
8836 0
8837 );
8838
8839 impl ::fidl_next::Constrained for ArrayOfNonnullableHandles {
8840 type Constraint = ();
8841
8842 fn validate(
8843 _: ::fidl_next::Slot<'_, Self>,
8844 _: Self::Constraint,
8845 ) -> Result<(), ::fidl_next::ValidationError> {
8846 Ok(())
8847 }
8848 }
8849
8850 unsafe impl ::fidl_next::Wire for ArrayOfNonnullableHandles {
8851 type Narrowed<'de> = ArrayOfNonnullableHandles;
8852
8853 #[inline]
8854 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8855 ::fidl_next::munge! {
8856 let Self {
8857 handles,
8858
8859 } = &mut *out_;
8860 }
8861
8862 ::fidl_next::Wire::zero_padding(handles);
8863 }
8864 }
8865
8866 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNonnullableHandles
8867 where
8868 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8869 ___D: ::fidl_next::fuchsia::HandleDecoder,
8870 {
8871 fn decode(
8872 slot_: ::fidl_next::Slot<'_, Self>,
8873 decoder_: &mut ___D,
8874 _: (),
8875 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8876 ::fidl_next::munge! {
8877 let Self {
8878 mut handles,
8879
8880 } = slot_;
8881 }
8882
8883 let _field = handles.as_mut();
8884
8885 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8886
8887 Ok(())
8888 }
8889 }
8890
8891 impl ::fidl_next::IntoNatural for ArrayOfNonnullableHandles {
8892 type Natural = crate::natural::ArrayOfNonnullableHandles;
8893 }
8894
8895 #[derive(Debug)]
8897 #[repr(C)]
8898 pub struct ArrayOfNullableHandles {
8899 pub handles: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 5],
8900 }
8901
8902 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNullableHandles>(), 20);
8903 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNullableHandles>(), 4);
8904
8905 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfNullableHandles, handles), 0);
8906
8907 impl ::fidl_next::Constrained for ArrayOfNullableHandles {
8908 type Constraint = ();
8909
8910 fn validate(
8911 _: ::fidl_next::Slot<'_, Self>,
8912 _: Self::Constraint,
8913 ) -> Result<(), ::fidl_next::ValidationError> {
8914 Ok(())
8915 }
8916 }
8917
8918 unsafe impl ::fidl_next::Wire for ArrayOfNullableHandles {
8919 type Narrowed<'de> = ArrayOfNullableHandles;
8920
8921 #[inline]
8922 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8923 ::fidl_next::munge! {
8924 let Self {
8925 handles,
8926
8927 } = &mut *out_;
8928 }
8929
8930 ::fidl_next::Wire::zero_padding(handles);
8931 }
8932 }
8933
8934 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNullableHandles
8935 where
8936 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8937 ___D: ::fidl_next::fuchsia::HandleDecoder,
8938 {
8939 fn decode(
8940 slot_: ::fidl_next::Slot<'_, Self>,
8941 decoder_: &mut ___D,
8942 _: (),
8943 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8944 ::fidl_next::munge! {
8945 let Self {
8946 mut handles,
8947
8948 } = slot_;
8949 }
8950
8951 let _field = handles.as_mut();
8952
8953 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8954
8955 Ok(())
8956 }
8957 }
8958
8959 impl ::fidl_next::IntoNatural for ArrayOfNullableHandles {
8960 type Natural = crate::natural::ArrayOfNullableHandles;
8961 }
8962
8963 #[derive(Debug)]
8965 #[repr(C)]
8966 pub struct ArrayOfOptionalHandles {
8967 pub a: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 3],
8968 }
8969
8970 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfOptionalHandles>(), 12);
8971 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfOptionalHandles>(), 4);
8972
8973 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfOptionalHandles, a), 0);
8974
8975 impl ::fidl_next::Constrained for ArrayOfOptionalHandles {
8976 type Constraint = ();
8977
8978 fn validate(
8979 _: ::fidl_next::Slot<'_, Self>,
8980 _: Self::Constraint,
8981 ) -> Result<(), ::fidl_next::ValidationError> {
8982 Ok(())
8983 }
8984 }
8985
8986 unsafe impl ::fidl_next::Wire for ArrayOfOptionalHandles {
8987 type Narrowed<'de> = ArrayOfOptionalHandles;
8988
8989 #[inline]
8990 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8991 ::fidl_next::munge! {
8992 let Self {
8993 a,
8994
8995 } = &mut *out_;
8996 }
8997
8998 ::fidl_next::Wire::zero_padding(a);
8999 }
9000 }
9001
9002 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfOptionalHandles
9003 where
9004 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9005 ___D: ::fidl_next::fuchsia::HandleDecoder,
9006 {
9007 fn decode(
9008 slot_: ::fidl_next::Slot<'_, Self>,
9009 decoder_: &mut ___D,
9010 _: (),
9011 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9012 ::fidl_next::munge! {
9013 let Self {
9014 mut a,
9015
9016 } = slot_;
9017 }
9018
9019 let _field = a.as_mut();
9020
9021 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
9022
9023 Ok(())
9024 }
9025 }
9026
9027 impl ::fidl_next::IntoNatural for ArrayOfOptionalHandles {
9028 type Natural = crate::natural::ArrayOfOptionalHandles;
9029 }
9030
9031 #[derive(Debug)]
9033 #[repr(C)]
9034 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
9035 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9036 }
9037
9038 static_assertions::const_assert_eq!(
9039 std::mem::size_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
9040 16
9041 );
9042 static_assertions::const_assert_eq!(
9043 std::mem::align_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
9044 8
9045 );
9046
9047 static_assertions::const_assert_eq!(
9048 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithDefaultRights<'_>, h),
9049 0
9050 );
9051
9052 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithDefaultRights<'_> {
9053 type Constraint = ();
9054
9055 fn validate(
9056 _: ::fidl_next::Slot<'_, Self>,
9057 _: Self::Constraint,
9058 ) -> Result<(), ::fidl_next::ValidationError> {
9059 Ok(())
9060 }
9061 }
9062
9063 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithDefaultRights<'static> {
9064 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithDefaultRights<'de>;
9065
9066 #[inline]
9067 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9068 ::fidl_next::munge! {
9069 let Self {
9070 h,
9071
9072 } = &mut *out_;
9073 }
9074
9075 ::fidl_next::Wire::zero_padding(h);
9076 }
9077 }
9078
9079 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9080 for ArrayOfVectorOfEventInStructWithDefaultRights<'de>
9081 where
9082 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9083 ___D: ::fidl_next::Decoder<'de>,
9084 ___D: ::fidl_next::fuchsia::HandleDecoder,
9085 {
9086 fn decode(
9087 slot_: ::fidl_next::Slot<'_, Self>,
9088 decoder_: &mut ___D,
9089 _: (),
9090 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9091 ::fidl_next::munge! {
9092 let Self {
9093 mut h,
9094
9095 } = slot_;
9096 }
9097
9098 let _field = h.as_mut();
9099 ::fidl_next::Constrained::validate(_field, (1, ()))?;
9100 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
9101
9102 Ok(())
9103 }
9104 }
9105
9106 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
9107 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithDefaultRights;
9108 }
9109
9110 #[derive(Debug)]
9112 #[repr(C)]
9113 pub struct ArrayOfVectorOfEventInStructWithReducedRights<'de> {
9114 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9115 }
9116
9117 static_assertions::const_assert_eq!(
9118 std::mem::size_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
9119 16
9120 );
9121 static_assertions::const_assert_eq!(
9122 std::mem::align_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
9123 8
9124 );
9125
9126 static_assertions::const_assert_eq!(
9127 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithReducedRights<'_>, h),
9128 0
9129 );
9130
9131 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithReducedRights<'_> {
9132 type Constraint = ();
9133
9134 fn validate(
9135 _: ::fidl_next::Slot<'_, Self>,
9136 _: Self::Constraint,
9137 ) -> Result<(), ::fidl_next::ValidationError> {
9138 Ok(())
9139 }
9140 }
9141
9142 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithReducedRights<'static> {
9143 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithReducedRights<'de>;
9144
9145 #[inline]
9146 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9147 ::fidl_next::munge! {
9148 let Self {
9149 h,
9150
9151 } = &mut *out_;
9152 }
9153
9154 ::fidl_next::Wire::zero_padding(h);
9155 }
9156 }
9157
9158 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9159 for ArrayOfVectorOfEventInStructWithReducedRights<'de>
9160 where
9161 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9162 ___D: ::fidl_next::Decoder<'de>,
9163 ___D: ::fidl_next::fuchsia::HandleDecoder,
9164 {
9165 fn decode(
9166 slot_: ::fidl_next::Slot<'_, Self>,
9167 decoder_: &mut ___D,
9168 _: (),
9169 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9170 ::fidl_next::munge! {
9171 let Self {
9172 mut h,
9173
9174 } = slot_;
9175 }
9176
9177 let _field = h.as_mut();
9178 ::fidl_next::Constrained::validate(_field, (1, ()))?;
9179 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
9180
9181 Ok(())
9182 }
9183 }
9184
9185 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithReducedRights<'de> {
9186 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithReducedRights;
9187 }
9188
9189 #[repr(C)]
9191 pub struct ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9192 pub(crate) table: ::fidl_next::wire::Table<'de>,
9193 }
9194
9195 impl<'de> Drop for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9196 fn drop(&mut self) {
9197 let _ = self.table.get(1)
9198 .map(|envelope| unsafe {
9199 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9200 });
9201 }
9202 }
9203
9204 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRights<'_> {
9205 type Constraint = ();
9206
9207 fn validate(
9208 _: ::fidl_next::Slot<'_, Self>,
9209 _: Self::Constraint,
9210 ) -> Result<(), ::fidl_next::ValidationError> {
9211 Ok(())
9212 }
9213 }
9214
9215 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRights<'static> {
9216 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRights<'de>;
9217
9218 #[inline]
9219 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9220 ::fidl_next::munge!(let Self { table } = out);
9221 ::fidl_next::wire::Table::zero_padding(table);
9222 }
9223 }
9224
9225 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9226 for ArrayOfVectorOfEventInTableWithDefaultRights<'de>
9227 where
9228 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9229 ___D: ::fidl_next::fuchsia::HandleDecoder,
9230 {
9231 fn decode(
9232 slot: ::fidl_next::Slot<'_, Self>,
9233 decoder: &mut ___D,
9234 _: (),
9235 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9236 ::fidl_next::munge!(let Self { table } = slot);
9237
9238 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9239 match ordinal {
9240 0 => unsafe { ::core::hint::unreachable_unchecked() },
9241
9242 1 => {
9243 ::fidl_next::wire::Envelope::decode_as::<
9244 ___D,
9245 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9246 >(slot.as_mut(), decoder, (1, ()))?;
9247
9248 Ok(())
9249 }
9250
9251 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9252 }
9253 })
9254 }
9255 }
9256
9257 impl<'de> ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9258 pub fn h(
9259 &self,
9260 ) -> ::core::option::Option<
9261 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9262 > {
9263 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9264 }
9265
9266 pub fn take_h(
9267 &mut self,
9268 ) -> ::core::option::Option<
9269 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9270 > {
9271 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9272 }
9273 }
9274
9275 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9276 fn fmt(
9277 &self,
9278 f: &mut ::core::fmt::Formatter<'_>,
9279 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9280 f.debug_struct("ArrayOfVectorOfEventInTableWithDefaultRights")
9281 .field("h", &self.h())
9282 .finish()
9283 }
9284 }
9285
9286 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9287 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRights;
9288 }
9289
9290 #[derive(Debug)]
9292 #[repr(C)]
9293 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
9294 pub t: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>,
9295 }
9296
9297 static_assertions::const_assert_eq!(
9298 std::mem::size_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
9299 16
9300 );
9301 static_assertions::const_assert_eq!(
9302 std::mem::align_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
9303 8
9304 );
9305
9306 static_assertions::const_assert_eq!(
9307 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>, t),
9308 0
9309 );
9310
9311 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_> {
9312 type Constraint = ();
9313
9314 fn validate(
9315 _: ::fidl_next::Slot<'_, Self>,
9316 _: Self::Constraint,
9317 ) -> Result<(), ::fidl_next::ValidationError> {
9318 Ok(())
9319 }
9320 }
9321
9322 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static> {
9323 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>;
9324
9325 #[inline]
9326 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9327 ::fidl_next::munge! {
9328 let Self {
9329 t,
9330
9331 } = &mut *out_;
9332 }
9333
9334 ::fidl_next::Wire::zero_padding(t);
9335 }
9336 }
9337
9338 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9339 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>
9340 where
9341 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9342 ___D: ::fidl_next::Decoder<'de>,
9343 ___D: ::fidl_next::fuchsia::HandleDecoder,
9344 {
9345 fn decode(
9346 slot_: ::fidl_next::Slot<'_, Self>,
9347 decoder_: &mut ___D,
9348 _: (),
9349 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9350 ::fidl_next::munge! {
9351 let Self {
9352 mut t,
9353
9354 } = slot_;
9355 }
9356
9357 let _field = t.as_mut();
9358
9359 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
9360
9361 Ok(())
9362 }
9363 }
9364
9365 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
9366 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRightsStruct;
9367 }
9368
9369 #[repr(C)]
9371 pub struct ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9372 pub(crate) table: ::fidl_next::wire::Table<'de>,
9373 }
9374
9375 impl<'de> Drop for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9376 fn drop(&mut self) {
9377 let _ = self.table.get(1)
9378 .map(|envelope| unsafe {
9379 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9380 });
9381 }
9382 }
9383
9384 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRights<'_> {
9385 type Constraint = ();
9386
9387 fn validate(
9388 _: ::fidl_next::Slot<'_, Self>,
9389 _: Self::Constraint,
9390 ) -> Result<(), ::fidl_next::ValidationError> {
9391 Ok(())
9392 }
9393 }
9394
9395 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRights<'static> {
9396 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRights<'de>;
9397
9398 #[inline]
9399 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9400 ::fidl_next::munge!(let Self { table } = out);
9401 ::fidl_next::wire::Table::zero_padding(table);
9402 }
9403 }
9404
9405 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9406 for ArrayOfVectorOfEventInTableWithReducedRights<'de>
9407 where
9408 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9409 ___D: ::fidl_next::fuchsia::HandleDecoder,
9410 {
9411 fn decode(
9412 slot: ::fidl_next::Slot<'_, Self>,
9413 decoder: &mut ___D,
9414 _: (),
9415 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9416 ::fidl_next::munge!(let Self { table } = slot);
9417
9418 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9419 match ordinal {
9420 0 => unsafe { ::core::hint::unreachable_unchecked() },
9421
9422 1 => {
9423 ::fidl_next::wire::Envelope::decode_as::<
9424 ___D,
9425 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9426 >(slot.as_mut(), decoder, (1, ()))?;
9427
9428 Ok(())
9429 }
9430
9431 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9432 }
9433 })
9434 }
9435 }
9436
9437 impl<'de> ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9438 pub fn h(
9439 &self,
9440 ) -> ::core::option::Option<
9441 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9442 > {
9443 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9444 }
9445
9446 pub fn take_h(
9447 &mut self,
9448 ) -> ::core::option::Option<
9449 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9450 > {
9451 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9452 }
9453 }
9454
9455 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9456 fn fmt(
9457 &self,
9458 f: &mut ::core::fmt::Formatter<'_>,
9459 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9460 f.debug_struct("ArrayOfVectorOfEventInTableWithReducedRights")
9461 .field("h", &self.h())
9462 .finish()
9463 }
9464 }
9465
9466 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9467 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRights;
9468 }
9469
9470 #[derive(Debug)]
9472 #[repr(C)]
9473 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9474 pub t: crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>,
9475 }
9476
9477 static_assertions::const_assert_eq!(
9478 std::mem::size_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9479 16
9480 );
9481 static_assertions::const_assert_eq!(
9482 std::mem::align_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9483 8
9484 );
9485
9486 static_assertions::const_assert_eq!(
9487 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>, t),
9488 0
9489 );
9490
9491 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_> {
9492 type Constraint = ();
9493
9494 fn validate(
9495 _: ::fidl_next::Slot<'_, Self>,
9496 _: Self::Constraint,
9497 ) -> Result<(), ::fidl_next::ValidationError> {
9498 Ok(())
9499 }
9500 }
9501
9502 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static> {
9503 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>;
9504
9505 #[inline]
9506 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9507 ::fidl_next::munge! {
9508 let Self {
9509 t,
9510
9511 } = &mut *out_;
9512 }
9513
9514 ::fidl_next::Wire::zero_padding(t);
9515 }
9516 }
9517
9518 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9519 for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>
9520 where
9521 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9522 ___D: ::fidl_next::Decoder<'de>,
9523 ___D: ::fidl_next::fuchsia::HandleDecoder,
9524 {
9525 fn decode(
9526 slot_: ::fidl_next::Slot<'_, Self>,
9527 decoder_: &mut ___D,
9528 _: (),
9529 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9530 ::fidl_next::munge! {
9531 let Self {
9532 mut t,
9533
9534 } = slot_;
9535 }
9536
9537 let _field = t.as_mut();
9538
9539 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
9540
9541 Ok(())
9542 }
9543 }
9544
9545 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9546 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRightsStruct;
9547 }
9548
9549 #[repr(transparent)]
9551 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9552 pub(crate) raw: ::fidl_next::wire::Union,
9553 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9554 }
9555
9556 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9557 fn drop(&mut self) {
9558 match self.raw.ordinal() {
9559 1 => {
9560 let _ = unsafe {
9561 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9562 };
9563 }
9564
9565 _ => unsafe { ::core::hint::unreachable_unchecked() },
9566 }
9567 }
9568 }
9569
9570 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
9571 type Constraint = ();
9572
9573 fn validate(
9574 _: ::fidl_next::Slot<'_, Self>,
9575 _: Self::Constraint,
9576 ) -> Result<(), ::fidl_next::ValidationError> {
9577 Ok(())
9578 }
9579 }
9580
9581 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
9582 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
9583
9584 #[inline]
9585 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9586 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9587 ::fidl_next::wire::Union::zero_padding(raw);
9588 }
9589 }
9590
9591 pub mod array_of_vector_of_event_in_union_with_default_rights {
9592 pub enum Ref<'de> {
9593 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9594 }
9595
9596 pub enum Value<'de> {
9597 H([::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9598 }
9599 }
9600
9601 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9602 pub fn as_ref(
9603 &self,
9604 ) -> crate::wire::array_of_vector_of_event_in_union_with_default_rights::Ref<'_> {
9605 match self.raw.ordinal() {
9606 1 => crate::wire::array_of_vector_of_event_in_union_with_default_rights::Ref::H(
9607 unsafe {
9608 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9609 },
9610 ),
9611
9612 _ => unsafe { ::core::hint::unreachable_unchecked() },
9613 }
9614 }
9615
9616 pub fn into_inner(
9617 self,
9618 ) -> crate::wire::array_of_vector_of_event_in_union_with_default_rights::Value<'de>
9619 {
9620 let this = ::core::mem::ManuallyDrop::new(self);
9621
9622 match this.raw.ordinal() {
9623 1 => crate::wire::array_of_vector_of_event_in_union_with_default_rights::Value::H(
9624 unsafe {
9625 this.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9626 },
9627 ),
9628
9629 _ => unsafe { ::core::hint::unreachable_unchecked() },
9630 }
9631 }
9632 }
9633
9634 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9635 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
9636 where
9637 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9638 ___D: ::fidl_next::Decoder<'de>,
9639 ___D: ::fidl_next::fuchsia::HandleDecoder,
9640 {
9641 fn decode(
9642 mut slot: ::fidl_next::Slot<'_, Self>,
9643 decoder: &mut ___D,
9644 _: (),
9645 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9646 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9647 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9648 1 => ::fidl_next::wire::Union::decode_as::<
9649 ___D,
9650 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9651 >(raw, decoder, (1, ()))?,
9652
9653 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9654 }
9655
9656 Ok(())
9657 }
9658 }
9659
9660 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9661 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9662 match self.raw.ordinal() {
9663 1 => unsafe {
9664 self.raw.get().deref_unchecked::<
9665 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9666 >().fmt(f)
9667 },
9668 _ => unsafe { ::core::hint::unreachable_unchecked() },
9669 }
9670 }
9671 }
9672
9673 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9674 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights;
9675 }
9676
9677 #[derive(Debug)]
9679 #[repr(C)]
9680 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9681 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
9682 }
9683
9684 static_assertions::const_assert_eq!(
9685 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9686 16
9687 );
9688 static_assertions::const_assert_eq!(
9689 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9690 8
9691 );
9692
9693 static_assertions::const_assert_eq!(
9694 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>, u),
9695 0
9696 );
9697
9698 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_> {
9699 type Constraint = ();
9700
9701 fn validate(
9702 _: ::fidl_next::Slot<'_, Self>,
9703 _: Self::Constraint,
9704 ) -> Result<(), ::fidl_next::ValidationError> {
9705 Ok(())
9706 }
9707 }
9708
9709 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static> {
9710 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>;
9711
9712 #[inline]
9713 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9714 ::fidl_next::munge! {
9715 let Self {
9716 u,
9717
9718 } = &mut *out_;
9719 }
9720
9721 ::fidl_next::Wire::zero_padding(u);
9722 }
9723 }
9724
9725 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9726 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>
9727 where
9728 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9729 ___D: ::fidl_next::Decoder<'de>,
9730 ___D: ::fidl_next::fuchsia::HandleDecoder,
9731 {
9732 fn decode(
9733 slot_: ::fidl_next::Slot<'_, Self>,
9734 decoder_: &mut ___D,
9735 _: (),
9736 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9737 ::fidl_next::munge! {
9738 let Self {
9739 mut u,
9740
9741 } = slot_;
9742 }
9743
9744 let _field = u.as_mut();
9745
9746 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9747
9748 Ok(())
9749 }
9750 }
9751
9752 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9753 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct;
9754 }
9755
9756 #[repr(transparent)]
9758 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9759 pub(crate) raw: ::fidl_next::wire::Union,
9760 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9761 }
9762
9763 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9764 fn drop(&mut self) {
9765 match self.raw.ordinal() {
9766 1 => {
9767 let _ = unsafe {
9768 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9769 };
9770 }
9771
9772 _ => unsafe { ::core::hint::unreachable_unchecked() },
9773 }
9774 }
9775 }
9776
9777 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
9778 type Constraint = ();
9779
9780 fn validate(
9781 _: ::fidl_next::Slot<'_, Self>,
9782 _: Self::Constraint,
9783 ) -> Result<(), ::fidl_next::ValidationError> {
9784 Ok(())
9785 }
9786 }
9787
9788 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
9789 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
9790
9791 #[inline]
9792 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9793 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9794 ::fidl_next::wire::Union::zero_padding(raw);
9795 }
9796 }
9797
9798 pub mod array_of_vector_of_event_in_union_with_reduced_rights {
9799 pub enum Ref<'de> {
9800 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9801 }
9802
9803 pub enum Value<'de> {
9804 H([::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9805 }
9806 }
9807
9808 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9809 pub fn as_ref(
9810 &self,
9811 ) -> crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref<'_> {
9812 match self.raw.ordinal() {
9813 1 => crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref::H(
9814 unsafe {
9815 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9816 },
9817 ),
9818
9819 _ => unsafe { ::core::hint::unreachable_unchecked() },
9820 }
9821 }
9822
9823 pub fn into_inner(
9824 self,
9825 ) -> crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Value<'de>
9826 {
9827 let this = ::core::mem::ManuallyDrop::new(self);
9828
9829 match this.raw.ordinal() {
9830 1 => crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Value::H(
9831 unsafe {
9832 this.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9833 },
9834 ),
9835
9836 _ => unsafe { ::core::hint::unreachable_unchecked() },
9837 }
9838 }
9839 }
9840
9841 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9842 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
9843 where
9844 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9845 ___D: ::fidl_next::Decoder<'de>,
9846 ___D: ::fidl_next::fuchsia::HandleDecoder,
9847 {
9848 fn decode(
9849 mut slot: ::fidl_next::Slot<'_, Self>,
9850 decoder: &mut ___D,
9851 _: (),
9852 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9853 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9854 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9855 1 => ::fidl_next::wire::Union::decode_as::<
9856 ___D,
9857 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9858 >(raw, decoder, (1, ()))?,
9859
9860 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9861 }
9862
9863 Ok(())
9864 }
9865 }
9866
9867 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9868 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9869 match self.raw.ordinal() {
9870 1 => unsafe {
9871 self.raw.get().deref_unchecked::<
9872 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9873 >().fmt(f)
9874 },
9875 _ => unsafe { ::core::hint::unreachable_unchecked() },
9876 }
9877 }
9878 }
9879
9880 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9881 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights;
9882 }
9883
9884 #[derive(Debug)]
9886 #[repr(C)]
9887 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9888 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
9889 }
9890
9891 static_assertions::const_assert_eq!(
9892 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9893 16
9894 );
9895 static_assertions::const_assert_eq!(
9896 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9897 8
9898 );
9899
9900 static_assertions::const_assert_eq!(
9901 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>, u),
9902 0
9903 );
9904
9905 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_> {
9906 type Constraint = ();
9907
9908 fn validate(
9909 _: ::fidl_next::Slot<'_, Self>,
9910 _: Self::Constraint,
9911 ) -> Result<(), ::fidl_next::ValidationError> {
9912 Ok(())
9913 }
9914 }
9915
9916 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static> {
9917 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>;
9918
9919 #[inline]
9920 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9921 ::fidl_next::munge! {
9922 let Self {
9923 u,
9924
9925 } = &mut *out_;
9926 }
9927
9928 ::fidl_next::Wire::zero_padding(u);
9929 }
9930 }
9931
9932 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9933 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>
9934 where
9935 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9936 ___D: ::fidl_next::Decoder<'de>,
9937 ___D: ::fidl_next::fuchsia::HandleDecoder,
9938 {
9939 fn decode(
9940 slot_: ::fidl_next::Slot<'_, Self>,
9941 decoder_: &mut ___D,
9942 _: (),
9943 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9944 ::fidl_next::munge! {
9945 let Self {
9946 mut u,
9947
9948 } = slot_;
9949 }
9950
9951 let _field = u.as_mut();
9952
9953 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9954
9955 Ok(())
9956 }
9957 }
9958
9959 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9960 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRightsStruct;
9961 }
9962
9963 #[derive(Debug)]
9965 #[repr(C)]
9966 pub struct Bounded32NonnullableVectorOfHandles<'de> {
9967 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
9968 }
9969
9970 static_assertions::const_assert_eq!(
9971 std::mem::size_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9972 16
9973 );
9974 static_assertions::const_assert_eq!(
9975 std::mem::align_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9976 8
9977 );
9978
9979 static_assertions::const_assert_eq!(
9980 std::mem::offset_of!(Bounded32NonnullableVectorOfHandles<'_>, vh0),
9981 0
9982 );
9983
9984 impl ::fidl_next::Constrained for Bounded32NonnullableVectorOfHandles<'_> {
9985 type Constraint = ();
9986
9987 fn validate(
9988 _: ::fidl_next::Slot<'_, Self>,
9989 _: Self::Constraint,
9990 ) -> Result<(), ::fidl_next::ValidationError> {
9991 Ok(())
9992 }
9993 }
9994
9995 unsafe impl ::fidl_next::Wire for Bounded32NonnullableVectorOfHandles<'static> {
9996 type Narrowed<'de> = Bounded32NonnullableVectorOfHandles<'de>;
9997
9998 #[inline]
9999 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10000 ::fidl_next::munge! {
10001 let Self {
10002 vh0,
10003
10004 } = &mut *out_;
10005 }
10006
10007 ::fidl_next::Wire::zero_padding(vh0);
10008 }
10009 }
10010
10011 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NonnullableVectorOfHandles<'de>
10012 where
10013 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10014 ___D: ::fidl_next::Decoder<'de>,
10015 ___D: ::fidl_next::fuchsia::HandleDecoder,
10016 {
10017 fn decode(
10018 slot_: ::fidl_next::Slot<'_, Self>,
10019 decoder_: &mut ___D,
10020 _: (),
10021 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10022 ::fidl_next::munge! {
10023 let Self {
10024 mut vh0,
10025
10026 } = slot_;
10027 }
10028
10029 let _field = vh0.as_mut();
10030 ::fidl_next::Constrained::validate(_field, (32, ()))?;
10031 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
10032
10033 let vh0 = unsafe { vh0.deref_unchecked() };
10034
10035 if vh0.len() > 32 {
10036 return Err(::fidl_next::DecodeError::VectorTooLong {
10037 size: vh0.len() as u64,
10038 limit: 32,
10039 });
10040 }
10041
10042 Ok(())
10043 }
10044 }
10045
10046 impl<'de> ::fidl_next::IntoNatural for Bounded32NonnullableVectorOfHandles<'de> {
10047 type Natural = crate::natural::Bounded32NonnullableVectorOfHandles;
10048 }
10049
10050 #[derive(Debug)]
10052 #[repr(C)]
10053 pub struct Bounded32NullableVectorOfHandles<'de> {
10054 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
10055 }
10056
10057 static_assertions::const_assert_eq!(
10058 std::mem::size_of::<Bounded32NullableVectorOfHandles<'_>>(),
10059 16
10060 );
10061 static_assertions::const_assert_eq!(
10062 std::mem::align_of::<Bounded32NullableVectorOfHandles<'_>>(),
10063 8
10064 );
10065
10066 static_assertions::const_assert_eq!(
10067 std::mem::offset_of!(Bounded32NullableVectorOfHandles<'_>, vh0),
10068 0
10069 );
10070
10071 impl ::fidl_next::Constrained for Bounded32NullableVectorOfHandles<'_> {
10072 type Constraint = ();
10073
10074 fn validate(
10075 _: ::fidl_next::Slot<'_, Self>,
10076 _: Self::Constraint,
10077 ) -> Result<(), ::fidl_next::ValidationError> {
10078 Ok(())
10079 }
10080 }
10081
10082 unsafe impl ::fidl_next::Wire for Bounded32NullableVectorOfHandles<'static> {
10083 type Narrowed<'de> = Bounded32NullableVectorOfHandles<'de>;
10084
10085 #[inline]
10086 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10087 ::fidl_next::munge! {
10088 let Self {
10089 vh0,
10090
10091 } = &mut *out_;
10092 }
10093
10094 ::fidl_next::Wire::zero_padding(vh0);
10095 }
10096 }
10097
10098 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NullableVectorOfHandles<'de>
10099 where
10100 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10101 ___D: ::fidl_next::Decoder<'de>,
10102 ___D: ::fidl_next::fuchsia::HandleDecoder,
10103 {
10104 fn decode(
10105 slot_: ::fidl_next::Slot<'_, Self>,
10106 decoder_: &mut ___D,
10107 _: (),
10108 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10109 ::fidl_next::munge! {
10110 let Self {
10111 mut vh0,
10112
10113 } = slot_;
10114 }
10115
10116 let _field = vh0.as_mut();
10117 ::fidl_next::Constrained::validate(_field, (32, ()))?;
10118 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
10119
10120 let vh0 = unsafe { vh0.deref_unchecked() };
10121
10122 if let Some(vh0) = vh0.as_ref() {
10123 if vh0.len() > 32 {
10124 return Err(::fidl_next::DecodeError::VectorTooLong {
10125 size: vh0.len() as u64,
10126 limit: 32,
10127 });
10128 }
10129 }
10130
10131 Ok(())
10132 }
10133 }
10134
10135 impl<'de> ::fidl_next::IntoNatural for Bounded32NullableVectorOfHandles<'de> {
10136 type Natural = crate::natural::Bounded32NullableVectorOfHandles;
10137 }
10138
10139 #[derive(Debug)]
10141 #[repr(C)]
10142 pub struct BoxOfSingleHandle<'de> {
10143 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleHandle>,
10144 }
10145
10146 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleHandle<'_>>(), 8);
10147 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleHandle<'_>>(), 8);
10148
10149 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleHandle<'_>, b), 0);
10150
10151 impl ::fidl_next::Constrained for BoxOfSingleHandle<'_> {
10152 type Constraint = ();
10153
10154 fn validate(
10155 _: ::fidl_next::Slot<'_, Self>,
10156 _: Self::Constraint,
10157 ) -> Result<(), ::fidl_next::ValidationError> {
10158 Ok(())
10159 }
10160 }
10161
10162 unsafe impl ::fidl_next::Wire for BoxOfSingleHandle<'static> {
10163 type Narrowed<'de> = BoxOfSingleHandle<'de>;
10164
10165 #[inline]
10166 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10167 ::fidl_next::munge! {
10168 let Self {
10169 b,
10170
10171 } = &mut *out_;
10172 }
10173
10174 ::fidl_next::Wire::zero_padding(b);
10175 }
10176 }
10177
10178 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleHandle<'de>
10179 where
10180 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10181 ___D: ::fidl_next::Decoder<'de>,
10182 ___D: ::fidl_next::fuchsia::HandleDecoder,
10183 {
10184 fn decode(
10185 slot_: ::fidl_next::Slot<'_, Self>,
10186 decoder_: &mut ___D,
10187 _: (),
10188 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10189 ::fidl_next::munge! {
10190 let Self {
10191 mut b,
10192
10193 } = slot_;
10194 }
10195
10196 let _field = b.as_mut();
10197
10198 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
10199
10200 Ok(())
10201 }
10202 }
10203
10204 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleHandle<'de> {
10205 type Natural = crate::natural::BoxOfSingleHandle;
10206 }
10207
10208 #[derive(Debug)]
10210 #[repr(C)]
10211 pub struct BoxOfSingleOptionalHandle<'de> {
10212 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleOptionalHandle>,
10213 }
10214
10215 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
10216 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
10217
10218 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleOptionalHandle<'_>, b), 0);
10219
10220 impl ::fidl_next::Constrained for BoxOfSingleOptionalHandle<'_> {
10221 type Constraint = ();
10222
10223 fn validate(
10224 _: ::fidl_next::Slot<'_, Self>,
10225 _: Self::Constraint,
10226 ) -> Result<(), ::fidl_next::ValidationError> {
10227 Ok(())
10228 }
10229 }
10230
10231 unsafe impl ::fidl_next::Wire for BoxOfSingleOptionalHandle<'static> {
10232 type Narrowed<'de> = BoxOfSingleOptionalHandle<'de>;
10233
10234 #[inline]
10235 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10236 ::fidl_next::munge! {
10237 let Self {
10238 b,
10239
10240 } = &mut *out_;
10241 }
10242
10243 ::fidl_next::Wire::zero_padding(b);
10244 }
10245 }
10246
10247 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleOptionalHandle<'de>
10248 where
10249 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10250 ___D: ::fidl_next::Decoder<'de>,
10251 ___D: ::fidl_next::fuchsia::HandleDecoder,
10252 {
10253 fn decode(
10254 slot_: ::fidl_next::Slot<'_, Self>,
10255 decoder_: &mut ___D,
10256 _: (),
10257 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10258 ::fidl_next::munge! {
10259 let Self {
10260 mut b,
10261
10262 } = slot_;
10263 }
10264
10265 let _field = b.as_mut();
10266
10267 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
10268
10269 Ok(())
10270 }
10271 }
10272
10273 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleOptionalHandle<'de> {
10274 type Natural = crate::natural::BoxOfSingleOptionalHandle;
10275 }
10276
10277 #[derive(Debug)]
10279 #[repr(C)]
10280 pub struct LaunchInfo<'de> {
10281 pub url: ::fidl_next::wire::String<'de>,
10282
10283 pub arguments: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::String<'de>>,
10284
10285 pub out: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
10286
10287 pub err: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
10288
10289 pub directory_request: ::fidl_next::wire::fuchsia::OptionalChannel,
10290
10291 pub flat_namespace: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
10292
10293 pub additional_services: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
10294 }
10295
10296 static_assertions::const_assert_eq!(std::mem::size_of::<LaunchInfo<'_>>(), 72);
10297 static_assertions::const_assert_eq!(std::mem::align_of::<LaunchInfo<'_>>(), 8);
10298
10299 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, url), 0);
10300
10301 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, arguments), 16);
10302
10303 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, out), 32);
10304
10305 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, err), 40);
10306
10307 static_assertions::const_assert_eq!(
10308 std::mem::offset_of!(LaunchInfo<'_>, directory_request),
10309 48
10310 );
10311
10312 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, flat_namespace), 56);
10313
10314 static_assertions::const_assert_eq!(
10315 std::mem::offset_of!(LaunchInfo<'_>, additional_services),
10316 64
10317 );
10318
10319 impl ::fidl_next::Constrained for LaunchInfo<'_> {
10320 type Constraint = ();
10321
10322 fn validate(
10323 _: ::fidl_next::Slot<'_, Self>,
10324 _: Self::Constraint,
10325 ) -> Result<(), ::fidl_next::ValidationError> {
10326 Ok(())
10327 }
10328 }
10329
10330 unsafe impl ::fidl_next::Wire for LaunchInfo<'static> {
10331 type Narrowed<'de> = LaunchInfo<'de>;
10332
10333 #[inline]
10334 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10335 ::fidl_next::munge! {
10336 let Self {
10337 url,
10338 arguments,
10339 out,
10340 err,
10341 directory_request,
10342 flat_namespace,
10343 additional_services,
10344
10345 } = &mut *out_;
10346 }
10347
10348 ::fidl_next::Wire::zero_padding(url);
10349
10350 ::fidl_next::Wire::zero_padding(arguments);
10351
10352 ::fidl_next::Wire::zero_padding(out);
10353
10354 ::fidl_next::Wire::zero_padding(err);
10355
10356 ::fidl_next::Wire::zero_padding(directory_request);
10357
10358 ::fidl_next::Wire::zero_padding(flat_namespace);
10359
10360 ::fidl_next::Wire::zero_padding(additional_services);
10361
10362 unsafe {
10363 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
10364 }
10365 }
10366 }
10367
10368 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LaunchInfo<'de>
10369 where
10370 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10371 ___D: ::fidl_next::Decoder<'de>,
10372 ___D: ::fidl_next::fuchsia::HandleDecoder,
10373 {
10374 fn decode(
10375 slot_: ::fidl_next::Slot<'_, Self>,
10376 decoder_: &mut ___D,
10377 _: (),
10378 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10379 if slot_.as_bytes()[52..56] != [0u8; 4] {
10380 return Err(::fidl_next::DecodeError::InvalidPadding);
10381 }
10382
10383 ::fidl_next::munge! {
10384 let Self {
10385 mut url,
10386 mut arguments,
10387 mut out,
10388 mut err,
10389 mut directory_request,
10390 mut flat_namespace,
10391 mut additional_services,
10392
10393 } = slot_;
10394 }
10395
10396 let _field = url.as_mut();
10397 ::fidl_next::Constrained::validate(_field, 200)?;
10398 ::fidl_next::Decode::decode(url.as_mut(), decoder_, 200)?;
10399
10400 let url = unsafe { url.deref_unchecked() };
10401
10402 if url.len() > 200 {
10403 return Err(::fidl_next::DecodeError::VectorTooLong {
10404 size: url.len() as u64,
10405 limit: 200,
10406 });
10407 }
10408
10409 let _field = arguments.as_mut();
10410 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
10411 ::fidl_next::Decode::decode(arguments.as_mut(), decoder_, (4294967295, 4294967295))?;
10412
10413 let _field = out.as_mut();
10414
10415 ::fidl_next::Decode::decode(out.as_mut(), decoder_, ())?;
10416
10417 let _field = err.as_mut();
10418
10419 ::fidl_next::Decode::decode(err.as_mut(), decoder_, ())?;
10420
10421 let _field = directory_request.as_mut();
10422
10423 ::fidl_next::Decode::decode(directory_request.as_mut(), decoder_, ())?;
10424
10425 let _field = flat_namespace.as_mut();
10426
10427 ::fidl_next::Decode::decode(flat_namespace.as_mut(), decoder_, ())?;
10428
10429 let _field = additional_services.as_mut();
10430
10431 ::fidl_next::Decode::decode(additional_services.as_mut(), decoder_, ())?;
10432
10433 Ok(())
10434 }
10435 }
10436
10437 impl<'de> ::fidl_next::IntoNatural for LaunchInfo<'de> {
10438 type Natural = crate::natural::LaunchInfo;
10439 }
10440
10441 #[derive(Debug)]
10443 #[repr(C)]
10444 pub struct CreateComponentRequest<'de> {
10445 pub launch_info: crate::wire::LaunchInfo<'de>,
10446
10447 pub controller: ::fidl_next::ServerEnd<
10448 crate::ComponentController,
10449 ::fidl_next::wire::fuchsia::OptionalChannel,
10450 >,
10451 }
10452
10453 static_assertions::const_assert_eq!(std::mem::size_of::<CreateComponentRequest<'_>>(), 80);
10454 static_assertions::const_assert_eq!(std::mem::align_of::<CreateComponentRequest<'_>>(), 8);
10455
10456 static_assertions::const_assert_eq!(
10457 std::mem::offset_of!(CreateComponentRequest<'_>, launch_info),
10458 0
10459 );
10460
10461 static_assertions::const_assert_eq!(
10462 std::mem::offset_of!(CreateComponentRequest<'_>, controller),
10463 72
10464 );
10465
10466 impl ::fidl_next::Constrained for CreateComponentRequest<'_> {
10467 type Constraint = ();
10468
10469 fn validate(
10470 _: ::fidl_next::Slot<'_, Self>,
10471 _: Self::Constraint,
10472 ) -> Result<(), ::fidl_next::ValidationError> {
10473 Ok(())
10474 }
10475 }
10476
10477 unsafe impl ::fidl_next::Wire for CreateComponentRequest<'static> {
10478 type Narrowed<'de> = CreateComponentRequest<'de>;
10479
10480 #[inline]
10481 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10482 ::fidl_next::munge! {
10483 let Self {
10484 launch_info,
10485 controller,
10486
10487 } = &mut *out_;
10488 }
10489
10490 ::fidl_next::Wire::zero_padding(launch_info);
10491
10492 ::fidl_next::Wire::zero_padding(controller);
10493
10494 unsafe {
10495 out_.as_mut_ptr().cast::<u8>().add(76).write_bytes(0, 4);
10496 }
10497 }
10498 }
10499
10500 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CreateComponentRequest<'de>
10501 where
10502 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10503 ___D: ::fidl_next::Decoder<'de>,
10504 ___D: ::fidl_next::fuchsia::HandleDecoder,
10505 {
10506 fn decode(
10507 slot_: ::fidl_next::Slot<'_, Self>,
10508 decoder_: &mut ___D,
10509 _: (),
10510 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10511 if slot_.as_bytes()[76..80] != [0u8; 4] {
10512 return Err(::fidl_next::DecodeError::InvalidPadding);
10513 }
10514
10515 ::fidl_next::munge! {
10516 let Self {
10517 mut launch_info,
10518 mut controller,
10519
10520 } = slot_;
10521 }
10522
10523 let _field = launch_info.as_mut();
10524
10525 ::fidl_next::Decode::decode(launch_info.as_mut(), decoder_, ())?;
10526
10527 let _field = controller.as_mut();
10528
10529 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
10530
10531 Ok(())
10532 }
10533 }
10534
10535 impl<'de> ::fidl_next::IntoNatural for CreateComponentRequest<'de> {
10536 type Natural = crate::natural::CreateComponentRequest;
10537 }
10538
10539 #[repr(C)]
10541 pub struct EmptyResourceTable<'de> {
10542 pub(crate) table: ::fidl_next::wire::Table<'de>,
10543 }
10544
10545 impl<'de> Drop for EmptyResourceTable<'de> {
10546 fn drop(&mut self) {}
10547 }
10548
10549 impl ::fidl_next::Constrained for EmptyResourceTable<'_> {
10550 type Constraint = ();
10551
10552 fn validate(
10553 _: ::fidl_next::Slot<'_, Self>,
10554 _: Self::Constraint,
10555 ) -> Result<(), ::fidl_next::ValidationError> {
10556 Ok(())
10557 }
10558 }
10559
10560 unsafe impl ::fidl_next::Wire for EmptyResourceTable<'static> {
10561 type Narrowed<'de> = EmptyResourceTable<'de>;
10562
10563 #[inline]
10564 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10565 ::fidl_next::munge!(let Self { table } = out);
10566 ::fidl_next::wire::Table::zero_padding(table);
10567 }
10568 }
10569
10570 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTable<'de>
10571 where
10572 ___D: ::fidl_next::Decoder<'de> + ?Sized,
10573 ___D: ::fidl_next::fuchsia::HandleDecoder,
10574 {
10575 fn decode(
10576 slot: ::fidl_next::Slot<'_, Self>,
10577 decoder: &mut ___D,
10578 _: (),
10579 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10580 ::fidl_next::munge!(let Self { table } = slot);
10581
10582 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10583 match ordinal {
10584 0 => unsafe { ::core::hint::unreachable_unchecked() },
10585
10586 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10587 }
10588 })
10589 }
10590 }
10591
10592 impl<'de> EmptyResourceTable<'de> {}
10593
10594 impl<'de> ::core::fmt::Debug for EmptyResourceTable<'de> {
10595 fn fmt(
10596 &self,
10597 f: &mut ::core::fmt::Formatter<'_>,
10598 ) -> ::core::result::Result<(), ::core::fmt::Error> {
10599 f.debug_struct("EmptyResourceTable").finish()
10600 }
10601 }
10602
10603 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTable<'de> {
10604 type Natural = crate::natural::EmptyResourceTable;
10605 }
10606
10607 #[derive(Debug)]
10609 #[repr(C)]
10610 pub struct EmptyResourceTableStruct<'de> {
10611 pub table: crate::wire::EmptyResourceTable<'de>,
10612 }
10613
10614 static_assertions::const_assert_eq!(std::mem::size_of::<EmptyResourceTableStruct<'_>>(), 16);
10615 static_assertions::const_assert_eq!(std::mem::align_of::<EmptyResourceTableStruct<'_>>(), 8);
10616
10617 static_assertions::const_assert_eq!(
10618 std::mem::offset_of!(EmptyResourceTableStruct<'_>, table),
10619 0
10620 );
10621
10622 impl ::fidl_next::Constrained for EmptyResourceTableStruct<'_> {
10623 type Constraint = ();
10624
10625 fn validate(
10626 _: ::fidl_next::Slot<'_, Self>,
10627 _: Self::Constraint,
10628 ) -> Result<(), ::fidl_next::ValidationError> {
10629 Ok(())
10630 }
10631 }
10632
10633 unsafe impl ::fidl_next::Wire for EmptyResourceTableStruct<'static> {
10634 type Narrowed<'de> = EmptyResourceTableStruct<'de>;
10635
10636 #[inline]
10637 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10638 ::fidl_next::munge! {
10639 let Self {
10640 table,
10641
10642 } = &mut *out_;
10643 }
10644
10645 ::fidl_next::Wire::zero_padding(table);
10646 }
10647 }
10648
10649 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTableStruct<'de>
10650 where
10651 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10652 ___D: ::fidl_next::Decoder<'de>,
10653 ___D: ::fidl_next::fuchsia::HandleDecoder,
10654 {
10655 fn decode(
10656 slot_: ::fidl_next::Slot<'_, Self>,
10657 decoder_: &mut ___D,
10658 _: (),
10659 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10660 ::fidl_next::munge! {
10661 let Self {
10662 mut table,
10663
10664 } = slot_;
10665 }
10666
10667 let _field = table.as_mut();
10668
10669 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
10670
10671 Ok(())
10672 }
10673 }
10674
10675 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTableStruct<'de> {
10676 type Natural = crate::natural::EmptyResourceTableStruct;
10677 }
10678
10679 #[repr(transparent)]
10681 pub struct EnvelopeInliningTestUnion<'de> {
10682 pub(crate) raw: ::fidl_next::wire::Union,
10683 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
10684 }
10685
10686 impl<'de> Drop for EnvelopeInliningTestUnion<'de> {
10687 fn drop(&mut self) {
10688 match self.raw.ordinal() {
10689 1 => {
10690 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
10691 }
10692
10693 2 => {
10694 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint64>() };
10695 }
10696
10697 3 => {
10698 let _ = unsafe {
10699 self.raw
10700 .get()
10701 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10702 };
10703 }
10704
10705 _ => (),
10706 }
10707 }
10708 }
10709
10710 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
10711 type Constraint = ();
10712
10713 fn validate(
10714 _: ::fidl_next::Slot<'_, Self>,
10715 _: Self::Constraint,
10716 ) -> Result<(), ::fidl_next::ValidationError> {
10717 Ok(())
10718 }
10719 }
10720
10721 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
10722 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
10723
10724 #[inline]
10725 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10726 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
10727 ::fidl_next::wire::Union::zero_padding(raw);
10728 }
10729 }
10730
10731 pub mod envelope_inlining_test_union {
10732 pub enum Ref<'de> {
10733 Small(&'de ::fidl_next::wire::Uint32),
10734
10735 Large(&'de ::fidl_next::wire::Uint64),
10736
10737 Handle(&'de ::fidl_next::wire::fuchsia::NullableHandle),
10738
10739 UnknownOrdinal_(u64),
10740 }
10741
10742 pub enum Value {
10743 Small(::fidl_next::wire::Uint32),
10744
10745 Large(::fidl_next::wire::Uint64),
10746
10747 Handle(::fidl_next::wire::fuchsia::NullableHandle),
10748
10749 UnknownOrdinal_(u64),
10750 }
10751 }
10752
10753 impl<'de> EnvelopeInliningTestUnion<'de> {
10754 pub fn as_ref(&self) -> crate::wire::envelope_inlining_test_union::Ref<'_> {
10755 match self.raw.ordinal() {
10756 1 => crate::wire::envelope_inlining_test_union::Ref::Small(unsafe {
10757 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
10758 }),
10759
10760 2 => crate::wire::envelope_inlining_test_union::Ref::Large(unsafe {
10761 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>()
10762 }),
10763
10764 3 => crate::wire::envelope_inlining_test_union::Ref::Handle(unsafe {
10765 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10766 }),
10767
10768 unknown => crate::wire::envelope_inlining_test_union::Ref::UnknownOrdinal_(unknown),
10769 }
10770 }
10771
10772 pub fn into_inner(self) -> crate::wire::envelope_inlining_test_union::Value {
10773 let this = ::core::mem::ManuallyDrop::new(self);
10774
10775 match this.raw.ordinal() {
10776 1 => crate::wire::envelope_inlining_test_union::Value::Small(unsafe {
10777 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
10778 }),
10779
10780 2 => crate::wire::envelope_inlining_test_union::Value::Large(unsafe {
10781 this.raw.get().read_unchecked::<::fidl_next::wire::Uint64>()
10782 }),
10783
10784 3 => crate::wire::envelope_inlining_test_union::Value::Handle(unsafe {
10785 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10786 }),
10787
10788 unknown => {
10789 crate::wire::envelope_inlining_test_union::Value::UnknownOrdinal_(unknown)
10790 }
10791 }
10792 }
10793 }
10794
10795 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
10796 where
10797 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10798 ___D: ::fidl_next::Decoder<'de>,
10799 ___D: ::fidl_next::fuchsia::HandleDecoder,
10800 {
10801 fn decode(
10802 mut slot: ::fidl_next::Slot<'_, Self>,
10803 decoder: &mut ___D,
10804 _: (),
10805 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10806 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
10807 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
10808 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
10809 raw,
10810 decoder,
10811 (),
10812 )?,
10813
10814 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
10815 raw,
10816 decoder,
10817 (),
10818 )?,
10819
10820 3 => ::fidl_next::wire::Union::decode_as::<
10821 ___D,
10822 ::fidl_next::wire::fuchsia::NullableHandle,
10823 >(raw, decoder, ())?,
10824
10825 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
10826 }
10827
10828 Ok(())
10829 }
10830 }
10831
10832 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
10833 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10834 match self.raw.ordinal() {
10835 1 => unsafe {
10836 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
10837 },
10838 2 => unsafe {
10839 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>().fmt(f)
10840 },
10841 3 => unsafe {
10842 self.raw
10843 .get()
10844 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10845 .fmt(f)
10846 },
10847 _ => unsafe { ::core::hint::unreachable_unchecked() },
10848 }
10849 }
10850 }
10851
10852 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
10853 type Natural = crate::natural::EnvelopeInliningTestUnion;
10854 }
10855
10856 #[derive(Debug)]
10858 #[repr(C)]
10859 pub struct EnvelopeInliningTestUnionStruct<'de> {
10860 pub u: crate::wire::EnvelopeInliningTestUnion<'de>,
10861 }
10862
10863 static_assertions::const_assert_eq!(
10864 std::mem::size_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10865 16
10866 );
10867 static_assertions::const_assert_eq!(
10868 std::mem::align_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10869 8
10870 );
10871
10872 static_assertions::const_assert_eq!(
10873 std::mem::offset_of!(EnvelopeInliningTestUnionStruct<'_>, u),
10874 0
10875 );
10876
10877 impl ::fidl_next::Constrained for EnvelopeInliningTestUnionStruct<'_> {
10878 type Constraint = ();
10879
10880 fn validate(
10881 _: ::fidl_next::Slot<'_, Self>,
10882 _: Self::Constraint,
10883 ) -> Result<(), ::fidl_next::ValidationError> {
10884 Ok(())
10885 }
10886 }
10887
10888 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnionStruct<'static> {
10889 type Narrowed<'de> = EnvelopeInliningTestUnionStruct<'de>;
10890
10891 #[inline]
10892 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10893 ::fidl_next::munge! {
10894 let Self {
10895 u,
10896
10897 } = &mut *out_;
10898 }
10899
10900 ::fidl_next::Wire::zero_padding(u);
10901 }
10902 }
10903
10904 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnionStruct<'de>
10905 where
10906 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10907 ___D: ::fidl_next::Decoder<'de>,
10908 ___D: ::fidl_next::fuchsia::HandleDecoder,
10909 {
10910 fn decode(
10911 slot_: ::fidl_next::Slot<'_, Self>,
10912 decoder_: &mut ___D,
10913 _: (),
10914 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10915 ::fidl_next::munge! {
10916 let Self {
10917 mut u,
10918
10919 } = slot_;
10920 }
10921
10922 let _field = u.as_mut();
10923
10924 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
10925
10926 Ok(())
10927 }
10928 }
10929
10930 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnionStruct<'de> {
10931 type Natural = crate::natural::EnvelopeInliningTestUnionStruct;
10932 }
10933
10934 #[derive(Debug)]
10936 #[repr(C)]
10937 pub struct EventWithDefaultRights {
10938 pub h: ::fidl_next::wire::fuchsia::Event,
10939 }
10940
10941 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithDefaultRights>(), 4);
10942 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithDefaultRights>(), 4);
10943
10944 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithDefaultRights, h), 0);
10945
10946 impl ::fidl_next::Constrained for EventWithDefaultRights {
10947 type Constraint = ();
10948
10949 fn validate(
10950 _: ::fidl_next::Slot<'_, Self>,
10951 _: Self::Constraint,
10952 ) -> Result<(), ::fidl_next::ValidationError> {
10953 Ok(())
10954 }
10955 }
10956
10957 unsafe impl ::fidl_next::Wire for EventWithDefaultRights {
10958 type Narrowed<'de> = EventWithDefaultRights;
10959
10960 #[inline]
10961 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10962 ::fidl_next::munge! {
10963 let Self {
10964 h,
10965
10966 } = &mut *out_;
10967 }
10968
10969 ::fidl_next::Wire::zero_padding(h);
10970 }
10971 }
10972
10973 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithDefaultRights
10974 where
10975 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10976 ___D: ::fidl_next::fuchsia::HandleDecoder,
10977 {
10978 fn decode(
10979 slot_: ::fidl_next::Slot<'_, Self>,
10980 decoder_: &mut ___D,
10981 _: (),
10982 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10983 ::fidl_next::munge! {
10984 let Self {
10985 mut h,
10986
10987 } = slot_;
10988 }
10989
10990 let _field = h.as_mut();
10991
10992 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
10993
10994 Ok(())
10995 }
10996 }
10997
10998 impl ::fidl_next::IntoNatural for EventWithDefaultRights {
10999 type Natural = crate::natural::EventWithDefaultRights;
11000 }
11001
11002 #[derive(Debug)]
11004 #[repr(C)]
11005 pub struct EventWithReducedRights {
11006 pub h: ::fidl_next::wire::fuchsia::Event,
11007 }
11008
11009 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithReducedRights>(), 4);
11010 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithReducedRights>(), 4);
11011
11012 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithReducedRights, h), 0);
11013
11014 impl ::fidl_next::Constrained for EventWithReducedRights {
11015 type Constraint = ();
11016
11017 fn validate(
11018 _: ::fidl_next::Slot<'_, Self>,
11019 _: Self::Constraint,
11020 ) -> Result<(), ::fidl_next::ValidationError> {
11021 Ok(())
11022 }
11023 }
11024
11025 unsafe impl ::fidl_next::Wire for EventWithReducedRights {
11026 type Narrowed<'de> = EventWithReducedRights;
11027
11028 #[inline]
11029 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11030 ::fidl_next::munge! {
11031 let Self {
11032 h,
11033
11034 } = &mut *out_;
11035 }
11036
11037 ::fidl_next::Wire::zero_padding(h);
11038 }
11039 }
11040
11041 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithReducedRights
11042 where
11043 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11044 ___D: ::fidl_next::fuchsia::HandleDecoder,
11045 {
11046 fn decode(
11047 slot_: ::fidl_next::Slot<'_, Self>,
11048 decoder_: &mut ___D,
11049 _: (),
11050 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11051 ::fidl_next::munge! {
11052 let Self {
11053 mut h,
11054
11055 } = slot_;
11056 }
11057
11058 let _field = h.as_mut();
11059
11060 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
11061
11062 Ok(())
11063 }
11064 }
11065
11066 impl ::fidl_next::IntoNatural for EventWithReducedRights {
11067 type Natural = crate::natural::EventWithReducedRights;
11068 }
11069
11070 #[derive(Debug)]
11072 #[repr(C)]
11073 pub struct FidlvizDemo<'de> {
11074 pub f1: u8,
11075
11076 pub f2: i8,
11077
11078 pub f3: ::fidl_next::wire::Uint16,
11079
11080 pub f4: ::fidl_next::wire::Uint32,
11081
11082 pub f5: ::fidl_next::wire::Uint64,
11083
11084 pub f6: u8,
11085
11086 pub f7: u8,
11087
11088 pub f8: ::fidl_next::wire::Uint16,
11089
11090 pub f9: ::fidl_next::wire::Float32,
11091
11092 pub f10: ::fidl_next::wire::Float64,
11093
11094 pub f11: bool,
11095
11096 pub f12: bool,
11097
11098 pub f13: ::fidl_next::wire::String<'de>,
11099
11100 pub f14: ::fidl_next::wire::OptionalString<'de>,
11101
11102 pub f15: ::fidl_next::wire::String<'de>,
11103
11104 pub f16: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11105
11106 pub f17: ::fidl_next::wire::fuchsia::NullableHandle,
11107
11108 pub f18: [u8; 3],
11109
11110 pub f19: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Float64>,
11111
11112 pub f20: ::fidl_next::wire::OptionalVector<'de, u8>,
11113
11114 pub f21: ::fidl_next::wire::Vector<'de, u8>,
11115
11116 pub f22: crate::wire::FidlvizBits,
11117
11118 pub f23: crate::wire::FidlvizEnum,
11119
11120 pub f24: crate::wire::FidlvizStruct1,
11121
11122 pub f25: crate::wire::FidlvizStruct2,
11123
11124 pub f26: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct1>,
11125
11126 pub f27: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct2>,
11127
11128 pub f28: crate::wire::FidlvizTable<'de>,
11129
11130 pub f29: crate::wire::FidlvizTable<'de>,
11131
11132 pub f30: crate::wire_optional::FidlvizUnion<'de>,
11133
11134 pub f31: crate::wire::FidlvizUnion<'de>,
11135 }
11136
11137 static_assertions::const_assert_eq!(std::mem::size_of::<FidlvizDemo<'_>>(), 248);
11138 static_assertions::const_assert_eq!(std::mem::align_of::<FidlvizDemo<'_>>(), 8);
11139
11140 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f1), 0);
11141
11142 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f2), 1);
11143
11144 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f3), 2);
11145
11146 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f4), 4);
11147
11148 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f5), 8);
11149
11150 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f6), 16);
11151
11152 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f7), 17);
11153
11154 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f8), 18);
11155
11156 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f9), 20);
11157
11158 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f10), 24);
11159
11160 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f11), 32);
11161
11162 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f12), 33);
11163
11164 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f13), 40);
11165
11166 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f14), 56);
11167
11168 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f15), 72);
11169
11170 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f16), 88);
11171
11172 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f17), 92);
11173
11174 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f18), 96);
11175
11176 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f19), 104);
11177
11178 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f20), 120);
11179
11180 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f21), 136);
11181
11182 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f22), 152);
11183
11184 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f23), 153);
11185
11186 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f24), 154);
11187
11188 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f25), 160);
11189
11190 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f26), 168);
11191
11192 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f27), 176);
11193
11194 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f28), 184);
11195
11196 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f29), 200);
11197
11198 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f30), 216);
11199
11200 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f31), 232);
11201
11202 impl ::fidl_next::Constrained for FidlvizDemo<'_> {
11203 type Constraint = ();
11204
11205 fn validate(
11206 _: ::fidl_next::Slot<'_, Self>,
11207 _: Self::Constraint,
11208 ) -> Result<(), ::fidl_next::ValidationError> {
11209 Ok(())
11210 }
11211 }
11212
11213 unsafe impl ::fidl_next::Wire for FidlvizDemo<'static> {
11214 type Narrowed<'de> = FidlvizDemo<'de>;
11215
11216 #[inline]
11217 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11218 ::fidl_next::munge! {
11219 let Self {
11220 f1,
11221 f2,
11222 f3,
11223 f4,
11224 f5,
11225 f6,
11226 f7,
11227 f8,
11228 f9,
11229 f10,
11230 f11,
11231 f12,
11232 f13,
11233 f14,
11234 f15,
11235 f16,
11236 f17,
11237 f18,
11238 f19,
11239 f20,
11240 f21,
11241 f22,
11242 f23,
11243 f24,
11244 f25,
11245 f26,
11246 f27,
11247 f28,
11248 f29,
11249 f30,
11250 f31,
11251
11252 } = &mut *out_;
11253 }
11254
11255 ::fidl_next::Wire::zero_padding(f1);
11256
11257 ::fidl_next::Wire::zero_padding(f2);
11258
11259 ::fidl_next::Wire::zero_padding(f3);
11260
11261 ::fidl_next::Wire::zero_padding(f4);
11262
11263 ::fidl_next::Wire::zero_padding(f5);
11264
11265 ::fidl_next::Wire::zero_padding(f6);
11266
11267 ::fidl_next::Wire::zero_padding(f7);
11268
11269 ::fidl_next::Wire::zero_padding(f8);
11270
11271 ::fidl_next::Wire::zero_padding(f9);
11272
11273 ::fidl_next::Wire::zero_padding(f10);
11274
11275 ::fidl_next::Wire::zero_padding(f11);
11276
11277 ::fidl_next::Wire::zero_padding(f12);
11278
11279 ::fidl_next::Wire::zero_padding(f13);
11280
11281 ::fidl_next::Wire::zero_padding(f14);
11282
11283 ::fidl_next::Wire::zero_padding(f15);
11284
11285 ::fidl_next::Wire::zero_padding(f16);
11286
11287 ::fidl_next::Wire::zero_padding(f17);
11288
11289 ::fidl_next::Wire::zero_padding(f18);
11290
11291 ::fidl_next::Wire::zero_padding(f19);
11292
11293 ::fidl_next::Wire::zero_padding(f20);
11294
11295 ::fidl_next::Wire::zero_padding(f21);
11296
11297 ::fidl_next::Wire::zero_padding(f22);
11298
11299 ::fidl_next::Wire::zero_padding(f23);
11300
11301 ::fidl_next::Wire::zero_padding(f24);
11302
11303 ::fidl_next::Wire::zero_padding(f25);
11304
11305 ::fidl_next::Wire::zero_padding(f26);
11306
11307 ::fidl_next::Wire::zero_padding(f27);
11308
11309 ::fidl_next::Wire::zero_padding(f28);
11310
11311 ::fidl_next::Wire::zero_padding(f29);
11312
11313 ::fidl_next::Wire::zero_padding(f30);
11314
11315 ::fidl_next::Wire::zero_padding(f31);
11316
11317 unsafe {
11318 out_.as_mut_ptr().cast::<u8>().add(155).write_bytes(0, 5);
11319 }
11320
11321 unsafe {
11322 out_.as_mut_ptr().cast::<u8>().add(99).write_bytes(0, 5);
11323 }
11324
11325 unsafe {
11326 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 6);
11327 }
11328 }
11329 }
11330
11331 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FidlvizDemo<'de>
11332 where
11333 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11334 ___D: ::fidl_next::Decoder<'de>,
11335 ___D: ::fidl_next::fuchsia::HandleDecoder,
11336 {
11337 fn decode(
11338 slot_: ::fidl_next::Slot<'_, Self>,
11339 decoder_: &mut ___D,
11340 _: (),
11341 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11342 if slot_.as_bytes()[155..160] != [0u8; 5] {
11343 return Err(::fidl_next::DecodeError::InvalidPadding);
11344 }
11345
11346 if slot_.as_bytes()[99..104] != [0u8; 5] {
11347 return Err(::fidl_next::DecodeError::InvalidPadding);
11348 }
11349
11350 if slot_.as_bytes()[34..40] != [0u8; 6] {
11351 return Err(::fidl_next::DecodeError::InvalidPadding);
11352 }
11353
11354 ::fidl_next::munge! {
11355 let Self {
11356 mut f1,
11357 mut f2,
11358 mut f3,
11359 mut f4,
11360 mut f5,
11361 mut f6,
11362 mut f7,
11363 mut f8,
11364 mut f9,
11365 mut f10,
11366 mut f11,
11367 mut f12,
11368 mut f13,
11369 mut f14,
11370 mut f15,
11371 mut f16,
11372 mut f17,
11373 mut f18,
11374 mut f19,
11375 mut f20,
11376 mut f21,
11377 mut f22,
11378 mut f23,
11379 mut f24,
11380 mut f25,
11381 mut f26,
11382 mut f27,
11383 mut f28,
11384 mut f29,
11385 mut f30,
11386 mut f31,
11387
11388 } = slot_;
11389 }
11390
11391 let _field = f1.as_mut();
11392
11393 ::fidl_next::Decode::decode(f1.as_mut(), decoder_, ())?;
11394
11395 let _field = f2.as_mut();
11396
11397 ::fidl_next::Decode::decode(f2.as_mut(), decoder_, ())?;
11398
11399 let _field = f3.as_mut();
11400
11401 ::fidl_next::Decode::decode(f3.as_mut(), decoder_, ())?;
11402
11403 let _field = f4.as_mut();
11404
11405 ::fidl_next::Decode::decode(f4.as_mut(), decoder_, ())?;
11406
11407 let _field = f5.as_mut();
11408
11409 ::fidl_next::Decode::decode(f5.as_mut(), decoder_, ())?;
11410
11411 let _field = f6.as_mut();
11412
11413 ::fidl_next::Decode::decode(f6.as_mut(), decoder_, ())?;
11414
11415 let _field = f7.as_mut();
11416
11417 ::fidl_next::Decode::decode(f7.as_mut(), decoder_, ())?;
11418
11419 let _field = f8.as_mut();
11420
11421 ::fidl_next::Decode::decode(f8.as_mut(), decoder_, ())?;
11422
11423 let _field = f9.as_mut();
11424
11425 ::fidl_next::Decode::decode(f9.as_mut(), decoder_, ())?;
11426
11427 let _field = f10.as_mut();
11428
11429 ::fidl_next::Decode::decode(f10.as_mut(), decoder_, ())?;
11430
11431 let _field = f11.as_mut();
11432
11433 ::fidl_next::Decode::decode(f11.as_mut(), decoder_, ())?;
11434
11435 let _field = f12.as_mut();
11436
11437 ::fidl_next::Decode::decode(f12.as_mut(), decoder_, ())?;
11438
11439 let _field = f13.as_mut();
11440 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11441 ::fidl_next::Decode::decode(f13.as_mut(), decoder_, 4294967295)?;
11442
11443 let _field = f14.as_mut();
11444 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11445 ::fidl_next::Decode::decode(f14.as_mut(), decoder_, 4294967295)?;
11446
11447 let _field = f15.as_mut();
11448 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11449 ::fidl_next::Decode::decode(f15.as_mut(), decoder_, 4294967295)?;
11450
11451 let _field = f16.as_mut();
11452
11453 ::fidl_next::Decode::decode(f16.as_mut(), decoder_, ())?;
11454
11455 let _field = f17.as_mut();
11456
11457 ::fidl_next::Decode::decode(f17.as_mut(), decoder_, ())?;
11458
11459 let _field = f18.as_mut();
11460
11461 ::fidl_next::Decode::decode(f18.as_mut(), decoder_, ())?;
11462
11463 let _field = f19.as_mut();
11464 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11465 ::fidl_next::Decode::decode(f19.as_mut(), decoder_, (4294967295, ()))?;
11466
11467 let _field = f20.as_mut();
11468 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11469 ::fidl_next::Decode::decode(f20.as_mut(), decoder_, (4294967295, ()))?;
11470
11471 let _field = f21.as_mut();
11472 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11473 ::fidl_next::Decode::decode(f21.as_mut(), decoder_, (4294967295, ()))?;
11474
11475 let _field = f22.as_mut();
11476
11477 ::fidl_next::Decode::decode(f22.as_mut(), decoder_, ())?;
11478
11479 let _field = f23.as_mut();
11480
11481 ::fidl_next::Decode::decode(f23.as_mut(), decoder_, ())?;
11482
11483 let _field = f24.as_mut();
11484
11485 ::fidl_next::Decode::decode(f24.as_mut(), decoder_, ())?;
11486
11487 let _field = f25.as_mut();
11488
11489 ::fidl_next::Decode::decode(f25.as_mut(), decoder_, ())?;
11490
11491 let _field = f26.as_mut();
11492
11493 ::fidl_next::Decode::decode(f26.as_mut(), decoder_, ())?;
11494
11495 let _field = f27.as_mut();
11496
11497 ::fidl_next::Decode::decode(f27.as_mut(), decoder_, ())?;
11498
11499 let _field = f28.as_mut();
11500
11501 ::fidl_next::Decode::decode(f28.as_mut(), decoder_, ())?;
11502
11503 let _field = f29.as_mut();
11504
11505 ::fidl_next::Decode::decode(f29.as_mut(), decoder_, ())?;
11506
11507 let _field = f30.as_mut();
11508
11509 ::fidl_next::Decode::decode(f30.as_mut(), decoder_, ())?;
11510
11511 let _field = f31.as_mut();
11512
11513 ::fidl_next::Decode::decode(f31.as_mut(), decoder_, ())?;
11514
11515 Ok(())
11516 }
11517 }
11518
11519 impl<'de> ::fidl_next::IntoNatural for FidlvizDemo<'de> {
11520 type Natural = crate::natural::FidlvizDemo;
11521 }
11522
11523 #[derive(Debug)]
11525 #[repr(C)]
11526 pub struct GoldenHandleBasicRightsStruct {
11527 pub v: ::fidl_next::wire::fuchsia::Event,
11528 }
11529
11530 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenHandleBasicRightsStruct>(), 4);
11531 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenHandleBasicRightsStruct>(), 4);
11532
11533 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenHandleBasicRightsStruct, v), 0);
11534
11535 impl ::fidl_next::Constrained for GoldenHandleBasicRightsStruct {
11536 type Constraint = ();
11537
11538 fn validate(
11539 _: ::fidl_next::Slot<'_, Self>,
11540 _: Self::Constraint,
11541 ) -> Result<(), ::fidl_next::ValidationError> {
11542 Ok(())
11543 }
11544 }
11545
11546 unsafe impl ::fidl_next::Wire for GoldenHandleBasicRightsStruct {
11547 type Narrowed<'de> = GoldenHandleBasicRightsStruct;
11548
11549 #[inline]
11550 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11551 ::fidl_next::munge! {
11552 let Self {
11553 v,
11554
11555 } = &mut *out_;
11556 }
11557
11558 ::fidl_next::Wire::zero_padding(v);
11559 }
11560 }
11561
11562 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenHandleBasicRightsStruct
11563 where
11564 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11565 ___D: ::fidl_next::fuchsia::HandleDecoder,
11566 {
11567 fn decode(
11568 slot_: ::fidl_next::Slot<'_, Self>,
11569 decoder_: &mut ___D,
11570 _: (),
11571 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11572 ::fidl_next::munge! {
11573 let Self {
11574 mut v,
11575
11576 } = slot_;
11577 }
11578
11579 let _field = v.as_mut();
11580
11581 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11582
11583 Ok(())
11584 }
11585 }
11586
11587 impl ::fidl_next::IntoNatural for GoldenHandleBasicRightsStruct {
11588 type Natural = crate::natural::GoldenHandleBasicRightsStruct;
11589 }
11590
11591 #[derive(Debug)]
11593 #[repr(C)]
11594 pub struct GoldenNullableHandleStruct {
11595 pub v: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11596 }
11597
11598 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenNullableHandleStruct>(), 4);
11599 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenNullableHandleStruct>(), 4);
11600
11601 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenNullableHandleStruct, v), 0);
11602
11603 impl ::fidl_next::Constrained for GoldenNullableHandleStruct {
11604 type Constraint = ();
11605
11606 fn validate(
11607 _: ::fidl_next::Slot<'_, Self>,
11608 _: Self::Constraint,
11609 ) -> Result<(), ::fidl_next::ValidationError> {
11610 Ok(())
11611 }
11612 }
11613
11614 unsafe impl ::fidl_next::Wire for GoldenNullableHandleStruct {
11615 type Narrowed<'de> = GoldenNullableHandleStruct;
11616
11617 #[inline]
11618 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11619 ::fidl_next::munge! {
11620 let Self {
11621 v,
11622
11623 } = &mut *out_;
11624 }
11625
11626 ::fidl_next::Wire::zero_padding(v);
11627 }
11628 }
11629
11630 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenNullableHandleStruct
11631 where
11632 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11633 ___D: ::fidl_next::fuchsia::HandleDecoder,
11634 {
11635 fn decode(
11636 slot_: ::fidl_next::Slot<'_, Self>,
11637 decoder_: &mut ___D,
11638 _: (),
11639 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11640 ::fidl_next::munge! {
11641 let Self {
11642 mut v,
11643
11644 } = slot_;
11645 }
11646
11647 let _field = v.as_mut();
11648
11649 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11650
11651 Ok(())
11652 }
11653 }
11654
11655 impl ::fidl_next::IntoNatural for GoldenNullableHandleStruct {
11656 type Natural = crate::natural::GoldenNullableHandleStruct;
11657 }
11658
11659 #[derive(Debug)]
11661 #[repr(C)]
11662 pub struct MultipleBoundedNonnullableVectorsOfHandles<'de> {
11663 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11664
11665 pub vh1: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11666 }
11667
11668 static_assertions::const_assert_eq!(
11669 std::mem::size_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11670 32
11671 );
11672 static_assertions::const_assert_eq!(
11673 std::mem::align_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11674 8
11675 );
11676
11677 static_assertions::const_assert_eq!(
11678 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh0),
11679 0
11680 );
11681
11682 static_assertions::const_assert_eq!(
11683 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh1),
11684 16
11685 );
11686
11687 impl ::fidl_next::Constrained for MultipleBoundedNonnullableVectorsOfHandles<'_> {
11688 type Constraint = ();
11689
11690 fn validate(
11691 _: ::fidl_next::Slot<'_, Self>,
11692 _: Self::Constraint,
11693 ) -> Result<(), ::fidl_next::ValidationError> {
11694 Ok(())
11695 }
11696 }
11697
11698 unsafe impl ::fidl_next::Wire for MultipleBoundedNonnullableVectorsOfHandles<'static> {
11699 type Narrowed<'de> = MultipleBoundedNonnullableVectorsOfHandles<'de>;
11700
11701 #[inline]
11702 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11703 ::fidl_next::munge! {
11704 let Self {
11705 vh0,
11706 vh1,
11707
11708 } = &mut *out_;
11709 }
11710
11711 ::fidl_next::Wire::zero_padding(vh0);
11712
11713 ::fidl_next::Wire::zero_padding(vh1);
11714 }
11715 }
11716
11717 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNonnullableVectorsOfHandles<'de>
11718 where
11719 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11720 ___D: ::fidl_next::Decoder<'de>,
11721 ___D: ::fidl_next::fuchsia::HandleDecoder,
11722 {
11723 fn decode(
11724 slot_: ::fidl_next::Slot<'_, Self>,
11725 decoder_: &mut ___D,
11726 _: (),
11727 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11728 ::fidl_next::munge! {
11729 let Self {
11730 mut vh0,
11731 mut vh1,
11732
11733 } = slot_;
11734 }
11735
11736 let _field = vh0.as_mut();
11737 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11738 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11739
11740 let vh0 = unsafe { vh0.deref_unchecked() };
11741
11742 if vh0.len() > 2 {
11743 return Err(::fidl_next::DecodeError::VectorTooLong {
11744 size: vh0.len() as u64,
11745 limit: 2,
11746 });
11747 }
11748
11749 let _field = vh1.as_mut();
11750 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11751 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11752
11753 let vh1 = unsafe { vh1.deref_unchecked() };
11754
11755 if vh1.len() > 32 {
11756 return Err(::fidl_next::DecodeError::VectorTooLong {
11757 size: vh1.len() as u64,
11758 limit: 32,
11759 });
11760 }
11761
11762 Ok(())
11763 }
11764 }
11765
11766 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNonnullableVectorsOfHandles<'de> {
11767 type Natural = crate::natural::MultipleBoundedNonnullableVectorsOfHandles;
11768 }
11769
11770 #[derive(Debug)]
11772 #[repr(C)]
11773 pub struct MultipleBoundedNullableVectorsOfHandles<'de> {
11774 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11775
11776 pub vh1: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11777 }
11778
11779 static_assertions::const_assert_eq!(
11780 std::mem::size_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11781 32
11782 );
11783 static_assertions::const_assert_eq!(
11784 std::mem::align_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11785 8
11786 );
11787
11788 static_assertions::const_assert_eq!(
11789 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh0),
11790 0
11791 );
11792
11793 static_assertions::const_assert_eq!(
11794 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh1),
11795 16
11796 );
11797
11798 impl ::fidl_next::Constrained for MultipleBoundedNullableVectorsOfHandles<'_> {
11799 type Constraint = ();
11800
11801 fn validate(
11802 _: ::fidl_next::Slot<'_, Self>,
11803 _: Self::Constraint,
11804 ) -> Result<(), ::fidl_next::ValidationError> {
11805 Ok(())
11806 }
11807 }
11808
11809 unsafe impl ::fidl_next::Wire for MultipleBoundedNullableVectorsOfHandles<'static> {
11810 type Narrowed<'de> = MultipleBoundedNullableVectorsOfHandles<'de>;
11811
11812 #[inline]
11813 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11814 ::fidl_next::munge! {
11815 let Self {
11816 vh0,
11817 vh1,
11818
11819 } = &mut *out_;
11820 }
11821
11822 ::fidl_next::Wire::zero_padding(vh0);
11823
11824 ::fidl_next::Wire::zero_padding(vh1);
11825 }
11826 }
11827
11828 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNullableVectorsOfHandles<'de>
11829 where
11830 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11831 ___D: ::fidl_next::Decoder<'de>,
11832 ___D: ::fidl_next::fuchsia::HandleDecoder,
11833 {
11834 fn decode(
11835 slot_: ::fidl_next::Slot<'_, Self>,
11836 decoder_: &mut ___D,
11837 _: (),
11838 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11839 ::fidl_next::munge! {
11840 let Self {
11841 mut vh0,
11842 mut vh1,
11843
11844 } = slot_;
11845 }
11846
11847 let _field = vh0.as_mut();
11848 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11849 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11850
11851 let vh0 = unsafe { vh0.deref_unchecked() };
11852
11853 if let Some(vh0) = vh0.as_ref() {
11854 if vh0.len() > 2 {
11855 return Err(::fidl_next::DecodeError::VectorTooLong {
11856 size: vh0.len() as u64,
11857 limit: 2,
11858 });
11859 }
11860 }
11861
11862 let _field = vh1.as_mut();
11863 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11864 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11865
11866 let vh1 = unsafe { vh1.deref_unchecked() };
11867
11868 if let Some(vh1) = vh1.as_ref() {
11869 if vh1.len() > 32 {
11870 return Err(::fidl_next::DecodeError::VectorTooLong {
11871 size: vh1.len() as u64,
11872 limit: 32,
11873 });
11874 }
11875 }
11876
11877 Ok(())
11878 }
11879 }
11880
11881 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNullableVectorsOfHandles<'de> {
11882 type Natural = crate::natural::MultipleBoundedNullableVectorsOfHandles;
11883 }
11884
11885 #[derive(Debug)]
11887 #[repr(C)]
11888 pub struct MultipleHandleSubtypes {
11889 pub untyped: ::fidl_next::wire::fuchsia::NullableHandle,
11890
11891 pub event: ::fidl_next::wire::fuchsia::Event,
11892
11893 pub channel: ::fidl_next::wire::fuchsia::Channel,
11894 }
11895
11896 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleHandleSubtypes>(), 12);
11897 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleHandleSubtypes>(), 4);
11898
11899 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, untyped), 0);
11900
11901 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, event), 4);
11902
11903 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, channel), 8);
11904
11905 impl ::fidl_next::Constrained for MultipleHandleSubtypes {
11906 type Constraint = ();
11907
11908 fn validate(
11909 _: ::fidl_next::Slot<'_, Self>,
11910 _: Self::Constraint,
11911 ) -> Result<(), ::fidl_next::ValidationError> {
11912 Ok(())
11913 }
11914 }
11915
11916 unsafe impl ::fidl_next::Wire for MultipleHandleSubtypes {
11917 type Narrowed<'de> = MultipleHandleSubtypes;
11918
11919 #[inline]
11920 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11921 ::fidl_next::munge! {
11922 let Self {
11923 untyped,
11924 event,
11925 channel,
11926
11927 } = &mut *out_;
11928 }
11929
11930 ::fidl_next::Wire::zero_padding(untyped);
11931
11932 ::fidl_next::Wire::zero_padding(event);
11933
11934 ::fidl_next::Wire::zero_padding(channel);
11935 }
11936 }
11937
11938 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleHandleSubtypes
11939 where
11940 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11941 ___D: ::fidl_next::fuchsia::HandleDecoder,
11942 {
11943 fn decode(
11944 slot_: ::fidl_next::Slot<'_, Self>,
11945 decoder_: &mut ___D,
11946 _: (),
11947 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11948 ::fidl_next::munge! {
11949 let Self {
11950 mut untyped,
11951 mut event,
11952 mut channel,
11953
11954 } = slot_;
11955 }
11956
11957 let _field = untyped.as_mut();
11958
11959 ::fidl_next::Decode::decode(untyped.as_mut(), decoder_, ())?;
11960
11961 let _field = event.as_mut();
11962
11963 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
11964
11965 let _field = channel.as_mut();
11966
11967 ::fidl_next::Decode::decode(channel.as_mut(), decoder_, ())?;
11968
11969 Ok(())
11970 }
11971 }
11972
11973 impl ::fidl_next::IntoNatural for MultipleHandleSubtypes {
11974 type Natural = crate::natural::MultipleHandleSubtypes;
11975 }
11976
11977 #[derive(Debug)]
11979 #[repr(C)]
11980 pub struct MultipleNonnullableHandles {
11981 pub data0: ::fidl_next::wire::Uint32,
11982
11983 pub handle0: ::fidl_next::wire::fuchsia::NullableHandle,
11984
11985 pub data1: ::fidl_next::wire::Uint64,
11986
11987 pub handle1: ::fidl_next::wire::fuchsia::Channel,
11988
11989 pub handle2: ::fidl_next::wire::fuchsia::Event,
11990
11991 pub data2: ::fidl_next::wire::Uint64,
11992 }
11993
11994 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNonnullableHandles>(), 32);
11995 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNonnullableHandles>(), 8);
11996
11997 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data0), 0);
11998
11999 static_assertions::const_assert_eq!(
12000 std::mem::offset_of!(MultipleNonnullableHandles, handle0),
12001 4
12002 );
12003
12004 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data1), 8);
12005
12006 static_assertions::const_assert_eq!(
12007 std::mem::offset_of!(MultipleNonnullableHandles, handle1),
12008 16
12009 );
12010
12011 static_assertions::const_assert_eq!(
12012 std::mem::offset_of!(MultipleNonnullableHandles, handle2),
12013 20
12014 );
12015
12016 static_assertions::const_assert_eq!(
12017 std::mem::offset_of!(MultipleNonnullableHandles, data2),
12018 24
12019 );
12020
12021 impl ::fidl_next::Constrained for MultipleNonnullableHandles {
12022 type Constraint = ();
12023
12024 fn validate(
12025 _: ::fidl_next::Slot<'_, Self>,
12026 _: Self::Constraint,
12027 ) -> Result<(), ::fidl_next::ValidationError> {
12028 Ok(())
12029 }
12030 }
12031
12032 unsafe impl ::fidl_next::Wire for MultipleNonnullableHandles {
12033 type Narrowed<'de> = MultipleNonnullableHandles;
12034
12035 #[inline]
12036 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12037 ::fidl_next::munge! {
12038 let Self {
12039 data0,
12040 handle0,
12041 data1,
12042 handle1,
12043 handle2,
12044 data2,
12045
12046 } = &mut *out_;
12047 }
12048
12049 ::fidl_next::Wire::zero_padding(data0);
12050
12051 ::fidl_next::Wire::zero_padding(handle0);
12052
12053 ::fidl_next::Wire::zero_padding(data1);
12054
12055 ::fidl_next::Wire::zero_padding(handle1);
12056
12057 ::fidl_next::Wire::zero_padding(handle2);
12058
12059 ::fidl_next::Wire::zero_padding(data2);
12060 }
12061 }
12062
12063 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNonnullableHandles
12064 where
12065 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12066 ___D: ::fidl_next::fuchsia::HandleDecoder,
12067 {
12068 fn decode(
12069 slot_: ::fidl_next::Slot<'_, Self>,
12070 decoder_: &mut ___D,
12071 _: (),
12072 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12073 ::fidl_next::munge! {
12074 let Self {
12075 mut data0,
12076 mut handle0,
12077 mut data1,
12078 mut handle1,
12079 mut handle2,
12080 mut data2,
12081
12082 } = slot_;
12083 }
12084
12085 let _field = data0.as_mut();
12086
12087 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
12088
12089 let _field = handle0.as_mut();
12090
12091 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
12092
12093 let _field = data1.as_mut();
12094
12095 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
12096
12097 let _field = handle1.as_mut();
12098
12099 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
12100
12101 let _field = handle2.as_mut();
12102
12103 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
12104
12105 let _field = data2.as_mut();
12106
12107 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
12108
12109 Ok(())
12110 }
12111 }
12112
12113 impl ::fidl_next::IntoNatural for MultipleNonnullableHandles {
12114 type Natural = crate::natural::MultipleNonnullableHandles;
12115 }
12116
12117 #[derive(Debug)]
12119 #[repr(C)]
12120 pub struct MultipleNullableHandles {
12121 pub data0: ::fidl_next::wire::Uint32,
12122
12123 pub handle0: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
12124
12125 pub data1: ::fidl_next::wire::Uint64,
12126
12127 pub handle1: ::fidl_next::wire::fuchsia::OptionalChannel,
12128
12129 pub handle2: ::fidl_next::wire::fuchsia::OptionalEvent,
12130
12131 pub data2: ::fidl_next::wire::Uint64,
12132 }
12133
12134 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNullableHandles>(), 32);
12135 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNullableHandles>(), 8);
12136
12137 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data0), 0);
12138
12139 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle0), 4);
12140
12141 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data1), 8);
12142
12143 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle1), 16);
12144
12145 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle2), 20);
12146
12147 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data2), 24);
12148
12149 impl ::fidl_next::Constrained for MultipleNullableHandles {
12150 type Constraint = ();
12151
12152 fn validate(
12153 _: ::fidl_next::Slot<'_, Self>,
12154 _: Self::Constraint,
12155 ) -> Result<(), ::fidl_next::ValidationError> {
12156 Ok(())
12157 }
12158 }
12159
12160 unsafe impl ::fidl_next::Wire for MultipleNullableHandles {
12161 type Narrowed<'de> = MultipleNullableHandles;
12162
12163 #[inline]
12164 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12165 ::fidl_next::munge! {
12166 let Self {
12167 data0,
12168 handle0,
12169 data1,
12170 handle1,
12171 handle2,
12172 data2,
12173
12174 } = &mut *out_;
12175 }
12176
12177 ::fidl_next::Wire::zero_padding(data0);
12178
12179 ::fidl_next::Wire::zero_padding(handle0);
12180
12181 ::fidl_next::Wire::zero_padding(data1);
12182
12183 ::fidl_next::Wire::zero_padding(handle1);
12184
12185 ::fidl_next::Wire::zero_padding(handle2);
12186
12187 ::fidl_next::Wire::zero_padding(data2);
12188 }
12189 }
12190
12191 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNullableHandles
12192 where
12193 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12194 ___D: ::fidl_next::fuchsia::HandleDecoder,
12195 {
12196 fn decode(
12197 slot_: ::fidl_next::Slot<'_, Self>,
12198 decoder_: &mut ___D,
12199 _: (),
12200 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12201 ::fidl_next::munge! {
12202 let Self {
12203 mut data0,
12204 mut handle0,
12205 mut data1,
12206 mut handle1,
12207 mut handle2,
12208 mut data2,
12209
12210 } = slot_;
12211 }
12212
12213 let _field = data0.as_mut();
12214
12215 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
12216
12217 let _field = handle0.as_mut();
12218
12219 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
12220
12221 let _field = data1.as_mut();
12222
12223 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
12224
12225 let _field = handle1.as_mut();
12226
12227 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
12228
12229 let _field = handle2.as_mut();
12230
12231 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
12232
12233 let _field = data2.as_mut();
12234
12235 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
12236
12237 Ok(())
12238 }
12239 }
12240
12241 impl ::fidl_next::IntoNatural for MultipleNullableHandles {
12242 type Natural = crate::natural::MultipleNullableHandles;
12243 }
12244
12245 #[derive(Debug)]
12247 #[repr(C)]
12248 pub struct NonnullableHandle {
12249 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
12250 }
12251
12252 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandle>(), 4);
12253 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandle>(), 4);
12254
12255 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandle, h), 0);
12256
12257 impl ::fidl_next::Constrained for NonnullableHandle {
12258 type Constraint = ();
12259
12260 fn validate(
12261 _: ::fidl_next::Slot<'_, Self>,
12262 _: Self::Constraint,
12263 ) -> Result<(), ::fidl_next::ValidationError> {
12264 Ok(())
12265 }
12266 }
12267
12268 unsafe impl ::fidl_next::Wire for NonnullableHandle {
12269 type Narrowed<'de> = NonnullableHandle;
12270
12271 #[inline]
12272 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12273 ::fidl_next::munge! {
12274 let Self {
12275 h,
12276
12277 } = &mut *out_;
12278 }
12279
12280 ::fidl_next::Wire::zero_padding(h);
12281 }
12282 }
12283
12284 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandle
12285 where
12286 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12287 ___D: ::fidl_next::fuchsia::HandleDecoder,
12288 {
12289 fn decode(
12290 slot_: ::fidl_next::Slot<'_, Self>,
12291 decoder_: &mut ___D,
12292 _: (),
12293 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12294 ::fidl_next::munge! {
12295 let Self {
12296 mut h,
12297
12298 } = slot_;
12299 }
12300
12301 let _field = h.as_mut();
12302
12303 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12304
12305 Ok(())
12306 }
12307 }
12308
12309 impl ::fidl_next::IntoNatural for NonnullableHandle {
12310 type Natural = crate::natural::NonnullableHandle;
12311 }
12312
12313 #[derive(Debug)]
12315 #[repr(C)]
12316 pub struct NonnullableHandleArray {
12317 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
12318 }
12319
12320 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandleArray>(), 16);
12321 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandleArray>(), 4);
12322
12323 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandleArray, handles), 0);
12324
12325 impl ::fidl_next::Constrained for NonnullableHandleArray {
12326 type Constraint = ();
12327
12328 fn validate(
12329 _: ::fidl_next::Slot<'_, Self>,
12330 _: Self::Constraint,
12331 ) -> Result<(), ::fidl_next::ValidationError> {
12332 Ok(())
12333 }
12334 }
12335
12336 unsafe impl ::fidl_next::Wire for NonnullableHandleArray {
12337 type Narrowed<'de> = NonnullableHandleArray;
12338
12339 #[inline]
12340 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12341 ::fidl_next::munge! {
12342 let Self {
12343 handles,
12344
12345 } = &mut *out_;
12346 }
12347
12348 ::fidl_next::Wire::zero_padding(handles);
12349 }
12350 }
12351
12352 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandleArray
12353 where
12354 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12355 ___D: ::fidl_next::fuchsia::HandleDecoder,
12356 {
12357 fn decode(
12358 slot_: ::fidl_next::Slot<'_, Self>,
12359 decoder_: &mut ___D,
12360 _: (),
12361 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12362 ::fidl_next::munge! {
12363 let Self {
12364 mut handles,
12365
12366 } = slot_;
12367 }
12368
12369 let _field = handles.as_mut();
12370
12371 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
12372
12373 Ok(())
12374 }
12375 }
12376
12377 impl ::fidl_next::IntoNatural for NonnullableHandleArray {
12378 type Natural = crate::natural::NonnullableHandleArray;
12379 }
12380
12381 #[derive(Debug)]
12383 #[repr(C)]
12384 pub struct NullableHandle {
12385 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
12386 }
12387
12388 static_assertions::const_assert_eq!(std::mem::size_of::<NullableHandle>(), 4);
12389 static_assertions::const_assert_eq!(std::mem::align_of::<NullableHandle>(), 4);
12390
12391 static_assertions::const_assert_eq!(std::mem::offset_of!(NullableHandle, h), 0);
12392
12393 impl ::fidl_next::Constrained for NullableHandle {
12394 type Constraint = ();
12395
12396 fn validate(
12397 _: ::fidl_next::Slot<'_, Self>,
12398 _: Self::Constraint,
12399 ) -> Result<(), ::fidl_next::ValidationError> {
12400 Ok(())
12401 }
12402 }
12403
12404 unsafe impl ::fidl_next::Wire for NullableHandle {
12405 type Narrowed<'de> = NullableHandle;
12406
12407 #[inline]
12408 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12409 ::fidl_next::munge! {
12410 let Self {
12411 h,
12412
12413 } = &mut *out_;
12414 }
12415
12416 ::fidl_next::Wire::zero_padding(h);
12417 }
12418 }
12419
12420 unsafe impl<___D> ::fidl_next::Decode<___D> for NullableHandle
12421 where
12422 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12423 ___D: ::fidl_next::fuchsia::HandleDecoder,
12424 {
12425 fn decode(
12426 slot_: ::fidl_next::Slot<'_, Self>,
12427 decoder_: &mut ___D,
12428 _: (),
12429 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12430 ::fidl_next::munge! {
12431 let Self {
12432 mut h,
12433
12434 } = slot_;
12435 }
12436
12437 let _field = h.as_mut();
12438
12439 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12440
12441 Ok(())
12442 }
12443 }
12444
12445 impl ::fidl_next::IntoNatural for NullableHandle {
12446 type Natural = crate::natural::NullableHandle;
12447 }
12448
12449 #[derive(Debug)]
12451 #[repr(C)]
12452 pub struct OutOfLineArrayOfNonnullableHandles<'de> {
12453 pub handles: ::fidl_next::wire::Box<'de, crate::wire::NonnullableHandleArray>,
12454 }
12455
12456 static_assertions::const_assert_eq!(
12457 std::mem::size_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12458 8
12459 );
12460 static_assertions::const_assert_eq!(
12461 std::mem::align_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12462 8
12463 );
12464
12465 static_assertions::const_assert_eq!(
12466 std::mem::offset_of!(OutOfLineArrayOfNonnullableHandles<'_>, handles),
12467 0
12468 );
12469
12470 impl ::fidl_next::Constrained for OutOfLineArrayOfNonnullableHandles<'_> {
12471 type Constraint = ();
12472
12473 fn validate(
12474 _: ::fidl_next::Slot<'_, Self>,
12475 _: Self::Constraint,
12476 ) -> Result<(), ::fidl_next::ValidationError> {
12477 Ok(())
12478 }
12479 }
12480
12481 unsafe impl ::fidl_next::Wire for OutOfLineArrayOfNonnullableHandles<'static> {
12482 type Narrowed<'de> = OutOfLineArrayOfNonnullableHandles<'de>;
12483
12484 #[inline]
12485 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12486 ::fidl_next::munge! {
12487 let Self {
12488 handles,
12489
12490 } = &mut *out_;
12491 }
12492
12493 ::fidl_next::Wire::zero_padding(handles);
12494 }
12495 }
12496
12497 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OutOfLineArrayOfNonnullableHandles<'de>
12498 where
12499 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12500 ___D: ::fidl_next::Decoder<'de>,
12501 ___D: ::fidl_next::fuchsia::HandleDecoder,
12502 {
12503 fn decode(
12504 slot_: ::fidl_next::Slot<'_, Self>,
12505 decoder_: &mut ___D,
12506 _: (),
12507 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12508 ::fidl_next::munge! {
12509 let Self {
12510 mut handles,
12511
12512 } = slot_;
12513 }
12514
12515 let _field = handles.as_mut();
12516
12517 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
12518
12519 Ok(())
12520 }
12521 }
12522
12523 impl<'de> ::fidl_next::IntoNatural for OutOfLineArrayOfNonnullableHandles<'de> {
12524 type Natural = crate::natural::OutOfLineArrayOfNonnullableHandles;
12525 }
12526
12527 #[repr(transparent)]
12529 pub struct SampleResourceXUnion<'de> {
12530 pub(crate) raw: ::fidl_next::wire::Union,
12531 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12532 }
12533
12534 impl<'de> Drop for SampleResourceXUnion<'de> {
12535 fn drop(&mut self) {
12536 match self.raw.ordinal() {
12537 1 => {
12538 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12539 }
12540
12541 2 => {
12542 let _ =
12543 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12544 }
12545
12546 3 => {
12547 let _ =
12548 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12549 }
12550
12551 _ => (),
12552 }
12553 }
12554 }
12555
12556 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
12557 type Constraint = ();
12558
12559 fn validate(
12560 _: ::fidl_next::Slot<'_, Self>,
12561 _: Self::Constraint,
12562 ) -> Result<(), ::fidl_next::ValidationError> {
12563 Ok(())
12564 }
12565 }
12566
12567 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
12568 type Narrowed<'de> = SampleResourceXUnion<'de>;
12569
12570 #[inline]
12571 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12572 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12573 ::fidl_next::wire::Union::zero_padding(raw);
12574 }
12575 }
12576
12577 pub mod sample_resource_x_union {
12578 pub enum Ref<'de> {
12579 U(&'de ::fidl_next::wire::Uint32),
12580
12581 Su(&'de crate::wire::SimpleUnion<'de>),
12582
12583 St(&'de crate::wire::SimpleTable<'de>),
12584
12585 UnknownOrdinal_(u64),
12586 }
12587
12588 pub enum Value<'de> {
12589 U(::fidl_next::wire::Uint32),
12590
12591 Su(crate::wire::SimpleUnion<'de>),
12592
12593 St(crate::wire::SimpleTable<'de>),
12594
12595 UnknownOrdinal_(u64),
12596 }
12597 }
12598
12599 impl<'de> SampleResourceXUnion<'de> {
12600 pub fn as_ref(&self) -> crate::wire::sample_resource_x_union::Ref<'_> {
12601 match self.raw.ordinal() {
12602 1 => crate::wire::sample_resource_x_union::Ref::U(unsafe {
12603 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12604 }),
12605
12606 2 => crate::wire::sample_resource_x_union::Ref::Su(unsafe {
12607 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12608 }),
12609
12610 3 => crate::wire::sample_resource_x_union::Ref::St(unsafe {
12611 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12612 }),
12613
12614 unknown => crate::wire::sample_resource_x_union::Ref::UnknownOrdinal_(unknown),
12615 }
12616 }
12617
12618 pub fn into_inner(self) -> crate::wire::sample_resource_x_union::Value<'de> {
12619 let this = ::core::mem::ManuallyDrop::new(self);
12620
12621 match this.raw.ordinal() {
12622 1 => crate::wire::sample_resource_x_union::Value::U(unsafe {
12623 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
12624 }),
12625
12626 2 => crate::wire::sample_resource_x_union::Value::Su(unsafe {
12627 this.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
12628 }),
12629
12630 3 => crate::wire::sample_resource_x_union::Value::St(unsafe {
12631 this.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
12632 }),
12633
12634 unknown => crate::wire::sample_resource_x_union::Value::UnknownOrdinal_(unknown),
12635 }
12636 }
12637 }
12638
12639 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
12640 where
12641 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12642 ___D: ::fidl_next::Decoder<'de>,
12643 ___D: ::fidl_next::fuchsia::HandleDecoder,
12644 {
12645 fn decode(
12646 mut slot: ::fidl_next::Slot<'_, Self>,
12647 decoder: &mut ___D,
12648 _: (),
12649 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12650 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12651 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12652 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12653 raw,
12654 decoder,
12655 (),
12656 )?,
12657
12658 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12659 raw,
12660 decoder,
12661 (),
12662 )?,
12663
12664 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12665 raw,
12666 decoder,
12667 (),
12668 )?,
12669
12670 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
12671 }
12672
12673 Ok(())
12674 }
12675 }
12676
12677 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
12678 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12679 match self.raw.ordinal() {
12680 1 => unsafe {
12681 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12682 },
12683 2 => unsafe {
12684 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12685 },
12686 3 => unsafe {
12687 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12688 },
12689 _ => unsafe { ::core::hint::unreachable_unchecked() },
12690 }
12691 }
12692 }
12693
12694 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
12695 type Natural = crate::natural::SampleResourceXUnion;
12696 }
12697
12698 #[repr(transparent)]
12700 pub struct SampleStrictResourceXUnion<'de> {
12701 pub(crate) raw: ::fidl_next::wire::Union,
12702 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12703 }
12704
12705 impl<'de> Drop for SampleStrictResourceXUnion<'de> {
12706 fn drop(&mut self) {
12707 match self.raw.ordinal() {
12708 1 => {
12709 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12710 }
12711
12712 2 => {
12713 let _ =
12714 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12715 }
12716
12717 3 => {
12718 let _ =
12719 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12720 }
12721
12722 _ => unsafe { ::core::hint::unreachable_unchecked() },
12723 }
12724 }
12725 }
12726
12727 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
12728 type Constraint = ();
12729
12730 fn validate(
12731 _: ::fidl_next::Slot<'_, Self>,
12732 _: Self::Constraint,
12733 ) -> Result<(), ::fidl_next::ValidationError> {
12734 Ok(())
12735 }
12736 }
12737
12738 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
12739 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
12740
12741 #[inline]
12742 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12743 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12744 ::fidl_next::wire::Union::zero_padding(raw);
12745 }
12746 }
12747
12748 pub mod sample_strict_resource_x_union {
12749 pub enum Ref<'de> {
12750 U(&'de ::fidl_next::wire::Uint32),
12751
12752 Su(&'de crate::wire::SimpleUnion<'de>),
12753
12754 St(&'de crate::wire::SimpleTable<'de>),
12755 }
12756
12757 pub enum Value<'de> {
12758 U(::fidl_next::wire::Uint32),
12759
12760 Su(crate::wire::SimpleUnion<'de>),
12761
12762 St(crate::wire::SimpleTable<'de>),
12763 }
12764 }
12765
12766 impl<'de> SampleStrictResourceXUnion<'de> {
12767 pub fn as_ref(&self) -> crate::wire::sample_strict_resource_x_union::Ref<'_> {
12768 match self.raw.ordinal() {
12769 1 => crate::wire::sample_strict_resource_x_union::Ref::U(unsafe {
12770 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12771 }),
12772
12773 2 => crate::wire::sample_strict_resource_x_union::Ref::Su(unsafe {
12774 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12775 }),
12776
12777 3 => crate::wire::sample_strict_resource_x_union::Ref::St(unsafe {
12778 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12779 }),
12780
12781 _ => unsafe { ::core::hint::unreachable_unchecked() },
12782 }
12783 }
12784
12785 pub fn into_inner(self) -> crate::wire::sample_strict_resource_x_union::Value<'de> {
12786 let this = ::core::mem::ManuallyDrop::new(self);
12787
12788 match this.raw.ordinal() {
12789 1 => crate::wire::sample_strict_resource_x_union::Value::U(unsafe {
12790 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
12791 }),
12792
12793 2 => crate::wire::sample_strict_resource_x_union::Value::Su(unsafe {
12794 this.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
12795 }),
12796
12797 3 => crate::wire::sample_strict_resource_x_union::Value::St(unsafe {
12798 this.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
12799 }),
12800
12801 _ => unsafe { ::core::hint::unreachable_unchecked() },
12802 }
12803 }
12804 }
12805
12806 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
12807 where
12808 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12809 ___D: ::fidl_next::Decoder<'de>,
12810 ___D: ::fidl_next::fuchsia::HandleDecoder,
12811 {
12812 fn decode(
12813 mut slot: ::fidl_next::Slot<'_, Self>,
12814 decoder: &mut ___D,
12815 _: (),
12816 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12817 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12818 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12819 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12820 raw,
12821 decoder,
12822 (),
12823 )?,
12824
12825 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12826 raw,
12827 decoder,
12828 (),
12829 )?,
12830
12831 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12832 raw,
12833 decoder,
12834 (),
12835 )?,
12836
12837 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12838 }
12839
12840 Ok(())
12841 }
12842 }
12843
12844 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
12845 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12846 match self.raw.ordinal() {
12847 1 => unsafe {
12848 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12849 },
12850 2 => unsafe {
12851 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12852 },
12853 3 => unsafe {
12854 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12855 },
12856 _ => unsafe { ::core::hint::unreachable_unchecked() },
12857 }
12858 }
12859 }
12860
12861 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
12862 type Natural = crate::natural::SampleStrictResourceXUnion;
12863 }
12864
12865 #[repr(transparent)]
12867 pub struct UnionWithVector<'de> {
12868 pub(crate) raw: ::fidl_next::wire::Union,
12869 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12870 }
12871
12872 impl<'de> Drop for UnionWithVector<'de> {
12873 fn drop(&mut self) {
12874 match self.raw.ordinal() {
12875 1 => {
12876 let _ = unsafe { self.raw.get().read_unchecked::<u8>() };
12877 }
12878
12879 2 => {
12880 let _ = unsafe {
12881 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12882 };
12883 }
12884
12885 3 => {
12886 let _ = unsafe {
12887 self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
12888 };
12889 }
12890
12891 4 => {
12892 let _ = unsafe {
12893 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
12894 };
12895 }
12896
12897 5 => {
12898 let _ = unsafe {
12899 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
12900 };
12901 }
12902
12903 6 => {
12904 let _ = unsafe {
12905 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<
12906 'de,
12907 ::fidl_next::wire::fuchsia::NullableHandle,
12908 >>()
12909 };
12910 }
12911
12912 7 => {
12913 let _ = unsafe {
12914 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12915 };
12916 }
12917
12918 8 => {
12919 let _ = unsafe {
12920 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12921 };
12922 }
12923
12924 9 => {
12925 let _ = unsafe {
12926 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
12927 };
12928 }
12929
12930 _ => unsafe { ::core::hint::unreachable_unchecked() },
12931 }
12932 }
12933 }
12934
12935 impl ::fidl_next::Constrained for UnionWithVector<'_> {
12936 type Constraint = ();
12937
12938 fn validate(
12939 _: ::fidl_next::Slot<'_, Self>,
12940 _: Self::Constraint,
12941 ) -> Result<(), ::fidl_next::ValidationError> {
12942 Ok(())
12943 }
12944 }
12945
12946 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
12947 type Narrowed<'de> = UnionWithVector<'de>;
12948
12949 #[inline]
12950 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12951 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12952 ::fidl_next::wire::Union::zero_padding(raw);
12953 }
12954 }
12955
12956 pub mod union_with_vector {
12957 pub enum Ref<'de> {
12958 Unused(&'de u8),
12959
12960 VectorOfUint8(&'de ::fidl_next::wire::Vector<'de, u8>),
12961
12962 S(&'de ::fidl_next::wire::String<'de>),
12963
12964 VectorS3A1(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>),
12965
12966 VectorS3A2(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>),
12967
12968 Handles(
12969 &'de ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
12970 ),
12971
12972 ArrayS3A1(&'de [crate::wire::StructSize3Align1; 2]),
12973
12974 ArrayS3A2(&'de [crate::wire::StructSize3Align2; 2]),
12975
12976 VectorUnion(&'de ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>),
12977 }
12978
12979 pub enum Value<'de> {
12980 Unused(u8),
12981
12982 VectorOfUint8(::fidl_next::wire::Vector<'de, u8>),
12983
12984 S(::fidl_next::wire::String<'de>),
12985
12986 VectorS3A1(::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>),
12987
12988 VectorS3A2(::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>),
12989
12990 Handles(::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>),
12991
12992 ArrayS3A1([crate::wire::StructSize3Align1; 2]),
12993
12994 ArrayS3A2([crate::wire::StructSize3Align2; 2]),
12995
12996 VectorUnion(::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>),
12997 }
12998 }
12999
13000 impl<'de> UnionWithVector<'de> {
13001 pub fn as_ref(&self) -> crate::wire::union_with_vector::Ref<'_> {
13002 match self.raw.ordinal() {
13003 1 => crate::wire::union_with_vector::Ref::Unused(unsafe {
13004 self.raw.get().deref_unchecked::<u8>()
13005 }),
13006
13007 2 => crate::wire::union_with_vector::Ref::VectorOfUint8(unsafe {
13008 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13009 }),
13010
13011 3 => crate::wire::union_with_vector::Ref::S(unsafe {
13012 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
13013 }),
13014
13015 4 => crate::wire::union_with_vector::Ref::VectorS3A1(unsafe {
13016 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>>()
13017 }),
13018
13019 5 => crate::wire::union_with_vector::Ref::VectorS3A2(unsafe {
13020 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>>()
13021 }),
13022
13023 6 => crate::wire::union_with_vector::Ref::Handles(unsafe {
13024 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>>()
13025 }),
13026
13027 7 => crate::wire::union_with_vector::Ref::ArrayS3A1(unsafe {
13028 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>()
13029 }),
13030
13031 8 => crate::wire::union_with_vector::Ref::ArrayS3A2(unsafe {
13032 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>()
13033 }),
13034
13035 9 => crate::wire::union_with_vector::Ref::VectorUnion(unsafe {
13036 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>>()
13037 }),
13038
13039 _ => unsafe { ::core::hint::unreachable_unchecked() },
13040 }
13041 }
13042
13043 pub fn into_inner(self) -> crate::wire::union_with_vector::Value<'de> {
13044 let this = ::core::mem::ManuallyDrop::new(self);
13045
13046 match this.raw.ordinal() {
13047 1 => crate::wire::union_with_vector::Value::Unused(unsafe {
13048 this.raw.get().read_unchecked::<u8>()
13049 }),
13050
13051 2 => crate::wire::union_with_vector::Value::VectorOfUint8(unsafe {
13052 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13053 }),
13054
13055 3 => crate::wire::union_with_vector::Value::S(unsafe {
13056 this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
13057 }),
13058
13059 4 => crate::wire::union_with_vector::Value::VectorS3A1(unsafe {
13060 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
13061 }),
13062
13063 5 => crate::wire::union_with_vector::Value::VectorS3A2(unsafe {
13064 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
13065 }),
13066
13067 6 => crate::wire::union_with_vector::Value::Handles(unsafe {
13068 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>>()
13069 }),
13070
13071 7 => crate::wire::union_with_vector::Value::ArrayS3A1(unsafe {
13072 this.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
13073 }),
13074
13075 8 => crate::wire::union_with_vector::Value::ArrayS3A2(unsafe {
13076 this.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
13077 }),
13078
13079 9 => crate::wire::union_with_vector::Value::VectorUnion(unsafe {
13080 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
13081 }),
13082
13083 _ => unsafe { ::core::hint::unreachable_unchecked() },
13084 }
13085 }
13086 }
13087
13088 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
13089 where
13090 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13091 ___D: ::fidl_next::Decoder<'de>,
13092 ___D: ::fidl_next::fuchsia::HandleDecoder,
13093 {
13094 fn decode(
13095 mut slot: ::fidl_next::Slot<'_, Self>,
13096 decoder: &mut ___D,
13097 _: (),
13098 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13099 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
13100 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
13101 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
13102
13103 2 => {
13104 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
13105 raw,
13106 decoder,
13107 (4294967295, ()),
13108 )?
13109 }
13110
13111 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
13112 raw, decoder, 4294967295,
13113 )?,
13114
13115 4 => ::fidl_next::wire::Union::decode_as::<
13116 ___D,
13117 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
13118 >(raw, decoder, (4294967295, ()))?,
13119
13120 5 => ::fidl_next::wire::Union::decode_as::<
13121 ___D,
13122 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
13123 >(raw, decoder, (4294967295, ()))?,
13124
13125 6 => ::fidl_next::wire::Union::decode_as::<
13126 ___D,
13127 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
13128 >(raw, decoder, (4294967295, ()))?,
13129
13130 7 => ::fidl_next::wire::Union::decode_as::<
13131 ___D,
13132 [crate::wire::StructSize3Align1; 2],
13133 >(raw, decoder, ())?,
13134
13135 8 => ::fidl_next::wire::Union::decode_as::<
13136 ___D,
13137 [crate::wire::StructSize3Align2; 2],
13138 >(raw, decoder, ())?,
13139
13140 9 => ::fidl_next::wire::Union::decode_as::<
13141 ___D,
13142 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
13143 >(raw, decoder, (4294967295, ()))?,
13144
13145 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
13146 }
13147
13148 Ok(())
13149 }
13150 }
13151
13152 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
13153 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
13154 match self.raw.ordinal() {
13155 1 => unsafe { self.raw.get().deref_unchecked::<u8>().fmt(f) },
13156 2 => unsafe {
13157 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
13158 },
13159 3 => unsafe {
13160 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
13161 },
13162 4 => unsafe {
13163 self.raw.get().deref_unchecked::<
13164 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>
13165 >().fmt(f)
13166 },
13167 5 => unsafe {
13168 self.raw.get().deref_unchecked::<
13169 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>
13170 >().fmt(f)
13171 },
13172 6 => unsafe {
13173 self.raw.get().deref_unchecked::<
13174 ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>
13175 >().fmt(f)
13176 },
13177 7 => unsafe {
13178 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>().fmt(f)
13179 },
13180 8 => unsafe {
13181 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>().fmt(f)
13182 },
13183 9 => unsafe {
13184 self.raw.get().deref_unchecked::<
13185 ::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>
13186 >().fmt(f)
13187 },
13188 _ => unsafe { ::core::hint::unreachable_unchecked() },
13189 }
13190 }
13191 }
13192
13193 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
13194 type Natural = crate::natural::UnionWithVector;
13195 }
13196
13197 #[derive(Debug)]
13199 #[repr(C)]
13200 pub struct Sandwich6<'de> {
13201 pub before: ::fidl_next::wire::Uint32,
13202
13203 pub the_union: crate::wire::UnionWithVector<'de>,
13204
13205 pub after: ::fidl_next::wire::Uint32,
13206 }
13207
13208 static_assertions::const_assert_eq!(std::mem::size_of::<Sandwich6<'_>>(), 32);
13209 static_assertions::const_assert_eq!(std::mem::align_of::<Sandwich6<'_>>(), 8);
13210
13211 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, before), 0);
13212
13213 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, the_union), 8);
13214
13215 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, after), 24);
13216
13217 impl ::fidl_next::Constrained for Sandwich6<'_> {
13218 type Constraint = ();
13219
13220 fn validate(
13221 _: ::fidl_next::Slot<'_, Self>,
13222 _: Self::Constraint,
13223 ) -> Result<(), ::fidl_next::ValidationError> {
13224 Ok(())
13225 }
13226 }
13227
13228 unsafe impl ::fidl_next::Wire for Sandwich6<'static> {
13229 type Narrowed<'de> = Sandwich6<'de>;
13230
13231 #[inline]
13232 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13233 ::fidl_next::munge! {
13234 let Self {
13235 before,
13236 the_union,
13237 after,
13238
13239 } = &mut *out_;
13240 }
13241
13242 ::fidl_next::Wire::zero_padding(before);
13243
13244 ::fidl_next::Wire::zero_padding(the_union);
13245
13246 ::fidl_next::Wire::zero_padding(after);
13247
13248 unsafe {
13249 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
13250 }
13251
13252 unsafe {
13253 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
13254 }
13255 }
13256 }
13257
13258 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Sandwich6<'de>
13259 where
13260 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13261 ___D: ::fidl_next::Decoder<'de>,
13262 ___D: ::fidl_next::fuchsia::HandleDecoder,
13263 {
13264 fn decode(
13265 slot_: ::fidl_next::Slot<'_, Self>,
13266 decoder_: &mut ___D,
13267 _: (),
13268 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13269 if slot_.as_bytes()[28..32] != [0u8; 4] {
13270 return Err(::fidl_next::DecodeError::InvalidPadding);
13271 }
13272
13273 if slot_.as_bytes()[4..8] != [0u8; 4] {
13274 return Err(::fidl_next::DecodeError::InvalidPadding);
13275 }
13276
13277 ::fidl_next::munge! {
13278 let Self {
13279 mut before,
13280 mut the_union,
13281 mut after,
13282
13283 } = slot_;
13284 }
13285
13286 let _field = before.as_mut();
13287
13288 ::fidl_next::Decode::decode(before.as_mut(), decoder_, ())?;
13289
13290 let _field = the_union.as_mut();
13291
13292 ::fidl_next::Decode::decode(the_union.as_mut(), decoder_, ())?;
13293
13294 let _field = after.as_mut();
13295
13296 ::fidl_next::Decode::decode(after.as_mut(), decoder_, ())?;
13297
13298 Ok(())
13299 }
13300 }
13301
13302 impl<'de> ::fidl_next::IntoNatural for Sandwich6<'de> {
13303 type Natural = crate::natural::Sandwich6;
13304 }
13305
13306 #[derive(Debug)]
13308 #[repr(C)]
13309 pub struct ShortStringThenHandle<'de> {
13310 pub s: ::fidl_next::wire::String<'de>,
13311
13312 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
13313 }
13314
13315 static_assertions::const_assert_eq!(std::mem::size_of::<ShortStringThenHandle<'_>>(), 24);
13316 static_assertions::const_assert_eq!(std::mem::align_of::<ShortStringThenHandle<'_>>(), 8);
13317
13318 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, s), 0);
13319
13320 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, h), 16);
13321
13322 impl ::fidl_next::Constrained for ShortStringThenHandle<'_> {
13323 type Constraint = ();
13324
13325 fn validate(
13326 _: ::fidl_next::Slot<'_, Self>,
13327 _: Self::Constraint,
13328 ) -> Result<(), ::fidl_next::ValidationError> {
13329 Ok(())
13330 }
13331 }
13332
13333 unsafe impl ::fidl_next::Wire for ShortStringThenHandle<'static> {
13334 type Narrowed<'de> = ShortStringThenHandle<'de>;
13335
13336 #[inline]
13337 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13338 ::fidl_next::munge! {
13339 let Self {
13340 s,
13341 h,
13342
13343 } = &mut *out_;
13344 }
13345
13346 ::fidl_next::Wire::zero_padding(s);
13347
13348 ::fidl_next::Wire::zero_padding(h);
13349
13350 unsafe {
13351 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
13352 }
13353 }
13354 }
13355
13356 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ShortStringThenHandle<'de>
13357 where
13358 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13359 ___D: ::fidl_next::Decoder<'de>,
13360 ___D: ::fidl_next::fuchsia::HandleDecoder,
13361 {
13362 fn decode(
13363 slot_: ::fidl_next::Slot<'_, Self>,
13364 decoder_: &mut ___D,
13365 _: (),
13366 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13367 if slot_.as_bytes()[20..24] != [0u8; 4] {
13368 return Err(::fidl_next::DecodeError::InvalidPadding);
13369 }
13370
13371 ::fidl_next::munge! {
13372 let Self {
13373 mut s,
13374 mut h,
13375
13376 } = slot_;
13377 }
13378
13379 let _field = s.as_mut();
13380 ::fidl_next::Constrained::validate(_field, 1)?;
13381 ::fidl_next::Decode::decode(s.as_mut(), decoder_, 1)?;
13382
13383 let s = unsafe { s.deref_unchecked() };
13384
13385 if s.len() > 1 {
13386 return Err(::fidl_next::DecodeError::VectorTooLong {
13387 size: s.len() as u64,
13388 limit: 1,
13389 });
13390 }
13391
13392 let _field = h.as_mut();
13393
13394 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13395
13396 Ok(())
13397 }
13398 }
13399
13400 impl<'de> ::fidl_next::IntoNatural for ShortStringThenHandle<'de> {
13401 type Natural = crate::natural::ShortStringThenHandle;
13402 }
13403
13404 #[repr(C)]
13406 pub struct SimpleResourceTable<'de> {
13407 pub(crate) table: ::fidl_next::wire::Table<'de>,
13408 }
13409
13410 impl<'de> Drop for SimpleResourceTable<'de> {
13411 fn drop(&mut self) {
13412 let _ = self
13413 .table
13414 .get(1)
13415 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
13416
13417 let _ = self
13418 .table
13419 .get(5)
13420 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
13421 }
13422 }
13423
13424 impl ::fidl_next::Constrained for SimpleResourceTable<'_> {
13425 type Constraint = ();
13426
13427 fn validate(
13428 _: ::fidl_next::Slot<'_, Self>,
13429 _: Self::Constraint,
13430 ) -> Result<(), ::fidl_next::ValidationError> {
13431 Ok(())
13432 }
13433 }
13434
13435 unsafe impl ::fidl_next::Wire for SimpleResourceTable<'static> {
13436 type Narrowed<'de> = SimpleResourceTable<'de>;
13437
13438 #[inline]
13439 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13440 ::fidl_next::munge!(let Self { table } = out);
13441 ::fidl_next::wire::Table::zero_padding(table);
13442 }
13443 }
13444
13445 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SimpleResourceTable<'de>
13446 where
13447 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13448 ___D: ::fidl_next::fuchsia::HandleDecoder,
13449 {
13450 fn decode(
13451 slot: ::fidl_next::Slot<'_, Self>,
13452 decoder: &mut ___D,
13453 _: (),
13454 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13455 ::fidl_next::munge!(let Self { table } = slot);
13456
13457 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13458 match ordinal {
13459 0 => unsafe { ::core::hint::unreachable_unchecked() },
13460
13461 1 => {
13462 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
13463 slot.as_mut(),
13464 decoder,
13465 (),
13466 )?;
13467
13468 Ok(())
13469 }
13470
13471 5 => {
13472 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
13473 slot.as_mut(),
13474 decoder,
13475 (),
13476 )?;
13477
13478 Ok(())
13479 }
13480
13481 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13482 }
13483 })
13484 }
13485 }
13486
13487 impl<'de> SimpleResourceTable<'de> {
13488 pub fn x(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
13489 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13490 }
13491
13492 pub fn take_x(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
13493 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13494 }
13495
13496 pub fn y(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
13497 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13498 }
13499
13500 pub fn take_y(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
13501 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13502 }
13503 }
13504
13505 impl<'de> ::core::fmt::Debug for SimpleResourceTable<'de> {
13506 fn fmt(
13507 &self,
13508 f: &mut ::core::fmt::Formatter<'_>,
13509 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13510 f.debug_struct("SimpleResourceTable")
13511 .field("x", &self.x())
13512 .field("y", &self.y())
13513 .finish()
13514 }
13515 }
13516
13517 impl<'de> ::fidl_next::IntoNatural for SimpleResourceTable<'de> {
13518 type Natural = crate::natural::SimpleResourceTable;
13519 }
13520
13521 #[derive(Debug)]
13523 #[repr(C)]
13524 pub struct SingleHandle {
13525 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
13526 }
13527
13528 static_assertions::const_assert_eq!(std::mem::size_of::<SingleHandle>(), 4);
13529 static_assertions::const_assert_eq!(std::mem::align_of::<SingleHandle>(), 4);
13530
13531 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleHandle, h), 0);
13532
13533 impl ::fidl_next::Constrained for SingleHandle {
13534 type Constraint = ();
13535
13536 fn validate(
13537 _: ::fidl_next::Slot<'_, Self>,
13538 _: Self::Constraint,
13539 ) -> Result<(), ::fidl_next::ValidationError> {
13540 Ok(())
13541 }
13542 }
13543
13544 unsafe impl ::fidl_next::Wire for SingleHandle {
13545 type Narrowed<'de> = SingleHandle;
13546
13547 #[inline]
13548 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13549 ::fidl_next::munge! {
13550 let Self {
13551 h,
13552
13553 } = &mut *out_;
13554 }
13555
13556 ::fidl_next::Wire::zero_padding(h);
13557 }
13558 }
13559
13560 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleHandle
13561 where
13562 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13563 ___D: ::fidl_next::fuchsia::HandleDecoder,
13564 {
13565 fn decode(
13566 slot_: ::fidl_next::Slot<'_, Self>,
13567 decoder_: &mut ___D,
13568 _: (),
13569 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13570 ::fidl_next::munge! {
13571 let Self {
13572 mut h,
13573
13574 } = slot_;
13575 }
13576
13577 let _field = h.as_mut();
13578
13579 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13580
13581 Ok(())
13582 }
13583 }
13584
13585 impl ::fidl_next::IntoNatural for SingleHandle {
13586 type Natural = crate::natural::SingleHandle;
13587 }
13588
13589 #[derive(Debug)]
13591 #[repr(C)]
13592 pub struct SingleOptionalHandle {
13593 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
13594 }
13595
13596 static_assertions::const_assert_eq!(std::mem::size_of::<SingleOptionalHandle>(), 4);
13597 static_assertions::const_assert_eq!(std::mem::align_of::<SingleOptionalHandle>(), 4);
13598
13599 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleOptionalHandle, h), 0);
13600
13601 impl ::fidl_next::Constrained for SingleOptionalHandle {
13602 type Constraint = ();
13603
13604 fn validate(
13605 _: ::fidl_next::Slot<'_, Self>,
13606 _: Self::Constraint,
13607 ) -> Result<(), ::fidl_next::ValidationError> {
13608 Ok(())
13609 }
13610 }
13611
13612 unsafe impl ::fidl_next::Wire for SingleOptionalHandle {
13613 type Narrowed<'de> = SingleOptionalHandle;
13614
13615 #[inline]
13616 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13617 ::fidl_next::munge! {
13618 let Self {
13619 h,
13620
13621 } = &mut *out_;
13622 }
13623
13624 ::fidl_next::Wire::zero_padding(h);
13625 }
13626 }
13627
13628 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleOptionalHandle
13629 where
13630 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13631 ___D: ::fidl_next::fuchsia::HandleDecoder,
13632 {
13633 fn decode(
13634 slot_: ::fidl_next::Slot<'_, Self>,
13635 decoder_: &mut ___D,
13636 _: (),
13637 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13638 ::fidl_next::munge! {
13639 let Self {
13640 mut h,
13641
13642 } = slot_;
13643 }
13644
13645 let _field = h.as_mut();
13646
13647 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13648
13649 Ok(())
13650 }
13651 }
13652
13653 impl ::fidl_next::IntoNatural for SingleOptionalHandle {
13654 type Natural = crate::natural::SingleOptionalHandle;
13655 }
13656
13657 #[derive(Debug)]
13659 #[repr(C)]
13660 pub struct StructOfEndpoints {
13661 pub client_end:
13662 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13663
13664 pub optional_client_end:
13665 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13666
13667 pub server_end:
13668 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13669
13670 pub optional_server_end:
13671 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13672 }
13673
13674 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfEndpoints>(), 16);
13675 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfEndpoints>(), 4);
13676
13677 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, client_end), 0);
13678
13679 static_assertions::const_assert_eq!(
13680 std::mem::offset_of!(StructOfEndpoints, optional_client_end),
13681 4
13682 );
13683
13684 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, server_end), 8);
13685
13686 static_assertions::const_assert_eq!(
13687 std::mem::offset_of!(StructOfEndpoints, optional_server_end),
13688 12
13689 );
13690
13691 impl ::fidl_next::Constrained for StructOfEndpoints {
13692 type Constraint = ();
13693
13694 fn validate(
13695 _: ::fidl_next::Slot<'_, Self>,
13696 _: Self::Constraint,
13697 ) -> Result<(), ::fidl_next::ValidationError> {
13698 Ok(())
13699 }
13700 }
13701
13702 unsafe impl ::fidl_next::Wire for StructOfEndpoints {
13703 type Narrowed<'de> = StructOfEndpoints;
13704
13705 #[inline]
13706 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13707 ::fidl_next::munge! {
13708 let Self {
13709 client_end,
13710 optional_client_end,
13711 server_end,
13712 optional_server_end,
13713
13714 } = &mut *out_;
13715 }
13716
13717 ::fidl_next::Wire::zero_padding(client_end);
13718
13719 ::fidl_next::Wire::zero_padding(optional_client_end);
13720
13721 ::fidl_next::Wire::zero_padding(server_end);
13722
13723 ::fidl_next::Wire::zero_padding(optional_server_end);
13724 }
13725 }
13726
13727 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfEndpoints
13728 where
13729 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13730 ___D: ::fidl_next::fuchsia::HandleDecoder,
13731 {
13732 fn decode(
13733 slot_: ::fidl_next::Slot<'_, Self>,
13734 decoder_: &mut ___D,
13735 _: (),
13736 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13737 ::fidl_next::munge! {
13738 let Self {
13739 mut client_end,
13740 mut optional_client_end,
13741 mut server_end,
13742 mut optional_server_end,
13743
13744 } = slot_;
13745 }
13746
13747 let _field = client_end.as_mut();
13748
13749 ::fidl_next::Decode::decode(client_end.as_mut(), decoder_, ())?;
13750
13751 let _field = optional_client_end.as_mut();
13752
13753 ::fidl_next::Decode::decode(optional_client_end.as_mut(), decoder_, ())?;
13754
13755 let _field = server_end.as_mut();
13756
13757 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
13758
13759 let _field = optional_server_end.as_mut();
13760
13761 ::fidl_next::Decode::decode(optional_server_end.as_mut(), decoder_, ())?;
13762
13763 Ok(())
13764 }
13765 }
13766
13767 impl ::fidl_next::IntoNatural for StructOfEndpoints {
13768 type Natural = crate::natural::StructOfEndpoints;
13769 }
13770
13771 #[derive(Debug)]
13773 #[repr(C)]
13774 pub struct StructOfOptionalUnionOfHandle {
13775 pub u: crate::wire_optional::UnionOfHandle,
13776 }
13777
13778 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfOptionalUnionOfHandle>(), 16);
13779 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfOptionalUnionOfHandle>(), 8);
13780
13781 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfOptionalUnionOfHandle, u), 0);
13782
13783 impl ::fidl_next::Constrained for StructOfOptionalUnionOfHandle {
13784 type Constraint = ();
13785
13786 fn validate(
13787 _: ::fidl_next::Slot<'_, Self>,
13788 _: Self::Constraint,
13789 ) -> Result<(), ::fidl_next::ValidationError> {
13790 Ok(())
13791 }
13792 }
13793
13794 unsafe impl ::fidl_next::Wire for StructOfOptionalUnionOfHandle {
13795 type Narrowed<'de> = StructOfOptionalUnionOfHandle;
13796
13797 #[inline]
13798 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13799 ::fidl_next::munge! {
13800 let Self {
13801 u,
13802
13803 } = &mut *out_;
13804 }
13805
13806 ::fidl_next::Wire::zero_padding(u);
13807 }
13808 }
13809
13810 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfOptionalUnionOfHandle
13811 where
13812 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13813 ___D: ::fidl_next::fuchsia::HandleDecoder,
13814 {
13815 fn decode(
13816 slot_: ::fidl_next::Slot<'_, Self>,
13817 decoder_: &mut ___D,
13818 _: (),
13819 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13820 ::fidl_next::munge! {
13821 let Self {
13822 mut u,
13823
13824 } = slot_;
13825 }
13826
13827 let _field = u.as_mut();
13828
13829 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
13830
13831 Ok(())
13832 }
13833 }
13834
13835 impl ::fidl_next::IntoNatural for StructOfOptionalUnionOfHandle {
13836 type Natural = crate::natural::StructOfOptionalUnionOfHandle;
13837 }
13838
13839 #[derive(Debug)]
13841 #[repr(C)]
13842 pub struct StructOfSimpleResourceTable<'de> {
13843 pub table: crate::wire::SimpleResourceTable<'de>,
13844 }
13845
13846 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfSimpleResourceTable<'_>>(), 16);
13847 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfSimpleResourceTable<'_>>(), 8);
13848
13849 static_assertions::const_assert_eq!(
13850 std::mem::offset_of!(StructOfSimpleResourceTable<'_>, table),
13851 0
13852 );
13853
13854 impl ::fidl_next::Constrained for StructOfSimpleResourceTable<'_> {
13855 type Constraint = ();
13856
13857 fn validate(
13858 _: ::fidl_next::Slot<'_, Self>,
13859 _: Self::Constraint,
13860 ) -> Result<(), ::fidl_next::ValidationError> {
13861 Ok(())
13862 }
13863 }
13864
13865 unsafe impl ::fidl_next::Wire for StructOfSimpleResourceTable<'static> {
13866 type Narrowed<'de> = StructOfSimpleResourceTable<'de>;
13867
13868 #[inline]
13869 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13870 ::fidl_next::munge! {
13871 let Self {
13872 table,
13873
13874 } = &mut *out_;
13875 }
13876
13877 ::fidl_next::Wire::zero_padding(table);
13878 }
13879 }
13880
13881 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StructOfSimpleResourceTable<'de>
13882 where
13883 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13884 ___D: ::fidl_next::Decoder<'de>,
13885 ___D: ::fidl_next::fuchsia::HandleDecoder,
13886 {
13887 fn decode(
13888 slot_: ::fidl_next::Slot<'_, Self>,
13889 decoder_: &mut ___D,
13890 _: (),
13891 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13892 ::fidl_next::munge! {
13893 let Self {
13894 mut table,
13895
13896 } = slot_;
13897 }
13898
13899 let _field = table.as_mut();
13900
13901 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
13902
13903 Ok(())
13904 }
13905 }
13906
13907 impl<'de> ::fidl_next::IntoNatural for StructOfSimpleResourceTable<'de> {
13908 type Natural = crate::natural::StructOfSimpleResourceTable;
13909 }
13910
13911 #[repr(C)]
13913 pub struct TableFieldInlinedHandle<'de> {
13914 pub(crate) table: ::fidl_next::wire::Table<'de>,
13915 }
13916
13917 impl<'de> Drop for TableFieldInlinedHandle<'de> {
13918 fn drop(&mut self) {
13919 let _ = self.table.get(1).map(|envelope| unsafe {
13920 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
13921 });
13922 }
13923 }
13924
13925 impl ::fidl_next::Constrained for TableFieldInlinedHandle<'_> {
13926 type Constraint = ();
13927
13928 fn validate(
13929 _: ::fidl_next::Slot<'_, Self>,
13930 _: Self::Constraint,
13931 ) -> Result<(), ::fidl_next::ValidationError> {
13932 Ok(())
13933 }
13934 }
13935
13936 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandle<'static> {
13937 type Narrowed<'de> = TableFieldInlinedHandle<'de>;
13938
13939 #[inline]
13940 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13941 ::fidl_next::munge!(let Self { table } = out);
13942 ::fidl_next::wire::Table::zero_padding(table);
13943 }
13944 }
13945
13946 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandle<'de>
13947 where
13948 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13949 ___D: ::fidl_next::fuchsia::HandleDecoder,
13950 {
13951 fn decode(
13952 slot: ::fidl_next::Slot<'_, Self>,
13953 decoder: &mut ___D,
13954 _: (),
13955 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13956 ::fidl_next::munge!(let Self { table } = slot);
13957
13958 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13959 match ordinal {
13960 0 => unsafe { ::core::hint::unreachable_unchecked() },
13961
13962 1 => {
13963 ::fidl_next::wire::Envelope::decode_as::<
13964 ___D,
13965 ::fidl_next::wire::fuchsia::Channel,
13966 >(slot.as_mut(), decoder, ())?;
13967
13968 Ok(())
13969 }
13970
13971 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13972 }
13973 })
13974 }
13975 }
13976
13977 impl<'de> TableFieldInlinedHandle<'de> {
13978 pub fn f(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
13979 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13980 }
13981
13982 pub fn take_f(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Channel> {
13983 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13984 }
13985 }
13986
13987 impl<'de> ::core::fmt::Debug for TableFieldInlinedHandle<'de> {
13988 fn fmt(
13989 &self,
13990 f: &mut ::core::fmt::Formatter<'_>,
13991 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13992 f.debug_struct("TableFieldInlinedHandle").field("f", &self.f()).finish()
13993 }
13994 }
13995
13996 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandle<'de> {
13997 type Natural = crate::natural::TableFieldInlinedHandle;
13998 }
13999
14000 #[derive(Debug)]
14002 #[repr(C)]
14003 pub struct TableFieldInlinedHandleStruct<'de> {
14004 pub t: crate::wire::TableFieldInlinedHandle<'de>,
14005 }
14006
14007 static_assertions::const_assert_eq!(
14008 std::mem::size_of::<TableFieldInlinedHandleStruct<'_>>(),
14009 16
14010 );
14011 static_assertions::const_assert_eq!(
14012 std::mem::align_of::<TableFieldInlinedHandleStruct<'_>>(),
14013 8
14014 );
14015
14016 static_assertions::const_assert_eq!(
14017 std::mem::offset_of!(TableFieldInlinedHandleStruct<'_>, t),
14018 0
14019 );
14020
14021 impl ::fidl_next::Constrained for TableFieldInlinedHandleStruct<'_> {
14022 type Constraint = ();
14023
14024 fn validate(
14025 _: ::fidl_next::Slot<'_, Self>,
14026 _: Self::Constraint,
14027 ) -> Result<(), ::fidl_next::ValidationError> {
14028 Ok(())
14029 }
14030 }
14031
14032 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandleStruct<'static> {
14033 type Narrowed<'de> = TableFieldInlinedHandleStruct<'de>;
14034
14035 #[inline]
14036 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14037 ::fidl_next::munge! {
14038 let Self {
14039 t,
14040
14041 } = &mut *out_;
14042 }
14043
14044 ::fidl_next::Wire::zero_padding(t);
14045 }
14046 }
14047
14048 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandleStruct<'de>
14049 where
14050 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14051 ___D: ::fidl_next::Decoder<'de>,
14052 ___D: ::fidl_next::fuchsia::HandleDecoder,
14053 {
14054 fn decode(
14055 slot_: ::fidl_next::Slot<'_, Self>,
14056 decoder_: &mut ___D,
14057 _: (),
14058 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14059 ::fidl_next::munge! {
14060 let Self {
14061 mut t,
14062
14063 } = slot_;
14064 }
14065
14066 let _field = t.as_mut();
14067
14068 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14069
14070 Ok(())
14071 }
14072 }
14073
14074 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandleStruct<'de> {
14075 type Natural = crate::natural::TableFieldInlinedHandleStruct;
14076 }
14077
14078 #[repr(C)]
14080 pub struct TableFieldUnknownResource<'de> {
14081 pub(crate) table: ::fidl_next::wire::Table<'de>,
14082 }
14083
14084 impl<'de> Drop for TableFieldUnknownResource<'de> {
14085 fn drop(&mut self) {}
14086 }
14087
14088 impl ::fidl_next::Constrained for TableFieldUnknownResource<'_> {
14089 type Constraint = ();
14090
14091 fn validate(
14092 _: ::fidl_next::Slot<'_, Self>,
14093 _: Self::Constraint,
14094 ) -> Result<(), ::fidl_next::ValidationError> {
14095 Ok(())
14096 }
14097 }
14098
14099 unsafe impl ::fidl_next::Wire for TableFieldUnknownResource<'static> {
14100 type Narrowed<'de> = TableFieldUnknownResource<'de>;
14101
14102 #[inline]
14103 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14104 ::fidl_next::munge!(let Self { table } = out);
14105 ::fidl_next::wire::Table::zero_padding(table);
14106 }
14107 }
14108
14109 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResource<'de>
14110 where
14111 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14112 ___D: ::fidl_next::fuchsia::HandleDecoder,
14113 {
14114 fn decode(
14115 slot: ::fidl_next::Slot<'_, Self>,
14116 decoder: &mut ___D,
14117 _: (),
14118 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14119 ::fidl_next::munge!(let Self { table } = slot);
14120
14121 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14122 match ordinal {
14123 0 => unsafe { ::core::hint::unreachable_unchecked() },
14124
14125 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14126 }
14127 })
14128 }
14129 }
14130
14131 impl<'de> TableFieldUnknownResource<'de> {}
14132
14133 impl<'de> ::core::fmt::Debug for TableFieldUnknownResource<'de> {
14134 fn fmt(
14135 &self,
14136 f: &mut ::core::fmt::Formatter<'_>,
14137 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14138 f.debug_struct("TableFieldUnknownResource").finish()
14139 }
14140 }
14141
14142 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResource<'de> {
14143 type Natural = crate::natural::TableFieldUnknownResource;
14144 }
14145
14146 #[derive(Debug)]
14148 #[repr(C)]
14149 pub struct TableFieldUnknownResourceStruct<'de> {
14150 pub t: crate::wire::TableFieldUnknownResource<'de>,
14151 }
14152
14153 static_assertions::const_assert_eq!(
14154 std::mem::size_of::<TableFieldUnknownResourceStruct<'_>>(),
14155 16
14156 );
14157 static_assertions::const_assert_eq!(
14158 std::mem::align_of::<TableFieldUnknownResourceStruct<'_>>(),
14159 8
14160 );
14161
14162 static_assertions::const_assert_eq!(
14163 std::mem::offset_of!(TableFieldUnknownResourceStruct<'_>, t),
14164 0
14165 );
14166
14167 impl ::fidl_next::Constrained for TableFieldUnknownResourceStruct<'_> {
14168 type Constraint = ();
14169
14170 fn validate(
14171 _: ::fidl_next::Slot<'_, Self>,
14172 _: Self::Constraint,
14173 ) -> Result<(), ::fidl_next::ValidationError> {
14174 Ok(())
14175 }
14176 }
14177
14178 unsafe impl ::fidl_next::Wire for TableFieldUnknownResourceStruct<'static> {
14179 type Narrowed<'de> = TableFieldUnknownResourceStruct<'de>;
14180
14181 #[inline]
14182 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14183 ::fidl_next::munge! {
14184 let Self {
14185 t,
14186
14187 } = &mut *out_;
14188 }
14189
14190 ::fidl_next::Wire::zero_padding(t);
14191 }
14192 }
14193
14194 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResourceStruct<'de>
14195 where
14196 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14197 ___D: ::fidl_next::Decoder<'de>,
14198 ___D: ::fidl_next::fuchsia::HandleDecoder,
14199 {
14200 fn decode(
14201 slot_: ::fidl_next::Slot<'_, Self>,
14202 decoder_: &mut ___D,
14203 _: (),
14204 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14205 ::fidl_next::munge! {
14206 let Self {
14207 mut t,
14208
14209 } = slot_;
14210 }
14211
14212 let _field = t.as_mut();
14213
14214 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14215
14216 Ok(())
14217 }
14218 }
14219
14220 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResourceStruct<'de> {
14221 type Natural = crate::natural::TableFieldUnknownResourceStruct;
14222 }
14223
14224 #[repr(C)]
14226 pub struct TableOfEndpointsTable<'de> {
14227 pub(crate) table: ::fidl_next::wire::Table<'de>,
14228 }
14229
14230 impl<'de> Drop for TableOfEndpointsTable<'de> {
14231 fn drop(&mut self) {
14232 let _ = self.table.get(1)
14233 .map(|envelope| unsafe {
14234 envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
14235 });
14236
14237 let _ = self.table.get(2)
14238 .map(|envelope| unsafe {
14239 envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
14240 });
14241 }
14242 }
14243
14244 impl ::fidl_next::Constrained for TableOfEndpointsTable<'_> {
14245 type Constraint = ();
14246
14247 fn validate(
14248 _: ::fidl_next::Slot<'_, Self>,
14249 _: Self::Constraint,
14250 ) -> Result<(), ::fidl_next::ValidationError> {
14251 Ok(())
14252 }
14253 }
14254
14255 unsafe impl ::fidl_next::Wire for TableOfEndpointsTable<'static> {
14256 type Narrowed<'de> = TableOfEndpointsTable<'de>;
14257
14258 #[inline]
14259 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14260 ::fidl_next::munge!(let Self { table } = out);
14261 ::fidl_next::wire::Table::zero_padding(table);
14262 }
14263 }
14264
14265 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpointsTable<'de>
14266 where
14267 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14268 ___D: ::fidl_next::fuchsia::HandleDecoder,
14269 {
14270 fn decode(
14271 slot: ::fidl_next::Slot<'_, Self>,
14272 decoder: &mut ___D,
14273 _: (),
14274 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14275 ::fidl_next::munge!(let Self { table } = slot);
14276
14277 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14278 match ordinal {
14279 0 => unsafe { ::core::hint::unreachable_unchecked() },
14280
14281 1 => {
14282 ::fidl_next::wire::Envelope::decode_as::<
14283 ___D,
14284 ::fidl_next::ClientEnd<
14285 crate::Protocol,
14286 ::fidl_next::wire::fuchsia::Channel,
14287 >,
14288 >(slot.as_mut(), decoder, ())?;
14289
14290 Ok(())
14291 }
14292
14293 2 => {
14294 ::fidl_next::wire::Envelope::decode_as::<
14295 ___D,
14296 ::fidl_next::ServerEnd<
14297 crate::Protocol,
14298 ::fidl_next::wire::fuchsia::Channel,
14299 >,
14300 >(slot.as_mut(), decoder, ())?;
14301
14302 Ok(())
14303 }
14304
14305 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14306 }
14307 })
14308 }
14309 }
14310
14311 impl<'de> TableOfEndpointsTable<'de> {
14312 pub fn client_end(
14313 &self,
14314 ) -> ::core::option::Option<
14315 &::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14316 > {
14317 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14318 }
14319
14320 pub fn take_client_end(
14321 &mut self,
14322 ) -> ::core::option::Option<
14323 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14324 > {
14325 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14326 }
14327
14328 pub fn server_end(
14329 &self,
14330 ) -> ::core::option::Option<
14331 &::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14332 > {
14333 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14334 }
14335
14336 pub fn take_server_end(
14337 &mut self,
14338 ) -> ::core::option::Option<
14339 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14340 > {
14341 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14342 }
14343 }
14344
14345 impl<'de> ::core::fmt::Debug for TableOfEndpointsTable<'de> {
14346 fn fmt(
14347 &self,
14348 f: &mut ::core::fmt::Formatter<'_>,
14349 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14350 f.debug_struct("TableOfEndpointsTable")
14351 .field("client_end", &self.client_end())
14352 .field("server_end", &self.server_end())
14353 .finish()
14354 }
14355 }
14356
14357 impl<'de> ::fidl_next::IntoNatural for TableOfEndpointsTable<'de> {
14358 type Natural = crate::natural::TableOfEndpointsTable;
14359 }
14360
14361 #[derive(Debug)]
14363 #[repr(C)]
14364 pub struct TableOfEndpoints<'de> {
14365 pub t: crate::wire::TableOfEndpointsTable<'de>,
14366 }
14367
14368 static_assertions::const_assert_eq!(std::mem::size_of::<TableOfEndpoints<'_>>(), 16);
14369 static_assertions::const_assert_eq!(std::mem::align_of::<TableOfEndpoints<'_>>(), 8);
14370
14371 static_assertions::const_assert_eq!(std::mem::offset_of!(TableOfEndpoints<'_>, t), 0);
14372
14373 impl ::fidl_next::Constrained for TableOfEndpoints<'_> {
14374 type Constraint = ();
14375
14376 fn validate(
14377 _: ::fidl_next::Slot<'_, Self>,
14378 _: Self::Constraint,
14379 ) -> Result<(), ::fidl_next::ValidationError> {
14380 Ok(())
14381 }
14382 }
14383
14384 unsafe impl ::fidl_next::Wire for TableOfEndpoints<'static> {
14385 type Narrowed<'de> = TableOfEndpoints<'de>;
14386
14387 #[inline]
14388 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14389 ::fidl_next::munge! {
14390 let Self {
14391 t,
14392
14393 } = &mut *out_;
14394 }
14395
14396 ::fidl_next::Wire::zero_padding(t);
14397 }
14398 }
14399
14400 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpoints<'de>
14401 where
14402 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14403 ___D: ::fidl_next::Decoder<'de>,
14404 ___D: ::fidl_next::fuchsia::HandleDecoder,
14405 {
14406 fn decode(
14407 slot_: ::fidl_next::Slot<'_, Self>,
14408 decoder_: &mut ___D,
14409 _: (),
14410 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14411 ::fidl_next::munge! {
14412 let Self {
14413 mut t,
14414
14415 } = slot_;
14416 }
14417
14418 let _field = t.as_mut();
14419
14420 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14421
14422 Ok(())
14423 }
14424 }
14425
14426 impl<'de> ::fidl_next::IntoNatural for TableOfEndpoints<'de> {
14427 type Natural = crate::natural::TableOfEndpoints;
14428 }
14429
14430 #[repr(C)]
14432 pub struct TableUnionWithVectorReservedSandwich<'de> {
14433 pub(crate) table: ::fidl_next::wire::Table<'de>,
14434 }
14435
14436 impl<'de> Drop for TableUnionWithVectorReservedSandwich<'de> {
14437 fn drop(&mut self) {
14438 let _ = self.table.get(2).map(|envelope| unsafe {
14439 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
14440 });
14441 }
14442 }
14443
14444 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwich<'_> {
14445 type Constraint = ();
14446
14447 fn validate(
14448 _: ::fidl_next::Slot<'_, Self>,
14449 _: Self::Constraint,
14450 ) -> Result<(), ::fidl_next::ValidationError> {
14451 Ok(())
14452 }
14453 }
14454
14455 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwich<'static> {
14456 type Narrowed<'de> = TableUnionWithVectorReservedSandwich<'de>;
14457
14458 #[inline]
14459 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14460 ::fidl_next::munge!(let Self { table } = out);
14461 ::fidl_next::wire::Table::zero_padding(table);
14462 }
14463 }
14464
14465 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwich<'de>
14466 where
14467 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14468 ___D: ::fidl_next::fuchsia::HandleDecoder,
14469 {
14470 fn decode(
14471 slot: ::fidl_next::Slot<'_, Self>,
14472 decoder: &mut ___D,
14473 _: (),
14474 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14475 ::fidl_next::munge!(let Self { table } = slot);
14476
14477 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14478 match ordinal {
14479 0 => unsafe { ::core::hint::unreachable_unchecked() },
14480
14481 2 => {
14482 ::fidl_next::wire::Envelope::decode_as::<
14483 ___D,
14484 crate::wire::UnionWithVector<'de>,
14485 >(slot.as_mut(), decoder, ())?;
14486
14487 Ok(())
14488 }
14489
14490 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14491 }
14492 })
14493 }
14494 }
14495
14496 impl<'de> TableUnionWithVectorReservedSandwich<'de> {
14497 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
14498 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14499 }
14500
14501 pub fn take_uv(&mut self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
14502 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14503 }
14504 }
14505
14506 impl<'de> ::core::fmt::Debug for TableUnionWithVectorReservedSandwich<'de> {
14507 fn fmt(
14508 &self,
14509 f: &mut ::core::fmt::Formatter<'_>,
14510 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14511 f.debug_struct("TableUnionWithVectorReservedSandwich").field("uv", &self.uv()).finish()
14512 }
14513 }
14514
14515 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwich<'de> {
14516 type Natural = crate::natural::TableUnionWithVectorReservedSandwich;
14517 }
14518
14519 #[derive(Debug)]
14521 #[repr(C)]
14522 pub struct TableUnionWithVectorReservedSandwichStruct<'de> {
14523 pub table: crate::wire::TableUnionWithVectorReservedSandwich<'de>,
14524 }
14525
14526 static_assertions::const_assert_eq!(
14527 std::mem::size_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
14528 16
14529 );
14530 static_assertions::const_assert_eq!(
14531 std::mem::align_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
14532 8
14533 );
14534
14535 static_assertions::const_assert_eq!(
14536 std::mem::offset_of!(TableUnionWithVectorReservedSandwichStruct<'_>, table),
14537 0
14538 );
14539
14540 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwichStruct<'_> {
14541 type Constraint = ();
14542
14543 fn validate(
14544 _: ::fidl_next::Slot<'_, Self>,
14545 _: Self::Constraint,
14546 ) -> Result<(), ::fidl_next::ValidationError> {
14547 Ok(())
14548 }
14549 }
14550
14551 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwichStruct<'static> {
14552 type Narrowed<'de> = TableUnionWithVectorReservedSandwichStruct<'de>;
14553
14554 #[inline]
14555 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14556 ::fidl_next::munge! {
14557 let Self {
14558 table,
14559
14560 } = &mut *out_;
14561 }
14562
14563 ::fidl_next::Wire::zero_padding(table);
14564 }
14565 }
14566
14567 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwichStruct<'de>
14568 where
14569 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14570 ___D: ::fidl_next::Decoder<'de>,
14571 ___D: ::fidl_next::fuchsia::HandleDecoder,
14572 {
14573 fn decode(
14574 slot_: ::fidl_next::Slot<'_, Self>,
14575 decoder_: &mut ___D,
14576 _: (),
14577 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14578 ::fidl_next::munge! {
14579 let Self {
14580 mut table,
14581
14582 } = slot_;
14583 }
14584
14585 let _field = table.as_mut();
14586
14587 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14588
14589 Ok(())
14590 }
14591 }
14592
14593 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwichStruct<'de> {
14594 type Natural = crate::natural::TableUnionWithVectorReservedSandwichStruct;
14595 }
14596
14597 #[repr(C)]
14599 pub struct TableUnionWithVectorStructSandwich<'de> {
14600 pub(crate) table: ::fidl_next::wire::Table<'de>,
14601 }
14602
14603 impl<'de> Drop for TableUnionWithVectorStructSandwich<'de> {
14604 fn drop(&mut self) {
14605 let _ = self.table.get(1).map(|envelope| unsafe {
14606 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14607 });
14608
14609 let _ = self.table.get(2).map(|envelope| unsafe {
14610 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
14611 });
14612
14613 let _ = self.table.get(3).map(|envelope| unsafe {
14614 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14615 });
14616 }
14617 }
14618
14619 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwich<'_> {
14620 type Constraint = ();
14621
14622 fn validate(
14623 _: ::fidl_next::Slot<'_, Self>,
14624 _: Self::Constraint,
14625 ) -> Result<(), ::fidl_next::ValidationError> {
14626 Ok(())
14627 }
14628 }
14629
14630 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwich<'static> {
14631 type Narrowed<'de> = TableUnionWithVectorStructSandwich<'de>;
14632
14633 #[inline]
14634 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14635 ::fidl_next::munge!(let Self { table } = out);
14636 ::fidl_next::wire::Table::zero_padding(table);
14637 }
14638 }
14639
14640 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwich<'de>
14641 where
14642 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14643 ___D: ::fidl_next::fuchsia::HandleDecoder,
14644 {
14645 fn decode(
14646 slot: ::fidl_next::Slot<'_, Self>,
14647 decoder: &mut ___D,
14648 _: (),
14649 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14650 ::fidl_next::munge!(let Self { table } = slot);
14651
14652 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14653 match ordinal {
14654 0 => unsafe { ::core::hint::unreachable_unchecked() },
14655
14656 1 => {
14657 ::fidl_next::wire::Envelope::decode_as::<
14658 ___D,
14659 crate::wire::StructSize3Align1,
14660 >(slot.as_mut(), decoder, ())?;
14661
14662 Ok(())
14663 }
14664
14665 2 => {
14666 ::fidl_next::wire::Envelope::decode_as::<
14667 ___D,
14668 crate::wire::UnionWithVector<'de>,
14669 >(slot.as_mut(), decoder, ())?;
14670
14671 Ok(())
14672 }
14673
14674 3 => {
14675 ::fidl_next::wire::Envelope::decode_as::<
14676 ___D,
14677 crate::wire::StructSize3Align1,
14678 >(slot.as_mut(), decoder, ())?;
14679
14680 Ok(())
14681 }
14682
14683 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14684 }
14685 })
14686 }
14687 }
14688
14689 impl<'de> TableUnionWithVectorStructSandwich<'de> {
14690 pub fn s1(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14691 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14692 }
14693
14694 pub fn take_s1(&mut self) -> ::core::option::Option<crate::wire::StructSize3Align1> {
14695 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14696 }
14697
14698 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
14699 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14700 }
14701
14702 pub fn take_uv(&mut self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
14703 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14704 }
14705
14706 pub fn s2(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14707 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
14708 }
14709
14710 pub fn take_s2(&mut self) -> ::core::option::Option<crate::wire::StructSize3Align1> {
14711 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
14712 }
14713 }
14714
14715 impl<'de> ::core::fmt::Debug for TableUnionWithVectorStructSandwich<'de> {
14716 fn fmt(
14717 &self,
14718 f: &mut ::core::fmt::Formatter<'_>,
14719 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14720 f.debug_struct("TableUnionWithVectorStructSandwich")
14721 .field("s1", &self.s1())
14722 .field("uv", &self.uv())
14723 .field("s2", &self.s2())
14724 .finish()
14725 }
14726 }
14727
14728 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwich<'de> {
14729 type Natural = crate::natural::TableUnionWithVectorStructSandwich;
14730 }
14731
14732 #[derive(Debug)]
14734 #[repr(C)]
14735 pub struct TableUnionWithVectorStructSandwichStruct<'de> {
14736 pub table: crate::wire::TableUnionWithVectorStructSandwich<'de>,
14737 }
14738
14739 static_assertions::const_assert_eq!(
14740 std::mem::size_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14741 16
14742 );
14743 static_assertions::const_assert_eq!(
14744 std::mem::align_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14745 8
14746 );
14747
14748 static_assertions::const_assert_eq!(
14749 std::mem::offset_of!(TableUnionWithVectorStructSandwichStruct<'_>, table),
14750 0
14751 );
14752
14753 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwichStruct<'_> {
14754 type Constraint = ();
14755
14756 fn validate(
14757 _: ::fidl_next::Slot<'_, Self>,
14758 _: Self::Constraint,
14759 ) -> Result<(), ::fidl_next::ValidationError> {
14760 Ok(())
14761 }
14762 }
14763
14764 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwichStruct<'static> {
14765 type Narrowed<'de> = TableUnionWithVectorStructSandwichStruct<'de>;
14766
14767 #[inline]
14768 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14769 ::fidl_next::munge! {
14770 let Self {
14771 table,
14772
14773 } = &mut *out_;
14774 }
14775
14776 ::fidl_next::Wire::zero_padding(table);
14777 }
14778 }
14779
14780 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwichStruct<'de>
14781 where
14782 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14783 ___D: ::fidl_next::Decoder<'de>,
14784 ___D: ::fidl_next::fuchsia::HandleDecoder,
14785 {
14786 fn decode(
14787 slot_: ::fidl_next::Slot<'_, Self>,
14788 decoder_: &mut ___D,
14789 _: (),
14790 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14791 ::fidl_next::munge! {
14792 let Self {
14793 mut table,
14794
14795 } = slot_;
14796 }
14797
14798 let _field = table.as_mut();
14799
14800 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14801
14802 Ok(())
14803 }
14804 }
14805
14806 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwichStruct<'de> {
14807 type Natural = crate::natural::TableUnionWithVectorStructSandwichStruct;
14808 }
14809
14810 #[repr(C)]
14812 pub struct TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14813 pub(crate) table: ::fidl_next::wire::Table<'de>,
14814 }
14815
14816 impl<'de> Drop for TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14817 fn drop(&mut self) {
14818 let _ = self.table.get(1).map(|envelope| unsafe {
14819 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
14820 });
14821 }
14822 }
14823
14824 impl ::fidl_next::Constrained for TableWithUnknownEnvelopesAfterKnownEnvelopes<'_> {
14825 type Constraint = ();
14826
14827 fn validate(
14828 _: ::fidl_next::Slot<'_, Self>,
14829 _: Self::Constraint,
14830 ) -> Result<(), ::fidl_next::ValidationError> {
14831 Ok(())
14832 }
14833 }
14834
14835 unsafe impl ::fidl_next::Wire for TableWithUnknownEnvelopesAfterKnownEnvelopes<'static> {
14836 type Narrowed<'de> = TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>;
14837
14838 #[inline]
14839 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14840 ::fidl_next::munge!(let Self { table } = out);
14841 ::fidl_next::wire::Table::zero_padding(table);
14842 }
14843 }
14844
14845 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
14846 for TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>
14847 where
14848 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14849 ___D: ::fidl_next::fuchsia::HandleDecoder,
14850 {
14851 fn decode(
14852 slot: ::fidl_next::Slot<'_, Self>,
14853 decoder: &mut ___D,
14854 _: (),
14855 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14856 ::fidl_next::munge!(let Self { table } = slot);
14857
14858 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14859 match ordinal {
14860 0 => unsafe { ::core::hint::unreachable_unchecked() },
14861
14862 1 => {
14863 ::fidl_next::wire::Envelope::decode_as::<
14864 ___D,
14865 ::fidl_next::wire::fuchsia::Event,
14866 >(slot.as_mut(), decoder, ())?;
14867
14868 Ok(())
14869 }
14870
14871 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14872 }
14873 })
14874 }
14875 }
14876
14877 impl<'de> TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14878 pub fn a(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
14879 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14880 }
14881
14882 pub fn take_a(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
14883 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14884 }
14885 }
14886
14887 impl<'de> ::core::fmt::Debug for TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14888 fn fmt(
14889 &self,
14890 f: &mut ::core::fmt::Formatter<'_>,
14891 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14892 f.debug_struct("TableWithUnknownEnvelopesAfterKnownEnvelopes")
14893 .field("a", &self.a())
14894 .finish()
14895 }
14896 }
14897
14898 impl<'de> ::fidl_next::IntoNatural for TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14899 type Natural = crate::natural::TableWithUnknownEnvelopesAfterKnownEnvelopes;
14900 }
14901
14902 #[derive(Debug)]
14904 #[repr(C)]
14905 pub struct TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de> {
14906 pub t: crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>,
14907 }
14908
14909 static_assertions::const_assert_eq!(
14910 std::mem::size_of::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'_>>(),
14911 16
14912 );
14913 static_assertions::const_assert_eq!(
14914 std::mem::align_of::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'_>>(),
14915 8
14916 );
14917
14918 static_assertions::const_assert_eq!(
14919 std::mem::offset_of!(TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'_>, t),
14920 0
14921 );
14922
14923 impl ::fidl_next::Constrained for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'_> {
14924 type Constraint = ();
14925
14926 fn validate(
14927 _: ::fidl_next::Slot<'_, Self>,
14928 _: Self::Constraint,
14929 ) -> Result<(), ::fidl_next::ValidationError> {
14930 Ok(())
14931 }
14932 }
14933
14934 unsafe impl ::fidl_next::Wire for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static> {
14935 type Narrowed<'de> = TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de>;
14936
14937 #[inline]
14938 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14939 ::fidl_next::munge! {
14940 let Self {
14941 t,
14942
14943 } = &mut *out_;
14944 }
14945
14946 ::fidl_next::Wire::zero_padding(t);
14947 }
14948 }
14949
14950 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
14951 for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de>
14952 where
14953 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14954 ___D: ::fidl_next::Decoder<'de>,
14955 ___D: ::fidl_next::fuchsia::HandleDecoder,
14956 {
14957 fn decode(
14958 slot_: ::fidl_next::Slot<'_, Self>,
14959 decoder_: &mut ___D,
14960 _: (),
14961 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14962 ::fidl_next::munge! {
14963 let Self {
14964 mut t,
14965
14966 } = slot_;
14967 }
14968
14969 let _field = t.as_mut();
14970
14971 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14972
14973 Ok(())
14974 }
14975 }
14976
14977 impl<'de> ::fidl_next::IntoNatural for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de> {
14978 type Natural = crate::natural::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct;
14979 }
14980
14981 #[repr(C)]
14983 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
14984 pub(crate) table: ::fidl_next::wire::Table<'de>,
14985 }
14986
14987 impl<'de> Drop for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
14988 fn drop(&mut self) {
14989 let _ = self.table.get(2).map(|envelope| unsafe {
14990 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
14991 });
14992 }
14993 }
14994
14995 impl ::fidl_next::Constrained for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'_> {
14996 type Constraint = ();
14997
14998 fn validate(
14999 _: ::fidl_next::Slot<'_, Self>,
15000 _: Self::Constraint,
15001 ) -> Result<(), ::fidl_next::ValidationError> {
15002 Ok(())
15003 }
15004 }
15005
15006 unsafe impl ::fidl_next::Wire for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static> {
15007 type Narrowed<'de> = TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>;
15008
15009 #[inline]
15010 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15011 ::fidl_next::munge!(let Self { table } = out);
15012 ::fidl_next::wire::Table::zero_padding(table);
15013 }
15014 }
15015
15016 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15017 for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>
15018 where
15019 ___D: ::fidl_next::Decoder<'de> + ?Sized,
15020 ___D: ::fidl_next::fuchsia::HandleDecoder,
15021 {
15022 fn decode(
15023 slot: ::fidl_next::Slot<'_, Self>,
15024 decoder: &mut ___D,
15025 _: (),
15026 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15027 ::fidl_next::munge!(let Self { table } = slot);
15028
15029 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15030 match ordinal {
15031 0 => unsafe { ::core::hint::unreachable_unchecked() },
15032
15033 2 => {
15034 ::fidl_next::wire::Envelope::decode_as::<
15035 ___D,
15036 ::fidl_next::wire::fuchsia::Event,
15037 >(slot.as_mut(), decoder, ())?;
15038
15039 Ok(())
15040 }
15041
15042 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15043 }
15044 })
15045 }
15046 }
15047
15048 impl<'de> TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
15049 pub fn b(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
15050 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15051 }
15052
15053 pub fn take_b(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
15054 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
15055 }
15056 }
15057
15058 impl<'de> ::core::fmt::Debug for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
15059 fn fmt(
15060 &self,
15061 f: &mut ::core::fmt::Formatter<'_>,
15062 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15063 f.debug_struct("TableWithUnknownEnvelopesBeforeKnownEnvelopes")
15064 .field("b", &self.b())
15065 .finish()
15066 }
15067 }
15068
15069 impl<'de> ::fidl_next::IntoNatural for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
15070 type Natural = crate::natural::TableWithUnknownEnvelopesBeforeKnownEnvelopes;
15071 }
15072
15073 #[derive(Debug)]
15075 #[repr(C)]
15076 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de> {
15077 pub t: crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>,
15078 }
15079
15080 static_assertions::const_assert_eq!(
15081 std::mem::size_of::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'_>>(),
15082 16
15083 );
15084 static_assertions::const_assert_eq!(
15085 std::mem::align_of::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'_>>(),
15086 8
15087 );
15088
15089 static_assertions::const_assert_eq!(
15090 std::mem::offset_of!(TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'_>, t),
15091 0
15092 );
15093
15094 impl ::fidl_next::Constrained for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'_> {
15095 type Constraint = ();
15096
15097 fn validate(
15098 _: ::fidl_next::Slot<'_, Self>,
15099 _: Self::Constraint,
15100 ) -> Result<(), ::fidl_next::ValidationError> {
15101 Ok(())
15102 }
15103 }
15104
15105 unsafe impl ::fidl_next::Wire for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static> {
15106 type Narrowed<'de> = TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de>;
15107
15108 #[inline]
15109 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15110 ::fidl_next::munge! {
15111 let Self {
15112 t,
15113
15114 } = &mut *out_;
15115 }
15116
15117 ::fidl_next::Wire::zero_padding(t);
15118 }
15119 }
15120
15121 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15122 for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de>
15123 where
15124 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15125 ___D: ::fidl_next::Decoder<'de>,
15126 ___D: ::fidl_next::fuchsia::HandleDecoder,
15127 {
15128 fn decode(
15129 slot_: ::fidl_next::Slot<'_, Self>,
15130 decoder_: &mut ___D,
15131 _: (),
15132 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15133 ::fidl_next::munge! {
15134 let Self {
15135 mut t,
15136
15137 } = slot_;
15138 }
15139
15140 let _field = t.as_mut();
15141
15142 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
15143
15144 Ok(())
15145 }
15146 }
15147
15148 impl<'de> ::fidl_next::IntoNatural for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de> {
15149 type Natural = crate::natural::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct;
15150 }
15151
15152 #[derive(Debug)]
15154 #[repr(C)]
15155 pub struct TestFlexibleResourceXUnionInStruct<'de> {
15156 pub xu: crate::wire::SampleResourceXUnion<'de>,
15157 }
15158
15159 static_assertions::const_assert_eq!(
15160 std::mem::size_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
15161 16
15162 );
15163 static_assertions::const_assert_eq!(
15164 std::mem::align_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
15165 8
15166 );
15167
15168 static_assertions::const_assert_eq!(
15169 std::mem::offset_of!(TestFlexibleResourceXUnionInStruct<'_>, xu),
15170 0
15171 );
15172
15173 impl ::fidl_next::Constrained for TestFlexibleResourceXUnionInStruct<'_> {
15174 type Constraint = ();
15175
15176 fn validate(
15177 _: ::fidl_next::Slot<'_, Self>,
15178 _: Self::Constraint,
15179 ) -> Result<(), ::fidl_next::ValidationError> {
15180 Ok(())
15181 }
15182 }
15183
15184 unsafe impl ::fidl_next::Wire for TestFlexibleResourceXUnionInStruct<'static> {
15185 type Narrowed<'de> = TestFlexibleResourceXUnionInStruct<'de>;
15186
15187 #[inline]
15188 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15189 ::fidl_next::munge! {
15190 let Self {
15191 xu,
15192
15193 } = &mut *out_;
15194 }
15195
15196 ::fidl_next::Wire::zero_padding(xu);
15197 }
15198 }
15199
15200 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestFlexibleResourceXUnionInStruct<'de>
15201 where
15202 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15203 ___D: ::fidl_next::Decoder<'de>,
15204 ___D: ::fidl_next::fuchsia::HandleDecoder,
15205 {
15206 fn decode(
15207 slot_: ::fidl_next::Slot<'_, Self>,
15208 decoder_: &mut ___D,
15209 _: (),
15210 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15211 ::fidl_next::munge! {
15212 let Self {
15213 mut xu,
15214
15215 } = slot_;
15216 }
15217
15218 let _field = xu.as_mut();
15219
15220 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
15221
15222 Ok(())
15223 }
15224 }
15225
15226 impl<'de> ::fidl_next::IntoNatural for TestFlexibleResourceXUnionInStruct<'de> {
15227 type Natural = crate::natural::TestFlexibleResourceXUnionInStruct;
15228 }
15229
15230 #[derive(Debug)]
15232 #[repr(C)]
15233 pub struct TestOptionalFlexibleResourceXUnionInStruct<'de> {
15234 pub xu: crate::wire_optional::SampleResourceXUnion<'de>,
15235 }
15236
15237 static_assertions::const_assert_eq!(
15238 std::mem::size_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
15239 16
15240 );
15241 static_assertions::const_assert_eq!(
15242 std::mem::align_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
15243 8
15244 );
15245
15246 static_assertions::const_assert_eq!(
15247 std::mem::offset_of!(TestOptionalFlexibleResourceXUnionInStruct<'_>, xu),
15248 0
15249 );
15250
15251 impl ::fidl_next::Constrained for TestOptionalFlexibleResourceXUnionInStruct<'_> {
15252 type Constraint = ();
15253
15254 fn validate(
15255 _: ::fidl_next::Slot<'_, Self>,
15256 _: Self::Constraint,
15257 ) -> Result<(), ::fidl_next::ValidationError> {
15258 Ok(())
15259 }
15260 }
15261
15262 unsafe impl ::fidl_next::Wire for TestOptionalFlexibleResourceXUnionInStruct<'static> {
15263 type Narrowed<'de> = TestOptionalFlexibleResourceXUnionInStruct<'de>;
15264
15265 #[inline]
15266 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15267 ::fidl_next::munge! {
15268 let Self {
15269 xu,
15270
15271 } = &mut *out_;
15272 }
15273
15274 ::fidl_next::Wire::zero_padding(xu);
15275 }
15276 }
15277
15278 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalFlexibleResourceXUnionInStruct<'de>
15279 where
15280 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15281 ___D: ::fidl_next::Decoder<'de>,
15282 ___D: ::fidl_next::fuchsia::HandleDecoder,
15283 {
15284 fn decode(
15285 slot_: ::fidl_next::Slot<'_, Self>,
15286 decoder_: &mut ___D,
15287 _: (),
15288 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15289 ::fidl_next::munge! {
15290 let Self {
15291 mut xu,
15292
15293 } = slot_;
15294 }
15295
15296 let _field = xu.as_mut();
15297
15298 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
15299
15300 Ok(())
15301 }
15302 }
15303
15304 impl<'de> ::fidl_next::IntoNatural for TestOptionalFlexibleResourceXUnionInStruct<'de> {
15305 type Natural = crate::natural::TestOptionalFlexibleResourceXUnionInStruct;
15306 }
15307
15308 #[derive(Debug)]
15310 #[repr(C)]
15311 pub struct TestOptionalStrictResourceXUnionInStruct<'de> {
15312 pub xu: crate::wire_optional::SampleStrictResourceXUnion<'de>,
15313 }
15314
15315 static_assertions::const_assert_eq!(
15316 std::mem::size_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
15317 16
15318 );
15319 static_assertions::const_assert_eq!(
15320 std::mem::align_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
15321 8
15322 );
15323
15324 static_assertions::const_assert_eq!(
15325 std::mem::offset_of!(TestOptionalStrictResourceXUnionInStruct<'_>, xu),
15326 0
15327 );
15328
15329 impl ::fidl_next::Constrained for TestOptionalStrictResourceXUnionInStruct<'_> {
15330 type Constraint = ();
15331
15332 fn validate(
15333 _: ::fidl_next::Slot<'_, Self>,
15334 _: Self::Constraint,
15335 ) -> Result<(), ::fidl_next::ValidationError> {
15336 Ok(())
15337 }
15338 }
15339
15340 unsafe impl ::fidl_next::Wire for TestOptionalStrictResourceXUnionInStruct<'static> {
15341 type Narrowed<'de> = TestOptionalStrictResourceXUnionInStruct<'de>;
15342
15343 #[inline]
15344 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15345 ::fidl_next::munge! {
15346 let Self {
15347 xu,
15348
15349 } = &mut *out_;
15350 }
15351
15352 ::fidl_next::Wire::zero_padding(xu);
15353 }
15354 }
15355
15356 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalStrictResourceXUnionInStruct<'de>
15357 where
15358 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15359 ___D: ::fidl_next::Decoder<'de>,
15360 ___D: ::fidl_next::fuchsia::HandleDecoder,
15361 {
15362 fn decode(
15363 slot_: ::fidl_next::Slot<'_, Self>,
15364 decoder_: &mut ___D,
15365 _: (),
15366 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15367 ::fidl_next::munge! {
15368 let Self {
15369 mut xu,
15370
15371 } = slot_;
15372 }
15373
15374 let _field = xu.as_mut();
15375
15376 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
15377
15378 Ok(())
15379 }
15380 }
15381
15382 impl<'de> ::fidl_next::IntoNatural for TestOptionalStrictResourceXUnionInStruct<'de> {
15383 type Natural = crate::natural::TestOptionalStrictResourceXUnionInStruct;
15384 }
15385
15386 #[derive(Debug)]
15388 #[repr(C)]
15389 pub struct TestPackageResolverResolveRequest<'de> {
15390 pub package_url: ::fidl_next::wire::String<'de>,
15391
15392 pub selectors: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
15393
15394 pub update_policy: crate::wire::UpdatePolicy,
15395
15396 pub this_should_be_a_handle: ::fidl_next::wire::Uint32,
15397 }
15398
15399 static_assertions::const_assert_eq!(
15400 std::mem::size_of::<TestPackageResolverResolveRequest<'_>>(),
15401 40
15402 );
15403 static_assertions::const_assert_eq!(
15404 std::mem::align_of::<TestPackageResolverResolveRequest<'_>>(),
15405 8
15406 );
15407
15408 static_assertions::const_assert_eq!(
15409 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, package_url),
15410 0
15411 );
15412
15413 static_assertions::const_assert_eq!(
15414 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, selectors),
15415 16
15416 );
15417
15418 static_assertions::const_assert_eq!(
15419 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, update_policy),
15420 32
15421 );
15422
15423 static_assertions::const_assert_eq!(
15424 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, this_should_be_a_handle),
15425 36
15426 );
15427
15428 impl ::fidl_next::Constrained for TestPackageResolverResolveRequest<'_> {
15429 type Constraint = ();
15430
15431 fn validate(
15432 _: ::fidl_next::Slot<'_, Self>,
15433 _: Self::Constraint,
15434 ) -> Result<(), ::fidl_next::ValidationError> {
15435 Ok(())
15436 }
15437 }
15438
15439 unsafe impl ::fidl_next::Wire for TestPackageResolverResolveRequest<'static> {
15440 type Narrowed<'de> = TestPackageResolverResolveRequest<'de>;
15441
15442 #[inline]
15443 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15444 ::fidl_next::munge! {
15445 let Self {
15446 package_url,
15447 selectors,
15448 update_policy,
15449 this_should_be_a_handle,
15450
15451 } = &mut *out_;
15452 }
15453
15454 ::fidl_next::Wire::zero_padding(package_url);
15455
15456 ::fidl_next::Wire::zero_padding(selectors);
15457
15458 ::fidl_next::Wire::zero_padding(update_policy);
15459
15460 ::fidl_next::Wire::zero_padding(this_should_be_a_handle);
15461
15462 unsafe {
15463 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 2);
15464 }
15465 }
15466 }
15467
15468 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestPackageResolverResolveRequest<'de>
15469 where
15470 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15471 ___D: ::fidl_next::Decoder<'de>,
15472 ___D: ::fidl_next::fuchsia::HandleDecoder,
15473 {
15474 fn decode(
15475 slot_: ::fidl_next::Slot<'_, Self>,
15476 decoder_: &mut ___D,
15477 _: (),
15478 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15479 if slot_.as_bytes()[34..36] != [0u8; 2] {
15480 return Err(::fidl_next::DecodeError::InvalidPadding);
15481 }
15482
15483 ::fidl_next::munge! {
15484 let Self {
15485 mut package_url,
15486 mut selectors,
15487 mut update_policy,
15488 mut this_should_be_a_handle,
15489
15490 } = slot_;
15491 }
15492
15493 let _field = package_url.as_mut();
15494 ::fidl_next::Constrained::validate(_field, 4294967295)?;
15495 ::fidl_next::Decode::decode(package_url.as_mut(), decoder_, 4294967295)?;
15496
15497 let _field = selectors.as_mut();
15498 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
15499 ::fidl_next::Decode::decode(selectors.as_mut(), decoder_, (4294967295, 4294967295))?;
15500
15501 let _field = update_policy.as_mut();
15502
15503 ::fidl_next::Decode::decode(update_policy.as_mut(), decoder_, ())?;
15504
15505 let _field = this_should_be_a_handle.as_mut();
15506
15507 ::fidl_next::Decode::decode(this_should_be_a_handle.as_mut(), decoder_, ())?;
15508
15509 Ok(())
15510 }
15511 }
15512
15513 impl<'de> ::fidl_next::IntoNatural for TestPackageResolverResolveRequest<'de> {
15514 type Natural = crate::natural::TestPackageResolverResolveRequest;
15515 }
15516
15517 #[derive(Debug)]
15519 #[repr(C)]
15520 pub struct TestStrictResourceXUnionInStruct<'de> {
15521 pub xu: crate::wire::SampleStrictResourceXUnion<'de>,
15522 }
15523
15524 static_assertions::const_assert_eq!(
15525 std::mem::size_of::<TestStrictResourceXUnionInStruct<'_>>(),
15526 16
15527 );
15528 static_assertions::const_assert_eq!(
15529 std::mem::align_of::<TestStrictResourceXUnionInStruct<'_>>(),
15530 8
15531 );
15532
15533 static_assertions::const_assert_eq!(
15534 std::mem::offset_of!(TestStrictResourceXUnionInStruct<'_>, xu),
15535 0
15536 );
15537
15538 impl ::fidl_next::Constrained for TestStrictResourceXUnionInStruct<'_> {
15539 type Constraint = ();
15540
15541 fn validate(
15542 _: ::fidl_next::Slot<'_, Self>,
15543 _: Self::Constraint,
15544 ) -> Result<(), ::fidl_next::ValidationError> {
15545 Ok(())
15546 }
15547 }
15548
15549 unsafe impl ::fidl_next::Wire for TestStrictResourceXUnionInStruct<'static> {
15550 type Narrowed<'de> = TestStrictResourceXUnionInStruct<'de>;
15551
15552 #[inline]
15553 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15554 ::fidl_next::munge! {
15555 let Self {
15556 xu,
15557
15558 } = &mut *out_;
15559 }
15560
15561 ::fidl_next::Wire::zero_padding(xu);
15562 }
15563 }
15564
15565 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestStrictResourceXUnionInStruct<'de>
15566 where
15567 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15568 ___D: ::fidl_next::Decoder<'de>,
15569 ___D: ::fidl_next::fuchsia::HandleDecoder,
15570 {
15571 fn decode(
15572 slot_: ::fidl_next::Slot<'_, Self>,
15573 decoder_: &mut ___D,
15574 _: (),
15575 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15576 ::fidl_next::munge! {
15577 let Self {
15578 mut xu,
15579
15580 } = slot_;
15581 }
15582
15583 let _field = xu.as_mut();
15584
15585 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
15586
15587 Ok(())
15588 }
15589 }
15590
15591 impl<'de> ::fidl_next::IntoNatural for TestStrictResourceXUnionInStruct<'de> {
15592 type Natural = crate::natural::TestStrictResourceXUnionInStruct;
15593 }
15594
15595 #[derive(Debug)]
15597 #[repr(C)]
15598 pub struct UnboundedNonnullableVectorOfHandles<'de> {
15599 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15600 }
15601
15602 static_assertions::const_assert_eq!(
15603 std::mem::size_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
15604 16
15605 );
15606 static_assertions::const_assert_eq!(
15607 std::mem::align_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
15608 8
15609 );
15610
15611 static_assertions::const_assert_eq!(
15612 std::mem::offset_of!(UnboundedNonnullableVectorOfHandles<'_>, vh0),
15613 0
15614 );
15615
15616 impl ::fidl_next::Constrained for UnboundedNonnullableVectorOfHandles<'_> {
15617 type Constraint = ();
15618
15619 fn validate(
15620 _: ::fidl_next::Slot<'_, Self>,
15621 _: Self::Constraint,
15622 ) -> Result<(), ::fidl_next::ValidationError> {
15623 Ok(())
15624 }
15625 }
15626
15627 unsafe impl ::fidl_next::Wire for UnboundedNonnullableVectorOfHandles<'static> {
15628 type Narrowed<'de> = UnboundedNonnullableVectorOfHandles<'de>;
15629
15630 #[inline]
15631 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15632 ::fidl_next::munge! {
15633 let Self {
15634 vh0,
15635
15636 } = &mut *out_;
15637 }
15638
15639 ::fidl_next::Wire::zero_padding(vh0);
15640 }
15641 }
15642
15643 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNonnullableVectorOfHandles<'de>
15644 where
15645 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15646 ___D: ::fidl_next::Decoder<'de>,
15647 ___D: ::fidl_next::fuchsia::HandleDecoder,
15648 {
15649 fn decode(
15650 slot_: ::fidl_next::Slot<'_, Self>,
15651 decoder_: &mut ___D,
15652 _: (),
15653 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15654 ::fidl_next::munge! {
15655 let Self {
15656 mut vh0,
15657
15658 } = slot_;
15659 }
15660
15661 let _field = vh0.as_mut();
15662 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15663 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
15664
15665 Ok(())
15666 }
15667 }
15668
15669 impl<'de> ::fidl_next::IntoNatural for UnboundedNonnullableVectorOfHandles<'de> {
15670 type Natural = crate::natural::UnboundedNonnullableVectorOfHandles;
15671 }
15672
15673 #[derive(Debug)]
15675 #[repr(C)]
15676 pub struct UnboundedNullableVectorOfHandles<'de> {
15677 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15678 }
15679
15680 static_assertions::const_assert_eq!(
15681 std::mem::size_of::<UnboundedNullableVectorOfHandles<'_>>(),
15682 16
15683 );
15684 static_assertions::const_assert_eq!(
15685 std::mem::align_of::<UnboundedNullableVectorOfHandles<'_>>(),
15686 8
15687 );
15688
15689 static_assertions::const_assert_eq!(
15690 std::mem::offset_of!(UnboundedNullableVectorOfHandles<'_>, vh0),
15691 0
15692 );
15693
15694 impl ::fidl_next::Constrained for UnboundedNullableVectorOfHandles<'_> {
15695 type Constraint = ();
15696
15697 fn validate(
15698 _: ::fidl_next::Slot<'_, Self>,
15699 _: Self::Constraint,
15700 ) -> Result<(), ::fidl_next::ValidationError> {
15701 Ok(())
15702 }
15703 }
15704
15705 unsafe impl ::fidl_next::Wire for UnboundedNullableVectorOfHandles<'static> {
15706 type Narrowed<'de> = UnboundedNullableVectorOfHandles<'de>;
15707
15708 #[inline]
15709 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15710 ::fidl_next::munge! {
15711 let Self {
15712 vh0,
15713
15714 } = &mut *out_;
15715 }
15716
15717 ::fidl_next::Wire::zero_padding(vh0);
15718 }
15719 }
15720
15721 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNullableVectorOfHandles<'de>
15722 where
15723 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15724 ___D: ::fidl_next::Decoder<'de>,
15725 ___D: ::fidl_next::fuchsia::HandleDecoder,
15726 {
15727 fn decode(
15728 slot_: ::fidl_next::Slot<'_, Self>,
15729 decoder_: &mut ___D,
15730 _: (),
15731 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15732 ::fidl_next::munge! {
15733 let Self {
15734 mut vh0,
15735
15736 } = slot_;
15737 }
15738
15739 let _field = vh0.as_mut();
15740 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15741 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
15742
15743 Ok(())
15744 }
15745 }
15746
15747 impl<'de> ::fidl_next::IntoNatural for UnboundedNullableVectorOfHandles<'de> {
15748 type Natural = crate::natural::UnboundedNullableVectorOfHandles;
15749 }
15750
15751 #[repr(transparent)]
15753 pub struct UnionOfEndpointsUnion<'de> {
15754 pub(crate) raw: ::fidl_next::wire::Union,
15755 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15756 }
15757
15758 impl<'de> Drop for UnionOfEndpointsUnion<'de> {
15759 fn drop(&mut self) {
15760 match self.raw.ordinal() {
15761 1 => {
15762 let _ = unsafe {
15763 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
15764 crate::Protocol,
15765 ::fidl_next::wire::fuchsia::Channel,
15766 >>()
15767 };
15768 }
15769
15770 2 => {
15771 let _ = unsafe {
15772 self.raw.get().read_unchecked::<::fidl_next::ServerEnd<
15773 crate::Protocol,
15774 ::fidl_next::wire::fuchsia::Channel,
15775 >>()
15776 };
15777 }
15778
15779 _ => (),
15780 }
15781 }
15782 }
15783
15784 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
15785 type Constraint = ();
15786
15787 fn validate(
15788 _: ::fidl_next::Slot<'_, Self>,
15789 _: Self::Constraint,
15790 ) -> Result<(), ::fidl_next::ValidationError> {
15791 Ok(())
15792 }
15793 }
15794
15795 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
15796 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
15797
15798 #[inline]
15799 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15800 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15801 ::fidl_next::wire::Union::zero_padding(raw);
15802 }
15803 }
15804
15805 pub mod union_of_endpoints_union {
15806 pub enum Ref<'de> {
15807 ClientEnd(
15808 &'de ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15809 ),
15810
15811 ServerEnd(
15812 &'de ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15813 ),
15814
15815 UnknownOrdinal_(u64),
15816 }
15817
15818 pub enum Value {
15819 ClientEnd(::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>),
15820
15821 ServerEnd(::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>),
15822
15823 UnknownOrdinal_(u64),
15824 }
15825 }
15826
15827 impl<'de> UnionOfEndpointsUnion<'de> {
15828 pub fn as_ref(&self) -> crate::wire::union_of_endpoints_union::Ref<'_> {
15829 match self.raw.ordinal() {
15830 1 => crate::wire::union_of_endpoints_union::Ref::ClientEnd(unsafe {
15831 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15832 }),
15833
15834 2 => crate::wire::union_of_endpoints_union::Ref::ServerEnd(unsafe {
15835 self.raw.get().deref_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15836 }),
15837
15838 unknown => crate::wire::union_of_endpoints_union::Ref::UnknownOrdinal_(unknown),
15839 }
15840 }
15841
15842 pub fn into_inner(self) -> crate::wire::union_of_endpoints_union::Value {
15843 let this = ::core::mem::ManuallyDrop::new(self);
15844
15845 match this.raw.ordinal() {
15846 1 => crate::wire::union_of_endpoints_union::Value::ClientEnd(unsafe {
15847 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15848 }),
15849
15850 2 => crate::wire::union_of_endpoints_union::Value::ServerEnd(unsafe {
15851 this.raw.get().read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15852 }),
15853
15854 unknown => crate::wire::union_of_endpoints_union::Value::UnknownOrdinal_(unknown),
15855 }
15856 }
15857 }
15858
15859 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
15860 where
15861 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15862 ___D: ::fidl_next::Decoder<'de>,
15863 ___D: ::fidl_next::fuchsia::HandleDecoder,
15864 {
15865 fn decode(
15866 mut slot: ::fidl_next::Slot<'_, Self>,
15867 decoder: &mut ___D,
15868 _: (),
15869 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15870 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15871 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15872 1 => ::fidl_next::wire::Union::decode_as::<
15873 ___D,
15874 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15875 >(raw, decoder, ())?,
15876
15877 2 => ::fidl_next::wire::Union::decode_as::<
15878 ___D,
15879 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15880 >(raw, decoder, ())?,
15881
15882 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
15883 }
15884
15885 Ok(())
15886 }
15887 }
15888
15889 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
15890 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15891 match self.raw.ordinal() {
15892 1 => unsafe {
15893 self.raw.get().deref_unchecked::<
15894 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
15895 >().fmt(f)
15896 },
15897 2 => unsafe {
15898 self.raw.get().deref_unchecked::<
15899 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
15900 >().fmt(f)
15901 },
15902 _ => unsafe { ::core::hint::unreachable_unchecked() },
15903 }
15904 }
15905 }
15906
15907 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
15908 type Natural = crate::natural::UnionOfEndpointsUnion;
15909 }
15910
15911 #[derive(Debug)]
15913 #[repr(C)]
15914 pub struct UnionOfEndpoints<'de> {
15915 pub u: crate::wire::UnionOfEndpointsUnion<'de>,
15916 }
15917
15918 static_assertions::const_assert_eq!(std::mem::size_of::<UnionOfEndpoints<'_>>(), 16);
15919 static_assertions::const_assert_eq!(std::mem::align_of::<UnionOfEndpoints<'_>>(), 8);
15920
15921 static_assertions::const_assert_eq!(std::mem::offset_of!(UnionOfEndpoints<'_>, u), 0);
15922
15923 impl ::fidl_next::Constrained for UnionOfEndpoints<'_> {
15924 type Constraint = ();
15925
15926 fn validate(
15927 _: ::fidl_next::Slot<'_, Self>,
15928 _: Self::Constraint,
15929 ) -> Result<(), ::fidl_next::ValidationError> {
15930 Ok(())
15931 }
15932 }
15933
15934 unsafe impl ::fidl_next::Wire for UnionOfEndpoints<'static> {
15935 type Narrowed<'de> = UnionOfEndpoints<'de>;
15936
15937 #[inline]
15938 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15939 ::fidl_next::munge! {
15940 let Self {
15941 u,
15942
15943 } = &mut *out_;
15944 }
15945
15946 ::fidl_next::Wire::zero_padding(u);
15947 }
15948 }
15949
15950 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpoints<'de>
15951 where
15952 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15953 ___D: ::fidl_next::Decoder<'de>,
15954 ___D: ::fidl_next::fuchsia::HandleDecoder,
15955 {
15956 fn decode(
15957 slot_: ::fidl_next::Slot<'_, Self>,
15958 decoder_: &mut ___D,
15959 _: (),
15960 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15961 ::fidl_next::munge! {
15962 let Self {
15963 mut u,
15964
15965 } = slot_;
15966 }
15967
15968 let _field = u.as_mut();
15969
15970 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
15971
15972 Ok(())
15973 }
15974 }
15975
15976 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpoints<'de> {
15977 type Natural = crate::natural::UnionOfEndpoints;
15978 }
15979
15980 #[repr(transparent)]
15982 pub struct UnionOfHandle {
15983 pub(crate) raw: ::fidl_next::wire::Union,
15984 pub(crate) _phantom: ::core::marker::PhantomData<()>,
15985 }
15986
15987 impl Drop for UnionOfHandle {
15988 fn drop(&mut self) {
15989 match self.raw.ordinal() {
15990 1 => {
15991 let _ = unsafe {
15992 self.raw
15993 .get()
15994 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15995 };
15996 }
15997
15998 _ => unsafe { ::core::hint::unreachable_unchecked() },
15999 }
16000 }
16001 }
16002
16003 impl ::fidl_next::Constrained for UnionOfHandle {
16004 type Constraint = ();
16005
16006 fn validate(
16007 _: ::fidl_next::Slot<'_, Self>,
16008 _: Self::Constraint,
16009 ) -> Result<(), ::fidl_next::ValidationError> {
16010 Ok(())
16011 }
16012 }
16013
16014 unsafe impl ::fidl_next::Wire for UnionOfHandle {
16015 type Narrowed<'de> = UnionOfHandle;
16016
16017 #[inline]
16018 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16019 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16020 ::fidl_next::wire::Union::zero_padding(raw);
16021 }
16022 }
16023
16024 pub mod union_of_handle {
16025 pub enum Ref<'de> {
16026 H(&'de ::fidl_next::wire::fuchsia::NullableHandle),
16027 }
16028
16029 pub enum Value {
16030 H(::fidl_next::wire::fuchsia::NullableHandle),
16031 }
16032 }
16033
16034 impl UnionOfHandle {
16035 pub fn as_ref(&self) -> crate::wire::union_of_handle::Ref<'_> {
16036 match self.raw.ordinal() {
16037 1 => crate::wire::union_of_handle::Ref::H(unsafe {
16038 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
16039 }),
16040
16041 _ => unsafe { ::core::hint::unreachable_unchecked() },
16042 }
16043 }
16044
16045 pub fn into_inner(self) -> crate::wire::union_of_handle::Value {
16046 let this = ::core::mem::ManuallyDrop::new(self);
16047
16048 match this.raw.ordinal() {
16049 1 => crate::wire::union_of_handle::Value::H(unsafe {
16050 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
16051 }),
16052
16053 _ => unsafe { ::core::hint::unreachable_unchecked() },
16054 }
16055 }
16056 }
16057
16058 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
16059 where
16060 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16061 ___D: ::fidl_next::fuchsia::HandleDecoder,
16062 {
16063 fn decode(
16064 mut slot: ::fidl_next::Slot<'_, Self>,
16065 decoder: &mut ___D,
16066 _: (),
16067 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16068 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16069 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16070 1 => ::fidl_next::wire::Union::decode_as_static::<
16071 ___D,
16072 ::fidl_next::wire::fuchsia::NullableHandle,
16073 >(raw, decoder, ())?,
16074
16075 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
16076 }
16077
16078 Ok(())
16079 }
16080 }
16081
16082 impl ::core::fmt::Debug for UnionOfHandle {
16083 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16084 match self.raw.ordinal() {
16085 1 => unsafe {
16086 self.raw
16087 .get()
16088 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
16089 .fmt(f)
16090 },
16091 _ => unsafe { ::core::hint::unreachable_unchecked() },
16092 }
16093 }
16094 }
16095
16096 impl ::fidl_next::IntoNatural for UnionOfHandle {
16097 type Natural = crate::natural::UnionOfHandle;
16098 }
16099
16100 #[derive(Debug)]
16102 #[repr(C)]
16103 pub struct VectorOfArrayOfEventInStructWithDefaultRights<'de> {
16104 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16105 }
16106
16107 static_assertions::const_assert_eq!(
16108 std::mem::size_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
16109 16
16110 );
16111 static_assertions::const_assert_eq!(
16112 std::mem::align_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
16113 8
16114 );
16115
16116 static_assertions::const_assert_eq!(
16117 std::mem::offset_of!(VectorOfArrayOfEventInStructWithDefaultRights<'_>, h),
16118 0
16119 );
16120
16121 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithDefaultRights<'_> {
16122 type Constraint = ();
16123
16124 fn validate(
16125 _: ::fidl_next::Slot<'_, Self>,
16126 _: Self::Constraint,
16127 ) -> Result<(), ::fidl_next::ValidationError> {
16128 Ok(())
16129 }
16130 }
16131
16132 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithDefaultRights<'static> {
16133 type Narrowed<'de> = VectorOfArrayOfEventInStructWithDefaultRights<'de>;
16134
16135 #[inline]
16136 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16137 ::fidl_next::munge! {
16138 let Self {
16139 h,
16140
16141 } = &mut *out_;
16142 }
16143
16144 ::fidl_next::Wire::zero_padding(h);
16145 }
16146 }
16147
16148 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16149 for VectorOfArrayOfEventInStructWithDefaultRights<'de>
16150 where
16151 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16152 ___D: ::fidl_next::Decoder<'de>,
16153 ___D: ::fidl_next::fuchsia::HandleDecoder,
16154 {
16155 fn decode(
16156 slot_: ::fidl_next::Slot<'_, Self>,
16157 decoder_: &mut ___D,
16158 _: (),
16159 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16160 ::fidl_next::munge! {
16161 let Self {
16162 mut h,
16163
16164 } = slot_;
16165 }
16166
16167 let _field = h.as_mut();
16168 ::fidl_next::Constrained::validate(_field, (1, ()))?;
16169 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
16170
16171 let h = unsafe { h.deref_unchecked() };
16172
16173 if h.len() > 1 {
16174 return Err(::fidl_next::DecodeError::VectorTooLong {
16175 size: h.len() as u64,
16176 limit: 1,
16177 });
16178 }
16179
16180 Ok(())
16181 }
16182 }
16183
16184 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithDefaultRights<'de> {
16185 type Natural = crate::natural::VectorOfArrayOfEventInStructWithDefaultRights;
16186 }
16187
16188 #[derive(Debug)]
16190 #[repr(C)]
16191 pub struct VectorOfArrayOfEventInStructWithReducedRights<'de> {
16192 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16193 }
16194
16195 static_assertions::const_assert_eq!(
16196 std::mem::size_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
16197 16
16198 );
16199 static_assertions::const_assert_eq!(
16200 std::mem::align_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
16201 8
16202 );
16203
16204 static_assertions::const_assert_eq!(
16205 std::mem::offset_of!(VectorOfArrayOfEventInStructWithReducedRights<'_>, h),
16206 0
16207 );
16208
16209 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithReducedRights<'_> {
16210 type Constraint = ();
16211
16212 fn validate(
16213 _: ::fidl_next::Slot<'_, Self>,
16214 _: Self::Constraint,
16215 ) -> Result<(), ::fidl_next::ValidationError> {
16216 Ok(())
16217 }
16218 }
16219
16220 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithReducedRights<'static> {
16221 type Narrowed<'de> = VectorOfArrayOfEventInStructWithReducedRights<'de>;
16222
16223 #[inline]
16224 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16225 ::fidl_next::munge! {
16226 let Self {
16227 h,
16228
16229 } = &mut *out_;
16230 }
16231
16232 ::fidl_next::Wire::zero_padding(h);
16233 }
16234 }
16235
16236 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16237 for VectorOfArrayOfEventInStructWithReducedRights<'de>
16238 where
16239 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16240 ___D: ::fidl_next::Decoder<'de>,
16241 ___D: ::fidl_next::fuchsia::HandleDecoder,
16242 {
16243 fn decode(
16244 slot_: ::fidl_next::Slot<'_, Self>,
16245 decoder_: &mut ___D,
16246 _: (),
16247 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16248 ::fidl_next::munge! {
16249 let Self {
16250 mut h,
16251
16252 } = slot_;
16253 }
16254
16255 let _field = h.as_mut();
16256 ::fidl_next::Constrained::validate(_field, (1, ()))?;
16257 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
16258
16259 let h = unsafe { h.deref_unchecked() };
16260
16261 if h.len() > 1 {
16262 return Err(::fidl_next::DecodeError::VectorTooLong {
16263 size: h.len() as u64,
16264 limit: 1,
16265 });
16266 }
16267
16268 Ok(())
16269 }
16270 }
16271
16272 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithReducedRights<'de> {
16273 type Natural = crate::natural::VectorOfArrayOfEventInStructWithReducedRights;
16274 }
16275
16276 #[repr(C)]
16278 pub struct VectorOfArrayOfEventInTableWithReducedRights<'de> {
16279 pub(crate) table: ::fidl_next::wire::Table<'de>,
16280 }
16281
16282 impl<'de> Drop for VectorOfArrayOfEventInTableWithReducedRights<'de> {
16283 fn drop(&mut self) {
16284 let _ = self.table.get(1)
16285 .map(|envelope| unsafe {
16286 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
16287 });
16288 }
16289 }
16290
16291 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRights<'_> {
16292 type Constraint = ();
16293
16294 fn validate(
16295 _: ::fidl_next::Slot<'_, Self>,
16296 _: Self::Constraint,
16297 ) -> Result<(), ::fidl_next::ValidationError> {
16298 Ok(())
16299 }
16300 }
16301
16302 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRights<'static> {
16303 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRights<'de>;
16304
16305 #[inline]
16306 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16307 ::fidl_next::munge!(let Self { table } = out);
16308 ::fidl_next::wire::Table::zero_padding(table);
16309 }
16310 }
16311
16312 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16313 for VectorOfArrayOfEventInTableWithReducedRights<'de>
16314 where
16315 ___D: ::fidl_next::Decoder<'de> + ?Sized,
16316 ___D: ::fidl_next::fuchsia::HandleDecoder,
16317 {
16318 fn decode(
16319 slot: ::fidl_next::Slot<'_, Self>,
16320 decoder: &mut ___D,
16321 _: (),
16322 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16323 ::fidl_next::munge!(let Self { table } = slot);
16324
16325 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16326 match ordinal {
16327 0 => unsafe { ::core::hint::unreachable_unchecked() },
16328
16329 1 => {
16330 ::fidl_next::wire::Envelope::decode_as::<
16331 ___D,
16332 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16333 >(slot.as_mut(), decoder, (1, ()))?;
16334
16335 let value = unsafe {
16336 slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
16337 '_,
16338 [::fidl_next::wire::fuchsia::Event; 1],
16339 >>()
16340 };
16341
16342 if value.len() > 1 {
16343 return Err(::fidl_next::DecodeError::VectorTooLong {
16344 size: value.len() as u64,
16345 limit: 1,
16346 });
16347 }
16348
16349 Ok(())
16350 }
16351
16352 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16353 }
16354 })
16355 }
16356 }
16357
16358 impl<'de> VectorOfArrayOfEventInTableWithReducedRights<'de> {
16359 pub fn h(
16360 &self,
16361 ) -> ::core::option::Option<
16362 &::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16363 > {
16364 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16365 }
16366
16367 pub fn take_h(
16368 &mut self,
16369 ) -> ::core::option::Option<
16370 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16371 > {
16372 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16373 }
16374 }
16375
16376 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInTableWithReducedRights<'de> {
16377 fn fmt(
16378 &self,
16379 f: &mut ::core::fmt::Formatter<'_>,
16380 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16381 f.debug_struct("VectorOfArrayOfEventInTableWithReducedRights")
16382 .field("h", &self.h())
16383 .finish()
16384 }
16385 }
16386
16387 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRights<'de> {
16388 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRights;
16389 }
16390
16391 #[derive(Debug)]
16393 #[repr(C)]
16394 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
16395 pub t: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
16396 }
16397
16398 static_assertions::const_assert_eq!(
16399 std::mem::size_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
16400 16
16401 );
16402 static_assertions::const_assert_eq!(
16403 std::mem::align_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
16404 8
16405 );
16406
16407 static_assertions::const_assert_eq!(
16408 std::mem::offset_of!(VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>, t),
16409 0
16410 );
16411
16412 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRightsStruct<'_> {
16413 type Constraint = ();
16414
16415 fn validate(
16416 _: ::fidl_next::Slot<'_, Self>,
16417 _: Self::Constraint,
16418 ) -> Result<(), ::fidl_next::ValidationError> {
16419 Ok(())
16420 }
16421 }
16422
16423 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRightsStruct<'static> {
16424 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>;
16425
16426 #[inline]
16427 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16428 ::fidl_next::munge! {
16429 let Self {
16430 t,
16431
16432 } = &mut *out_;
16433 }
16434
16435 ::fidl_next::Wire::zero_padding(t);
16436 }
16437 }
16438
16439 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16440 for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>
16441 where
16442 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16443 ___D: ::fidl_next::Decoder<'de>,
16444 ___D: ::fidl_next::fuchsia::HandleDecoder,
16445 {
16446 fn decode(
16447 slot_: ::fidl_next::Slot<'_, Self>,
16448 decoder_: &mut ___D,
16449 _: (),
16450 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16451 ::fidl_next::munge! {
16452 let Self {
16453 mut t,
16454
16455 } = slot_;
16456 }
16457
16458 let _field = t.as_mut();
16459
16460 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
16461
16462 Ok(())
16463 }
16464 }
16465
16466 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
16467 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRightsStruct;
16468 }
16469
16470 #[repr(transparent)]
16472 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16473 pub(crate) raw: ::fidl_next::wire::Union,
16474 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16475 }
16476
16477 impl<'de> Drop for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16478 fn drop(&mut self) {
16479 match self.raw.ordinal() {
16480 1 => {
16481 let _ = unsafe {
16482 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
16483 };
16484 }
16485
16486 _ => unsafe { ::core::hint::unreachable_unchecked() },
16487 }
16488 }
16489 }
16490
16491 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
16492 type Constraint = ();
16493
16494 fn validate(
16495 _: ::fidl_next::Slot<'_, Self>,
16496 _: Self::Constraint,
16497 ) -> Result<(), ::fidl_next::ValidationError> {
16498 Ok(())
16499 }
16500 }
16501
16502 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
16503 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
16504
16505 #[inline]
16506 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16507 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16508 ::fidl_next::wire::Union::zero_padding(raw);
16509 }
16510 }
16511
16512 pub mod vector_of_array_of_event_in_union_with_reduced_rights {
16513 pub enum Ref<'de> {
16514 H(&'de ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>),
16515 }
16516
16517 pub enum Value<'de> {
16518 H(::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>),
16519 }
16520 }
16521
16522 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16523 pub fn as_ref(
16524 &self,
16525 ) -> crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref<'_> {
16526 match self.raw.ordinal() {
16527 1 => crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref::H(
16528 unsafe {
16529 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>>()
16530 },
16531 ),
16532
16533 _ => unsafe { ::core::hint::unreachable_unchecked() },
16534 }
16535 }
16536
16537 pub fn into_inner(
16538 self,
16539 ) -> crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Value<'de>
16540 {
16541 let this = ::core::mem::ManuallyDrop::new(self);
16542
16543 match this.raw.ordinal() {
16544 1 => crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Value::H(
16545 unsafe {
16546 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
16547 },
16548 ),
16549
16550 _ => unsafe { ::core::hint::unreachable_unchecked() },
16551 }
16552 }
16553 }
16554
16555 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16556 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
16557 where
16558 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16559 ___D: ::fidl_next::Decoder<'de>,
16560 ___D: ::fidl_next::fuchsia::HandleDecoder,
16561 {
16562 fn decode(
16563 mut slot: ::fidl_next::Slot<'_, Self>,
16564 decoder: &mut ___D,
16565 _: (),
16566 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16567 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16568 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16569 1 => ::fidl_next::wire::Union::decode_as::<
16570 ___D,
16571 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16572 >(raw, decoder, (1, ()))?,
16573
16574 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
16575 }
16576
16577 Ok(())
16578 }
16579 }
16580
16581 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16582 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16583 match self.raw.ordinal() {
16584 1 => unsafe {
16585 self.raw.get().deref_unchecked::<
16586 ::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>
16587 >().fmt(f)
16588 },
16589 _ => unsafe { ::core::hint::unreachable_unchecked() },
16590 }
16591 }
16592 }
16593
16594 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16595 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRights;
16596 }
16597
16598 #[derive(Debug)]
16600 #[repr(C)]
16601 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
16602 pub u: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
16603 }
16604
16605 static_assertions::const_assert_eq!(
16606 std::mem::size_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
16607 16
16608 );
16609 static_assertions::const_assert_eq!(
16610 std::mem::align_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
16611 8
16612 );
16613
16614 static_assertions::const_assert_eq!(
16615 std::mem::offset_of!(VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>, u),
16616 0
16617 );
16618
16619 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_> {
16620 type Constraint = ();
16621
16622 fn validate(
16623 _: ::fidl_next::Slot<'_, Self>,
16624 _: Self::Constraint,
16625 ) -> Result<(), ::fidl_next::ValidationError> {
16626 Ok(())
16627 }
16628 }
16629
16630 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static> {
16631 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>;
16632
16633 #[inline]
16634 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16635 ::fidl_next::munge! {
16636 let Self {
16637 u,
16638
16639 } = &mut *out_;
16640 }
16641
16642 ::fidl_next::Wire::zero_padding(u);
16643 }
16644 }
16645
16646 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16647 for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>
16648 where
16649 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16650 ___D: ::fidl_next::Decoder<'de>,
16651 ___D: ::fidl_next::fuchsia::HandleDecoder,
16652 {
16653 fn decode(
16654 slot_: ::fidl_next::Slot<'_, Self>,
16655 decoder_: &mut ___D,
16656 _: (),
16657 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16658 ::fidl_next::munge! {
16659 let Self {
16660 mut u,
16661
16662 } = slot_;
16663 }
16664
16665 let _field = u.as_mut();
16666
16667 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
16668
16669 Ok(())
16670 }
16671 }
16672
16673 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
16674 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRightsStruct;
16675 }
16676
16677 #[derive(Debug)]
16679 #[repr(C)]
16680 pub struct VectorOfHandles<'de> {
16681 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
16682 }
16683
16684 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfHandles<'_>>(), 16);
16685 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfHandles<'_>>(), 8);
16686
16687 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfHandles<'_>, v), 0);
16688
16689 impl ::fidl_next::Constrained for VectorOfHandles<'_> {
16690 type Constraint = ();
16691
16692 fn validate(
16693 _: ::fidl_next::Slot<'_, Self>,
16694 _: Self::Constraint,
16695 ) -> Result<(), ::fidl_next::ValidationError> {
16696 Ok(())
16697 }
16698 }
16699
16700 unsafe impl ::fidl_next::Wire for VectorOfHandles<'static> {
16701 type Narrowed<'de> = VectorOfHandles<'de>;
16702
16703 #[inline]
16704 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16705 ::fidl_next::munge! {
16706 let Self {
16707 v,
16708
16709 } = &mut *out_;
16710 }
16711
16712 ::fidl_next::Wire::zero_padding(v);
16713 }
16714 }
16715
16716 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfHandles<'de>
16717 where
16718 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16719 ___D: ::fidl_next::Decoder<'de>,
16720 ___D: ::fidl_next::fuchsia::HandleDecoder,
16721 {
16722 fn decode(
16723 slot_: ::fidl_next::Slot<'_, Self>,
16724 decoder_: &mut ___D,
16725 _: (),
16726 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16727 ::fidl_next::munge! {
16728 let Self {
16729 mut v,
16730
16731 } = slot_;
16732 }
16733
16734 let _field = v.as_mut();
16735 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
16736 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
16737
16738 Ok(())
16739 }
16740 }
16741
16742 impl<'de> ::fidl_next::IntoNatural for VectorOfHandles<'de> {
16743 type Natural = crate::natural::VectorOfHandles;
16744 }
16745
16746 #[derive(Debug)]
16748 #[repr(C)]
16749 pub struct VectorOfOptionalHandles<'de> {
16750 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::OptionalNullableHandle>,
16751 }
16752
16753 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfOptionalHandles<'_>>(), 16);
16754 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfOptionalHandles<'_>>(), 8);
16755
16756 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfOptionalHandles<'_>, v), 0);
16757
16758 impl ::fidl_next::Constrained for VectorOfOptionalHandles<'_> {
16759 type Constraint = ();
16760
16761 fn validate(
16762 _: ::fidl_next::Slot<'_, Self>,
16763 _: Self::Constraint,
16764 ) -> Result<(), ::fidl_next::ValidationError> {
16765 Ok(())
16766 }
16767 }
16768
16769 unsafe impl ::fidl_next::Wire for VectorOfOptionalHandles<'static> {
16770 type Narrowed<'de> = VectorOfOptionalHandles<'de>;
16771
16772 #[inline]
16773 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16774 ::fidl_next::munge! {
16775 let Self {
16776 v,
16777
16778 } = &mut *out_;
16779 }
16780
16781 ::fidl_next::Wire::zero_padding(v);
16782 }
16783 }
16784
16785 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfOptionalHandles<'de>
16786 where
16787 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16788 ___D: ::fidl_next::Decoder<'de>,
16789 ___D: ::fidl_next::fuchsia::HandleDecoder,
16790 {
16791 fn decode(
16792 slot_: ::fidl_next::Slot<'_, Self>,
16793 decoder_: &mut ___D,
16794 _: (),
16795 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16796 ::fidl_next::munge! {
16797 let Self {
16798 mut v,
16799
16800 } = slot_;
16801 }
16802
16803 let _field = v.as_mut();
16804 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
16805 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
16806
16807 Ok(())
16808 }
16809 }
16810
16811 impl<'de> ::fidl_next::IntoNatural for VectorOfOptionalHandles<'de> {
16812 type Natural = crate::natural::VectorOfOptionalHandles;
16813 }
16814
16815 #[derive(Debug)]
16817 #[repr(C)]
16818 pub struct VectorOfUpTo2Handles<'de> {
16819 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
16820 }
16821
16822 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfUpTo2Handles<'_>>(), 16);
16823 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfUpTo2Handles<'_>>(), 8);
16824
16825 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfUpTo2Handles<'_>, v), 0);
16826
16827 impl ::fidl_next::Constrained for VectorOfUpTo2Handles<'_> {
16828 type Constraint = ();
16829
16830 fn validate(
16831 _: ::fidl_next::Slot<'_, Self>,
16832 _: Self::Constraint,
16833 ) -> Result<(), ::fidl_next::ValidationError> {
16834 Ok(())
16835 }
16836 }
16837
16838 unsafe impl ::fidl_next::Wire for VectorOfUpTo2Handles<'static> {
16839 type Narrowed<'de> = VectorOfUpTo2Handles<'de>;
16840
16841 #[inline]
16842 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16843 ::fidl_next::munge! {
16844 let Self {
16845 v,
16846
16847 } = &mut *out_;
16848 }
16849
16850 ::fidl_next::Wire::zero_padding(v);
16851 }
16852 }
16853
16854 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfUpTo2Handles<'de>
16855 where
16856 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16857 ___D: ::fidl_next::Decoder<'de>,
16858 ___D: ::fidl_next::fuchsia::HandleDecoder,
16859 {
16860 fn decode(
16861 slot_: ::fidl_next::Slot<'_, Self>,
16862 decoder_: &mut ___D,
16863 _: (),
16864 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16865 ::fidl_next::munge! {
16866 let Self {
16867 mut v,
16868
16869 } = slot_;
16870 }
16871
16872 let _field = v.as_mut();
16873 ::fidl_next::Constrained::validate(_field, (2, ()))?;
16874 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (2, ()))?;
16875
16876 let v = unsafe { v.deref_unchecked() };
16877
16878 if v.len() > 2 {
16879 return Err(::fidl_next::DecodeError::VectorTooLong {
16880 size: v.len() as u64,
16881 limit: 2,
16882 });
16883 }
16884
16885 Ok(())
16886 }
16887 }
16888
16889 impl<'de> ::fidl_next::IntoNatural for VectorOfUpTo2Handles<'de> {
16890 type Natural = crate::natural::VectorOfUpTo2Handles;
16891 }
16892}
16893
16894pub mod wire_optional {
16895
16896 pub use fidl_next_common_test_conformance::wire_optional::*;
16897
16898 #[repr(transparent)]
16899 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16900 pub(crate) raw: ::fidl_next::wire::Union,
16901 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16902 }
16903
16904 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
16905 type Constraint = ();
16906
16907 fn validate(
16908 _: ::fidl_next::Slot<'_, Self>,
16909 _: Self::Constraint,
16910 ) -> Result<(), ::fidl_next::ValidationError> {
16911 Ok(())
16912 }
16913 }
16914
16915 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
16916 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
16917
16918 #[inline]
16919 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16920 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16921 ::fidl_next::wire::Union::zero_padding(raw);
16922 }
16923 }
16924
16925 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16926 pub fn is_some(&self) -> bool {
16927 self.raw.is_some()
16928 }
16929
16930 pub fn is_none(&self) -> bool {
16931 self.raw.is_none()
16932 }
16933
16934 pub fn as_ref(
16935 &self,
16936 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
16937 {
16938 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16939 }
16940
16941 pub fn into_option(
16942 self,
16943 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
16944 {
16945 if self.is_some() {
16946 Some(crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights {
16947 raw: self.raw,
16948 _phantom: ::core::marker::PhantomData,
16949 })
16950 } else {
16951 None
16952 }
16953 }
16954 }
16955
16956 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16957 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
16958 where
16959 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16960 ___D: ::fidl_next::Decoder<'de>,
16961 ___D: ::fidl_next::fuchsia::HandleDecoder,
16962 {
16963 fn decode(
16964 mut slot: ::fidl_next::Slot<'_, Self>,
16965 decoder: &mut ___D,
16966 _: (),
16967 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16968 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16969 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16970 1 => ::fidl_next::wire::Union::decode_as::<
16971 ___D,
16972 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
16973 >(raw, decoder, (1, ()))?,
16974
16975 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16976 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16977 }
16978
16979 Ok(())
16980 }
16981 }
16982
16983 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16984 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16985 self.as_ref().fmt(f)
16986 }
16987 }
16988
16989 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16990 type Natural =
16991 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights>;
16992 }
16993
16994 #[repr(transparent)]
16995 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16996 pub(crate) raw: ::fidl_next::wire::Union,
16997 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16998 }
16999
17000 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
17001 type Constraint = ();
17002
17003 fn validate(
17004 _: ::fidl_next::Slot<'_, Self>,
17005 _: Self::Constraint,
17006 ) -> Result<(), ::fidl_next::ValidationError> {
17007 Ok(())
17008 }
17009 }
17010
17011 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
17012 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
17013
17014 #[inline]
17015 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17016 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17017 ::fidl_next::wire::Union::zero_padding(raw);
17018 }
17019 }
17020
17021 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
17022 pub fn is_some(&self) -> bool {
17023 self.raw.is_some()
17024 }
17025
17026 pub fn is_none(&self) -> bool {
17027 self.raw.is_none()
17028 }
17029
17030 pub fn as_ref(
17031 &self,
17032 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
17033 {
17034 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17035 }
17036
17037 pub fn into_option(
17038 self,
17039 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
17040 {
17041 if self.is_some() {
17042 Some(crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights {
17043 raw: self.raw,
17044 _phantom: ::core::marker::PhantomData,
17045 })
17046 } else {
17047 None
17048 }
17049 }
17050 }
17051
17052 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
17053 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
17054 where
17055 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17056 ___D: ::fidl_next::Decoder<'de>,
17057 ___D: ::fidl_next::fuchsia::HandleDecoder,
17058 {
17059 fn decode(
17060 mut slot: ::fidl_next::Slot<'_, Self>,
17061 decoder: &mut ___D,
17062 _: (),
17063 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17064 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17065 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17066 1 => ::fidl_next::wire::Union::decode_as::<
17067 ___D,
17068 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
17069 >(raw, decoder, (1, ()))?,
17070
17071 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17072 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17073 }
17074
17075 Ok(())
17076 }
17077 }
17078
17079 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
17080 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17081 self.as_ref().fmt(f)
17082 }
17083 }
17084
17085 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
17086 type Natural =
17087 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights>;
17088 }
17089
17090 #[repr(transparent)]
17091 pub struct EnvelopeInliningTestUnion<'de> {
17092 pub(crate) raw: ::fidl_next::wire::Union,
17093 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17094 }
17095
17096 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
17097 type Constraint = ();
17098
17099 fn validate(
17100 _: ::fidl_next::Slot<'_, Self>,
17101 _: Self::Constraint,
17102 ) -> Result<(), ::fidl_next::ValidationError> {
17103 Ok(())
17104 }
17105 }
17106
17107 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
17108 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
17109
17110 #[inline]
17111 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17112 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17113 ::fidl_next::wire::Union::zero_padding(raw);
17114 }
17115 }
17116
17117 impl<'de> EnvelopeInliningTestUnion<'de> {
17118 pub fn is_some(&self) -> bool {
17119 self.raw.is_some()
17120 }
17121
17122 pub fn is_none(&self) -> bool {
17123 self.raw.is_none()
17124 }
17125
17126 pub fn as_ref(
17127 &self,
17128 ) -> ::core::option::Option<&crate::wire::EnvelopeInliningTestUnion<'de>> {
17129 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17130 }
17131
17132 pub fn into_option(
17133 self,
17134 ) -> ::core::option::Option<crate::wire::EnvelopeInliningTestUnion<'de>> {
17135 if self.is_some() {
17136 Some(crate::wire::EnvelopeInliningTestUnion {
17137 raw: self.raw,
17138 _phantom: ::core::marker::PhantomData,
17139 })
17140 } else {
17141 None
17142 }
17143 }
17144 }
17145
17146 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
17147 where
17148 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17149 ___D: ::fidl_next::Decoder<'de>,
17150 ___D: ::fidl_next::fuchsia::HandleDecoder,
17151 {
17152 fn decode(
17153 mut slot: ::fidl_next::Slot<'_, Self>,
17154 decoder: &mut ___D,
17155 _: (),
17156 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17157 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17158 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17159 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
17160 raw,
17161 decoder,
17162 (),
17163 )?,
17164
17165 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
17166 raw,
17167 decoder,
17168 (),
17169 )?,
17170
17171 3 => ::fidl_next::wire::Union::decode_as::<
17172 ___D,
17173 ::fidl_next::wire::fuchsia::NullableHandle,
17174 >(raw, decoder, ())?,
17175
17176 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17177 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17178 }
17179
17180 Ok(())
17181 }
17182 }
17183
17184 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
17185 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17186 self.as_ref().fmt(f)
17187 }
17188 }
17189
17190 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
17191 type Natural = ::core::option::Option<crate::natural::EnvelopeInliningTestUnion>;
17192 }
17193
17194 #[repr(transparent)]
17195 pub struct SampleResourceXUnion<'de> {
17196 pub(crate) raw: ::fidl_next::wire::Union,
17197 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17198 }
17199
17200 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
17201 type Constraint = ();
17202
17203 fn validate(
17204 _: ::fidl_next::Slot<'_, Self>,
17205 _: Self::Constraint,
17206 ) -> Result<(), ::fidl_next::ValidationError> {
17207 Ok(())
17208 }
17209 }
17210
17211 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
17212 type Narrowed<'de> = SampleResourceXUnion<'de>;
17213
17214 #[inline]
17215 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17216 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17217 ::fidl_next::wire::Union::zero_padding(raw);
17218 }
17219 }
17220
17221 impl<'de> SampleResourceXUnion<'de> {
17222 pub fn is_some(&self) -> bool {
17223 self.raw.is_some()
17224 }
17225
17226 pub fn is_none(&self) -> bool {
17227 self.raw.is_none()
17228 }
17229
17230 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SampleResourceXUnion<'de>> {
17231 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17232 }
17233
17234 pub fn into_option(self) -> ::core::option::Option<crate::wire::SampleResourceXUnion<'de>> {
17235 if self.is_some() {
17236 Some(crate::wire::SampleResourceXUnion {
17237 raw: self.raw,
17238 _phantom: ::core::marker::PhantomData,
17239 })
17240 } else {
17241 None
17242 }
17243 }
17244 }
17245
17246 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
17247 where
17248 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17249 ___D: ::fidl_next::Decoder<'de>,
17250 ___D: ::fidl_next::fuchsia::HandleDecoder,
17251 {
17252 fn decode(
17253 mut slot: ::fidl_next::Slot<'_, Self>,
17254 decoder: &mut ___D,
17255 _: (),
17256 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17257 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17258 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17259 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
17260 raw,
17261 decoder,
17262 (),
17263 )?,
17264
17265 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
17266 raw,
17267 decoder,
17268 (),
17269 )?,
17270
17271 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
17272 raw,
17273 decoder,
17274 (),
17275 )?,
17276
17277 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17278 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17279 }
17280
17281 Ok(())
17282 }
17283 }
17284
17285 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
17286 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17287 self.as_ref().fmt(f)
17288 }
17289 }
17290
17291 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
17292 type Natural = ::core::option::Option<crate::natural::SampleResourceXUnion>;
17293 }
17294
17295 #[repr(transparent)]
17296 pub struct SampleStrictResourceXUnion<'de> {
17297 pub(crate) raw: ::fidl_next::wire::Union,
17298 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17299 }
17300
17301 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
17302 type Constraint = ();
17303
17304 fn validate(
17305 _: ::fidl_next::Slot<'_, Self>,
17306 _: Self::Constraint,
17307 ) -> Result<(), ::fidl_next::ValidationError> {
17308 Ok(())
17309 }
17310 }
17311
17312 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
17313 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
17314
17315 #[inline]
17316 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17317 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17318 ::fidl_next::wire::Union::zero_padding(raw);
17319 }
17320 }
17321
17322 impl<'de> SampleStrictResourceXUnion<'de> {
17323 pub fn is_some(&self) -> bool {
17324 self.raw.is_some()
17325 }
17326
17327 pub fn is_none(&self) -> bool {
17328 self.raw.is_none()
17329 }
17330
17331 pub fn as_ref(
17332 &self,
17333 ) -> ::core::option::Option<&crate::wire::SampleStrictResourceXUnion<'de>> {
17334 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17335 }
17336
17337 pub fn into_option(
17338 self,
17339 ) -> ::core::option::Option<crate::wire::SampleStrictResourceXUnion<'de>> {
17340 if self.is_some() {
17341 Some(crate::wire::SampleStrictResourceXUnion {
17342 raw: self.raw,
17343 _phantom: ::core::marker::PhantomData,
17344 })
17345 } else {
17346 None
17347 }
17348 }
17349 }
17350
17351 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
17352 where
17353 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17354 ___D: ::fidl_next::Decoder<'de>,
17355 ___D: ::fidl_next::fuchsia::HandleDecoder,
17356 {
17357 fn decode(
17358 mut slot: ::fidl_next::Slot<'_, Self>,
17359 decoder: &mut ___D,
17360 _: (),
17361 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17362 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17363 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17364 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
17365 raw,
17366 decoder,
17367 (),
17368 )?,
17369
17370 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
17371 raw,
17372 decoder,
17373 (),
17374 )?,
17375
17376 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
17377 raw,
17378 decoder,
17379 (),
17380 )?,
17381
17382 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17383 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17384 }
17385
17386 Ok(())
17387 }
17388 }
17389
17390 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
17391 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17392 self.as_ref().fmt(f)
17393 }
17394 }
17395
17396 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
17397 type Natural = ::core::option::Option<crate::natural::SampleStrictResourceXUnion>;
17398 }
17399
17400 #[repr(transparent)]
17401 pub struct UnionWithVector<'de> {
17402 pub(crate) raw: ::fidl_next::wire::Union,
17403 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17404 }
17405
17406 impl ::fidl_next::Constrained for UnionWithVector<'_> {
17407 type Constraint = ();
17408
17409 fn validate(
17410 _: ::fidl_next::Slot<'_, Self>,
17411 _: Self::Constraint,
17412 ) -> Result<(), ::fidl_next::ValidationError> {
17413 Ok(())
17414 }
17415 }
17416
17417 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
17418 type Narrowed<'de> = UnionWithVector<'de>;
17419
17420 #[inline]
17421 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17422 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17423 ::fidl_next::wire::Union::zero_padding(raw);
17424 }
17425 }
17426
17427 impl<'de> UnionWithVector<'de> {
17428 pub fn is_some(&self) -> bool {
17429 self.raw.is_some()
17430 }
17431
17432 pub fn is_none(&self) -> bool {
17433 self.raw.is_none()
17434 }
17435
17436 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
17437 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17438 }
17439
17440 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
17441 if self.is_some() {
17442 Some(crate::wire::UnionWithVector {
17443 raw: self.raw,
17444 _phantom: ::core::marker::PhantomData,
17445 })
17446 } else {
17447 None
17448 }
17449 }
17450 }
17451
17452 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
17453 where
17454 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17455 ___D: ::fidl_next::Decoder<'de>,
17456 ___D: ::fidl_next::fuchsia::HandleDecoder,
17457 {
17458 fn decode(
17459 mut slot: ::fidl_next::Slot<'_, Self>,
17460 decoder: &mut ___D,
17461 _: (),
17462 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17463 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17464 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17465 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
17466
17467 2 => {
17468 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
17469 raw,
17470 decoder,
17471 (4294967295, ()),
17472 )?
17473 }
17474
17475 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
17476 raw, decoder, 4294967295,
17477 )?,
17478
17479 4 => ::fidl_next::wire::Union::decode_as::<
17480 ___D,
17481 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
17482 >(raw, decoder, (4294967295, ()))?,
17483
17484 5 => ::fidl_next::wire::Union::decode_as::<
17485 ___D,
17486 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
17487 >(raw, decoder, (4294967295, ()))?,
17488
17489 6 => ::fidl_next::wire::Union::decode_as::<
17490 ___D,
17491 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
17492 >(raw, decoder, (4294967295, ()))?,
17493
17494 7 => ::fidl_next::wire::Union::decode_as::<
17495 ___D,
17496 [crate::wire::StructSize3Align1; 2],
17497 >(raw, decoder, ())?,
17498
17499 8 => ::fidl_next::wire::Union::decode_as::<
17500 ___D,
17501 [crate::wire::StructSize3Align2; 2],
17502 >(raw, decoder, ())?,
17503
17504 9 => ::fidl_next::wire::Union::decode_as::<
17505 ___D,
17506 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
17507 >(raw, decoder, (4294967295, ()))?,
17508
17509 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17510 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17511 }
17512
17513 Ok(())
17514 }
17515 }
17516
17517 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
17518 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17519 self.as_ref().fmt(f)
17520 }
17521 }
17522
17523 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
17524 type Natural = ::core::option::Option<crate::natural::UnionWithVector>;
17525 }
17526
17527 #[repr(transparent)]
17528 pub struct UnionOfEndpointsUnion<'de> {
17529 pub(crate) raw: ::fidl_next::wire::Union,
17530 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17531 }
17532
17533 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
17534 type Constraint = ();
17535
17536 fn validate(
17537 _: ::fidl_next::Slot<'_, Self>,
17538 _: Self::Constraint,
17539 ) -> Result<(), ::fidl_next::ValidationError> {
17540 Ok(())
17541 }
17542 }
17543
17544 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
17545 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
17546
17547 #[inline]
17548 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17549 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17550 ::fidl_next::wire::Union::zero_padding(raw);
17551 }
17552 }
17553
17554 impl<'de> UnionOfEndpointsUnion<'de> {
17555 pub fn is_some(&self) -> bool {
17556 self.raw.is_some()
17557 }
17558
17559 pub fn is_none(&self) -> bool {
17560 self.raw.is_none()
17561 }
17562
17563 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfEndpointsUnion<'de>> {
17564 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17565 }
17566
17567 pub fn into_option(
17568 self,
17569 ) -> ::core::option::Option<crate::wire::UnionOfEndpointsUnion<'de>> {
17570 if self.is_some() {
17571 Some(crate::wire::UnionOfEndpointsUnion {
17572 raw: self.raw,
17573 _phantom: ::core::marker::PhantomData,
17574 })
17575 } else {
17576 None
17577 }
17578 }
17579 }
17580
17581 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
17582 where
17583 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17584 ___D: ::fidl_next::Decoder<'de>,
17585 ___D: ::fidl_next::fuchsia::HandleDecoder,
17586 {
17587 fn decode(
17588 mut slot: ::fidl_next::Slot<'_, Self>,
17589 decoder: &mut ___D,
17590 _: (),
17591 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17592 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17593 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17594 1 => ::fidl_next::wire::Union::decode_as::<
17595 ___D,
17596 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
17597 >(raw, decoder, ())?,
17598
17599 2 => ::fidl_next::wire::Union::decode_as::<
17600 ___D,
17601 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
17602 >(raw, decoder, ())?,
17603
17604 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17605 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17606 }
17607
17608 Ok(())
17609 }
17610 }
17611
17612 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
17613 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17614 self.as_ref().fmt(f)
17615 }
17616 }
17617
17618 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
17619 type Natural = ::core::option::Option<crate::natural::UnionOfEndpointsUnion>;
17620 }
17621
17622 #[repr(transparent)]
17623 pub struct UnionOfHandle {
17624 pub(crate) raw: ::fidl_next::wire::Union,
17625 pub(crate) _phantom: ::core::marker::PhantomData<()>,
17626 }
17627
17628 impl ::fidl_next::Constrained for UnionOfHandle {
17629 type Constraint = ();
17630
17631 fn validate(
17632 _: ::fidl_next::Slot<'_, Self>,
17633 _: Self::Constraint,
17634 ) -> Result<(), ::fidl_next::ValidationError> {
17635 Ok(())
17636 }
17637 }
17638
17639 unsafe impl ::fidl_next::Wire for UnionOfHandle {
17640 type Narrowed<'de> = UnionOfHandle;
17641
17642 #[inline]
17643 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17644 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17645 ::fidl_next::wire::Union::zero_padding(raw);
17646 }
17647 }
17648
17649 impl UnionOfHandle {
17650 pub fn is_some(&self) -> bool {
17651 self.raw.is_some()
17652 }
17653
17654 pub fn is_none(&self) -> bool {
17655 self.raw.is_none()
17656 }
17657
17658 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfHandle> {
17659 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17660 }
17661
17662 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionOfHandle> {
17663 if self.is_some() {
17664 Some(crate::wire::UnionOfHandle {
17665 raw: self.raw,
17666 _phantom: ::core::marker::PhantomData,
17667 })
17668 } else {
17669 None
17670 }
17671 }
17672 }
17673
17674 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
17675 where
17676 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17677 ___D: ::fidl_next::fuchsia::HandleDecoder,
17678 {
17679 fn decode(
17680 mut slot: ::fidl_next::Slot<'_, Self>,
17681 decoder: &mut ___D,
17682 _: (),
17683 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17684 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17685 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17686 1 => ::fidl_next::wire::Union::decode_as_static::<
17687 ___D,
17688 ::fidl_next::wire::fuchsia::NullableHandle,
17689 >(raw, decoder, ())?,
17690
17691 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17692 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
17693 }
17694
17695 Ok(())
17696 }
17697 }
17698
17699 impl ::core::fmt::Debug for UnionOfHandle {
17700 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17701 self.as_ref().fmt(f)
17702 }
17703 }
17704
17705 impl ::fidl_next::IntoNatural for UnionOfHandle {
17706 type Natural = ::core::option::Option<crate::natural::UnionOfHandle>;
17707 }
17708
17709 #[repr(transparent)]
17710 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17711 pub(crate) raw: ::fidl_next::wire::Union,
17712 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17713 }
17714
17715 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
17716 type Constraint = ();
17717
17718 fn validate(
17719 _: ::fidl_next::Slot<'_, Self>,
17720 _: Self::Constraint,
17721 ) -> Result<(), ::fidl_next::ValidationError> {
17722 Ok(())
17723 }
17724 }
17725
17726 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
17727 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
17728
17729 #[inline]
17730 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17731 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17732 ::fidl_next::wire::Union::zero_padding(raw);
17733 }
17734 }
17735
17736 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17737 pub fn is_some(&self) -> bool {
17738 self.raw.is_some()
17739 }
17740
17741 pub fn is_none(&self) -> bool {
17742 self.raw.is_none()
17743 }
17744
17745 pub fn as_ref(
17746 &self,
17747 ) -> ::core::option::Option<&crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
17748 {
17749 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17750 }
17751
17752 pub fn into_option(
17753 self,
17754 ) -> ::core::option::Option<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
17755 {
17756 if self.is_some() {
17757 Some(crate::wire::VectorOfArrayOfEventInUnionWithReducedRights {
17758 raw: self.raw,
17759 _phantom: ::core::marker::PhantomData,
17760 })
17761 } else {
17762 None
17763 }
17764 }
17765 }
17766
17767 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
17768 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
17769 where
17770 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17771 ___D: ::fidl_next::Decoder<'de>,
17772 ___D: ::fidl_next::fuchsia::HandleDecoder,
17773 {
17774 fn decode(
17775 mut slot: ::fidl_next::Slot<'_, Self>,
17776 decoder: &mut ___D,
17777 _: (),
17778 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17779 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17780 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17781 1 => ::fidl_next::wire::Union::decode_as::<
17782 ___D,
17783 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
17784 >(raw, decoder, (1, ()))?,
17785
17786 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17787 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17788 }
17789
17790 Ok(())
17791 }
17792 }
17793
17794 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17795 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17796 self.as_ref().fmt(f)
17797 }
17798 }
17799
17800 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17801 type Natural =
17802 ::core::option::Option<crate::natural::VectorOfArrayOfEventInUnionWithReducedRights>;
17803 }
17804}
17805
17806pub mod generic {
17807
17808 pub use fidl_next_common_test_conformance::generic::*;
17809
17810 pub struct AlternatingHandlesAndFailures<T0, T1, T2, T3, T4> {
17812 pub h1: T0,
17813
17814 pub failure_trigger1: T1,
17815
17816 pub h2: T2,
17817
17818 pub failure_trigger2: T3,
17819
17820 pub h3: T4,
17821 }
17822
17823 unsafe impl<___E, T0, T1, T2, T3, T4>
17824 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
17825 for AlternatingHandlesAndFailures<T0, T1, T2, T3, T4>
17826 where
17827 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17828 ___E: ::fidl_next::Encoder,
17829 ___E: ::fidl_next::fuchsia::HandleEncoder,
17830 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17831 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17832 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17833 T3: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17834 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17835 {
17836 #[inline]
17837 fn encode(
17838 self,
17839 encoder_: &mut ___E,
17840 out_: &mut ::core::mem::MaybeUninit<
17841 crate::wire::AlternatingHandlesAndFailures<'static>,
17842 >,
17843 _: (),
17844 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17845 ::fidl_next::munge! {
17846 let crate::wire::AlternatingHandlesAndFailures {
17847 h1,
17848 failure_trigger1,
17849 h2,
17850 failure_trigger2,
17851 h3,
17852
17853 } = out_;
17854 }
17855
17856 ::fidl_next::Encode::encode(self.h1, encoder_, h1, ())?;
17857
17858 ::fidl_next::Encode::encode(self.failure_trigger1, encoder_, failure_trigger1, 1)?;
17859
17860 ::fidl_next::Encode::encode(self.h2, encoder_, h2, ())?;
17861
17862 ::fidl_next::Encode::encode(self.failure_trigger2, encoder_, failure_trigger2, 1)?;
17863
17864 ::fidl_next::Encode::encode(self.h3, encoder_, h3, ())?;
17865
17866 Ok(())
17867 }
17868 }
17869
17870 pub struct ArrayOfArrayOfNonnullableHandles<T0> {
17872 pub handles: T0,
17873 }
17874
17875 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
17876 for ArrayOfArrayOfNonnullableHandles<T0>
17877 where
17878 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17879 ___E: ::fidl_next::fuchsia::HandleEncoder,
17880 T0: ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>,
17881 {
17882 #[inline]
17883 fn encode(
17884 self,
17885 encoder_: &mut ___E,
17886 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
17887 _: (),
17888 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17889 ::fidl_next::munge! {
17890 let crate::wire::ArrayOfArrayOfNonnullableHandles {
17891 handles,
17892
17893 } = out_;
17894 }
17895
17896 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17897
17898 Ok(())
17899 }
17900 }
17901
17902 pub struct ArrayOfHandles<T0> {
17904 pub a: T0,
17905 }
17906
17907 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E> for ArrayOfHandles<T0>
17908 where
17909 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17910 ___E: ::fidl_next::fuchsia::HandleEncoder,
17911 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 3], ___E>,
17912 {
17913 #[inline]
17914 fn encode(
17915 self,
17916 encoder_: &mut ___E,
17917 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
17918 _: (),
17919 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17920 ::fidl_next::munge! {
17921 let crate::wire::ArrayOfHandles {
17922 a,
17923
17924 } = out_;
17925 }
17926
17927 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
17928
17929 Ok(())
17930 }
17931 }
17932
17933 pub struct ArrayOfNonnullableHandles<T0> {
17935 pub handles: T0,
17936 }
17937
17938 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
17939 for ArrayOfNonnullableHandles<T0>
17940 where
17941 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17942 ___E: ::fidl_next::fuchsia::HandleEncoder,
17943 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
17944 {
17945 #[inline]
17946 fn encode(
17947 self,
17948 encoder_: &mut ___E,
17949 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
17950 _: (),
17951 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17952 ::fidl_next::munge! {
17953 let crate::wire::ArrayOfNonnullableHandles {
17954 handles,
17955
17956 } = out_;
17957 }
17958
17959 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17960
17961 Ok(())
17962 }
17963 }
17964
17965 pub struct ArrayOfNullableHandles<T0> {
17967 pub handles: T0,
17968 }
17969
17970 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
17971 for ArrayOfNullableHandles<T0>
17972 where
17973 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17974 ___E: ::fidl_next::fuchsia::HandleEncoder,
17975 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>,
17976 {
17977 #[inline]
17978 fn encode(
17979 self,
17980 encoder_: &mut ___E,
17981 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
17982 _: (),
17983 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17984 ::fidl_next::munge! {
17985 let crate::wire::ArrayOfNullableHandles {
17986 handles,
17987
17988 } = out_;
17989 }
17990
17991 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17992
17993 Ok(())
17994 }
17995 }
17996
17997 pub struct ArrayOfOptionalHandles<T0> {
17999 pub a: T0,
18000 }
18001
18002 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
18003 for ArrayOfOptionalHandles<T0>
18004 where
18005 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18006 ___E: ::fidl_next::fuchsia::HandleEncoder,
18007 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>,
18008 {
18009 #[inline]
18010 fn encode(
18011 self,
18012 encoder_: &mut ___E,
18013 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
18014 _: (),
18015 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18016 ::fidl_next::munge! {
18017 let crate::wire::ArrayOfOptionalHandles {
18018 a,
18019
18020 } = out_;
18021 }
18022
18023 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
18024
18025 Ok(())
18026 }
18027 }
18028
18029 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<T0> {
18031 pub h: T0,
18032 }
18033
18034 unsafe impl<___E, T0>
18035 ::fidl_next::Encode<
18036 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
18037 ___E,
18038 > for ArrayOfVectorOfEventInStructWithDefaultRights<T0>
18039 where
18040 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18041 ___E: ::fidl_next::Encoder,
18042 ___E: ::fidl_next::fuchsia::HandleEncoder,
18043 T0: ::fidl_next::Encode<
18044 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
18045 ___E,
18046 >,
18047 {
18048 #[inline]
18049 fn encode(
18050 self,
18051 encoder_: &mut ___E,
18052 out_: &mut ::core::mem::MaybeUninit<
18053 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
18054 >,
18055 _: (),
18056 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18057 ::fidl_next::munge! {
18058 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
18059 h,
18060
18061 } = out_;
18062 }
18063
18064 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
18065
18066 Ok(())
18067 }
18068 }
18069
18070 pub struct ArrayOfVectorOfEventInStructWithReducedRights<T0> {
18072 pub h: T0,
18073 }
18074
18075 unsafe impl<___E, T0>
18076 ::fidl_next::Encode<
18077 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
18078 ___E,
18079 > for ArrayOfVectorOfEventInStructWithReducedRights<T0>
18080 where
18081 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18082 ___E: ::fidl_next::Encoder,
18083 ___E: ::fidl_next::fuchsia::HandleEncoder,
18084 T0: ::fidl_next::Encode<
18085 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
18086 ___E,
18087 >,
18088 {
18089 #[inline]
18090 fn encode(
18091 self,
18092 encoder_: &mut ___E,
18093 out_: &mut ::core::mem::MaybeUninit<
18094 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
18095 >,
18096 _: (),
18097 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18098 ::fidl_next::munge! {
18099 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
18100 h,
18101
18102 } = out_;
18103 }
18104
18105 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
18106
18107 Ok(())
18108 }
18109 }
18110
18111 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0> {
18113 pub t: T0,
18114 }
18115
18116 unsafe impl<___E, T0>
18117 ::fidl_next::Encode<
18118 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
18119 ___E,
18120 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0>
18121 where
18122 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18123 ___E: ::fidl_next::Encoder,
18124 ___E: ::fidl_next::fuchsia::HandleEncoder,
18125 T0: ::fidl_next::Encode<
18126 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
18127 ___E,
18128 >,
18129 {
18130 #[inline]
18131 fn encode(
18132 self,
18133 encoder_: &mut ___E,
18134 out_: &mut ::core::mem::MaybeUninit<
18135 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
18136 >,
18137 _: (),
18138 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18139 ::fidl_next::munge! {
18140 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
18141 t,
18142
18143 } = out_;
18144 }
18145
18146 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18147
18148 Ok(())
18149 }
18150 }
18151
18152 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0> {
18154 pub t: T0,
18155 }
18156
18157 unsafe impl<___E, T0>
18158 ::fidl_next::Encode<
18159 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
18160 ___E,
18161 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0>
18162 where
18163 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18164 ___E: ::fidl_next::Encoder,
18165 ___E: ::fidl_next::fuchsia::HandleEncoder,
18166 T0: ::fidl_next::Encode<
18167 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
18168 ___E,
18169 >,
18170 {
18171 #[inline]
18172 fn encode(
18173 self,
18174 encoder_: &mut ___E,
18175 out_: &mut ::core::mem::MaybeUninit<
18176 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
18177 >,
18178 _: (),
18179 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18180 ::fidl_next::munge! {
18181 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
18182 t,
18183
18184 } = out_;
18185 }
18186
18187 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18188
18189 Ok(())
18190 }
18191 }
18192
18193 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0> {
18195 pub u: T0,
18196 }
18197
18198 unsafe impl<___E, T0>
18199 ::fidl_next::Encode<
18200 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
18201 ___E,
18202 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0>
18203 where
18204 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18205 ___E: ::fidl_next::Encoder,
18206 ___E: ::fidl_next::fuchsia::HandleEncoder,
18207 T0: ::fidl_next::Encode<
18208 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
18209 ___E,
18210 >,
18211 {
18212 #[inline]
18213 fn encode(
18214 self,
18215 encoder_: &mut ___E,
18216 out_: &mut ::core::mem::MaybeUninit<
18217 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
18218 >,
18219 _: (),
18220 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18221 ::fidl_next::munge! {
18222 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
18223 u,
18224
18225 } = out_;
18226 }
18227
18228 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
18229
18230 Ok(())
18231 }
18232 }
18233
18234 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0> {
18236 pub u: T0,
18237 }
18238
18239 unsafe impl<___E, T0>
18240 ::fidl_next::Encode<
18241 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
18242 ___E,
18243 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0>
18244 where
18245 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18246 ___E: ::fidl_next::Encoder,
18247 ___E: ::fidl_next::fuchsia::HandleEncoder,
18248 T0: ::fidl_next::Encode<
18249 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
18250 ___E,
18251 >,
18252 {
18253 #[inline]
18254 fn encode(
18255 self,
18256 encoder_: &mut ___E,
18257 out_: &mut ::core::mem::MaybeUninit<
18258 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
18259 >,
18260 _: (),
18261 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18262 ::fidl_next::munge! {
18263 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
18264 u,
18265
18266 } = out_;
18267 }
18268
18269 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
18270
18271 Ok(())
18272 }
18273 }
18274
18275 pub struct Bounded32NonnullableVectorOfHandles<T0> {
18277 pub vh0: T0,
18278 }
18279
18280 unsafe impl<___E, T0>
18281 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
18282 for Bounded32NonnullableVectorOfHandles<T0>
18283 where
18284 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18285 ___E: ::fidl_next::Encoder,
18286 ___E: ::fidl_next::fuchsia::HandleEncoder,
18287 T0: ::fidl_next::Encode<
18288 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18289 ___E,
18290 >,
18291 {
18292 #[inline]
18293 fn encode(
18294 self,
18295 encoder_: &mut ___E,
18296 out_: &mut ::core::mem::MaybeUninit<
18297 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
18298 >,
18299 _: (),
18300 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18301 ::fidl_next::munge! {
18302 let crate::wire::Bounded32NonnullableVectorOfHandles {
18303 vh0,
18304
18305 } = out_;
18306 }
18307
18308 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
18309
18310 Ok(())
18311 }
18312 }
18313
18314 pub struct Bounded32NullableVectorOfHandles<T0> {
18316 pub vh0: T0,
18317 }
18318
18319 unsafe impl<___E, T0>
18320 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
18321 for Bounded32NullableVectorOfHandles<T0>
18322 where
18323 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18324 ___E: ::fidl_next::Encoder,
18325 ___E: ::fidl_next::fuchsia::HandleEncoder,
18326 T0: ::fidl_next::Encode<
18327 ::fidl_next::wire::OptionalVector<
18328 'static,
18329 ::fidl_next::wire::fuchsia::NullableHandle,
18330 >,
18331 ___E,
18332 >,
18333 {
18334 #[inline]
18335 fn encode(
18336 self,
18337 encoder_: &mut ___E,
18338 out_: &mut ::core::mem::MaybeUninit<
18339 crate::wire::Bounded32NullableVectorOfHandles<'static>,
18340 >,
18341 _: (),
18342 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18343 ::fidl_next::munge! {
18344 let crate::wire::Bounded32NullableVectorOfHandles {
18345 vh0,
18346
18347 } = out_;
18348 }
18349
18350 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
18351
18352 Ok(())
18353 }
18354 }
18355
18356 pub struct BoxOfSingleHandle<T0> {
18358 pub b: T0,
18359 }
18360
18361 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
18362 for BoxOfSingleHandle<T0>
18363 where
18364 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18365 ___E: ::fidl_next::Encoder,
18366 ___E: ::fidl_next::fuchsia::HandleEncoder,
18367 T0: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>,
18368 {
18369 #[inline]
18370 fn encode(
18371 self,
18372 encoder_: &mut ___E,
18373 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
18374 _: (),
18375 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18376 ::fidl_next::munge! {
18377 let crate::wire::BoxOfSingleHandle {
18378 b,
18379
18380 } = out_;
18381 }
18382
18383 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
18384
18385 Ok(())
18386 }
18387 }
18388
18389 pub struct BoxOfSingleOptionalHandle<T0> {
18391 pub b: T0,
18392 }
18393
18394 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
18395 for BoxOfSingleOptionalHandle<T0>
18396 where
18397 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18398 ___E: ::fidl_next::Encoder,
18399 ___E: ::fidl_next::fuchsia::HandleEncoder,
18400 T0: ::fidl_next::Encode<
18401 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
18402 ___E,
18403 >,
18404 {
18405 #[inline]
18406 fn encode(
18407 self,
18408 encoder_: &mut ___E,
18409 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
18410 _: (),
18411 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18412 ::fidl_next::munge! {
18413 let crate::wire::BoxOfSingleOptionalHandle {
18414 b,
18415
18416 } = out_;
18417 }
18418
18419 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
18420
18421 Ok(())
18422 }
18423 }
18424
18425 pub struct LaunchInfo<T0, T1, T2, T3, T4, T5, T6> {
18427 pub url: T0,
18428
18429 pub arguments: T1,
18430
18431 pub out: T2,
18432
18433 pub err: T3,
18434
18435 pub directory_request: T4,
18436
18437 pub flat_namespace: T5,
18438
18439 pub additional_services: T6,
18440 }
18441
18442 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
18443 ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>
18444 for LaunchInfo<T0, T1, T2, T3, T4, T5, T6>
18445 where
18446 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18447 ___E: ::fidl_next::Encoder,
18448 ___E: ::fidl_next::fuchsia::HandleEncoder,
18449 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18450 T1: ::fidl_next::Encode<
18451 ::fidl_next::wire::OptionalVector<'static, ::fidl_next::wire::String<'static>>,
18452 ___E,
18453 >,
18454 T2: ::fidl_next::Encode<
18455 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
18456 ___E,
18457 >,
18458 T3: ::fidl_next::Encode<
18459 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
18460 ___E,
18461 >,
18462 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
18463 T5: ::fidl_next::Encode<
18464 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
18465 ___E,
18466 >,
18467 T6: ::fidl_next::Encode<
18468 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
18469 ___E,
18470 >,
18471 {
18472 #[inline]
18473 fn encode(
18474 self,
18475 encoder_: &mut ___E,
18476 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
18477 _: (),
18478 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18479 ::fidl_next::munge! {
18480 let crate::wire::LaunchInfo {
18481 url,
18482 arguments,
18483 out,
18484 err,
18485 directory_request,
18486 flat_namespace,
18487 additional_services,
18488
18489 } = out_;
18490 }
18491
18492 ::fidl_next::Encode::encode(self.url, encoder_, url, 200)?;
18493
18494 ::fidl_next::Encode::encode(
18495 self.arguments,
18496 encoder_,
18497 arguments,
18498 (4294967295, 4294967295),
18499 )?;
18500
18501 ::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
18502
18503 ::fidl_next::Encode::encode(self.err, encoder_, err, ())?;
18504
18505 ::fidl_next::Encode::encode(self.directory_request, encoder_, directory_request, ())?;
18506
18507 ::fidl_next::Encode::encode(self.flat_namespace, encoder_, flat_namespace, ())?;
18508
18509 ::fidl_next::Encode::encode(
18510 self.additional_services,
18511 encoder_,
18512 additional_services,
18513 (),
18514 )?;
18515
18516 Ok(())
18517 }
18518 }
18519
18520 pub struct CreateComponentRequest<T0, T1> {
18522 pub launch_info: T0,
18523
18524 pub controller: T1,
18525 }
18526
18527 unsafe impl<___E, T0, T1>
18528 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
18529 for CreateComponentRequest<T0, T1>
18530 where
18531 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18532 ___E: ::fidl_next::Encoder,
18533 ___E: ::fidl_next::fuchsia::HandleEncoder,
18534 T0: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
18535 T1: ::fidl_next::Encode<
18536 ::fidl_next::ServerEnd<
18537 crate::ComponentController,
18538 ::fidl_next::wire::fuchsia::OptionalChannel,
18539 >,
18540 ___E,
18541 >,
18542 {
18543 #[inline]
18544 fn encode(
18545 self,
18546 encoder_: &mut ___E,
18547 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
18548 _: (),
18549 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18550 ::fidl_next::munge! {
18551 let crate::wire::CreateComponentRequest {
18552 launch_info,
18553 controller,
18554
18555 } = out_;
18556 }
18557
18558 ::fidl_next::Encode::encode(self.launch_info, encoder_, launch_info, ())?;
18559
18560 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
18561
18562 Ok(())
18563 }
18564 }
18565
18566 pub struct EmptyResourceTableStruct<T0> {
18568 pub table: T0,
18569 }
18570
18571 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
18572 for EmptyResourceTableStruct<T0>
18573 where
18574 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18575 ___E: ::fidl_next::Encoder,
18576 ___E: ::fidl_next::fuchsia::HandleEncoder,
18577 T0: ::fidl_next::Encode<crate::wire::EmptyResourceTable<'static>, ___E>,
18578 {
18579 #[inline]
18580 fn encode(
18581 self,
18582 encoder_: &mut ___E,
18583 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
18584 _: (),
18585 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18586 ::fidl_next::munge! {
18587 let crate::wire::EmptyResourceTableStruct {
18588 table,
18589
18590 } = out_;
18591 }
18592
18593 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
18594
18595 Ok(())
18596 }
18597 }
18598
18599 pub struct EnvelopeInliningTestUnionStruct<T0> {
18601 pub u: T0,
18602 }
18603
18604 unsafe impl<___E, T0>
18605 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
18606 for EnvelopeInliningTestUnionStruct<T0>
18607 where
18608 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18609 ___E: ::fidl_next::Encoder,
18610 ___E: ::fidl_next::fuchsia::HandleEncoder,
18611 T0: ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
18612 {
18613 #[inline]
18614 fn encode(
18615 self,
18616 encoder_: &mut ___E,
18617 out_: &mut ::core::mem::MaybeUninit<
18618 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
18619 >,
18620 _: (),
18621 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18622 ::fidl_next::munge! {
18623 let crate::wire::EnvelopeInliningTestUnionStruct {
18624 u,
18625
18626 } = out_;
18627 }
18628
18629 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
18630
18631 Ok(())
18632 }
18633 }
18634
18635 pub struct EventWithDefaultRights<T0> {
18637 pub h: T0,
18638 }
18639
18640 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
18641 for EventWithDefaultRights<T0>
18642 where
18643 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18644 ___E: ::fidl_next::fuchsia::HandleEncoder,
18645 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18646 {
18647 #[inline]
18648 fn encode(
18649 self,
18650 encoder_: &mut ___E,
18651 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
18652 _: (),
18653 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18654 ::fidl_next::munge! {
18655 let crate::wire::EventWithDefaultRights {
18656 h,
18657
18658 } = out_;
18659 }
18660
18661 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18662
18663 Ok(())
18664 }
18665 }
18666
18667 pub struct EventWithReducedRights<T0> {
18669 pub h: T0,
18670 }
18671
18672 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
18673 for EventWithReducedRights<T0>
18674 where
18675 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18676 ___E: ::fidl_next::fuchsia::HandleEncoder,
18677 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18678 {
18679 #[inline]
18680 fn encode(
18681 self,
18682 encoder_: &mut ___E,
18683 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
18684 _: (),
18685 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18686 ::fidl_next::munge! {
18687 let crate::wire::EventWithReducedRights {
18688 h,
18689
18690 } = out_;
18691 }
18692
18693 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18694
18695 Ok(())
18696 }
18697 }
18698
18699 pub struct FidlvizDemo<
18701 T0,
18702 T1,
18703 T2,
18704 T3,
18705 T4,
18706 T5,
18707 T6,
18708 T7,
18709 T8,
18710 T9,
18711 T10,
18712 T11,
18713 T12,
18714 T13,
18715 T14,
18716 T15,
18717 T16,
18718 T17,
18719 T18,
18720 T19,
18721 T20,
18722 T21,
18723 T22,
18724 T23,
18725 T24,
18726 T25,
18727 T26,
18728 T27,
18729 T28,
18730 T29,
18731 T30,
18732 > {
18733 pub f1: T0,
18734
18735 pub f2: T1,
18736
18737 pub f3: T2,
18738
18739 pub f4: T3,
18740
18741 pub f5: T4,
18742
18743 pub f6: T5,
18744
18745 pub f7: T6,
18746
18747 pub f8: T7,
18748
18749 pub f9: T8,
18750
18751 pub f10: T9,
18752
18753 pub f11: T10,
18754
18755 pub f12: T11,
18756
18757 pub f13: T12,
18758
18759 pub f14: T13,
18760
18761 pub f15: T14,
18762
18763 pub f16: T15,
18764
18765 pub f17: T16,
18766
18767 pub f18: T17,
18768
18769 pub f19: T18,
18770
18771 pub f20: T19,
18772
18773 pub f21: T20,
18774
18775 pub f22: T21,
18776
18777 pub f23: T22,
18778
18779 pub f24: T23,
18780
18781 pub f25: T24,
18782
18783 pub f26: T25,
18784
18785 pub f27: T26,
18786
18787 pub f28: T27,
18788
18789 pub f29: T28,
18790
18791 pub f30: T29,
18792
18793 pub f31: T30,
18794 }
18795
18796 unsafe impl<
18797 ___E,
18798 T0,
18799 T1,
18800 T2,
18801 T3,
18802 T4,
18803 T5,
18804 T6,
18805 T7,
18806 T8,
18807 T9,
18808 T10,
18809 T11,
18810 T12,
18811 T13,
18812 T14,
18813 T15,
18814 T16,
18815 T17,
18816 T18,
18817 T19,
18818 T20,
18819 T21,
18820 T22,
18821 T23,
18822 T24,
18823 T25,
18824 T26,
18825 T27,
18826 T28,
18827 T29,
18828 T30,
18829 > ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>
18830 for FidlvizDemo<
18831 T0,
18832 T1,
18833 T2,
18834 T3,
18835 T4,
18836 T5,
18837 T6,
18838 T7,
18839 T8,
18840 T9,
18841 T10,
18842 T11,
18843 T12,
18844 T13,
18845 T14,
18846 T15,
18847 T16,
18848 T17,
18849 T18,
18850 T19,
18851 T20,
18852 T21,
18853 T22,
18854 T23,
18855 T24,
18856 T25,
18857 T26,
18858 T27,
18859 T28,
18860 T29,
18861 T30,
18862 >
18863 where
18864 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18865 ___E: ::fidl_next::Encoder,
18866 ___E: ::fidl_next::fuchsia::HandleEncoder,
18867 T0: ::fidl_next::Encode<u8, ___E>,
18868 T1: ::fidl_next::Encode<i8, ___E>,
18869 T2: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
18870 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18871 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18872 T5: ::fidl_next::Encode<u8, ___E>,
18873 T6: ::fidl_next::Encode<u8, ___E>,
18874 T7: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
18875 T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
18876 T9: ::fidl_next::Encode<::fidl_next::wire::Float64, ___E>,
18877 T10: ::fidl_next::Encode<bool, ___E>,
18878 T11: ::fidl_next::Encode<bool, ___E>,
18879 T12: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18880 T13: ::fidl_next::Encode<::fidl_next::wire::OptionalString<'static>, ___E>,
18881 T14: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18882 T15: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18883 T16: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18884 T17: ::fidl_next::Encode<[u8; 3], ___E>,
18885 T18: ::fidl_next::Encode<
18886 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Float64>,
18887 ___E,
18888 >,
18889 T19: ::fidl_next::Encode<::fidl_next::wire::OptionalVector<'static, u8>, ___E>,
18890 T20: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
18891 T21: ::fidl_next::Encode<crate::wire::FidlvizBits, ___E>,
18892 T22: ::fidl_next::Encode<crate::wire::FidlvizEnum, ___E>,
18893 T23: ::fidl_next::Encode<crate::wire::FidlvizStruct1, ___E>,
18894 T24: ::fidl_next::Encode<crate::wire::FidlvizStruct2, ___E>,
18895 T25:
18896 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct1>, ___E>,
18897 T26:
18898 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct2>, ___E>,
18899 T27: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
18900 T28: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
18901 T29: ::fidl_next::Encode<crate::wire_optional::FidlvizUnion<'static>, ___E>,
18902 T30: ::fidl_next::Encode<crate::wire::FidlvizUnion<'static>, ___E>,
18903 {
18904 #[inline]
18905 fn encode(
18906 self,
18907 encoder_: &mut ___E,
18908 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
18909 _: (),
18910 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18911 ::fidl_next::munge! {
18912 let crate::wire::FidlvizDemo {
18913 f1,
18914 f2,
18915 f3,
18916 f4,
18917 f5,
18918 f6,
18919 f7,
18920 f8,
18921 f9,
18922 f10,
18923 f11,
18924 f12,
18925 f13,
18926 f14,
18927 f15,
18928 f16,
18929 f17,
18930 f18,
18931 f19,
18932 f20,
18933 f21,
18934 f22,
18935 f23,
18936 f24,
18937 f25,
18938 f26,
18939 f27,
18940 f28,
18941 f29,
18942 f30,
18943 f31,
18944
18945 } = out_;
18946 }
18947
18948 ::fidl_next::Encode::encode(self.f1, encoder_, f1, ())?;
18949
18950 ::fidl_next::Encode::encode(self.f2, encoder_, f2, ())?;
18951
18952 ::fidl_next::Encode::encode(self.f3, encoder_, f3, ())?;
18953
18954 ::fidl_next::Encode::encode(self.f4, encoder_, f4, ())?;
18955
18956 ::fidl_next::Encode::encode(self.f5, encoder_, f5, ())?;
18957
18958 ::fidl_next::Encode::encode(self.f6, encoder_, f6, ())?;
18959
18960 ::fidl_next::Encode::encode(self.f7, encoder_, f7, ())?;
18961
18962 ::fidl_next::Encode::encode(self.f8, encoder_, f8, ())?;
18963
18964 ::fidl_next::Encode::encode(self.f9, encoder_, f9, ())?;
18965
18966 ::fidl_next::Encode::encode(self.f10, encoder_, f10, ())?;
18967
18968 ::fidl_next::Encode::encode(self.f11, encoder_, f11, ())?;
18969
18970 ::fidl_next::Encode::encode(self.f12, encoder_, f12, ())?;
18971
18972 ::fidl_next::Encode::encode(self.f13, encoder_, f13, 4294967295)?;
18973
18974 ::fidl_next::Encode::encode(self.f14, encoder_, f14, 4294967295)?;
18975
18976 ::fidl_next::Encode::encode(self.f15, encoder_, f15, 4294967295)?;
18977
18978 ::fidl_next::Encode::encode(self.f16, encoder_, f16, ())?;
18979
18980 ::fidl_next::Encode::encode(self.f17, encoder_, f17, ())?;
18981
18982 ::fidl_next::Encode::encode(self.f18, encoder_, f18, ())?;
18983
18984 ::fidl_next::Encode::encode(self.f19, encoder_, f19, (4294967295, ()))?;
18985
18986 ::fidl_next::Encode::encode(self.f20, encoder_, f20, (4294967295, ()))?;
18987
18988 ::fidl_next::Encode::encode(self.f21, encoder_, f21, (4294967295, ()))?;
18989
18990 ::fidl_next::Encode::encode(self.f22, encoder_, f22, ())?;
18991
18992 ::fidl_next::Encode::encode(self.f23, encoder_, f23, ())?;
18993
18994 ::fidl_next::Encode::encode(self.f24, encoder_, f24, ())?;
18995
18996 ::fidl_next::Encode::encode(self.f25, encoder_, f25, ())?;
18997
18998 ::fidl_next::Encode::encode(self.f26, encoder_, f26, ())?;
18999
19000 ::fidl_next::Encode::encode(self.f27, encoder_, f27, ())?;
19001
19002 ::fidl_next::Encode::encode(self.f28, encoder_, f28, ())?;
19003
19004 ::fidl_next::Encode::encode(self.f29, encoder_, f29, ())?;
19005
19006 ::fidl_next::Encode::encode(self.f30, encoder_, f30, ())?;
19007
19008 ::fidl_next::Encode::encode(self.f31, encoder_, f31, ())?;
19009
19010 Ok(())
19011 }
19012 }
19013
19014 pub struct GoldenHandleBasicRightsStruct<T0> {
19016 pub v: T0,
19017 }
19018
19019 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
19020 for GoldenHandleBasicRightsStruct<T0>
19021 where
19022 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19023 ___E: ::fidl_next::fuchsia::HandleEncoder,
19024 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
19025 {
19026 #[inline]
19027 fn encode(
19028 self,
19029 encoder_: &mut ___E,
19030 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
19031 _: (),
19032 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19033 ::fidl_next::munge! {
19034 let crate::wire::GoldenHandleBasicRightsStruct {
19035 v,
19036
19037 } = out_;
19038 }
19039
19040 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
19041
19042 Ok(())
19043 }
19044 }
19045
19046 pub struct GoldenNullableHandleStruct<T0> {
19048 pub v: T0,
19049 }
19050
19051 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
19052 for GoldenNullableHandleStruct<T0>
19053 where
19054 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19055 ___E: ::fidl_next::fuchsia::HandleEncoder,
19056 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
19057 {
19058 #[inline]
19059 fn encode(
19060 self,
19061 encoder_: &mut ___E,
19062 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
19063 _: (),
19064 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19065 ::fidl_next::munge! {
19066 let crate::wire::GoldenNullableHandleStruct {
19067 v,
19068
19069 } = out_;
19070 }
19071
19072 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
19073
19074 Ok(())
19075 }
19076 }
19077
19078 pub struct MultipleBoundedNonnullableVectorsOfHandles<T0, T1> {
19080 pub vh0: T0,
19081
19082 pub vh1: T1,
19083 }
19084
19085 unsafe impl<___E, T0, T1>
19086 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
19087 for MultipleBoundedNonnullableVectorsOfHandles<T0, T1>
19088 where
19089 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19090 ___E: ::fidl_next::Encoder,
19091 ___E: ::fidl_next::fuchsia::HandleEncoder,
19092 T0: ::fidl_next::Encode<
19093 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19094 ___E,
19095 >,
19096 T1: ::fidl_next::Encode<
19097 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19098 ___E,
19099 >,
19100 {
19101 #[inline]
19102 fn encode(
19103 self,
19104 encoder_: &mut ___E,
19105 out_: &mut ::core::mem::MaybeUninit<
19106 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
19107 >,
19108 _: (),
19109 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19110 ::fidl_next::munge! {
19111 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
19112 vh0,
19113 vh1,
19114
19115 } = out_;
19116 }
19117
19118 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
19119
19120 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
19121
19122 Ok(())
19123 }
19124 }
19125
19126 pub struct MultipleBoundedNullableVectorsOfHandles<T0, T1> {
19128 pub vh0: T0,
19129
19130 pub vh1: T1,
19131 }
19132
19133 unsafe impl<___E, T0, T1>
19134 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
19135 for MultipleBoundedNullableVectorsOfHandles<T0, T1>
19136 where
19137 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19138 ___E: ::fidl_next::Encoder,
19139 ___E: ::fidl_next::fuchsia::HandleEncoder,
19140 T0: ::fidl_next::Encode<
19141 ::fidl_next::wire::OptionalVector<
19142 'static,
19143 ::fidl_next::wire::fuchsia::NullableHandle,
19144 >,
19145 ___E,
19146 >,
19147 T1: ::fidl_next::Encode<
19148 ::fidl_next::wire::OptionalVector<
19149 'static,
19150 ::fidl_next::wire::fuchsia::NullableHandle,
19151 >,
19152 ___E,
19153 >,
19154 {
19155 #[inline]
19156 fn encode(
19157 self,
19158 encoder_: &mut ___E,
19159 out_: &mut ::core::mem::MaybeUninit<
19160 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
19161 >,
19162 _: (),
19163 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19164 ::fidl_next::munge! {
19165 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
19166 vh0,
19167 vh1,
19168
19169 } = out_;
19170 }
19171
19172 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
19173
19174 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
19175
19176 Ok(())
19177 }
19178 }
19179
19180 pub struct MultipleHandleSubtypes<T0, T1, T2> {
19182 pub untyped: T0,
19183
19184 pub event: T1,
19185
19186 pub channel: T2,
19187 }
19188
19189 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
19190 for MultipleHandleSubtypes<T0, T1, T2>
19191 where
19192 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19193 ___E: ::fidl_next::fuchsia::HandleEncoder,
19194 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
19195 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
19196 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
19197 {
19198 #[inline]
19199 fn encode(
19200 self,
19201 encoder_: &mut ___E,
19202 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
19203 _: (),
19204 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19205 ::fidl_next::munge! {
19206 let crate::wire::MultipleHandleSubtypes {
19207 untyped,
19208 event,
19209 channel,
19210
19211 } = out_;
19212 }
19213
19214 ::fidl_next::Encode::encode(self.untyped, encoder_, untyped, ())?;
19215
19216 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
19217
19218 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
19219
19220 Ok(())
19221 }
19222 }
19223
19224 pub struct MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5> {
19226 pub data0: T0,
19227
19228 pub handle0: T1,
19229
19230 pub data1: T2,
19231
19232 pub handle1: T3,
19233
19234 pub handle2: T4,
19235
19236 pub data2: T5,
19237 }
19238
19239 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
19240 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
19241 for MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5>
19242 where
19243 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19244 ___E: ::fidl_next::fuchsia::HandleEncoder,
19245 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19246 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
19247 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
19248 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
19249 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
19250 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
19251 {
19252 #[inline]
19253 fn encode(
19254 self,
19255 encoder_: &mut ___E,
19256 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
19257 _: (),
19258 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19259 ::fidl_next::munge! {
19260 let crate::wire::MultipleNonnullableHandles {
19261 data0,
19262 handle0,
19263 data1,
19264 handle1,
19265 handle2,
19266 data2,
19267
19268 } = out_;
19269 }
19270
19271 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
19272
19273 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
19274
19275 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
19276
19277 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
19278
19279 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
19280
19281 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
19282
19283 Ok(())
19284 }
19285 }
19286
19287 pub struct MultipleNullableHandles<T0, T1, T2, T3, T4, T5> {
19289 pub data0: T0,
19290
19291 pub handle0: T1,
19292
19293 pub data1: T2,
19294
19295 pub handle1: T3,
19296
19297 pub handle2: T4,
19298
19299 pub data2: T5,
19300 }
19301
19302 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
19303 ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
19304 for MultipleNullableHandles<T0, T1, T2, T3, T4, T5>
19305 where
19306 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19307 ___E: ::fidl_next::fuchsia::HandleEncoder,
19308 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19309 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
19310 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
19311 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
19312 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
19313 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
19314 {
19315 #[inline]
19316 fn encode(
19317 self,
19318 encoder_: &mut ___E,
19319 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
19320 _: (),
19321 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19322 ::fidl_next::munge! {
19323 let crate::wire::MultipleNullableHandles {
19324 data0,
19325 handle0,
19326 data1,
19327 handle1,
19328 handle2,
19329 data2,
19330
19331 } = out_;
19332 }
19333
19334 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
19335
19336 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
19337
19338 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
19339
19340 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
19341
19342 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
19343
19344 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
19345
19346 Ok(())
19347 }
19348 }
19349
19350 pub struct NonnullableHandle<T0> {
19352 pub h: T0,
19353 }
19354
19355 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>
19356 for NonnullableHandle<T0>
19357 where
19358 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19359 ___E: ::fidl_next::fuchsia::HandleEncoder,
19360 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
19361 {
19362 #[inline]
19363 fn encode(
19364 self,
19365 encoder_: &mut ___E,
19366 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
19367 _: (),
19368 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19369 ::fidl_next::munge! {
19370 let crate::wire::NonnullableHandle {
19371 h,
19372
19373 } = out_;
19374 }
19375
19376 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
19377
19378 Ok(())
19379 }
19380 }
19381
19382 pub struct NonnullableHandleArray<T0> {
19384 pub handles: T0,
19385 }
19386
19387 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
19388 for NonnullableHandleArray<T0>
19389 where
19390 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19391 ___E: ::fidl_next::fuchsia::HandleEncoder,
19392 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
19393 {
19394 #[inline]
19395 fn encode(
19396 self,
19397 encoder_: &mut ___E,
19398 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
19399 _: (),
19400 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19401 ::fidl_next::munge! {
19402 let crate::wire::NonnullableHandleArray {
19403 handles,
19404
19405 } = out_;
19406 }
19407
19408 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
19409
19410 Ok(())
19411 }
19412 }
19413
19414 pub struct NullableHandle<T0> {
19416 pub h: T0,
19417 }
19418
19419 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NullableHandle, ___E> for NullableHandle<T0>
19420 where
19421 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19422 ___E: ::fidl_next::fuchsia::HandleEncoder,
19423 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
19424 {
19425 #[inline]
19426 fn encode(
19427 self,
19428 encoder_: &mut ___E,
19429 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
19430 _: (),
19431 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19432 ::fidl_next::munge! {
19433 let crate::wire::NullableHandle {
19434 h,
19435
19436 } = out_;
19437 }
19438
19439 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
19440
19441 Ok(())
19442 }
19443 }
19444
19445 pub struct OutOfLineArrayOfNonnullableHandles<T0> {
19447 pub handles: T0,
19448 }
19449
19450 unsafe impl<___E, T0>
19451 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
19452 for OutOfLineArrayOfNonnullableHandles<T0>
19453 where
19454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19455 ___E: ::fidl_next::Encoder,
19456 ___E: ::fidl_next::fuchsia::HandleEncoder,
19457 T0: ::fidl_next::Encode<
19458 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
19459 ___E,
19460 >,
19461 {
19462 #[inline]
19463 fn encode(
19464 self,
19465 encoder_: &mut ___E,
19466 out_: &mut ::core::mem::MaybeUninit<
19467 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
19468 >,
19469 _: (),
19470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19471 ::fidl_next::munge! {
19472 let crate::wire::OutOfLineArrayOfNonnullableHandles {
19473 handles,
19474
19475 } = out_;
19476 }
19477
19478 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
19479
19480 Ok(())
19481 }
19482 }
19483
19484 pub struct Sandwich6<T0, T1, T2> {
19486 pub before: T0,
19487
19488 pub the_union: T1,
19489
19490 pub after: T2,
19491 }
19492
19493 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>
19494 for Sandwich6<T0, T1, T2>
19495 where
19496 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19497 ___E: ::fidl_next::Encoder,
19498 ___E: ::fidl_next::fuchsia::HandleEncoder,
19499 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19500 T1: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
19501 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19502 {
19503 #[inline]
19504 fn encode(
19505 self,
19506 encoder_: &mut ___E,
19507 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
19508 _: (),
19509 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19510 ::fidl_next::munge! {
19511 let crate::wire::Sandwich6 {
19512 before,
19513 the_union,
19514 after,
19515
19516 } = out_;
19517 }
19518
19519 ::fidl_next::Encode::encode(self.before, encoder_, before, ())?;
19520
19521 ::fidl_next::Encode::encode(self.the_union, encoder_, the_union, ())?;
19522
19523 ::fidl_next::Encode::encode(self.after, encoder_, after, ())?;
19524
19525 Ok(())
19526 }
19527 }
19528
19529 pub struct ShortStringThenHandle<T0, T1> {
19531 pub s: T0,
19532
19533 pub h: T1,
19534 }
19535
19536 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
19537 for ShortStringThenHandle<T0, T1>
19538 where
19539 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19540 ___E: ::fidl_next::Encoder,
19541 ___E: ::fidl_next::fuchsia::HandleEncoder,
19542 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19543 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
19544 {
19545 #[inline]
19546 fn encode(
19547 self,
19548 encoder_: &mut ___E,
19549 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
19550 _: (),
19551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19552 ::fidl_next::munge! {
19553 let crate::wire::ShortStringThenHandle {
19554 s,
19555 h,
19556
19557 } = out_;
19558 }
19559
19560 ::fidl_next::Encode::encode(self.s, encoder_, s, 1)?;
19561
19562 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
19563
19564 Ok(())
19565 }
19566 }
19567
19568 pub struct SingleHandle<T0> {
19570 pub h: T0,
19571 }
19572
19573 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleHandle, ___E> for SingleHandle<T0>
19574 where
19575 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19576 ___E: ::fidl_next::fuchsia::HandleEncoder,
19577 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
19578 {
19579 #[inline]
19580 fn encode(
19581 self,
19582 encoder_: &mut ___E,
19583 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
19584 _: (),
19585 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19586 ::fidl_next::munge! {
19587 let crate::wire::SingleHandle {
19588 h,
19589
19590 } = out_;
19591 }
19592
19593 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
19594
19595 Ok(())
19596 }
19597 }
19598
19599 pub struct SingleOptionalHandle<T0> {
19601 pub h: T0,
19602 }
19603
19604 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
19605 for SingleOptionalHandle<T0>
19606 where
19607 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19608 ___E: ::fidl_next::fuchsia::HandleEncoder,
19609 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
19610 {
19611 #[inline]
19612 fn encode(
19613 self,
19614 encoder_: &mut ___E,
19615 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
19616 _: (),
19617 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19618 ::fidl_next::munge! {
19619 let crate::wire::SingleOptionalHandle {
19620 h,
19621
19622 } = out_;
19623 }
19624
19625 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
19626
19627 Ok(())
19628 }
19629 }
19630
19631 pub struct StructOfEndpoints<T0, T1, T2, T3> {
19633 pub client_end: T0,
19634
19635 pub optional_client_end: T1,
19636
19637 pub server_end: T2,
19638
19639 pub optional_server_end: T3,
19640 }
19641
19642 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>
19643 for StructOfEndpoints<T0, T1, T2, T3>
19644 where
19645 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19646 ___E: ::fidl_next::fuchsia::HandleEncoder,
19647 T0: ::fidl_next::Encode<
19648 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
19649 ___E,
19650 >,
19651 T1: ::fidl_next::Encode<
19652 ::fidl_next::ClientEnd<
19653 crate::Protocol,
19654 ::fidl_next::wire::fuchsia::OptionalChannel,
19655 >,
19656 ___E,
19657 >,
19658 T2: ::fidl_next::Encode<
19659 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
19660 ___E,
19661 >,
19662 T3: ::fidl_next::Encode<
19663 ::fidl_next::ServerEnd<
19664 crate::Protocol,
19665 ::fidl_next::wire::fuchsia::OptionalChannel,
19666 >,
19667 ___E,
19668 >,
19669 {
19670 #[inline]
19671 fn encode(
19672 self,
19673 encoder_: &mut ___E,
19674 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
19675 _: (),
19676 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19677 ::fidl_next::munge! {
19678 let crate::wire::StructOfEndpoints {
19679 client_end,
19680 optional_client_end,
19681 server_end,
19682 optional_server_end,
19683
19684 } = out_;
19685 }
19686
19687 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
19688
19689 ::fidl_next::Encode::encode(
19690 self.optional_client_end,
19691 encoder_,
19692 optional_client_end,
19693 (),
19694 )?;
19695
19696 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
19697
19698 ::fidl_next::Encode::encode(
19699 self.optional_server_end,
19700 encoder_,
19701 optional_server_end,
19702 (),
19703 )?;
19704
19705 Ok(())
19706 }
19707 }
19708
19709 pub struct StructOfOptionalUnionOfHandle<T0> {
19711 pub u: T0,
19712 }
19713
19714 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
19715 for StructOfOptionalUnionOfHandle<T0>
19716 where
19717 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19718 ___E: ::fidl_next::fuchsia::HandleEncoder,
19719 T0: ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>,
19720 {
19721 #[inline]
19722 fn encode(
19723 self,
19724 encoder_: &mut ___E,
19725 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
19726 _: (),
19727 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19728 ::fidl_next::munge! {
19729 let crate::wire::StructOfOptionalUnionOfHandle {
19730 u,
19731
19732 } = out_;
19733 }
19734
19735 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19736
19737 Ok(())
19738 }
19739 }
19740
19741 pub struct StructOfSimpleResourceTable<T0> {
19743 pub table: T0,
19744 }
19745
19746 unsafe impl<___E, T0>
19747 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
19748 for StructOfSimpleResourceTable<T0>
19749 where
19750 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19751 ___E: ::fidl_next::Encoder,
19752 ___E: ::fidl_next::fuchsia::HandleEncoder,
19753 T0: ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>,
19754 {
19755 #[inline]
19756 fn encode(
19757 self,
19758 encoder_: &mut ___E,
19759 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
19760 _: (),
19761 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19762 ::fidl_next::munge! {
19763 let crate::wire::StructOfSimpleResourceTable {
19764 table,
19765
19766 } = out_;
19767 }
19768
19769 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19770
19771 Ok(())
19772 }
19773 }
19774
19775 pub struct TableFieldInlinedHandleStruct<T0> {
19777 pub t: T0,
19778 }
19779
19780 unsafe impl<___E, T0>
19781 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
19782 for TableFieldInlinedHandleStruct<T0>
19783 where
19784 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19785 ___E: ::fidl_next::Encoder,
19786 ___E: ::fidl_next::fuchsia::HandleEncoder,
19787 T0: ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>,
19788 {
19789 #[inline]
19790 fn encode(
19791 self,
19792 encoder_: &mut ___E,
19793 out_: &mut ::core::mem::MaybeUninit<
19794 crate::wire::TableFieldInlinedHandleStruct<'static>,
19795 >,
19796 _: (),
19797 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19798 ::fidl_next::munge! {
19799 let crate::wire::TableFieldInlinedHandleStruct {
19800 t,
19801
19802 } = out_;
19803 }
19804
19805 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19806
19807 Ok(())
19808 }
19809 }
19810
19811 pub struct TableFieldUnknownResourceStruct<T0> {
19813 pub t: T0,
19814 }
19815
19816 unsafe impl<___E, T0>
19817 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
19818 for TableFieldUnknownResourceStruct<T0>
19819 where
19820 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19821 ___E: ::fidl_next::Encoder,
19822 ___E: ::fidl_next::fuchsia::HandleEncoder,
19823 T0: ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>,
19824 {
19825 #[inline]
19826 fn encode(
19827 self,
19828 encoder_: &mut ___E,
19829 out_: &mut ::core::mem::MaybeUninit<
19830 crate::wire::TableFieldUnknownResourceStruct<'static>,
19831 >,
19832 _: (),
19833 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19834 ::fidl_next::munge! {
19835 let crate::wire::TableFieldUnknownResourceStruct {
19836 t,
19837
19838 } = out_;
19839 }
19840
19841 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19842
19843 Ok(())
19844 }
19845 }
19846
19847 pub struct TableOfEndpoints<T0> {
19849 pub t: T0,
19850 }
19851
19852 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
19853 for TableOfEndpoints<T0>
19854 where
19855 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19856 ___E: ::fidl_next::Encoder,
19857 ___E: ::fidl_next::fuchsia::HandleEncoder,
19858 T0: ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>,
19859 {
19860 #[inline]
19861 fn encode(
19862 self,
19863 encoder_: &mut ___E,
19864 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
19865 _: (),
19866 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19867 ::fidl_next::munge! {
19868 let crate::wire::TableOfEndpoints {
19869 t,
19870
19871 } = out_;
19872 }
19873
19874 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19875
19876 Ok(())
19877 }
19878 }
19879
19880 pub struct TableUnionWithVectorReservedSandwichStruct<T0> {
19882 pub table: T0,
19883 }
19884
19885 unsafe impl<___E, T0>
19886 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
19887 for TableUnionWithVectorReservedSandwichStruct<T0>
19888 where
19889 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19890 ___E: ::fidl_next::Encoder,
19891 ___E: ::fidl_next::fuchsia::HandleEncoder,
19892 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>,
19893 {
19894 #[inline]
19895 fn encode(
19896 self,
19897 encoder_: &mut ___E,
19898 out_: &mut ::core::mem::MaybeUninit<
19899 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
19900 >,
19901 _: (),
19902 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19903 ::fidl_next::munge! {
19904 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
19905 table,
19906
19907 } = out_;
19908 }
19909
19910 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19911
19912 Ok(())
19913 }
19914 }
19915
19916 pub struct TableUnionWithVectorStructSandwichStruct<T0> {
19918 pub table: T0,
19919 }
19920
19921 unsafe impl<___E, T0>
19922 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
19923 for TableUnionWithVectorStructSandwichStruct<T0>
19924 where
19925 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19926 ___E: ::fidl_next::Encoder,
19927 ___E: ::fidl_next::fuchsia::HandleEncoder,
19928 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>,
19929 {
19930 #[inline]
19931 fn encode(
19932 self,
19933 encoder_: &mut ___E,
19934 out_: &mut ::core::mem::MaybeUninit<
19935 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
19936 >,
19937 _: (),
19938 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19939 ::fidl_next::munge! {
19940 let crate::wire::TableUnionWithVectorStructSandwichStruct {
19941 table,
19942
19943 } = out_;
19944 }
19945
19946 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19947
19948 Ok(())
19949 }
19950 }
19951
19952 pub struct TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<T0> {
19954 pub t: T0,
19955 }
19956
19957 unsafe impl<___E, T0>
19958 ::fidl_next::Encode<
19959 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
19960 ___E,
19961 > for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<T0>
19962 where
19963 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19964 ___E: ::fidl_next::Encoder,
19965 ___E: ::fidl_next::fuchsia::HandleEncoder,
19966 T0: ::fidl_next::Encode<
19967 crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'static>,
19968 ___E,
19969 >,
19970 {
19971 #[inline]
19972 fn encode(
19973 self,
19974 encoder_: &mut ___E,
19975 out_: &mut ::core::mem::MaybeUninit<
19976 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
19977 >,
19978 _: (),
19979 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19980 ::fidl_next::munge! {
19981 let crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
19982 t,
19983
19984 } = out_;
19985 }
19986
19987 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19988
19989 Ok(())
19990 }
19991 }
19992
19993 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<T0> {
19995 pub t: T0,
19996 }
19997
19998 unsafe impl<___E, T0>
19999 ::fidl_next::Encode<
20000 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
20001 ___E,
20002 > for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<T0>
20003 where
20004 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20005 ___E: ::fidl_next::Encoder,
20006 ___E: ::fidl_next::fuchsia::HandleEncoder,
20007 T0: ::fidl_next::Encode<
20008 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static>,
20009 ___E,
20010 >,
20011 {
20012 #[inline]
20013 fn encode(
20014 self,
20015 encoder_: &mut ___E,
20016 out_: &mut ::core::mem::MaybeUninit<
20017 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
20018 >,
20019 _: (),
20020 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20021 ::fidl_next::munge! {
20022 let crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
20023 t,
20024
20025 } = out_;
20026 }
20027
20028 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
20029
20030 Ok(())
20031 }
20032 }
20033
20034 pub struct TestFlexibleResourceXUnionInStruct<T0> {
20036 pub xu: T0,
20037 }
20038
20039 unsafe impl<___E, T0>
20040 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
20041 for TestFlexibleResourceXUnionInStruct<T0>
20042 where
20043 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20044 ___E: ::fidl_next::Encoder,
20045 ___E: ::fidl_next::fuchsia::HandleEncoder,
20046 T0: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
20047 {
20048 #[inline]
20049 fn encode(
20050 self,
20051 encoder_: &mut ___E,
20052 out_: &mut ::core::mem::MaybeUninit<
20053 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
20054 >,
20055 _: (),
20056 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20057 ::fidl_next::munge! {
20058 let crate::wire::TestFlexibleResourceXUnionInStruct {
20059 xu,
20060
20061 } = out_;
20062 }
20063
20064 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
20065
20066 Ok(())
20067 }
20068 }
20069
20070 pub struct TestOptionalFlexibleResourceXUnionInStruct<T0> {
20072 pub xu: T0,
20073 }
20074
20075 unsafe impl<___E, T0>
20076 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
20077 for TestOptionalFlexibleResourceXUnionInStruct<T0>
20078 where
20079 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20080 ___E: ::fidl_next::Encoder,
20081 ___E: ::fidl_next::fuchsia::HandleEncoder,
20082 T0: ::fidl_next::Encode<crate::wire_optional::SampleResourceXUnion<'static>, ___E>,
20083 {
20084 #[inline]
20085 fn encode(
20086 self,
20087 encoder_: &mut ___E,
20088 out_: &mut ::core::mem::MaybeUninit<
20089 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
20090 >,
20091 _: (),
20092 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20093 ::fidl_next::munge! {
20094 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
20095 xu,
20096
20097 } = out_;
20098 }
20099
20100 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
20101
20102 Ok(())
20103 }
20104 }
20105
20106 pub struct TestOptionalStrictResourceXUnionInStruct<T0> {
20108 pub xu: T0,
20109 }
20110
20111 unsafe impl<___E, T0>
20112 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
20113 for TestOptionalStrictResourceXUnionInStruct<T0>
20114 where
20115 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20116 ___E: ::fidl_next::Encoder,
20117 ___E: ::fidl_next::fuchsia::HandleEncoder,
20118 T0: ::fidl_next::Encode<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>,
20119 {
20120 #[inline]
20121 fn encode(
20122 self,
20123 encoder_: &mut ___E,
20124 out_: &mut ::core::mem::MaybeUninit<
20125 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
20126 >,
20127 _: (),
20128 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20129 ::fidl_next::munge! {
20130 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
20131 xu,
20132
20133 } = out_;
20134 }
20135
20136 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
20137
20138 Ok(())
20139 }
20140 }
20141
20142 pub struct TestPackageResolverResolveRequest<T0, T1, T2, T3> {
20144 pub package_url: T0,
20145
20146 pub selectors: T1,
20147
20148 pub update_policy: T2,
20149
20150 pub this_should_be_a_handle: T3,
20151 }
20152
20153 unsafe impl<___E, T0, T1, T2, T3>
20154 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
20155 for TestPackageResolverResolveRequest<T0, T1, T2, T3>
20156 where
20157 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20158 ___E: ::fidl_next::Encoder,
20159 ___E: ::fidl_next::fuchsia::HandleEncoder,
20160 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
20161 T1: ::fidl_next::Encode<
20162 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
20163 ___E,
20164 >,
20165 T2: ::fidl_next::Encode<crate::wire::UpdatePolicy, ___E>,
20166 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20167 {
20168 #[inline]
20169 fn encode(
20170 self,
20171 encoder_: &mut ___E,
20172 out_: &mut ::core::mem::MaybeUninit<
20173 crate::wire::TestPackageResolverResolveRequest<'static>,
20174 >,
20175 _: (),
20176 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20177 ::fidl_next::munge! {
20178 let crate::wire::TestPackageResolverResolveRequest {
20179 package_url,
20180 selectors,
20181 update_policy,
20182 this_should_be_a_handle,
20183
20184 } = out_;
20185 }
20186
20187 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
20188
20189 ::fidl_next::Encode::encode(
20190 self.selectors,
20191 encoder_,
20192 selectors,
20193 (4294967295, 4294967295),
20194 )?;
20195
20196 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
20197
20198 ::fidl_next::Encode::encode(
20199 self.this_should_be_a_handle,
20200 encoder_,
20201 this_should_be_a_handle,
20202 (),
20203 )?;
20204
20205 Ok(())
20206 }
20207 }
20208
20209 pub struct TestStrictResourceXUnionInStruct<T0> {
20211 pub xu: T0,
20212 }
20213
20214 unsafe impl<___E, T0>
20215 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
20216 for TestStrictResourceXUnionInStruct<T0>
20217 where
20218 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20219 ___E: ::fidl_next::Encoder,
20220 ___E: ::fidl_next::fuchsia::HandleEncoder,
20221 T0: ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
20222 {
20223 #[inline]
20224 fn encode(
20225 self,
20226 encoder_: &mut ___E,
20227 out_: &mut ::core::mem::MaybeUninit<
20228 crate::wire::TestStrictResourceXUnionInStruct<'static>,
20229 >,
20230 _: (),
20231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20232 ::fidl_next::munge! {
20233 let crate::wire::TestStrictResourceXUnionInStruct {
20234 xu,
20235
20236 } = out_;
20237 }
20238
20239 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
20240
20241 Ok(())
20242 }
20243 }
20244
20245 pub struct UnboundedNonnullableVectorOfHandles<T0> {
20247 pub vh0: T0,
20248 }
20249
20250 unsafe impl<___E, T0>
20251 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
20252 for UnboundedNonnullableVectorOfHandles<T0>
20253 where
20254 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20255 ___E: ::fidl_next::Encoder,
20256 ___E: ::fidl_next::fuchsia::HandleEncoder,
20257 T0: ::fidl_next::Encode<
20258 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
20259 ___E,
20260 >,
20261 {
20262 #[inline]
20263 fn encode(
20264 self,
20265 encoder_: &mut ___E,
20266 out_: &mut ::core::mem::MaybeUninit<
20267 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
20268 >,
20269 _: (),
20270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20271 ::fidl_next::munge! {
20272 let crate::wire::UnboundedNonnullableVectorOfHandles {
20273 vh0,
20274
20275 } = out_;
20276 }
20277
20278 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
20279
20280 Ok(())
20281 }
20282 }
20283
20284 pub struct UnboundedNullableVectorOfHandles<T0> {
20286 pub vh0: T0,
20287 }
20288
20289 unsafe impl<___E, T0>
20290 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
20291 for UnboundedNullableVectorOfHandles<T0>
20292 where
20293 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20294 ___E: ::fidl_next::Encoder,
20295 ___E: ::fidl_next::fuchsia::HandleEncoder,
20296 T0: ::fidl_next::Encode<
20297 ::fidl_next::wire::OptionalVector<
20298 'static,
20299 ::fidl_next::wire::fuchsia::NullableHandle,
20300 >,
20301 ___E,
20302 >,
20303 {
20304 #[inline]
20305 fn encode(
20306 self,
20307 encoder_: &mut ___E,
20308 out_: &mut ::core::mem::MaybeUninit<
20309 crate::wire::UnboundedNullableVectorOfHandles<'static>,
20310 >,
20311 _: (),
20312 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20313 ::fidl_next::munge! {
20314 let crate::wire::UnboundedNullableVectorOfHandles {
20315 vh0,
20316
20317 } = out_;
20318 }
20319
20320 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
20321
20322 Ok(())
20323 }
20324 }
20325
20326 pub struct UnionOfEndpoints<T0> {
20328 pub u: T0,
20329 }
20330
20331 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
20332 for UnionOfEndpoints<T0>
20333 where
20334 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20335 ___E: ::fidl_next::Encoder,
20336 ___E: ::fidl_next::fuchsia::HandleEncoder,
20337 T0: ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
20338 {
20339 #[inline]
20340 fn encode(
20341 self,
20342 encoder_: &mut ___E,
20343 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
20344 _: (),
20345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20346 ::fidl_next::munge! {
20347 let crate::wire::UnionOfEndpoints {
20348 u,
20349
20350 } = out_;
20351 }
20352
20353 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
20354
20355 Ok(())
20356 }
20357 }
20358
20359 pub struct VectorOfArrayOfEventInStructWithDefaultRights<T0> {
20361 pub h: T0,
20362 }
20363
20364 unsafe impl<___E, T0>
20365 ::fidl_next::Encode<
20366 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
20367 ___E,
20368 > for VectorOfArrayOfEventInStructWithDefaultRights<T0>
20369 where
20370 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20371 ___E: ::fidl_next::Encoder,
20372 ___E: ::fidl_next::fuchsia::HandleEncoder,
20373 T0: ::fidl_next::Encode<
20374 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
20375 ___E,
20376 >,
20377 {
20378 #[inline]
20379 fn encode(
20380 self,
20381 encoder_: &mut ___E,
20382 out_: &mut ::core::mem::MaybeUninit<
20383 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
20384 >,
20385 _: (),
20386 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20387 ::fidl_next::munge! {
20388 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
20389 h,
20390
20391 } = out_;
20392 }
20393
20394 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
20395
20396 Ok(())
20397 }
20398 }
20399
20400 pub struct VectorOfArrayOfEventInStructWithReducedRights<T0> {
20402 pub h: T0,
20403 }
20404
20405 unsafe impl<___E, T0>
20406 ::fidl_next::Encode<
20407 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
20408 ___E,
20409 > for VectorOfArrayOfEventInStructWithReducedRights<T0>
20410 where
20411 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20412 ___E: ::fidl_next::Encoder,
20413 ___E: ::fidl_next::fuchsia::HandleEncoder,
20414 T0: ::fidl_next::Encode<
20415 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
20416 ___E,
20417 >,
20418 {
20419 #[inline]
20420 fn encode(
20421 self,
20422 encoder_: &mut ___E,
20423 out_: &mut ::core::mem::MaybeUninit<
20424 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
20425 >,
20426 _: (),
20427 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20428 ::fidl_next::munge! {
20429 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
20430 h,
20431
20432 } = out_;
20433 }
20434
20435 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
20436
20437 Ok(())
20438 }
20439 }
20440
20441 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<T0> {
20443 pub t: T0,
20444 }
20445
20446 unsafe impl<___E, T0>
20447 ::fidl_next::Encode<
20448 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
20449 ___E,
20450 > for VectorOfArrayOfEventInTableWithReducedRightsStruct<T0>
20451 where
20452 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20453 ___E: ::fidl_next::Encoder,
20454 ___E: ::fidl_next::fuchsia::HandleEncoder,
20455 T0: ::fidl_next::Encode<
20456 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
20457 ___E,
20458 >,
20459 {
20460 #[inline]
20461 fn encode(
20462 self,
20463 encoder_: &mut ___E,
20464 out_: &mut ::core::mem::MaybeUninit<
20465 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
20466 >,
20467 _: (),
20468 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20469 ::fidl_next::munge! {
20470 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
20471 t,
20472
20473 } = out_;
20474 }
20475
20476 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
20477
20478 Ok(())
20479 }
20480 }
20481
20482 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0> {
20484 pub u: T0,
20485 }
20486
20487 unsafe impl<___E, T0>
20488 ::fidl_next::Encode<
20489 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
20490 ___E,
20491 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0>
20492 where
20493 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20494 ___E: ::fidl_next::Encoder,
20495 ___E: ::fidl_next::fuchsia::HandleEncoder,
20496 T0: ::fidl_next::Encode<
20497 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
20498 ___E,
20499 >,
20500 {
20501 #[inline]
20502 fn encode(
20503 self,
20504 encoder_: &mut ___E,
20505 out_: &mut ::core::mem::MaybeUninit<
20506 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
20507 >,
20508 _: (),
20509 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20510 ::fidl_next::munge! {
20511 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
20512 u,
20513
20514 } = out_;
20515 }
20516
20517 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
20518
20519 Ok(())
20520 }
20521 }
20522
20523 pub struct VectorOfHandles<T0> {
20525 pub v: T0,
20526 }
20527
20528 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
20529 for VectorOfHandles<T0>
20530 where
20531 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20532 ___E: ::fidl_next::Encoder,
20533 ___E: ::fidl_next::fuchsia::HandleEncoder,
20534 T0: ::fidl_next::Encode<
20535 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
20536 ___E,
20537 >,
20538 {
20539 #[inline]
20540 fn encode(
20541 self,
20542 encoder_: &mut ___E,
20543 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
20544 _: (),
20545 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20546 ::fidl_next::munge! {
20547 let crate::wire::VectorOfHandles {
20548 v,
20549
20550 } = out_;
20551 }
20552
20553 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
20554
20555 Ok(())
20556 }
20557 }
20558
20559 pub struct VectorOfOptionalHandles<T0> {
20561 pub v: T0,
20562 }
20563
20564 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
20565 for VectorOfOptionalHandles<T0>
20566 where
20567 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20568 ___E: ::fidl_next::Encoder,
20569 ___E: ::fidl_next::fuchsia::HandleEncoder,
20570 T0: ::fidl_next::Encode<
20571 ::fidl_next::wire::Vector<
20572 'static,
20573 ::fidl_next::wire::fuchsia::OptionalNullableHandle,
20574 >,
20575 ___E,
20576 >,
20577 {
20578 #[inline]
20579 fn encode(
20580 self,
20581 encoder_: &mut ___E,
20582 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
20583 _: (),
20584 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20585 ::fidl_next::munge! {
20586 let crate::wire::VectorOfOptionalHandles {
20587 v,
20588
20589 } = out_;
20590 }
20591
20592 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
20593
20594 Ok(())
20595 }
20596 }
20597
20598 pub struct VectorOfUpTo2Handles<T0> {
20600 pub v: T0,
20601 }
20602
20603 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
20604 for VectorOfUpTo2Handles<T0>
20605 where
20606 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20607 ___E: ::fidl_next::Encoder,
20608 ___E: ::fidl_next::fuchsia::HandleEncoder,
20609 T0: ::fidl_next::Encode<
20610 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
20611 ___E,
20612 >,
20613 {
20614 #[inline]
20615 fn encode(
20616 self,
20617 encoder_: &mut ___E,
20618 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
20619 _: (),
20620 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20621 ::fidl_next::munge! {
20622 let crate::wire::VectorOfUpTo2Handles {
20623 v,
20624
20625 } = out_;
20626 }
20627
20628 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
20629
20630 Ok(())
20631 }
20632 }
20633}
20634
20635pub use self::natural::*;
20636
20637pub use fidl_next_common_test_conformance::*;