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, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6424 pub struct TestFlexibleResourceXUnionInStruct {
6425 pub xu: crate::natural::SampleResourceXUnion,
6426 }
6427
6428 unsafe impl<___E>
6429 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
6430 for TestFlexibleResourceXUnionInStruct
6431 where
6432 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6433 ___E: ::fidl_next::Encoder,
6434 ___E: ::fidl_next::fuchsia::HandleEncoder,
6435 {
6436 #[inline]
6437 fn encode(
6438 self,
6439 encoder_: &mut ___E,
6440 out_: &mut ::core::mem::MaybeUninit<
6441 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6442 >,
6443 _: (),
6444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6445 ::fidl_next::munge! {
6446 let crate::wire::TestFlexibleResourceXUnionInStruct {
6447 xu,
6448
6449 } = out_;
6450 }
6451
6452 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6453
6454 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6455
6456 Ok(())
6457 }
6458 }
6459
6460 unsafe impl<___E>
6461 ::fidl_next::EncodeOption<
6462 ::fidl_next::wire::Box<
6463 'static,
6464 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6465 >,
6466 ___E,
6467 > for TestFlexibleResourceXUnionInStruct
6468 where
6469 ___E: ::fidl_next::Encoder + ?Sized,
6470 TestFlexibleResourceXUnionInStruct:
6471 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>,
6472 {
6473 #[inline]
6474 fn encode_option(
6475 this: ::core::option::Option<Self>,
6476 encoder: &mut ___E,
6477 out: &mut ::core::mem::MaybeUninit<
6478 ::fidl_next::wire::Box<
6479 'static,
6480 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6481 >,
6482 >,
6483 _: (),
6484 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6485 if let Some(inner) = this {
6486 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6487 ::fidl_next::wire::Box::encode_present(out);
6488 } else {
6489 ::fidl_next::wire::Box::encode_absent(out);
6490 }
6491
6492 Ok(())
6493 }
6494 }
6495
6496 impl<'de> ::fidl_next::FromWire<crate::wire::TestFlexibleResourceXUnionInStruct<'de>>
6497 for TestFlexibleResourceXUnionInStruct
6498 {
6499 #[inline]
6500 fn from_wire(wire: crate::wire::TestFlexibleResourceXUnionInStruct<'de>) -> Self {
6501 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6502 }
6503 }
6504
6505 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6506 pub struct TestOptionalFlexibleResourceXUnionInStruct {
6507 pub xu: ::core::option::Option<::std::boxed::Box<crate::natural::SampleResourceXUnion>>,
6508 }
6509
6510 unsafe impl<___E>
6511 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
6512 for TestOptionalFlexibleResourceXUnionInStruct
6513 where
6514 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6515 ___E: ::fidl_next::Encoder,
6516 ___E: ::fidl_next::fuchsia::HandleEncoder,
6517 {
6518 #[inline]
6519 fn encode(
6520 self,
6521 encoder_: &mut ___E,
6522 out_: &mut ::core::mem::MaybeUninit<
6523 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6524 >,
6525 _: (),
6526 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6527 ::fidl_next::munge! {
6528 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
6529 xu,
6530
6531 } = out_;
6532 }
6533
6534 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6535
6536 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6537
6538 Ok(())
6539 }
6540 }
6541
6542 unsafe impl<___E>
6543 ::fidl_next::EncodeOption<
6544 ::fidl_next::wire::Box<
6545 'static,
6546 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6547 >,
6548 ___E,
6549 > for TestOptionalFlexibleResourceXUnionInStruct
6550 where
6551 ___E: ::fidl_next::Encoder + ?Sized,
6552 TestOptionalFlexibleResourceXUnionInStruct: ::fidl_next::Encode<
6553 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6554 ___E,
6555 >,
6556 {
6557 #[inline]
6558 fn encode_option(
6559 this: ::core::option::Option<Self>,
6560 encoder: &mut ___E,
6561 out: &mut ::core::mem::MaybeUninit<
6562 ::fidl_next::wire::Box<
6563 'static,
6564 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6565 >,
6566 >,
6567 _: (),
6568 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6569 if let Some(inner) = this {
6570 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6571 ::fidl_next::wire::Box::encode_present(out);
6572 } else {
6573 ::fidl_next::wire::Box::encode_absent(out);
6574 }
6575
6576 Ok(())
6577 }
6578 }
6579
6580 impl<'de> ::fidl_next::FromWire<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'de>>
6581 for TestOptionalFlexibleResourceXUnionInStruct
6582 {
6583 #[inline]
6584 fn from_wire(wire: crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'de>) -> Self {
6585 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6586 }
6587 }
6588
6589 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6590 pub struct TestOptionalStrictResourceXUnionInStruct {
6591 pub xu:
6592 ::core::option::Option<::std::boxed::Box<crate::natural::SampleStrictResourceXUnion>>,
6593 }
6594
6595 unsafe impl<___E>
6596 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
6597 for TestOptionalStrictResourceXUnionInStruct
6598 where
6599 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6600 ___E: ::fidl_next::Encoder,
6601 ___E: ::fidl_next::fuchsia::HandleEncoder,
6602 {
6603 #[inline]
6604 fn encode(
6605 self,
6606 encoder_: &mut ___E,
6607 out_: &mut ::core::mem::MaybeUninit<
6608 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6609 >,
6610 _: (),
6611 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6612 ::fidl_next::munge! {
6613 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
6614 xu,
6615
6616 } = out_;
6617 }
6618
6619 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6620
6621 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6622
6623 Ok(())
6624 }
6625 }
6626
6627 unsafe impl<___E>
6628 ::fidl_next::EncodeOption<
6629 ::fidl_next::wire::Box<
6630 'static,
6631 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6632 >,
6633 ___E,
6634 > for TestOptionalStrictResourceXUnionInStruct
6635 where
6636 ___E: ::fidl_next::Encoder + ?Sized,
6637 TestOptionalStrictResourceXUnionInStruct: ::fidl_next::Encode<
6638 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6639 ___E,
6640 >,
6641 {
6642 #[inline]
6643 fn encode_option(
6644 this: ::core::option::Option<Self>,
6645 encoder: &mut ___E,
6646 out: &mut ::core::mem::MaybeUninit<
6647 ::fidl_next::wire::Box<
6648 'static,
6649 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6650 >,
6651 >,
6652 _: (),
6653 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6654 if let Some(inner) = this {
6655 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6656 ::fidl_next::wire::Box::encode_present(out);
6657 } else {
6658 ::fidl_next::wire::Box::encode_absent(out);
6659 }
6660
6661 Ok(())
6662 }
6663 }
6664
6665 impl<'de> ::fidl_next::FromWire<crate::wire::TestOptionalStrictResourceXUnionInStruct<'de>>
6666 for TestOptionalStrictResourceXUnionInStruct
6667 {
6668 #[inline]
6669 fn from_wire(wire: crate::wire::TestOptionalStrictResourceXUnionInStruct<'de>) -> Self {
6670 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6671 }
6672 }
6673
6674 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6675 pub struct TestPackageResolverResolveRequest {
6676 pub package_url: ::std::string::String,
6677
6678 pub selectors: ::std::vec::Vec<::std::string::String>,
6679
6680 pub update_policy: crate::natural::UpdatePolicy,
6681
6682 pub this_should_be_a_handle: u32,
6683 }
6684
6685 unsafe impl<___E>
6686 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
6687 for TestPackageResolverResolveRequest
6688 where
6689 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6690 ___E: ::fidl_next::Encoder,
6691 ___E: ::fidl_next::fuchsia::HandleEncoder,
6692 {
6693 #[inline]
6694 fn encode(
6695 self,
6696 encoder_: &mut ___E,
6697 out_: &mut ::core::mem::MaybeUninit<
6698 crate::wire::TestPackageResolverResolveRequest<'static>,
6699 >,
6700 _: (),
6701 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6702 ::fidl_next::munge! {
6703 let crate::wire::TestPackageResolverResolveRequest {
6704 package_url,
6705 selectors,
6706 update_policy,
6707 this_should_be_a_handle,
6708
6709 } = out_;
6710 }
6711
6712 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
6713
6714 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(package_url.as_mut_ptr()) };
6715 ::fidl_next::Constrained::validate(_field, 4294967295)?;
6716
6717 ::fidl_next::Encode::encode(
6718 self.selectors,
6719 encoder_,
6720 selectors,
6721 (4294967295, 4294967295),
6722 )?;
6723
6724 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(selectors.as_mut_ptr()) };
6725 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
6726
6727 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
6728
6729 let mut _field =
6730 unsafe { ::fidl_next::Slot::new_unchecked(update_policy.as_mut_ptr()) };
6731
6732 ::fidl_next::Encode::encode(
6733 self.this_should_be_a_handle,
6734 encoder_,
6735 this_should_be_a_handle,
6736 (),
6737 )?;
6738
6739 let mut _field =
6740 unsafe { ::fidl_next::Slot::new_unchecked(this_should_be_a_handle.as_mut_ptr()) };
6741
6742 Ok(())
6743 }
6744 }
6745
6746 unsafe impl<___E>
6747 ::fidl_next::EncodeOption<
6748 ::fidl_next::wire::Box<
6749 'static,
6750 crate::wire::TestPackageResolverResolveRequest<'static>,
6751 >,
6752 ___E,
6753 > for TestPackageResolverResolveRequest
6754 where
6755 ___E: ::fidl_next::Encoder + ?Sized,
6756 TestPackageResolverResolveRequest:
6757 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>,
6758 {
6759 #[inline]
6760 fn encode_option(
6761 this: ::core::option::Option<Self>,
6762 encoder: &mut ___E,
6763 out: &mut ::core::mem::MaybeUninit<
6764 ::fidl_next::wire::Box<
6765 'static,
6766 crate::wire::TestPackageResolverResolveRequest<'static>,
6767 >,
6768 >,
6769 _: (),
6770 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6771 if let Some(inner) = this {
6772 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6773 ::fidl_next::wire::Box::encode_present(out);
6774 } else {
6775 ::fidl_next::wire::Box::encode_absent(out);
6776 }
6777
6778 Ok(())
6779 }
6780 }
6781
6782 impl<'de> ::fidl_next::FromWire<crate::wire::TestPackageResolverResolveRequest<'de>>
6783 for TestPackageResolverResolveRequest
6784 {
6785 #[inline]
6786 fn from_wire(wire: crate::wire::TestPackageResolverResolveRequest<'de>) -> Self {
6787 Self {
6788 package_url: ::fidl_next::FromWire::from_wire(wire.package_url),
6789
6790 selectors: ::fidl_next::FromWire::from_wire(wire.selectors),
6791
6792 update_policy: ::fidl_next::FromWire::from_wire(wire.update_policy),
6793
6794 this_should_be_a_handle: ::fidl_next::FromWire::from_wire(
6795 wire.this_should_be_a_handle,
6796 ),
6797 }
6798 }
6799 }
6800
6801 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6802 pub struct TestStrictResourceXUnionInStruct {
6803 pub xu: crate::natural::SampleStrictResourceXUnion,
6804 }
6805
6806 unsafe impl<___E>
6807 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
6808 for TestStrictResourceXUnionInStruct
6809 where
6810 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6811 ___E: ::fidl_next::Encoder,
6812 ___E: ::fidl_next::fuchsia::HandleEncoder,
6813 {
6814 #[inline]
6815 fn encode(
6816 self,
6817 encoder_: &mut ___E,
6818 out_: &mut ::core::mem::MaybeUninit<
6819 crate::wire::TestStrictResourceXUnionInStruct<'static>,
6820 >,
6821 _: (),
6822 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6823 ::fidl_next::munge! {
6824 let crate::wire::TestStrictResourceXUnionInStruct {
6825 xu,
6826
6827 } = out_;
6828 }
6829
6830 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6831
6832 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6833
6834 Ok(())
6835 }
6836 }
6837
6838 unsafe impl<___E>
6839 ::fidl_next::EncodeOption<
6840 ::fidl_next::wire::Box<'static, crate::wire::TestStrictResourceXUnionInStruct<'static>>,
6841 ___E,
6842 > for TestStrictResourceXUnionInStruct
6843 where
6844 ___E: ::fidl_next::Encoder + ?Sized,
6845 TestStrictResourceXUnionInStruct:
6846 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>,
6847 {
6848 #[inline]
6849 fn encode_option(
6850 this: ::core::option::Option<Self>,
6851 encoder: &mut ___E,
6852 out: &mut ::core::mem::MaybeUninit<
6853 ::fidl_next::wire::Box<
6854 'static,
6855 crate::wire::TestStrictResourceXUnionInStruct<'static>,
6856 >,
6857 >,
6858 _: (),
6859 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6860 if let Some(inner) = this {
6861 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6862 ::fidl_next::wire::Box::encode_present(out);
6863 } else {
6864 ::fidl_next::wire::Box::encode_absent(out);
6865 }
6866
6867 Ok(())
6868 }
6869 }
6870
6871 impl<'de> ::fidl_next::FromWire<crate::wire::TestStrictResourceXUnionInStruct<'de>>
6872 for TestStrictResourceXUnionInStruct
6873 {
6874 #[inline]
6875 fn from_wire(wire: crate::wire::TestStrictResourceXUnionInStruct<'de>) -> Self {
6876 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6877 }
6878 }
6879
6880 #[derive(Debug, PartialEq)]
6881 pub struct UnboundedNonnullableVectorOfHandles {
6882 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
6883 }
6884
6885 unsafe impl<___E>
6886 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
6887 for UnboundedNonnullableVectorOfHandles
6888 where
6889 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6890 ___E: ::fidl_next::Encoder,
6891 ___E: ::fidl_next::fuchsia::HandleEncoder,
6892 {
6893 #[inline]
6894 fn encode(
6895 self,
6896 encoder_: &mut ___E,
6897 out_: &mut ::core::mem::MaybeUninit<
6898 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
6899 >,
6900 _: (),
6901 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6902 ::fidl_next::munge! {
6903 let crate::wire::UnboundedNonnullableVectorOfHandles {
6904 vh0,
6905
6906 } = out_;
6907 }
6908
6909 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
6910
6911 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
6912 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
6913
6914 Ok(())
6915 }
6916 }
6917
6918 unsafe impl<___E>
6919 ::fidl_next::EncodeOption<
6920 ::fidl_next::wire::Box<
6921 'static,
6922 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
6923 >,
6924 ___E,
6925 > for UnboundedNonnullableVectorOfHandles
6926 where
6927 ___E: ::fidl_next::Encoder + ?Sized,
6928 UnboundedNonnullableVectorOfHandles:
6929 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>,
6930 {
6931 #[inline]
6932 fn encode_option(
6933 this: ::core::option::Option<Self>,
6934 encoder: &mut ___E,
6935 out: &mut ::core::mem::MaybeUninit<
6936 ::fidl_next::wire::Box<
6937 'static,
6938 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
6939 >,
6940 >,
6941 _: (),
6942 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6943 if let Some(inner) = this {
6944 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6945 ::fidl_next::wire::Box::encode_present(out);
6946 } else {
6947 ::fidl_next::wire::Box::encode_absent(out);
6948 }
6949
6950 Ok(())
6951 }
6952 }
6953
6954 impl<'de> ::fidl_next::FromWire<crate::wire::UnboundedNonnullableVectorOfHandles<'de>>
6955 for UnboundedNonnullableVectorOfHandles
6956 {
6957 #[inline]
6958 fn from_wire(wire: crate::wire::UnboundedNonnullableVectorOfHandles<'de>) -> Self {
6959 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
6960 }
6961 }
6962
6963 #[derive(Debug, PartialEq)]
6964 pub struct UnboundedNullableVectorOfHandles {
6965 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
6966 }
6967
6968 unsafe impl<___E>
6969 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
6970 for UnboundedNullableVectorOfHandles
6971 where
6972 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6973 ___E: ::fidl_next::Encoder,
6974 ___E: ::fidl_next::fuchsia::HandleEncoder,
6975 {
6976 #[inline]
6977 fn encode(
6978 self,
6979 encoder_: &mut ___E,
6980 out_: &mut ::core::mem::MaybeUninit<
6981 crate::wire::UnboundedNullableVectorOfHandles<'static>,
6982 >,
6983 _: (),
6984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6985 ::fidl_next::munge! {
6986 let crate::wire::UnboundedNullableVectorOfHandles {
6987 vh0,
6988
6989 } = out_;
6990 }
6991
6992 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
6993
6994 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
6995 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
6996
6997 Ok(())
6998 }
6999 }
7000
7001 unsafe impl<___E>
7002 ::fidl_next::EncodeOption<
7003 ::fidl_next::wire::Box<'static, crate::wire::UnboundedNullableVectorOfHandles<'static>>,
7004 ___E,
7005 > for UnboundedNullableVectorOfHandles
7006 where
7007 ___E: ::fidl_next::Encoder + ?Sized,
7008 UnboundedNullableVectorOfHandles:
7009 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>,
7010 {
7011 #[inline]
7012 fn encode_option(
7013 this: ::core::option::Option<Self>,
7014 encoder: &mut ___E,
7015 out: &mut ::core::mem::MaybeUninit<
7016 ::fidl_next::wire::Box<
7017 'static,
7018 crate::wire::UnboundedNullableVectorOfHandles<'static>,
7019 >,
7020 >,
7021 _: (),
7022 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7023 if let Some(inner) = this {
7024 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7025 ::fidl_next::wire::Box::encode_present(out);
7026 } else {
7027 ::fidl_next::wire::Box::encode_absent(out);
7028 }
7029
7030 Ok(())
7031 }
7032 }
7033
7034 impl<'de> ::fidl_next::FromWire<crate::wire::UnboundedNullableVectorOfHandles<'de>>
7035 for UnboundedNullableVectorOfHandles
7036 {
7037 #[inline]
7038 fn from_wire(wire: crate::wire::UnboundedNullableVectorOfHandles<'de>) -> Self {
7039 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
7040 }
7041 }
7042
7043 #[derive(Debug, PartialEq)]
7044 pub enum UnionOfEndpointsUnion {
7045 ClientEnd(::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>),
7046
7047 ServerEnd(::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>),
7048
7049 UnknownOrdinal_(u64),
7050 }
7051
7052 impl UnionOfEndpointsUnion {
7053 pub fn is_unknown(&self) -> bool {
7054 #[allow(unreachable_patterns)]
7055 match self {
7056 Self::UnknownOrdinal_(_) => true,
7057 _ => false,
7058 }
7059 }
7060 }
7061
7062 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>
7063 for UnionOfEndpointsUnion
7064 where
7065 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7066 ___E: ::fidl_next::Encoder,
7067 ___E: ::fidl_next::fuchsia::HandleEncoder,
7068 {
7069 #[inline]
7070 fn encode(
7071 self,
7072 encoder: &mut ___E,
7073 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpointsUnion<'static>>,
7074 _: (),
7075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7076 ::fidl_next::munge!(let crate::wire::UnionOfEndpointsUnion { raw, _phantom: _ } = out);
7077
7078 match self {
7079 Self::ClientEnd(value) => ::fidl_next::wire::Union::encode_as::<
7080 ___E,
7081 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
7082 >(value, 1, encoder, raw, ())?,
7083
7084 Self::ServerEnd(value) => ::fidl_next::wire::Union::encode_as::<
7085 ___E,
7086 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
7087 >(value, 2, encoder, raw, ())?,
7088
7089 Self::UnknownOrdinal_(ordinal) => {
7090 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
7091 }
7092 }
7093
7094 Ok(())
7095 }
7096 }
7097
7098 unsafe impl<___E>
7099 ::fidl_next::EncodeOption<crate::wire_optional::UnionOfEndpointsUnion<'static>, ___E>
7100 for UnionOfEndpointsUnion
7101 where
7102 ___E: ?Sized,
7103 UnionOfEndpointsUnion:
7104 ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
7105 {
7106 #[inline]
7107 fn encode_option(
7108 this: ::core::option::Option<Self>,
7109 encoder: &mut ___E,
7110 out: &mut ::core::mem::MaybeUninit<
7111 crate::wire_optional::UnionOfEndpointsUnion<'static>,
7112 >,
7113 _: (),
7114 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7115 ::fidl_next::munge!(let crate::wire_optional::UnionOfEndpointsUnion { raw, _phantom: _ } = &mut *out);
7116
7117 if let Some(inner) = this {
7118 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7119 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7120 } else {
7121 ::fidl_next::wire::Union::encode_absent(raw);
7122 }
7123
7124 Ok(())
7125 }
7126 }
7127
7128 impl<'de> ::fidl_next::FromWire<crate::wire::UnionOfEndpointsUnion<'de>> for UnionOfEndpointsUnion {
7129 #[inline]
7130 fn from_wire(wire: crate::wire::UnionOfEndpointsUnion<'de>) -> Self {
7131 let wire = ::core::mem::ManuallyDrop::new(wire);
7132 match wire.raw.ordinal() {
7133 1 => Self::ClientEnd(::fidl_next::FromWire::from_wire(unsafe {
7134 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
7135 })),
7136
7137 2 => Self::ServerEnd(::fidl_next::FromWire::from_wire(unsafe {
7138 wire.raw.get().read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
7139 })),
7140
7141 ord => return Self::UnknownOrdinal_(ord as u64),
7142 }
7143 }
7144 }
7145
7146 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionOfEndpointsUnion<'de>>
7147 for UnionOfEndpointsUnion
7148 {
7149 #[inline]
7150 fn from_wire_option(
7151 wire: crate::wire_optional::UnionOfEndpointsUnion<'de>,
7152 ) -> ::core::option::Option<Self> {
7153 if let Some(inner) = wire.into_option() {
7154 Some(::fidl_next::FromWire::from_wire(inner))
7155 } else {
7156 None
7157 }
7158 }
7159 }
7160
7161 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionOfEndpointsUnion<'de>>
7162 for Box<UnionOfEndpointsUnion>
7163 {
7164 #[inline]
7165 fn from_wire_option(
7166 wire: crate::wire_optional::UnionOfEndpointsUnion<'de>,
7167 ) -> ::core::option::Option<Self> {
7168 <UnionOfEndpointsUnion as ::fidl_next::FromWireOption<
7169 crate::wire_optional::UnionOfEndpointsUnion<'de>,
7170 >>::from_wire_option(wire)
7171 .map(Box::new)
7172 }
7173 }
7174
7175 #[derive(Debug, PartialEq)]
7176 pub struct UnionOfEndpoints {
7177 pub u: crate::natural::UnionOfEndpointsUnion,
7178 }
7179
7180 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
7181 for UnionOfEndpoints
7182 where
7183 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7184 ___E: ::fidl_next::Encoder,
7185 ___E: ::fidl_next::fuchsia::HandleEncoder,
7186 {
7187 #[inline]
7188 fn encode(
7189 self,
7190 encoder_: &mut ___E,
7191 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
7192 _: (),
7193 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7194 ::fidl_next::munge! {
7195 let crate::wire::UnionOfEndpoints {
7196 u,
7197
7198 } = out_;
7199 }
7200
7201 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
7202
7203 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
7204
7205 Ok(())
7206 }
7207 }
7208
7209 unsafe impl<___E>
7210 ::fidl_next::EncodeOption<
7211 ::fidl_next::wire::Box<'static, crate::wire::UnionOfEndpoints<'static>>,
7212 ___E,
7213 > for UnionOfEndpoints
7214 where
7215 ___E: ::fidl_next::Encoder + ?Sized,
7216 UnionOfEndpoints: ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>,
7217 {
7218 #[inline]
7219 fn encode_option(
7220 this: ::core::option::Option<Self>,
7221 encoder: &mut ___E,
7222 out: &mut ::core::mem::MaybeUninit<
7223 ::fidl_next::wire::Box<'static, crate::wire::UnionOfEndpoints<'static>>,
7224 >,
7225 _: (),
7226 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7227 if let Some(inner) = this {
7228 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7229 ::fidl_next::wire::Box::encode_present(out);
7230 } else {
7231 ::fidl_next::wire::Box::encode_absent(out);
7232 }
7233
7234 Ok(())
7235 }
7236 }
7237
7238 impl<'de> ::fidl_next::FromWire<crate::wire::UnionOfEndpoints<'de>> for UnionOfEndpoints {
7239 #[inline]
7240 fn from_wire(wire: crate::wire::UnionOfEndpoints<'de>) -> Self {
7241 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
7242 }
7243 }
7244
7245 #[derive(Debug, PartialEq)]
7246 pub enum UnionOfHandle {
7247 H(::fidl_next::fuchsia::zx::NullableHandle),
7248 }
7249
7250 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfHandle, ___E> for UnionOfHandle
7251 where
7252 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7253 ___E: ::fidl_next::fuchsia::HandleEncoder,
7254 {
7255 #[inline]
7256 fn encode(
7257 self,
7258 encoder: &mut ___E,
7259 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfHandle>,
7260 _: (),
7261 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7262 ::fidl_next::munge!(let crate::wire::UnionOfHandle { raw, _phantom: _ } = out);
7263
7264 match self {
7265 Self::H(value) => ::fidl_next::wire::Union::encode_as_static::<
7266 ___E,
7267 ::fidl_next::wire::fuchsia::NullableHandle,
7268 >(value, 1, encoder, raw, ())?,
7269 }
7270
7271 Ok(())
7272 }
7273 }
7274
7275 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::UnionOfHandle, ___E>
7276 for UnionOfHandle
7277 where
7278 ___E: ?Sized,
7279 UnionOfHandle: ::fidl_next::Encode<crate::wire::UnionOfHandle, ___E>,
7280 {
7281 #[inline]
7282 fn encode_option(
7283 this: ::core::option::Option<Self>,
7284 encoder: &mut ___E,
7285 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::UnionOfHandle>,
7286 _: (),
7287 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7288 ::fidl_next::munge!(let crate::wire_optional::UnionOfHandle { raw, _phantom: _ } = &mut *out);
7289
7290 if let Some(inner) = this {
7291 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7292 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7293 } else {
7294 ::fidl_next::wire::Union::encode_absent(raw);
7295 }
7296
7297 Ok(())
7298 }
7299 }
7300
7301 impl ::fidl_next::FromWire<crate::wire::UnionOfHandle> for UnionOfHandle {
7302 #[inline]
7303 fn from_wire(wire: crate::wire::UnionOfHandle) -> Self {
7304 let wire = ::core::mem::ManuallyDrop::new(wire);
7305 match wire.raw.ordinal() {
7306 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
7307 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
7308 })),
7309
7310 _ => unsafe { ::core::hint::unreachable_unchecked() },
7311 }
7312 }
7313 }
7314
7315 impl ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle> for UnionOfHandle {
7316 #[inline]
7317 fn from_wire_option(
7318 wire: crate::wire_optional::UnionOfHandle,
7319 ) -> ::core::option::Option<Self> {
7320 if let Some(inner) = wire.into_option() {
7321 Some(::fidl_next::FromWire::from_wire(inner))
7322 } else {
7323 None
7324 }
7325 }
7326 }
7327
7328 impl ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle> for Box<UnionOfHandle> {
7329 #[inline]
7330 fn from_wire_option(
7331 wire: crate::wire_optional::UnionOfHandle,
7332 ) -> ::core::option::Option<Self> {
7333 <
7334 UnionOfHandle as ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle>
7335 >::from_wire_option(wire).map(Box::new)
7336 }
7337 }
7338
7339 #[derive(Debug, PartialEq)]
7340 pub struct VectorOfArrayOfEventInStructWithDefaultRights {
7341 pub h: ::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>,
7342 }
7343
7344 unsafe impl<___E>
7345 ::fidl_next::Encode<
7346 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7347 ___E,
7348 > for VectorOfArrayOfEventInStructWithDefaultRights
7349 where
7350 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7351 ___E: ::fidl_next::Encoder,
7352 ___E: ::fidl_next::fuchsia::HandleEncoder,
7353 {
7354 #[inline]
7355 fn encode(
7356 self,
7357 encoder_: &mut ___E,
7358 out_: &mut ::core::mem::MaybeUninit<
7359 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7360 >,
7361 _: (),
7362 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7363 ::fidl_next::munge! {
7364 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
7365 h,
7366
7367 } = out_;
7368 }
7369
7370 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
7371
7372 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
7373 ::fidl_next::Constrained::validate(_field, (1, ()))?;
7374
7375 Ok(())
7376 }
7377 }
7378
7379 unsafe impl<___E>
7380 ::fidl_next::EncodeOption<
7381 ::fidl_next::wire::Box<
7382 'static,
7383 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7384 >,
7385 ___E,
7386 > for VectorOfArrayOfEventInStructWithDefaultRights
7387 where
7388 ___E: ::fidl_next::Encoder + ?Sized,
7389 VectorOfArrayOfEventInStructWithDefaultRights: ::fidl_next::Encode<
7390 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7391 ___E,
7392 >,
7393 {
7394 #[inline]
7395 fn encode_option(
7396 this: ::core::option::Option<Self>,
7397 encoder: &mut ___E,
7398 out: &mut ::core::mem::MaybeUninit<
7399 ::fidl_next::wire::Box<
7400 'static,
7401 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7402 >,
7403 >,
7404 _: (),
7405 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7406 if let Some(inner) = this {
7407 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7408 ::fidl_next::wire::Box::encode_present(out);
7409 } else {
7410 ::fidl_next::wire::Box::encode_absent(out);
7411 }
7412
7413 Ok(())
7414 }
7415 }
7416
7417 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'de>>
7418 for VectorOfArrayOfEventInStructWithDefaultRights
7419 {
7420 #[inline]
7421 fn from_wire(
7422 wire: crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'de>,
7423 ) -> Self {
7424 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
7425 }
7426 }
7427
7428 #[derive(Debug, PartialEq)]
7429 pub struct VectorOfArrayOfEventInStructWithReducedRights {
7430 pub h: ::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>,
7431 }
7432
7433 unsafe impl<___E>
7434 ::fidl_next::Encode<
7435 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7436 ___E,
7437 > for VectorOfArrayOfEventInStructWithReducedRights
7438 where
7439 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7440 ___E: ::fidl_next::Encoder,
7441 ___E: ::fidl_next::fuchsia::HandleEncoder,
7442 {
7443 #[inline]
7444 fn encode(
7445 self,
7446 encoder_: &mut ___E,
7447 out_: &mut ::core::mem::MaybeUninit<
7448 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7449 >,
7450 _: (),
7451 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7452 ::fidl_next::munge! {
7453 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
7454 h,
7455
7456 } = out_;
7457 }
7458
7459 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
7460
7461 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
7462 ::fidl_next::Constrained::validate(_field, (1, ()))?;
7463
7464 Ok(())
7465 }
7466 }
7467
7468 unsafe impl<___E>
7469 ::fidl_next::EncodeOption<
7470 ::fidl_next::wire::Box<
7471 'static,
7472 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7473 >,
7474 ___E,
7475 > for VectorOfArrayOfEventInStructWithReducedRights
7476 where
7477 ___E: ::fidl_next::Encoder + ?Sized,
7478 VectorOfArrayOfEventInStructWithReducedRights: ::fidl_next::Encode<
7479 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7480 ___E,
7481 >,
7482 {
7483 #[inline]
7484 fn encode_option(
7485 this: ::core::option::Option<Self>,
7486 encoder: &mut ___E,
7487 out: &mut ::core::mem::MaybeUninit<
7488 ::fidl_next::wire::Box<
7489 'static,
7490 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7491 >,
7492 >,
7493 _: (),
7494 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7495 if let Some(inner) = this {
7496 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7497 ::fidl_next::wire::Box::encode_present(out);
7498 } else {
7499 ::fidl_next::wire::Box::encode_absent(out);
7500 }
7501
7502 Ok(())
7503 }
7504 }
7505
7506 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'de>>
7507 for VectorOfArrayOfEventInStructWithReducedRights
7508 {
7509 #[inline]
7510 fn from_wire(
7511 wire: crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'de>,
7512 ) -> Self {
7513 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
7514 }
7515 }
7516
7517 #[derive(Debug, Default, PartialEq)]
7518 pub struct VectorOfArrayOfEventInTableWithReducedRights {
7519 pub h: ::core::option::Option<::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>>,
7520 }
7521
7522 impl VectorOfArrayOfEventInTableWithReducedRights {
7523 fn __max_ordinal(&self) -> usize {
7524 if self.h.is_some() {
7525 return 1;
7526 }
7527
7528 0
7529 }
7530 }
7531
7532 unsafe impl<___E>
7533 ::fidl_next::Encode<
7534 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
7535 ___E,
7536 > for VectorOfArrayOfEventInTableWithReducedRights
7537 where
7538 ___E: ::fidl_next::Encoder + ?Sized,
7539 ___E: ::fidl_next::fuchsia::HandleEncoder,
7540 {
7541 #[inline]
7542 fn encode(
7543 mut self,
7544 encoder: &mut ___E,
7545 out: &mut ::core::mem::MaybeUninit<
7546 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
7547 >,
7548 _: (),
7549 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7550 ::fidl_next::munge!(let crate::wire::VectorOfArrayOfEventInTableWithReducedRights { table } = out);
7551
7552 let max_ord = self.__max_ordinal();
7553
7554 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7555 ::fidl_next::Wire::zero_padding(&mut out);
7556
7557 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7558 ::fidl_next::wire::Envelope,
7559 >(encoder, max_ord);
7560
7561 for i in 1..=max_ord {
7562 match i {
7563 1 => {
7564 if let Some(value) = self.h.take() {
7565 ::fidl_next::wire::Envelope::encode_value::<
7566 ::fidl_next::wire::Vector<
7567 'static,
7568 [::fidl_next::wire::fuchsia::Event; 1],
7569 >,
7570 ___E,
7571 >(
7572 value, preallocated.encoder, &mut out, (1, ())
7573 )?;
7574 } else {
7575 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7576 }
7577 }
7578
7579 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7580 }
7581 unsafe {
7582 preallocated.write_next(out.assume_init_ref());
7583 }
7584 }
7585
7586 ::fidl_next::wire::Table::encode_len(table, max_ord);
7587
7588 Ok(())
7589 }
7590 }
7591
7592 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>>
7593 for VectorOfArrayOfEventInTableWithReducedRights
7594 {
7595 #[inline]
7596 fn from_wire(
7597 wire_: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
7598 ) -> Self {
7599 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7600
7601 let h = wire_.table.get(1);
7602
7603 Self {
7604 h:
7605 h.map(|envelope| {
7606 ::fidl_next::FromWire::from_wire(unsafe {
7607 envelope.read_unchecked::<::fidl_next::wire::Vector<
7608 'de,
7609 [::fidl_next::wire::fuchsia::Event; 1],
7610 >>()
7611 })
7612 }),
7613 }
7614 }
7615 }
7616
7617 #[derive(Debug, PartialEq)]
7618 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct {
7619 pub t: crate::natural::VectorOfArrayOfEventInTableWithReducedRights,
7620 }
7621
7622 unsafe impl<___E>
7623 ::fidl_next::Encode<
7624 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7625 ___E,
7626 > for VectorOfArrayOfEventInTableWithReducedRightsStruct
7627 where
7628 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7629 ___E: ::fidl_next::Encoder,
7630 ___E: ::fidl_next::fuchsia::HandleEncoder,
7631 {
7632 #[inline]
7633 fn encode(
7634 self,
7635 encoder_: &mut ___E,
7636 out_: &mut ::core::mem::MaybeUninit<
7637 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7638 >,
7639 _: (),
7640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7641 ::fidl_next::munge! {
7642 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
7643 t,
7644
7645 } = out_;
7646 }
7647
7648 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
7649
7650 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
7651
7652 Ok(())
7653 }
7654 }
7655
7656 unsafe impl<___E>
7657 ::fidl_next::EncodeOption<
7658 ::fidl_next::wire::Box<
7659 'static,
7660 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7661 >,
7662 ___E,
7663 > for VectorOfArrayOfEventInTableWithReducedRightsStruct
7664 where
7665 ___E: ::fidl_next::Encoder + ?Sized,
7666 VectorOfArrayOfEventInTableWithReducedRightsStruct: ::fidl_next::Encode<
7667 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7668 ___E,
7669 >,
7670 {
7671 #[inline]
7672 fn encode_option(
7673 this: ::core::option::Option<Self>,
7674 encoder: &mut ___E,
7675 out: &mut ::core::mem::MaybeUninit<
7676 ::fidl_next::wire::Box<
7677 'static,
7678 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7679 >,
7680 >,
7681 _: (),
7682 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7683 if let Some(inner) = this {
7684 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7685 ::fidl_next::wire::Box::encode_present(out);
7686 } else {
7687 ::fidl_next::wire::Box::encode_absent(out);
7688 }
7689
7690 Ok(())
7691 }
7692 }
7693
7694 impl<'de>
7695 ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>>
7696 for VectorOfArrayOfEventInTableWithReducedRightsStruct
7697 {
7698 #[inline]
7699 fn from_wire(
7700 wire: crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>,
7701 ) -> Self {
7702 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
7703 }
7704 }
7705
7706 #[derive(Debug, PartialEq)]
7707 pub enum VectorOfArrayOfEventInUnionWithReducedRights {
7708 H(::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>),
7709 }
7710
7711 unsafe impl<___E>
7712 ::fidl_next::Encode<
7713 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7714 ___E,
7715 > for VectorOfArrayOfEventInUnionWithReducedRights
7716 where
7717 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7718 ___E: ::fidl_next::Encoder,
7719 ___E: ::fidl_next::fuchsia::HandleEncoder,
7720 {
7721 #[inline]
7722 fn encode(
7723 self,
7724 encoder: &mut ___E,
7725 out: &mut ::core::mem::MaybeUninit<
7726 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7727 >,
7728 _: (),
7729 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7730 ::fidl_next::munge!(let crate::wire::VectorOfArrayOfEventInUnionWithReducedRights { raw, _phantom: _ } = out);
7731
7732 match self {
7733 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
7734 ___E,
7735 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
7736 >(value, 1, encoder, raw, (1, ()))?,
7737 }
7738
7739 Ok(())
7740 }
7741 }
7742
7743 unsafe impl<___E>
7744 ::fidl_next::EncodeOption<
7745 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7746 ___E,
7747 > for VectorOfArrayOfEventInUnionWithReducedRights
7748 where
7749 ___E: ?Sized,
7750 VectorOfArrayOfEventInUnionWithReducedRights: ::fidl_next::Encode<
7751 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7752 ___E,
7753 >,
7754 {
7755 #[inline]
7756 fn encode_option(
7757 this: ::core::option::Option<Self>,
7758 encoder: &mut ___E,
7759 out: &mut ::core::mem::MaybeUninit<
7760 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7761 >,
7762 _: (),
7763 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7764 ::fidl_next::munge!(let crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights { raw, _phantom: _ } = &mut *out);
7765
7766 if let Some(inner) = this {
7767 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7768 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7769 } else {
7770 ::fidl_next::wire::Union::encode_absent(raw);
7771 }
7772
7773 Ok(())
7774 }
7775 }
7776
7777 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
7778 for VectorOfArrayOfEventInUnionWithReducedRights
7779 {
7780 #[inline]
7781 fn from_wire(wire: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>) -> Self {
7782 let wire = ::core::mem::ManuallyDrop::new(wire);
7783 match wire.raw.ordinal() {
7784 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
7785 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
7786 })),
7787
7788 _ => unsafe { ::core::hint::unreachable_unchecked() },
7789 }
7790 }
7791 }
7792
7793 impl<'de>
7794 ::fidl_next::FromWireOption<
7795 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7796 > for VectorOfArrayOfEventInUnionWithReducedRights
7797 {
7798 #[inline]
7799 fn from_wire_option(
7800 wire: crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7801 ) -> ::core::option::Option<Self> {
7802 if let Some(inner) = wire.into_option() {
7803 Some(::fidl_next::FromWire::from_wire(inner))
7804 } else {
7805 None
7806 }
7807 }
7808 }
7809
7810 impl<'de>
7811 ::fidl_next::FromWireOption<
7812 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7813 > for Box<VectorOfArrayOfEventInUnionWithReducedRights>
7814 {
7815 #[inline]
7816 fn from_wire_option(
7817 wire: crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7818 ) -> ::core::option::Option<Self> {
7819 <VectorOfArrayOfEventInUnionWithReducedRights as ::fidl_next::FromWireOption<
7820 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7821 >>::from_wire_option(wire)
7822 .map(Box::new)
7823 }
7824 }
7825
7826 #[derive(Debug, PartialEq)]
7827 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct {
7828 pub u: crate::natural::VectorOfArrayOfEventInUnionWithReducedRights,
7829 }
7830
7831 unsafe impl<___E>
7832 ::fidl_next::Encode<
7833 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7834 ___E,
7835 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct
7836 where
7837 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7838 ___E: ::fidl_next::Encoder,
7839 ___E: ::fidl_next::fuchsia::HandleEncoder,
7840 {
7841 #[inline]
7842 fn encode(
7843 self,
7844 encoder_: &mut ___E,
7845 out_: &mut ::core::mem::MaybeUninit<
7846 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7847 >,
7848 _: (),
7849 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7850 ::fidl_next::munge! {
7851 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
7852 u,
7853
7854 } = out_;
7855 }
7856
7857 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
7858
7859 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
7860
7861 Ok(())
7862 }
7863 }
7864
7865 unsafe impl<___E>
7866 ::fidl_next::EncodeOption<
7867 ::fidl_next::wire::Box<
7868 'static,
7869 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7870 >,
7871 ___E,
7872 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct
7873 where
7874 ___E: ::fidl_next::Encoder + ?Sized,
7875 VectorOfArrayOfEventInUnionWithReducedRightsStruct: ::fidl_next::Encode<
7876 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7877 ___E,
7878 >,
7879 {
7880 #[inline]
7881 fn encode_option(
7882 this: ::core::option::Option<Self>,
7883 encoder: &mut ___E,
7884 out: &mut ::core::mem::MaybeUninit<
7885 ::fidl_next::wire::Box<
7886 'static,
7887 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7888 >,
7889 >,
7890 _: (),
7891 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7892 if let Some(inner) = this {
7893 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7894 ::fidl_next::wire::Box::encode_present(out);
7895 } else {
7896 ::fidl_next::wire::Box::encode_absent(out);
7897 }
7898
7899 Ok(())
7900 }
7901 }
7902
7903 impl<'de>
7904 ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>>
7905 for VectorOfArrayOfEventInUnionWithReducedRightsStruct
7906 {
7907 #[inline]
7908 fn from_wire(
7909 wire: crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>,
7910 ) -> Self {
7911 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
7912 }
7913 }
7914
7915 #[derive(Debug, PartialEq)]
7916 pub struct VectorOfHandles {
7917 pub v: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
7918 }
7919
7920 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
7921 for VectorOfHandles
7922 where
7923 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7924 ___E: ::fidl_next::Encoder,
7925 ___E: ::fidl_next::fuchsia::HandleEncoder,
7926 {
7927 #[inline]
7928 fn encode(
7929 self,
7930 encoder_: &mut ___E,
7931 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
7932 _: (),
7933 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7934 ::fidl_next::munge! {
7935 let crate::wire::VectorOfHandles {
7936 v,
7937
7938 } = out_;
7939 }
7940
7941 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
7942
7943 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
7944 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
7945
7946 Ok(())
7947 }
7948 }
7949
7950 unsafe impl<___E>
7951 ::fidl_next::EncodeOption<
7952 ::fidl_next::wire::Box<'static, crate::wire::VectorOfHandles<'static>>,
7953 ___E,
7954 > for VectorOfHandles
7955 where
7956 ___E: ::fidl_next::Encoder + ?Sized,
7957 VectorOfHandles: ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>,
7958 {
7959 #[inline]
7960 fn encode_option(
7961 this: ::core::option::Option<Self>,
7962 encoder: &mut ___E,
7963 out: &mut ::core::mem::MaybeUninit<
7964 ::fidl_next::wire::Box<'static, crate::wire::VectorOfHandles<'static>>,
7965 >,
7966 _: (),
7967 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7968 if let Some(inner) = this {
7969 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7970 ::fidl_next::wire::Box::encode_present(out);
7971 } else {
7972 ::fidl_next::wire::Box::encode_absent(out);
7973 }
7974
7975 Ok(())
7976 }
7977 }
7978
7979 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfHandles<'de>> for VectorOfHandles {
7980 #[inline]
7981 fn from_wire(wire: crate::wire::VectorOfHandles<'de>) -> Self {
7982 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
7983 }
7984 }
7985
7986 #[derive(Debug, PartialEq)]
7987 pub struct VectorOfOptionalHandles {
7988 pub v: ::std::vec::Vec<::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>>,
7989 }
7990
7991 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
7992 for VectorOfOptionalHandles
7993 where
7994 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7995 ___E: ::fidl_next::Encoder,
7996 ___E: ::fidl_next::fuchsia::HandleEncoder,
7997 {
7998 #[inline]
7999 fn encode(
8000 self,
8001 encoder_: &mut ___E,
8002 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
8003 _: (),
8004 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8005 ::fidl_next::munge! {
8006 let crate::wire::VectorOfOptionalHandles {
8007 v,
8008
8009 } = out_;
8010 }
8011
8012 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
8013
8014 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8015 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
8016
8017 Ok(())
8018 }
8019 }
8020
8021 unsafe impl<___E>
8022 ::fidl_next::EncodeOption<
8023 ::fidl_next::wire::Box<'static, crate::wire::VectorOfOptionalHandles<'static>>,
8024 ___E,
8025 > for VectorOfOptionalHandles
8026 where
8027 ___E: ::fidl_next::Encoder + ?Sized,
8028 VectorOfOptionalHandles:
8029 ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>,
8030 {
8031 #[inline]
8032 fn encode_option(
8033 this: ::core::option::Option<Self>,
8034 encoder: &mut ___E,
8035 out: &mut ::core::mem::MaybeUninit<
8036 ::fidl_next::wire::Box<'static, crate::wire::VectorOfOptionalHandles<'static>>,
8037 >,
8038 _: (),
8039 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8040 if let Some(inner) = this {
8041 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8042 ::fidl_next::wire::Box::encode_present(out);
8043 } else {
8044 ::fidl_next::wire::Box::encode_absent(out);
8045 }
8046
8047 Ok(())
8048 }
8049 }
8050
8051 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfOptionalHandles<'de>>
8052 for VectorOfOptionalHandles
8053 {
8054 #[inline]
8055 fn from_wire(wire: crate::wire::VectorOfOptionalHandles<'de>) -> Self {
8056 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8057 }
8058 }
8059
8060 #[derive(Debug, PartialEq)]
8061 pub struct VectorOfUpTo2Handles {
8062 pub v: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
8063 }
8064
8065 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
8066 for VectorOfUpTo2Handles
8067 where
8068 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8069 ___E: ::fidl_next::Encoder,
8070 ___E: ::fidl_next::fuchsia::HandleEncoder,
8071 {
8072 #[inline]
8073 fn encode(
8074 self,
8075 encoder_: &mut ___E,
8076 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
8077 _: (),
8078 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8079 ::fidl_next::munge! {
8080 let crate::wire::VectorOfUpTo2Handles {
8081 v,
8082
8083 } = out_;
8084 }
8085
8086 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
8087
8088 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8089 ::fidl_next::Constrained::validate(_field, (2, ()))?;
8090
8091 Ok(())
8092 }
8093 }
8094
8095 unsafe impl<___E>
8096 ::fidl_next::EncodeOption<
8097 ::fidl_next::wire::Box<'static, crate::wire::VectorOfUpTo2Handles<'static>>,
8098 ___E,
8099 > for VectorOfUpTo2Handles
8100 where
8101 ___E: ::fidl_next::Encoder + ?Sized,
8102 VectorOfUpTo2Handles: ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>,
8103 {
8104 #[inline]
8105 fn encode_option(
8106 this: ::core::option::Option<Self>,
8107 encoder: &mut ___E,
8108 out: &mut ::core::mem::MaybeUninit<
8109 ::fidl_next::wire::Box<'static, crate::wire::VectorOfUpTo2Handles<'static>>,
8110 >,
8111 _: (),
8112 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8113 if let Some(inner) = this {
8114 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8115 ::fidl_next::wire::Box::encode_present(out);
8116 } else {
8117 ::fidl_next::wire::Box::encode_absent(out);
8118 }
8119
8120 Ok(())
8121 }
8122 }
8123
8124 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfUpTo2Handles<'de>> for VectorOfUpTo2Handles {
8125 #[inline]
8126 fn from_wire(wire: crate::wire::VectorOfUpTo2Handles<'de>) -> Self {
8127 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8128 }
8129 }
8130}
8131
8132pub mod wire {
8133
8134 pub use fidl_next_common_test_conformance::wire::*;
8135
8136 #[derive(Debug)]
8138 #[repr(C)]
8139 pub struct AlternatingHandlesAndFailures<'de> {
8140 pub h1: ::fidl_next::wire::fuchsia::NullableHandle,
8141
8142 pub failure_trigger1: ::fidl_next::wire::String<'de>,
8143
8144 pub h2: ::fidl_next::wire::fuchsia::NullableHandle,
8145
8146 pub failure_trigger2: ::fidl_next::wire::String<'de>,
8147
8148 pub h3: ::fidl_next::wire::fuchsia::NullableHandle,
8149 }
8150
8151 static_assertions::const_assert_eq!(
8152 std::mem::size_of::<AlternatingHandlesAndFailures<'_>>(),
8153 56
8154 );
8155 static_assertions::const_assert_eq!(
8156 std::mem::align_of::<AlternatingHandlesAndFailures<'_>>(),
8157 8
8158 );
8159
8160 static_assertions::const_assert_eq!(
8161 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h1),
8162 0
8163 );
8164
8165 static_assertions::const_assert_eq!(
8166 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, failure_trigger1),
8167 8
8168 );
8169
8170 static_assertions::const_assert_eq!(
8171 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h2),
8172 24
8173 );
8174
8175 static_assertions::const_assert_eq!(
8176 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, failure_trigger2),
8177 32
8178 );
8179
8180 static_assertions::const_assert_eq!(
8181 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h3),
8182 48
8183 );
8184
8185 impl ::fidl_next::Constrained for AlternatingHandlesAndFailures<'_> {
8186 type Constraint = ();
8187
8188 fn validate(
8189 _: ::fidl_next::Slot<'_, Self>,
8190 _: Self::Constraint,
8191 ) -> Result<(), ::fidl_next::ValidationError> {
8192 Ok(())
8193 }
8194 }
8195
8196 unsafe impl ::fidl_next::Wire for AlternatingHandlesAndFailures<'static> {
8197 type Narrowed<'de> = AlternatingHandlesAndFailures<'de>;
8198
8199 #[inline]
8200 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8201 ::fidl_next::munge! {
8202 let Self {
8203 h1,
8204 failure_trigger1,
8205 h2,
8206 failure_trigger2,
8207 h3,
8208
8209 } = &mut *out_;
8210 }
8211
8212 ::fidl_next::Wire::zero_padding(h1);
8213
8214 ::fidl_next::Wire::zero_padding(failure_trigger1);
8215
8216 ::fidl_next::Wire::zero_padding(h2);
8217
8218 ::fidl_next::Wire::zero_padding(failure_trigger2);
8219
8220 ::fidl_next::Wire::zero_padding(h3);
8221
8222 unsafe {
8223 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
8224 }
8225
8226 unsafe {
8227 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
8228 }
8229
8230 unsafe {
8231 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
8232 }
8233 }
8234 }
8235
8236 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AlternatingHandlesAndFailures<'de>
8237 where
8238 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8239 ___D: ::fidl_next::Decoder<'de>,
8240 ___D: ::fidl_next::fuchsia::HandleDecoder,
8241 {
8242 fn decode(
8243 slot_: ::fidl_next::Slot<'_, Self>,
8244 decoder_: &mut ___D,
8245 _: (),
8246 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8247 if slot_.as_bytes()[52..56] != [0u8; 4] {
8248 return Err(::fidl_next::DecodeError::InvalidPadding);
8249 }
8250
8251 if slot_.as_bytes()[28..32] != [0u8; 4] {
8252 return Err(::fidl_next::DecodeError::InvalidPadding);
8253 }
8254
8255 if slot_.as_bytes()[4..8] != [0u8; 4] {
8256 return Err(::fidl_next::DecodeError::InvalidPadding);
8257 }
8258
8259 ::fidl_next::munge! {
8260 let Self {
8261 mut h1,
8262 mut failure_trigger1,
8263 mut h2,
8264 mut failure_trigger2,
8265 mut h3,
8266
8267 } = slot_;
8268 }
8269
8270 let _field = h1.as_mut();
8271
8272 ::fidl_next::Decode::decode(h1.as_mut(), decoder_, ())?;
8273
8274 let _field = failure_trigger1.as_mut();
8275 ::fidl_next::Constrained::validate(_field, 1)?;
8276 ::fidl_next::Decode::decode(failure_trigger1.as_mut(), decoder_, 1)?;
8277
8278 let failure_trigger1 = unsafe { failure_trigger1.deref_unchecked() };
8279
8280 if failure_trigger1.len() > 1 {
8281 return Err(::fidl_next::DecodeError::VectorTooLong {
8282 size: failure_trigger1.len() as u64,
8283 limit: 1,
8284 });
8285 }
8286
8287 let _field = h2.as_mut();
8288
8289 ::fidl_next::Decode::decode(h2.as_mut(), decoder_, ())?;
8290
8291 let _field = failure_trigger2.as_mut();
8292 ::fidl_next::Constrained::validate(_field, 1)?;
8293 ::fidl_next::Decode::decode(failure_trigger2.as_mut(), decoder_, 1)?;
8294
8295 let failure_trigger2 = unsafe { failure_trigger2.deref_unchecked() };
8296
8297 if failure_trigger2.len() > 1 {
8298 return Err(::fidl_next::DecodeError::VectorTooLong {
8299 size: failure_trigger2.len() as u64,
8300 limit: 1,
8301 });
8302 }
8303
8304 let _field = h3.as_mut();
8305
8306 ::fidl_next::Decode::decode(h3.as_mut(), decoder_, ())?;
8307
8308 Ok(())
8309 }
8310 }
8311
8312 impl<'de> ::fidl_next::IntoNatural for AlternatingHandlesAndFailures<'de> {
8313 type Natural = crate::natural::AlternatingHandlesAndFailures;
8314 }
8315
8316 #[derive(Debug)]
8318 #[repr(C)]
8319 pub struct ArrayOfArrayOfNonnullableHandles {
8320 pub handles: [[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4],
8321 }
8322
8323 static_assertions::const_assert_eq!(
8324 std::mem::size_of::<ArrayOfArrayOfNonnullableHandles>(),
8325 48
8326 );
8327 static_assertions::const_assert_eq!(
8328 std::mem::align_of::<ArrayOfArrayOfNonnullableHandles>(),
8329 4
8330 );
8331
8332 static_assertions::const_assert_eq!(
8333 std::mem::offset_of!(ArrayOfArrayOfNonnullableHandles, handles),
8334 0
8335 );
8336
8337 impl ::fidl_next::Constrained for ArrayOfArrayOfNonnullableHandles {
8338 type Constraint = ();
8339
8340 fn validate(
8341 _: ::fidl_next::Slot<'_, Self>,
8342 _: Self::Constraint,
8343 ) -> Result<(), ::fidl_next::ValidationError> {
8344 Ok(())
8345 }
8346 }
8347
8348 unsafe impl ::fidl_next::Wire for ArrayOfArrayOfNonnullableHandles {
8349 type Narrowed<'de> = ArrayOfArrayOfNonnullableHandles;
8350
8351 #[inline]
8352 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8353 ::fidl_next::munge! {
8354 let Self {
8355 handles,
8356
8357 } = &mut *out_;
8358 }
8359
8360 ::fidl_next::Wire::zero_padding(handles);
8361 }
8362 }
8363
8364 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfArrayOfNonnullableHandles
8365 where
8366 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8367 ___D: ::fidl_next::fuchsia::HandleDecoder,
8368 {
8369 fn decode(
8370 slot_: ::fidl_next::Slot<'_, Self>,
8371 decoder_: &mut ___D,
8372 _: (),
8373 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8374 ::fidl_next::munge! {
8375 let Self {
8376 mut handles,
8377
8378 } = slot_;
8379 }
8380
8381 let _field = handles.as_mut();
8382
8383 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8384
8385 Ok(())
8386 }
8387 }
8388
8389 impl ::fidl_next::IntoNatural for ArrayOfArrayOfNonnullableHandles {
8390 type Natural = crate::natural::ArrayOfArrayOfNonnullableHandles;
8391 }
8392
8393 #[derive(Debug)]
8395 #[repr(C)]
8396 pub struct ArrayOfHandles {
8397 pub a: [::fidl_next::wire::fuchsia::NullableHandle; 3],
8398 }
8399
8400 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfHandles>(), 12);
8401 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfHandles>(), 4);
8402
8403 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfHandles, a), 0);
8404
8405 impl ::fidl_next::Constrained for ArrayOfHandles {
8406 type Constraint = ();
8407
8408 fn validate(
8409 _: ::fidl_next::Slot<'_, Self>,
8410 _: Self::Constraint,
8411 ) -> Result<(), ::fidl_next::ValidationError> {
8412 Ok(())
8413 }
8414 }
8415
8416 unsafe impl ::fidl_next::Wire for ArrayOfHandles {
8417 type Narrowed<'de> = ArrayOfHandles;
8418
8419 #[inline]
8420 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8421 ::fidl_next::munge! {
8422 let Self {
8423 a,
8424
8425 } = &mut *out_;
8426 }
8427
8428 ::fidl_next::Wire::zero_padding(a);
8429 }
8430 }
8431
8432 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfHandles
8433 where
8434 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8435 ___D: ::fidl_next::fuchsia::HandleDecoder,
8436 {
8437 fn decode(
8438 slot_: ::fidl_next::Slot<'_, Self>,
8439 decoder_: &mut ___D,
8440 _: (),
8441 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8442 ::fidl_next::munge! {
8443 let Self {
8444 mut a,
8445
8446 } = slot_;
8447 }
8448
8449 let _field = a.as_mut();
8450
8451 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
8452
8453 Ok(())
8454 }
8455 }
8456
8457 impl ::fidl_next::IntoNatural for ArrayOfHandles {
8458 type Natural = crate::natural::ArrayOfHandles;
8459 }
8460
8461 #[derive(Debug)]
8463 #[repr(C)]
8464 pub struct ArrayOfNonnullableHandles {
8465 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
8466 }
8467
8468 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNonnullableHandles>(), 16);
8469 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNonnullableHandles>(), 4);
8470
8471 static_assertions::const_assert_eq!(
8472 std::mem::offset_of!(ArrayOfNonnullableHandles, handles),
8473 0
8474 );
8475
8476 impl ::fidl_next::Constrained for ArrayOfNonnullableHandles {
8477 type Constraint = ();
8478
8479 fn validate(
8480 _: ::fidl_next::Slot<'_, Self>,
8481 _: Self::Constraint,
8482 ) -> Result<(), ::fidl_next::ValidationError> {
8483 Ok(())
8484 }
8485 }
8486
8487 unsafe impl ::fidl_next::Wire for ArrayOfNonnullableHandles {
8488 type Narrowed<'de> = ArrayOfNonnullableHandles;
8489
8490 #[inline]
8491 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8492 ::fidl_next::munge! {
8493 let Self {
8494 handles,
8495
8496 } = &mut *out_;
8497 }
8498
8499 ::fidl_next::Wire::zero_padding(handles);
8500 }
8501 }
8502
8503 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNonnullableHandles
8504 where
8505 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8506 ___D: ::fidl_next::fuchsia::HandleDecoder,
8507 {
8508 fn decode(
8509 slot_: ::fidl_next::Slot<'_, Self>,
8510 decoder_: &mut ___D,
8511 _: (),
8512 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8513 ::fidl_next::munge! {
8514 let Self {
8515 mut handles,
8516
8517 } = slot_;
8518 }
8519
8520 let _field = handles.as_mut();
8521
8522 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8523
8524 Ok(())
8525 }
8526 }
8527
8528 impl ::fidl_next::IntoNatural for ArrayOfNonnullableHandles {
8529 type Natural = crate::natural::ArrayOfNonnullableHandles;
8530 }
8531
8532 #[derive(Debug)]
8534 #[repr(C)]
8535 pub struct ArrayOfNullableHandles {
8536 pub handles: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 5],
8537 }
8538
8539 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNullableHandles>(), 20);
8540 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNullableHandles>(), 4);
8541
8542 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfNullableHandles, handles), 0);
8543
8544 impl ::fidl_next::Constrained for ArrayOfNullableHandles {
8545 type Constraint = ();
8546
8547 fn validate(
8548 _: ::fidl_next::Slot<'_, Self>,
8549 _: Self::Constraint,
8550 ) -> Result<(), ::fidl_next::ValidationError> {
8551 Ok(())
8552 }
8553 }
8554
8555 unsafe impl ::fidl_next::Wire for ArrayOfNullableHandles {
8556 type Narrowed<'de> = ArrayOfNullableHandles;
8557
8558 #[inline]
8559 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8560 ::fidl_next::munge! {
8561 let Self {
8562 handles,
8563
8564 } = &mut *out_;
8565 }
8566
8567 ::fidl_next::Wire::zero_padding(handles);
8568 }
8569 }
8570
8571 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNullableHandles
8572 where
8573 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8574 ___D: ::fidl_next::fuchsia::HandleDecoder,
8575 {
8576 fn decode(
8577 slot_: ::fidl_next::Slot<'_, Self>,
8578 decoder_: &mut ___D,
8579 _: (),
8580 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8581 ::fidl_next::munge! {
8582 let Self {
8583 mut handles,
8584
8585 } = slot_;
8586 }
8587
8588 let _field = handles.as_mut();
8589
8590 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8591
8592 Ok(())
8593 }
8594 }
8595
8596 impl ::fidl_next::IntoNatural for ArrayOfNullableHandles {
8597 type Natural = crate::natural::ArrayOfNullableHandles;
8598 }
8599
8600 #[derive(Debug)]
8602 #[repr(C)]
8603 pub struct ArrayOfOptionalHandles {
8604 pub a: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 3],
8605 }
8606
8607 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfOptionalHandles>(), 12);
8608 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfOptionalHandles>(), 4);
8609
8610 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfOptionalHandles, a), 0);
8611
8612 impl ::fidl_next::Constrained for ArrayOfOptionalHandles {
8613 type Constraint = ();
8614
8615 fn validate(
8616 _: ::fidl_next::Slot<'_, Self>,
8617 _: Self::Constraint,
8618 ) -> Result<(), ::fidl_next::ValidationError> {
8619 Ok(())
8620 }
8621 }
8622
8623 unsafe impl ::fidl_next::Wire for ArrayOfOptionalHandles {
8624 type Narrowed<'de> = ArrayOfOptionalHandles;
8625
8626 #[inline]
8627 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8628 ::fidl_next::munge! {
8629 let Self {
8630 a,
8631
8632 } = &mut *out_;
8633 }
8634
8635 ::fidl_next::Wire::zero_padding(a);
8636 }
8637 }
8638
8639 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfOptionalHandles
8640 where
8641 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8642 ___D: ::fidl_next::fuchsia::HandleDecoder,
8643 {
8644 fn decode(
8645 slot_: ::fidl_next::Slot<'_, Self>,
8646 decoder_: &mut ___D,
8647 _: (),
8648 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8649 ::fidl_next::munge! {
8650 let Self {
8651 mut a,
8652
8653 } = slot_;
8654 }
8655
8656 let _field = a.as_mut();
8657
8658 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
8659
8660 Ok(())
8661 }
8662 }
8663
8664 impl ::fidl_next::IntoNatural for ArrayOfOptionalHandles {
8665 type Natural = crate::natural::ArrayOfOptionalHandles;
8666 }
8667
8668 #[derive(Debug)]
8670 #[repr(C)]
8671 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
8672 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8673 }
8674
8675 static_assertions::const_assert_eq!(
8676 std::mem::size_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
8677 16
8678 );
8679 static_assertions::const_assert_eq!(
8680 std::mem::align_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
8681 8
8682 );
8683
8684 static_assertions::const_assert_eq!(
8685 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithDefaultRights<'_>, h),
8686 0
8687 );
8688
8689 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithDefaultRights<'_> {
8690 type Constraint = ();
8691
8692 fn validate(
8693 _: ::fidl_next::Slot<'_, Self>,
8694 _: Self::Constraint,
8695 ) -> Result<(), ::fidl_next::ValidationError> {
8696 Ok(())
8697 }
8698 }
8699
8700 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithDefaultRights<'static> {
8701 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithDefaultRights<'de>;
8702
8703 #[inline]
8704 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8705 ::fidl_next::munge! {
8706 let Self {
8707 h,
8708
8709 } = &mut *out_;
8710 }
8711
8712 ::fidl_next::Wire::zero_padding(h);
8713 }
8714 }
8715
8716 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8717 for ArrayOfVectorOfEventInStructWithDefaultRights<'de>
8718 where
8719 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8720 ___D: ::fidl_next::Decoder<'de>,
8721 ___D: ::fidl_next::fuchsia::HandleDecoder,
8722 {
8723 fn decode(
8724 slot_: ::fidl_next::Slot<'_, Self>,
8725 decoder_: &mut ___D,
8726 _: (),
8727 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8728 ::fidl_next::munge! {
8729 let Self {
8730 mut h,
8731
8732 } = slot_;
8733 }
8734
8735 let _field = h.as_mut();
8736 ::fidl_next::Constrained::validate(_field, (1, ()))?;
8737 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
8738
8739 Ok(())
8740 }
8741 }
8742
8743 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
8744 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithDefaultRights;
8745 }
8746
8747 #[derive(Debug)]
8749 #[repr(C)]
8750 pub struct ArrayOfVectorOfEventInStructWithReducedRights<'de> {
8751 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8752 }
8753
8754 static_assertions::const_assert_eq!(
8755 std::mem::size_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
8756 16
8757 );
8758 static_assertions::const_assert_eq!(
8759 std::mem::align_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
8760 8
8761 );
8762
8763 static_assertions::const_assert_eq!(
8764 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithReducedRights<'_>, h),
8765 0
8766 );
8767
8768 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithReducedRights<'_> {
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 ArrayOfVectorOfEventInStructWithReducedRights<'static> {
8780 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithReducedRights<'de>;
8781
8782 #[inline]
8783 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8784 ::fidl_next::munge! {
8785 let Self {
8786 h,
8787
8788 } = &mut *out_;
8789 }
8790
8791 ::fidl_next::Wire::zero_padding(h);
8792 }
8793 }
8794
8795 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8796 for ArrayOfVectorOfEventInStructWithReducedRights<'de>
8797 where
8798 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8799 ___D: ::fidl_next::Decoder<'de>,
8800 ___D: ::fidl_next::fuchsia::HandleDecoder,
8801 {
8802 fn decode(
8803 slot_: ::fidl_next::Slot<'_, Self>,
8804 decoder_: &mut ___D,
8805 _: (),
8806 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8807 ::fidl_next::munge! {
8808 let Self {
8809 mut h,
8810
8811 } = slot_;
8812 }
8813
8814 let _field = h.as_mut();
8815 ::fidl_next::Constrained::validate(_field, (1, ()))?;
8816 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
8817
8818 Ok(())
8819 }
8820 }
8821
8822 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithReducedRights<'de> {
8823 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithReducedRights;
8824 }
8825
8826 #[repr(C)]
8828 pub struct ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8829 pub(crate) table: ::fidl_next::wire::Table<'de>,
8830 }
8831
8832 impl<'de> Drop for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8833 fn drop(&mut self) {
8834 let _ = self.table.get(1)
8835 .map(|envelope| unsafe {
8836 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
8837 });
8838 }
8839 }
8840
8841 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRights<'_> {
8842 type Constraint = ();
8843
8844 fn validate(
8845 _: ::fidl_next::Slot<'_, Self>,
8846 _: Self::Constraint,
8847 ) -> Result<(), ::fidl_next::ValidationError> {
8848 Ok(())
8849 }
8850 }
8851
8852 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRights<'static> {
8853 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRights<'de>;
8854
8855 #[inline]
8856 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8857 ::fidl_next::munge!(let Self { table } = out);
8858 ::fidl_next::wire::Table::zero_padding(table);
8859 }
8860 }
8861
8862 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8863 for ArrayOfVectorOfEventInTableWithDefaultRights<'de>
8864 where
8865 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8866 ___D: ::fidl_next::fuchsia::HandleDecoder,
8867 {
8868 fn decode(
8869 slot: ::fidl_next::Slot<'_, Self>,
8870 decoder: &mut ___D,
8871 _: (),
8872 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8873 ::fidl_next::munge!(let Self { table } = slot);
8874
8875 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8876 match ordinal {
8877 0 => unsafe { ::core::hint::unreachable_unchecked() },
8878
8879 1 => {
8880 ::fidl_next::wire::Envelope::decode_as::<
8881 ___D,
8882 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8883 >(slot.as_mut(), decoder, (1, ()))?;
8884
8885 Ok(())
8886 }
8887
8888 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8889 }
8890 })
8891 }
8892 }
8893
8894 impl<'de> ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8895 pub fn h(
8896 &self,
8897 ) -> ::core::option::Option<
8898 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8899 > {
8900 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8901 }
8902
8903 pub fn take_h(
8904 &mut self,
8905 ) -> ::core::option::Option<
8906 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8907 > {
8908 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8909 }
8910 }
8911
8912 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8913 fn fmt(
8914 &self,
8915 f: &mut ::core::fmt::Formatter<'_>,
8916 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8917 f.debug_struct("ArrayOfVectorOfEventInTableWithDefaultRights")
8918 .field("h", &self.h())
8919 .finish()
8920 }
8921 }
8922
8923 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8924 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRights;
8925 }
8926
8927 #[derive(Debug)]
8929 #[repr(C)]
8930 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
8931 pub t: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>,
8932 }
8933
8934 static_assertions::const_assert_eq!(
8935 std::mem::size_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
8936 16
8937 );
8938 static_assertions::const_assert_eq!(
8939 std::mem::align_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
8940 8
8941 );
8942
8943 static_assertions::const_assert_eq!(
8944 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>, t),
8945 0
8946 );
8947
8948 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_> {
8949 type Constraint = ();
8950
8951 fn validate(
8952 _: ::fidl_next::Slot<'_, Self>,
8953 _: Self::Constraint,
8954 ) -> Result<(), ::fidl_next::ValidationError> {
8955 Ok(())
8956 }
8957 }
8958
8959 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static> {
8960 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>;
8961
8962 #[inline]
8963 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8964 ::fidl_next::munge! {
8965 let Self {
8966 t,
8967
8968 } = &mut *out_;
8969 }
8970
8971 ::fidl_next::Wire::zero_padding(t);
8972 }
8973 }
8974
8975 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8976 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>
8977 where
8978 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8979 ___D: ::fidl_next::Decoder<'de>,
8980 ___D: ::fidl_next::fuchsia::HandleDecoder,
8981 {
8982 fn decode(
8983 slot_: ::fidl_next::Slot<'_, Self>,
8984 decoder_: &mut ___D,
8985 _: (),
8986 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8987 ::fidl_next::munge! {
8988 let Self {
8989 mut t,
8990
8991 } = slot_;
8992 }
8993
8994 let _field = t.as_mut();
8995
8996 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
8997
8998 Ok(())
8999 }
9000 }
9001
9002 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
9003 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRightsStruct;
9004 }
9005
9006 #[repr(C)]
9008 pub struct ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9009 pub(crate) table: ::fidl_next::wire::Table<'de>,
9010 }
9011
9012 impl<'de> Drop for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9013 fn drop(&mut self) {
9014 let _ = self.table.get(1)
9015 .map(|envelope| unsafe {
9016 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9017 });
9018 }
9019 }
9020
9021 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRights<'_> {
9022 type Constraint = ();
9023
9024 fn validate(
9025 _: ::fidl_next::Slot<'_, Self>,
9026 _: Self::Constraint,
9027 ) -> Result<(), ::fidl_next::ValidationError> {
9028 Ok(())
9029 }
9030 }
9031
9032 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRights<'static> {
9033 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRights<'de>;
9034
9035 #[inline]
9036 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9037 ::fidl_next::munge!(let Self { table } = out);
9038 ::fidl_next::wire::Table::zero_padding(table);
9039 }
9040 }
9041
9042 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9043 for ArrayOfVectorOfEventInTableWithReducedRights<'de>
9044 where
9045 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9046 ___D: ::fidl_next::fuchsia::HandleDecoder,
9047 {
9048 fn decode(
9049 slot: ::fidl_next::Slot<'_, Self>,
9050 decoder: &mut ___D,
9051 _: (),
9052 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9053 ::fidl_next::munge!(let Self { table } = slot);
9054
9055 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9056 match ordinal {
9057 0 => unsafe { ::core::hint::unreachable_unchecked() },
9058
9059 1 => {
9060 ::fidl_next::wire::Envelope::decode_as::<
9061 ___D,
9062 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9063 >(slot.as_mut(), decoder, (1, ()))?;
9064
9065 Ok(())
9066 }
9067
9068 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9069 }
9070 })
9071 }
9072 }
9073
9074 impl<'de> ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9075 pub fn h(
9076 &self,
9077 ) -> ::core::option::Option<
9078 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9079 > {
9080 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9081 }
9082
9083 pub fn take_h(
9084 &mut self,
9085 ) -> ::core::option::Option<
9086 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9087 > {
9088 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9089 }
9090 }
9091
9092 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9093 fn fmt(
9094 &self,
9095 f: &mut ::core::fmt::Formatter<'_>,
9096 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9097 f.debug_struct("ArrayOfVectorOfEventInTableWithReducedRights")
9098 .field("h", &self.h())
9099 .finish()
9100 }
9101 }
9102
9103 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9104 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRights;
9105 }
9106
9107 #[derive(Debug)]
9109 #[repr(C)]
9110 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9111 pub t: crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>,
9112 }
9113
9114 static_assertions::const_assert_eq!(
9115 std::mem::size_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9116 16
9117 );
9118 static_assertions::const_assert_eq!(
9119 std::mem::align_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9120 8
9121 );
9122
9123 static_assertions::const_assert_eq!(
9124 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>, t),
9125 0
9126 );
9127
9128 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_> {
9129 type Constraint = ();
9130
9131 fn validate(
9132 _: ::fidl_next::Slot<'_, Self>,
9133 _: Self::Constraint,
9134 ) -> Result<(), ::fidl_next::ValidationError> {
9135 Ok(())
9136 }
9137 }
9138
9139 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static> {
9140 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>;
9141
9142 #[inline]
9143 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9144 ::fidl_next::munge! {
9145 let Self {
9146 t,
9147
9148 } = &mut *out_;
9149 }
9150
9151 ::fidl_next::Wire::zero_padding(t);
9152 }
9153 }
9154
9155 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9156 for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>
9157 where
9158 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9159 ___D: ::fidl_next::Decoder<'de>,
9160 ___D: ::fidl_next::fuchsia::HandleDecoder,
9161 {
9162 fn decode(
9163 slot_: ::fidl_next::Slot<'_, Self>,
9164 decoder_: &mut ___D,
9165 _: (),
9166 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9167 ::fidl_next::munge! {
9168 let Self {
9169 mut t,
9170
9171 } = slot_;
9172 }
9173
9174 let _field = t.as_mut();
9175
9176 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
9177
9178 Ok(())
9179 }
9180 }
9181
9182 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9183 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRightsStruct;
9184 }
9185
9186 #[repr(transparent)]
9188 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9189 pub(crate) raw: ::fidl_next::wire::Union,
9190 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9191 }
9192
9193 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9194 fn drop(&mut self) {
9195 match self.raw.ordinal() {
9196 1 => {
9197 let _ = unsafe {
9198 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9199 };
9200 }
9201
9202 _ => unsafe { ::core::hint::unreachable_unchecked() },
9203 }
9204 }
9205 }
9206
9207 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
9208 type Constraint = ();
9209
9210 fn validate(
9211 _: ::fidl_next::Slot<'_, Self>,
9212 _: Self::Constraint,
9213 ) -> Result<(), ::fidl_next::ValidationError> {
9214 Ok(())
9215 }
9216 }
9217
9218 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
9219 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
9220
9221 #[inline]
9222 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9223 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9224 ::fidl_next::wire::Union::zero_padding(raw);
9225 }
9226 }
9227
9228 pub mod array_of_vector_of_event_in_union_with_default_rights {
9229 pub enum Ref<'de> {
9230 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9231 }
9232
9233 pub enum Value<'de> {
9234 H([::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9235 }
9236 }
9237
9238 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9239 pub fn as_ref(
9240 &self,
9241 ) -> crate::wire::array_of_vector_of_event_in_union_with_default_rights::Ref<'_> {
9242 match self.raw.ordinal() {
9243 1 => crate::wire::array_of_vector_of_event_in_union_with_default_rights::Ref::H(
9244 unsafe {
9245 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9246 },
9247 ),
9248
9249 _ => unsafe { ::core::hint::unreachable_unchecked() },
9250 }
9251 }
9252
9253 pub fn into_inner(
9254 self,
9255 ) -> crate::wire::array_of_vector_of_event_in_union_with_default_rights::Value<'de>
9256 {
9257 let this = ::core::mem::ManuallyDrop::new(self);
9258
9259 match this.raw.ordinal() {
9260 1 => crate::wire::array_of_vector_of_event_in_union_with_default_rights::Value::H(
9261 unsafe {
9262 this.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9263 },
9264 ),
9265
9266 _ => unsafe { ::core::hint::unreachable_unchecked() },
9267 }
9268 }
9269 }
9270
9271 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9272 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
9273 where
9274 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9275 ___D: ::fidl_next::Decoder<'de>,
9276 ___D: ::fidl_next::fuchsia::HandleDecoder,
9277 {
9278 fn decode(
9279 mut slot: ::fidl_next::Slot<'_, Self>,
9280 decoder: &mut ___D,
9281 _: (),
9282 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9283 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9284 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9285 1 => ::fidl_next::wire::Union::decode_as::<
9286 ___D,
9287 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9288 >(raw, decoder, (1, ()))?,
9289
9290 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9291 }
9292
9293 Ok(())
9294 }
9295 }
9296
9297 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9298 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9299 match self.raw.ordinal() {
9300 1 => unsafe {
9301 self.raw.get().deref_unchecked::<
9302 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9303 >().fmt(f)
9304 },
9305 _ => unsafe { ::core::hint::unreachable_unchecked() },
9306 }
9307 }
9308 }
9309
9310 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9311 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights;
9312 }
9313
9314 #[derive(Debug)]
9316 #[repr(C)]
9317 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9318 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
9319 }
9320
9321 static_assertions::const_assert_eq!(
9322 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9323 16
9324 );
9325 static_assertions::const_assert_eq!(
9326 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9327 8
9328 );
9329
9330 static_assertions::const_assert_eq!(
9331 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>, u),
9332 0
9333 );
9334
9335 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_> {
9336 type Constraint = ();
9337
9338 fn validate(
9339 _: ::fidl_next::Slot<'_, Self>,
9340 _: Self::Constraint,
9341 ) -> Result<(), ::fidl_next::ValidationError> {
9342 Ok(())
9343 }
9344 }
9345
9346 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static> {
9347 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>;
9348
9349 #[inline]
9350 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9351 ::fidl_next::munge! {
9352 let Self {
9353 u,
9354
9355 } = &mut *out_;
9356 }
9357
9358 ::fidl_next::Wire::zero_padding(u);
9359 }
9360 }
9361
9362 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9363 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>
9364 where
9365 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9366 ___D: ::fidl_next::Decoder<'de>,
9367 ___D: ::fidl_next::fuchsia::HandleDecoder,
9368 {
9369 fn decode(
9370 slot_: ::fidl_next::Slot<'_, Self>,
9371 decoder_: &mut ___D,
9372 _: (),
9373 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9374 ::fidl_next::munge! {
9375 let Self {
9376 mut u,
9377
9378 } = slot_;
9379 }
9380
9381 let _field = u.as_mut();
9382
9383 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9384
9385 Ok(())
9386 }
9387 }
9388
9389 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9390 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct;
9391 }
9392
9393 #[repr(transparent)]
9395 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9396 pub(crate) raw: ::fidl_next::wire::Union,
9397 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9398 }
9399
9400 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9401 fn drop(&mut self) {
9402 match self.raw.ordinal() {
9403 1 => {
9404 let _ = unsafe {
9405 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9406 };
9407 }
9408
9409 _ => unsafe { ::core::hint::unreachable_unchecked() },
9410 }
9411 }
9412 }
9413
9414 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
9415 type Constraint = ();
9416
9417 fn validate(
9418 _: ::fidl_next::Slot<'_, Self>,
9419 _: Self::Constraint,
9420 ) -> Result<(), ::fidl_next::ValidationError> {
9421 Ok(())
9422 }
9423 }
9424
9425 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
9426 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
9427
9428 #[inline]
9429 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9430 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9431 ::fidl_next::wire::Union::zero_padding(raw);
9432 }
9433 }
9434
9435 pub mod array_of_vector_of_event_in_union_with_reduced_rights {
9436 pub enum Ref<'de> {
9437 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9438 }
9439
9440 pub enum Value<'de> {
9441 H([::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9442 }
9443 }
9444
9445 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9446 pub fn as_ref(
9447 &self,
9448 ) -> crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref<'_> {
9449 match self.raw.ordinal() {
9450 1 => crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref::H(
9451 unsafe {
9452 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9453 },
9454 ),
9455
9456 _ => unsafe { ::core::hint::unreachable_unchecked() },
9457 }
9458 }
9459
9460 pub fn into_inner(
9461 self,
9462 ) -> crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Value<'de>
9463 {
9464 let this = ::core::mem::ManuallyDrop::new(self);
9465
9466 match this.raw.ordinal() {
9467 1 => crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Value::H(
9468 unsafe {
9469 this.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9470 },
9471 ),
9472
9473 _ => unsafe { ::core::hint::unreachable_unchecked() },
9474 }
9475 }
9476 }
9477
9478 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9479 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
9480 where
9481 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9482 ___D: ::fidl_next::Decoder<'de>,
9483 ___D: ::fidl_next::fuchsia::HandleDecoder,
9484 {
9485 fn decode(
9486 mut slot: ::fidl_next::Slot<'_, Self>,
9487 decoder: &mut ___D,
9488 _: (),
9489 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9490 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9491 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9492 1 => ::fidl_next::wire::Union::decode_as::<
9493 ___D,
9494 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9495 >(raw, decoder, (1, ()))?,
9496
9497 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9498 }
9499
9500 Ok(())
9501 }
9502 }
9503
9504 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9505 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9506 match self.raw.ordinal() {
9507 1 => unsafe {
9508 self.raw.get().deref_unchecked::<
9509 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9510 >().fmt(f)
9511 },
9512 _ => unsafe { ::core::hint::unreachable_unchecked() },
9513 }
9514 }
9515 }
9516
9517 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9518 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights;
9519 }
9520
9521 #[derive(Debug)]
9523 #[repr(C)]
9524 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9525 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
9526 }
9527
9528 static_assertions::const_assert_eq!(
9529 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9530 16
9531 );
9532 static_assertions::const_assert_eq!(
9533 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9534 8
9535 );
9536
9537 static_assertions::const_assert_eq!(
9538 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>, u),
9539 0
9540 );
9541
9542 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_> {
9543 type Constraint = ();
9544
9545 fn validate(
9546 _: ::fidl_next::Slot<'_, Self>,
9547 _: Self::Constraint,
9548 ) -> Result<(), ::fidl_next::ValidationError> {
9549 Ok(())
9550 }
9551 }
9552
9553 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static> {
9554 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>;
9555
9556 #[inline]
9557 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9558 ::fidl_next::munge! {
9559 let Self {
9560 u,
9561
9562 } = &mut *out_;
9563 }
9564
9565 ::fidl_next::Wire::zero_padding(u);
9566 }
9567 }
9568
9569 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9570 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>
9571 where
9572 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9573 ___D: ::fidl_next::Decoder<'de>,
9574 ___D: ::fidl_next::fuchsia::HandleDecoder,
9575 {
9576 fn decode(
9577 slot_: ::fidl_next::Slot<'_, Self>,
9578 decoder_: &mut ___D,
9579 _: (),
9580 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9581 ::fidl_next::munge! {
9582 let Self {
9583 mut u,
9584
9585 } = slot_;
9586 }
9587
9588 let _field = u.as_mut();
9589
9590 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9591
9592 Ok(())
9593 }
9594 }
9595
9596 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9597 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRightsStruct;
9598 }
9599
9600 #[derive(Debug)]
9602 #[repr(C)]
9603 pub struct Bounded32NonnullableVectorOfHandles<'de> {
9604 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
9605 }
9606
9607 static_assertions::const_assert_eq!(
9608 std::mem::size_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9609 16
9610 );
9611 static_assertions::const_assert_eq!(
9612 std::mem::align_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9613 8
9614 );
9615
9616 static_assertions::const_assert_eq!(
9617 std::mem::offset_of!(Bounded32NonnullableVectorOfHandles<'_>, vh0),
9618 0
9619 );
9620
9621 impl ::fidl_next::Constrained for Bounded32NonnullableVectorOfHandles<'_> {
9622 type Constraint = ();
9623
9624 fn validate(
9625 _: ::fidl_next::Slot<'_, Self>,
9626 _: Self::Constraint,
9627 ) -> Result<(), ::fidl_next::ValidationError> {
9628 Ok(())
9629 }
9630 }
9631
9632 unsafe impl ::fidl_next::Wire for Bounded32NonnullableVectorOfHandles<'static> {
9633 type Narrowed<'de> = Bounded32NonnullableVectorOfHandles<'de>;
9634
9635 #[inline]
9636 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9637 ::fidl_next::munge! {
9638 let Self {
9639 vh0,
9640
9641 } = &mut *out_;
9642 }
9643
9644 ::fidl_next::Wire::zero_padding(vh0);
9645 }
9646 }
9647
9648 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NonnullableVectorOfHandles<'de>
9649 where
9650 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9651 ___D: ::fidl_next::Decoder<'de>,
9652 ___D: ::fidl_next::fuchsia::HandleDecoder,
9653 {
9654 fn decode(
9655 slot_: ::fidl_next::Slot<'_, Self>,
9656 decoder_: &mut ___D,
9657 _: (),
9658 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9659 ::fidl_next::munge! {
9660 let Self {
9661 mut vh0,
9662
9663 } = slot_;
9664 }
9665
9666 let _field = vh0.as_mut();
9667 ::fidl_next::Constrained::validate(_field, (32, ()))?;
9668 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
9669
9670 let vh0 = unsafe { vh0.deref_unchecked() };
9671
9672 if vh0.len() > 32 {
9673 return Err(::fidl_next::DecodeError::VectorTooLong {
9674 size: vh0.len() as u64,
9675 limit: 32,
9676 });
9677 }
9678
9679 Ok(())
9680 }
9681 }
9682
9683 impl<'de> ::fidl_next::IntoNatural for Bounded32NonnullableVectorOfHandles<'de> {
9684 type Natural = crate::natural::Bounded32NonnullableVectorOfHandles;
9685 }
9686
9687 #[derive(Debug)]
9689 #[repr(C)]
9690 pub struct Bounded32NullableVectorOfHandles<'de> {
9691 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
9692 }
9693
9694 static_assertions::const_assert_eq!(
9695 std::mem::size_of::<Bounded32NullableVectorOfHandles<'_>>(),
9696 16
9697 );
9698 static_assertions::const_assert_eq!(
9699 std::mem::align_of::<Bounded32NullableVectorOfHandles<'_>>(),
9700 8
9701 );
9702
9703 static_assertions::const_assert_eq!(
9704 std::mem::offset_of!(Bounded32NullableVectorOfHandles<'_>, vh0),
9705 0
9706 );
9707
9708 impl ::fidl_next::Constrained for Bounded32NullableVectorOfHandles<'_> {
9709 type Constraint = ();
9710
9711 fn validate(
9712 _: ::fidl_next::Slot<'_, Self>,
9713 _: Self::Constraint,
9714 ) -> Result<(), ::fidl_next::ValidationError> {
9715 Ok(())
9716 }
9717 }
9718
9719 unsafe impl ::fidl_next::Wire for Bounded32NullableVectorOfHandles<'static> {
9720 type Narrowed<'de> = Bounded32NullableVectorOfHandles<'de>;
9721
9722 #[inline]
9723 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9724 ::fidl_next::munge! {
9725 let Self {
9726 vh0,
9727
9728 } = &mut *out_;
9729 }
9730
9731 ::fidl_next::Wire::zero_padding(vh0);
9732 }
9733 }
9734
9735 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NullableVectorOfHandles<'de>
9736 where
9737 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9738 ___D: ::fidl_next::Decoder<'de>,
9739 ___D: ::fidl_next::fuchsia::HandleDecoder,
9740 {
9741 fn decode(
9742 slot_: ::fidl_next::Slot<'_, Self>,
9743 decoder_: &mut ___D,
9744 _: (),
9745 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9746 ::fidl_next::munge! {
9747 let Self {
9748 mut vh0,
9749
9750 } = slot_;
9751 }
9752
9753 let _field = vh0.as_mut();
9754 ::fidl_next::Constrained::validate(_field, (32, ()))?;
9755 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
9756
9757 let vh0 = unsafe { vh0.deref_unchecked() };
9758
9759 if let Some(vh0) = vh0.as_ref() {
9760 if vh0.len() > 32 {
9761 return Err(::fidl_next::DecodeError::VectorTooLong {
9762 size: vh0.len() as u64,
9763 limit: 32,
9764 });
9765 }
9766 }
9767
9768 Ok(())
9769 }
9770 }
9771
9772 impl<'de> ::fidl_next::IntoNatural for Bounded32NullableVectorOfHandles<'de> {
9773 type Natural = crate::natural::Bounded32NullableVectorOfHandles;
9774 }
9775
9776 #[derive(Debug)]
9778 #[repr(C)]
9779 pub struct BoxOfSingleHandle<'de> {
9780 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleHandle>,
9781 }
9782
9783 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleHandle<'_>>(), 8);
9784 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleHandle<'_>>(), 8);
9785
9786 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleHandle<'_>, b), 0);
9787
9788 impl ::fidl_next::Constrained for BoxOfSingleHandle<'_> {
9789 type Constraint = ();
9790
9791 fn validate(
9792 _: ::fidl_next::Slot<'_, Self>,
9793 _: Self::Constraint,
9794 ) -> Result<(), ::fidl_next::ValidationError> {
9795 Ok(())
9796 }
9797 }
9798
9799 unsafe impl ::fidl_next::Wire for BoxOfSingleHandle<'static> {
9800 type Narrowed<'de> = BoxOfSingleHandle<'de>;
9801
9802 #[inline]
9803 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9804 ::fidl_next::munge! {
9805 let Self {
9806 b,
9807
9808 } = &mut *out_;
9809 }
9810
9811 ::fidl_next::Wire::zero_padding(b);
9812 }
9813 }
9814
9815 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleHandle<'de>
9816 where
9817 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9818 ___D: ::fidl_next::Decoder<'de>,
9819 ___D: ::fidl_next::fuchsia::HandleDecoder,
9820 {
9821 fn decode(
9822 slot_: ::fidl_next::Slot<'_, Self>,
9823 decoder_: &mut ___D,
9824 _: (),
9825 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9826 ::fidl_next::munge! {
9827 let Self {
9828 mut b,
9829
9830 } = slot_;
9831 }
9832
9833 let _field = b.as_mut();
9834
9835 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
9836
9837 Ok(())
9838 }
9839 }
9840
9841 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleHandle<'de> {
9842 type Natural = crate::natural::BoxOfSingleHandle;
9843 }
9844
9845 #[derive(Debug)]
9847 #[repr(C)]
9848 pub struct BoxOfSingleOptionalHandle<'de> {
9849 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleOptionalHandle>,
9850 }
9851
9852 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
9853 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
9854
9855 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleOptionalHandle<'_>, b), 0);
9856
9857 impl ::fidl_next::Constrained for BoxOfSingleOptionalHandle<'_> {
9858 type Constraint = ();
9859
9860 fn validate(
9861 _: ::fidl_next::Slot<'_, Self>,
9862 _: Self::Constraint,
9863 ) -> Result<(), ::fidl_next::ValidationError> {
9864 Ok(())
9865 }
9866 }
9867
9868 unsafe impl ::fidl_next::Wire for BoxOfSingleOptionalHandle<'static> {
9869 type Narrowed<'de> = BoxOfSingleOptionalHandle<'de>;
9870
9871 #[inline]
9872 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9873 ::fidl_next::munge! {
9874 let Self {
9875 b,
9876
9877 } = &mut *out_;
9878 }
9879
9880 ::fidl_next::Wire::zero_padding(b);
9881 }
9882 }
9883
9884 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleOptionalHandle<'de>
9885 where
9886 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9887 ___D: ::fidl_next::Decoder<'de>,
9888 ___D: ::fidl_next::fuchsia::HandleDecoder,
9889 {
9890 fn decode(
9891 slot_: ::fidl_next::Slot<'_, Self>,
9892 decoder_: &mut ___D,
9893 _: (),
9894 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9895 ::fidl_next::munge! {
9896 let Self {
9897 mut b,
9898
9899 } = slot_;
9900 }
9901
9902 let _field = b.as_mut();
9903
9904 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
9905
9906 Ok(())
9907 }
9908 }
9909
9910 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleOptionalHandle<'de> {
9911 type Natural = crate::natural::BoxOfSingleOptionalHandle;
9912 }
9913
9914 #[derive(Debug)]
9916 #[repr(C)]
9917 pub struct LaunchInfo<'de> {
9918 pub url: ::fidl_next::wire::String<'de>,
9919
9920 pub arguments: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::String<'de>>,
9921
9922 pub out: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9923
9924 pub err: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9925
9926 pub directory_request: ::fidl_next::wire::fuchsia::OptionalChannel,
9927
9928 pub flat_namespace: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9929
9930 pub additional_services: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9931 }
9932
9933 static_assertions::const_assert_eq!(std::mem::size_of::<LaunchInfo<'_>>(), 72);
9934 static_assertions::const_assert_eq!(std::mem::align_of::<LaunchInfo<'_>>(), 8);
9935
9936 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, url), 0);
9937
9938 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, arguments), 16);
9939
9940 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, out), 32);
9941
9942 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, err), 40);
9943
9944 static_assertions::const_assert_eq!(
9945 std::mem::offset_of!(LaunchInfo<'_>, directory_request),
9946 48
9947 );
9948
9949 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, flat_namespace), 56);
9950
9951 static_assertions::const_assert_eq!(
9952 std::mem::offset_of!(LaunchInfo<'_>, additional_services),
9953 64
9954 );
9955
9956 impl ::fidl_next::Constrained for LaunchInfo<'_> {
9957 type Constraint = ();
9958
9959 fn validate(
9960 _: ::fidl_next::Slot<'_, Self>,
9961 _: Self::Constraint,
9962 ) -> Result<(), ::fidl_next::ValidationError> {
9963 Ok(())
9964 }
9965 }
9966
9967 unsafe impl ::fidl_next::Wire for LaunchInfo<'static> {
9968 type Narrowed<'de> = LaunchInfo<'de>;
9969
9970 #[inline]
9971 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9972 ::fidl_next::munge! {
9973 let Self {
9974 url,
9975 arguments,
9976 out,
9977 err,
9978 directory_request,
9979 flat_namespace,
9980 additional_services,
9981
9982 } = &mut *out_;
9983 }
9984
9985 ::fidl_next::Wire::zero_padding(url);
9986
9987 ::fidl_next::Wire::zero_padding(arguments);
9988
9989 ::fidl_next::Wire::zero_padding(out);
9990
9991 ::fidl_next::Wire::zero_padding(err);
9992
9993 ::fidl_next::Wire::zero_padding(directory_request);
9994
9995 ::fidl_next::Wire::zero_padding(flat_namespace);
9996
9997 ::fidl_next::Wire::zero_padding(additional_services);
9998
9999 unsafe {
10000 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
10001 }
10002 }
10003 }
10004
10005 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LaunchInfo<'de>
10006 where
10007 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10008 ___D: ::fidl_next::Decoder<'de>,
10009 ___D: ::fidl_next::fuchsia::HandleDecoder,
10010 {
10011 fn decode(
10012 slot_: ::fidl_next::Slot<'_, Self>,
10013 decoder_: &mut ___D,
10014 _: (),
10015 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10016 if slot_.as_bytes()[52..56] != [0u8; 4] {
10017 return Err(::fidl_next::DecodeError::InvalidPadding);
10018 }
10019
10020 ::fidl_next::munge! {
10021 let Self {
10022 mut url,
10023 mut arguments,
10024 mut out,
10025 mut err,
10026 mut directory_request,
10027 mut flat_namespace,
10028 mut additional_services,
10029
10030 } = slot_;
10031 }
10032
10033 let _field = url.as_mut();
10034 ::fidl_next::Constrained::validate(_field, 200)?;
10035 ::fidl_next::Decode::decode(url.as_mut(), decoder_, 200)?;
10036
10037 let url = unsafe { url.deref_unchecked() };
10038
10039 if url.len() > 200 {
10040 return Err(::fidl_next::DecodeError::VectorTooLong {
10041 size: url.len() as u64,
10042 limit: 200,
10043 });
10044 }
10045
10046 let _field = arguments.as_mut();
10047 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
10048 ::fidl_next::Decode::decode(arguments.as_mut(), decoder_, (4294967295, 4294967295))?;
10049
10050 let _field = out.as_mut();
10051
10052 ::fidl_next::Decode::decode(out.as_mut(), decoder_, ())?;
10053
10054 let _field = err.as_mut();
10055
10056 ::fidl_next::Decode::decode(err.as_mut(), decoder_, ())?;
10057
10058 let _field = directory_request.as_mut();
10059
10060 ::fidl_next::Decode::decode(directory_request.as_mut(), decoder_, ())?;
10061
10062 let _field = flat_namespace.as_mut();
10063
10064 ::fidl_next::Decode::decode(flat_namespace.as_mut(), decoder_, ())?;
10065
10066 let _field = additional_services.as_mut();
10067
10068 ::fidl_next::Decode::decode(additional_services.as_mut(), decoder_, ())?;
10069
10070 Ok(())
10071 }
10072 }
10073
10074 impl<'de> ::fidl_next::IntoNatural for LaunchInfo<'de> {
10075 type Natural = crate::natural::LaunchInfo;
10076 }
10077
10078 #[derive(Debug)]
10080 #[repr(C)]
10081 pub struct CreateComponentRequest<'de> {
10082 pub launch_info: crate::wire::LaunchInfo<'de>,
10083
10084 pub controller: ::fidl_next::ServerEnd<
10085 crate::ComponentController,
10086 ::fidl_next::wire::fuchsia::OptionalChannel,
10087 >,
10088 }
10089
10090 static_assertions::const_assert_eq!(std::mem::size_of::<CreateComponentRequest<'_>>(), 80);
10091 static_assertions::const_assert_eq!(std::mem::align_of::<CreateComponentRequest<'_>>(), 8);
10092
10093 static_assertions::const_assert_eq!(
10094 std::mem::offset_of!(CreateComponentRequest<'_>, launch_info),
10095 0
10096 );
10097
10098 static_assertions::const_assert_eq!(
10099 std::mem::offset_of!(CreateComponentRequest<'_>, controller),
10100 72
10101 );
10102
10103 impl ::fidl_next::Constrained for CreateComponentRequest<'_> {
10104 type Constraint = ();
10105
10106 fn validate(
10107 _: ::fidl_next::Slot<'_, Self>,
10108 _: Self::Constraint,
10109 ) -> Result<(), ::fidl_next::ValidationError> {
10110 Ok(())
10111 }
10112 }
10113
10114 unsafe impl ::fidl_next::Wire for CreateComponentRequest<'static> {
10115 type Narrowed<'de> = CreateComponentRequest<'de>;
10116
10117 #[inline]
10118 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10119 ::fidl_next::munge! {
10120 let Self {
10121 launch_info,
10122 controller,
10123
10124 } = &mut *out_;
10125 }
10126
10127 ::fidl_next::Wire::zero_padding(launch_info);
10128
10129 ::fidl_next::Wire::zero_padding(controller);
10130
10131 unsafe {
10132 out_.as_mut_ptr().cast::<u8>().add(76).write_bytes(0, 4);
10133 }
10134 }
10135 }
10136
10137 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CreateComponentRequest<'de>
10138 where
10139 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10140 ___D: ::fidl_next::Decoder<'de>,
10141 ___D: ::fidl_next::fuchsia::HandleDecoder,
10142 {
10143 fn decode(
10144 slot_: ::fidl_next::Slot<'_, Self>,
10145 decoder_: &mut ___D,
10146 _: (),
10147 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10148 if slot_.as_bytes()[76..80] != [0u8; 4] {
10149 return Err(::fidl_next::DecodeError::InvalidPadding);
10150 }
10151
10152 ::fidl_next::munge! {
10153 let Self {
10154 mut launch_info,
10155 mut controller,
10156
10157 } = slot_;
10158 }
10159
10160 let _field = launch_info.as_mut();
10161
10162 ::fidl_next::Decode::decode(launch_info.as_mut(), decoder_, ())?;
10163
10164 let _field = controller.as_mut();
10165
10166 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
10167
10168 Ok(())
10169 }
10170 }
10171
10172 impl<'de> ::fidl_next::IntoNatural for CreateComponentRequest<'de> {
10173 type Natural = crate::natural::CreateComponentRequest;
10174 }
10175
10176 #[repr(C)]
10178 pub struct EmptyResourceTable<'de> {
10179 pub(crate) table: ::fidl_next::wire::Table<'de>,
10180 }
10181
10182 impl<'de> Drop for EmptyResourceTable<'de> {
10183 fn drop(&mut self) {}
10184 }
10185
10186 impl ::fidl_next::Constrained for EmptyResourceTable<'_> {
10187 type Constraint = ();
10188
10189 fn validate(
10190 _: ::fidl_next::Slot<'_, Self>,
10191 _: Self::Constraint,
10192 ) -> Result<(), ::fidl_next::ValidationError> {
10193 Ok(())
10194 }
10195 }
10196
10197 unsafe impl ::fidl_next::Wire for EmptyResourceTable<'static> {
10198 type Narrowed<'de> = EmptyResourceTable<'de>;
10199
10200 #[inline]
10201 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10202 ::fidl_next::munge!(let Self { table } = out);
10203 ::fidl_next::wire::Table::zero_padding(table);
10204 }
10205 }
10206
10207 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTable<'de>
10208 where
10209 ___D: ::fidl_next::Decoder<'de> + ?Sized,
10210 ___D: ::fidl_next::fuchsia::HandleDecoder,
10211 {
10212 fn decode(
10213 slot: ::fidl_next::Slot<'_, Self>,
10214 decoder: &mut ___D,
10215 _: (),
10216 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10217 ::fidl_next::munge!(let Self { table } = slot);
10218
10219 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10220 match ordinal {
10221 0 => unsafe { ::core::hint::unreachable_unchecked() },
10222
10223 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10224 }
10225 })
10226 }
10227 }
10228
10229 impl<'de> EmptyResourceTable<'de> {}
10230
10231 impl<'de> ::core::fmt::Debug for EmptyResourceTable<'de> {
10232 fn fmt(
10233 &self,
10234 f: &mut ::core::fmt::Formatter<'_>,
10235 ) -> ::core::result::Result<(), ::core::fmt::Error> {
10236 f.debug_struct("EmptyResourceTable").finish()
10237 }
10238 }
10239
10240 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTable<'de> {
10241 type Natural = crate::natural::EmptyResourceTable;
10242 }
10243
10244 #[derive(Debug)]
10246 #[repr(C)]
10247 pub struct EmptyResourceTableStruct<'de> {
10248 pub table: crate::wire::EmptyResourceTable<'de>,
10249 }
10250
10251 static_assertions::const_assert_eq!(std::mem::size_of::<EmptyResourceTableStruct<'_>>(), 16);
10252 static_assertions::const_assert_eq!(std::mem::align_of::<EmptyResourceTableStruct<'_>>(), 8);
10253
10254 static_assertions::const_assert_eq!(
10255 std::mem::offset_of!(EmptyResourceTableStruct<'_>, table),
10256 0
10257 );
10258
10259 impl ::fidl_next::Constrained for EmptyResourceTableStruct<'_> {
10260 type Constraint = ();
10261
10262 fn validate(
10263 _: ::fidl_next::Slot<'_, Self>,
10264 _: Self::Constraint,
10265 ) -> Result<(), ::fidl_next::ValidationError> {
10266 Ok(())
10267 }
10268 }
10269
10270 unsafe impl ::fidl_next::Wire for EmptyResourceTableStruct<'static> {
10271 type Narrowed<'de> = EmptyResourceTableStruct<'de>;
10272
10273 #[inline]
10274 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10275 ::fidl_next::munge! {
10276 let Self {
10277 table,
10278
10279 } = &mut *out_;
10280 }
10281
10282 ::fidl_next::Wire::zero_padding(table);
10283 }
10284 }
10285
10286 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTableStruct<'de>
10287 where
10288 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10289 ___D: ::fidl_next::Decoder<'de>,
10290 ___D: ::fidl_next::fuchsia::HandleDecoder,
10291 {
10292 fn decode(
10293 slot_: ::fidl_next::Slot<'_, Self>,
10294 decoder_: &mut ___D,
10295 _: (),
10296 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10297 ::fidl_next::munge! {
10298 let Self {
10299 mut table,
10300
10301 } = slot_;
10302 }
10303
10304 let _field = table.as_mut();
10305
10306 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
10307
10308 Ok(())
10309 }
10310 }
10311
10312 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTableStruct<'de> {
10313 type Natural = crate::natural::EmptyResourceTableStruct;
10314 }
10315
10316 #[repr(transparent)]
10318 pub struct EnvelopeInliningTestUnion<'de> {
10319 pub(crate) raw: ::fidl_next::wire::Union,
10320 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
10321 }
10322
10323 impl<'de> Drop for EnvelopeInliningTestUnion<'de> {
10324 fn drop(&mut self) {
10325 match self.raw.ordinal() {
10326 1 => {
10327 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
10328 }
10329
10330 2 => {
10331 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint64>() };
10332 }
10333
10334 3 => {
10335 let _ = unsafe {
10336 self.raw
10337 .get()
10338 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10339 };
10340 }
10341
10342 _ => (),
10343 }
10344 }
10345 }
10346
10347 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
10348 type Constraint = ();
10349
10350 fn validate(
10351 _: ::fidl_next::Slot<'_, Self>,
10352 _: Self::Constraint,
10353 ) -> Result<(), ::fidl_next::ValidationError> {
10354 Ok(())
10355 }
10356 }
10357
10358 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
10359 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
10360
10361 #[inline]
10362 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10363 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
10364 ::fidl_next::wire::Union::zero_padding(raw);
10365 }
10366 }
10367
10368 pub mod envelope_inlining_test_union {
10369 pub enum Ref<'de> {
10370 Small(&'de ::fidl_next::wire::Uint32),
10371
10372 Large(&'de ::fidl_next::wire::Uint64),
10373
10374 Handle(&'de ::fidl_next::wire::fuchsia::NullableHandle),
10375
10376 UnknownOrdinal_(u64),
10377 }
10378
10379 pub enum Value {
10380 Small(::fidl_next::wire::Uint32),
10381
10382 Large(::fidl_next::wire::Uint64),
10383
10384 Handle(::fidl_next::wire::fuchsia::NullableHandle),
10385
10386 UnknownOrdinal_(u64),
10387 }
10388 }
10389
10390 impl<'de> EnvelopeInliningTestUnion<'de> {
10391 pub fn as_ref(&self) -> crate::wire::envelope_inlining_test_union::Ref<'_> {
10392 match self.raw.ordinal() {
10393 1 => crate::wire::envelope_inlining_test_union::Ref::Small(unsafe {
10394 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
10395 }),
10396
10397 2 => crate::wire::envelope_inlining_test_union::Ref::Large(unsafe {
10398 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>()
10399 }),
10400
10401 3 => crate::wire::envelope_inlining_test_union::Ref::Handle(unsafe {
10402 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10403 }),
10404
10405 unknown => crate::wire::envelope_inlining_test_union::Ref::UnknownOrdinal_(unknown),
10406 }
10407 }
10408
10409 pub fn into_inner(self) -> crate::wire::envelope_inlining_test_union::Value {
10410 let this = ::core::mem::ManuallyDrop::new(self);
10411
10412 match this.raw.ordinal() {
10413 1 => crate::wire::envelope_inlining_test_union::Value::Small(unsafe {
10414 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
10415 }),
10416
10417 2 => crate::wire::envelope_inlining_test_union::Value::Large(unsafe {
10418 this.raw.get().read_unchecked::<::fidl_next::wire::Uint64>()
10419 }),
10420
10421 3 => crate::wire::envelope_inlining_test_union::Value::Handle(unsafe {
10422 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10423 }),
10424
10425 unknown => {
10426 crate::wire::envelope_inlining_test_union::Value::UnknownOrdinal_(unknown)
10427 }
10428 }
10429 }
10430 }
10431
10432 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
10433 where
10434 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10435 ___D: ::fidl_next::Decoder<'de>,
10436 ___D: ::fidl_next::fuchsia::HandleDecoder,
10437 {
10438 fn decode(
10439 mut slot: ::fidl_next::Slot<'_, Self>,
10440 decoder: &mut ___D,
10441 _: (),
10442 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10443 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
10444 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
10445 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
10446 raw,
10447 decoder,
10448 (),
10449 )?,
10450
10451 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
10452 raw,
10453 decoder,
10454 (),
10455 )?,
10456
10457 3 => ::fidl_next::wire::Union::decode_as::<
10458 ___D,
10459 ::fidl_next::wire::fuchsia::NullableHandle,
10460 >(raw, decoder, ())?,
10461
10462 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
10463 }
10464
10465 Ok(())
10466 }
10467 }
10468
10469 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
10470 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10471 match self.raw.ordinal() {
10472 1 => unsafe {
10473 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
10474 },
10475 2 => unsafe {
10476 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>().fmt(f)
10477 },
10478 3 => unsafe {
10479 self.raw
10480 .get()
10481 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10482 .fmt(f)
10483 },
10484 _ => unsafe { ::core::hint::unreachable_unchecked() },
10485 }
10486 }
10487 }
10488
10489 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
10490 type Natural = crate::natural::EnvelopeInliningTestUnion;
10491 }
10492
10493 #[derive(Debug)]
10495 #[repr(C)]
10496 pub struct EnvelopeInliningTestUnionStruct<'de> {
10497 pub u: crate::wire::EnvelopeInliningTestUnion<'de>,
10498 }
10499
10500 static_assertions::const_assert_eq!(
10501 std::mem::size_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10502 16
10503 );
10504 static_assertions::const_assert_eq!(
10505 std::mem::align_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10506 8
10507 );
10508
10509 static_assertions::const_assert_eq!(
10510 std::mem::offset_of!(EnvelopeInliningTestUnionStruct<'_>, u),
10511 0
10512 );
10513
10514 impl ::fidl_next::Constrained for EnvelopeInliningTestUnionStruct<'_> {
10515 type Constraint = ();
10516
10517 fn validate(
10518 _: ::fidl_next::Slot<'_, Self>,
10519 _: Self::Constraint,
10520 ) -> Result<(), ::fidl_next::ValidationError> {
10521 Ok(())
10522 }
10523 }
10524
10525 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnionStruct<'static> {
10526 type Narrowed<'de> = EnvelopeInliningTestUnionStruct<'de>;
10527
10528 #[inline]
10529 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10530 ::fidl_next::munge! {
10531 let Self {
10532 u,
10533
10534 } = &mut *out_;
10535 }
10536
10537 ::fidl_next::Wire::zero_padding(u);
10538 }
10539 }
10540
10541 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnionStruct<'de>
10542 where
10543 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10544 ___D: ::fidl_next::Decoder<'de>,
10545 ___D: ::fidl_next::fuchsia::HandleDecoder,
10546 {
10547 fn decode(
10548 slot_: ::fidl_next::Slot<'_, Self>,
10549 decoder_: &mut ___D,
10550 _: (),
10551 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10552 ::fidl_next::munge! {
10553 let Self {
10554 mut u,
10555
10556 } = slot_;
10557 }
10558
10559 let _field = u.as_mut();
10560
10561 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
10562
10563 Ok(())
10564 }
10565 }
10566
10567 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnionStruct<'de> {
10568 type Natural = crate::natural::EnvelopeInliningTestUnionStruct;
10569 }
10570
10571 #[derive(Debug)]
10573 #[repr(C)]
10574 pub struct EventWithDefaultRights {
10575 pub h: ::fidl_next::wire::fuchsia::Event,
10576 }
10577
10578 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithDefaultRights>(), 4);
10579 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithDefaultRights>(), 4);
10580
10581 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithDefaultRights, h), 0);
10582
10583 impl ::fidl_next::Constrained for EventWithDefaultRights {
10584 type Constraint = ();
10585
10586 fn validate(
10587 _: ::fidl_next::Slot<'_, Self>,
10588 _: Self::Constraint,
10589 ) -> Result<(), ::fidl_next::ValidationError> {
10590 Ok(())
10591 }
10592 }
10593
10594 unsafe impl ::fidl_next::Wire for EventWithDefaultRights {
10595 type Narrowed<'de> = EventWithDefaultRights;
10596
10597 #[inline]
10598 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10599 ::fidl_next::munge! {
10600 let Self {
10601 h,
10602
10603 } = &mut *out_;
10604 }
10605
10606 ::fidl_next::Wire::zero_padding(h);
10607 }
10608 }
10609
10610 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithDefaultRights
10611 where
10612 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10613 ___D: ::fidl_next::fuchsia::HandleDecoder,
10614 {
10615 fn decode(
10616 slot_: ::fidl_next::Slot<'_, Self>,
10617 decoder_: &mut ___D,
10618 _: (),
10619 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10620 ::fidl_next::munge! {
10621 let Self {
10622 mut h,
10623
10624 } = slot_;
10625 }
10626
10627 let _field = h.as_mut();
10628
10629 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
10630
10631 Ok(())
10632 }
10633 }
10634
10635 impl ::fidl_next::IntoNatural for EventWithDefaultRights {
10636 type Natural = crate::natural::EventWithDefaultRights;
10637 }
10638
10639 #[derive(Debug)]
10641 #[repr(C)]
10642 pub struct EventWithReducedRights {
10643 pub h: ::fidl_next::wire::fuchsia::Event,
10644 }
10645
10646 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithReducedRights>(), 4);
10647 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithReducedRights>(), 4);
10648
10649 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithReducedRights, h), 0);
10650
10651 impl ::fidl_next::Constrained for EventWithReducedRights {
10652 type Constraint = ();
10653
10654 fn validate(
10655 _: ::fidl_next::Slot<'_, Self>,
10656 _: Self::Constraint,
10657 ) -> Result<(), ::fidl_next::ValidationError> {
10658 Ok(())
10659 }
10660 }
10661
10662 unsafe impl ::fidl_next::Wire for EventWithReducedRights {
10663 type Narrowed<'de> = EventWithReducedRights;
10664
10665 #[inline]
10666 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10667 ::fidl_next::munge! {
10668 let Self {
10669 h,
10670
10671 } = &mut *out_;
10672 }
10673
10674 ::fidl_next::Wire::zero_padding(h);
10675 }
10676 }
10677
10678 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithReducedRights
10679 where
10680 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10681 ___D: ::fidl_next::fuchsia::HandleDecoder,
10682 {
10683 fn decode(
10684 slot_: ::fidl_next::Slot<'_, Self>,
10685 decoder_: &mut ___D,
10686 _: (),
10687 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10688 ::fidl_next::munge! {
10689 let Self {
10690 mut h,
10691
10692 } = slot_;
10693 }
10694
10695 let _field = h.as_mut();
10696
10697 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
10698
10699 Ok(())
10700 }
10701 }
10702
10703 impl ::fidl_next::IntoNatural for EventWithReducedRights {
10704 type Natural = crate::natural::EventWithReducedRights;
10705 }
10706
10707 #[derive(Debug)]
10709 #[repr(C)]
10710 pub struct FidlvizDemo<'de> {
10711 pub f1: u8,
10712
10713 pub f2: i8,
10714
10715 pub f3: ::fidl_next::wire::Uint16,
10716
10717 pub f4: ::fidl_next::wire::Uint32,
10718
10719 pub f5: ::fidl_next::wire::Uint64,
10720
10721 pub f6: u8,
10722
10723 pub f7: u8,
10724
10725 pub f8: ::fidl_next::wire::Uint16,
10726
10727 pub f9: ::fidl_next::wire::Float32,
10728
10729 pub f10: ::fidl_next::wire::Float64,
10730
10731 pub f11: bool,
10732
10733 pub f12: bool,
10734
10735 pub f13: ::fidl_next::wire::String<'de>,
10736
10737 pub f14: ::fidl_next::wire::OptionalString<'de>,
10738
10739 pub f15: ::fidl_next::wire::String<'de>,
10740
10741 pub f16: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
10742
10743 pub f17: ::fidl_next::wire::fuchsia::NullableHandle,
10744
10745 pub f18: [u8; 3],
10746
10747 pub f19: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Float64>,
10748
10749 pub f20: ::fidl_next::wire::OptionalVector<'de, u8>,
10750
10751 pub f21: ::fidl_next::wire::Vector<'de, u8>,
10752
10753 pub f22: crate::wire::FidlvizBits,
10754
10755 pub f23: crate::wire::FidlvizEnum,
10756
10757 pub f24: crate::wire::FidlvizStruct1,
10758
10759 pub f25: crate::wire::FidlvizStruct2,
10760
10761 pub f26: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct1>,
10762
10763 pub f27: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct2>,
10764
10765 pub f28: crate::wire::FidlvizTable<'de>,
10766
10767 pub f29: crate::wire::FidlvizTable<'de>,
10768
10769 pub f30: crate::wire_optional::FidlvizUnion<'de>,
10770
10771 pub f31: crate::wire::FidlvizUnion<'de>,
10772 }
10773
10774 static_assertions::const_assert_eq!(std::mem::size_of::<FidlvizDemo<'_>>(), 248);
10775 static_assertions::const_assert_eq!(std::mem::align_of::<FidlvizDemo<'_>>(), 8);
10776
10777 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f1), 0);
10778
10779 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f2), 1);
10780
10781 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f3), 2);
10782
10783 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f4), 4);
10784
10785 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f5), 8);
10786
10787 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f6), 16);
10788
10789 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f7), 17);
10790
10791 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f8), 18);
10792
10793 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f9), 20);
10794
10795 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f10), 24);
10796
10797 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f11), 32);
10798
10799 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f12), 33);
10800
10801 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f13), 40);
10802
10803 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f14), 56);
10804
10805 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f15), 72);
10806
10807 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f16), 88);
10808
10809 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f17), 92);
10810
10811 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f18), 96);
10812
10813 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f19), 104);
10814
10815 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f20), 120);
10816
10817 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f21), 136);
10818
10819 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f22), 152);
10820
10821 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f23), 153);
10822
10823 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f24), 154);
10824
10825 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f25), 160);
10826
10827 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f26), 168);
10828
10829 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f27), 176);
10830
10831 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f28), 184);
10832
10833 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f29), 200);
10834
10835 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f30), 216);
10836
10837 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f31), 232);
10838
10839 impl ::fidl_next::Constrained for FidlvizDemo<'_> {
10840 type Constraint = ();
10841
10842 fn validate(
10843 _: ::fidl_next::Slot<'_, Self>,
10844 _: Self::Constraint,
10845 ) -> Result<(), ::fidl_next::ValidationError> {
10846 Ok(())
10847 }
10848 }
10849
10850 unsafe impl ::fidl_next::Wire for FidlvizDemo<'static> {
10851 type Narrowed<'de> = FidlvizDemo<'de>;
10852
10853 #[inline]
10854 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10855 ::fidl_next::munge! {
10856 let Self {
10857 f1,
10858 f2,
10859 f3,
10860 f4,
10861 f5,
10862 f6,
10863 f7,
10864 f8,
10865 f9,
10866 f10,
10867 f11,
10868 f12,
10869 f13,
10870 f14,
10871 f15,
10872 f16,
10873 f17,
10874 f18,
10875 f19,
10876 f20,
10877 f21,
10878 f22,
10879 f23,
10880 f24,
10881 f25,
10882 f26,
10883 f27,
10884 f28,
10885 f29,
10886 f30,
10887 f31,
10888
10889 } = &mut *out_;
10890 }
10891
10892 ::fidl_next::Wire::zero_padding(f1);
10893
10894 ::fidl_next::Wire::zero_padding(f2);
10895
10896 ::fidl_next::Wire::zero_padding(f3);
10897
10898 ::fidl_next::Wire::zero_padding(f4);
10899
10900 ::fidl_next::Wire::zero_padding(f5);
10901
10902 ::fidl_next::Wire::zero_padding(f6);
10903
10904 ::fidl_next::Wire::zero_padding(f7);
10905
10906 ::fidl_next::Wire::zero_padding(f8);
10907
10908 ::fidl_next::Wire::zero_padding(f9);
10909
10910 ::fidl_next::Wire::zero_padding(f10);
10911
10912 ::fidl_next::Wire::zero_padding(f11);
10913
10914 ::fidl_next::Wire::zero_padding(f12);
10915
10916 ::fidl_next::Wire::zero_padding(f13);
10917
10918 ::fidl_next::Wire::zero_padding(f14);
10919
10920 ::fidl_next::Wire::zero_padding(f15);
10921
10922 ::fidl_next::Wire::zero_padding(f16);
10923
10924 ::fidl_next::Wire::zero_padding(f17);
10925
10926 ::fidl_next::Wire::zero_padding(f18);
10927
10928 ::fidl_next::Wire::zero_padding(f19);
10929
10930 ::fidl_next::Wire::zero_padding(f20);
10931
10932 ::fidl_next::Wire::zero_padding(f21);
10933
10934 ::fidl_next::Wire::zero_padding(f22);
10935
10936 ::fidl_next::Wire::zero_padding(f23);
10937
10938 ::fidl_next::Wire::zero_padding(f24);
10939
10940 ::fidl_next::Wire::zero_padding(f25);
10941
10942 ::fidl_next::Wire::zero_padding(f26);
10943
10944 ::fidl_next::Wire::zero_padding(f27);
10945
10946 ::fidl_next::Wire::zero_padding(f28);
10947
10948 ::fidl_next::Wire::zero_padding(f29);
10949
10950 ::fidl_next::Wire::zero_padding(f30);
10951
10952 ::fidl_next::Wire::zero_padding(f31);
10953
10954 unsafe {
10955 out_.as_mut_ptr().cast::<u8>().add(155).write_bytes(0, 5);
10956 }
10957
10958 unsafe {
10959 out_.as_mut_ptr().cast::<u8>().add(99).write_bytes(0, 5);
10960 }
10961
10962 unsafe {
10963 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 6);
10964 }
10965 }
10966 }
10967
10968 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FidlvizDemo<'de>
10969 where
10970 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10971 ___D: ::fidl_next::Decoder<'de>,
10972 ___D: ::fidl_next::fuchsia::HandleDecoder,
10973 {
10974 fn decode(
10975 slot_: ::fidl_next::Slot<'_, Self>,
10976 decoder_: &mut ___D,
10977 _: (),
10978 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10979 if slot_.as_bytes()[155..160] != [0u8; 5] {
10980 return Err(::fidl_next::DecodeError::InvalidPadding);
10981 }
10982
10983 if slot_.as_bytes()[99..104] != [0u8; 5] {
10984 return Err(::fidl_next::DecodeError::InvalidPadding);
10985 }
10986
10987 if slot_.as_bytes()[34..40] != [0u8; 6] {
10988 return Err(::fidl_next::DecodeError::InvalidPadding);
10989 }
10990
10991 ::fidl_next::munge! {
10992 let Self {
10993 mut f1,
10994 mut f2,
10995 mut f3,
10996 mut f4,
10997 mut f5,
10998 mut f6,
10999 mut f7,
11000 mut f8,
11001 mut f9,
11002 mut f10,
11003 mut f11,
11004 mut f12,
11005 mut f13,
11006 mut f14,
11007 mut f15,
11008 mut f16,
11009 mut f17,
11010 mut f18,
11011 mut f19,
11012 mut f20,
11013 mut f21,
11014 mut f22,
11015 mut f23,
11016 mut f24,
11017 mut f25,
11018 mut f26,
11019 mut f27,
11020 mut f28,
11021 mut f29,
11022 mut f30,
11023 mut f31,
11024
11025 } = slot_;
11026 }
11027
11028 let _field = f1.as_mut();
11029
11030 ::fidl_next::Decode::decode(f1.as_mut(), decoder_, ())?;
11031
11032 let _field = f2.as_mut();
11033
11034 ::fidl_next::Decode::decode(f2.as_mut(), decoder_, ())?;
11035
11036 let _field = f3.as_mut();
11037
11038 ::fidl_next::Decode::decode(f3.as_mut(), decoder_, ())?;
11039
11040 let _field = f4.as_mut();
11041
11042 ::fidl_next::Decode::decode(f4.as_mut(), decoder_, ())?;
11043
11044 let _field = f5.as_mut();
11045
11046 ::fidl_next::Decode::decode(f5.as_mut(), decoder_, ())?;
11047
11048 let _field = f6.as_mut();
11049
11050 ::fidl_next::Decode::decode(f6.as_mut(), decoder_, ())?;
11051
11052 let _field = f7.as_mut();
11053
11054 ::fidl_next::Decode::decode(f7.as_mut(), decoder_, ())?;
11055
11056 let _field = f8.as_mut();
11057
11058 ::fidl_next::Decode::decode(f8.as_mut(), decoder_, ())?;
11059
11060 let _field = f9.as_mut();
11061
11062 ::fidl_next::Decode::decode(f9.as_mut(), decoder_, ())?;
11063
11064 let _field = f10.as_mut();
11065
11066 ::fidl_next::Decode::decode(f10.as_mut(), decoder_, ())?;
11067
11068 let _field = f11.as_mut();
11069
11070 ::fidl_next::Decode::decode(f11.as_mut(), decoder_, ())?;
11071
11072 let _field = f12.as_mut();
11073
11074 ::fidl_next::Decode::decode(f12.as_mut(), decoder_, ())?;
11075
11076 let _field = f13.as_mut();
11077 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11078 ::fidl_next::Decode::decode(f13.as_mut(), decoder_, 4294967295)?;
11079
11080 let _field = f14.as_mut();
11081 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11082 ::fidl_next::Decode::decode(f14.as_mut(), decoder_, 4294967295)?;
11083
11084 let _field = f15.as_mut();
11085 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11086 ::fidl_next::Decode::decode(f15.as_mut(), decoder_, 4294967295)?;
11087
11088 let _field = f16.as_mut();
11089
11090 ::fidl_next::Decode::decode(f16.as_mut(), decoder_, ())?;
11091
11092 let _field = f17.as_mut();
11093
11094 ::fidl_next::Decode::decode(f17.as_mut(), decoder_, ())?;
11095
11096 let _field = f18.as_mut();
11097
11098 ::fidl_next::Decode::decode(f18.as_mut(), decoder_, ())?;
11099
11100 let _field = f19.as_mut();
11101 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11102 ::fidl_next::Decode::decode(f19.as_mut(), decoder_, (4294967295, ()))?;
11103
11104 let _field = f20.as_mut();
11105 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11106 ::fidl_next::Decode::decode(f20.as_mut(), decoder_, (4294967295, ()))?;
11107
11108 let _field = f21.as_mut();
11109 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11110 ::fidl_next::Decode::decode(f21.as_mut(), decoder_, (4294967295, ()))?;
11111
11112 let _field = f22.as_mut();
11113
11114 ::fidl_next::Decode::decode(f22.as_mut(), decoder_, ())?;
11115
11116 let _field = f23.as_mut();
11117
11118 ::fidl_next::Decode::decode(f23.as_mut(), decoder_, ())?;
11119
11120 let _field = f24.as_mut();
11121
11122 ::fidl_next::Decode::decode(f24.as_mut(), decoder_, ())?;
11123
11124 let _field = f25.as_mut();
11125
11126 ::fidl_next::Decode::decode(f25.as_mut(), decoder_, ())?;
11127
11128 let _field = f26.as_mut();
11129
11130 ::fidl_next::Decode::decode(f26.as_mut(), decoder_, ())?;
11131
11132 let _field = f27.as_mut();
11133
11134 ::fidl_next::Decode::decode(f27.as_mut(), decoder_, ())?;
11135
11136 let _field = f28.as_mut();
11137
11138 ::fidl_next::Decode::decode(f28.as_mut(), decoder_, ())?;
11139
11140 let _field = f29.as_mut();
11141
11142 ::fidl_next::Decode::decode(f29.as_mut(), decoder_, ())?;
11143
11144 let _field = f30.as_mut();
11145
11146 ::fidl_next::Decode::decode(f30.as_mut(), decoder_, ())?;
11147
11148 let _field = f31.as_mut();
11149
11150 ::fidl_next::Decode::decode(f31.as_mut(), decoder_, ())?;
11151
11152 Ok(())
11153 }
11154 }
11155
11156 impl<'de> ::fidl_next::IntoNatural for FidlvizDemo<'de> {
11157 type Natural = crate::natural::FidlvizDemo;
11158 }
11159
11160 #[derive(Debug)]
11162 #[repr(C)]
11163 pub struct GoldenHandleBasicRightsStruct {
11164 pub v: ::fidl_next::wire::fuchsia::Event,
11165 }
11166
11167 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenHandleBasicRightsStruct>(), 4);
11168 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenHandleBasicRightsStruct>(), 4);
11169
11170 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenHandleBasicRightsStruct, v), 0);
11171
11172 impl ::fidl_next::Constrained for GoldenHandleBasicRightsStruct {
11173 type Constraint = ();
11174
11175 fn validate(
11176 _: ::fidl_next::Slot<'_, Self>,
11177 _: Self::Constraint,
11178 ) -> Result<(), ::fidl_next::ValidationError> {
11179 Ok(())
11180 }
11181 }
11182
11183 unsafe impl ::fidl_next::Wire for GoldenHandleBasicRightsStruct {
11184 type Narrowed<'de> = GoldenHandleBasicRightsStruct;
11185
11186 #[inline]
11187 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11188 ::fidl_next::munge! {
11189 let Self {
11190 v,
11191
11192 } = &mut *out_;
11193 }
11194
11195 ::fidl_next::Wire::zero_padding(v);
11196 }
11197 }
11198
11199 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenHandleBasicRightsStruct
11200 where
11201 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11202 ___D: ::fidl_next::fuchsia::HandleDecoder,
11203 {
11204 fn decode(
11205 slot_: ::fidl_next::Slot<'_, Self>,
11206 decoder_: &mut ___D,
11207 _: (),
11208 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11209 ::fidl_next::munge! {
11210 let Self {
11211 mut v,
11212
11213 } = slot_;
11214 }
11215
11216 let _field = v.as_mut();
11217
11218 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11219
11220 Ok(())
11221 }
11222 }
11223
11224 impl ::fidl_next::IntoNatural for GoldenHandleBasicRightsStruct {
11225 type Natural = crate::natural::GoldenHandleBasicRightsStruct;
11226 }
11227
11228 #[derive(Debug)]
11230 #[repr(C)]
11231 pub struct GoldenNullableHandleStruct {
11232 pub v: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11233 }
11234
11235 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenNullableHandleStruct>(), 4);
11236 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenNullableHandleStruct>(), 4);
11237
11238 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenNullableHandleStruct, v), 0);
11239
11240 impl ::fidl_next::Constrained for GoldenNullableHandleStruct {
11241 type Constraint = ();
11242
11243 fn validate(
11244 _: ::fidl_next::Slot<'_, Self>,
11245 _: Self::Constraint,
11246 ) -> Result<(), ::fidl_next::ValidationError> {
11247 Ok(())
11248 }
11249 }
11250
11251 unsafe impl ::fidl_next::Wire for GoldenNullableHandleStruct {
11252 type Narrowed<'de> = GoldenNullableHandleStruct;
11253
11254 #[inline]
11255 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11256 ::fidl_next::munge! {
11257 let Self {
11258 v,
11259
11260 } = &mut *out_;
11261 }
11262
11263 ::fidl_next::Wire::zero_padding(v);
11264 }
11265 }
11266
11267 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenNullableHandleStruct
11268 where
11269 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11270 ___D: ::fidl_next::fuchsia::HandleDecoder,
11271 {
11272 fn decode(
11273 slot_: ::fidl_next::Slot<'_, Self>,
11274 decoder_: &mut ___D,
11275 _: (),
11276 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11277 ::fidl_next::munge! {
11278 let Self {
11279 mut v,
11280
11281 } = slot_;
11282 }
11283
11284 let _field = v.as_mut();
11285
11286 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11287
11288 Ok(())
11289 }
11290 }
11291
11292 impl ::fidl_next::IntoNatural for GoldenNullableHandleStruct {
11293 type Natural = crate::natural::GoldenNullableHandleStruct;
11294 }
11295
11296 #[derive(Debug)]
11298 #[repr(C)]
11299 pub struct MultipleBoundedNonnullableVectorsOfHandles<'de> {
11300 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11301
11302 pub vh1: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11303 }
11304
11305 static_assertions::const_assert_eq!(
11306 std::mem::size_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11307 32
11308 );
11309 static_assertions::const_assert_eq!(
11310 std::mem::align_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11311 8
11312 );
11313
11314 static_assertions::const_assert_eq!(
11315 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh0),
11316 0
11317 );
11318
11319 static_assertions::const_assert_eq!(
11320 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh1),
11321 16
11322 );
11323
11324 impl ::fidl_next::Constrained for MultipleBoundedNonnullableVectorsOfHandles<'_> {
11325 type Constraint = ();
11326
11327 fn validate(
11328 _: ::fidl_next::Slot<'_, Self>,
11329 _: Self::Constraint,
11330 ) -> Result<(), ::fidl_next::ValidationError> {
11331 Ok(())
11332 }
11333 }
11334
11335 unsafe impl ::fidl_next::Wire for MultipleBoundedNonnullableVectorsOfHandles<'static> {
11336 type Narrowed<'de> = MultipleBoundedNonnullableVectorsOfHandles<'de>;
11337
11338 #[inline]
11339 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11340 ::fidl_next::munge! {
11341 let Self {
11342 vh0,
11343 vh1,
11344
11345 } = &mut *out_;
11346 }
11347
11348 ::fidl_next::Wire::zero_padding(vh0);
11349
11350 ::fidl_next::Wire::zero_padding(vh1);
11351 }
11352 }
11353
11354 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNonnullableVectorsOfHandles<'de>
11355 where
11356 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11357 ___D: ::fidl_next::Decoder<'de>,
11358 ___D: ::fidl_next::fuchsia::HandleDecoder,
11359 {
11360 fn decode(
11361 slot_: ::fidl_next::Slot<'_, Self>,
11362 decoder_: &mut ___D,
11363 _: (),
11364 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11365 ::fidl_next::munge! {
11366 let Self {
11367 mut vh0,
11368 mut vh1,
11369
11370 } = slot_;
11371 }
11372
11373 let _field = vh0.as_mut();
11374 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11375 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11376
11377 let vh0 = unsafe { vh0.deref_unchecked() };
11378
11379 if vh0.len() > 2 {
11380 return Err(::fidl_next::DecodeError::VectorTooLong {
11381 size: vh0.len() as u64,
11382 limit: 2,
11383 });
11384 }
11385
11386 let _field = vh1.as_mut();
11387 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11388 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11389
11390 let vh1 = unsafe { vh1.deref_unchecked() };
11391
11392 if vh1.len() > 32 {
11393 return Err(::fidl_next::DecodeError::VectorTooLong {
11394 size: vh1.len() as u64,
11395 limit: 32,
11396 });
11397 }
11398
11399 Ok(())
11400 }
11401 }
11402
11403 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNonnullableVectorsOfHandles<'de> {
11404 type Natural = crate::natural::MultipleBoundedNonnullableVectorsOfHandles;
11405 }
11406
11407 #[derive(Debug)]
11409 #[repr(C)]
11410 pub struct MultipleBoundedNullableVectorsOfHandles<'de> {
11411 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11412
11413 pub vh1: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11414 }
11415
11416 static_assertions::const_assert_eq!(
11417 std::mem::size_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11418 32
11419 );
11420 static_assertions::const_assert_eq!(
11421 std::mem::align_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11422 8
11423 );
11424
11425 static_assertions::const_assert_eq!(
11426 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh0),
11427 0
11428 );
11429
11430 static_assertions::const_assert_eq!(
11431 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh1),
11432 16
11433 );
11434
11435 impl ::fidl_next::Constrained for MultipleBoundedNullableVectorsOfHandles<'_> {
11436 type Constraint = ();
11437
11438 fn validate(
11439 _: ::fidl_next::Slot<'_, Self>,
11440 _: Self::Constraint,
11441 ) -> Result<(), ::fidl_next::ValidationError> {
11442 Ok(())
11443 }
11444 }
11445
11446 unsafe impl ::fidl_next::Wire for MultipleBoundedNullableVectorsOfHandles<'static> {
11447 type Narrowed<'de> = MultipleBoundedNullableVectorsOfHandles<'de>;
11448
11449 #[inline]
11450 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11451 ::fidl_next::munge! {
11452 let Self {
11453 vh0,
11454 vh1,
11455
11456 } = &mut *out_;
11457 }
11458
11459 ::fidl_next::Wire::zero_padding(vh0);
11460
11461 ::fidl_next::Wire::zero_padding(vh1);
11462 }
11463 }
11464
11465 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNullableVectorsOfHandles<'de>
11466 where
11467 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11468 ___D: ::fidl_next::Decoder<'de>,
11469 ___D: ::fidl_next::fuchsia::HandleDecoder,
11470 {
11471 fn decode(
11472 slot_: ::fidl_next::Slot<'_, Self>,
11473 decoder_: &mut ___D,
11474 _: (),
11475 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11476 ::fidl_next::munge! {
11477 let Self {
11478 mut vh0,
11479 mut vh1,
11480
11481 } = slot_;
11482 }
11483
11484 let _field = vh0.as_mut();
11485 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11486 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11487
11488 let vh0 = unsafe { vh0.deref_unchecked() };
11489
11490 if let Some(vh0) = vh0.as_ref() {
11491 if vh0.len() > 2 {
11492 return Err(::fidl_next::DecodeError::VectorTooLong {
11493 size: vh0.len() as u64,
11494 limit: 2,
11495 });
11496 }
11497 }
11498
11499 let _field = vh1.as_mut();
11500 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11501 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11502
11503 let vh1 = unsafe { vh1.deref_unchecked() };
11504
11505 if let Some(vh1) = vh1.as_ref() {
11506 if vh1.len() > 32 {
11507 return Err(::fidl_next::DecodeError::VectorTooLong {
11508 size: vh1.len() as u64,
11509 limit: 32,
11510 });
11511 }
11512 }
11513
11514 Ok(())
11515 }
11516 }
11517
11518 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNullableVectorsOfHandles<'de> {
11519 type Natural = crate::natural::MultipleBoundedNullableVectorsOfHandles;
11520 }
11521
11522 #[derive(Debug)]
11524 #[repr(C)]
11525 pub struct MultipleHandleSubtypes {
11526 pub untyped: ::fidl_next::wire::fuchsia::NullableHandle,
11527
11528 pub event: ::fidl_next::wire::fuchsia::Event,
11529
11530 pub channel: ::fidl_next::wire::fuchsia::Channel,
11531 }
11532
11533 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleHandleSubtypes>(), 12);
11534 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleHandleSubtypes>(), 4);
11535
11536 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, untyped), 0);
11537
11538 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, event), 4);
11539
11540 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, channel), 8);
11541
11542 impl ::fidl_next::Constrained for MultipleHandleSubtypes {
11543 type Constraint = ();
11544
11545 fn validate(
11546 _: ::fidl_next::Slot<'_, Self>,
11547 _: Self::Constraint,
11548 ) -> Result<(), ::fidl_next::ValidationError> {
11549 Ok(())
11550 }
11551 }
11552
11553 unsafe impl ::fidl_next::Wire for MultipleHandleSubtypes {
11554 type Narrowed<'de> = MultipleHandleSubtypes;
11555
11556 #[inline]
11557 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11558 ::fidl_next::munge! {
11559 let Self {
11560 untyped,
11561 event,
11562 channel,
11563
11564 } = &mut *out_;
11565 }
11566
11567 ::fidl_next::Wire::zero_padding(untyped);
11568
11569 ::fidl_next::Wire::zero_padding(event);
11570
11571 ::fidl_next::Wire::zero_padding(channel);
11572 }
11573 }
11574
11575 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleHandleSubtypes
11576 where
11577 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11578 ___D: ::fidl_next::fuchsia::HandleDecoder,
11579 {
11580 fn decode(
11581 slot_: ::fidl_next::Slot<'_, Self>,
11582 decoder_: &mut ___D,
11583 _: (),
11584 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11585 ::fidl_next::munge! {
11586 let Self {
11587 mut untyped,
11588 mut event,
11589 mut channel,
11590
11591 } = slot_;
11592 }
11593
11594 let _field = untyped.as_mut();
11595
11596 ::fidl_next::Decode::decode(untyped.as_mut(), decoder_, ())?;
11597
11598 let _field = event.as_mut();
11599
11600 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
11601
11602 let _field = channel.as_mut();
11603
11604 ::fidl_next::Decode::decode(channel.as_mut(), decoder_, ())?;
11605
11606 Ok(())
11607 }
11608 }
11609
11610 impl ::fidl_next::IntoNatural for MultipleHandleSubtypes {
11611 type Natural = crate::natural::MultipleHandleSubtypes;
11612 }
11613
11614 #[derive(Debug)]
11616 #[repr(C)]
11617 pub struct MultipleNonnullableHandles {
11618 pub data0: ::fidl_next::wire::Uint32,
11619
11620 pub handle0: ::fidl_next::wire::fuchsia::NullableHandle,
11621
11622 pub data1: ::fidl_next::wire::Uint64,
11623
11624 pub handle1: ::fidl_next::wire::fuchsia::Channel,
11625
11626 pub handle2: ::fidl_next::wire::fuchsia::Event,
11627
11628 pub data2: ::fidl_next::wire::Uint64,
11629 }
11630
11631 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNonnullableHandles>(), 32);
11632 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNonnullableHandles>(), 8);
11633
11634 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data0), 0);
11635
11636 static_assertions::const_assert_eq!(
11637 std::mem::offset_of!(MultipleNonnullableHandles, handle0),
11638 4
11639 );
11640
11641 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data1), 8);
11642
11643 static_assertions::const_assert_eq!(
11644 std::mem::offset_of!(MultipleNonnullableHandles, handle1),
11645 16
11646 );
11647
11648 static_assertions::const_assert_eq!(
11649 std::mem::offset_of!(MultipleNonnullableHandles, handle2),
11650 20
11651 );
11652
11653 static_assertions::const_assert_eq!(
11654 std::mem::offset_of!(MultipleNonnullableHandles, data2),
11655 24
11656 );
11657
11658 impl ::fidl_next::Constrained for MultipleNonnullableHandles {
11659 type Constraint = ();
11660
11661 fn validate(
11662 _: ::fidl_next::Slot<'_, Self>,
11663 _: Self::Constraint,
11664 ) -> Result<(), ::fidl_next::ValidationError> {
11665 Ok(())
11666 }
11667 }
11668
11669 unsafe impl ::fidl_next::Wire for MultipleNonnullableHandles {
11670 type Narrowed<'de> = MultipleNonnullableHandles;
11671
11672 #[inline]
11673 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11674 ::fidl_next::munge! {
11675 let Self {
11676 data0,
11677 handle0,
11678 data1,
11679 handle1,
11680 handle2,
11681 data2,
11682
11683 } = &mut *out_;
11684 }
11685
11686 ::fidl_next::Wire::zero_padding(data0);
11687
11688 ::fidl_next::Wire::zero_padding(handle0);
11689
11690 ::fidl_next::Wire::zero_padding(data1);
11691
11692 ::fidl_next::Wire::zero_padding(handle1);
11693
11694 ::fidl_next::Wire::zero_padding(handle2);
11695
11696 ::fidl_next::Wire::zero_padding(data2);
11697 }
11698 }
11699
11700 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNonnullableHandles
11701 where
11702 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11703 ___D: ::fidl_next::fuchsia::HandleDecoder,
11704 {
11705 fn decode(
11706 slot_: ::fidl_next::Slot<'_, Self>,
11707 decoder_: &mut ___D,
11708 _: (),
11709 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11710 ::fidl_next::munge! {
11711 let Self {
11712 mut data0,
11713 mut handle0,
11714 mut data1,
11715 mut handle1,
11716 mut handle2,
11717 mut data2,
11718
11719 } = slot_;
11720 }
11721
11722 let _field = data0.as_mut();
11723
11724 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
11725
11726 let _field = handle0.as_mut();
11727
11728 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
11729
11730 let _field = data1.as_mut();
11731
11732 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
11733
11734 let _field = handle1.as_mut();
11735
11736 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
11737
11738 let _field = handle2.as_mut();
11739
11740 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
11741
11742 let _field = data2.as_mut();
11743
11744 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
11745
11746 Ok(())
11747 }
11748 }
11749
11750 impl ::fidl_next::IntoNatural for MultipleNonnullableHandles {
11751 type Natural = crate::natural::MultipleNonnullableHandles;
11752 }
11753
11754 #[derive(Debug)]
11756 #[repr(C)]
11757 pub struct MultipleNullableHandles {
11758 pub data0: ::fidl_next::wire::Uint32,
11759
11760 pub handle0: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11761
11762 pub data1: ::fidl_next::wire::Uint64,
11763
11764 pub handle1: ::fidl_next::wire::fuchsia::OptionalChannel,
11765
11766 pub handle2: ::fidl_next::wire::fuchsia::OptionalEvent,
11767
11768 pub data2: ::fidl_next::wire::Uint64,
11769 }
11770
11771 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNullableHandles>(), 32);
11772 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNullableHandles>(), 8);
11773
11774 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data0), 0);
11775
11776 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle0), 4);
11777
11778 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data1), 8);
11779
11780 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle1), 16);
11781
11782 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle2), 20);
11783
11784 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data2), 24);
11785
11786 impl ::fidl_next::Constrained for MultipleNullableHandles {
11787 type Constraint = ();
11788
11789 fn validate(
11790 _: ::fidl_next::Slot<'_, Self>,
11791 _: Self::Constraint,
11792 ) -> Result<(), ::fidl_next::ValidationError> {
11793 Ok(())
11794 }
11795 }
11796
11797 unsafe impl ::fidl_next::Wire for MultipleNullableHandles {
11798 type Narrowed<'de> = MultipleNullableHandles;
11799
11800 #[inline]
11801 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11802 ::fidl_next::munge! {
11803 let Self {
11804 data0,
11805 handle0,
11806 data1,
11807 handle1,
11808 handle2,
11809 data2,
11810
11811 } = &mut *out_;
11812 }
11813
11814 ::fidl_next::Wire::zero_padding(data0);
11815
11816 ::fidl_next::Wire::zero_padding(handle0);
11817
11818 ::fidl_next::Wire::zero_padding(data1);
11819
11820 ::fidl_next::Wire::zero_padding(handle1);
11821
11822 ::fidl_next::Wire::zero_padding(handle2);
11823
11824 ::fidl_next::Wire::zero_padding(data2);
11825 }
11826 }
11827
11828 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNullableHandles
11829 where
11830 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11831 ___D: ::fidl_next::fuchsia::HandleDecoder,
11832 {
11833 fn decode(
11834 slot_: ::fidl_next::Slot<'_, Self>,
11835 decoder_: &mut ___D,
11836 _: (),
11837 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11838 ::fidl_next::munge! {
11839 let Self {
11840 mut data0,
11841 mut handle0,
11842 mut data1,
11843 mut handle1,
11844 mut handle2,
11845 mut data2,
11846
11847 } = slot_;
11848 }
11849
11850 let _field = data0.as_mut();
11851
11852 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
11853
11854 let _field = handle0.as_mut();
11855
11856 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
11857
11858 let _field = data1.as_mut();
11859
11860 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
11861
11862 let _field = handle1.as_mut();
11863
11864 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
11865
11866 let _field = handle2.as_mut();
11867
11868 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
11869
11870 let _field = data2.as_mut();
11871
11872 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
11873
11874 Ok(())
11875 }
11876 }
11877
11878 impl ::fidl_next::IntoNatural for MultipleNullableHandles {
11879 type Natural = crate::natural::MultipleNullableHandles;
11880 }
11881
11882 #[derive(Debug)]
11884 #[repr(C)]
11885 pub struct NonnullableHandle {
11886 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
11887 }
11888
11889 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandle>(), 4);
11890 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandle>(), 4);
11891
11892 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandle, h), 0);
11893
11894 impl ::fidl_next::Constrained for NonnullableHandle {
11895 type Constraint = ();
11896
11897 fn validate(
11898 _: ::fidl_next::Slot<'_, Self>,
11899 _: Self::Constraint,
11900 ) -> Result<(), ::fidl_next::ValidationError> {
11901 Ok(())
11902 }
11903 }
11904
11905 unsafe impl ::fidl_next::Wire for NonnullableHandle {
11906 type Narrowed<'de> = NonnullableHandle;
11907
11908 #[inline]
11909 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11910 ::fidl_next::munge! {
11911 let Self {
11912 h,
11913
11914 } = &mut *out_;
11915 }
11916
11917 ::fidl_next::Wire::zero_padding(h);
11918 }
11919 }
11920
11921 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandle
11922 where
11923 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11924 ___D: ::fidl_next::fuchsia::HandleDecoder,
11925 {
11926 fn decode(
11927 slot_: ::fidl_next::Slot<'_, Self>,
11928 decoder_: &mut ___D,
11929 _: (),
11930 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11931 ::fidl_next::munge! {
11932 let Self {
11933 mut h,
11934
11935 } = slot_;
11936 }
11937
11938 let _field = h.as_mut();
11939
11940 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
11941
11942 Ok(())
11943 }
11944 }
11945
11946 impl ::fidl_next::IntoNatural for NonnullableHandle {
11947 type Natural = crate::natural::NonnullableHandle;
11948 }
11949
11950 #[derive(Debug)]
11952 #[repr(C)]
11953 pub struct NonnullableHandleArray {
11954 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
11955 }
11956
11957 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandleArray>(), 16);
11958 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandleArray>(), 4);
11959
11960 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandleArray, handles), 0);
11961
11962 impl ::fidl_next::Constrained for NonnullableHandleArray {
11963 type Constraint = ();
11964
11965 fn validate(
11966 _: ::fidl_next::Slot<'_, Self>,
11967 _: Self::Constraint,
11968 ) -> Result<(), ::fidl_next::ValidationError> {
11969 Ok(())
11970 }
11971 }
11972
11973 unsafe impl ::fidl_next::Wire for NonnullableHandleArray {
11974 type Narrowed<'de> = NonnullableHandleArray;
11975
11976 #[inline]
11977 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11978 ::fidl_next::munge! {
11979 let Self {
11980 handles,
11981
11982 } = &mut *out_;
11983 }
11984
11985 ::fidl_next::Wire::zero_padding(handles);
11986 }
11987 }
11988
11989 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandleArray
11990 where
11991 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11992 ___D: ::fidl_next::fuchsia::HandleDecoder,
11993 {
11994 fn decode(
11995 slot_: ::fidl_next::Slot<'_, Self>,
11996 decoder_: &mut ___D,
11997 _: (),
11998 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11999 ::fidl_next::munge! {
12000 let Self {
12001 mut handles,
12002
12003 } = slot_;
12004 }
12005
12006 let _field = handles.as_mut();
12007
12008 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
12009
12010 Ok(())
12011 }
12012 }
12013
12014 impl ::fidl_next::IntoNatural for NonnullableHandleArray {
12015 type Natural = crate::natural::NonnullableHandleArray;
12016 }
12017
12018 #[derive(Debug)]
12020 #[repr(C)]
12021 pub struct NullableHandle {
12022 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
12023 }
12024
12025 static_assertions::const_assert_eq!(std::mem::size_of::<NullableHandle>(), 4);
12026 static_assertions::const_assert_eq!(std::mem::align_of::<NullableHandle>(), 4);
12027
12028 static_assertions::const_assert_eq!(std::mem::offset_of!(NullableHandle, h), 0);
12029
12030 impl ::fidl_next::Constrained for NullableHandle {
12031 type Constraint = ();
12032
12033 fn validate(
12034 _: ::fidl_next::Slot<'_, Self>,
12035 _: Self::Constraint,
12036 ) -> Result<(), ::fidl_next::ValidationError> {
12037 Ok(())
12038 }
12039 }
12040
12041 unsafe impl ::fidl_next::Wire for NullableHandle {
12042 type Narrowed<'de> = NullableHandle;
12043
12044 #[inline]
12045 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12046 ::fidl_next::munge! {
12047 let Self {
12048 h,
12049
12050 } = &mut *out_;
12051 }
12052
12053 ::fidl_next::Wire::zero_padding(h);
12054 }
12055 }
12056
12057 unsafe impl<___D> ::fidl_next::Decode<___D> for NullableHandle
12058 where
12059 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12060 ___D: ::fidl_next::fuchsia::HandleDecoder,
12061 {
12062 fn decode(
12063 slot_: ::fidl_next::Slot<'_, Self>,
12064 decoder_: &mut ___D,
12065 _: (),
12066 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12067 ::fidl_next::munge! {
12068 let Self {
12069 mut h,
12070
12071 } = slot_;
12072 }
12073
12074 let _field = h.as_mut();
12075
12076 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12077
12078 Ok(())
12079 }
12080 }
12081
12082 impl ::fidl_next::IntoNatural for NullableHandle {
12083 type Natural = crate::natural::NullableHandle;
12084 }
12085
12086 #[derive(Debug)]
12088 #[repr(C)]
12089 pub struct OutOfLineArrayOfNonnullableHandles<'de> {
12090 pub handles: ::fidl_next::wire::Box<'de, crate::wire::NonnullableHandleArray>,
12091 }
12092
12093 static_assertions::const_assert_eq!(
12094 std::mem::size_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12095 8
12096 );
12097 static_assertions::const_assert_eq!(
12098 std::mem::align_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12099 8
12100 );
12101
12102 static_assertions::const_assert_eq!(
12103 std::mem::offset_of!(OutOfLineArrayOfNonnullableHandles<'_>, handles),
12104 0
12105 );
12106
12107 impl ::fidl_next::Constrained for OutOfLineArrayOfNonnullableHandles<'_> {
12108 type Constraint = ();
12109
12110 fn validate(
12111 _: ::fidl_next::Slot<'_, Self>,
12112 _: Self::Constraint,
12113 ) -> Result<(), ::fidl_next::ValidationError> {
12114 Ok(())
12115 }
12116 }
12117
12118 unsafe impl ::fidl_next::Wire for OutOfLineArrayOfNonnullableHandles<'static> {
12119 type Narrowed<'de> = OutOfLineArrayOfNonnullableHandles<'de>;
12120
12121 #[inline]
12122 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12123 ::fidl_next::munge! {
12124 let Self {
12125 handles,
12126
12127 } = &mut *out_;
12128 }
12129
12130 ::fidl_next::Wire::zero_padding(handles);
12131 }
12132 }
12133
12134 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OutOfLineArrayOfNonnullableHandles<'de>
12135 where
12136 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12137 ___D: ::fidl_next::Decoder<'de>,
12138 ___D: ::fidl_next::fuchsia::HandleDecoder,
12139 {
12140 fn decode(
12141 slot_: ::fidl_next::Slot<'_, Self>,
12142 decoder_: &mut ___D,
12143 _: (),
12144 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12145 ::fidl_next::munge! {
12146 let Self {
12147 mut handles,
12148
12149 } = slot_;
12150 }
12151
12152 let _field = handles.as_mut();
12153
12154 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
12155
12156 Ok(())
12157 }
12158 }
12159
12160 impl<'de> ::fidl_next::IntoNatural for OutOfLineArrayOfNonnullableHandles<'de> {
12161 type Natural = crate::natural::OutOfLineArrayOfNonnullableHandles;
12162 }
12163
12164 #[repr(transparent)]
12166 pub struct SampleResourceXUnion<'de> {
12167 pub(crate) raw: ::fidl_next::wire::Union,
12168 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12169 }
12170
12171 impl<'de> Drop for SampleResourceXUnion<'de> {
12172 fn drop(&mut self) {
12173 match self.raw.ordinal() {
12174 1 => {
12175 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12176 }
12177
12178 2 => {
12179 let _ =
12180 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12181 }
12182
12183 3 => {
12184 let _ =
12185 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12186 }
12187
12188 _ => (),
12189 }
12190 }
12191 }
12192
12193 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
12194 type Constraint = ();
12195
12196 fn validate(
12197 _: ::fidl_next::Slot<'_, Self>,
12198 _: Self::Constraint,
12199 ) -> Result<(), ::fidl_next::ValidationError> {
12200 Ok(())
12201 }
12202 }
12203
12204 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
12205 type Narrowed<'de> = SampleResourceXUnion<'de>;
12206
12207 #[inline]
12208 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12209 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12210 ::fidl_next::wire::Union::zero_padding(raw);
12211 }
12212 }
12213
12214 pub mod sample_resource_x_union {
12215 pub enum Ref<'de> {
12216 U(&'de ::fidl_next::wire::Uint32),
12217
12218 Su(&'de crate::wire::SimpleUnion<'de>),
12219
12220 St(&'de crate::wire::SimpleTable<'de>),
12221
12222 UnknownOrdinal_(u64),
12223 }
12224
12225 pub enum Value<'de> {
12226 U(::fidl_next::wire::Uint32),
12227
12228 Su(crate::wire::SimpleUnion<'de>),
12229
12230 St(crate::wire::SimpleTable<'de>),
12231
12232 UnknownOrdinal_(u64),
12233 }
12234 }
12235
12236 impl<'de> SampleResourceXUnion<'de> {
12237 pub fn as_ref(&self) -> crate::wire::sample_resource_x_union::Ref<'_> {
12238 match self.raw.ordinal() {
12239 1 => crate::wire::sample_resource_x_union::Ref::U(unsafe {
12240 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12241 }),
12242
12243 2 => crate::wire::sample_resource_x_union::Ref::Su(unsafe {
12244 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12245 }),
12246
12247 3 => crate::wire::sample_resource_x_union::Ref::St(unsafe {
12248 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12249 }),
12250
12251 unknown => crate::wire::sample_resource_x_union::Ref::UnknownOrdinal_(unknown),
12252 }
12253 }
12254
12255 pub fn into_inner(self) -> crate::wire::sample_resource_x_union::Value<'de> {
12256 let this = ::core::mem::ManuallyDrop::new(self);
12257
12258 match this.raw.ordinal() {
12259 1 => crate::wire::sample_resource_x_union::Value::U(unsafe {
12260 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
12261 }),
12262
12263 2 => crate::wire::sample_resource_x_union::Value::Su(unsafe {
12264 this.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
12265 }),
12266
12267 3 => crate::wire::sample_resource_x_union::Value::St(unsafe {
12268 this.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
12269 }),
12270
12271 unknown => crate::wire::sample_resource_x_union::Value::UnknownOrdinal_(unknown),
12272 }
12273 }
12274 }
12275
12276 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
12277 where
12278 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12279 ___D: ::fidl_next::Decoder<'de>,
12280 ___D: ::fidl_next::fuchsia::HandleDecoder,
12281 {
12282 fn decode(
12283 mut slot: ::fidl_next::Slot<'_, Self>,
12284 decoder: &mut ___D,
12285 _: (),
12286 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12287 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12288 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12289 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12290 raw,
12291 decoder,
12292 (),
12293 )?,
12294
12295 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12296 raw,
12297 decoder,
12298 (),
12299 )?,
12300
12301 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12302 raw,
12303 decoder,
12304 (),
12305 )?,
12306
12307 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
12308 }
12309
12310 Ok(())
12311 }
12312 }
12313
12314 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
12315 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12316 match self.raw.ordinal() {
12317 1 => unsafe {
12318 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12319 },
12320 2 => unsafe {
12321 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12322 },
12323 3 => unsafe {
12324 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12325 },
12326 _ => unsafe { ::core::hint::unreachable_unchecked() },
12327 }
12328 }
12329 }
12330
12331 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
12332 type Natural = crate::natural::SampleResourceXUnion;
12333 }
12334
12335 #[repr(transparent)]
12337 pub struct SampleStrictResourceXUnion<'de> {
12338 pub(crate) raw: ::fidl_next::wire::Union,
12339 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12340 }
12341
12342 impl<'de> Drop for SampleStrictResourceXUnion<'de> {
12343 fn drop(&mut self) {
12344 match self.raw.ordinal() {
12345 1 => {
12346 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12347 }
12348
12349 2 => {
12350 let _ =
12351 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12352 }
12353
12354 3 => {
12355 let _ =
12356 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12357 }
12358
12359 _ => unsafe { ::core::hint::unreachable_unchecked() },
12360 }
12361 }
12362 }
12363
12364 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
12365 type Constraint = ();
12366
12367 fn validate(
12368 _: ::fidl_next::Slot<'_, Self>,
12369 _: Self::Constraint,
12370 ) -> Result<(), ::fidl_next::ValidationError> {
12371 Ok(())
12372 }
12373 }
12374
12375 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
12376 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
12377
12378 #[inline]
12379 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12380 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12381 ::fidl_next::wire::Union::zero_padding(raw);
12382 }
12383 }
12384
12385 pub mod sample_strict_resource_x_union {
12386 pub enum Ref<'de> {
12387 U(&'de ::fidl_next::wire::Uint32),
12388
12389 Su(&'de crate::wire::SimpleUnion<'de>),
12390
12391 St(&'de crate::wire::SimpleTable<'de>),
12392 }
12393
12394 pub enum Value<'de> {
12395 U(::fidl_next::wire::Uint32),
12396
12397 Su(crate::wire::SimpleUnion<'de>),
12398
12399 St(crate::wire::SimpleTable<'de>),
12400 }
12401 }
12402
12403 impl<'de> SampleStrictResourceXUnion<'de> {
12404 pub fn as_ref(&self) -> crate::wire::sample_strict_resource_x_union::Ref<'_> {
12405 match self.raw.ordinal() {
12406 1 => crate::wire::sample_strict_resource_x_union::Ref::U(unsafe {
12407 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12408 }),
12409
12410 2 => crate::wire::sample_strict_resource_x_union::Ref::Su(unsafe {
12411 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12412 }),
12413
12414 3 => crate::wire::sample_strict_resource_x_union::Ref::St(unsafe {
12415 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12416 }),
12417
12418 _ => unsafe { ::core::hint::unreachable_unchecked() },
12419 }
12420 }
12421
12422 pub fn into_inner(self) -> crate::wire::sample_strict_resource_x_union::Value<'de> {
12423 let this = ::core::mem::ManuallyDrop::new(self);
12424
12425 match this.raw.ordinal() {
12426 1 => crate::wire::sample_strict_resource_x_union::Value::U(unsafe {
12427 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
12428 }),
12429
12430 2 => crate::wire::sample_strict_resource_x_union::Value::Su(unsafe {
12431 this.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
12432 }),
12433
12434 3 => crate::wire::sample_strict_resource_x_union::Value::St(unsafe {
12435 this.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
12436 }),
12437
12438 _ => unsafe { ::core::hint::unreachable_unchecked() },
12439 }
12440 }
12441 }
12442
12443 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
12444 where
12445 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12446 ___D: ::fidl_next::Decoder<'de>,
12447 ___D: ::fidl_next::fuchsia::HandleDecoder,
12448 {
12449 fn decode(
12450 mut slot: ::fidl_next::Slot<'_, Self>,
12451 decoder: &mut ___D,
12452 _: (),
12453 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12454 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12455 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12456 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12457 raw,
12458 decoder,
12459 (),
12460 )?,
12461
12462 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12463 raw,
12464 decoder,
12465 (),
12466 )?,
12467
12468 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12469 raw,
12470 decoder,
12471 (),
12472 )?,
12473
12474 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12475 }
12476
12477 Ok(())
12478 }
12479 }
12480
12481 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
12482 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12483 match self.raw.ordinal() {
12484 1 => unsafe {
12485 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12486 },
12487 2 => unsafe {
12488 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12489 },
12490 3 => unsafe {
12491 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12492 },
12493 _ => unsafe { ::core::hint::unreachable_unchecked() },
12494 }
12495 }
12496 }
12497
12498 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
12499 type Natural = crate::natural::SampleStrictResourceXUnion;
12500 }
12501
12502 #[repr(transparent)]
12504 pub struct UnionWithVector<'de> {
12505 pub(crate) raw: ::fidl_next::wire::Union,
12506 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12507 }
12508
12509 impl<'de> Drop for UnionWithVector<'de> {
12510 fn drop(&mut self) {
12511 match self.raw.ordinal() {
12512 1 => {
12513 let _ = unsafe { self.raw.get().read_unchecked::<u8>() };
12514 }
12515
12516 2 => {
12517 let _ = unsafe {
12518 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12519 };
12520 }
12521
12522 3 => {
12523 let _ = unsafe {
12524 self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
12525 };
12526 }
12527
12528 4 => {
12529 let _ = unsafe {
12530 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
12531 };
12532 }
12533
12534 5 => {
12535 let _ = unsafe {
12536 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
12537 };
12538 }
12539
12540 6 => {
12541 let _ = unsafe {
12542 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<
12543 'de,
12544 ::fidl_next::wire::fuchsia::NullableHandle,
12545 >>()
12546 };
12547 }
12548
12549 7 => {
12550 let _ = unsafe {
12551 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12552 };
12553 }
12554
12555 8 => {
12556 let _ = unsafe {
12557 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12558 };
12559 }
12560
12561 9 => {
12562 let _ = unsafe {
12563 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
12564 };
12565 }
12566
12567 _ => unsafe { ::core::hint::unreachable_unchecked() },
12568 }
12569 }
12570 }
12571
12572 impl ::fidl_next::Constrained for UnionWithVector<'_> {
12573 type Constraint = ();
12574
12575 fn validate(
12576 _: ::fidl_next::Slot<'_, Self>,
12577 _: Self::Constraint,
12578 ) -> Result<(), ::fidl_next::ValidationError> {
12579 Ok(())
12580 }
12581 }
12582
12583 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
12584 type Narrowed<'de> = UnionWithVector<'de>;
12585
12586 #[inline]
12587 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12588 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12589 ::fidl_next::wire::Union::zero_padding(raw);
12590 }
12591 }
12592
12593 pub mod union_with_vector {
12594 pub enum Ref<'de> {
12595 Unused(&'de u8),
12596
12597 VectorOfUint8(&'de ::fidl_next::wire::Vector<'de, u8>),
12598
12599 S(&'de ::fidl_next::wire::String<'de>),
12600
12601 VectorS3A1(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>),
12602
12603 VectorS3A2(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>),
12604
12605 Handles(
12606 &'de ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
12607 ),
12608
12609 ArrayS3A1(&'de [crate::wire::StructSize3Align1; 2]),
12610
12611 ArrayS3A2(&'de [crate::wire::StructSize3Align2; 2]),
12612
12613 VectorUnion(&'de ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>),
12614 }
12615
12616 pub enum Value<'de> {
12617 Unused(u8),
12618
12619 VectorOfUint8(::fidl_next::wire::Vector<'de, u8>),
12620
12621 S(::fidl_next::wire::String<'de>),
12622
12623 VectorS3A1(::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>),
12624
12625 VectorS3A2(::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>),
12626
12627 Handles(::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>),
12628
12629 ArrayS3A1([crate::wire::StructSize3Align1; 2]),
12630
12631 ArrayS3A2([crate::wire::StructSize3Align2; 2]),
12632
12633 VectorUnion(::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>),
12634 }
12635 }
12636
12637 impl<'de> UnionWithVector<'de> {
12638 pub fn as_ref(&self) -> crate::wire::union_with_vector::Ref<'_> {
12639 match self.raw.ordinal() {
12640 1 => crate::wire::union_with_vector::Ref::Unused(unsafe {
12641 self.raw.get().deref_unchecked::<u8>()
12642 }),
12643
12644 2 => crate::wire::union_with_vector::Ref::VectorOfUint8(unsafe {
12645 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
12646 }),
12647
12648 3 => crate::wire::union_with_vector::Ref::S(unsafe {
12649 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
12650 }),
12651
12652 4 => crate::wire::union_with_vector::Ref::VectorS3A1(unsafe {
12653 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>>()
12654 }),
12655
12656 5 => crate::wire::union_with_vector::Ref::VectorS3A2(unsafe {
12657 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>>()
12658 }),
12659
12660 6 => crate::wire::union_with_vector::Ref::Handles(unsafe {
12661 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>>()
12662 }),
12663
12664 7 => crate::wire::union_with_vector::Ref::ArrayS3A1(unsafe {
12665 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12666 }),
12667
12668 8 => crate::wire::union_with_vector::Ref::ArrayS3A2(unsafe {
12669 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12670 }),
12671
12672 9 => crate::wire::union_with_vector::Ref::VectorUnion(unsafe {
12673 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>>()
12674 }),
12675
12676 _ => unsafe { ::core::hint::unreachable_unchecked() },
12677 }
12678 }
12679
12680 pub fn into_inner(self) -> crate::wire::union_with_vector::Value<'de> {
12681 let this = ::core::mem::ManuallyDrop::new(self);
12682
12683 match this.raw.ordinal() {
12684 1 => crate::wire::union_with_vector::Value::Unused(unsafe {
12685 this.raw.get().read_unchecked::<u8>()
12686 }),
12687
12688 2 => crate::wire::union_with_vector::Value::VectorOfUint8(unsafe {
12689 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12690 }),
12691
12692 3 => crate::wire::union_with_vector::Value::S(unsafe {
12693 this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
12694 }),
12695
12696 4 => crate::wire::union_with_vector::Value::VectorS3A1(unsafe {
12697 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
12698 }),
12699
12700 5 => crate::wire::union_with_vector::Value::VectorS3A2(unsafe {
12701 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
12702 }),
12703
12704 6 => crate::wire::union_with_vector::Value::Handles(unsafe {
12705 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>>()
12706 }),
12707
12708 7 => crate::wire::union_with_vector::Value::ArrayS3A1(unsafe {
12709 this.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12710 }),
12711
12712 8 => crate::wire::union_with_vector::Value::ArrayS3A2(unsafe {
12713 this.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12714 }),
12715
12716 9 => crate::wire::union_with_vector::Value::VectorUnion(unsafe {
12717 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
12718 }),
12719
12720 _ => unsafe { ::core::hint::unreachable_unchecked() },
12721 }
12722 }
12723 }
12724
12725 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
12726 where
12727 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12728 ___D: ::fidl_next::Decoder<'de>,
12729 ___D: ::fidl_next::fuchsia::HandleDecoder,
12730 {
12731 fn decode(
12732 mut slot: ::fidl_next::Slot<'_, Self>,
12733 decoder: &mut ___D,
12734 _: (),
12735 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12736 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12737 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12738 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
12739
12740 2 => {
12741 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
12742 raw,
12743 decoder,
12744 (4294967295, ()),
12745 )?
12746 }
12747
12748 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
12749 raw, decoder, 4294967295,
12750 )?,
12751
12752 4 => ::fidl_next::wire::Union::decode_as::<
12753 ___D,
12754 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
12755 >(raw, decoder, (4294967295, ()))?,
12756
12757 5 => ::fidl_next::wire::Union::decode_as::<
12758 ___D,
12759 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
12760 >(raw, decoder, (4294967295, ()))?,
12761
12762 6 => ::fidl_next::wire::Union::decode_as::<
12763 ___D,
12764 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
12765 >(raw, decoder, (4294967295, ()))?,
12766
12767 7 => ::fidl_next::wire::Union::decode_as::<
12768 ___D,
12769 [crate::wire::StructSize3Align1; 2],
12770 >(raw, decoder, ())?,
12771
12772 8 => ::fidl_next::wire::Union::decode_as::<
12773 ___D,
12774 [crate::wire::StructSize3Align2; 2],
12775 >(raw, decoder, ())?,
12776
12777 9 => ::fidl_next::wire::Union::decode_as::<
12778 ___D,
12779 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
12780 >(raw, decoder, (4294967295, ()))?,
12781
12782 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12783 }
12784
12785 Ok(())
12786 }
12787 }
12788
12789 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
12790 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12791 match self.raw.ordinal() {
12792 1 => unsafe { self.raw.get().deref_unchecked::<u8>().fmt(f) },
12793 2 => unsafe {
12794 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
12795 },
12796 3 => unsafe {
12797 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
12798 },
12799 4 => unsafe {
12800 self.raw.get().deref_unchecked::<
12801 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>
12802 >().fmt(f)
12803 },
12804 5 => unsafe {
12805 self.raw.get().deref_unchecked::<
12806 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>
12807 >().fmt(f)
12808 },
12809 6 => unsafe {
12810 self.raw.get().deref_unchecked::<
12811 ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>
12812 >().fmt(f)
12813 },
12814 7 => unsafe {
12815 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>().fmt(f)
12816 },
12817 8 => unsafe {
12818 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>().fmt(f)
12819 },
12820 9 => unsafe {
12821 self.raw.get().deref_unchecked::<
12822 ::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>
12823 >().fmt(f)
12824 },
12825 _ => unsafe { ::core::hint::unreachable_unchecked() },
12826 }
12827 }
12828 }
12829
12830 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
12831 type Natural = crate::natural::UnionWithVector;
12832 }
12833
12834 #[derive(Debug)]
12836 #[repr(C)]
12837 pub struct Sandwich6<'de> {
12838 pub before: ::fidl_next::wire::Uint32,
12839
12840 pub the_union: crate::wire::UnionWithVector<'de>,
12841
12842 pub after: ::fidl_next::wire::Uint32,
12843 }
12844
12845 static_assertions::const_assert_eq!(std::mem::size_of::<Sandwich6<'_>>(), 32);
12846 static_assertions::const_assert_eq!(std::mem::align_of::<Sandwich6<'_>>(), 8);
12847
12848 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, before), 0);
12849
12850 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, the_union), 8);
12851
12852 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, after), 24);
12853
12854 impl ::fidl_next::Constrained for Sandwich6<'_> {
12855 type Constraint = ();
12856
12857 fn validate(
12858 _: ::fidl_next::Slot<'_, Self>,
12859 _: Self::Constraint,
12860 ) -> Result<(), ::fidl_next::ValidationError> {
12861 Ok(())
12862 }
12863 }
12864
12865 unsafe impl ::fidl_next::Wire for Sandwich6<'static> {
12866 type Narrowed<'de> = Sandwich6<'de>;
12867
12868 #[inline]
12869 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12870 ::fidl_next::munge! {
12871 let Self {
12872 before,
12873 the_union,
12874 after,
12875
12876 } = &mut *out_;
12877 }
12878
12879 ::fidl_next::Wire::zero_padding(before);
12880
12881 ::fidl_next::Wire::zero_padding(the_union);
12882
12883 ::fidl_next::Wire::zero_padding(after);
12884
12885 unsafe {
12886 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
12887 }
12888
12889 unsafe {
12890 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12891 }
12892 }
12893 }
12894
12895 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Sandwich6<'de>
12896 where
12897 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12898 ___D: ::fidl_next::Decoder<'de>,
12899 ___D: ::fidl_next::fuchsia::HandleDecoder,
12900 {
12901 fn decode(
12902 slot_: ::fidl_next::Slot<'_, Self>,
12903 decoder_: &mut ___D,
12904 _: (),
12905 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12906 if slot_.as_bytes()[28..32] != [0u8; 4] {
12907 return Err(::fidl_next::DecodeError::InvalidPadding);
12908 }
12909
12910 if slot_.as_bytes()[4..8] != [0u8; 4] {
12911 return Err(::fidl_next::DecodeError::InvalidPadding);
12912 }
12913
12914 ::fidl_next::munge! {
12915 let Self {
12916 mut before,
12917 mut the_union,
12918 mut after,
12919
12920 } = slot_;
12921 }
12922
12923 let _field = before.as_mut();
12924
12925 ::fidl_next::Decode::decode(before.as_mut(), decoder_, ())?;
12926
12927 let _field = the_union.as_mut();
12928
12929 ::fidl_next::Decode::decode(the_union.as_mut(), decoder_, ())?;
12930
12931 let _field = after.as_mut();
12932
12933 ::fidl_next::Decode::decode(after.as_mut(), decoder_, ())?;
12934
12935 Ok(())
12936 }
12937 }
12938
12939 impl<'de> ::fidl_next::IntoNatural for Sandwich6<'de> {
12940 type Natural = crate::natural::Sandwich6;
12941 }
12942
12943 #[derive(Debug)]
12945 #[repr(C)]
12946 pub struct ShortStringThenHandle<'de> {
12947 pub s: ::fidl_next::wire::String<'de>,
12948
12949 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
12950 }
12951
12952 static_assertions::const_assert_eq!(std::mem::size_of::<ShortStringThenHandle<'_>>(), 24);
12953 static_assertions::const_assert_eq!(std::mem::align_of::<ShortStringThenHandle<'_>>(), 8);
12954
12955 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, s), 0);
12956
12957 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, h), 16);
12958
12959 impl ::fidl_next::Constrained for ShortStringThenHandle<'_> {
12960 type Constraint = ();
12961
12962 fn validate(
12963 _: ::fidl_next::Slot<'_, Self>,
12964 _: Self::Constraint,
12965 ) -> Result<(), ::fidl_next::ValidationError> {
12966 Ok(())
12967 }
12968 }
12969
12970 unsafe impl ::fidl_next::Wire for ShortStringThenHandle<'static> {
12971 type Narrowed<'de> = ShortStringThenHandle<'de>;
12972
12973 #[inline]
12974 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12975 ::fidl_next::munge! {
12976 let Self {
12977 s,
12978 h,
12979
12980 } = &mut *out_;
12981 }
12982
12983 ::fidl_next::Wire::zero_padding(s);
12984
12985 ::fidl_next::Wire::zero_padding(h);
12986
12987 unsafe {
12988 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
12989 }
12990 }
12991 }
12992
12993 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ShortStringThenHandle<'de>
12994 where
12995 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12996 ___D: ::fidl_next::Decoder<'de>,
12997 ___D: ::fidl_next::fuchsia::HandleDecoder,
12998 {
12999 fn decode(
13000 slot_: ::fidl_next::Slot<'_, Self>,
13001 decoder_: &mut ___D,
13002 _: (),
13003 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13004 if slot_.as_bytes()[20..24] != [0u8; 4] {
13005 return Err(::fidl_next::DecodeError::InvalidPadding);
13006 }
13007
13008 ::fidl_next::munge! {
13009 let Self {
13010 mut s,
13011 mut h,
13012
13013 } = slot_;
13014 }
13015
13016 let _field = s.as_mut();
13017 ::fidl_next::Constrained::validate(_field, 1)?;
13018 ::fidl_next::Decode::decode(s.as_mut(), decoder_, 1)?;
13019
13020 let s = unsafe { s.deref_unchecked() };
13021
13022 if s.len() > 1 {
13023 return Err(::fidl_next::DecodeError::VectorTooLong {
13024 size: s.len() as u64,
13025 limit: 1,
13026 });
13027 }
13028
13029 let _field = h.as_mut();
13030
13031 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13032
13033 Ok(())
13034 }
13035 }
13036
13037 impl<'de> ::fidl_next::IntoNatural for ShortStringThenHandle<'de> {
13038 type Natural = crate::natural::ShortStringThenHandle;
13039 }
13040
13041 #[repr(C)]
13043 pub struct SimpleResourceTable<'de> {
13044 pub(crate) table: ::fidl_next::wire::Table<'de>,
13045 }
13046
13047 impl<'de> Drop for SimpleResourceTable<'de> {
13048 fn drop(&mut self) {
13049 let _ = self
13050 .table
13051 .get(1)
13052 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
13053
13054 let _ = self
13055 .table
13056 .get(5)
13057 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
13058 }
13059 }
13060
13061 impl ::fidl_next::Constrained for SimpleResourceTable<'_> {
13062 type Constraint = ();
13063
13064 fn validate(
13065 _: ::fidl_next::Slot<'_, Self>,
13066 _: Self::Constraint,
13067 ) -> Result<(), ::fidl_next::ValidationError> {
13068 Ok(())
13069 }
13070 }
13071
13072 unsafe impl ::fidl_next::Wire for SimpleResourceTable<'static> {
13073 type Narrowed<'de> = SimpleResourceTable<'de>;
13074
13075 #[inline]
13076 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13077 ::fidl_next::munge!(let Self { table } = out);
13078 ::fidl_next::wire::Table::zero_padding(table);
13079 }
13080 }
13081
13082 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SimpleResourceTable<'de>
13083 where
13084 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13085 ___D: ::fidl_next::fuchsia::HandleDecoder,
13086 {
13087 fn decode(
13088 slot: ::fidl_next::Slot<'_, Self>,
13089 decoder: &mut ___D,
13090 _: (),
13091 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13092 ::fidl_next::munge!(let Self { table } = slot);
13093
13094 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13095 match ordinal {
13096 0 => unsafe { ::core::hint::unreachable_unchecked() },
13097
13098 1 => {
13099 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
13100 slot.as_mut(),
13101 decoder,
13102 (),
13103 )?;
13104
13105 Ok(())
13106 }
13107
13108 5 => {
13109 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
13110 slot.as_mut(),
13111 decoder,
13112 (),
13113 )?;
13114
13115 Ok(())
13116 }
13117
13118 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13119 }
13120 })
13121 }
13122 }
13123
13124 impl<'de> SimpleResourceTable<'de> {
13125 pub fn x(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
13126 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13127 }
13128
13129 pub fn take_x(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
13130 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13131 }
13132
13133 pub fn y(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
13134 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13135 }
13136
13137 pub fn take_y(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
13138 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13139 }
13140 }
13141
13142 impl<'de> ::core::fmt::Debug for SimpleResourceTable<'de> {
13143 fn fmt(
13144 &self,
13145 f: &mut ::core::fmt::Formatter<'_>,
13146 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13147 f.debug_struct("SimpleResourceTable")
13148 .field("x", &self.x())
13149 .field("y", &self.y())
13150 .finish()
13151 }
13152 }
13153
13154 impl<'de> ::fidl_next::IntoNatural for SimpleResourceTable<'de> {
13155 type Natural = crate::natural::SimpleResourceTable;
13156 }
13157
13158 #[derive(Debug)]
13160 #[repr(C)]
13161 pub struct SingleHandle {
13162 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
13163 }
13164
13165 static_assertions::const_assert_eq!(std::mem::size_of::<SingleHandle>(), 4);
13166 static_assertions::const_assert_eq!(std::mem::align_of::<SingleHandle>(), 4);
13167
13168 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleHandle, h), 0);
13169
13170 impl ::fidl_next::Constrained for SingleHandle {
13171 type Constraint = ();
13172
13173 fn validate(
13174 _: ::fidl_next::Slot<'_, Self>,
13175 _: Self::Constraint,
13176 ) -> Result<(), ::fidl_next::ValidationError> {
13177 Ok(())
13178 }
13179 }
13180
13181 unsafe impl ::fidl_next::Wire for SingleHandle {
13182 type Narrowed<'de> = SingleHandle;
13183
13184 #[inline]
13185 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13186 ::fidl_next::munge! {
13187 let Self {
13188 h,
13189
13190 } = &mut *out_;
13191 }
13192
13193 ::fidl_next::Wire::zero_padding(h);
13194 }
13195 }
13196
13197 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleHandle
13198 where
13199 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13200 ___D: ::fidl_next::fuchsia::HandleDecoder,
13201 {
13202 fn decode(
13203 slot_: ::fidl_next::Slot<'_, Self>,
13204 decoder_: &mut ___D,
13205 _: (),
13206 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13207 ::fidl_next::munge! {
13208 let Self {
13209 mut h,
13210
13211 } = slot_;
13212 }
13213
13214 let _field = h.as_mut();
13215
13216 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13217
13218 Ok(())
13219 }
13220 }
13221
13222 impl ::fidl_next::IntoNatural for SingleHandle {
13223 type Natural = crate::natural::SingleHandle;
13224 }
13225
13226 #[derive(Debug)]
13228 #[repr(C)]
13229 pub struct SingleOptionalHandle {
13230 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
13231 }
13232
13233 static_assertions::const_assert_eq!(std::mem::size_of::<SingleOptionalHandle>(), 4);
13234 static_assertions::const_assert_eq!(std::mem::align_of::<SingleOptionalHandle>(), 4);
13235
13236 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleOptionalHandle, h), 0);
13237
13238 impl ::fidl_next::Constrained for SingleOptionalHandle {
13239 type Constraint = ();
13240
13241 fn validate(
13242 _: ::fidl_next::Slot<'_, Self>,
13243 _: Self::Constraint,
13244 ) -> Result<(), ::fidl_next::ValidationError> {
13245 Ok(())
13246 }
13247 }
13248
13249 unsafe impl ::fidl_next::Wire for SingleOptionalHandle {
13250 type Narrowed<'de> = SingleOptionalHandle;
13251
13252 #[inline]
13253 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13254 ::fidl_next::munge! {
13255 let Self {
13256 h,
13257
13258 } = &mut *out_;
13259 }
13260
13261 ::fidl_next::Wire::zero_padding(h);
13262 }
13263 }
13264
13265 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleOptionalHandle
13266 where
13267 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13268 ___D: ::fidl_next::fuchsia::HandleDecoder,
13269 {
13270 fn decode(
13271 slot_: ::fidl_next::Slot<'_, Self>,
13272 decoder_: &mut ___D,
13273 _: (),
13274 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13275 ::fidl_next::munge! {
13276 let Self {
13277 mut h,
13278
13279 } = slot_;
13280 }
13281
13282 let _field = h.as_mut();
13283
13284 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13285
13286 Ok(())
13287 }
13288 }
13289
13290 impl ::fidl_next::IntoNatural for SingleOptionalHandle {
13291 type Natural = crate::natural::SingleOptionalHandle;
13292 }
13293
13294 #[derive(Debug)]
13296 #[repr(C)]
13297 pub struct StructOfEndpoints {
13298 pub client_end:
13299 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13300
13301 pub optional_client_end:
13302 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13303
13304 pub server_end:
13305 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13306
13307 pub optional_server_end:
13308 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13309 }
13310
13311 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfEndpoints>(), 16);
13312 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfEndpoints>(), 4);
13313
13314 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, client_end), 0);
13315
13316 static_assertions::const_assert_eq!(
13317 std::mem::offset_of!(StructOfEndpoints, optional_client_end),
13318 4
13319 );
13320
13321 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, server_end), 8);
13322
13323 static_assertions::const_assert_eq!(
13324 std::mem::offset_of!(StructOfEndpoints, optional_server_end),
13325 12
13326 );
13327
13328 impl ::fidl_next::Constrained for StructOfEndpoints {
13329 type Constraint = ();
13330
13331 fn validate(
13332 _: ::fidl_next::Slot<'_, Self>,
13333 _: Self::Constraint,
13334 ) -> Result<(), ::fidl_next::ValidationError> {
13335 Ok(())
13336 }
13337 }
13338
13339 unsafe impl ::fidl_next::Wire for StructOfEndpoints {
13340 type Narrowed<'de> = StructOfEndpoints;
13341
13342 #[inline]
13343 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13344 ::fidl_next::munge! {
13345 let Self {
13346 client_end,
13347 optional_client_end,
13348 server_end,
13349 optional_server_end,
13350
13351 } = &mut *out_;
13352 }
13353
13354 ::fidl_next::Wire::zero_padding(client_end);
13355
13356 ::fidl_next::Wire::zero_padding(optional_client_end);
13357
13358 ::fidl_next::Wire::zero_padding(server_end);
13359
13360 ::fidl_next::Wire::zero_padding(optional_server_end);
13361 }
13362 }
13363
13364 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfEndpoints
13365 where
13366 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13367 ___D: ::fidl_next::fuchsia::HandleDecoder,
13368 {
13369 fn decode(
13370 slot_: ::fidl_next::Slot<'_, Self>,
13371 decoder_: &mut ___D,
13372 _: (),
13373 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13374 ::fidl_next::munge! {
13375 let Self {
13376 mut client_end,
13377 mut optional_client_end,
13378 mut server_end,
13379 mut optional_server_end,
13380
13381 } = slot_;
13382 }
13383
13384 let _field = client_end.as_mut();
13385
13386 ::fidl_next::Decode::decode(client_end.as_mut(), decoder_, ())?;
13387
13388 let _field = optional_client_end.as_mut();
13389
13390 ::fidl_next::Decode::decode(optional_client_end.as_mut(), decoder_, ())?;
13391
13392 let _field = server_end.as_mut();
13393
13394 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
13395
13396 let _field = optional_server_end.as_mut();
13397
13398 ::fidl_next::Decode::decode(optional_server_end.as_mut(), decoder_, ())?;
13399
13400 Ok(())
13401 }
13402 }
13403
13404 impl ::fidl_next::IntoNatural for StructOfEndpoints {
13405 type Natural = crate::natural::StructOfEndpoints;
13406 }
13407
13408 #[derive(Debug)]
13410 #[repr(C)]
13411 pub struct StructOfOptionalUnionOfHandle {
13412 pub u: crate::wire_optional::UnionOfHandle,
13413 }
13414
13415 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfOptionalUnionOfHandle>(), 16);
13416 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfOptionalUnionOfHandle>(), 8);
13417
13418 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfOptionalUnionOfHandle, u), 0);
13419
13420 impl ::fidl_next::Constrained for StructOfOptionalUnionOfHandle {
13421 type Constraint = ();
13422
13423 fn validate(
13424 _: ::fidl_next::Slot<'_, Self>,
13425 _: Self::Constraint,
13426 ) -> Result<(), ::fidl_next::ValidationError> {
13427 Ok(())
13428 }
13429 }
13430
13431 unsafe impl ::fidl_next::Wire for StructOfOptionalUnionOfHandle {
13432 type Narrowed<'de> = StructOfOptionalUnionOfHandle;
13433
13434 #[inline]
13435 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13436 ::fidl_next::munge! {
13437 let Self {
13438 u,
13439
13440 } = &mut *out_;
13441 }
13442
13443 ::fidl_next::Wire::zero_padding(u);
13444 }
13445 }
13446
13447 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfOptionalUnionOfHandle
13448 where
13449 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13450 ___D: ::fidl_next::fuchsia::HandleDecoder,
13451 {
13452 fn decode(
13453 slot_: ::fidl_next::Slot<'_, Self>,
13454 decoder_: &mut ___D,
13455 _: (),
13456 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13457 ::fidl_next::munge! {
13458 let Self {
13459 mut u,
13460
13461 } = slot_;
13462 }
13463
13464 let _field = u.as_mut();
13465
13466 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
13467
13468 Ok(())
13469 }
13470 }
13471
13472 impl ::fidl_next::IntoNatural for StructOfOptionalUnionOfHandle {
13473 type Natural = crate::natural::StructOfOptionalUnionOfHandle;
13474 }
13475
13476 #[derive(Debug)]
13478 #[repr(C)]
13479 pub struct StructOfSimpleResourceTable<'de> {
13480 pub table: crate::wire::SimpleResourceTable<'de>,
13481 }
13482
13483 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfSimpleResourceTable<'_>>(), 16);
13484 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfSimpleResourceTable<'_>>(), 8);
13485
13486 static_assertions::const_assert_eq!(
13487 std::mem::offset_of!(StructOfSimpleResourceTable<'_>, table),
13488 0
13489 );
13490
13491 impl ::fidl_next::Constrained for StructOfSimpleResourceTable<'_> {
13492 type Constraint = ();
13493
13494 fn validate(
13495 _: ::fidl_next::Slot<'_, Self>,
13496 _: Self::Constraint,
13497 ) -> Result<(), ::fidl_next::ValidationError> {
13498 Ok(())
13499 }
13500 }
13501
13502 unsafe impl ::fidl_next::Wire for StructOfSimpleResourceTable<'static> {
13503 type Narrowed<'de> = StructOfSimpleResourceTable<'de>;
13504
13505 #[inline]
13506 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13507 ::fidl_next::munge! {
13508 let Self {
13509 table,
13510
13511 } = &mut *out_;
13512 }
13513
13514 ::fidl_next::Wire::zero_padding(table);
13515 }
13516 }
13517
13518 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StructOfSimpleResourceTable<'de>
13519 where
13520 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13521 ___D: ::fidl_next::Decoder<'de>,
13522 ___D: ::fidl_next::fuchsia::HandleDecoder,
13523 {
13524 fn decode(
13525 slot_: ::fidl_next::Slot<'_, Self>,
13526 decoder_: &mut ___D,
13527 _: (),
13528 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13529 ::fidl_next::munge! {
13530 let Self {
13531 mut table,
13532
13533 } = slot_;
13534 }
13535
13536 let _field = table.as_mut();
13537
13538 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
13539
13540 Ok(())
13541 }
13542 }
13543
13544 impl<'de> ::fidl_next::IntoNatural for StructOfSimpleResourceTable<'de> {
13545 type Natural = crate::natural::StructOfSimpleResourceTable;
13546 }
13547
13548 #[repr(C)]
13550 pub struct TableFieldInlinedHandle<'de> {
13551 pub(crate) table: ::fidl_next::wire::Table<'de>,
13552 }
13553
13554 impl<'de> Drop for TableFieldInlinedHandle<'de> {
13555 fn drop(&mut self) {
13556 let _ = self.table.get(1).map(|envelope| unsafe {
13557 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
13558 });
13559 }
13560 }
13561
13562 impl ::fidl_next::Constrained for TableFieldInlinedHandle<'_> {
13563 type Constraint = ();
13564
13565 fn validate(
13566 _: ::fidl_next::Slot<'_, Self>,
13567 _: Self::Constraint,
13568 ) -> Result<(), ::fidl_next::ValidationError> {
13569 Ok(())
13570 }
13571 }
13572
13573 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandle<'static> {
13574 type Narrowed<'de> = TableFieldInlinedHandle<'de>;
13575
13576 #[inline]
13577 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13578 ::fidl_next::munge!(let Self { table } = out);
13579 ::fidl_next::wire::Table::zero_padding(table);
13580 }
13581 }
13582
13583 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandle<'de>
13584 where
13585 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13586 ___D: ::fidl_next::fuchsia::HandleDecoder,
13587 {
13588 fn decode(
13589 slot: ::fidl_next::Slot<'_, Self>,
13590 decoder: &mut ___D,
13591 _: (),
13592 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13593 ::fidl_next::munge!(let Self { table } = slot);
13594
13595 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13596 match ordinal {
13597 0 => unsafe { ::core::hint::unreachable_unchecked() },
13598
13599 1 => {
13600 ::fidl_next::wire::Envelope::decode_as::<
13601 ___D,
13602 ::fidl_next::wire::fuchsia::Channel,
13603 >(slot.as_mut(), decoder, ())?;
13604
13605 Ok(())
13606 }
13607
13608 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13609 }
13610 })
13611 }
13612 }
13613
13614 impl<'de> TableFieldInlinedHandle<'de> {
13615 pub fn f(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
13616 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13617 }
13618
13619 pub fn take_f(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Channel> {
13620 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13621 }
13622 }
13623
13624 impl<'de> ::core::fmt::Debug for TableFieldInlinedHandle<'de> {
13625 fn fmt(
13626 &self,
13627 f: &mut ::core::fmt::Formatter<'_>,
13628 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13629 f.debug_struct("TableFieldInlinedHandle").field("f", &self.f()).finish()
13630 }
13631 }
13632
13633 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandle<'de> {
13634 type Natural = crate::natural::TableFieldInlinedHandle;
13635 }
13636
13637 #[derive(Debug)]
13639 #[repr(C)]
13640 pub struct TableFieldInlinedHandleStruct<'de> {
13641 pub t: crate::wire::TableFieldInlinedHandle<'de>,
13642 }
13643
13644 static_assertions::const_assert_eq!(
13645 std::mem::size_of::<TableFieldInlinedHandleStruct<'_>>(),
13646 16
13647 );
13648 static_assertions::const_assert_eq!(
13649 std::mem::align_of::<TableFieldInlinedHandleStruct<'_>>(),
13650 8
13651 );
13652
13653 static_assertions::const_assert_eq!(
13654 std::mem::offset_of!(TableFieldInlinedHandleStruct<'_>, t),
13655 0
13656 );
13657
13658 impl ::fidl_next::Constrained for TableFieldInlinedHandleStruct<'_> {
13659 type Constraint = ();
13660
13661 fn validate(
13662 _: ::fidl_next::Slot<'_, Self>,
13663 _: Self::Constraint,
13664 ) -> Result<(), ::fidl_next::ValidationError> {
13665 Ok(())
13666 }
13667 }
13668
13669 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandleStruct<'static> {
13670 type Narrowed<'de> = TableFieldInlinedHandleStruct<'de>;
13671
13672 #[inline]
13673 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13674 ::fidl_next::munge! {
13675 let Self {
13676 t,
13677
13678 } = &mut *out_;
13679 }
13680
13681 ::fidl_next::Wire::zero_padding(t);
13682 }
13683 }
13684
13685 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandleStruct<'de>
13686 where
13687 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13688 ___D: ::fidl_next::Decoder<'de>,
13689 ___D: ::fidl_next::fuchsia::HandleDecoder,
13690 {
13691 fn decode(
13692 slot_: ::fidl_next::Slot<'_, Self>,
13693 decoder_: &mut ___D,
13694 _: (),
13695 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13696 ::fidl_next::munge! {
13697 let Self {
13698 mut t,
13699
13700 } = slot_;
13701 }
13702
13703 let _field = t.as_mut();
13704
13705 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
13706
13707 Ok(())
13708 }
13709 }
13710
13711 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandleStruct<'de> {
13712 type Natural = crate::natural::TableFieldInlinedHandleStruct;
13713 }
13714
13715 #[repr(C)]
13717 pub struct TableFieldUnknownResource<'de> {
13718 pub(crate) table: ::fidl_next::wire::Table<'de>,
13719 }
13720
13721 impl<'de> Drop for TableFieldUnknownResource<'de> {
13722 fn drop(&mut self) {}
13723 }
13724
13725 impl ::fidl_next::Constrained for TableFieldUnknownResource<'_> {
13726 type Constraint = ();
13727
13728 fn validate(
13729 _: ::fidl_next::Slot<'_, Self>,
13730 _: Self::Constraint,
13731 ) -> Result<(), ::fidl_next::ValidationError> {
13732 Ok(())
13733 }
13734 }
13735
13736 unsafe impl ::fidl_next::Wire for TableFieldUnknownResource<'static> {
13737 type Narrowed<'de> = TableFieldUnknownResource<'de>;
13738
13739 #[inline]
13740 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13741 ::fidl_next::munge!(let Self { table } = out);
13742 ::fidl_next::wire::Table::zero_padding(table);
13743 }
13744 }
13745
13746 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResource<'de>
13747 where
13748 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13749 ___D: ::fidl_next::fuchsia::HandleDecoder,
13750 {
13751 fn decode(
13752 slot: ::fidl_next::Slot<'_, Self>,
13753 decoder: &mut ___D,
13754 _: (),
13755 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13756 ::fidl_next::munge!(let Self { table } = slot);
13757
13758 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13759 match ordinal {
13760 0 => unsafe { ::core::hint::unreachable_unchecked() },
13761
13762 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13763 }
13764 })
13765 }
13766 }
13767
13768 impl<'de> TableFieldUnknownResource<'de> {}
13769
13770 impl<'de> ::core::fmt::Debug for TableFieldUnknownResource<'de> {
13771 fn fmt(
13772 &self,
13773 f: &mut ::core::fmt::Formatter<'_>,
13774 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13775 f.debug_struct("TableFieldUnknownResource").finish()
13776 }
13777 }
13778
13779 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResource<'de> {
13780 type Natural = crate::natural::TableFieldUnknownResource;
13781 }
13782
13783 #[derive(Debug)]
13785 #[repr(C)]
13786 pub struct TableFieldUnknownResourceStruct<'de> {
13787 pub t: crate::wire::TableFieldUnknownResource<'de>,
13788 }
13789
13790 static_assertions::const_assert_eq!(
13791 std::mem::size_of::<TableFieldUnknownResourceStruct<'_>>(),
13792 16
13793 );
13794 static_assertions::const_assert_eq!(
13795 std::mem::align_of::<TableFieldUnknownResourceStruct<'_>>(),
13796 8
13797 );
13798
13799 static_assertions::const_assert_eq!(
13800 std::mem::offset_of!(TableFieldUnknownResourceStruct<'_>, t),
13801 0
13802 );
13803
13804 impl ::fidl_next::Constrained for TableFieldUnknownResourceStruct<'_> {
13805 type Constraint = ();
13806
13807 fn validate(
13808 _: ::fidl_next::Slot<'_, Self>,
13809 _: Self::Constraint,
13810 ) -> Result<(), ::fidl_next::ValidationError> {
13811 Ok(())
13812 }
13813 }
13814
13815 unsafe impl ::fidl_next::Wire for TableFieldUnknownResourceStruct<'static> {
13816 type Narrowed<'de> = TableFieldUnknownResourceStruct<'de>;
13817
13818 #[inline]
13819 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13820 ::fidl_next::munge! {
13821 let Self {
13822 t,
13823
13824 } = &mut *out_;
13825 }
13826
13827 ::fidl_next::Wire::zero_padding(t);
13828 }
13829 }
13830
13831 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResourceStruct<'de>
13832 where
13833 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13834 ___D: ::fidl_next::Decoder<'de>,
13835 ___D: ::fidl_next::fuchsia::HandleDecoder,
13836 {
13837 fn decode(
13838 slot_: ::fidl_next::Slot<'_, Self>,
13839 decoder_: &mut ___D,
13840 _: (),
13841 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13842 ::fidl_next::munge! {
13843 let Self {
13844 mut t,
13845
13846 } = slot_;
13847 }
13848
13849 let _field = t.as_mut();
13850
13851 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
13852
13853 Ok(())
13854 }
13855 }
13856
13857 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResourceStruct<'de> {
13858 type Natural = crate::natural::TableFieldUnknownResourceStruct;
13859 }
13860
13861 #[repr(C)]
13863 pub struct TableOfEndpointsTable<'de> {
13864 pub(crate) table: ::fidl_next::wire::Table<'de>,
13865 }
13866
13867 impl<'de> Drop for TableOfEndpointsTable<'de> {
13868 fn drop(&mut self) {
13869 let _ = self.table.get(1)
13870 .map(|envelope| unsafe {
13871 envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
13872 });
13873
13874 let _ = self.table.get(2)
13875 .map(|envelope| unsafe {
13876 envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
13877 });
13878 }
13879 }
13880
13881 impl ::fidl_next::Constrained for TableOfEndpointsTable<'_> {
13882 type Constraint = ();
13883
13884 fn validate(
13885 _: ::fidl_next::Slot<'_, Self>,
13886 _: Self::Constraint,
13887 ) -> Result<(), ::fidl_next::ValidationError> {
13888 Ok(())
13889 }
13890 }
13891
13892 unsafe impl ::fidl_next::Wire for TableOfEndpointsTable<'static> {
13893 type Narrowed<'de> = TableOfEndpointsTable<'de>;
13894
13895 #[inline]
13896 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13897 ::fidl_next::munge!(let Self { table } = out);
13898 ::fidl_next::wire::Table::zero_padding(table);
13899 }
13900 }
13901
13902 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpointsTable<'de>
13903 where
13904 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13905 ___D: ::fidl_next::fuchsia::HandleDecoder,
13906 {
13907 fn decode(
13908 slot: ::fidl_next::Slot<'_, Self>,
13909 decoder: &mut ___D,
13910 _: (),
13911 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13912 ::fidl_next::munge!(let Self { table } = slot);
13913
13914 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13915 match ordinal {
13916 0 => unsafe { ::core::hint::unreachable_unchecked() },
13917
13918 1 => {
13919 ::fidl_next::wire::Envelope::decode_as::<
13920 ___D,
13921 ::fidl_next::ClientEnd<
13922 crate::Protocol,
13923 ::fidl_next::wire::fuchsia::Channel,
13924 >,
13925 >(slot.as_mut(), decoder, ())?;
13926
13927 Ok(())
13928 }
13929
13930 2 => {
13931 ::fidl_next::wire::Envelope::decode_as::<
13932 ___D,
13933 ::fidl_next::ServerEnd<
13934 crate::Protocol,
13935 ::fidl_next::wire::fuchsia::Channel,
13936 >,
13937 >(slot.as_mut(), decoder, ())?;
13938
13939 Ok(())
13940 }
13941
13942 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13943 }
13944 })
13945 }
13946 }
13947
13948 impl<'de> TableOfEndpointsTable<'de> {
13949 pub fn client_end(
13950 &self,
13951 ) -> ::core::option::Option<
13952 &::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13953 > {
13954 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13955 }
13956
13957 pub fn take_client_end(
13958 &mut self,
13959 ) -> ::core::option::Option<
13960 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13961 > {
13962 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13963 }
13964
13965 pub fn server_end(
13966 &self,
13967 ) -> ::core::option::Option<
13968 &::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13969 > {
13970 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13971 }
13972
13973 pub fn take_server_end(
13974 &mut self,
13975 ) -> ::core::option::Option<
13976 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13977 > {
13978 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13979 }
13980 }
13981
13982 impl<'de> ::core::fmt::Debug for TableOfEndpointsTable<'de> {
13983 fn fmt(
13984 &self,
13985 f: &mut ::core::fmt::Formatter<'_>,
13986 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13987 f.debug_struct("TableOfEndpointsTable")
13988 .field("client_end", &self.client_end())
13989 .field("server_end", &self.server_end())
13990 .finish()
13991 }
13992 }
13993
13994 impl<'de> ::fidl_next::IntoNatural for TableOfEndpointsTable<'de> {
13995 type Natural = crate::natural::TableOfEndpointsTable;
13996 }
13997
13998 #[derive(Debug)]
14000 #[repr(C)]
14001 pub struct TableOfEndpoints<'de> {
14002 pub t: crate::wire::TableOfEndpointsTable<'de>,
14003 }
14004
14005 static_assertions::const_assert_eq!(std::mem::size_of::<TableOfEndpoints<'_>>(), 16);
14006 static_assertions::const_assert_eq!(std::mem::align_of::<TableOfEndpoints<'_>>(), 8);
14007
14008 static_assertions::const_assert_eq!(std::mem::offset_of!(TableOfEndpoints<'_>, t), 0);
14009
14010 impl ::fidl_next::Constrained for TableOfEndpoints<'_> {
14011 type Constraint = ();
14012
14013 fn validate(
14014 _: ::fidl_next::Slot<'_, Self>,
14015 _: Self::Constraint,
14016 ) -> Result<(), ::fidl_next::ValidationError> {
14017 Ok(())
14018 }
14019 }
14020
14021 unsafe impl ::fidl_next::Wire for TableOfEndpoints<'static> {
14022 type Narrowed<'de> = TableOfEndpoints<'de>;
14023
14024 #[inline]
14025 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14026 ::fidl_next::munge! {
14027 let Self {
14028 t,
14029
14030 } = &mut *out_;
14031 }
14032
14033 ::fidl_next::Wire::zero_padding(t);
14034 }
14035 }
14036
14037 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpoints<'de>
14038 where
14039 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14040 ___D: ::fidl_next::Decoder<'de>,
14041 ___D: ::fidl_next::fuchsia::HandleDecoder,
14042 {
14043 fn decode(
14044 slot_: ::fidl_next::Slot<'_, Self>,
14045 decoder_: &mut ___D,
14046 _: (),
14047 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14048 ::fidl_next::munge! {
14049 let Self {
14050 mut t,
14051
14052 } = slot_;
14053 }
14054
14055 let _field = t.as_mut();
14056
14057 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14058
14059 Ok(())
14060 }
14061 }
14062
14063 impl<'de> ::fidl_next::IntoNatural for TableOfEndpoints<'de> {
14064 type Natural = crate::natural::TableOfEndpoints;
14065 }
14066
14067 #[repr(C)]
14069 pub struct TableUnionWithVectorReservedSandwich<'de> {
14070 pub(crate) table: ::fidl_next::wire::Table<'de>,
14071 }
14072
14073 impl<'de> Drop for TableUnionWithVectorReservedSandwich<'de> {
14074 fn drop(&mut self) {
14075 let _ = self.table.get(2).map(|envelope| unsafe {
14076 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
14077 });
14078 }
14079 }
14080
14081 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwich<'_> {
14082 type Constraint = ();
14083
14084 fn validate(
14085 _: ::fidl_next::Slot<'_, Self>,
14086 _: Self::Constraint,
14087 ) -> Result<(), ::fidl_next::ValidationError> {
14088 Ok(())
14089 }
14090 }
14091
14092 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwich<'static> {
14093 type Narrowed<'de> = TableUnionWithVectorReservedSandwich<'de>;
14094
14095 #[inline]
14096 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14097 ::fidl_next::munge!(let Self { table } = out);
14098 ::fidl_next::wire::Table::zero_padding(table);
14099 }
14100 }
14101
14102 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwich<'de>
14103 where
14104 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14105 ___D: ::fidl_next::fuchsia::HandleDecoder,
14106 {
14107 fn decode(
14108 slot: ::fidl_next::Slot<'_, Self>,
14109 decoder: &mut ___D,
14110 _: (),
14111 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14112 ::fidl_next::munge!(let Self { table } = slot);
14113
14114 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14115 match ordinal {
14116 0 => unsafe { ::core::hint::unreachable_unchecked() },
14117
14118 2 => {
14119 ::fidl_next::wire::Envelope::decode_as::<
14120 ___D,
14121 crate::wire::UnionWithVector<'de>,
14122 >(slot.as_mut(), decoder, ())?;
14123
14124 Ok(())
14125 }
14126
14127 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14128 }
14129 })
14130 }
14131 }
14132
14133 impl<'de> TableUnionWithVectorReservedSandwich<'de> {
14134 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
14135 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14136 }
14137
14138 pub fn take_uv(&mut self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
14139 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14140 }
14141 }
14142
14143 impl<'de> ::core::fmt::Debug for TableUnionWithVectorReservedSandwich<'de> {
14144 fn fmt(
14145 &self,
14146 f: &mut ::core::fmt::Formatter<'_>,
14147 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14148 f.debug_struct("TableUnionWithVectorReservedSandwich").field("uv", &self.uv()).finish()
14149 }
14150 }
14151
14152 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwich<'de> {
14153 type Natural = crate::natural::TableUnionWithVectorReservedSandwich;
14154 }
14155
14156 #[derive(Debug)]
14158 #[repr(C)]
14159 pub struct TableUnionWithVectorReservedSandwichStruct<'de> {
14160 pub table: crate::wire::TableUnionWithVectorReservedSandwich<'de>,
14161 }
14162
14163 static_assertions::const_assert_eq!(
14164 std::mem::size_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
14165 16
14166 );
14167 static_assertions::const_assert_eq!(
14168 std::mem::align_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
14169 8
14170 );
14171
14172 static_assertions::const_assert_eq!(
14173 std::mem::offset_of!(TableUnionWithVectorReservedSandwichStruct<'_>, table),
14174 0
14175 );
14176
14177 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwichStruct<'_> {
14178 type Constraint = ();
14179
14180 fn validate(
14181 _: ::fidl_next::Slot<'_, Self>,
14182 _: Self::Constraint,
14183 ) -> Result<(), ::fidl_next::ValidationError> {
14184 Ok(())
14185 }
14186 }
14187
14188 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwichStruct<'static> {
14189 type Narrowed<'de> = TableUnionWithVectorReservedSandwichStruct<'de>;
14190
14191 #[inline]
14192 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14193 ::fidl_next::munge! {
14194 let Self {
14195 table,
14196
14197 } = &mut *out_;
14198 }
14199
14200 ::fidl_next::Wire::zero_padding(table);
14201 }
14202 }
14203
14204 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwichStruct<'de>
14205 where
14206 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14207 ___D: ::fidl_next::Decoder<'de>,
14208 ___D: ::fidl_next::fuchsia::HandleDecoder,
14209 {
14210 fn decode(
14211 slot_: ::fidl_next::Slot<'_, Self>,
14212 decoder_: &mut ___D,
14213 _: (),
14214 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14215 ::fidl_next::munge! {
14216 let Self {
14217 mut table,
14218
14219 } = slot_;
14220 }
14221
14222 let _field = table.as_mut();
14223
14224 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14225
14226 Ok(())
14227 }
14228 }
14229
14230 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwichStruct<'de> {
14231 type Natural = crate::natural::TableUnionWithVectorReservedSandwichStruct;
14232 }
14233
14234 #[repr(C)]
14236 pub struct TableUnionWithVectorStructSandwich<'de> {
14237 pub(crate) table: ::fidl_next::wire::Table<'de>,
14238 }
14239
14240 impl<'de> Drop for TableUnionWithVectorStructSandwich<'de> {
14241 fn drop(&mut self) {
14242 let _ = self.table.get(1).map(|envelope| unsafe {
14243 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14244 });
14245
14246 let _ = self.table.get(2).map(|envelope| unsafe {
14247 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
14248 });
14249
14250 let _ = self.table.get(3).map(|envelope| unsafe {
14251 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14252 });
14253 }
14254 }
14255
14256 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwich<'_> {
14257 type Constraint = ();
14258
14259 fn validate(
14260 _: ::fidl_next::Slot<'_, Self>,
14261 _: Self::Constraint,
14262 ) -> Result<(), ::fidl_next::ValidationError> {
14263 Ok(())
14264 }
14265 }
14266
14267 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwich<'static> {
14268 type Narrowed<'de> = TableUnionWithVectorStructSandwich<'de>;
14269
14270 #[inline]
14271 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14272 ::fidl_next::munge!(let Self { table } = out);
14273 ::fidl_next::wire::Table::zero_padding(table);
14274 }
14275 }
14276
14277 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwich<'de>
14278 where
14279 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14280 ___D: ::fidl_next::fuchsia::HandleDecoder,
14281 {
14282 fn decode(
14283 slot: ::fidl_next::Slot<'_, Self>,
14284 decoder: &mut ___D,
14285 _: (),
14286 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14287 ::fidl_next::munge!(let Self { table } = slot);
14288
14289 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14290 match ordinal {
14291 0 => unsafe { ::core::hint::unreachable_unchecked() },
14292
14293 1 => {
14294 ::fidl_next::wire::Envelope::decode_as::<
14295 ___D,
14296 crate::wire::StructSize3Align1,
14297 >(slot.as_mut(), decoder, ())?;
14298
14299 Ok(())
14300 }
14301
14302 2 => {
14303 ::fidl_next::wire::Envelope::decode_as::<
14304 ___D,
14305 crate::wire::UnionWithVector<'de>,
14306 >(slot.as_mut(), decoder, ())?;
14307
14308 Ok(())
14309 }
14310
14311 3 => {
14312 ::fidl_next::wire::Envelope::decode_as::<
14313 ___D,
14314 crate::wire::StructSize3Align1,
14315 >(slot.as_mut(), decoder, ())?;
14316
14317 Ok(())
14318 }
14319
14320 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14321 }
14322 })
14323 }
14324 }
14325
14326 impl<'de> TableUnionWithVectorStructSandwich<'de> {
14327 pub fn s1(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14328 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14329 }
14330
14331 pub fn take_s1(&mut self) -> ::core::option::Option<crate::wire::StructSize3Align1> {
14332 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14333 }
14334
14335 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
14336 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14337 }
14338
14339 pub fn take_uv(&mut self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
14340 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14341 }
14342
14343 pub fn s2(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14344 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
14345 }
14346
14347 pub fn take_s2(&mut self) -> ::core::option::Option<crate::wire::StructSize3Align1> {
14348 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
14349 }
14350 }
14351
14352 impl<'de> ::core::fmt::Debug for TableUnionWithVectorStructSandwich<'de> {
14353 fn fmt(
14354 &self,
14355 f: &mut ::core::fmt::Formatter<'_>,
14356 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14357 f.debug_struct("TableUnionWithVectorStructSandwich")
14358 .field("s1", &self.s1())
14359 .field("uv", &self.uv())
14360 .field("s2", &self.s2())
14361 .finish()
14362 }
14363 }
14364
14365 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwich<'de> {
14366 type Natural = crate::natural::TableUnionWithVectorStructSandwich;
14367 }
14368
14369 #[derive(Debug)]
14371 #[repr(C)]
14372 pub struct TableUnionWithVectorStructSandwichStruct<'de> {
14373 pub table: crate::wire::TableUnionWithVectorStructSandwich<'de>,
14374 }
14375
14376 static_assertions::const_assert_eq!(
14377 std::mem::size_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14378 16
14379 );
14380 static_assertions::const_assert_eq!(
14381 std::mem::align_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14382 8
14383 );
14384
14385 static_assertions::const_assert_eq!(
14386 std::mem::offset_of!(TableUnionWithVectorStructSandwichStruct<'_>, table),
14387 0
14388 );
14389
14390 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwichStruct<'_> {
14391 type Constraint = ();
14392
14393 fn validate(
14394 _: ::fidl_next::Slot<'_, Self>,
14395 _: Self::Constraint,
14396 ) -> Result<(), ::fidl_next::ValidationError> {
14397 Ok(())
14398 }
14399 }
14400
14401 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwichStruct<'static> {
14402 type Narrowed<'de> = TableUnionWithVectorStructSandwichStruct<'de>;
14403
14404 #[inline]
14405 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14406 ::fidl_next::munge! {
14407 let Self {
14408 table,
14409
14410 } = &mut *out_;
14411 }
14412
14413 ::fidl_next::Wire::zero_padding(table);
14414 }
14415 }
14416
14417 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwichStruct<'de>
14418 where
14419 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14420 ___D: ::fidl_next::Decoder<'de>,
14421 ___D: ::fidl_next::fuchsia::HandleDecoder,
14422 {
14423 fn decode(
14424 slot_: ::fidl_next::Slot<'_, Self>,
14425 decoder_: &mut ___D,
14426 _: (),
14427 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14428 ::fidl_next::munge! {
14429 let Self {
14430 mut table,
14431
14432 } = slot_;
14433 }
14434
14435 let _field = table.as_mut();
14436
14437 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14438
14439 Ok(())
14440 }
14441 }
14442
14443 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwichStruct<'de> {
14444 type Natural = crate::natural::TableUnionWithVectorStructSandwichStruct;
14445 }
14446
14447 #[derive(Debug)]
14449 #[repr(C)]
14450 pub struct TestFlexibleResourceXUnionInStruct<'de> {
14451 pub xu: crate::wire::SampleResourceXUnion<'de>,
14452 }
14453
14454 static_assertions::const_assert_eq!(
14455 std::mem::size_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
14456 16
14457 );
14458 static_assertions::const_assert_eq!(
14459 std::mem::align_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
14460 8
14461 );
14462
14463 static_assertions::const_assert_eq!(
14464 std::mem::offset_of!(TestFlexibleResourceXUnionInStruct<'_>, xu),
14465 0
14466 );
14467
14468 impl ::fidl_next::Constrained for TestFlexibleResourceXUnionInStruct<'_> {
14469 type Constraint = ();
14470
14471 fn validate(
14472 _: ::fidl_next::Slot<'_, Self>,
14473 _: Self::Constraint,
14474 ) -> Result<(), ::fidl_next::ValidationError> {
14475 Ok(())
14476 }
14477 }
14478
14479 unsafe impl ::fidl_next::Wire for TestFlexibleResourceXUnionInStruct<'static> {
14480 type Narrowed<'de> = TestFlexibleResourceXUnionInStruct<'de>;
14481
14482 #[inline]
14483 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14484 ::fidl_next::munge! {
14485 let Self {
14486 xu,
14487
14488 } = &mut *out_;
14489 }
14490
14491 ::fidl_next::Wire::zero_padding(xu);
14492 }
14493 }
14494
14495 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestFlexibleResourceXUnionInStruct<'de>
14496 where
14497 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14498 ___D: ::fidl_next::Decoder<'de>,
14499 ___D: ::fidl_next::fuchsia::HandleDecoder,
14500 {
14501 fn decode(
14502 slot_: ::fidl_next::Slot<'_, Self>,
14503 decoder_: &mut ___D,
14504 _: (),
14505 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14506 ::fidl_next::munge! {
14507 let Self {
14508 mut xu,
14509
14510 } = slot_;
14511 }
14512
14513 let _field = xu.as_mut();
14514
14515 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14516
14517 Ok(())
14518 }
14519 }
14520
14521 impl<'de> ::fidl_next::IntoNatural for TestFlexibleResourceXUnionInStruct<'de> {
14522 type Natural = crate::natural::TestFlexibleResourceXUnionInStruct;
14523 }
14524
14525 #[derive(Debug)]
14527 #[repr(C)]
14528 pub struct TestOptionalFlexibleResourceXUnionInStruct<'de> {
14529 pub xu: crate::wire_optional::SampleResourceXUnion<'de>,
14530 }
14531
14532 static_assertions::const_assert_eq!(
14533 std::mem::size_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
14534 16
14535 );
14536 static_assertions::const_assert_eq!(
14537 std::mem::align_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
14538 8
14539 );
14540
14541 static_assertions::const_assert_eq!(
14542 std::mem::offset_of!(TestOptionalFlexibleResourceXUnionInStruct<'_>, xu),
14543 0
14544 );
14545
14546 impl ::fidl_next::Constrained for TestOptionalFlexibleResourceXUnionInStruct<'_> {
14547 type Constraint = ();
14548
14549 fn validate(
14550 _: ::fidl_next::Slot<'_, Self>,
14551 _: Self::Constraint,
14552 ) -> Result<(), ::fidl_next::ValidationError> {
14553 Ok(())
14554 }
14555 }
14556
14557 unsafe impl ::fidl_next::Wire for TestOptionalFlexibleResourceXUnionInStruct<'static> {
14558 type Narrowed<'de> = TestOptionalFlexibleResourceXUnionInStruct<'de>;
14559
14560 #[inline]
14561 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14562 ::fidl_next::munge! {
14563 let Self {
14564 xu,
14565
14566 } = &mut *out_;
14567 }
14568
14569 ::fidl_next::Wire::zero_padding(xu);
14570 }
14571 }
14572
14573 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalFlexibleResourceXUnionInStruct<'de>
14574 where
14575 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14576 ___D: ::fidl_next::Decoder<'de>,
14577 ___D: ::fidl_next::fuchsia::HandleDecoder,
14578 {
14579 fn decode(
14580 slot_: ::fidl_next::Slot<'_, Self>,
14581 decoder_: &mut ___D,
14582 _: (),
14583 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14584 ::fidl_next::munge! {
14585 let Self {
14586 mut xu,
14587
14588 } = slot_;
14589 }
14590
14591 let _field = xu.as_mut();
14592
14593 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14594
14595 Ok(())
14596 }
14597 }
14598
14599 impl<'de> ::fidl_next::IntoNatural for TestOptionalFlexibleResourceXUnionInStruct<'de> {
14600 type Natural = crate::natural::TestOptionalFlexibleResourceXUnionInStruct;
14601 }
14602
14603 #[derive(Debug)]
14605 #[repr(C)]
14606 pub struct TestOptionalStrictResourceXUnionInStruct<'de> {
14607 pub xu: crate::wire_optional::SampleStrictResourceXUnion<'de>,
14608 }
14609
14610 static_assertions::const_assert_eq!(
14611 std::mem::size_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
14612 16
14613 );
14614 static_assertions::const_assert_eq!(
14615 std::mem::align_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
14616 8
14617 );
14618
14619 static_assertions::const_assert_eq!(
14620 std::mem::offset_of!(TestOptionalStrictResourceXUnionInStruct<'_>, xu),
14621 0
14622 );
14623
14624 impl ::fidl_next::Constrained for TestOptionalStrictResourceXUnionInStruct<'_> {
14625 type Constraint = ();
14626
14627 fn validate(
14628 _: ::fidl_next::Slot<'_, Self>,
14629 _: Self::Constraint,
14630 ) -> Result<(), ::fidl_next::ValidationError> {
14631 Ok(())
14632 }
14633 }
14634
14635 unsafe impl ::fidl_next::Wire for TestOptionalStrictResourceXUnionInStruct<'static> {
14636 type Narrowed<'de> = TestOptionalStrictResourceXUnionInStruct<'de>;
14637
14638 #[inline]
14639 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14640 ::fidl_next::munge! {
14641 let Self {
14642 xu,
14643
14644 } = &mut *out_;
14645 }
14646
14647 ::fidl_next::Wire::zero_padding(xu);
14648 }
14649 }
14650
14651 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalStrictResourceXUnionInStruct<'de>
14652 where
14653 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14654 ___D: ::fidl_next::Decoder<'de>,
14655 ___D: ::fidl_next::fuchsia::HandleDecoder,
14656 {
14657 fn decode(
14658 slot_: ::fidl_next::Slot<'_, Self>,
14659 decoder_: &mut ___D,
14660 _: (),
14661 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14662 ::fidl_next::munge! {
14663 let Self {
14664 mut xu,
14665
14666 } = slot_;
14667 }
14668
14669 let _field = xu.as_mut();
14670
14671 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14672
14673 Ok(())
14674 }
14675 }
14676
14677 impl<'de> ::fidl_next::IntoNatural for TestOptionalStrictResourceXUnionInStruct<'de> {
14678 type Natural = crate::natural::TestOptionalStrictResourceXUnionInStruct;
14679 }
14680
14681 #[derive(Debug)]
14683 #[repr(C)]
14684 pub struct TestPackageResolverResolveRequest<'de> {
14685 pub package_url: ::fidl_next::wire::String<'de>,
14686
14687 pub selectors: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
14688
14689 pub update_policy: crate::wire::UpdatePolicy,
14690
14691 pub this_should_be_a_handle: ::fidl_next::wire::Uint32,
14692 }
14693
14694 static_assertions::const_assert_eq!(
14695 std::mem::size_of::<TestPackageResolverResolveRequest<'_>>(),
14696 40
14697 );
14698 static_assertions::const_assert_eq!(
14699 std::mem::align_of::<TestPackageResolverResolveRequest<'_>>(),
14700 8
14701 );
14702
14703 static_assertions::const_assert_eq!(
14704 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, package_url),
14705 0
14706 );
14707
14708 static_assertions::const_assert_eq!(
14709 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, selectors),
14710 16
14711 );
14712
14713 static_assertions::const_assert_eq!(
14714 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, update_policy),
14715 32
14716 );
14717
14718 static_assertions::const_assert_eq!(
14719 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, this_should_be_a_handle),
14720 36
14721 );
14722
14723 impl ::fidl_next::Constrained for TestPackageResolverResolveRequest<'_> {
14724 type Constraint = ();
14725
14726 fn validate(
14727 _: ::fidl_next::Slot<'_, Self>,
14728 _: Self::Constraint,
14729 ) -> Result<(), ::fidl_next::ValidationError> {
14730 Ok(())
14731 }
14732 }
14733
14734 unsafe impl ::fidl_next::Wire for TestPackageResolverResolveRequest<'static> {
14735 type Narrowed<'de> = TestPackageResolverResolveRequest<'de>;
14736
14737 #[inline]
14738 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14739 ::fidl_next::munge! {
14740 let Self {
14741 package_url,
14742 selectors,
14743 update_policy,
14744 this_should_be_a_handle,
14745
14746 } = &mut *out_;
14747 }
14748
14749 ::fidl_next::Wire::zero_padding(package_url);
14750
14751 ::fidl_next::Wire::zero_padding(selectors);
14752
14753 ::fidl_next::Wire::zero_padding(update_policy);
14754
14755 ::fidl_next::Wire::zero_padding(this_should_be_a_handle);
14756
14757 unsafe {
14758 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 2);
14759 }
14760 }
14761 }
14762
14763 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestPackageResolverResolveRequest<'de>
14764 where
14765 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14766 ___D: ::fidl_next::Decoder<'de>,
14767 ___D: ::fidl_next::fuchsia::HandleDecoder,
14768 {
14769 fn decode(
14770 slot_: ::fidl_next::Slot<'_, Self>,
14771 decoder_: &mut ___D,
14772 _: (),
14773 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14774 if slot_.as_bytes()[34..36] != [0u8; 2] {
14775 return Err(::fidl_next::DecodeError::InvalidPadding);
14776 }
14777
14778 ::fidl_next::munge! {
14779 let Self {
14780 mut package_url,
14781 mut selectors,
14782 mut update_policy,
14783 mut this_should_be_a_handle,
14784
14785 } = slot_;
14786 }
14787
14788 let _field = package_url.as_mut();
14789 ::fidl_next::Constrained::validate(_field, 4294967295)?;
14790 ::fidl_next::Decode::decode(package_url.as_mut(), decoder_, 4294967295)?;
14791
14792 let _field = selectors.as_mut();
14793 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
14794 ::fidl_next::Decode::decode(selectors.as_mut(), decoder_, (4294967295, 4294967295))?;
14795
14796 let _field = update_policy.as_mut();
14797
14798 ::fidl_next::Decode::decode(update_policy.as_mut(), decoder_, ())?;
14799
14800 let _field = this_should_be_a_handle.as_mut();
14801
14802 ::fidl_next::Decode::decode(this_should_be_a_handle.as_mut(), decoder_, ())?;
14803
14804 Ok(())
14805 }
14806 }
14807
14808 impl<'de> ::fidl_next::IntoNatural for TestPackageResolverResolveRequest<'de> {
14809 type Natural = crate::natural::TestPackageResolverResolveRequest;
14810 }
14811
14812 #[derive(Debug)]
14814 #[repr(C)]
14815 pub struct TestStrictResourceXUnionInStruct<'de> {
14816 pub xu: crate::wire::SampleStrictResourceXUnion<'de>,
14817 }
14818
14819 static_assertions::const_assert_eq!(
14820 std::mem::size_of::<TestStrictResourceXUnionInStruct<'_>>(),
14821 16
14822 );
14823 static_assertions::const_assert_eq!(
14824 std::mem::align_of::<TestStrictResourceXUnionInStruct<'_>>(),
14825 8
14826 );
14827
14828 static_assertions::const_assert_eq!(
14829 std::mem::offset_of!(TestStrictResourceXUnionInStruct<'_>, xu),
14830 0
14831 );
14832
14833 impl ::fidl_next::Constrained for TestStrictResourceXUnionInStruct<'_> {
14834 type Constraint = ();
14835
14836 fn validate(
14837 _: ::fidl_next::Slot<'_, Self>,
14838 _: Self::Constraint,
14839 ) -> Result<(), ::fidl_next::ValidationError> {
14840 Ok(())
14841 }
14842 }
14843
14844 unsafe impl ::fidl_next::Wire for TestStrictResourceXUnionInStruct<'static> {
14845 type Narrowed<'de> = TestStrictResourceXUnionInStruct<'de>;
14846
14847 #[inline]
14848 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14849 ::fidl_next::munge! {
14850 let Self {
14851 xu,
14852
14853 } = &mut *out_;
14854 }
14855
14856 ::fidl_next::Wire::zero_padding(xu);
14857 }
14858 }
14859
14860 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestStrictResourceXUnionInStruct<'de>
14861 where
14862 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14863 ___D: ::fidl_next::Decoder<'de>,
14864 ___D: ::fidl_next::fuchsia::HandleDecoder,
14865 {
14866 fn decode(
14867 slot_: ::fidl_next::Slot<'_, Self>,
14868 decoder_: &mut ___D,
14869 _: (),
14870 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14871 ::fidl_next::munge! {
14872 let Self {
14873 mut xu,
14874
14875 } = slot_;
14876 }
14877
14878 let _field = xu.as_mut();
14879
14880 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14881
14882 Ok(())
14883 }
14884 }
14885
14886 impl<'de> ::fidl_next::IntoNatural for TestStrictResourceXUnionInStruct<'de> {
14887 type Natural = crate::natural::TestStrictResourceXUnionInStruct;
14888 }
14889
14890 #[derive(Debug)]
14892 #[repr(C)]
14893 pub struct UnboundedNonnullableVectorOfHandles<'de> {
14894 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
14895 }
14896
14897 static_assertions::const_assert_eq!(
14898 std::mem::size_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
14899 16
14900 );
14901 static_assertions::const_assert_eq!(
14902 std::mem::align_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
14903 8
14904 );
14905
14906 static_assertions::const_assert_eq!(
14907 std::mem::offset_of!(UnboundedNonnullableVectorOfHandles<'_>, vh0),
14908 0
14909 );
14910
14911 impl ::fidl_next::Constrained for UnboundedNonnullableVectorOfHandles<'_> {
14912 type Constraint = ();
14913
14914 fn validate(
14915 _: ::fidl_next::Slot<'_, Self>,
14916 _: Self::Constraint,
14917 ) -> Result<(), ::fidl_next::ValidationError> {
14918 Ok(())
14919 }
14920 }
14921
14922 unsafe impl ::fidl_next::Wire for UnboundedNonnullableVectorOfHandles<'static> {
14923 type Narrowed<'de> = UnboundedNonnullableVectorOfHandles<'de>;
14924
14925 #[inline]
14926 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14927 ::fidl_next::munge! {
14928 let Self {
14929 vh0,
14930
14931 } = &mut *out_;
14932 }
14933
14934 ::fidl_next::Wire::zero_padding(vh0);
14935 }
14936 }
14937
14938 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNonnullableVectorOfHandles<'de>
14939 where
14940 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14941 ___D: ::fidl_next::Decoder<'de>,
14942 ___D: ::fidl_next::fuchsia::HandleDecoder,
14943 {
14944 fn decode(
14945 slot_: ::fidl_next::Slot<'_, Self>,
14946 decoder_: &mut ___D,
14947 _: (),
14948 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14949 ::fidl_next::munge! {
14950 let Self {
14951 mut vh0,
14952
14953 } = slot_;
14954 }
14955
14956 let _field = vh0.as_mut();
14957 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
14958 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
14959
14960 Ok(())
14961 }
14962 }
14963
14964 impl<'de> ::fidl_next::IntoNatural for UnboundedNonnullableVectorOfHandles<'de> {
14965 type Natural = crate::natural::UnboundedNonnullableVectorOfHandles;
14966 }
14967
14968 #[derive(Debug)]
14970 #[repr(C)]
14971 pub struct UnboundedNullableVectorOfHandles<'de> {
14972 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
14973 }
14974
14975 static_assertions::const_assert_eq!(
14976 std::mem::size_of::<UnboundedNullableVectorOfHandles<'_>>(),
14977 16
14978 );
14979 static_assertions::const_assert_eq!(
14980 std::mem::align_of::<UnboundedNullableVectorOfHandles<'_>>(),
14981 8
14982 );
14983
14984 static_assertions::const_assert_eq!(
14985 std::mem::offset_of!(UnboundedNullableVectorOfHandles<'_>, vh0),
14986 0
14987 );
14988
14989 impl ::fidl_next::Constrained for UnboundedNullableVectorOfHandles<'_> {
14990 type Constraint = ();
14991
14992 fn validate(
14993 _: ::fidl_next::Slot<'_, Self>,
14994 _: Self::Constraint,
14995 ) -> Result<(), ::fidl_next::ValidationError> {
14996 Ok(())
14997 }
14998 }
14999
15000 unsafe impl ::fidl_next::Wire for UnboundedNullableVectorOfHandles<'static> {
15001 type Narrowed<'de> = UnboundedNullableVectorOfHandles<'de>;
15002
15003 #[inline]
15004 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15005 ::fidl_next::munge! {
15006 let Self {
15007 vh0,
15008
15009 } = &mut *out_;
15010 }
15011
15012 ::fidl_next::Wire::zero_padding(vh0);
15013 }
15014 }
15015
15016 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNullableVectorOfHandles<'de>
15017 where
15018 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15019 ___D: ::fidl_next::Decoder<'de>,
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! {
15028 let Self {
15029 mut vh0,
15030
15031 } = slot_;
15032 }
15033
15034 let _field = vh0.as_mut();
15035 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15036 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
15037
15038 Ok(())
15039 }
15040 }
15041
15042 impl<'de> ::fidl_next::IntoNatural for UnboundedNullableVectorOfHandles<'de> {
15043 type Natural = crate::natural::UnboundedNullableVectorOfHandles;
15044 }
15045
15046 #[repr(transparent)]
15048 pub struct UnionOfEndpointsUnion<'de> {
15049 pub(crate) raw: ::fidl_next::wire::Union,
15050 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15051 }
15052
15053 impl<'de> Drop for UnionOfEndpointsUnion<'de> {
15054 fn drop(&mut self) {
15055 match self.raw.ordinal() {
15056 1 => {
15057 let _ = unsafe {
15058 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
15059 crate::Protocol,
15060 ::fidl_next::wire::fuchsia::Channel,
15061 >>()
15062 };
15063 }
15064
15065 2 => {
15066 let _ = unsafe {
15067 self.raw.get().read_unchecked::<::fidl_next::ServerEnd<
15068 crate::Protocol,
15069 ::fidl_next::wire::fuchsia::Channel,
15070 >>()
15071 };
15072 }
15073
15074 _ => (),
15075 }
15076 }
15077 }
15078
15079 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
15080 type Constraint = ();
15081
15082 fn validate(
15083 _: ::fidl_next::Slot<'_, Self>,
15084 _: Self::Constraint,
15085 ) -> Result<(), ::fidl_next::ValidationError> {
15086 Ok(())
15087 }
15088 }
15089
15090 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
15091 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
15092
15093 #[inline]
15094 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15095 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15096 ::fidl_next::wire::Union::zero_padding(raw);
15097 }
15098 }
15099
15100 pub mod union_of_endpoints_union {
15101 pub enum Ref<'de> {
15102 ClientEnd(
15103 &'de ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15104 ),
15105
15106 ServerEnd(
15107 &'de ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15108 ),
15109
15110 UnknownOrdinal_(u64),
15111 }
15112
15113 pub enum Value {
15114 ClientEnd(::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>),
15115
15116 ServerEnd(::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>),
15117
15118 UnknownOrdinal_(u64),
15119 }
15120 }
15121
15122 impl<'de> UnionOfEndpointsUnion<'de> {
15123 pub fn as_ref(&self) -> crate::wire::union_of_endpoints_union::Ref<'_> {
15124 match self.raw.ordinal() {
15125 1 => crate::wire::union_of_endpoints_union::Ref::ClientEnd(unsafe {
15126 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15127 }),
15128
15129 2 => crate::wire::union_of_endpoints_union::Ref::ServerEnd(unsafe {
15130 self.raw.get().deref_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15131 }),
15132
15133 unknown => crate::wire::union_of_endpoints_union::Ref::UnknownOrdinal_(unknown),
15134 }
15135 }
15136
15137 pub fn into_inner(self) -> crate::wire::union_of_endpoints_union::Value {
15138 let this = ::core::mem::ManuallyDrop::new(self);
15139
15140 match this.raw.ordinal() {
15141 1 => crate::wire::union_of_endpoints_union::Value::ClientEnd(unsafe {
15142 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15143 }),
15144
15145 2 => crate::wire::union_of_endpoints_union::Value::ServerEnd(unsafe {
15146 this.raw.get().read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15147 }),
15148
15149 unknown => crate::wire::union_of_endpoints_union::Value::UnknownOrdinal_(unknown),
15150 }
15151 }
15152 }
15153
15154 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
15155 where
15156 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15157 ___D: ::fidl_next::Decoder<'de>,
15158 ___D: ::fidl_next::fuchsia::HandleDecoder,
15159 {
15160 fn decode(
15161 mut slot: ::fidl_next::Slot<'_, Self>,
15162 decoder: &mut ___D,
15163 _: (),
15164 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15165 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15166 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15167 1 => ::fidl_next::wire::Union::decode_as::<
15168 ___D,
15169 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15170 >(raw, decoder, ())?,
15171
15172 2 => ::fidl_next::wire::Union::decode_as::<
15173 ___D,
15174 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15175 >(raw, decoder, ())?,
15176
15177 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
15178 }
15179
15180 Ok(())
15181 }
15182 }
15183
15184 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
15185 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15186 match self.raw.ordinal() {
15187 1 => unsafe {
15188 self.raw.get().deref_unchecked::<
15189 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
15190 >().fmt(f)
15191 },
15192 2 => unsafe {
15193 self.raw.get().deref_unchecked::<
15194 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
15195 >().fmt(f)
15196 },
15197 _ => unsafe { ::core::hint::unreachable_unchecked() },
15198 }
15199 }
15200 }
15201
15202 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
15203 type Natural = crate::natural::UnionOfEndpointsUnion;
15204 }
15205
15206 #[derive(Debug)]
15208 #[repr(C)]
15209 pub struct UnionOfEndpoints<'de> {
15210 pub u: crate::wire::UnionOfEndpointsUnion<'de>,
15211 }
15212
15213 static_assertions::const_assert_eq!(std::mem::size_of::<UnionOfEndpoints<'_>>(), 16);
15214 static_assertions::const_assert_eq!(std::mem::align_of::<UnionOfEndpoints<'_>>(), 8);
15215
15216 static_assertions::const_assert_eq!(std::mem::offset_of!(UnionOfEndpoints<'_>, u), 0);
15217
15218 impl ::fidl_next::Constrained for UnionOfEndpoints<'_> {
15219 type Constraint = ();
15220
15221 fn validate(
15222 _: ::fidl_next::Slot<'_, Self>,
15223 _: Self::Constraint,
15224 ) -> Result<(), ::fidl_next::ValidationError> {
15225 Ok(())
15226 }
15227 }
15228
15229 unsafe impl ::fidl_next::Wire for UnionOfEndpoints<'static> {
15230 type Narrowed<'de> = UnionOfEndpoints<'de>;
15231
15232 #[inline]
15233 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15234 ::fidl_next::munge! {
15235 let Self {
15236 u,
15237
15238 } = &mut *out_;
15239 }
15240
15241 ::fidl_next::Wire::zero_padding(u);
15242 }
15243 }
15244
15245 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpoints<'de>
15246 where
15247 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15248 ___D: ::fidl_next::Decoder<'de>,
15249 ___D: ::fidl_next::fuchsia::HandleDecoder,
15250 {
15251 fn decode(
15252 slot_: ::fidl_next::Slot<'_, Self>,
15253 decoder_: &mut ___D,
15254 _: (),
15255 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15256 ::fidl_next::munge! {
15257 let Self {
15258 mut u,
15259
15260 } = slot_;
15261 }
15262
15263 let _field = u.as_mut();
15264
15265 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
15266
15267 Ok(())
15268 }
15269 }
15270
15271 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpoints<'de> {
15272 type Natural = crate::natural::UnionOfEndpoints;
15273 }
15274
15275 #[repr(transparent)]
15277 pub struct UnionOfHandle {
15278 pub(crate) raw: ::fidl_next::wire::Union,
15279 pub(crate) _phantom: ::core::marker::PhantomData<()>,
15280 }
15281
15282 impl Drop for UnionOfHandle {
15283 fn drop(&mut self) {
15284 match self.raw.ordinal() {
15285 1 => {
15286 let _ = unsafe {
15287 self.raw
15288 .get()
15289 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15290 };
15291 }
15292
15293 _ => unsafe { ::core::hint::unreachable_unchecked() },
15294 }
15295 }
15296 }
15297
15298 impl ::fidl_next::Constrained for UnionOfHandle {
15299 type Constraint = ();
15300
15301 fn validate(
15302 _: ::fidl_next::Slot<'_, Self>,
15303 _: Self::Constraint,
15304 ) -> Result<(), ::fidl_next::ValidationError> {
15305 Ok(())
15306 }
15307 }
15308
15309 unsafe impl ::fidl_next::Wire for UnionOfHandle {
15310 type Narrowed<'de> = UnionOfHandle;
15311
15312 #[inline]
15313 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15314 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15315 ::fidl_next::wire::Union::zero_padding(raw);
15316 }
15317 }
15318
15319 pub mod union_of_handle {
15320 pub enum Ref<'de> {
15321 H(&'de ::fidl_next::wire::fuchsia::NullableHandle),
15322 }
15323
15324 pub enum Value {
15325 H(::fidl_next::wire::fuchsia::NullableHandle),
15326 }
15327 }
15328
15329 impl UnionOfHandle {
15330 pub fn as_ref(&self) -> crate::wire::union_of_handle::Ref<'_> {
15331 match self.raw.ordinal() {
15332 1 => crate::wire::union_of_handle::Ref::H(unsafe {
15333 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15334 }),
15335
15336 _ => unsafe { ::core::hint::unreachable_unchecked() },
15337 }
15338 }
15339
15340 pub fn into_inner(self) -> crate::wire::union_of_handle::Value {
15341 let this = ::core::mem::ManuallyDrop::new(self);
15342
15343 match this.raw.ordinal() {
15344 1 => crate::wire::union_of_handle::Value::H(unsafe {
15345 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15346 }),
15347
15348 _ => unsafe { ::core::hint::unreachable_unchecked() },
15349 }
15350 }
15351 }
15352
15353 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
15354 where
15355 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15356 ___D: ::fidl_next::fuchsia::HandleDecoder,
15357 {
15358 fn decode(
15359 mut slot: ::fidl_next::Slot<'_, Self>,
15360 decoder: &mut ___D,
15361 _: (),
15362 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15363 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15364 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15365 1 => ::fidl_next::wire::Union::decode_as_static::<
15366 ___D,
15367 ::fidl_next::wire::fuchsia::NullableHandle,
15368 >(raw, decoder, ())?,
15369
15370 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
15371 }
15372
15373 Ok(())
15374 }
15375 }
15376
15377 impl ::core::fmt::Debug for UnionOfHandle {
15378 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15379 match self.raw.ordinal() {
15380 1 => unsafe {
15381 self.raw
15382 .get()
15383 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15384 .fmt(f)
15385 },
15386 _ => unsafe { ::core::hint::unreachable_unchecked() },
15387 }
15388 }
15389 }
15390
15391 impl ::fidl_next::IntoNatural for UnionOfHandle {
15392 type Natural = crate::natural::UnionOfHandle;
15393 }
15394
15395 #[derive(Debug)]
15397 #[repr(C)]
15398 pub struct VectorOfArrayOfEventInStructWithDefaultRights<'de> {
15399 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15400 }
15401
15402 static_assertions::const_assert_eq!(
15403 std::mem::size_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
15404 16
15405 );
15406 static_assertions::const_assert_eq!(
15407 std::mem::align_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
15408 8
15409 );
15410
15411 static_assertions::const_assert_eq!(
15412 std::mem::offset_of!(VectorOfArrayOfEventInStructWithDefaultRights<'_>, h),
15413 0
15414 );
15415
15416 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithDefaultRights<'_> {
15417 type Constraint = ();
15418
15419 fn validate(
15420 _: ::fidl_next::Slot<'_, Self>,
15421 _: Self::Constraint,
15422 ) -> Result<(), ::fidl_next::ValidationError> {
15423 Ok(())
15424 }
15425 }
15426
15427 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithDefaultRights<'static> {
15428 type Narrowed<'de> = VectorOfArrayOfEventInStructWithDefaultRights<'de>;
15429
15430 #[inline]
15431 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15432 ::fidl_next::munge! {
15433 let Self {
15434 h,
15435
15436 } = &mut *out_;
15437 }
15438
15439 ::fidl_next::Wire::zero_padding(h);
15440 }
15441 }
15442
15443 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15444 for VectorOfArrayOfEventInStructWithDefaultRights<'de>
15445 where
15446 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15447 ___D: ::fidl_next::Decoder<'de>,
15448 ___D: ::fidl_next::fuchsia::HandleDecoder,
15449 {
15450 fn decode(
15451 slot_: ::fidl_next::Slot<'_, Self>,
15452 decoder_: &mut ___D,
15453 _: (),
15454 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15455 ::fidl_next::munge! {
15456 let Self {
15457 mut h,
15458
15459 } = slot_;
15460 }
15461
15462 let _field = h.as_mut();
15463 ::fidl_next::Constrained::validate(_field, (1, ()))?;
15464 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
15465
15466 let h = unsafe { h.deref_unchecked() };
15467
15468 if h.len() > 1 {
15469 return Err(::fidl_next::DecodeError::VectorTooLong {
15470 size: h.len() as u64,
15471 limit: 1,
15472 });
15473 }
15474
15475 Ok(())
15476 }
15477 }
15478
15479 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithDefaultRights<'de> {
15480 type Natural = crate::natural::VectorOfArrayOfEventInStructWithDefaultRights;
15481 }
15482
15483 #[derive(Debug)]
15485 #[repr(C)]
15486 pub struct VectorOfArrayOfEventInStructWithReducedRights<'de> {
15487 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15488 }
15489
15490 static_assertions::const_assert_eq!(
15491 std::mem::size_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
15492 16
15493 );
15494 static_assertions::const_assert_eq!(
15495 std::mem::align_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
15496 8
15497 );
15498
15499 static_assertions::const_assert_eq!(
15500 std::mem::offset_of!(VectorOfArrayOfEventInStructWithReducedRights<'_>, h),
15501 0
15502 );
15503
15504 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithReducedRights<'_> {
15505 type Constraint = ();
15506
15507 fn validate(
15508 _: ::fidl_next::Slot<'_, Self>,
15509 _: Self::Constraint,
15510 ) -> Result<(), ::fidl_next::ValidationError> {
15511 Ok(())
15512 }
15513 }
15514
15515 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithReducedRights<'static> {
15516 type Narrowed<'de> = VectorOfArrayOfEventInStructWithReducedRights<'de>;
15517
15518 #[inline]
15519 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15520 ::fidl_next::munge! {
15521 let Self {
15522 h,
15523
15524 } = &mut *out_;
15525 }
15526
15527 ::fidl_next::Wire::zero_padding(h);
15528 }
15529 }
15530
15531 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15532 for VectorOfArrayOfEventInStructWithReducedRights<'de>
15533 where
15534 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15535 ___D: ::fidl_next::Decoder<'de>,
15536 ___D: ::fidl_next::fuchsia::HandleDecoder,
15537 {
15538 fn decode(
15539 slot_: ::fidl_next::Slot<'_, Self>,
15540 decoder_: &mut ___D,
15541 _: (),
15542 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15543 ::fidl_next::munge! {
15544 let Self {
15545 mut h,
15546
15547 } = slot_;
15548 }
15549
15550 let _field = h.as_mut();
15551 ::fidl_next::Constrained::validate(_field, (1, ()))?;
15552 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
15553
15554 let h = unsafe { h.deref_unchecked() };
15555
15556 if h.len() > 1 {
15557 return Err(::fidl_next::DecodeError::VectorTooLong {
15558 size: h.len() as u64,
15559 limit: 1,
15560 });
15561 }
15562
15563 Ok(())
15564 }
15565 }
15566
15567 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithReducedRights<'de> {
15568 type Natural = crate::natural::VectorOfArrayOfEventInStructWithReducedRights;
15569 }
15570
15571 #[repr(C)]
15573 pub struct VectorOfArrayOfEventInTableWithReducedRights<'de> {
15574 pub(crate) table: ::fidl_next::wire::Table<'de>,
15575 }
15576
15577 impl<'de> Drop for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15578 fn drop(&mut self) {
15579 let _ = self.table.get(1)
15580 .map(|envelope| unsafe {
15581 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
15582 });
15583 }
15584 }
15585
15586 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRights<'_> {
15587 type Constraint = ();
15588
15589 fn validate(
15590 _: ::fidl_next::Slot<'_, Self>,
15591 _: Self::Constraint,
15592 ) -> Result<(), ::fidl_next::ValidationError> {
15593 Ok(())
15594 }
15595 }
15596
15597 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRights<'static> {
15598 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRights<'de>;
15599
15600 #[inline]
15601 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15602 ::fidl_next::munge!(let Self { table } = out);
15603 ::fidl_next::wire::Table::zero_padding(table);
15604 }
15605 }
15606
15607 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15608 for VectorOfArrayOfEventInTableWithReducedRights<'de>
15609 where
15610 ___D: ::fidl_next::Decoder<'de> + ?Sized,
15611 ___D: ::fidl_next::fuchsia::HandleDecoder,
15612 {
15613 fn decode(
15614 slot: ::fidl_next::Slot<'_, Self>,
15615 decoder: &mut ___D,
15616 _: (),
15617 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15618 ::fidl_next::munge!(let Self { table } = slot);
15619
15620 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15621 match ordinal {
15622 0 => unsafe { ::core::hint::unreachable_unchecked() },
15623
15624 1 => {
15625 ::fidl_next::wire::Envelope::decode_as::<
15626 ___D,
15627 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15628 >(slot.as_mut(), decoder, (1, ()))?;
15629
15630 let value = unsafe {
15631 slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
15632 '_,
15633 [::fidl_next::wire::fuchsia::Event; 1],
15634 >>()
15635 };
15636
15637 if value.len() > 1 {
15638 return Err(::fidl_next::DecodeError::VectorTooLong {
15639 size: value.len() as u64,
15640 limit: 1,
15641 });
15642 }
15643
15644 Ok(())
15645 }
15646
15647 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15648 }
15649 })
15650 }
15651 }
15652
15653 impl<'de> VectorOfArrayOfEventInTableWithReducedRights<'de> {
15654 pub fn h(
15655 &self,
15656 ) -> ::core::option::Option<
15657 &::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15658 > {
15659 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15660 }
15661
15662 pub fn take_h(
15663 &mut self,
15664 ) -> ::core::option::Option<
15665 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15666 > {
15667 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
15668 }
15669 }
15670
15671 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15672 fn fmt(
15673 &self,
15674 f: &mut ::core::fmt::Formatter<'_>,
15675 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15676 f.debug_struct("VectorOfArrayOfEventInTableWithReducedRights")
15677 .field("h", &self.h())
15678 .finish()
15679 }
15680 }
15681
15682 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15683 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRights;
15684 }
15685
15686 #[derive(Debug)]
15688 #[repr(C)]
15689 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
15690 pub t: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
15691 }
15692
15693 static_assertions::const_assert_eq!(
15694 std::mem::size_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
15695 16
15696 );
15697 static_assertions::const_assert_eq!(
15698 std::mem::align_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
15699 8
15700 );
15701
15702 static_assertions::const_assert_eq!(
15703 std::mem::offset_of!(VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>, t),
15704 0
15705 );
15706
15707 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRightsStruct<'_> {
15708 type Constraint = ();
15709
15710 fn validate(
15711 _: ::fidl_next::Slot<'_, Self>,
15712 _: Self::Constraint,
15713 ) -> Result<(), ::fidl_next::ValidationError> {
15714 Ok(())
15715 }
15716 }
15717
15718 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRightsStruct<'static> {
15719 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>;
15720
15721 #[inline]
15722 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15723 ::fidl_next::munge! {
15724 let Self {
15725 t,
15726
15727 } = &mut *out_;
15728 }
15729
15730 ::fidl_next::Wire::zero_padding(t);
15731 }
15732 }
15733
15734 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15735 for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>
15736 where
15737 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15738 ___D: ::fidl_next::Decoder<'de>,
15739 ___D: ::fidl_next::fuchsia::HandleDecoder,
15740 {
15741 fn decode(
15742 slot_: ::fidl_next::Slot<'_, Self>,
15743 decoder_: &mut ___D,
15744 _: (),
15745 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15746 ::fidl_next::munge! {
15747 let Self {
15748 mut t,
15749
15750 } = slot_;
15751 }
15752
15753 let _field = t.as_mut();
15754
15755 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
15756
15757 Ok(())
15758 }
15759 }
15760
15761 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
15762 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRightsStruct;
15763 }
15764
15765 #[repr(transparent)]
15767 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15768 pub(crate) raw: ::fidl_next::wire::Union,
15769 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15770 }
15771
15772 impl<'de> Drop for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15773 fn drop(&mut self) {
15774 match self.raw.ordinal() {
15775 1 => {
15776 let _ = unsafe {
15777 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
15778 };
15779 }
15780
15781 _ => unsafe { ::core::hint::unreachable_unchecked() },
15782 }
15783 }
15784 }
15785
15786 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
15787 type Constraint = ();
15788
15789 fn validate(
15790 _: ::fidl_next::Slot<'_, Self>,
15791 _: Self::Constraint,
15792 ) -> Result<(), ::fidl_next::ValidationError> {
15793 Ok(())
15794 }
15795 }
15796
15797 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
15798 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
15799
15800 #[inline]
15801 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15802 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15803 ::fidl_next::wire::Union::zero_padding(raw);
15804 }
15805 }
15806
15807 pub mod vector_of_array_of_event_in_union_with_reduced_rights {
15808 pub enum Ref<'de> {
15809 H(&'de ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>),
15810 }
15811
15812 pub enum Value<'de> {
15813 H(::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>),
15814 }
15815 }
15816
15817 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15818 pub fn as_ref(
15819 &self,
15820 ) -> crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref<'_> {
15821 match self.raw.ordinal() {
15822 1 => crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref::H(
15823 unsafe {
15824 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>>()
15825 },
15826 ),
15827
15828 _ => unsafe { ::core::hint::unreachable_unchecked() },
15829 }
15830 }
15831
15832 pub fn into_inner(
15833 self,
15834 ) -> crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Value<'de>
15835 {
15836 let this = ::core::mem::ManuallyDrop::new(self);
15837
15838 match this.raw.ordinal() {
15839 1 => crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Value::H(
15840 unsafe {
15841 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
15842 },
15843 ),
15844
15845 _ => unsafe { ::core::hint::unreachable_unchecked() },
15846 }
15847 }
15848 }
15849
15850 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15851 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
15852 where
15853 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15854 ___D: ::fidl_next::Decoder<'de>,
15855 ___D: ::fidl_next::fuchsia::HandleDecoder,
15856 {
15857 fn decode(
15858 mut slot: ::fidl_next::Slot<'_, Self>,
15859 decoder: &mut ___D,
15860 _: (),
15861 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15862 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15863 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15864 1 => ::fidl_next::wire::Union::decode_as::<
15865 ___D,
15866 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15867 >(raw, decoder, (1, ()))?,
15868
15869 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
15870 }
15871
15872 Ok(())
15873 }
15874 }
15875
15876 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15877 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15878 match self.raw.ordinal() {
15879 1 => unsafe {
15880 self.raw.get().deref_unchecked::<
15881 ::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>
15882 >().fmt(f)
15883 },
15884 _ => unsafe { ::core::hint::unreachable_unchecked() },
15885 }
15886 }
15887 }
15888
15889 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15890 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRights;
15891 }
15892
15893 #[derive(Debug)]
15895 #[repr(C)]
15896 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
15897 pub u: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
15898 }
15899
15900 static_assertions::const_assert_eq!(
15901 std::mem::size_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
15902 16
15903 );
15904 static_assertions::const_assert_eq!(
15905 std::mem::align_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
15906 8
15907 );
15908
15909 static_assertions::const_assert_eq!(
15910 std::mem::offset_of!(VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>, u),
15911 0
15912 );
15913
15914 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_> {
15915 type Constraint = ();
15916
15917 fn validate(
15918 _: ::fidl_next::Slot<'_, Self>,
15919 _: Self::Constraint,
15920 ) -> Result<(), ::fidl_next::ValidationError> {
15921 Ok(())
15922 }
15923 }
15924
15925 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static> {
15926 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>;
15927
15928 #[inline]
15929 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15930 ::fidl_next::munge! {
15931 let Self {
15932 u,
15933
15934 } = &mut *out_;
15935 }
15936
15937 ::fidl_next::Wire::zero_padding(u);
15938 }
15939 }
15940
15941 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15942 for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>
15943 where
15944 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15945 ___D: ::fidl_next::Decoder<'de>,
15946 ___D: ::fidl_next::fuchsia::HandleDecoder,
15947 {
15948 fn decode(
15949 slot_: ::fidl_next::Slot<'_, Self>,
15950 decoder_: &mut ___D,
15951 _: (),
15952 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15953 ::fidl_next::munge! {
15954 let Self {
15955 mut u,
15956
15957 } = slot_;
15958 }
15959
15960 let _field = u.as_mut();
15961
15962 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
15963
15964 Ok(())
15965 }
15966 }
15967
15968 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
15969 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRightsStruct;
15970 }
15971
15972 #[derive(Debug)]
15974 #[repr(C)]
15975 pub struct VectorOfHandles<'de> {
15976 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15977 }
15978
15979 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfHandles<'_>>(), 16);
15980 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfHandles<'_>>(), 8);
15981
15982 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfHandles<'_>, v), 0);
15983
15984 impl ::fidl_next::Constrained for VectorOfHandles<'_> {
15985 type Constraint = ();
15986
15987 fn validate(
15988 _: ::fidl_next::Slot<'_, Self>,
15989 _: Self::Constraint,
15990 ) -> Result<(), ::fidl_next::ValidationError> {
15991 Ok(())
15992 }
15993 }
15994
15995 unsafe impl ::fidl_next::Wire for VectorOfHandles<'static> {
15996 type Narrowed<'de> = VectorOfHandles<'de>;
15997
15998 #[inline]
15999 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16000 ::fidl_next::munge! {
16001 let Self {
16002 v,
16003
16004 } = &mut *out_;
16005 }
16006
16007 ::fidl_next::Wire::zero_padding(v);
16008 }
16009 }
16010
16011 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfHandles<'de>
16012 where
16013 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16014 ___D: ::fidl_next::Decoder<'de>,
16015 ___D: ::fidl_next::fuchsia::HandleDecoder,
16016 {
16017 fn decode(
16018 slot_: ::fidl_next::Slot<'_, Self>,
16019 decoder_: &mut ___D,
16020 _: (),
16021 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16022 ::fidl_next::munge! {
16023 let Self {
16024 mut v,
16025
16026 } = slot_;
16027 }
16028
16029 let _field = v.as_mut();
16030 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
16031 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
16032
16033 Ok(())
16034 }
16035 }
16036
16037 impl<'de> ::fidl_next::IntoNatural for VectorOfHandles<'de> {
16038 type Natural = crate::natural::VectorOfHandles;
16039 }
16040
16041 #[derive(Debug)]
16043 #[repr(C)]
16044 pub struct VectorOfOptionalHandles<'de> {
16045 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::OptionalNullableHandle>,
16046 }
16047
16048 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfOptionalHandles<'_>>(), 16);
16049 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfOptionalHandles<'_>>(), 8);
16050
16051 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfOptionalHandles<'_>, v), 0);
16052
16053 impl ::fidl_next::Constrained for VectorOfOptionalHandles<'_> {
16054 type Constraint = ();
16055
16056 fn validate(
16057 _: ::fidl_next::Slot<'_, Self>,
16058 _: Self::Constraint,
16059 ) -> Result<(), ::fidl_next::ValidationError> {
16060 Ok(())
16061 }
16062 }
16063
16064 unsafe impl ::fidl_next::Wire for VectorOfOptionalHandles<'static> {
16065 type Narrowed<'de> = VectorOfOptionalHandles<'de>;
16066
16067 #[inline]
16068 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16069 ::fidl_next::munge! {
16070 let Self {
16071 v,
16072
16073 } = &mut *out_;
16074 }
16075
16076 ::fidl_next::Wire::zero_padding(v);
16077 }
16078 }
16079
16080 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfOptionalHandles<'de>
16081 where
16082 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16083 ___D: ::fidl_next::Decoder<'de>,
16084 ___D: ::fidl_next::fuchsia::HandleDecoder,
16085 {
16086 fn decode(
16087 slot_: ::fidl_next::Slot<'_, Self>,
16088 decoder_: &mut ___D,
16089 _: (),
16090 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16091 ::fidl_next::munge! {
16092 let Self {
16093 mut v,
16094
16095 } = slot_;
16096 }
16097
16098 let _field = v.as_mut();
16099 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
16100 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
16101
16102 Ok(())
16103 }
16104 }
16105
16106 impl<'de> ::fidl_next::IntoNatural for VectorOfOptionalHandles<'de> {
16107 type Natural = crate::natural::VectorOfOptionalHandles;
16108 }
16109
16110 #[derive(Debug)]
16112 #[repr(C)]
16113 pub struct VectorOfUpTo2Handles<'de> {
16114 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
16115 }
16116
16117 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfUpTo2Handles<'_>>(), 16);
16118 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfUpTo2Handles<'_>>(), 8);
16119
16120 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfUpTo2Handles<'_>, v), 0);
16121
16122 impl ::fidl_next::Constrained for VectorOfUpTo2Handles<'_> {
16123 type Constraint = ();
16124
16125 fn validate(
16126 _: ::fidl_next::Slot<'_, Self>,
16127 _: Self::Constraint,
16128 ) -> Result<(), ::fidl_next::ValidationError> {
16129 Ok(())
16130 }
16131 }
16132
16133 unsafe impl ::fidl_next::Wire for VectorOfUpTo2Handles<'static> {
16134 type Narrowed<'de> = VectorOfUpTo2Handles<'de>;
16135
16136 #[inline]
16137 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16138 ::fidl_next::munge! {
16139 let Self {
16140 v,
16141
16142 } = &mut *out_;
16143 }
16144
16145 ::fidl_next::Wire::zero_padding(v);
16146 }
16147 }
16148
16149 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfUpTo2Handles<'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 v,
16163
16164 } = slot_;
16165 }
16166
16167 let _field = v.as_mut();
16168 ::fidl_next::Constrained::validate(_field, (2, ()))?;
16169 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (2, ()))?;
16170
16171 let v = unsafe { v.deref_unchecked() };
16172
16173 if v.len() > 2 {
16174 return Err(::fidl_next::DecodeError::VectorTooLong {
16175 size: v.len() as u64,
16176 limit: 2,
16177 });
16178 }
16179
16180 Ok(())
16181 }
16182 }
16183
16184 impl<'de> ::fidl_next::IntoNatural for VectorOfUpTo2Handles<'de> {
16185 type Natural = crate::natural::VectorOfUpTo2Handles;
16186 }
16187}
16188
16189pub mod wire_optional {
16190
16191 pub use fidl_next_common_test_conformance::wire_optional::*;
16192
16193 #[repr(transparent)]
16194 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16195 pub(crate) raw: ::fidl_next::wire::Union,
16196 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16197 }
16198
16199 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
16200 type Constraint = ();
16201
16202 fn validate(
16203 _: ::fidl_next::Slot<'_, Self>,
16204 _: Self::Constraint,
16205 ) -> Result<(), ::fidl_next::ValidationError> {
16206 Ok(())
16207 }
16208 }
16209
16210 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
16211 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
16212
16213 #[inline]
16214 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16215 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16216 ::fidl_next::wire::Union::zero_padding(raw);
16217 }
16218 }
16219
16220 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16221 pub fn is_some(&self) -> bool {
16222 self.raw.is_some()
16223 }
16224
16225 pub fn is_none(&self) -> bool {
16226 self.raw.is_none()
16227 }
16228
16229 pub fn as_ref(
16230 &self,
16231 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
16232 {
16233 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16234 }
16235
16236 pub fn into_option(
16237 self,
16238 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
16239 {
16240 if self.is_some() {
16241 Some(crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights {
16242 raw: self.raw,
16243 _phantom: ::core::marker::PhantomData,
16244 })
16245 } else {
16246 None
16247 }
16248 }
16249 }
16250
16251 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16252 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
16253 where
16254 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16255 ___D: ::fidl_next::Decoder<'de>,
16256 ___D: ::fidl_next::fuchsia::HandleDecoder,
16257 {
16258 fn decode(
16259 mut slot: ::fidl_next::Slot<'_, Self>,
16260 decoder: &mut ___D,
16261 _: (),
16262 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16263 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16264 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16265 1 => ::fidl_next::wire::Union::decode_as::<
16266 ___D,
16267 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
16268 >(raw, decoder, (1, ()))?,
16269
16270 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16271 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16272 }
16273
16274 Ok(())
16275 }
16276 }
16277
16278 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16279 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16280 self.as_ref().fmt(f)
16281 }
16282 }
16283
16284 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16285 type Natural =
16286 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights>;
16287 }
16288
16289 #[repr(transparent)]
16290 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16291 pub(crate) raw: ::fidl_next::wire::Union,
16292 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16293 }
16294
16295 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
16296 type Constraint = ();
16297
16298 fn validate(
16299 _: ::fidl_next::Slot<'_, Self>,
16300 _: Self::Constraint,
16301 ) -> Result<(), ::fidl_next::ValidationError> {
16302 Ok(())
16303 }
16304 }
16305
16306 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
16307 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
16308
16309 #[inline]
16310 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16311 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16312 ::fidl_next::wire::Union::zero_padding(raw);
16313 }
16314 }
16315
16316 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16317 pub fn is_some(&self) -> bool {
16318 self.raw.is_some()
16319 }
16320
16321 pub fn is_none(&self) -> bool {
16322 self.raw.is_none()
16323 }
16324
16325 pub fn as_ref(
16326 &self,
16327 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
16328 {
16329 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16330 }
16331
16332 pub fn into_option(
16333 self,
16334 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
16335 {
16336 if self.is_some() {
16337 Some(crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights {
16338 raw: self.raw,
16339 _phantom: ::core::marker::PhantomData,
16340 })
16341 } else {
16342 None
16343 }
16344 }
16345 }
16346
16347 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16348 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
16349 where
16350 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16351 ___D: ::fidl_next::Decoder<'de>,
16352 ___D: ::fidl_next::fuchsia::HandleDecoder,
16353 {
16354 fn decode(
16355 mut slot: ::fidl_next::Slot<'_, Self>,
16356 decoder: &mut ___D,
16357 _: (),
16358 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16359 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16360 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16361 1 => ::fidl_next::wire::Union::decode_as::<
16362 ___D,
16363 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
16364 >(raw, decoder, (1, ()))?,
16365
16366 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16367 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16368 }
16369
16370 Ok(())
16371 }
16372 }
16373
16374 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16375 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16376 self.as_ref().fmt(f)
16377 }
16378 }
16379
16380 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16381 type Natural =
16382 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights>;
16383 }
16384
16385 #[repr(transparent)]
16386 pub struct EnvelopeInliningTestUnion<'de> {
16387 pub(crate) raw: ::fidl_next::wire::Union,
16388 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16389 }
16390
16391 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
16392 type Constraint = ();
16393
16394 fn validate(
16395 _: ::fidl_next::Slot<'_, Self>,
16396 _: Self::Constraint,
16397 ) -> Result<(), ::fidl_next::ValidationError> {
16398 Ok(())
16399 }
16400 }
16401
16402 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
16403 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
16404
16405 #[inline]
16406 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16407 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16408 ::fidl_next::wire::Union::zero_padding(raw);
16409 }
16410 }
16411
16412 impl<'de> EnvelopeInliningTestUnion<'de> {
16413 pub fn is_some(&self) -> bool {
16414 self.raw.is_some()
16415 }
16416
16417 pub fn is_none(&self) -> bool {
16418 self.raw.is_none()
16419 }
16420
16421 pub fn as_ref(
16422 &self,
16423 ) -> ::core::option::Option<&crate::wire::EnvelopeInliningTestUnion<'de>> {
16424 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16425 }
16426
16427 pub fn into_option(
16428 self,
16429 ) -> ::core::option::Option<crate::wire::EnvelopeInliningTestUnion<'de>> {
16430 if self.is_some() {
16431 Some(crate::wire::EnvelopeInliningTestUnion {
16432 raw: self.raw,
16433 _phantom: ::core::marker::PhantomData,
16434 })
16435 } else {
16436 None
16437 }
16438 }
16439 }
16440
16441 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
16442 where
16443 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16444 ___D: ::fidl_next::Decoder<'de>,
16445 ___D: ::fidl_next::fuchsia::HandleDecoder,
16446 {
16447 fn decode(
16448 mut slot: ::fidl_next::Slot<'_, Self>,
16449 decoder: &mut ___D,
16450 _: (),
16451 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16452 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16453 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16454 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16455 raw,
16456 decoder,
16457 (),
16458 )?,
16459
16460 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
16461 raw,
16462 decoder,
16463 (),
16464 )?,
16465
16466 3 => ::fidl_next::wire::Union::decode_as::<
16467 ___D,
16468 ::fidl_next::wire::fuchsia::NullableHandle,
16469 >(raw, decoder, ())?,
16470
16471 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16472 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16473 }
16474
16475 Ok(())
16476 }
16477 }
16478
16479 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
16480 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16481 self.as_ref().fmt(f)
16482 }
16483 }
16484
16485 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
16486 type Natural = ::core::option::Option<crate::natural::EnvelopeInliningTestUnion>;
16487 }
16488
16489 #[repr(transparent)]
16490 pub struct SampleResourceXUnion<'de> {
16491 pub(crate) raw: ::fidl_next::wire::Union,
16492 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16493 }
16494
16495 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
16496 type Constraint = ();
16497
16498 fn validate(
16499 _: ::fidl_next::Slot<'_, Self>,
16500 _: Self::Constraint,
16501 ) -> Result<(), ::fidl_next::ValidationError> {
16502 Ok(())
16503 }
16504 }
16505
16506 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
16507 type Narrowed<'de> = SampleResourceXUnion<'de>;
16508
16509 #[inline]
16510 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16511 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16512 ::fidl_next::wire::Union::zero_padding(raw);
16513 }
16514 }
16515
16516 impl<'de> SampleResourceXUnion<'de> {
16517 pub fn is_some(&self) -> bool {
16518 self.raw.is_some()
16519 }
16520
16521 pub fn is_none(&self) -> bool {
16522 self.raw.is_none()
16523 }
16524
16525 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SampleResourceXUnion<'de>> {
16526 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16527 }
16528
16529 pub fn into_option(self) -> ::core::option::Option<crate::wire::SampleResourceXUnion<'de>> {
16530 if self.is_some() {
16531 Some(crate::wire::SampleResourceXUnion {
16532 raw: self.raw,
16533 _phantom: ::core::marker::PhantomData,
16534 })
16535 } else {
16536 None
16537 }
16538 }
16539 }
16540
16541 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
16542 where
16543 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16544 ___D: ::fidl_next::Decoder<'de>,
16545 ___D: ::fidl_next::fuchsia::HandleDecoder,
16546 {
16547 fn decode(
16548 mut slot: ::fidl_next::Slot<'_, Self>,
16549 decoder: &mut ___D,
16550 _: (),
16551 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16552 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16553 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16554 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16555 raw,
16556 decoder,
16557 (),
16558 )?,
16559
16560 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
16561 raw,
16562 decoder,
16563 (),
16564 )?,
16565
16566 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
16567 raw,
16568 decoder,
16569 (),
16570 )?,
16571
16572 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16573 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16574 }
16575
16576 Ok(())
16577 }
16578 }
16579
16580 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
16581 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16582 self.as_ref().fmt(f)
16583 }
16584 }
16585
16586 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
16587 type Natural = ::core::option::Option<crate::natural::SampleResourceXUnion>;
16588 }
16589
16590 #[repr(transparent)]
16591 pub struct SampleStrictResourceXUnion<'de> {
16592 pub(crate) raw: ::fidl_next::wire::Union,
16593 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16594 }
16595
16596 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
16597 type Constraint = ();
16598
16599 fn validate(
16600 _: ::fidl_next::Slot<'_, Self>,
16601 _: Self::Constraint,
16602 ) -> Result<(), ::fidl_next::ValidationError> {
16603 Ok(())
16604 }
16605 }
16606
16607 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
16608 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
16609
16610 #[inline]
16611 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16612 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16613 ::fidl_next::wire::Union::zero_padding(raw);
16614 }
16615 }
16616
16617 impl<'de> SampleStrictResourceXUnion<'de> {
16618 pub fn is_some(&self) -> bool {
16619 self.raw.is_some()
16620 }
16621
16622 pub fn is_none(&self) -> bool {
16623 self.raw.is_none()
16624 }
16625
16626 pub fn as_ref(
16627 &self,
16628 ) -> ::core::option::Option<&crate::wire::SampleStrictResourceXUnion<'de>> {
16629 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16630 }
16631
16632 pub fn into_option(
16633 self,
16634 ) -> ::core::option::Option<crate::wire::SampleStrictResourceXUnion<'de>> {
16635 if self.is_some() {
16636 Some(crate::wire::SampleStrictResourceXUnion {
16637 raw: self.raw,
16638 _phantom: ::core::marker::PhantomData,
16639 })
16640 } else {
16641 None
16642 }
16643 }
16644 }
16645
16646 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
16647 where
16648 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16649 ___D: ::fidl_next::Decoder<'de>,
16650 ___D: ::fidl_next::fuchsia::HandleDecoder,
16651 {
16652 fn decode(
16653 mut slot: ::fidl_next::Slot<'_, Self>,
16654 decoder: &mut ___D,
16655 _: (),
16656 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16657 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16658 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16659 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16660 raw,
16661 decoder,
16662 (),
16663 )?,
16664
16665 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
16666 raw,
16667 decoder,
16668 (),
16669 )?,
16670
16671 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
16672 raw,
16673 decoder,
16674 (),
16675 )?,
16676
16677 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16678 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16679 }
16680
16681 Ok(())
16682 }
16683 }
16684
16685 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
16686 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16687 self.as_ref().fmt(f)
16688 }
16689 }
16690
16691 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
16692 type Natural = ::core::option::Option<crate::natural::SampleStrictResourceXUnion>;
16693 }
16694
16695 #[repr(transparent)]
16696 pub struct UnionWithVector<'de> {
16697 pub(crate) raw: ::fidl_next::wire::Union,
16698 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16699 }
16700
16701 impl ::fidl_next::Constrained for UnionWithVector<'_> {
16702 type Constraint = ();
16703
16704 fn validate(
16705 _: ::fidl_next::Slot<'_, Self>,
16706 _: Self::Constraint,
16707 ) -> Result<(), ::fidl_next::ValidationError> {
16708 Ok(())
16709 }
16710 }
16711
16712 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
16713 type Narrowed<'de> = UnionWithVector<'de>;
16714
16715 #[inline]
16716 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16717 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16718 ::fidl_next::wire::Union::zero_padding(raw);
16719 }
16720 }
16721
16722 impl<'de> UnionWithVector<'de> {
16723 pub fn is_some(&self) -> bool {
16724 self.raw.is_some()
16725 }
16726
16727 pub fn is_none(&self) -> bool {
16728 self.raw.is_none()
16729 }
16730
16731 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
16732 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16733 }
16734
16735 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
16736 if self.is_some() {
16737 Some(crate::wire::UnionWithVector {
16738 raw: self.raw,
16739 _phantom: ::core::marker::PhantomData,
16740 })
16741 } else {
16742 None
16743 }
16744 }
16745 }
16746
16747 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
16748 where
16749 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16750 ___D: ::fidl_next::Decoder<'de>,
16751 ___D: ::fidl_next::fuchsia::HandleDecoder,
16752 {
16753 fn decode(
16754 mut slot: ::fidl_next::Slot<'_, Self>,
16755 decoder: &mut ___D,
16756 _: (),
16757 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16758 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16759 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16760 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
16761
16762 2 => {
16763 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
16764 raw,
16765 decoder,
16766 (4294967295, ()),
16767 )?
16768 }
16769
16770 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
16771 raw, decoder, 4294967295,
16772 )?,
16773
16774 4 => ::fidl_next::wire::Union::decode_as::<
16775 ___D,
16776 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
16777 >(raw, decoder, (4294967295, ()))?,
16778
16779 5 => ::fidl_next::wire::Union::decode_as::<
16780 ___D,
16781 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
16782 >(raw, decoder, (4294967295, ()))?,
16783
16784 6 => ::fidl_next::wire::Union::decode_as::<
16785 ___D,
16786 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
16787 >(raw, decoder, (4294967295, ()))?,
16788
16789 7 => ::fidl_next::wire::Union::decode_as::<
16790 ___D,
16791 [crate::wire::StructSize3Align1; 2],
16792 >(raw, decoder, ())?,
16793
16794 8 => ::fidl_next::wire::Union::decode_as::<
16795 ___D,
16796 [crate::wire::StructSize3Align2; 2],
16797 >(raw, decoder, ())?,
16798
16799 9 => ::fidl_next::wire::Union::decode_as::<
16800 ___D,
16801 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
16802 >(raw, decoder, (4294967295, ()))?,
16803
16804 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16805 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16806 }
16807
16808 Ok(())
16809 }
16810 }
16811
16812 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
16813 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16814 self.as_ref().fmt(f)
16815 }
16816 }
16817
16818 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
16819 type Natural = ::core::option::Option<crate::natural::UnionWithVector>;
16820 }
16821
16822 #[repr(transparent)]
16823 pub struct UnionOfEndpointsUnion<'de> {
16824 pub(crate) raw: ::fidl_next::wire::Union,
16825 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16826 }
16827
16828 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
16829 type Constraint = ();
16830
16831 fn validate(
16832 _: ::fidl_next::Slot<'_, Self>,
16833 _: Self::Constraint,
16834 ) -> Result<(), ::fidl_next::ValidationError> {
16835 Ok(())
16836 }
16837 }
16838
16839 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
16840 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
16841
16842 #[inline]
16843 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16844 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16845 ::fidl_next::wire::Union::zero_padding(raw);
16846 }
16847 }
16848
16849 impl<'de> UnionOfEndpointsUnion<'de> {
16850 pub fn is_some(&self) -> bool {
16851 self.raw.is_some()
16852 }
16853
16854 pub fn is_none(&self) -> bool {
16855 self.raw.is_none()
16856 }
16857
16858 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfEndpointsUnion<'de>> {
16859 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16860 }
16861
16862 pub fn into_option(
16863 self,
16864 ) -> ::core::option::Option<crate::wire::UnionOfEndpointsUnion<'de>> {
16865 if self.is_some() {
16866 Some(crate::wire::UnionOfEndpointsUnion {
16867 raw: self.raw,
16868 _phantom: ::core::marker::PhantomData,
16869 })
16870 } else {
16871 None
16872 }
16873 }
16874 }
16875
16876 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
16877 where
16878 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16879 ___D: ::fidl_next::Decoder<'de>,
16880 ___D: ::fidl_next::fuchsia::HandleDecoder,
16881 {
16882 fn decode(
16883 mut slot: ::fidl_next::Slot<'_, Self>,
16884 decoder: &mut ___D,
16885 _: (),
16886 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16887 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16888 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16889 1 => ::fidl_next::wire::Union::decode_as::<
16890 ___D,
16891 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
16892 >(raw, decoder, ())?,
16893
16894 2 => ::fidl_next::wire::Union::decode_as::<
16895 ___D,
16896 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
16897 >(raw, decoder, ())?,
16898
16899 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16900 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16901 }
16902
16903 Ok(())
16904 }
16905 }
16906
16907 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
16908 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16909 self.as_ref().fmt(f)
16910 }
16911 }
16912
16913 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
16914 type Natural = ::core::option::Option<crate::natural::UnionOfEndpointsUnion>;
16915 }
16916
16917 #[repr(transparent)]
16918 pub struct UnionOfHandle {
16919 pub(crate) raw: ::fidl_next::wire::Union,
16920 pub(crate) _phantom: ::core::marker::PhantomData<()>,
16921 }
16922
16923 impl ::fidl_next::Constrained for UnionOfHandle {
16924 type Constraint = ();
16925
16926 fn validate(
16927 _: ::fidl_next::Slot<'_, Self>,
16928 _: Self::Constraint,
16929 ) -> Result<(), ::fidl_next::ValidationError> {
16930 Ok(())
16931 }
16932 }
16933
16934 unsafe impl ::fidl_next::Wire for UnionOfHandle {
16935 type Narrowed<'de> = UnionOfHandle;
16936
16937 #[inline]
16938 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16939 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16940 ::fidl_next::wire::Union::zero_padding(raw);
16941 }
16942 }
16943
16944 impl UnionOfHandle {
16945 pub fn is_some(&self) -> bool {
16946 self.raw.is_some()
16947 }
16948
16949 pub fn is_none(&self) -> bool {
16950 self.raw.is_none()
16951 }
16952
16953 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfHandle> {
16954 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16955 }
16956
16957 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionOfHandle> {
16958 if self.is_some() {
16959 Some(crate::wire::UnionOfHandle {
16960 raw: self.raw,
16961 _phantom: ::core::marker::PhantomData,
16962 })
16963 } else {
16964 None
16965 }
16966 }
16967 }
16968
16969 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
16970 where
16971 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16972 ___D: ::fidl_next::fuchsia::HandleDecoder,
16973 {
16974 fn decode(
16975 mut slot: ::fidl_next::Slot<'_, Self>,
16976 decoder: &mut ___D,
16977 _: (),
16978 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16979 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16980 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16981 1 => ::fidl_next::wire::Union::decode_as_static::<
16982 ___D,
16983 ::fidl_next::wire::fuchsia::NullableHandle,
16984 >(raw, decoder, ())?,
16985
16986 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16987 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
16988 }
16989
16990 Ok(())
16991 }
16992 }
16993
16994 impl ::core::fmt::Debug for UnionOfHandle {
16995 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16996 self.as_ref().fmt(f)
16997 }
16998 }
16999
17000 impl ::fidl_next::IntoNatural for UnionOfHandle {
17001 type Natural = ::core::option::Option<crate::natural::UnionOfHandle>;
17002 }
17003
17004 #[repr(transparent)]
17005 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17006 pub(crate) raw: ::fidl_next::wire::Union,
17007 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17008 }
17009
17010 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
17011 type Constraint = ();
17012
17013 fn validate(
17014 _: ::fidl_next::Slot<'_, Self>,
17015 _: Self::Constraint,
17016 ) -> Result<(), ::fidl_next::ValidationError> {
17017 Ok(())
17018 }
17019 }
17020
17021 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
17022 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
17023
17024 #[inline]
17025 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17026 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17027 ::fidl_next::wire::Union::zero_padding(raw);
17028 }
17029 }
17030
17031 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17032 pub fn is_some(&self) -> bool {
17033 self.raw.is_some()
17034 }
17035
17036 pub fn is_none(&self) -> bool {
17037 self.raw.is_none()
17038 }
17039
17040 pub fn as_ref(
17041 &self,
17042 ) -> ::core::option::Option<&crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
17043 {
17044 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17045 }
17046
17047 pub fn into_option(
17048 self,
17049 ) -> ::core::option::Option<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
17050 {
17051 if self.is_some() {
17052 Some(crate::wire::VectorOfArrayOfEventInUnionWithReducedRights {
17053 raw: self.raw,
17054 _phantom: ::core::marker::PhantomData,
17055 })
17056 } else {
17057 None
17058 }
17059 }
17060 }
17061
17062 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
17063 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
17064 where
17065 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17066 ___D: ::fidl_next::Decoder<'de>,
17067 ___D: ::fidl_next::fuchsia::HandleDecoder,
17068 {
17069 fn decode(
17070 mut slot: ::fidl_next::Slot<'_, Self>,
17071 decoder: &mut ___D,
17072 _: (),
17073 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17074 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17075 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17076 1 => ::fidl_next::wire::Union::decode_as::<
17077 ___D,
17078 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
17079 >(raw, decoder, (1, ()))?,
17080
17081 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17082 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17083 }
17084
17085 Ok(())
17086 }
17087 }
17088
17089 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17090 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17091 self.as_ref().fmt(f)
17092 }
17093 }
17094
17095 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17096 type Natural =
17097 ::core::option::Option<crate::natural::VectorOfArrayOfEventInUnionWithReducedRights>;
17098 }
17099}
17100
17101pub mod generic {
17102
17103 pub use fidl_next_common_test_conformance::generic::*;
17104
17105 pub struct AlternatingHandlesAndFailures<T0, T1, T2, T3, T4> {
17107 pub h1: T0,
17108
17109 pub failure_trigger1: T1,
17110
17111 pub h2: T2,
17112
17113 pub failure_trigger2: T3,
17114
17115 pub h3: T4,
17116 }
17117
17118 unsafe impl<___E, T0, T1, T2, T3, T4>
17119 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
17120 for AlternatingHandlesAndFailures<T0, T1, T2, T3, T4>
17121 where
17122 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17123 ___E: ::fidl_next::Encoder,
17124 ___E: ::fidl_next::fuchsia::HandleEncoder,
17125 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17126 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17127 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17128 T3: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17129 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17130 {
17131 #[inline]
17132 fn encode(
17133 self,
17134 encoder_: &mut ___E,
17135 out_: &mut ::core::mem::MaybeUninit<
17136 crate::wire::AlternatingHandlesAndFailures<'static>,
17137 >,
17138 _: (),
17139 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17140 ::fidl_next::munge! {
17141 let crate::wire::AlternatingHandlesAndFailures {
17142 h1,
17143 failure_trigger1,
17144 h2,
17145 failure_trigger2,
17146 h3,
17147
17148 } = out_;
17149 }
17150
17151 ::fidl_next::Encode::encode(self.h1, encoder_, h1, ())?;
17152
17153 ::fidl_next::Encode::encode(self.failure_trigger1, encoder_, failure_trigger1, 1)?;
17154
17155 ::fidl_next::Encode::encode(self.h2, encoder_, h2, ())?;
17156
17157 ::fidl_next::Encode::encode(self.failure_trigger2, encoder_, failure_trigger2, 1)?;
17158
17159 ::fidl_next::Encode::encode(self.h3, encoder_, h3, ())?;
17160
17161 Ok(())
17162 }
17163 }
17164
17165 pub struct ArrayOfArrayOfNonnullableHandles<T0> {
17167 pub handles: T0,
17168 }
17169
17170 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
17171 for ArrayOfArrayOfNonnullableHandles<T0>
17172 where
17173 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17174 ___E: ::fidl_next::fuchsia::HandleEncoder,
17175 T0: ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>,
17176 {
17177 #[inline]
17178 fn encode(
17179 self,
17180 encoder_: &mut ___E,
17181 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
17182 _: (),
17183 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17184 ::fidl_next::munge! {
17185 let crate::wire::ArrayOfArrayOfNonnullableHandles {
17186 handles,
17187
17188 } = out_;
17189 }
17190
17191 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17192
17193 Ok(())
17194 }
17195 }
17196
17197 pub struct ArrayOfHandles<T0> {
17199 pub a: T0,
17200 }
17201
17202 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E> for ArrayOfHandles<T0>
17203 where
17204 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17205 ___E: ::fidl_next::fuchsia::HandleEncoder,
17206 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 3], ___E>,
17207 {
17208 #[inline]
17209 fn encode(
17210 self,
17211 encoder_: &mut ___E,
17212 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
17213 _: (),
17214 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17215 ::fidl_next::munge! {
17216 let crate::wire::ArrayOfHandles {
17217 a,
17218
17219 } = out_;
17220 }
17221
17222 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
17223
17224 Ok(())
17225 }
17226 }
17227
17228 pub struct ArrayOfNonnullableHandles<T0> {
17230 pub handles: T0,
17231 }
17232
17233 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
17234 for ArrayOfNonnullableHandles<T0>
17235 where
17236 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17237 ___E: ::fidl_next::fuchsia::HandleEncoder,
17238 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
17239 {
17240 #[inline]
17241 fn encode(
17242 self,
17243 encoder_: &mut ___E,
17244 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
17245 _: (),
17246 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17247 ::fidl_next::munge! {
17248 let crate::wire::ArrayOfNonnullableHandles {
17249 handles,
17250
17251 } = out_;
17252 }
17253
17254 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17255
17256 Ok(())
17257 }
17258 }
17259
17260 pub struct ArrayOfNullableHandles<T0> {
17262 pub handles: T0,
17263 }
17264
17265 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
17266 for ArrayOfNullableHandles<T0>
17267 where
17268 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17269 ___E: ::fidl_next::fuchsia::HandleEncoder,
17270 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>,
17271 {
17272 #[inline]
17273 fn encode(
17274 self,
17275 encoder_: &mut ___E,
17276 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
17277 _: (),
17278 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17279 ::fidl_next::munge! {
17280 let crate::wire::ArrayOfNullableHandles {
17281 handles,
17282
17283 } = out_;
17284 }
17285
17286 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17287
17288 Ok(())
17289 }
17290 }
17291
17292 pub struct ArrayOfOptionalHandles<T0> {
17294 pub a: T0,
17295 }
17296
17297 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
17298 for ArrayOfOptionalHandles<T0>
17299 where
17300 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17301 ___E: ::fidl_next::fuchsia::HandleEncoder,
17302 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>,
17303 {
17304 #[inline]
17305 fn encode(
17306 self,
17307 encoder_: &mut ___E,
17308 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
17309 _: (),
17310 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17311 ::fidl_next::munge! {
17312 let crate::wire::ArrayOfOptionalHandles {
17313 a,
17314
17315 } = out_;
17316 }
17317
17318 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
17319
17320 Ok(())
17321 }
17322 }
17323
17324 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<T0> {
17326 pub h: T0,
17327 }
17328
17329 unsafe impl<___E, T0>
17330 ::fidl_next::Encode<
17331 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
17332 ___E,
17333 > for ArrayOfVectorOfEventInStructWithDefaultRights<T0>
17334 where
17335 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17336 ___E: ::fidl_next::Encoder,
17337 ___E: ::fidl_next::fuchsia::HandleEncoder,
17338 T0: ::fidl_next::Encode<
17339 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
17340 ___E,
17341 >,
17342 {
17343 #[inline]
17344 fn encode(
17345 self,
17346 encoder_: &mut ___E,
17347 out_: &mut ::core::mem::MaybeUninit<
17348 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
17349 >,
17350 _: (),
17351 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17352 ::fidl_next::munge! {
17353 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
17354 h,
17355
17356 } = out_;
17357 }
17358
17359 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
17360
17361 Ok(())
17362 }
17363 }
17364
17365 pub struct ArrayOfVectorOfEventInStructWithReducedRights<T0> {
17367 pub h: T0,
17368 }
17369
17370 unsafe impl<___E, T0>
17371 ::fidl_next::Encode<
17372 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
17373 ___E,
17374 > for ArrayOfVectorOfEventInStructWithReducedRights<T0>
17375 where
17376 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17377 ___E: ::fidl_next::Encoder,
17378 ___E: ::fidl_next::fuchsia::HandleEncoder,
17379 T0: ::fidl_next::Encode<
17380 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
17381 ___E,
17382 >,
17383 {
17384 #[inline]
17385 fn encode(
17386 self,
17387 encoder_: &mut ___E,
17388 out_: &mut ::core::mem::MaybeUninit<
17389 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
17390 >,
17391 _: (),
17392 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17393 ::fidl_next::munge! {
17394 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
17395 h,
17396
17397 } = out_;
17398 }
17399
17400 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
17401
17402 Ok(())
17403 }
17404 }
17405
17406 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0> {
17408 pub t: T0,
17409 }
17410
17411 unsafe impl<___E, T0>
17412 ::fidl_next::Encode<
17413 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
17414 ___E,
17415 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0>
17416 where
17417 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17418 ___E: ::fidl_next::Encoder,
17419 ___E: ::fidl_next::fuchsia::HandleEncoder,
17420 T0: ::fidl_next::Encode<
17421 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
17422 ___E,
17423 >,
17424 {
17425 #[inline]
17426 fn encode(
17427 self,
17428 encoder_: &mut ___E,
17429 out_: &mut ::core::mem::MaybeUninit<
17430 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
17431 >,
17432 _: (),
17433 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17434 ::fidl_next::munge! {
17435 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
17436 t,
17437
17438 } = out_;
17439 }
17440
17441 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
17442
17443 Ok(())
17444 }
17445 }
17446
17447 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0> {
17449 pub t: T0,
17450 }
17451
17452 unsafe impl<___E, T0>
17453 ::fidl_next::Encode<
17454 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
17455 ___E,
17456 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0>
17457 where
17458 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17459 ___E: ::fidl_next::Encoder,
17460 ___E: ::fidl_next::fuchsia::HandleEncoder,
17461 T0: ::fidl_next::Encode<
17462 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
17463 ___E,
17464 >,
17465 {
17466 #[inline]
17467 fn encode(
17468 self,
17469 encoder_: &mut ___E,
17470 out_: &mut ::core::mem::MaybeUninit<
17471 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
17472 >,
17473 _: (),
17474 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17475 ::fidl_next::munge! {
17476 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
17477 t,
17478
17479 } = out_;
17480 }
17481
17482 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
17483
17484 Ok(())
17485 }
17486 }
17487
17488 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0> {
17490 pub u: T0,
17491 }
17492
17493 unsafe impl<___E, T0>
17494 ::fidl_next::Encode<
17495 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
17496 ___E,
17497 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0>
17498 where
17499 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17500 ___E: ::fidl_next::Encoder,
17501 ___E: ::fidl_next::fuchsia::HandleEncoder,
17502 T0: ::fidl_next::Encode<
17503 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
17504 ___E,
17505 >,
17506 {
17507 #[inline]
17508 fn encode(
17509 self,
17510 encoder_: &mut ___E,
17511 out_: &mut ::core::mem::MaybeUninit<
17512 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
17513 >,
17514 _: (),
17515 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17516 ::fidl_next::munge! {
17517 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
17518 u,
17519
17520 } = out_;
17521 }
17522
17523 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17524
17525 Ok(())
17526 }
17527 }
17528
17529 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0> {
17531 pub u: T0,
17532 }
17533
17534 unsafe impl<___E, T0>
17535 ::fidl_next::Encode<
17536 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
17537 ___E,
17538 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0>
17539 where
17540 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17541 ___E: ::fidl_next::Encoder,
17542 ___E: ::fidl_next::fuchsia::HandleEncoder,
17543 T0: ::fidl_next::Encode<
17544 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
17545 ___E,
17546 >,
17547 {
17548 #[inline]
17549 fn encode(
17550 self,
17551 encoder_: &mut ___E,
17552 out_: &mut ::core::mem::MaybeUninit<
17553 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
17554 >,
17555 _: (),
17556 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17557 ::fidl_next::munge! {
17558 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
17559 u,
17560
17561 } = out_;
17562 }
17563
17564 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17565
17566 Ok(())
17567 }
17568 }
17569
17570 pub struct Bounded32NonnullableVectorOfHandles<T0> {
17572 pub vh0: T0,
17573 }
17574
17575 unsafe impl<___E, T0>
17576 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
17577 for Bounded32NonnullableVectorOfHandles<T0>
17578 where
17579 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17580 ___E: ::fidl_next::Encoder,
17581 ___E: ::fidl_next::fuchsia::HandleEncoder,
17582 T0: ::fidl_next::Encode<
17583 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
17584 ___E,
17585 >,
17586 {
17587 #[inline]
17588 fn encode(
17589 self,
17590 encoder_: &mut ___E,
17591 out_: &mut ::core::mem::MaybeUninit<
17592 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
17593 >,
17594 _: (),
17595 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17596 ::fidl_next::munge! {
17597 let crate::wire::Bounded32NonnullableVectorOfHandles {
17598 vh0,
17599
17600 } = out_;
17601 }
17602
17603 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
17604
17605 Ok(())
17606 }
17607 }
17608
17609 pub struct Bounded32NullableVectorOfHandles<T0> {
17611 pub vh0: T0,
17612 }
17613
17614 unsafe impl<___E, T0>
17615 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
17616 for Bounded32NullableVectorOfHandles<T0>
17617 where
17618 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17619 ___E: ::fidl_next::Encoder,
17620 ___E: ::fidl_next::fuchsia::HandleEncoder,
17621 T0: ::fidl_next::Encode<
17622 ::fidl_next::wire::OptionalVector<
17623 'static,
17624 ::fidl_next::wire::fuchsia::NullableHandle,
17625 >,
17626 ___E,
17627 >,
17628 {
17629 #[inline]
17630 fn encode(
17631 self,
17632 encoder_: &mut ___E,
17633 out_: &mut ::core::mem::MaybeUninit<
17634 crate::wire::Bounded32NullableVectorOfHandles<'static>,
17635 >,
17636 _: (),
17637 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17638 ::fidl_next::munge! {
17639 let crate::wire::Bounded32NullableVectorOfHandles {
17640 vh0,
17641
17642 } = out_;
17643 }
17644
17645 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
17646
17647 Ok(())
17648 }
17649 }
17650
17651 pub struct BoxOfSingleHandle<T0> {
17653 pub b: T0,
17654 }
17655
17656 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
17657 for BoxOfSingleHandle<T0>
17658 where
17659 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17660 ___E: ::fidl_next::Encoder,
17661 ___E: ::fidl_next::fuchsia::HandleEncoder,
17662 T0: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>,
17663 {
17664 #[inline]
17665 fn encode(
17666 self,
17667 encoder_: &mut ___E,
17668 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
17669 _: (),
17670 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17671 ::fidl_next::munge! {
17672 let crate::wire::BoxOfSingleHandle {
17673 b,
17674
17675 } = out_;
17676 }
17677
17678 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
17679
17680 Ok(())
17681 }
17682 }
17683
17684 pub struct BoxOfSingleOptionalHandle<T0> {
17686 pub b: T0,
17687 }
17688
17689 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
17690 for BoxOfSingleOptionalHandle<T0>
17691 where
17692 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17693 ___E: ::fidl_next::Encoder,
17694 ___E: ::fidl_next::fuchsia::HandleEncoder,
17695 T0: ::fidl_next::Encode<
17696 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
17697 ___E,
17698 >,
17699 {
17700 #[inline]
17701 fn encode(
17702 self,
17703 encoder_: &mut ___E,
17704 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
17705 _: (),
17706 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17707 ::fidl_next::munge! {
17708 let crate::wire::BoxOfSingleOptionalHandle {
17709 b,
17710
17711 } = out_;
17712 }
17713
17714 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
17715
17716 Ok(())
17717 }
17718 }
17719
17720 pub struct LaunchInfo<T0, T1, T2, T3, T4, T5, T6> {
17722 pub url: T0,
17723
17724 pub arguments: T1,
17725
17726 pub out: T2,
17727
17728 pub err: T3,
17729
17730 pub directory_request: T4,
17731
17732 pub flat_namespace: T5,
17733
17734 pub additional_services: T6,
17735 }
17736
17737 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
17738 ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>
17739 for LaunchInfo<T0, T1, T2, T3, T4, T5, T6>
17740 where
17741 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17742 ___E: ::fidl_next::Encoder,
17743 ___E: ::fidl_next::fuchsia::HandleEncoder,
17744 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17745 T1: ::fidl_next::Encode<
17746 ::fidl_next::wire::OptionalVector<'static, ::fidl_next::wire::String<'static>>,
17747 ___E,
17748 >,
17749 T2: ::fidl_next::Encode<
17750 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17751 ___E,
17752 >,
17753 T3: ::fidl_next::Encode<
17754 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17755 ___E,
17756 >,
17757 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
17758 T5: ::fidl_next::Encode<
17759 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17760 ___E,
17761 >,
17762 T6: ::fidl_next::Encode<
17763 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17764 ___E,
17765 >,
17766 {
17767 #[inline]
17768 fn encode(
17769 self,
17770 encoder_: &mut ___E,
17771 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
17772 _: (),
17773 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17774 ::fidl_next::munge! {
17775 let crate::wire::LaunchInfo {
17776 url,
17777 arguments,
17778 out,
17779 err,
17780 directory_request,
17781 flat_namespace,
17782 additional_services,
17783
17784 } = out_;
17785 }
17786
17787 ::fidl_next::Encode::encode(self.url, encoder_, url, 200)?;
17788
17789 ::fidl_next::Encode::encode(
17790 self.arguments,
17791 encoder_,
17792 arguments,
17793 (4294967295, 4294967295),
17794 )?;
17795
17796 ::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
17797
17798 ::fidl_next::Encode::encode(self.err, encoder_, err, ())?;
17799
17800 ::fidl_next::Encode::encode(self.directory_request, encoder_, directory_request, ())?;
17801
17802 ::fidl_next::Encode::encode(self.flat_namespace, encoder_, flat_namespace, ())?;
17803
17804 ::fidl_next::Encode::encode(
17805 self.additional_services,
17806 encoder_,
17807 additional_services,
17808 (),
17809 )?;
17810
17811 Ok(())
17812 }
17813 }
17814
17815 pub struct CreateComponentRequest<T0, T1> {
17817 pub launch_info: T0,
17818
17819 pub controller: T1,
17820 }
17821
17822 unsafe impl<___E, T0, T1>
17823 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
17824 for CreateComponentRequest<T0, T1>
17825 where
17826 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17827 ___E: ::fidl_next::Encoder,
17828 ___E: ::fidl_next::fuchsia::HandleEncoder,
17829 T0: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
17830 T1: ::fidl_next::Encode<
17831 ::fidl_next::ServerEnd<
17832 crate::ComponentController,
17833 ::fidl_next::wire::fuchsia::OptionalChannel,
17834 >,
17835 ___E,
17836 >,
17837 {
17838 #[inline]
17839 fn encode(
17840 self,
17841 encoder_: &mut ___E,
17842 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
17843 _: (),
17844 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17845 ::fidl_next::munge! {
17846 let crate::wire::CreateComponentRequest {
17847 launch_info,
17848 controller,
17849
17850 } = out_;
17851 }
17852
17853 ::fidl_next::Encode::encode(self.launch_info, encoder_, launch_info, ())?;
17854
17855 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
17856
17857 Ok(())
17858 }
17859 }
17860
17861 pub struct EmptyResourceTableStruct<T0> {
17863 pub table: T0,
17864 }
17865
17866 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
17867 for EmptyResourceTableStruct<T0>
17868 where
17869 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17870 ___E: ::fidl_next::Encoder,
17871 ___E: ::fidl_next::fuchsia::HandleEncoder,
17872 T0: ::fidl_next::Encode<crate::wire::EmptyResourceTable<'static>, ___E>,
17873 {
17874 #[inline]
17875 fn encode(
17876 self,
17877 encoder_: &mut ___E,
17878 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
17879 _: (),
17880 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17881 ::fidl_next::munge! {
17882 let crate::wire::EmptyResourceTableStruct {
17883 table,
17884
17885 } = out_;
17886 }
17887
17888 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
17889
17890 Ok(())
17891 }
17892 }
17893
17894 pub struct EnvelopeInliningTestUnionStruct<T0> {
17896 pub u: T0,
17897 }
17898
17899 unsafe impl<___E, T0>
17900 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
17901 for EnvelopeInliningTestUnionStruct<T0>
17902 where
17903 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17904 ___E: ::fidl_next::Encoder,
17905 ___E: ::fidl_next::fuchsia::HandleEncoder,
17906 T0: ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
17907 {
17908 #[inline]
17909 fn encode(
17910 self,
17911 encoder_: &mut ___E,
17912 out_: &mut ::core::mem::MaybeUninit<
17913 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
17914 >,
17915 _: (),
17916 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17917 ::fidl_next::munge! {
17918 let crate::wire::EnvelopeInliningTestUnionStruct {
17919 u,
17920
17921 } = out_;
17922 }
17923
17924 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17925
17926 Ok(())
17927 }
17928 }
17929
17930 pub struct EventWithDefaultRights<T0> {
17932 pub h: T0,
17933 }
17934
17935 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
17936 for EventWithDefaultRights<T0>
17937 where
17938 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17939 ___E: ::fidl_next::fuchsia::HandleEncoder,
17940 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
17941 {
17942 #[inline]
17943 fn encode(
17944 self,
17945 encoder_: &mut ___E,
17946 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
17947 _: (),
17948 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17949 ::fidl_next::munge! {
17950 let crate::wire::EventWithDefaultRights {
17951 h,
17952
17953 } = out_;
17954 }
17955
17956 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
17957
17958 Ok(())
17959 }
17960 }
17961
17962 pub struct EventWithReducedRights<T0> {
17964 pub h: T0,
17965 }
17966
17967 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
17968 for EventWithReducedRights<T0>
17969 where
17970 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17971 ___E: ::fidl_next::fuchsia::HandleEncoder,
17972 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
17973 {
17974 #[inline]
17975 fn encode(
17976 self,
17977 encoder_: &mut ___E,
17978 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
17979 _: (),
17980 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17981 ::fidl_next::munge! {
17982 let crate::wire::EventWithReducedRights {
17983 h,
17984
17985 } = out_;
17986 }
17987
17988 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
17989
17990 Ok(())
17991 }
17992 }
17993
17994 pub struct FidlvizDemo<
17996 T0,
17997 T1,
17998 T2,
17999 T3,
18000 T4,
18001 T5,
18002 T6,
18003 T7,
18004 T8,
18005 T9,
18006 T10,
18007 T11,
18008 T12,
18009 T13,
18010 T14,
18011 T15,
18012 T16,
18013 T17,
18014 T18,
18015 T19,
18016 T20,
18017 T21,
18018 T22,
18019 T23,
18020 T24,
18021 T25,
18022 T26,
18023 T27,
18024 T28,
18025 T29,
18026 T30,
18027 > {
18028 pub f1: T0,
18029
18030 pub f2: T1,
18031
18032 pub f3: T2,
18033
18034 pub f4: T3,
18035
18036 pub f5: T4,
18037
18038 pub f6: T5,
18039
18040 pub f7: T6,
18041
18042 pub f8: T7,
18043
18044 pub f9: T8,
18045
18046 pub f10: T9,
18047
18048 pub f11: T10,
18049
18050 pub f12: T11,
18051
18052 pub f13: T12,
18053
18054 pub f14: T13,
18055
18056 pub f15: T14,
18057
18058 pub f16: T15,
18059
18060 pub f17: T16,
18061
18062 pub f18: T17,
18063
18064 pub f19: T18,
18065
18066 pub f20: T19,
18067
18068 pub f21: T20,
18069
18070 pub f22: T21,
18071
18072 pub f23: T22,
18073
18074 pub f24: T23,
18075
18076 pub f25: T24,
18077
18078 pub f26: T25,
18079
18080 pub f27: T26,
18081
18082 pub f28: T27,
18083
18084 pub f29: T28,
18085
18086 pub f30: T29,
18087
18088 pub f31: T30,
18089 }
18090
18091 unsafe impl<
18092 ___E,
18093 T0,
18094 T1,
18095 T2,
18096 T3,
18097 T4,
18098 T5,
18099 T6,
18100 T7,
18101 T8,
18102 T9,
18103 T10,
18104 T11,
18105 T12,
18106 T13,
18107 T14,
18108 T15,
18109 T16,
18110 T17,
18111 T18,
18112 T19,
18113 T20,
18114 T21,
18115 T22,
18116 T23,
18117 T24,
18118 T25,
18119 T26,
18120 T27,
18121 T28,
18122 T29,
18123 T30,
18124 > ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>
18125 for FidlvizDemo<
18126 T0,
18127 T1,
18128 T2,
18129 T3,
18130 T4,
18131 T5,
18132 T6,
18133 T7,
18134 T8,
18135 T9,
18136 T10,
18137 T11,
18138 T12,
18139 T13,
18140 T14,
18141 T15,
18142 T16,
18143 T17,
18144 T18,
18145 T19,
18146 T20,
18147 T21,
18148 T22,
18149 T23,
18150 T24,
18151 T25,
18152 T26,
18153 T27,
18154 T28,
18155 T29,
18156 T30,
18157 >
18158 where
18159 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18160 ___E: ::fidl_next::Encoder,
18161 ___E: ::fidl_next::fuchsia::HandleEncoder,
18162 T0: ::fidl_next::Encode<u8, ___E>,
18163 T1: ::fidl_next::Encode<i8, ___E>,
18164 T2: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
18165 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18166 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18167 T5: ::fidl_next::Encode<u8, ___E>,
18168 T6: ::fidl_next::Encode<u8, ___E>,
18169 T7: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
18170 T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
18171 T9: ::fidl_next::Encode<::fidl_next::wire::Float64, ___E>,
18172 T10: ::fidl_next::Encode<bool, ___E>,
18173 T11: ::fidl_next::Encode<bool, ___E>,
18174 T12: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18175 T13: ::fidl_next::Encode<::fidl_next::wire::OptionalString<'static>, ___E>,
18176 T14: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18177 T15: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18178 T16: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18179 T17: ::fidl_next::Encode<[u8; 3], ___E>,
18180 T18: ::fidl_next::Encode<
18181 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Float64>,
18182 ___E,
18183 >,
18184 T19: ::fidl_next::Encode<::fidl_next::wire::OptionalVector<'static, u8>, ___E>,
18185 T20: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
18186 T21: ::fidl_next::Encode<crate::wire::FidlvizBits, ___E>,
18187 T22: ::fidl_next::Encode<crate::wire::FidlvizEnum, ___E>,
18188 T23: ::fidl_next::Encode<crate::wire::FidlvizStruct1, ___E>,
18189 T24: ::fidl_next::Encode<crate::wire::FidlvizStruct2, ___E>,
18190 T25:
18191 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct1>, ___E>,
18192 T26:
18193 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct2>, ___E>,
18194 T27: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
18195 T28: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
18196 T29: ::fidl_next::Encode<crate::wire_optional::FidlvizUnion<'static>, ___E>,
18197 T30: ::fidl_next::Encode<crate::wire::FidlvizUnion<'static>, ___E>,
18198 {
18199 #[inline]
18200 fn encode(
18201 self,
18202 encoder_: &mut ___E,
18203 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
18204 _: (),
18205 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18206 ::fidl_next::munge! {
18207 let crate::wire::FidlvizDemo {
18208 f1,
18209 f2,
18210 f3,
18211 f4,
18212 f5,
18213 f6,
18214 f7,
18215 f8,
18216 f9,
18217 f10,
18218 f11,
18219 f12,
18220 f13,
18221 f14,
18222 f15,
18223 f16,
18224 f17,
18225 f18,
18226 f19,
18227 f20,
18228 f21,
18229 f22,
18230 f23,
18231 f24,
18232 f25,
18233 f26,
18234 f27,
18235 f28,
18236 f29,
18237 f30,
18238 f31,
18239
18240 } = out_;
18241 }
18242
18243 ::fidl_next::Encode::encode(self.f1, encoder_, f1, ())?;
18244
18245 ::fidl_next::Encode::encode(self.f2, encoder_, f2, ())?;
18246
18247 ::fidl_next::Encode::encode(self.f3, encoder_, f3, ())?;
18248
18249 ::fidl_next::Encode::encode(self.f4, encoder_, f4, ())?;
18250
18251 ::fidl_next::Encode::encode(self.f5, encoder_, f5, ())?;
18252
18253 ::fidl_next::Encode::encode(self.f6, encoder_, f6, ())?;
18254
18255 ::fidl_next::Encode::encode(self.f7, encoder_, f7, ())?;
18256
18257 ::fidl_next::Encode::encode(self.f8, encoder_, f8, ())?;
18258
18259 ::fidl_next::Encode::encode(self.f9, encoder_, f9, ())?;
18260
18261 ::fidl_next::Encode::encode(self.f10, encoder_, f10, ())?;
18262
18263 ::fidl_next::Encode::encode(self.f11, encoder_, f11, ())?;
18264
18265 ::fidl_next::Encode::encode(self.f12, encoder_, f12, ())?;
18266
18267 ::fidl_next::Encode::encode(self.f13, encoder_, f13, 4294967295)?;
18268
18269 ::fidl_next::Encode::encode(self.f14, encoder_, f14, 4294967295)?;
18270
18271 ::fidl_next::Encode::encode(self.f15, encoder_, f15, 4294967295)?;
18272
18273 ::fidl_next::Encode::encode(self.f16, encoder_, f16, ())?;
18274
18275 ::fidl_next::Encode::encode(self.f17, encoder_, f17, ())?;
18276
18277 ::fidl_next::Encode::encode(self.f18, encoder_, f18, ())?;
18278
18279 ::fidl_next::Encode::encode(self.f19, encoder_, f19, (4294967295, ()))?;
18280
18281 ::fidl_next::Encode::encode(self.f20, encoder_, f20, (4294967295, ()))?;
18282
18283 ::fidl_next::Encode::encode(self.f21, encoder_, f21, (4294967295, ()))?;
18284
18285 ::fidl_next::Encode::encode(self.f22, encoder_, f22, ())?;
18286
18287 ::fidl_next::Encode::encode(self.f23, encoder_, f23, ())?;
18288
18289 ::fidl_next::Encode::encode(self.f24, encoder_, f24, ())?;
18290
18291 ::fidl_next::Encode::encode(self.f25, encoder_, f25, ())?;
18292
18293 ::fidl_next::Encode::encode(self.f26, encoder_, f26, ())?;
18294
18295 ::fidl_next::Encode::encode(self.f27, encoder_, f27, ())?;
18296
18297 ::fidl_next::Encode::encode(self.f28, encoder_, f28, ())?;
18298
18299 ::fidl_next::Encode::encode(self.f29, encoder_, f29, ())?;
18300
18301 ::fidl_next::Encode::encode(self.f30, encoder_, f30, ())?;
18302
18303 ::fidl_next::Encode::encode(self.f31, encoder_, f31, ())?;
18304
18305 Ok(())
18306 }
18307 }
18308
18309 pub struct GoldenHandleBasicRightsStruct<T0> {
18311 pub v: T0,
18312 }
18313
18314 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
18315 for GoldenHandleBasicRightsStruct<T0>
18316 where
18317 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18318 ___E: ::fidl_next::fuchsia::HandleEncoder,
18319 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18320 {
18321 #[inline]
18322 fn encode(
18323 self,
18324 encoder_: &mut ___E,
18325 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
18326 _: (),
18327 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18328 ::fidl_next::munge! {
18329 let crate::wire::GoldenHandleBasicRightsStruct {
18330 v,
18331
18332 } = out_;
18333 }
18334
18335 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
18336
18337 Ok(())
18338 }
18339 }
18340
18341 pub struct GoldenNullableHandleStruct<T0> {
18343 pub v: T0,
18344 }
18345
18346 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
18347 for GoldenNullableHandleStruct<T0>
18348 where
18349 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18350 ___E: ::fidl_next::fuchsia::HandleEncoder,
18351 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18352 {
18353 #[inline]
18354 fn encode(
18355 self,
18356 encoder_: &mut ___E,
18357 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
18358 _: (),
18359 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18360 ::fidl_next::munge! {
18361 let crate::wire::GoldenNullableHandleStruct {
18362 v,
18363
18364 } = out_;
18365 }
18366
18367 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
18368
18369 Ok(())
18370 }
18371 }
18372
18373 pub struct MultipleBoundedNonnullableVectorsOfHandles<T0, T1> {
18375 pub vh0: T0,
18376
18377 pub vh1: T1,
18378 }
18379
18380 unsafe impl<___E, T0, T1>
18381 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
18382 for MultipleBoundedNonnullableVectorsOfHandles<T0, T1>
18383 where
18384 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18385 ___E: ::fidl_next::Encoder,
18386 ___E: ::fidl_next::fuchsia::HandleEncoder,
18387 T0: ::fidl_next::Encode<
18388 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18389 ___E,
18390 >,
18391 T1: ::fidl_next::Encode<
18392 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18393 ___E,
18394 >,
18395 {
18396 #[inline]
18397 fn encode(
18398 self,
18399 encoder_: &mut ___E,
18400 out_: &mut ::core::mem::MaybeUninit<
18401 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
18402 >,
18403 _: (),
18404 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18405 ::fidl_next::munge! {
18406 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
18407 vh0,
18408 vh1,
18409
18410 } = out_;
18411 }
18412
18413 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
18414
18415 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
18416
18417 Ok(())
18418 }
18419 }
18420
18421 pub struct MultipleBoundedNullableVectorsOfHandles<T0, T1> {
18423 pub vh0: T0,
18424
18425 pub vh1: T1,
18426 }
18427
18428 unsafe impl<___E, T0, T1>
18429 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
18430 for MultipleBoundedNullableVectorsOfHandles<T0, T1>
18431 where
18432 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18433 ___E: ::fidl_next::Encoder,
18434 ___E: ::fidl_next::fuchsia::HandleEncoder,
18435 T0: ::fidl_next::Encode<
18436 ::fidl_next::wire::OptionalVector<
18437 'static,
18438 ::fidl_next::wire::fuchsia::NullableHandle,
18439 >,
18440 ___E,
18441 >,
18442 T1: ::fidl_next::Encode<
18443 ::fidl_next::wire::OptionalVector<
18444 'static,
18445 ::fidl_next::wire::fuchsia::NullableHandle,
18446 >,
18447 ___E,
18448 >,
18449 {
18450 #[inline]
18451 fn encode(
18452 self,
18453 encoder_: &mut ___E,
18454 out_: &mut ::core::mem::MaybeUninit<
18455 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
18456 >,
18457 _: (),
18458 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18459 ::fidl_next::munge! {
18460 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
18461 vh0,
18462 vh1,
18463
18464 } = out_;
18465 }
18466
18467 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
18468
18469 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
18470
18471 Ok(())
18472 }
18473 }
18474
18475 pub struct MultipleHandleSubtypes<T0, T1, T2> {
18477 pub untyped: T0,
18478
18479 pub event: T1,
18480
18481 pub channel: T2,
18482 }
18483
18484 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
18485 for MultipleHandleSubtypes<T0, T1, T2>
18486 where
18487 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18488 ___E: ::fidl_next::fuchsia::HandleEncoder,
18489 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18490 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18491 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
18492 {
18493 #[inline]
18494 fn encode(
18495 self,
18496 encoder_: &mut ___E,
18497 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
18498 _: (),
18499 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18500 ::fidl_next::munge! {
18501 let crate::wire::MultipleHandleSubtypes {
18502 untyped,
18503 event,
18504 channel,
18505
18506 } = out_;
18507 }
18508
18509 ::fidl_next::Encode::encode(self.untyped, encoder_, untyped, ())?;
18510
18511 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
18512
18513 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
18514
18515 Ok(())
18516 }
18517 }
18518
18519 pub struct MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5> {
18521 pub data0: T0,
18522
18523 pub handle0: T1,
18524
18525 pub data1: T2,
18526
18527 pub handle1: T3,
18528
18529 pub handle2: T4,
18530
18531 pub data2: T5,
18532 }
18533
18534 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
18535 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
18536 for MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5>
18537 where
18538 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18539 ___E: ::fidl_next::fuchsia::HandleEncoder,
18540 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18541 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18542 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18543 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
18544 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18545 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18546 {
18547 #[inline]
18548 fn encode(
18549 self,
18550 encoder_: &mut ___E,
18551 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
18552 _: (),
18553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18554 ::fidl_next::munge! {
18555 let crate::wire::MultipleNonnullableHandles {
18556 data0,
18557 handle0,
18558 data1,
18559 handle1,
18560 handle2,
18561 data2,
18562
18563 } = out_;
18564 }
18565
18566 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
18567
18568 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
18569
18570 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
18571
18572 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
18573
18574 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
18575
18576 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
18577
18578 Ok(())
18579 }
18580 }
18581
18582 pub struct MultipleNullableHandles<T0, T1, T2, T3, T4, T5> {
18584 pub data0: T0,
18585
18586 pub handle0: T1,
18587
18588 pub data1: T2,
18589
18590 pub handle1: T3,
18591
18592 pub handle2: T4,
18593
18594 pub data2: T5,
18595 }
18596
18597 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
18598 ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
18599 for MultipleNullableHandles<T0, T1, T2, T3, T4, T5>
18600 where
18601 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18602 ___E: ::fidl_next::fuchsia::HandleEncoder,
18603 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18604 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18605 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18606 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
18607 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
18608 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18609 {
18610 #[inline]
18611 fn encode(
18612 self,
18613 encoder_: &mut ___E,
18614 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
18615 _: (),
18616 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18617 ::fidl_next::munge! {
18618 let crate::wire::MultipleNullableHandles {
18619 data0,
18620 handle0,
18621 data1,
18622 handle1,
18623 handle2,
18624 data2,
18625
18626 } = out_;
18627 }
18628
18629 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
18630
18631 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
18632
18633 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
18634
18635 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
18636
18637 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
18638
18639 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
18640
18641 Ok(())
18642 }
18643 }
18644
18645 pub struct NonnullableHandle<T0> {
18647 pub h: T0,
18648 }
18649
18650 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>
18651 for NonnullableHandle<T0>
18652 where
18653 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18654 ___E: ::fidl_next::fuchsia::HandleEncoder,
18655 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18656 {
18657 #[inline]
18658 fn encode(
18659 self,
18660 encoder_: &mut ___E,
18661 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
18662 _: (),
18663 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18664 ::fidl_next::munge! {
18665 let crate::wire::NonnullableHandle {
18666 h,
18667
18668 } = out_;
18669 }
18670
18671 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18672
18673 Ok(())
18674 }
18675 }
18676
18677 pub struct NonnullableHandleArray<T0> {
18679 pub handles: T0,
18680 }
18681
18682 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
18683 for NonnullableHandleArray<T0>
18684 where
18685 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18686 ___E: ::fidl_next::fuchsia::HandleEncoder,
18687 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
18688 {
18689 #[inline]
18690 fn encode(
18691 self,
18692 encoder_: &mut ___E,
18693 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
18694 _: (),
18695 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18696 ::fidl_next::munge! {
18697 let crate::wire::NonnullableHandleArray {
18698 handles,
18699
18700 } = out_;
18701 }
18702
18703 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
18704
18705 Ok(())
18706 }
18707 }
18708
18709 pub struct NullableHandle<T0> {
18711 pub h: T0,
18712 }
18713
18714 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NullableHandle, ___E> for NullableHandle<T0>
18715 where
18716 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18717 ___E: ::fidl_next::fuchsia::HandleEncoder,
18718 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18719 {
18720 #[inline]
18721 fn encode(
18722 self,
18723 encoder_: &mut ___E,
18724 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
18725 _: (),
18726 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18727 ::fidl_next::munge! {
18728 let crate::wire::NullableHandle {
18729 h,
18730
18731 } = out_;
18732 }
18733
18734 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18735
18736 Ok(())
18737 }
18738 }
18739
18740 pub struct OutOfLineArrayOfNonnullableHandles<T0> {
18742 pub handles: T0,
18743 }
18744
18745 unsafe impl<___E, T0>
18746 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
18747 for OutOfLineArrayOfNonnullableHandles<T0>
18748 where
18749 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18750 ___E: ::fidl_next::Encoder,
18751 ___E: ::fidl_next::fuchsia::HandleEncoder,
18752 T0: ::fidl_next::Encode<
18753 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
18754 ___E,
18755 >,
18756 {
18757 #[inline]
18758 fn encode(
18759 self,
18760 encoder_: &mut ___E,
18761 out_: &mut ::core::mem::MaybeUninit<
18762 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
18763 >,
18764 _: (),
18765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18766 ::fidl_next::munge! {
18767 let crate::wire::OutOfLineArrayOfNonnullableHandles {
18768 handles,
18769
18770 } = out_;
18771 }
18772
18773 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
18774
18775 Ok(())
18776 }
18777 }
18778
18779 pub struct Sandwich6<T0, T1, T2> {
18781 pub before: T0,
18782
18783 pub the_union: T1,
18784
18785 pub after: T2,
18786 }
18787
18788 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>
18789 for Sandwich6<T0, T1, T2>
18790 where
18791 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18792 ___E: ::fidl_next::Encoder,
18793 ___E: ::fidl_next::fuchsia::HandleEncoder,
18794 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18795 T1: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
18796 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18797 {
18798 #[inline]
18799 fn encode(
18800 self,
18801 encoder_: &mut ___E,
18802 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
18803 _: (),
18804 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18805 ::fidl_next::munge! {
18806 let crate::wire::Sandwich6 {
18807 before,
18808 the_union,
18809 after,
18810
18811 } = out_;
18812 }
18813
18814 ::fidl_next::Encode::encode(self.before, encoder_, before, ())?;
18815
18816 ::fidl_next::Encode::encode(self.the_union, encoder_, the_union, ())?;
18817
18818 ::fidl_next::Encode::encode(self.after, encoder_, after, ())?;
18819
18820 Ok(())
18821 }
18822 }
18823
18824 pub struct ShortStringThenHandle<T0, T1> {
18826 pub s: T0,
18827
18828 pub h: T1,
18829 }
18830
18831 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
18832 for ShortStringThenHandle<T0, T1>
18833 where
18834 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18835 ___E: ::fidl_next::Encoder,
18836 ___E: ::fidl_next::fuchsia::HandleEncoder,
18837 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18838 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18839 {
18840 #[inline]
18841 fn encode(
18842 self,
18843 encoder_: &mut ___E,
18844 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
18845 _: (),
18846 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18847 ::fidl_next::munge! {
18848 let crate::wire::ShortStringThenHandle {
18849 s,
18850 h,
18851
18852 } = out_;
18853 }
18854
18855 ::fidl_next::Encode::encode(self.s, encoder_, s, 1)?;
18856
18857 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18858
18859 Ok(())
18860 }
18861 }
18862
18863 pub struct SingleHandle<T0> {
18865 pub h: T0,
18866 }
18867
18868 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleHandle, ___E> for SingleHandle<T0>
18869 where
18870 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18871 ___E: ::fidl_next::fuchsia::HandleEncoder,
18872 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18873 {
18874 #[inline]
18875 fn encode(
18876 self,
18877 encoder_: &mut ___E,
18878 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
18879 _: (),
18880 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18881 ::fidl_next::munge! {
18882 let crate::wire::SingleHandle {
18883 h,
18884
18885 } = out_;
18886 }
18887
18888 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18889
18890 Ok(())
18891 }
18892 }
18893
18894 pub struct SingleOptionalHandle<T0> {
18896 pub h: T0,
18897 }
18898
18899 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
18900 for SingleOptionalHandle<T0>
18901 where
18902 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18903 ___E: ::fidl_next::fuchsia::HandleEncoder,
18904 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18905 {
18906 #[inline]
18907 fn encode(
18908 self,
18909 encoder_: &mut ___E,
18910 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
18911 _: (),
18912 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18913 ::fidl_next::munge! {
18914 let crate::wire::SingleOptionalHandle {
18915 h,
18916
18917 } = out_;
18918 }
18919
18920 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18921
18922 Ok(())
18923 }
18924 }
18925
18926 pub struct StructOfEndpoints<T0, T1, T2, T3> {
18928 pub client_end: T0,
18929
18930 pub optional_client_end: T1,
18931
18932 pub server_end: T2,
18933
18934 pub optional_server_end: T3,
18935 }
18936
18937 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>
18938 for StructOfEndpoints<T0, T1, T2, T3>
18939 where
18940 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18941 ___E: ::fidl_next::fuchsia::HandleEncoder,
18942 T0: ::fidl_next::Encode<
18943 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
18944 ___E,
18945 >,
18946 T1: ::fidl_next::Encode<
18947 ::fidl_next::ClientEnd<
18948 crate::Protocol,
18949 ::fidl_next::wire::fuchsia::OptionalChannel,
18950 >,
18951 ___E,
18952 >,
18953 T2: ::fidl_next::Encode<
18954 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
18955 ___E,
18956 >,
18957 T3: ::fidl_next::Encode<
18958 ::fidl_next::ServerEnd<
18959 crate::Protocol,
18960 ::fidl_next::wire::fuchsia::OptionalChannel,
18961 >,
18962 ___E,
18963 >,
18964 {
18965 #[inline]
18966 fn encode(
18967 self,
18968 encoder_: &mut ___E,
18969 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
18970 _: (),
18971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18972 ::fidl_next::munge! {
18973 let crate::wire::StructOfEndpoints {
18974 client_end,
18975 optional_client_end,
18976 server_end,
18977 optional_server_end,
18978
18979 } = out_;
18980 }
18981
18982 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
18983
18984 ::fidl_next::Encode::encode(
18985 self.optional_client_end,
18986 encoder_,
18987 optional_client_end,
18988 (),
18989 )?;
18990
18991 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
18992
18993 ::fidl_next::Encode::encode(
18994 self.optional_server_end,
18995 encoder_,
18996 optional_server_end,
18997 (),
18998 )?;
18999
19000 Ok(())
19001 }
19002 }
19003
19004 pub struct StructOfOptionalUnionOfHandle<T0> {
19006 pub u: T0,
19007 }
19008
19009 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
19010 for StructOfOptionalUnionOfHandle<T0>
19011 where
19012 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19013 ___E: ::fidl_next::fuchsia::HandleEncoder,
19014 T0: ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>,
19015 {
19016 #[inline]
19017 fn encode(
19018 self,
19019 encoder_: &mut ___E,
19020 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
19021 _: (),
19022 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19023 ::fidl_next::munge! {
19024 let crate::wire::StructOfOptionalUnionOfHandle {
19025 u,
19026
19027 } = out_;
19028 }
19029
19030 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19031
19032 Ok(())
19033 }
19034 }
19035
19036 pub struct StructOfSimpleResourceTable<T0> {
19038 pub table: T0,
19039 }
19040
19041 unsafe impl<___E, T0>
19042 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
19043 for StructOfSimpleResourceTable<T0>
19044 where
19045 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19046 ___E: ::fidl_next::Encoder,
19047 ___E: ::fidl_next::fuchsia::HandleEncoder,
19048 T0: ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>,
19049 {
19050 #[inline]
19051 fn encode(
19052 self,
19053 encoder_: &mut ___E,
19054 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
19055 _: (),
19056 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19057 ::fidl_next::munge! {
19058 let crate::wire::StructOfSimpleResourceTable {
19059 table,
19060
19061 } = out_;
19062 }
19063
19064 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19065
19066 Ok(())
19067 }
19068 }
19069
19070 pub struct TableFieldInlinedHandleStruct<T0> {
19072 pub t: T0,
19073 }
19074
19075 unsafe impl<___E, T0>
19076 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
19077 for TableFieldInlinedHandleStruct<T0>
19078 where
19079 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19080 ___E: ::fidl_next::Encoder,
19081 ___E: ::fidl_next::fuchsia::HandleEncoder,
19082 T0: ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>,
19083 {
19084 #[inline]
19085 fn encode(
19086 self,
19087 encoder_: &mut ___E,
19088 out_: &mut ::core::mem::MaybeUninit<
19089 crate::wire::TableFieldInlinedHandleStruct<'static>,
19090 >,
19091 _: (),
19092 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19093 ::fidl_next::munge! {
19094 let crate::wire::TableFieldInlinedHandleStruct {
19095 t,
19096
19097 } = out_;
19098 }
19099
19100 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19101
19102 Ok(())
19103 }
19104 }
19105
19106 pub struct TableFieldUnknownResourceStruct<T0> {
19108 pub t: T0,
19109 }
19110
19111 unsafe impl<___E, T0>
19112 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
19113 for TableFieldUnknownResourceStruct<T0>
19114 where
19115 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19116 ___E: ::fidl_next::Encoder,
19117 ___E: ::fidl_next::fuchsia::HandleEncoder,
19118 T0: ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>,
19119 {
19120 #[inline]
19121 fn encode(
19122 self,
19123 encoder_: &mut ___E,
19124 out_: &mut ::core::mem::MaybeUninit<
19125 crate::wire::TableFieldUnknownResourceStruct<'static>,
19126 >,
19127 _: (),
19128 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19129 ::fidl_next::munge! {
19130 let crate::wire::TableFieldUnknownResourceStruct {
19131 t,
19132
19133 } = out_;
19134 }
19135
19136 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19137
19138 Ok(())
19139 }
19140 }
19141
19142 pub struct TableOfEndpoints<T0> {
19144 pub t: T0,
19145 }
19146
19147 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
19148 for TableOfEndpoints<T0>
19149 where
19150 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19151 ___E: ::fidl_next::Encoder,
19152 ___E: ::fidl_next::fuchsia::HandleEncoder,
19153 T0: ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>,
19154 {
19155 #[inline]
19156 fn encode(
19157 self,
19158 encoder_: &mut ___E,
19159 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
19160 _: (),
19161 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19162 ::fidl_next::munge! {
19163 let crate::wire::TableOfEndpoints {
19164 t,
19165
19166 } = out_;
19167 }
19168
19169 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19170
19171 Ok(())
19172 }
19173 }
19174
19175 pub struct TableUnionWithVectorReservedSandwichStruct<T0> {
19177 pub table: T0,
19178 }
19179
19180 unsafe impl<___E, T0>
19181 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
19182 for TableUnionWithVectorReservedSandwichStruct<T0>
19183 where
19184 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19185 ___E: ::fidl_next::Encoder,
19186 ___E: ::fidl_next::fuchsia::HandleEncoder,
19187 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>,
19188 {
19189 #[inline]
19190 fn encode(
19191 self,
19192 encoder_: &mut ___E,
19193 out_: &mut ::core::mem::MaybeUninit<
19194 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
19195 >,
19196 _: (),
19197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19198 ::fidl_next::munge! {
19199 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
19200 table,
19201
19202 } = out_;
19203 }
19204
19205 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19206
19207 Ok(())
19208 }
19209 }
19210
19211 pub struct TableUnionWithVectorStructSandwichStruct<T0> {
19213 pub table: T0,
19214 }
19215
19216 unsafe impl<___E, T0>
19217 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
19218 for TableUnionWithVectorStructSandwichStruct<T0>
19219 where
19220 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19221 ___E: ::fidl_next::Encoder,
19222 ___E: ::fidl_next::fuchsia::HandleEncoder,
19223 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>,
19224 {
19225 #[inline]
19226 fn encode(
19227 self,
19228 encoder_: &mut ___E,
19229 out_: &mut ::core::mem::MaybeUninit<
19230 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
19231 >,
19232 _: (),
19233 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19234 ::fidl_next::munge! {
19235 let crate::wire::TableUnionWithVectorStructSandwichStruct {
19236 table,
19237
19238 } = out_;
19239 }
19240
19241 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19242
19243 Ok(())
19244 }
19245 }
19246
19247 pub struct TestFlexibleResourceXUnionInStruct<T0> {
19249 pub xu: T0,
19250 }
19251
19252 unsafe impl<___E, T0>
19253 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
19254 for TestFlexibleResourceXUnionInStruct<T0>
19255 where
19256 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19257 ___E: ::fidl_next::Encoder,
19258 ___E: ::fidl_next::fuchsia::HandleEncoder,
19259 T0: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
19260 {
19261 #[inline]
19262 fn encode(
19263 self,
19264 encoder_: &mut ___E,
19265 out_: &mut ::core::mem::MaybeUninit<
19266 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
19267 >,
19268 _: (),
19269 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19270 ::fidl_next::munge! {
19271 let crate::wire::TestFlexibleResourceXUnionInStruct {
19272 xu,
19273
19274 } = out_;
19275 }
19276
19277 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19278
19279 Ok(())
19280 }
19281 }
19282
19283 pub struct TestOptionalFlexibleResourceXUnionInStruct<T0> {
19285 pub xu: T0,
19286 }
19287
19288 unsafe impl<___E, T0>
19289 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
19290 for TestOptionalFlexibleResourceXUnionInStruct<T0>
19291 where
19292 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19293 ___E: ::fidl_next::Encoder,
19294 ___E: ::fidl_next::fuchsia::HandleEncoder,
19295 T0: ::fidl_next::Encode<crate::wire_optional::SampleResourceXUnion<'static>, ___E>,
19296 {
19297 #[inline]
19298 fn encode(
19299 self,
19300 encoder_: &mut ___E,
19301 out_: &mut ::core::mem::MaybeUninit<
19302 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
19303 >,
19304 _: (),
19305 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19306 ::fidl_next::munge! {
19307 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
19308 xu,
19309
19310 } = out_;
19311 }
19312
19313 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19314
19315 Ok(())
19316 }
19317 }
19318
19319 pub struct TestOptionalStrictResourceXUnionInStruct<T0> {
19321 pub xu: T0,
19322 }
19323
19324 unsafe impl<___E, T0>
19325 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
19326 for TestOptionalStrictResourceXUnionInStruct<T0>
19327 where
19328 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19329 ___E: ::fidl_next::Encoder,
19330 ___E: ::fidl_next::fuchsia::HandleEncoder,
19331 T0: ::fidl_next::Encode<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>,
19332 {
19333 #[inline]
19334 fn encode(
19335 self,
19336 encoder_: &mut ___E,
19337 out_: &mut ::core::mem::MaybeUninit<
19338 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
19339 >,
19340 _: (),
19341 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19342 ::fidl_next::munge! {
19343 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
19344 xu,
19345
19346 } = out_;
19347 }
19348
19349 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19350
19351 Ok(())
19352 }
19353 }
19354
19355 pub struct TestPackageResolverResolveRequest<T0, T1, T2, T3> {
19357 pub package_url: T0,
19358
19359 pub selectors: T1,
19360
19361 pub update_policy: T2,
19362
19363 pub this_should_be_a_handle: T3,
19364 }
19365
19366 unsafe impl<___E, T0, T1, T2, T3>
19367 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
19368 for TestPackageResolverResolveRequest<T0, T1, T2, T3>
19369 where
19370 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19371 ___E: ::fidl_next::Encoder,
19372 ___E: ::fidl_next::fuchsia::HandleEncoder,
19373 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19374 T1: ::fidl_next::Encode<
19375 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
19376 ___E,
19377 >,
19378 T2: ::fidl_next::Encode<crate::wire::UpdatePolicy, ___E>,
19379 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19380 {
19381 #[inline]
19382 fn encode(
19383 self,
19384 encoder_: &mut ___E,
19385 out_: &mut ::core::mem::MaybeUninit<
19386 crate::wire::TestPackageResolverResolveRequest<'static>,
19387 >,
19388 _: (),
19389 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19390 ::fidl_next::munge! {
19391 let crate::wire::TestPackageResolverResolveRequest {
19392 package_url,
19393 selectors,
19394 update_policy,
19395 this_should_be_a_handle,
19396
19397 } = out_;
19398 }
19399
19400 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
19401
19402 ::fidl_next::Encode::encode(
19403 self.selectors,
19404 encoder_,
19405 selectors,
19406 (4294967295, 4294967295),
19407 )?;
19408
19409 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
19410
19411 ::fidl_next::Encode::encode(
19412 self.this_should_be_a_handle,
19413 encoder_,
19414 this_should_be_a_handle,
19415 (),
19416 )?;
19417
19418 Ok(())
19419 }
19420 }
19421
19422 pub struct TestStrictResourceXUnionInStruct<T0> {
19424 pub xu: T0,
19425 }
19426
19427 unsafe impl<___E, T0>
19428 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
19429 for TestStrictResourceXUnionInStruct<T0>
19430 where
19431 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19432 ___E: ::fidl_next::Encoder,
19433 ___E: ::fidl_next::fuchsia::HandleEncoder,
19434 T0: ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
19435 {
19436 #[inline]
19437 fn encode(
19438 self,
19439 encoder_: &mut ___E,
19440 out_: &mut ::core::mem::MaybeUninit<
19441 crate::wire::TestStrictResourceXUnionInStruct<'static>,
19442 >,
19443 _: (),
19444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19445 ::fidl_next::munge! {
19446 let crate::wire::TestStrictResourceXUnionInStruct {
19447 xu,
19448
19449 } = out_;
19450 }
19451
19452 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19453
19454 Ok(())
19455 }
19456 }
19457
19458 pub struct UnboundedNonnullableVectorOfHandles<T0> {
19460 pub vh0: T0,
19461 }
19462
19463 unsafe impl<___E, T0>
19464 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
19465 for UnboundedNonnullableVectorOfHandles<T0>
19466 where
19467 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19468 ___E: ::fidl_next::Encoder,
19469 ___E: ::fidl_next::fuchsia::HandleEncoder,
19470 T0: ::fidl_next::Encode<
19471 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19472 ___E,
19473 >,
19474 {
19475 #[inline]
19476 fn encode(
19477 self,
19478 encoder_: &mut ___E,
19479 out_: &mut ::core::mem::MaybeUninit<
19480 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
19481 >,
19482 _: (),
19483 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19484 ::fidl_next::munge! {
19485 let crate::wire::UnboundedNonnullableVectorOfHandles {
19486 vh0,
19487
19488 } = out_;
19489 }
19490
19491 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
19492
19493 Ok(())
19494 }
19495 }
19496
19497 pub struct UnboundedNullableVectorOfHandles<T0> {
19499 pub vh0: T0,
19500 }
19501
19502 unsafe impl<___E, T0>
19503 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
19504 for UnboundedNullableVectorOfHandles<T0>
19505 where
19506 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19507 ___E: ::fidl_next::Encoder,
19508 ___E: ::fidl_next::fuchsia::HandleEncoder,
19509 T0: ::fidl_next::Encode<
19510 ::fidl_next::wire::OptionalVector<
19511 'static,
19512 ::fidl_next::wire::fuchsia::NullableHandle,
19513 >,
19514 ___E,
19515 >,
19516 {
19517 #[inline]
19518 fn encode(
19519 self,
19520 encoder_: &mut ___E,
19521 out_: &mut ::core::mem::MaybeUninit<
19522 crate::wire::UnboundedNullableVectorOfHandles<'static>,
19523 >,
19524 _: (),
19525 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19526 ::fidl_next::munge! {
19527 let crate::wire::UnboundedNullableVectorOfHandles {
19528 vh0,
19529
19530 } = out_;
19531 }
19532
19533 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
19534
19535 Ok(())
19536 }
19537 }
19538
19539 pub struct UnionOfEndpoints<T0> {
19541 pub u: T0,
19542 }
19543
19544 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
19545 for UnionOfEndpoints<T0>
19546 where
19547 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19548 ___E: ::fidl_next::Encoder,
19549 ___E: ::fidl_next::fuchsia::HandleEncoder,
19550 T0: ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
19551 {
19552 #[inline]
19553 fn encode(
19554 self,
19555 encoder_: &mut ___E,
19556 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
19557 _: (),
19558 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19559 ::fidl_next::munge! {
19560 let crate::wire::UnionOfEndpoints {
19561 u,
19562
19563 } = out_;
19564 }
19565
19566 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19567
19568 Ok(())
19569 }
19570 }
19571
19572 pub struct VectorOfArrayOfEventInStructWithDefaultRights<T0> {
19574 pub h: T0,
19575 }
19576
19577 unsafe impl<___E, T0>
19578 ::fidl_next::Encode<
19579 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
19580 ___E,
19581 > for VectorOfArrayOfEventInStructWithDefaultRights<T0>
19582 where
19583 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19584 ___E: ::fidl_next::Encoder,
19585 ___E: ::fidl_next::fuchsia::HandleEncoder,
19586 T0: ::fidl_next::Encode<
19587 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
19588 ___E,
19589 >,
19590 {
19591 #[inline]
19592 fn encode(
19593 self,
19594 encoder_: &mut ___E,
19595 out_: &mut ::core::mem::MaybeUninit<
19596 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
19597 >,
19598 _: (),
19599 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19600 ::fidl_next::munge! {
19601 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
19602 h,
19603
19604 } = out_;
19605 }
19606
19607 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
19608
19609 Ok(())
19610 }
19611 }
19612
19613 pub struct VectorOfArrayOfEventInStructWithReducedRights<T0> {
19615 pub h: T0,
19616 }
19617
19618 unsafe impl<___E, T0>
19619 ::fidl_next::Encode<
19620 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
19621 ___E,
19622 > for VectorOfArrayOfEventInStructWithReducedRights<T0>
19623 where
19624 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19625 ___E: ::fidl_next::Encoder,
19626 ___E: ::fidl_next::fuchsia::HandleEncoder,
19627 T0: ::fidl_next::Encode<
19628 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
19629 ___E,
19630 >,
19631 {
19632 #[inline]
19633 fn encode(
19634 self,
19635 encoder_: &mut ___E,
19636 out_: &mut ::core::mem::MaybeUninit<
19637 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
19638 >,
19639 _: (),
19640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19641 ::fidl_next::munge! {
19642 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
19643 h,
19644
19645 } = out_;
19646 }
19647
19648 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
19649
19650 Ok(())
19651 }
19652 }
19653
19654 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<T0> {
19656 pub t: T0,
19657 }
19658
19659 unsafe impl<___E, T0>
19660 ::fidl_next::Encode<
19661 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
19662 ___E,
19663 > for VectorOfArrayOfEventInTableWithReducedRightsStruct<T0>
19664 where
19665 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19666 ___E: ::fidl_next::Encoder,
19667 ___E: ::fidl_next::fuchsia::HandleEncoder,
19668 T0: ::fidl_next::Encode<
19669 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
19670 ___E,
19671 >,
19672 {
19673 #[inline]
19674 fn encode(
19675 self,
19676 encoder_: &mut ___E,
19677 out_: &mut ::core::mem::MaybeUninit<
19678 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
19679 >,
19680 _: (),
19681 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19682 ::fidl_next::munge! {
19683 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
19684 t,
19685
19686 } = out_;
19687 }
19688
19689 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19690
19691 Ok(())
19692 }
19693 }
19694
19695 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0> {
19697 pub u: T0,
19698 }
19699
19700 unsafe impl<___E, T0>
19701 ::fidl_next::Encode<
19702 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
19703 ___E,
19704 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0>
19705 where
19706 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19707 ___E: ::fidl_next::Encoder,
19708 ___E: ::fidl_next::fuchsia::HandleEncoder,
19709 T0: ::fidl_next::Encode<
19710 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
19711 ___E,
19712 >,
19713 {
19714 #[inline]
19715 fn encode(
19716 self,
19717 encoder_: &mut ___E,
19718 out_: &mut ::core::mem::MaybeUninit<
19719 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
19720 >,
19721 _: (),
19722 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19723 ::fidl_next::munge! {
19724 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
19725 u,
19726
19727 } = out_;
19728 }
19729
19730 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19731
19732 Ok(())
19733 }
19734 }
19735
19736 pub struct VectorOfHandles<T0> {
19738 pub v: T0,
19739 }
19740
19741 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
19742 for VectorOfHandles<T0>
19743 where
19744 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19745 ___E: ::fidl_next::Encoder,
19746 ___E: ::fidl_next::fuchsia::HandleEncoder,
19747 T0: ::fidl_next::Encode<
19748 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19749 ___E,
19750 >,
19751 {
19752 #[inline]
19753 fn encode(
19754 self,
19755 encoder_: &mut ___E,
19756 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
19757 _: (),
19758 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19759 ::fidl_next::munge! {
19760 let crate::wire::VectorOfHandles {
19761 v,
19762
19763 } = out_;
19764 }
19765
19766 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
19767
19768 Ok(())
19769 }
19770 }
19771
19772 pub struct VectorOfOptionalHandles<T0> {
19774 pub v: T0,
19775 }
19776
19777 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
19778 for VectorOfOptionalHandles<T0>
19779 where
19780 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19781 ___E: ::fidl_next::Encoder,
19782 ___E: ::fidl_next::fuchsia::HandleEncoder,
19783 T0: ::fidl_next::Encode<
19784 ::fidl_next::wire::Vector<
19785 'static,
19786 ::fidl_next::wire::fuchsia::OptionalNullableHandle,
19787 >,
19788 ___E,
19789 >,
19790 {
19791 #[inline]
19792 fn encode(
19793 self,
19794 encoder_: &mut ___E,
19795 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
19796 _: (),
19797 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19798 ::fidl_next::munge! {
19799 let crate::wire::VectorOfOptionalHandles {
19800 v,
19801
19802 } = out_;
19803 }
19804
19805 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
19806
19807 Ok(())
19808 }
19809 }
19810
19811 pub struct VectorOfUpTo2Handles<T0> {
19813 pub v: T0,
19814 }
19815
19816 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
19817 for VectorOfUpTo2Handles<T0>
19818 where
19819 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19820 ___E: ::fidl_next::Encoder,
19821 ___E: ::fidl_next::fuchsia::HandleEncoder,
19822 T0: ::fidl_next::Encode<
19823 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19824 ___E,
19825 >,
19826 {
19827 #[inline]
19828 fn encode(
19829 self,
19830 encoder_: &mut ___E,
19831 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
19832 _: (),
19833 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19834 ::fidl_next::munge! {
19835 let crate::wire::VectorOfUpTo2Handles {
19836 v,
19837
19838 } = out_;
19839 }
19840
19841 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
19842
19843 Ok(())
19844 }
19845 }
19846}
19847
19848pub use self::natural::*;
19849
19850pub use fidl_next_common_test_conformance::*;