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
8204 h1,
8205 failure_trigger1,
8206 h2,
8207 failure_trigger2,
8208 h3,
8209
8210 } = &mut *out_;
8211 }
8212
8213 ::fidl_next::Wire::zero_padding(h1);
8214
8215 ::fidl_next::Wire::zero_padding(failure_trigger1);
8216
8217 ::fidl_next::Wire::zero_padding(h2);
8218
8219 ::fidl_next::Wire::zero_padding(failure_trigger2);
8220
8221 ::fidl_next::Wire::zero_padding(h3);
8222
8223 unsafe {
8224 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
8225 }
8226
8227 unsafe {
8228 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
8229 }
8230
8231 unsafe {
8232 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
8233 }
8234 }
8235 }
8236
8237 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AlternatingHandlesAndFailures<'de>
8238 where
8239 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8240 ___D: ::fidl_next::Decoder<'de>,
8241 ___D: ::fidl_next::fuchsia::HandleDecoder,
8242 {
8243 fn decode(
8244 slot_: ::fidl_next::Slot<'_, Self>,
8245 decoder_: &mut ___D,
8246 _: (),
8247 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8248 if slot_.as_bytes()[52..56] != [0u8; 4] {
8249 return Err(::fidl_next::DecodeError::InvalidPadding);
8250 }
8251
8252 if slot_.as_bytes()[28..32] != [0u8; 4] {
8253 return Err(::fidl_next::DecodeError::InvalidPadding);
8254 }
8255
8256 if slot_.as_bytes()[4..8] != [0u8; 4] {
8257 return Err(::fidl_next::DecodeError::InvalidPadding);
8258 }
8259
8260 ::fidl_next::munge! {
8261 let Self {
8262
8263 mut h1,
8264 mut failure_trigger1,
8265 mut h2,
8266 mut failure_trigger2,
8267 mut h3,
8268
8269 } = slot_;
8270 }
8271
8272 let _field = h1.as_mut();
8273
8274 ::fidl_next::Decode::decode(h1.as_mut(), decoder_, ())?;
8275
8276 let _field = failure_trigger1.as_mut();
8277 ::fidl_next::Constrained::validate(_field, 1)?;
8278 ::fidl_next::Decode::decode(failure_trigger1.as_mut(), decoder_, 1)?;
8279
8280 let failure_trigger1 = unsafe { failure_trigger1.deref_unchecked() };
8281
8282 if failure_trigger1.len() > 1 {
8283 return Err(::fidl_next::DecodeError::VectorTooLong {
8284 size: failure_trigger1.len() as u64,
8285 limit: 1,
8286 });
8287 }
8288
8289 let _field = h2.as_mut();
8290
8291 ::fidl_next::Decode::decode(h2.as_mut(), decoder_, ())?;
8292
8293 let _field = failure_trigger2.as_mut();
8294 ::fidl_next::Constrained::validate(_field, 1)?;
8295 ::fidl_next::Decode::decode(failure_trigger2.as_mut(), decoder_, 1)?;
8296
8297 let failure_trigger2 = unsafe { failure_trigger2.deref_unchecked() };
8298
8299 if failure_trigger2.len() > 1 {
8300 return Err(::fidl_next::DecodeError::VectorTooLong {
8301 size: failure_trigger2.len() as u64,
8302 limit: 1,
8303 });
8304 }
8305
8306 let _field = h3.as_mut();
8307
8308 ::fidl_next::Decode::decode(h3.as_mut(), decoder_, ())?;
8309
8310 Ok(())
8311 }
8312 }
8313
8314 impl<'de> ::fidl_next::IntoNatural for AlternatingHandlesAndFailures<'de> {
8315 type Natural = crate::natural::AlternatingHandlesAndFailures;
8316 }
8317
8318 #[derive(Debug)]
8320 #[repr(C)]
8321 pub struct ArrayOfArrayOfNonnullableHandles {
8322 pub handles: [[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4],
8323 }
8324
8325 static_assertions::const_assert_eq!(
8326 std::mem::size_of::<ArrayOfArrayOfNonnullableHandles>(),
8327 48
8328 );
8329 static_assertions::const_assert_eq!(
8330 std::mem::align_of::<ArrayOfArrayOfNonnullableHandles>(),
8331 4
8332 );
8333
8334 static_assertions::const_assert_eq!(
8335 std::mem::offset_of!(ArrayOfArrayOfNonnullableHandles, handles),
8336 0
8337 );
8338
8339 impl ::fidl_next::Constrained for ArrayOfArrayOfNonnullableHandles {
8340 type Constraint = ();
8341
8342 fn validate(
8343 _: ::fidl_next::Slot<'_, Self>,
8344 _: Self::Constraint,
8345 ) -> Result<(), ::fidl_next::ValidationError> {
8346 Ok(())
8347 }
8348 }
8349
8350 unsafe impl ::fidl_next::Wire for ArrayOfArrayOfNonnullableHandles {
8351 type Narrowed<'de> = ArrayOfArrayOfNonnullableHandles;
8352
8353 #[inline]
8354 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8355 ::fidl_next::munge! {
8356 let Self {
8357
8358 handles,
8359
8360 } = &mut *out_;
8361 }
8362
8363 ::fidl_next::Wire::zero_padding(handles);
8364 }
8365 }
8366
8367 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfArrayOfNonnullableHandles
8368 where
8369 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8370 ___D: ::fidl_next::fuchsia::HandleDecoder,
8371 {
8372 fn decode(
8373 slot_: ::fidl_next::Slot<'_, Self>,
8374 decoder_: &mut ___D,
8375 _: (),
8376 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8377 ::fidl_next::munge! {
8378 let Self {
8379
8380 mut handles,
8381
8382 } = slot_;
8383 }
8384
8385 let _field = handles.as_mut();
8386
8387 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8388
8389 Ok(())
8390 }
8391 }
8392
8393 impl ::fidl_next::IntoNatural for ArrayOfArrayOfNonnullableHandles {
8394 type Natural = crate::natural::ArrayOfArrayOfNonnullableHandles;
8395 }
8396
8397 #[derive(Debug)]
8399 #[repr(C)]
8400 pub struct ArrayOfHandles {
8401 pub a: [::fidl_next::wire::fuchsia::NullableHandle; 3],
8402 }
8403
8404 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfHandles>(), 12);
8405 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfHandles>(), 4);
8406
8407 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfHandles, a), 0);
8408
8409 impl ::fidl_next::Constrained for ArrayOfHandles {
8410 type Constraint = ();
8411
8412 fn validate(
8413 _: ::fidl_next::Slot<'_, Self>,
8414 _: Self::Constraint,
8415 ) -> Result<(), ::fidl_next::ValidationError> {
8416 Ok(())
8417 }
8418 }
8419
8420 unsafe impl ::fidl_next::Wire for ArrayOfHandles {
8421 type Narrowed<'de> = ArrayOfHandles;
8422
8423 #[inline]
8424 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8425 ::fidl_next::munge! {
8426 let Self {
8427
8428 a,
8429
8430 } = &mut *out_;
8431 }
8432
8433 ::fidl_next::Wire::zero_padding(a);
8434 }
8435 }
8436
8437 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfHandles
8438 where
8439 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8440 ___D: ::fidl_next::fuchsia::HandleDecoder,
8441 {
8442 fn decode(
8443 slot_: ::fidl_next::Slot<'_, Self>,
8444 decoder_: &mut ___D,
8445 _: (),
8446 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8447 ::fidl_next::munge! {
8448 let Self {
8449
8450 mut a,
8451
8452 } = slot_;
8453 }
8454
8455 let _field = a.as_mut();
8456
8457 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
8458
8459 Ok(())
8460 }
8461 }
8462
8463 impl ::fidl_next::IntoNatural for ArrayOfHandles {
8464 type Natural = crate::natural::ArrayOfHandles;
8465 }
8466
8467 #[derive(Debug)]
8469 #[repr(C)]
8470 pub struct ArrayOfNonnullableHandles {
8471 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
8472 }
8473
8474 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNonnullableHandles>(), 16);
8475 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNonnullableHandles>(), 4);
8476
8477 static_assertions::const_assert_eq!(
8478 std::mem::offset_of!(ArrayOfNonnullableHandles, handles),
8479 0
8480 );
8481
8482 impl ::fidl_next::Constrained for ArrayOfNonnullableHandles {
8483 type Constraint = ();
8484
8485 fn validate(
8486 _: ::fidl_next::Slot<'_, Self>,
8487 _: Self::Constraint,
8488 ) -> Result<(), ::fidl_next::ValidationError> {
8489 Ok(())
8490 }
8491 }
8492
8493 unsafe impl ::fidl_next::Wire for ArrayOfNonnullableHandles {
8494 type Narrowed<'de> = ArrayOfNonnullableHandles;
8495
8496 #[inline]
8497 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8498 ::fidl_next::munge! {
8499 let Self {
8500
8501 handles,
8502
8503 } = &mut *out_;
8504 }
8505
8506 ::fidl_next::Wire::zero_padding(handles);
8507 }
8508 }
8509
8510 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNonnullableHandles
8511 where
8512 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8513 ___D: ::fidl_next::fuchsia::HandleDecoder,
8514 {
8515 fn decode(
8516 slot_: ::fidl_next::Slot<'_, Self>,
8517 decoder_: &mut ___D,
8518 _: (),
8519 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8520 ::fidl_next::munge! {
8521 let Self {
8522
8523 mut handles,
8524
8525 } = slot_;
8526 }
8527
8528 let _field = handles.as_mut();
8529
8530 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8531
8532 Ok(())
8533 }
8534 }
8535
8536 impl ::fidl_next::IntoNatural for ArrayOfNonnullableHandles {
8537 type Natural = crate::natural::ArrayOfNonnullableHandles;
8538 }
8539
8540 #[derive(Debug)]
8542 #[repr(C)]
8543 pub struct ArrayOfNullableHandles {
8544 pub handles: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 5],
8545 }
8546
8547 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNullableHandles>(), 20);
8548 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNullableHandles>(), 4);
8549
8550 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfNullableHandles, handles), 0);
8551
8552 impl ::fidl_next::Constrained for ArrayOfNullableHandles {
8553 type Constraint = ();
8554
8555 fn validate(
8556 _: ::fidl_next::Slot<'_, Self>,
8557 _: Self::Constraint,
8558 ) -> Result<(), ::fidl_next::ValidationError> {
8559 Ok(())
8560 }
8561 }
8562
8563 unsafe impl ::fidl_next::Wire for ArrayOfNullableHandles {
8564 type Narrowed<'de> = ArrayOfNullableHandles;
8565
8566 #[inline]
8567 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8568 ::fidl_next::munge! {
8569 let Self {
8570
8571 handles,
8572
8573 } = &mut *out_;
8574 }
8575
8576 ::fidl_next::Wire::zero_padding(handles);
8577 }
8578 }
8579
8580 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNullableHandles
8581 where
8582 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8583 ___D: ::fidl_next::fuchsia::HandleDecoder,
8584 {
8585 fn decode(
8586 slot_: ::fidl_next::Slot<'_, Self>,
8587 decoder_: &mut ___D,
8588 _: (),
8589 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8590 ::fidl_next::munge! {
8591 let Self {
8592
8593 mut handles,
8594
8595 } = slot_;
8596 }
8597
8598 let _field = handles.as_mut();
8599
8600 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8601
8602 Ok(())
8603 }
8604 }
8605
8606 impl ::fidl_next::IntoNatural for ArrayOfNullableHandles {
8607 type Natural = crate::natural::ArrayOfNullableHandles;
8608 }
8609
8610 #[derive(Debug)]
8612 #[repr(C)]
8613 pub struct ArrayOfOptionalHandles {
8614 pub a: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 3],
8615 }
8616
8617 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfOptionalHandles>(), 12);
8618 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfOptionalHandles>(), 4);
8619
8620 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfOptionalHandles, a), 0);
8621
8622 impl ::fidl_next::Constrained for ArrayOfOptionalHandles {
8623 type Constraint = ();
8624
8625 fn validate(
8626 _: ::fidl_next::Slot<'_, Self>,
8627 _: Self::Constraint,
8628 ) -> Result<(), ::fidl_next::ValidationError> {
8629 Ok(())
8630 }
8631 }
8632
8633 unsafe impl ::fidl_next::Wire for ArrayOfOptionalHandles {
8634 type Narrowed<'de> = ArrayOfOptionalHandles;
8635
8636 #[inline]
8637 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8638 ::fidl_next::munge! {
8639 let Self {
8640
8641 a,
8642
8643 } = &mut *out_;
8644 }
8645
8646 ::fidl_next::Wire::zero_padding(a);
8647 }
8648 }
8649
8650 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfOptionalHandles
8651 where
8652 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8653 ___D: ::fidl_next::fuchsia::HandleDecoder,
8654 {
8655 fn decode(
8656 slot_: ::fidl_next::Slot<'_, Self>,
8657 decoder_: &mut ___D,
8658 _: (),
8659 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8660 ::fidl_next::munge! {
8661 let Self {
8662
8663 mut a,
8664
8665 } = slot_;
8666 }
8667
8668 let _field = a.as_mut();
8669
8670 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
8671
8672 Ok(())
8673 }
8674 }
8675
8676 impl ::fidl_next::IntoNatural for ArrayOfOptionalHandles {
8677 type Natural = crate::natural::ArrayOfOptionalHandles;
8678 }
8679
8680 #[derive(Debug)]
8682 #[repr(C)]
8683 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
8684 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8685 }
8686
8687 static_assertions::const_assert_eq!(
8688 std::mem::size_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
8689 16
8690 );
8691 static_assertions::const_assert_eq!(
8692 std::mem::align_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
8693 8
8694 );
8695
8696 static_assertions::const_assert_eq!(
8697 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithDefaultRights<'_>, h),
8698 0
8699 );
8700
8701 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithDefaultRights<'_> {
8702 type Constraint = ();
8703
8704 fn validate(
8705 _: ::fidl_next::Slot<'_, Self>,
8706 _: Self::Constraint,
8707 ) -> Result<(), ::fidl_next::ValidationError> {
8708 Ok(())
8709 }
8710 }
8711
8712 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithDefaultRights<'static> {
8713 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithDefaultRights<'de>;
8714
8715 #[inline]
8716 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8717 ::fidl_next::munge! {
8718 let Self {
8719
8720 h,
8721
8722 } = &mut *out_;
8723 }
8724
8725 ::fidl_next::Wire::zero_padding(h);
8726 }
8727 }
8728
8729 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8730 for ArrayOfVectorOfEventInStructWithDefaultRights<'de>
8731 where
8732 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8733 ___D: ::fidl_next::Decoder<'de>,
8734 ___D: ::fidl_next::fuchsia::HandleDecoder,
8735 {
8736 fn decode(
8737 slot_: ::fidl_next::Slot<'_, Self>,
8738 decoder_: &mut ___D,
8739 _: (),
8740 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8741 ::fidl_next::munge! {
8742 let Self {
8743
8744 mut h,
8745
8746 } = slot_;
8747 }
8748
8749 let _field = h.as_mut();
8750 ::fidl_next::Constrained::validate(_field, (1, ()))?;
8751 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
8752
8753 Ok(())
8754 }
8755 }
8756
8757 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
8758 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithDefaultRights;
8759 }
8760
8761 #[derive(Debug)]
8763 #[repr(C)]
8764 pub struct ArrayOfVectorOfEventInStructWithReducedRights<'de> {
8765 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8766 }
8767
8768 static_assertions::const_assert_eq!(
8769 std::mem::size_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
8770 16
8771 );
8772 static_assertions::const_assert_eq!(
8773 std::mem::align_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
8774 8
8775 );
8776
8777 static_assertions::const_assert_eq!(
8778 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithReducedRights<'_>, h),
8779 0
8780 );
8781
8782 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithReducedRights<'_> {
8783 type Constraint = ();
8784
8785 fn validate(
8786 _: ::fidl_next::Slot<'_, Self>,
8787 _: Self::Constraint,
8788 ) -> Result<(), ::fidl_next::ValidationError> {
8789 Ok(())
8790 }
8791 }
8792
8793 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithReducedRights<'static> {
8794 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithReducedRights<'de>;
8795
8796 #[inline]
8797 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8798 ::fidl_next::munge! {
8799 let Self {
8800
8801 h,
8802
8803 } = &mut *out_;
8804 }
8805
8806 ::fidl_next::Wire::zero_padding(h);
8807 }
8808 }
8809
8810 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8811 for ArrayOfVectorOfEventInStructWithReducedRights<'de>
8812 where
8813 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8814 ___D: ::fidl_next::Decoder<'de>,
8815 ___D: ::fidl_next::fuchsia::HandleDecoder,
8816 {
8817 fn decode(
8818 slot_: ::fidl_next::Slot<'_, Self>,
8819 decoder_: &mut ___D,
8820 _: (),
8821 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8822 ::fidl_next::munge! {
8823 let Self {
8824
8825 mut h,
8826
8827 } = slot_;
8828 }
8829
8830 let _field = h.as_mut();
8831 ::fidl_next::Constrained::validate(_field, (1, ()))?;
8832 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
8833
8834 Ok(())
8835 }
8836 }
8837
8838 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithReducedRights<'de> {
8839 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithReducedRights;
8840 }
8841
8842 #[repr(C)]
8844 pub struct ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8845 pub(crate) table: ::fidl_next::wire::Table<'de>,
8846 }
8847
8848 impl<'de> Drop for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8849 fn drop(&mut self) {
8850 let _ = self.table.get(1)
8851 .map(|envelope| unsafe {
8852 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
8853 });
8854 }
8855 }
8856
8857 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRights<'_> {
8858 type Constraint = ();
8859
8860 fn validate(
8861 _: ::fidl_next::Slot<'_, Self>,
8862 _: Self::Constraint,
8863 ) -> Result<(), ::fidl_next::ValidationError> {
8864 Ok(())
8865 }
8866 }
8867
8868 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRights<'static> {
8869 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRights<'de>;
8870
8871 #[inline]
8872 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8873 ::fidl_next::munge!(let Self { table } = out);
8874 ::fidl_next::wire::Table::zero_padding(table);
8875 }
8876 }
8877
8878 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8879 for ArrayOfVectorOfEventInTableWithDefaultRights<'de>
8880 where
8881 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8882 ___D: ::fidl_next::fuchsia::HandleDecoder,
8883 {
8884 fn decode(
8885 slot: ::fidl_next::Slot<'_, Self>,
8886 decoder: &mut ___D,
8887 _: (),
8888 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8889 ::fidl_next::munge!(let Self { table } = slot);
8890
8891 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8892 match ordinal {
8893 0 => unsafe { ::core::hint::unreachable_unchecked() },
8894
8895 1 => {
8896 ::fidl_next::wire::Envelope::decode_as::<
8897 ___D,
8898 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8899 >(slot.as_mut(), decoder, (1, ()))?;
8900
8901 Ok(())
8902 }
8903
8904 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8905 }
8906 })
8907 }
8908 }
8909
8910 impl<'de> ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8911 pub fn h(
8912 &self,
8913 ) -> ::core::option::Option<
8914 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8915 > {
8916 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8917 }
8918 }
8919
8920 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8921 fn fmt(
8922 &self,
8923 f: &mut ::core::fmt::Formatter<'_>,
8924 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8925 f.debug_struct("ArrayOfVectorOfEventInTableWithDefaultRights")
8926 .field("h", &self.h())
8927 .finish()
8928 }
8929 }
8930
8931 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8932 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRights;
8933 }
8934
8935 #[derive(Debug)]
8937 #[repr(C)]
8938 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
8939 pub t: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>,
8940 }
8941
8942 static_assertions::const_assert_eq!(
8943 std::mem::size_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
8944 16
8945 );
8946 static_assertions::const_assert_eq!(
8947 std::mem::align_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
8948 8
8949 );
8950
8951 static_assertions::const_assert_eq!(
8952 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>, t),
8953 0
8954 );
8955
8956 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_> {
8957 type Constraint = ();
8958
8959 fn validate(
8960 _: ::fidl_next::Slot<'_, Self>,
8961 _: Self::Constraint,
8962 ) -> Result<(), ::fidl_next::ValidationError> {
8963 Ok(())
8964 }
8965 }
8966
8967 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static> {
8968 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>;
8969
8970 #[inline]
8971 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8972 ::fidl_next::munge! {
8973 let Self {
8974
8975 t,
8976
8977 } = &mut *out_;
8978 }
8979
8980 ::fidl_next::Wire::zero_padding(t);
8981 }
8982 }
8983
8984 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8985 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>
8986 where
8987 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8988 ___D: ::fidl_next::Decoder<'de>,
8989 ___D: ::fidl_next::fuchsia::HandleDecoder,
8990 {
8991 fn decode(
8992 slot_: ::fidl_next::Slot<'_, Self>,
8993 decoder_: &mut ___D,
8994 _: (),
8995 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8996 ::fidl_next::munge! {
8997 let Self {
8998
8999 mut t,
9000
9001 } = slot_;
9002 }
9003
9004 let _field = t.as_mut();
9005
9006 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
9007
9008 Ok(())
9009 }
9010 }
9011
9012 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
9013 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRightsStruct;
9014 }
9015
9016 #[repr(C)]
9018 pub struct ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9019 pub(crate) table: ::fidl_next::wire::Table<'de>,
9020 }
9021
9022 impl<'de> Drop for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9023 fn drop(&mut self) {
9024 let _ = self.table.get(1)
9025 .map(|envelope| unsafe {
9026 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9027 });
9028 }
9029 }
9030
9031 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRights<'_> {
9032 type Constraint = ();
9033
9034 fn validate(
9035 _: ::fidl_next::Slot<'_, Self>,
9036 _: Self::Constraint,
9037 ) -> Result<(), ::fidl_next::ValidationError> {
9038 Ok(())
9039 }
9040 }
9041
9042 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRights<'static> {
9043 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRights<'de>;
9044
9045 #[inline]
9046 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9047 ::fidl_next::munge!(let Self { table } = out);
9048 ::fidl_next::wire::Table::zero_padding(table);
9049 }
9050 }
9051
9052 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9053 for ArrayOfVectorOfEventInTableWithReducedRights<'de>
9054 where
9055 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9056 ___D: ::fidl_next::fuchsia::HandleDecoder,
9057 {
9058 fn decode(
9059 slot: ::fidl_next::Slot<'_, Self>,
9060 decoder: &mut ___D,
9061 _: (),
9062 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9063 ::fidl_next::munge!(let Self { table } = slot);
9064
9065 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9066 match ordinal {
9067 0 => unsafe { ::core::hint::unreachable_unchecked() },
9068
9069 1 => {
9070 ::fidl_next::wire::Envelope::decode_as::<
9071 ___D,
9072 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9073 >(slot.as_mut(), decoder, (1, ()))?;
9074
9075 Ok(())
9076 }
9077
9078 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9079 }
9080 })
9081 }
9082 }
9083
9084 impl<'de> ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9085 pub fn h(
9086 &self,
9087 ) -> ::core::option::Option<
9088 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9089 > {
9090 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9091 }
9092 }
9093
9094 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9095 fn fmt(
9096 &self,
9097 f: &mut ::core::fmt::Formatter<'_>,
9098 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9099 f.debug_struct("ArrayOfVectorOfEventInTableWithReducedRights")
9100 .field("h", &self.h())
9101 .finish()
9102 }
9103 }
9104
9105 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9106 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRights;
9107 }
9108
9109 #[derive(Debug)]
9111 #[repr(C)]
9112 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9113 pub t: crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>,
9114 }
9115
9116 static_assertions::const_assert_eq!(
9117 std::mem::size_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9118 16
9119 );
9120 static_assertions::const_assert_eq!(
9121 std::mem::align_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9122 8
9123 );
9124
9125 static_assertions::const_assert_eq!(
9126 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>, t),
9127 0
9128 );
9129
9130 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_> {
9131 type Constraint = ();
9132
9133 fn validate(
9134 _: ::fidl_next::Slot<'_, Self>,
9135 _: Self::Constraint,
9136 ) -> Result<(), ::fidl_next::ValidationError> {
9137 Ok(())
9138 }
9139 }
9140
9141 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static> {
9142 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>;
9143
9144 #[inline]
9145 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9146 ::fidl_next::munge! {
9147 let Self {
9148
9149 t,
9150
9151 } = &mut *out_;
9152 }
9153
9154 ::fidl_next::Wire::zero_padding(t);
9155 }
9156 }
9157
9158 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9159 for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>
9160 where
9161 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9162 ___D: ::fidl_next::Decoder<'de>,
9163 ___D: ::fidl_next::fuchsia::HandleDecoder,
9164 {
9165 fn decode(
9166 slot_: ::fidl_next::Slot<'_, Self>,
9167 decoder_: &mut ___D,
9168 _: (),
9169 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9170 ::fidl_next::munge! {
9171 let Self {
9172
9173 mut t,
9174
9175 } = slot_;
9176 }
9177
9178 let _field = t.as_mut();
9179
9180 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
9181
9182 Ok(())
9183 }
9184 }
9185
9186 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9187 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRightsStruct;
9188 }
9189
9190 #[repr(transparent)]
9192 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9193 pub(crate) raw: ::fidl_next::wire::Union,
9194 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9195 }
9196
9197 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9198 fn drop(&mut self) {
9199 match self.raw.ordinal() {
9200 1 => {
9201 let _ = unsafe {
9202 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9203 };
9204 }
9205
9206 _ => unsafe { ::core::hint::unreachable_unchecked() },
9207 }
9208 }
9209 }
9210
9211 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
9212 type Constraint = ();
9213
9214 fn validate(
9215 _: ::fidl_next::Slot<'_, Self>,
9216 _: Self::Constraint,
9217 ) -> Result<(), ::fidl_next::ValidationError> {
9218 Ok(())
9219 }
9220 }
9221
9222 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
9223 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
9224
9225 #[inline]
9226 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9227 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9228 ::fidl_next::wire::Union::zero_padding(raw);
9229 }
9230 }
9231
9232 pub mod array_of_vector_of_event_in_union_with_default_rights {
9233 pub enum Ref<'de> {
9234 H(&'de [::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
9254 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9255 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
9256 where
9257 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9258 ___D: ::fidl_next::Decoder<'de>,
9259 ___D: ::fidl_next::fuchsia::HandleDecoder,
9260 {
9261 fn decode(
9262 mut slot: ::fidl_next::Slot<'_, Self>,
9263 decoder: &mut ___D,
9264 _: (),
9265 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9266 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9267 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9268 1 => ::fidl_next::wire::Union::decode_as::<
9269 ___D,
9270 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9271 >(raw, decoder, (1, ()))?,
9272
9273 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9274 }
9275
9276 Ok(())
9277 }
9278 }
9279
9280 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9281 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9282 match self.raw.ordinal() {
9283 1 => unsafe {
9284 self.raw.get().deref_unchecked::<
9285 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9286 >().fmt(f)
9287 },
9288 _ => unsafe { ::core::hint::unreachable_unchecked() },
9289 }
9290 }
9291 }
9292
9293 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9294 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights;
9295 }
9296
9297 #[derive(Debug)]
9299 #[repr(C)]
9300 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9301 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
9302 }
9303
9304 static_assertions::const_assert_eq!(
9305 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9306 16
9307 );
9308 static_assertions::const_assert_eq!(
9309 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9310 8
9311 );
9312
9313 static_assertions::const_assert_eq!(
9314 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>, u),
9315 0
9316 );
9317
9318 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_> {
9319 type Constraint = ();
9320
9321 fn validate(
9322 _: ::fidl_next::Slot<'_, Self>,
9323 _: Self::Constraint,
9324 ) -> Result<(), ::fidl_next::ValidationError> {
9325 Ok(())
9326 }
9327 }
9328
9329 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static> {
9330 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>;
9331
9332 #[inline]
9333 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9334 ::fidl_next::munge! {
9335 let Self {
9336
9337 u,
9338
9339 } = &mut *out_;
9340 }
9341
9342 ::fidl_next::Wire::zero_padding(u);
9343 }
9344 }
9345
9346 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9347 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>
9348 where
9349 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9350 ___D: ::fidl_next::Decoder<'de>,
9351 ___D: ::fidl_next::fuchsia::HandleDecoder,
9352 {
9353 fn decode(
9354 slot_: ::fidl_next::Slot<'_, Self>,
9355 decoder_: &mut ___D,
9356 _: (),
9357 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9358 ::fidl_next::munge! {
9359 let Self {
9360
9361 mut u,
9362
9363 } = slot_;
9364 }
9365
9366 let _field = u.as_mut();
9367
9368 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9369
9370 Ok(())
9371 }
9372 }
9373
9374 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9375 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct;
9376 }
9377
9378 #[repr(transparent)]
9380 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9381 pub(crate) raw: ::fidl_next::wire::Union,
9382 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9383 }
9384
9385 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9386 fn drop(&mut self) {
9387 match self.raw.ordinal() {
9388 1 => {
9389 let _ = unsafe {
9390 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9391 };
9392 }
9393
9394 _ => unsafe { ::core::hint::unreachable_unchecked() },
9395 }
9396 }
9397 }
9398
9399 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
9400 type Constraint = ();
9401
9402 fn validate(
9403 _: ::fidl_next::Slot<'_, Self>,
9404 _: Self::Constraint,
9405 ) -> Result<(), ::fidl_next::ValidationError> {
9406 Ok(())
9407 }
9408 }
9409
9410 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
9411 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
9412
9413 #[inline]
9414 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9415 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9416 ::fidl_next::wire::Union::zero_padding(raw);
9417 }
9418 }
9419
9420 pub mod array_of_vector_of_event_in_union_with_reduced_rights {
9421 pub enum Ref<'de> {
9422 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9423 }
9424 }
9425
9426 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9427 pub fn as_ref(
9428 &self,
9429 ) -> crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref<'_> {
9430 match self.raw.ordinal() {
9431 1 => crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref::H(
9432 unsafe {
9433 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9434 },
9435 ),
9436
9437 _ => unsafe { ::core::hint::unreachable_unchecked() },
9438 }
9439 }
9440 }
9441
9442 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9443 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
9444 where
9445 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9446 ___D: ::fidl_next::Decoder<'de>,
9447 ___D: ::fidl_next::fuchsia::HandleDecoder,
9448 {
9449 fn decode(
9450 mut slot: ::fidl_next::Slot<'_, Self>,
9451 decoder: &mut ___D,
9452 _: (),
9453 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9454 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9455 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9456 1 => ::fidl_next::wire::Union::decode_as::<
9457 ___D,
9458 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9459 >(raw, decoder, (1, ()))?,
9460
9461 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9462 }
9463
9464 Ok(())
9465 }
9466 }
9467
9468 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9469 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9470 match self.raw.ordinal() {
9471 1 => unsafe {
9472 self.raw.get().deref_unchecked::<
9473 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9474 >().fmt(f)
9475 },
9476 _ => unsafe { ::core::hint::unreachable_unchecked() },
9477 }
9478 }
9479 }
9480
9481 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9482 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights;
9483 }
9484
9485 #[derive(Debug)]
9487 #[repr(C)]
9488 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9489 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
9490 }
9491
9492 static_assertions::const_assert_eq!(
9493 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9494 16
9495 );
9496 static_assertions::const_assert_eq!(
9497 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9498 8
9499 );
9500
9501 static_assertions::const_assert_eq!(
9502 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>, u),
9503 0
9504 );
9505
9506 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_> {
9507 type Constraint = ();
9508
9509 fn validate(
9510 _: ::fidl_next::Slot<'_, Self>,
9511 _: Self::Constraint,
9512 ) -> Result<(), ::fidl_next::ValidationError> {
9513 Ok(())
9514 }
9515 }
9516
9517 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static> {
9518 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>;
9519
9520 #[inline]
9521 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9522 ::fidl_next::munge! {
9523 let Self {
9524
9525 u,
9526
9527 } = &mut *out_;
9528 }
9529
9530 ::fidl_next::Wire::zero_padding(u);
9531 }
9532 }
9533
9534 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9535 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>
9536 where
9537 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9538 ___D: ::fidl_next::Decoder<'de>,
9539 ___D: ::fidl_next::fuchsia::HandleDecoder,
9540 {
9541 fn decode(
9542 slot_: ::fidl_next::Slot<'_, Self>,
9543 decoder_: &mut ___D,
9544 _: (),
9545 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9546 ::fidl_next::munge! {
9547 let Self {
9548
9549 mut u,
9550
9551 } = slot_;
9552 }
9553
9554 let _field = u.as_mut();
9555
9556 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9557
9558 Ok(())
9559 }
9560 }
9561
9562 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9563 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRightsStruct;
9564 }
9565
9566 #[derive(Debug)]
9568 #[repr(C)]
9569 pub struct Bounded32NonnullableVectorOfHandles<'de> {
9570 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
9571 }
9572
9573 static_assertions::const_assert_eq!(
9574 std::mem::size_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9575 16
9576 );
9577 static_assertions::const_assert_eq!(
9578 std::mem::align_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9579 8
9580 );
9581
9582 static_assertions::const_assert_eq!(
9583 std::mem::offset_of!(Bounded32NonnullableVectorOfHandles<'_>, vh0),
9584 0
9585 );
9586
9587 impl ::fidl_next::Constrained for Bounded32NonnullableVectorOfHandles<'_> {
9588 type Constraint = ();
9589
9590 fn validate(
9591 _: ::fidl_next::Slot<'_, Self>,
9592 _: Self::Constraint,
9593 ) -> Result<(), ::fidl_next::ValidationError> {
9594 Ok(())
9595 }
9596 }
9597
9598 unsafe impl ::fidl_next::Wire for Bounded32NonnullableVectorOfHandles<'static> {
9599 type Narrowed<'de> = Bounded32NonnullableVectorOfHandles<'de>;
9600
9601 #[inline]
9602 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9603 ::fidl_next::munge! {
9604 let Self {
9605
9606 vh0,
9607
9608 } = &mut *out_;
9609 }
9610
9611 ::fidl_next::Wire::zero_padding(vh0);
9612 }
9613 }
9614
9615 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NonnullableVectorOfHandles<'de>
9616 where
9617 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9618 ___D: ::fidl_next::Decoder<'de>,
9619 ___D: ::fidl_next::fuchsia::HandleDecoder,
9620 {
9621 fn decode(
9622 slot_: ::fidl_next::Slot<'_, Self>,
9623 decoder_: &mut ___D,
9624 _: (),
9625 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9626 ::fidl_next::munge! {
9627 let Self {
9628
9629 mut vh0,
9630
9631 } = slot_;
9632 }
9633
9634 let _field = vh0.as_mut();
9635 ::fidl_next::Constrained::validate(_field, (32, ()))?;
9636 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
9637
9638 let vh0 = unsafe { vh0.deref_unchecked() };
9639
9640 if vh0.len() > 32 {
9641 return Err(::fidl_next::DecodeError::VectorTooLong {
9642 size: vh0.len() as u64,
9643 limit: 32,
9644 });
9645 }
9646
9647 Ok(())
9648 }
9649 }
9650
9651 impl<'de> ::fidl_next::IntoNatural for Bounded32NonnullableVectorOfHandles<'de> {
9652 type Natural = crate::natural::Bounded32NonnullableVectorOfHandles;
9653 }
9654
9655 #[derive(Debug)]
9657 #[repr(C)]
9658 pub struct Bounded32NullableVectorOfHandles<'de> {
9659 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
9660 }
9661
9662 static_assertions::const_assert_eq!(
9663 std::mem::size_of::<Bounded32NullableVectorOfHandles<'_>>(),
9664 16
9665 );
9666 static_assertions::const_assert_eq!(
9667 std::mem::align_of::<Bounded32NullableVectorOfHandles<'_>>(),
9668 8
9669 );
9670
9671 static_assertions::const_assert_eq!(
9672 std::mem::offset_of!(Bounded32NullableVectorOfHandles<'_>, vh0),
9673 0
9674 );
9675
9676 impl ::fidl_next::Constrained for Bounded32NullableVectorOfHandles<'_> {
9677 type Constraint = ();
9678
9679 fn validate(
9680 _: ::fidl_next::Slot<'_, Self>,
9681 _: Self::Constraint,
9682 ) -> Result<(), ::fidl_next::ValidationError> {
9683 Ok(())
9684 }
9685 }
9686
9687 unsafe impl ::fidl_next::Wire for Bounded32NullableVectorOfHandles<'static> {
9688 type Narrowed<'de> = Bounded32NullableVectorOfHandles<'de>;
9689
9690 #[inline]
9691 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9692 ::fidl_next::munge! {
9693 let Self {
9694
9695 vh0,
9696
9697 } = &mut *out_;
9698 }
9699
9700 ::fidl_next::Wire::zero_padding(vh0);
9701 }
9702 }
9703
9704 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NullableVectorOfHandles<'de>
9705 where
9706 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9707 ___D: ::fidl_next::Decoder<'de>,
9708 ___D: ::fidl_next::fuchsia::HandleDecoder,
9709 {
9710 fn decode(
9711 slot_: ::fidl_next::Slot<'_, Self>,
9712 decoder_: &mut ___D,
9713 _: (),
9714 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9715 ::fidl_next::munge! {
9716 let Self {
9717
9718 mut vh0,
9719
9720 } = slot_;
9721 }
9722
9723 let _field = vh0.as_mut();
9724 ::fidl_next::Constrained::validate(_field, (32, ()))?;
9725 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
9726
9727 let vh0 = unsafe { vh0.deref_unchecked() };
9728
9729 if let Some(vh0) = vh0.as_ref() {
9730 if vh0.len() > 32 {
9731 return Err(::fidl_next::DecodeError::VectorTooLong {
9732 size: vh0.len() as u64,
9733 limit: 32,
9734 });
9735 }
9736 }
9737
9738 Ok(())
9739 }
9740 }
9741
9742 impl<'de> ::fidl_next::IntoNatural for Bounded32NullableVectorOfHandles<'de> {
9743 type Natural = crate::natural::Bounded32NullableVectorOfHandles;
9744 }
9745
9746 #[derive(Debug)]
9748 #[repr(C)]
9749 pub struct BoxOfSingleHandle<'de> {
9750 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleHandle>,
9751 }
9752
9753 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleHandle<'_>>(), 8);
9754 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleHandle<'_>>(), 8);
9755
9756 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleHandle<'_>, b), 0);
9757
9758 impl ::fidl_next::Constrained for BoxOfSingleHandle<'_> {
9759 type Constraint = ();
9760
9761 fn validate(
9762 _: ::fidl_next::Slot<'_, Self>,
9763 _: Self::Constraint,
9764 ) -> Result<(), ::fidl_next::ValidationError> {
9765 Ok(())
9766 }
9767 }
9768
9769 unsafe impl ::fidl_next::Wire for BoxOfSingleHandle<'static> {
9770 type Narrowed<'de> = BoxOfSingleHandle<'de>;
9771
9772 #[inline]
9773 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9774 ::fidl_next::munge! {
9775 let Self {
9776
9777 b,
9778
9779 } = &mut *out_;
9780 }
9781
9782 ::fidl_next::Wire::zero_padding(b);
9783 }
9784 }
9785
9786 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleHandle<'de>
9787 where
9788 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9789 ___D: ::fidl_next::Decoder<'de>,
9790 ___D: ::fidl_next::fuchsia::HandleDecoder,
9791 {
9792 fn decode(
9793 slot_: ::fidl_next::Slot<'_, Self>,
9794 decoder_: &mut ___D,
9795 _: (),
9796 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9797 ::fidl_next::munge! {
9798 let Self {
9799
9800 mut b,
9801
9802 } = slot_;
9803 }
9804
9805 let _field = b.as_mut();
9806
9807 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
9808
9809 Ok(())
9810 }
9811 }
9812
9813 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleHandle<'de> {
9814 type Natural = crate::natural::BoxOfSingleHandle;
9815 }
9816
9817 #[derive(Debug)]
9819 #[repr(C)]
9820 pub struct BoxOfSingleOptionalHandle<'de> {
9821 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleOptionalHandle>,
9822 }
9823
9824 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
9825 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
9826
9827 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleOptionalHandle<'_>, b), 0);
9828
9829 impl ::fidl_next::Constrained for BoxOfSingleOptionalHandle<'_> {
9830 type Constraint = ();
9831
9832 fn validate(
9833 _: ::fidl_next::Slot<'_, Self>,
9834 _: Self::Constraint,
9835 ) -> Result<(), ::fidl_next::ValidationError> {
9836 Ok(())
9837 }
9838 }
9839
9840 unsafe impl ::fidl_next::Wire for BoxOfSingleOptionalHandle<'static> {
9841 type Narrowed<'de> = BoxOfSingleOptionalHandle<'de>;
9842
9843 #[inline]
9844 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9845 ::fidl_next::munge! {
9846 let Self {
9847
9848 b,
9849
9850 } = &mut *out_;
9851 }
9852
9853 ::fidl_next::Wire::zero_padding(b);
9854 }
9855 }
9856
9857 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleOptionalHandle<'de>
9858 where
9859 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9860 ___D: ::fidl_next::Decoder<'de>,
9861 ___D: ::fidl_next::fuchsia::HandleDecoder,
9862 {
9863 fn decode(
9864 slot_: ::fidl_next::Slot<'_, Self>,
9865 decoder_: &mut ___D,
9866 _: (),
9867 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9868 ::fidl_next::munge! {
9869 let Self {
9870
9871 mut b,
9872
9873 } = slot_;
9874 }
9875
9876 let _field = b.as_mut();
9877
9878 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
9879
9880 Ok(())
9881 }
9882 }
9883
9884 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleOptionalHandle<'de> {
9885 type Natural = crate::natural::BoxOfSingleOptionalHandle;
9886 }
9887
9888 #[derive(Debug)]
9890 #[repr(C)]
9891 pub struct LaunchInfo<'de> {
9892 pub url: ::fidl_next::wire::String<'de>,
9893
9894 pub arguments: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::String<'de>>,
9895
9896 pub out: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9897
9898 pub err: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9899
9900 pub directory_request: ::fidl_next::wire::fuchsia::OptionalChannel,
9901
9902 pub flat_namespace: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9903
9904 pub additional_services: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9905 }
9906
9907 static_assertions::const_assert_eq!(std::mem::size_of::<LaunchInfo<'_>>(), 72);
9908 static_assertions::const_assert_eq!(std::mem::align_of::<LaunchInfo<'_>>(), 8);
9909
9910 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, url), 0);
9911
9912 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, arguments), 16);
9913
9914 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, out), 32);
9915
9916 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, err), 40);
9917
9918 static_assertions::const_assert_eq!(
9919 std::mem::offset_of!(LaunchInfo<'_>, directory_request),
9920 48
9921 );
9922
9923 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, flat_namespace), 56);
9924
9925 static_assertions::const_assert_eq!(
9926 std::mem::offset_of!(LaunchInfo<'_>, additional_services),
9927 64
9928 );
9929
9930 impl ::fidl_next::Constrained for LaunchInfo<'_> {
9931 type Constraint = ();
9932
9933 fn validate(
9934 _: ::fidl_next::Slot<'_, Self>,
9935 _: Self::Constraint,
9936 ) -> Result<(), ::fidl_next::ValidationError> {
9937 Ok(())
9938 }
9939 }
9940
9941 unsafe impl ::fidl_next::Wire for LaunchInfo<'static> {
9942 type Narrowed<'de> = LaunchInfo<'de>;
9943
9944 #[inline]
9945 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9946 ::fidl_next::munge! {
9947 let Self {
9948
9949 url,
9950 arguments,
9951 out,
9952 err,
9953 directory_request,
9954 flat_namespace,
9955 additional_services,
9956
9957 } = &mut *out_;
9958 }
9959
9960 ::fidl_next::Wire::zero_padding(url);
9961
9962 ::fidl_next::Wire::zero_padding(arguments);
9963
9964 ::fidl_next::Wire::zero_padding(out);
9965
9966 ::fidl_next::Wire::zero_padding(err);
9967
9968 ::fidl_next::Wire::zero_padding(directory_request);
9969
9970 ::fidl_next::Wire::zero_padding(flat_namespace);
9971
9972 ::fidl_next::Wire::zero_padding(additional_services);
9973
9974 unsafe {
9975 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
9976 }
9977 }
9978 }
9979
9980 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LaunchInfo<'de>
9981 where
9982 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9983 ___D: ::fidl_next::Decoder<'de>,
9984 ___D: ::fidl_next::fuchsia::HandleDecoder,
9985 {
9986 fn decode(
9987 slot_: ::fidl_next::Slot<'_, Self>,
9988 decoder_: &mut ___D,
9989 _: (),
9990 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9991 if slot_.as_bytes()[52..56] != [0u8; 4] {
9992 return Err(::fidl_next::DecodeError::InvalidPadding);
9993 }
9994
9995 ::fidl_next::munge! {
9996 let Self {
9997
9998 mut url,
9999 mut arguments,
10000 mut out,
10001 mut err,
10002 mut directory_request,
10003 mut flat_namespace,
10004 mut additional_services,
10005
10006 } = slot_;
10007 }
10008
10009 let _field = url.as_mut();
10010 ::fidl_next::Constrained::validate(_field, 200)?;
10011 ::fidl_next::Decode::decode(url.as_mut(), decoder_, 200)?;
10012
10013 let url = unsafe { url.deref_unchecked() };
10014
10015 if url.len() > 200 {
10016 return Err(::fidl_next::DecodeError::VectorTooLong {
10017 size: url.len() as u64,
10018 limit: 200,
10019 });
10020 }
10021
10022 let _field = arguments.as_mut();
10023 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
10024 ::fidl_next::Decode::decode(arguments.as_mut(), decoder_, (4294967295, 4294967295))?;
10025
10026 let _field = out.as_mut();
10027
10028 ::fidl_next::Decode::decode(out.as_mut(), decoder_, ())?;
10029
10030 let _field = err.as_mut();
10031
10032 ::fidl_next::Decode::decode(err.as_mut(), decoder_, ())?;
10033
10034 let _field = directory_request.as_mut();
10035
10036 ::fidl_next::Decode::decode(directory_request.as_mut(), decoder_, ())?;
10037
10038 let _field = flat_namespace.as_mut();
10039
10040 ::fidl_next::Decode::decode(flat_namespace.as_mut(), decoder_, ())?;
10041
10042 let _field = additional_services.as_mut();
10043
10044 ::fidl_next::Decode::decode(additional_services.as_mut(), decoder_, ())?;
10045
10046 Ok(())
10047 }
10048 }
10049
10050 impl<'de> ::fidl_next::IntoNatural for LaunchInfo<'de> {
10051 type Natural = crate::natural::LaunchInfo;
10052 }
10053
10054 #[derive(Debug)]
10056 #[repr(C)]
10057 pub struct CreateComponentRequest<'de> {
10058 pub launch_info: crate::wire::LaunchInfo<'de>,
10059
10060 pub controller: ::fidl_next::ServerEnd<
10061 crate::ComponentController,
10062 ::fidl_next::wire::fuchsia::OptionalChannel,
10063 >,
10064 }
10065
10066 static_assertions::const_assert_eq!(std::mem::size_of::<CreateComponentRequest<'_>>(), 80);
10067 static_assertions::const_assert_eq!(std::mem::align_of::<CreateComponentRequest<'_>>(), 8);
10068
10069 static_assertions::const_assert_eq!(
10070 std::mem::offset_of!(CreateComponentRequest<'_>, launch_info),
10071 0
10072 );
10073
10074 static_assertions::const_assert_eq!(
10075 std::mem::offset_of!(CreateComponentRequest<'_>, controller),
10076 72
10077 );
10078
10079 impl ::fidl_next::Constrained for CreateComponentRequest<'_> {
10080 type Constraint = ();
10081
10082 fn validate(
10083 _: ::fidl_next::Slot<'_, Self>,
10084 _: Self::Constraint,
10085 ) -> Result<(), ::fidl_next::ValidationError> {
10086 Ok(())
10087 }
10088 }
10089
10090 unsafe impl ::fidl_next::Wire for CreateComponentRequest<'static> {
10091 type Narrowed<'de> = CreateComponentRequest<'de>;
10092
10093 #[inline]
10094 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10095 ::fidl_next::munge! {
10096 let Self {
10097
10098 launch_info,
10099 controller,
10100
10101 } = &mut *out_;
10102 }
10103
10104 ::fidl_next::Wire::zero_padding(launch_info);
10105
10106 ::fidl_next::Wire::zero_padding(controller);
10107
10108 unsafe {
10109 out_.as_mut_ptr().cast::<u8>().add(76).write_bytes(0, 4);
10110 }
10111 }
10112 }
10113
10114 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CreateComponentRequest<'de>
10115 where
10116 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10117 ___D: ::fidl_next::Decoder<'de>,
10118 ___D: ::fidl_next::fuchsia::HandleDecoder,
10119 {
10120 fn decode(
10121 slot_: ::fidl_next::Slot<'_, Self>,
10122 decoder_: &mut ___D,
10123 _: (),
10124 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10125 if slot_.as_bytes()[76..80] != [0u8; 4] {
10126 return Err(::fidl_next::DecodeError::InvalidPadding);
10127 }
10128
10129 ::fidl_next::munge! {
10130 let Self {
10131
10132 mut launch_info,
10133 mut controller,
10134
10135 } = slot_;
10136 }
10137
10138 let _field = launch_info.as_mut();
10139
10140 ::fidl_next::Decode::decode(launch_info.as_mut(), decoder_, ())?;
10141
10142 let _field = controller.as_mut();
10143
10144 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
10145
10146 Ok(())
10147 }
10148 }
10149
10150 impl<'de> ::fidl_next::IntoNatural for CreateComponentRequest<'de> {
10151 type Natural = crate::natural::CreateComponentRequest;
10152 }
10153
10154 #[repr(C)]
10156 pub struct EmptyResourceTable<'de> {
10157 pub(crate) table: ::fidl_next::wire::Table<'de>,
10158 }
10159
10160 impl<'de> Drop for EmptyResourceTable<'de> {
10161 fn drop(&mut self) {}
10162 }
10163
10164 impl ::fidl_next::Constrained for EmptyResourceTable<'_> {
10165 type Constraint = ();
10166
10167 fn validate(
10168 _: ::fidl_next::Slot<'_, Self>,
10169 _: Self::Constraint,
10170 ) -> Result<(), ::fidl_next::ValidationError> {
10171 Ok(())
10172 }
10173 }
10174
10175 unsafe impl ::fidl_next::Wire for EmptyResourceTable<'static> {
10176 type Narrowed<'de> = EmptyResourceTable<'de>;
10177
10178 #[inline]
10179 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10180 ::fidl_next::munge!(let Self { table } = out);
10181 ::fidl_next::wire::Table::zero_padding(table);
10182 }
10183 }
10184
10185 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTable<'de>
10186 where
10187 ___D: ::fidl_next::Decoder<'de> + ?Sized,
10188 ___D: ::fidl_next::fuchsia::HandleDecoder,
10189 {
10190 fn decode(
10191 slot: ::fidl_next::Slot<'_, Self>,
10192 decoder: &mut ___D,
10193 _: (),
10194 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10195 ::fidl_next::munge!(let Self { table } = slot);
10196
10197 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10198 match ordinal {
10199 0 => unsafe { ::core::hint::unreachable_unchecked() },
10200
10201 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10202 }
10203 })
10204 }
10205 }
10206
10207 impl<'de> EmptyResourceTable<'de> {}
10208
10209 impl<'de> ::core::fmt::Debug for EmptyResourceTable<'de> {
10210 fn fmt(
10211 &self,
10212 f: &mut ::core::fmt::Formatter<'_>,
10213 ) -> ::core::result::Result<(), ::core::fmt::Error> {
10214 f.debug_struct("EmptyResourceTable").finish()
10215 }
10216 }
10217
10218 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTable<'de> {
10219 type Natural = crate::natural::EmptyResourceTable;
10220 }
10221
10222 #[derive(Debug)]
10224 #[repr(C)]
10225 pub struct EmptyResourceTableStruct<'de> {
10226 pub table: crate::wire::EmptyResourceTable<'de>,
10227 }
10228
10229 static_assertions::const_assert_eq!(std::mem::size_of::<EmptyResourceTableStruct<'_>>(), 16);
10230 static_assertions::const_assert_eq!(std::mem::align_of::<EmptyResourceTableStruct<'_>>(), 8);
10231
10232 static_assertions::const_assert_eq!(
10233 std::mem::offset_of!(EmptyResourceTableStruct<'_>, table),
10234 0
10235 );
10236
10237 impl ::fidl_next::Constrained for EmptyResourceTableStruct<'_> {
10238 type Constraint = ();
10239
10240 fn validate(
10241 _: ::fidl_next::Slot<'_, Self>,
10242 _: Self::Constraint,
10243 ) -> Result<(), ::fidl_next::ValidationError> {
10244 Ok(())
10245 }
10246 }
10247
10248 unsafe impl ::fidl_next::Wire for EmptyResourceTableStruct<'static> {
10249 type Narrowed<'de> = EmptyResourceTableStruct<'de>;
10250
10251 #[inline]
10252 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10253 ::fidl_next::munge! {
10254 let Self {
10255
10256 table,
10257
10258 } = &mut *out_;
10259 }
10260
10261 ::fidl_next::Wire::zero_padding(table);
10262 }
10263 }
10264
10265 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTableStruct<'de>
10266 where
10267 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10268 ___D: ::fidl_next::Decoder<'de>,
10269 ___D: ::fidl_next::fuchsia::HandleDecoder,
10270 {
10271 fn decode(
10272 slot_: ::fidl_next::Slot<'_, Self>,
10273 decoder_: &mut ___D,
10274 _: (),
10275 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10276 ::fidl_next::munge! {
10277 let Self {
10278
10279 mut table,
10280
10281 } = slot_;
10282 }
10283
10284 let _field = table.as_mut();
10285
10286 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
10287
10288 Ok(())
10289 }
10290 }
10291
10292 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTableStruct<'de> {
10293 type Natural = crate::natural::EmptyResourceTableStruct;
10294 }
10295
10296 #[repr(transparent)]
10298 pub struct EnvelopeInliningTestUnion<'de> {
10299 pub(crate) raw: ::fidl_next::wire::Union,
10300 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
10301 }
10302
10303 impl<'de> Drop for EnvelopeInliningTestUnion<'de> {
10304 fn drop(&mut self) {
10305 match self.raw.ordinal() {
10306 1 => {
10307 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
10308 }
10309
10310 2 => {
10311 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint64>() };
10312 }
10313
10314 3 => {
10315 let _ = unsafe {
10316 self.raw
10317 .get()
10318 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10319 };
10320 }
10321
10322 _ => (),
10323 }
10324 }
10325 }
10326
10327 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
10328 type Constraint = ();
10329
10330 fn validate(
10331 _: ::fidl_next::Slot<'_, Self>,
10332 _: Self::Constraint,
10333 ) -> Result<(), ::fidl_next::ValidationError> {
10334 Ok(())
10335 }
10336 }
10337
10338 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
10339 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
10340
10341 #[inline]
10342 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10343 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
10344 ::fidl_next::wire::Union::zero_padding(raw);
10345 }
10346 }
10347
10348 pub mod envelope_inlining_test_union {
10349 pub enum Ref<'de> {
10350 Small(&'de ::fidl_next::wire::Uint32),
10351
10352 Large(&'de ::fidl_next::wire::Uint64),
10353
10354 Handle(&'de ::fidl_next::wire::fuchsia::NullableHandle),
10355
10356 UnknownOrdinal_(u64),
10357 }
10358 }
10359
10360 impl<'de> EnvelopeInliningTestUnion<'de> {
10361 pub fn as_ref(&self) -> crate::wire::envelope_inlining_test_union::Ref<'_> {
10362 match self.raw.ordinal() {
10363 1 => crate::wire::envelope_inlining_test_union::Ref::Small(unsafe {
10364 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
10365 }),
10366
10367 2 => crate::wire::envelope_inlining_test_union::Ref::Large(unsafe {
10368 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>()
10369 }),
10370
10371 3 => crate::wire::envelope_inlining_test_union::Ref::Handle(unsafe {
10372 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10373 }),
10374
10375 unknown => crate::wire::envelope_inlining_test_union::Ref::UnknownOrdinal_(unknown),
10376 }
10377 }
10378 }
10379
10380 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
10381 where
10382 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10383 ___D: ::fidl_next::Decoder<'de>,
10384 ___D: ::fidl_next::fuchsia::HandleDecoder,
10385 {
10386 fn decode(
10387 mut slot: ::fidl_next::Slot<'_, Self>,
10388 decoder: &mut ___D,
10389 _: (),
10390 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10391 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
10392 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
10393 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
10394 raw,
10395 decoder,
10396 (),
10397 )?,
10398
10399 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
10400 raw,
10401 decoder,
10402 (),
10403 )?,
10404
10405 3 => ::fidl_next::wire::Union::decode_as::<
10406 ___D,
10407 ::fidl_next::wire::fuchsia::NullableHandle,
10408 >(raw, decoder, ())?,
10409
10410 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
10411 }
10412
10413 Ok(())
10414 }
10415 }
10416
10417 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
10418 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10419 match self.raw.ordinal() {
10420 1 => unsafe {
10421 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
10422 },
10423 2 => unsafe {
10424 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>().fmt(f)
10425 },
10426 3 => unsafe {
10427 self.raw
10428 .get()
10429 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10430 .fmt(f)
10431 },
10432 _ => unsafe { ::core::hint::unreachable_unchecked() },
10433 }
10434 }
10435 }
10436
10437 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
10438 type Natural = crate::natural::EnvelopeInliningTestUnion;
10439 }
10440
10441 #[derive(Debug)]
10443 #[repr(C)]
10444 pub struct EnvelopeInliningTestUnionStruct<'de> {
10445 pub u: crate::wire::EnvelopeInliningTestUnion<'de>,
10446 }
10447
10448 static_assertions::const_assert_eq!(
10449 std::mem::size_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10450 16
10451 );
10452 static_assertions::const_assert_eq!(
10453 std::mem::align_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10454 8
10455 );
10456
10457 static_assertions::const_assert_eq!(
10458 std::mem::offset_of!(EnvelopeInliningTestUnionStruct<'_>, u),
10459 0
10460 );
10461
10462 impl ::fidl_next::Constrained for EnvelopeInliningTestUnionStruct<'_> {
10463 type Constraint = ();
10464
10465 fn validate(
10466 _: ::fidl_next::Slot<'_, Self>,
10467 _: Self::Constraint,
10468 ) -> Result<(), ::fidl_next::ValidationError> {
10469 Ok(())
10470 }
10471 }
10472
10473 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnionStruct<'static> {
10474 type Narrowed<'de> = EnvelopeInliningTestUnionStruct<'de>;
10475
10476 #[inline]
10477 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10478 ::fidl_next::munge! {
10479 let Self {
10480
10481 u,
10482
10483 } = &mut *out_;
10484 }
10485
10486 ::fidl_next::Wire::zero_padding(u);
10487 }
10488 }
10489
10490 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnionStruct<'de>
10491 where
10492 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10493 ___D: ::fidl_next::Decoder<'de>,
10494 ___D: ::fidl_next::fuchsia::HandleDecoder,
10495 {
10496 fn decode(
10497 slot_: ::fidl_next::Slot<'_, Self>,
10498 decoder_: &mut ___D,
10499 _: (),
10500 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10501 ::fidl_next::munge! {
10502 let Self {
10503
10504 mut u,
10505
10506 } = slot_;
10507 }
10508
10509 let _field = u.as_mut();
10510
10511 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
10512
10513 Ok(())
10514 }
10515 }
10516
10517 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnionStruct<'de> {
10518 type Natural = crate::natural::EnvelopeInliningTestUnionStruct;
10519 }
10520
10521 #[derive(Debug)]
10523 #[repr(C)]
10524 pub struct EventWithDefaultRights {
10525 pub h: ::fidl_next::wire::fuchsia::Event,
10526 }
10527
10528 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithDefaultRights>(), 4);
10529 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithDefaultRights>(), 4);
10530
10531 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithDefaultRights, h), 0);
10532
10533 impl ::fidl_next::Constrained for EventWithDefaultRights {
10534 type Constraint = ();
10535
10536 fn validate(
10537 _: ::fidl_next::Slot<'_, Self>,
10538 _: Self::Constraint,
10539 ) -> Result<(), ::fidl_next::ValidationError> {
10540 Ok(())
10541 }
10542 }
10543
10544 unsafe impl ::fidl_next::Wire for EventWithDefaultRights {
10545 type Narrowed<'de> = EventWithDefaultRights;
10546
10547 #[inline]
10548 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10549 ::fidl_next::munge! {
10550 let Self {
10551
10552 h,
10553
10554 } = &mut *out_;
10555 }
10556
10557 ::fidl_next::Wire::zero_padding(h);
10558 }
10559 }
10560
10561 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithDefaultRights
10562 where
10563 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10564 ___D: ::fidl_next::fuchsia::HandleDecoder,
10565 {
10566 fn decode(
10567 slot_: ::fidl_next::Slot<'_, Self>,
10568 decoder_: &mut ___D,
10569 _: (),
10570 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10571 ::fidl_next::munge! {
10572 let Self {
10573
10574 mut h,
10575
10576 } = slot_;
10577 }
10578
10579 let _field = h.as_mut();
10580
10581 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
10582
10583 Ok(())
10584 }
10585 }
10586
10587 impl ::fidl_next::IntoNatural for EventWithDefaultRights {
10588 type Natural = crate::natural::EventWithDefaultRights;
10589 }
10590
10591 #[derive(Debug)]
10593 #[repr(C)]
10594 pub struct EventWithReducedRights {
10595 pub h: ::fidl_next::wire::fuchsia::Event,
10596 }
10597
10598 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithReducedRights>(), 4);
10599 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithReducedRights>(), 4);
10600
10601 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithReducedRights, h), 0);
10602
10603 impl ::fidl_next::Constrained for EventWithReducedRights {
10604 type Constraint = ();
10605
10606 fn validate(
10607 _: ::fidl_next::Slot<'_, Self>,
10608 _: Self::Constraint,
10609 ) -> Result<(), ::fidl_next::ValidationError> {
10610 Ok(())
10611 }
10612 }
10613
10614 unsafe impl ::fidl_next::Wire for EventWithReducedRights {
10615 type Narrowed<'de> = EventWithReducedRights;
10616
10617 #[inline]
10618 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10619 ::fidl_next::munge! {
10620 let Self {
10621
10622 h,
10623
10624 } = &mut *out_;
10625 }
10626
10627 ::fidl_next::Wire::zero_padding(h);
10628 }
10629 }
10630
10631 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithReducedRights
10632 where
10633 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10634 ___D: ::fidl_next::fuchsia::HandleDecoder,
10635 {
10636 fn decode(
10637 slot_: ::fidl_next::Slot<'_, Self>,
10638 decoder_: &mut ___D,
10639 _: (),
10640 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10641 ::fidl_next::munge! {
10642 let Self {
10643
10644 mut h,
10645
10646 } = slot_;
10647 }
10648
10649 let _field = h.as_mut();
10650
10651 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
10652
10653 Ok(())
10654 }
10655 }
10656
10657 impl ::fidl_next::IntoNatural for EventWithReducedRights {
10658 type Natural = crate::natural::EventWithReducedRights;
10659 }
10660
10661 #[derive(Debug)]
10663 #[repr(C)]
10664 pub struct FidlvizDemo<'de> {
10665 pub f1: u8,
10666
10667 pub f2: i8,
10668
10669 pub f3: ::fidl_next::wire::Uint16,
10670
10671 pub f4: ::fidl_next::wire::Uint32,
10672
10673 pub f5: ::fidl_next::wire::Uint64,
10674
10675 pub f6: u8,
10676
10677 pub f7: u8,
10678
10679 pub f8: ::fidl_next::wire::Uint16,
10680
10681 pub f9: ::fidl_next::wire::Float32,
10682
10683 pub f10: ::fidl_next::wire::Float64,
10684
10685 pub f11: bool,
10686
10687 pub f12: bool,
10688
10689 pub f13: ::fidl_next::wire::String<'de>,
10690
10691 pub f14: ::fidl_next::wire::OptionalString<'de>,
10692
10693 pub f15: ::fidl_next::wire::String<'de>,
10694
10695 pub f16: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
10696
10697 pub f17: ::fidl_next::wire::fuchsia::NullableHandle,
10698
10699 pub f18: [u8; 3],
10700
10701 pub f19: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Float64>,
10702
10703 pub f20: ::fidl_next::wire::OptionalVector<'de, u8>,
10704
10705 pub f21: ::fidl_next::wire::Vector<'de, u8>,
10706
10707 pub f22: crate::wire::FidlvizBits,
10708
10709 pub f23: crate::wire::FidlvizEnum,
10710
10711 pub f24: crate::wire::FidlvizStruct1,
10712
10713 pub f25: crate::wire::FidlvizStruct2,
10714
10715 pub f26: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct1>,
10716
10717 pub f27: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct2>,
10718
10719 pub f28: crate::wire::FidlvizTable<'de>,
10720
10721 pub f29: crate::wire::FidlvizTable<'de>,
10722
10723 pub f30: crate::wire_optional::FidlvizUnion<'de>,
10724
10725 pub f31: crate::wire::FidlvizUnion<'de>,
10726 }
10727
10728 static_assertions::const_assert_eq!(std::mem::size_of::<FidlvizDemo<'_>>(), 248);
10729 static_assertions::const_assert_eq!(std::mem::align_of::<FidlvizDemo<'_>>(), 8);
10730
10731 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f1), 0);
10732
10733 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f2), 1);
10734
10735 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f3), 2);
10736
10737 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f4), 4);
10738
10739 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f5), 8);
10740
10741 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f6), 16);
10742
10743 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f7), 17);
10744
10745 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f8), 18);
10746
10747 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f9), 20);
10748
10749 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f10), 24);
10750
10751 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f11), 32);
10752
10753 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f12), 33);
10754
10755 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f13), 40);
10756
10757 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f14), 56);
10758
10759 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f15), 72);
10760
10761 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f16), 88);
10762
10763 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f17), 92);
10764
10765 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f18), 96);
10766
10767 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f19), 104);
10768
10769 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f20), 120);
10770
10771 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f21), 136);
10772
10773 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f22), 152);
10774
10775 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f23), 153);
10776
10777 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f24), 154);
10778
10779 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f25), 160);
10780
10781 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f26), 168);
10782
10783 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f27), 176);
10784
10785 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f28), 184);
10786
10787 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f29), 200);
10788
10789 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f30), 216);
10790
10791 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f31), 232);
10792
10793 impl ::fidl_next::Constrained for FidlvizDemo<'_> {
10794 type Constraint = ();
10795
10796 fn validate(
10797 _: ::fidl_next::Slot<'_, Self>,
10798 _: Self::Constraint,
10799 ) -> Result<(), ::fidl_next::ValidationError> {
10800 Ok(())
10801 }
10802 }
10803
10804 unsafe impl ::fidl_next::Wire for FidlvizDemo<'static> {
10805 type Narrowed<'de> = FidlvizDemo<'de>;
10806
10807 #[inline]
10808 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10809 ::fidl_next::munge! {
10810 let Self {
10811
10812 f1,
10813 f2,
10814 f3,
10815 f4,
10816 f5,
10817 f6,
10818 f7,
10819 f8,
10820 f9,
10821 f10,
10822 f11,
10823 f12,
10824 f13,
10825 f14,
10826 f15,
10827 f16,
10828 f17,
10829 f18,
10830 f19,
10831 f20,
10832 f21,
10833 f22,
10834 f23,
10835 f24,
10836 f25,
10837 f26,
10838 f27,
10839 f28,
10840 f29,
10841 f30,
10842 f31,
10843
10844 } = &mut *out_;
10845 }
10846
10847 ::fidl_next::Wire::zero_padding(f1);
10848
10849 ::fidl_next::Wire::zero_padding(f2);
10850
10851 ::fidl_next::Wire::zero_padding(f3);
10852
10853 ::fidl_next::Wire::zero_padding(f4);
10854
10855 ::fidl_next::Wire::zero_padding(f5);
10856
10857 ::fidl_next::Wire::zero_padding(f6);
10858
10859 ::fidl_next::Wire::zero_padding(f7);
10860
10861 ::fidl_next::Wire::zero_padding(f8);
10862
10863 ::fidl_next::Wire::zero_padding(f9);
10864
10865 ::fidl_next::Wire::zero_padding(f10);
10866
10867 ::fidl_next::Wire::zero_padding(f11);
10868
10869 ::fidl_next::Wire::zero_padding(f12);
10870
10871 ::fidl_next::Wire::zero_padding(f13);
10872
10873 ::fidl_next::Wire::zero_padding(f14);
10874
10875 ::fidl_next::Wire::zero_padding(f15);
10876
10877 ::fidl_next::Wire::zero_padding(f16);
10878
10879 ::fidl_next::Wire::zero_padding(f17);
10880
10881 ::fidl_next::Wire::zero_padding(f18);
10882
10883 ::fidl_next::Wire::zero_padding(f19);
10884
10885 ::fidl_next::Wire::zero_padding(f20);
10886
10887 ::fidl_next::Wire::zero_padding(f21);
10888
10889 ::fidl_next::Wire::zero_padding(f22);
10890
10891 ::fidl_next::Wire::zero_padding(f23);
10892
10893 ::fidl_next::Wire::zero_padding(f24);
10894
10895 ::fidl_next::Wire::zero_padding(f25);
10896
10897 ::fidl_next::Wire::zero_padding(f26);
10898
10899 ::fidl_next::Wire::zero_padding(f27);
10900
10901 ::fidl_next::Wire::zero_padding(f28);
10902
10903 ::fidl_next::Wire::zero_padding(f29);
10904
10905 ::fidl_next::Wire::zero_padding(f30);
10906
10907 ::fidl_next::Wire::zero_padding(f31);
10908
10909 unsafe {
10910 out_.as_mut_ptr().cast::<u8>().add(155).write_bytes(0, 5);
10911 }
10912
10913 unsafe {
10914 out_.as_mut_ptr().cast::<u8>().add(99).write_bytes(0, 5);
10915 }
10916
10917 unsafe {
10918 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 6);
10919 }
10920 }
10921 }
10922
10923 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FidlvizDemo<'de>
10924 where
10925 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10926 ___D: ::fidl_next::Decoder<'de>,
10927 ___D: ::fidl_next::fuchsia::HandleDecoder,
10928 {
10929 fn decode(
10930 slot_: ::fidl_next::Slot<'_, Self>,
10931 decoder_: &mut ___D,
10932 _: (),
10933 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10934 if slot_.as_bytes()[155..160] != [0u8; 5] {
10935 return Err(::fidl_next::DecodeError::InvalidPadding);
10936 }
10937
10938 if slot_.as_bytes()[99..104] != [0u8; 5] {
10939 return Err(::fidl_next::DecodeError::InvalidPadding);
10940 }
10941
10942 if slot_.as_bytes()[34..40] != [0u8; 6] {
10943 return Err(::fidl_next::DecodeError::InvalidPadding);
10944 }
10945
10946 ::fidl_next::munge! {
10947 let Self {
10948
10949 mut f1,
10950 mut f2,
10951 mut f3,
10952 mut f4,
10953 mut f5,
10954 mut f6,
10955 mut f7,
10956 mut f8,
10957 mut f9,
10958 mut f10,
10959 mut f11,
10960 mut f12,
10961 mut f13,
10962 mut f14,
10963 mut f15,
10964 mut f16,
10965 mut f17,
10966 mut f18,
10967 mut f19,
10968 mut f20,
10969 mut f21,
10970 mut f22,
10971 mut f23,
10972 mut f24,
10973 mut f25,
10974 mut f26,
10975 mut f27,
10976 mut f28,
10977 mut f29,
10978 mut f30,
10979 mut f31,
10980
10981 } = slot_;
10982 }
10983
10984 let _field = f1.as_mut();
10985
10986 ::fidl_next::Decode::decode(f1.as_mut(), decoder_, ())?;
10987
10988 let _field = f2.as_mut();
10989
10990 ::fidl_next::Decode::decode(f2.as_mut(), decoder_, ())?;
10991
10992 let _field = f3.as_mut();
10993
10994 ::fidl_next::Decode::decode(f3.as_mut(), decoder_, ())?;
10995
10996 let _field = f4.as_mut();
10997
10998 ::fidl_next::Decode::decode(f4.as_mut(), decoder_, ())?;
10999
11000 let _field = f5.as_mut();
11001
11002 ::fidl_next::Decode::decode(f5.as_mut(), decoder_, ())?;
11003
11004 let _field = f6.as_mut();
11005
11006 ::fidl_next::Decode::decode(f6.as_mut(), decoder_, ())?;
11007
11008 let _field = f7.as_mut();
11009
11010 ::fidl_next::Decode::decode(f7.as_mut(), decoder_, ())?;
11011
11012 let _field = f8.as_mut();
11013
11014 ::fidl_next::Decode::decode(f8.as_mut(), decoder_, ())?;
11015
11016 let _field = f9.as_mut();
11017
11018 ::fidl_next::Decode::decode(f9.as_mut(), decoder_, ())?;
11019
11020 let _field = f10.as_mut();
11021
11022 ::fidl_next::Decode::decode(f10.as_mut(), decoder_, ())?;
11023
11024 let _field = f11.as_mut();
11025
11026 ::fidl_next::Decode::decode(f11.as_mut(), decoder_, ())?;
11027
11028 let _field = f12.as_mut();
11029
11030 ::fidl_next::Decode::decode(f12.as_mut(), decoder_, ())?;
11031
11032 let _field = f13.as_mut();
11033 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11034 ::fidl_next::Decode::decode(f13.as_mut(), decoder_, 4294967295)?;
11035
11036 let _field = f14.as_mut();
11037 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11038 ::fidl_next::Decode::decode(f14.as_mut(), decoder_, 4294967295)?;
11039
11040 let _field = f15.as_mut();
11041 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11042 ::fidl_next::Decode::decode(f15.as_mut(), decoder_, 4294967295)?;
11043
11044 let _field = f16.as_mut();
11045
11046 ::fidl_next::Decode::decode(f16.as_mut(), decoder_, ())?;
11047
11048 let _field = f17.as_mut();
11049
11050 ::fidl_next::Decode::decode(f17.as_mut(), decoder_, ())?;
11051
11052 let _field = f18.as_mut();
11053
11054 ::fidl_next::Decode::decode(f18.as_mut(), decoder_, ())?;
11055
11056 let _field = f19.as_mut();
11057 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11058 ::fidl_next::Decode::decode(f19.as_mut(), decoder_, (4294967295, ()))?;
11059
11060 let _field = f20.as_mut();
11061 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11062 ::fidl_next::Decode::decode(f20.as_mut(), decoder_, (4294967295, ()))?;
11063
11064 let _field = f21.as_mut();
11065 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11066 ::fidl_next::Decode::decode(f21.as_mut(), decoder_, (4294967295, ()))?;
11067
11068 let _field = f22.as_mut();
11069
11070 ::fidl_next::Decode::decode(f22.as_mut(), decoder_, ())?;
11071
11072 let _field = f23.as_mut();
11073
11074 ::fidl_next::Decode::decode(f23.as_mut(), decoder_, ())?;
11075
11076 let _field = f24.as_mut();
11077
11078 ::fidl_next::Decode::decode(f24.as_mut(), decoder_, ())?;
11079
11080 let _field = f25.as_mut();
11081
11082 ::fidl_next::Decode::decode(f25.as_mut(), decoder_, ())?;
11083
11084 let _field = f26.as_mut();
11085
11086 ::fidl_next::Decode::decode(f26.as_mut(), decoder_, ())?;
11087
11088 let _field = f27.as_mut();
11089
11090 ::fidl_next::Decode::decode(f27.as_mut(), decoder_, ())?;
11091
11092 let _field = f28.as_mut();
11093
11094 ::fidl_next::Decode::decode(f28.as_mut(), decoder_, ())?;
11095
11096 let _field = f29.as_mut();
11097
11098 ::fidl_next::Decode::decode(f29.as_mut(), decoder_, ())?;
11099
11100 let _field = f30.as_mut();
11101
11102 ::fidl_next::Decode::decode(f30.as_mut(), decoder_, ())?;
11103
11104 let _field = f31.as_mut();
11105
11106 ::fidl_next::Decode::decode(f31.as_mut(), decoder_, ())?;
11107
11108 Ok(())
11109 }
11110 }
11111
11112 impl<'de> ::fidl_next::IntoNatural for FidlvizDemo<'de> {
11113 type Natural = crate::natural::FidlvizDemo;
11114 }
11115
11116 #[derive(Debug)]
11118 #[repr(C)]
11119 pub struct GoldenHandleBasicRightsStruct {
11120 pub v: ::fidl_next::wire::fuchsia::Event,
11121 }
11122
11123 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenHandleBasicRightsStruct>(), 4);
11124 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenHandleBasicRightsStruct>(), 4);
11125
11126 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenHandleBasicRightsStruct, v), 0);
11127
11128 impl ::fidl_next::Constrained for GoldenHandleBasicRightsStruct {
11129 type Constraint = ();
11130
11131 fn validate(
11132 _: ::fidl_next::Slot<'_, Self>,
11133 _: Self::Constraint,
11134 ) -> Result<(), ::fidl_next::ValidationError> {
11135 Ok(())
11136 }
11137 }
11138
11139 unsafe impl ::fidl_next::Wire for GoldenHandleBasicRightsStruct {
11140 type Narrowed<'de> = GoldenHandleBasicRightsStruct;
11141
11142 #[inline]
11143 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11144 ::fidl_next::munge! {
11145 let Self {
11146
11147 v,
11148
11149 } = &mut *out_;
11150 }
11151
11152 ::fidl_next::Wire::zero_padding(v);
11153 }
11154 }
11155
11156 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenHandleBasicRightsStruct
11157 where
11158 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11159 ___D: ::fidl_next::fuchsia::HandleDecoder,
11160 {
11161 fn decode(
11162 slot_: ::fidl_next::Slot<'_, Self>,
11163 decoder_: &mut ___D,
11164 _: (),
11165 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11166 ::fidl_next::munge! {
11167 let Self {
11168
11169 mut v,
11170
11171 } = slot_;
11172 }
11173
11174 let _field = v.as_mut();
11175
11176 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11177
11178 Ok(())
11179 }
11180 }
11181
11182 impl ::fidl_next::IntoNatural for GoldenHandleBasicRightsStruct {
11183 type Natural = crate::natural::GoldenHandleBasicRightsStruct;
11184 }
11185
11186 #[derive(Debug)]
11188 #[repr(C)]
11189 pub struct GoldenNullableHandleStruct {
11190 pub v: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11191 }
11192
11193 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenNullableHandleStruct>(), 4);
11194 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenNullableHandleStruct>(), 4);
11195
11196 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenNullableHandleStruct, v), 0);
11197
11198 impl ::fidl_next::Constrained for GoldenNullableHandleStruct {
11199 type Constraint = ();
11200
11201 fn validate(
11202 _: ::fidl_next::Slot<'_, Self>,
11203 _: Self::Constraint,
11204 ) -> Result<(), ::fidl_next::ValidationError> {
11205 Ok(())
11206 }
11207 }
11208
11209 unsafe impl ::fidl_next::Wire for GoldenNullableHandleStruct {
11210 type Narrowed<'de> = GoldenNullableHandleStruct;
11211
11212 #[inline]
11213 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11214 ::fidl_next::munge! {
11215 let Self {
11216
11217 v,
11218
11219 } = &mut *out_;
11220 }
11221
11222 ::fidl_next::Wire::zero_padding(v);
11223 }
11224 }
11225
11226 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenNullableHandleStruct
11227 where
11228 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11229 ___D: ::fidl_next::fuchsia::HandleDecoder,
11230 {
11231 fn decode(
11232 slot_: ::fidl_next::Slot<'_, Self>,
11233 decoder_: &mut ___D,
11234 _: (),
11235 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11236 ::fidl_next::munge! {
11237 let Self {
11238
11239 mut v,
11240
11241 } = slot_;
11242 }
11243
11244 let _field = v.as_mut();
11245
11246 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11247
11248 Ok(())
11249 }
11250 }
11251
11252 impl ::fidl_next::IntoNatural for GoldenNullableHandleStruct {
11253 type Natural = crate::natural::GoldenNullableHandleStruct;
11254 }
11255
11256 #[derive(Debug)]
11258 #[repr(C)]
11259 pub struct MultipleBoundedNonnullableVectorsOfHandles<'de> {
11260 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11261
11262 pub vh1: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11263 }
11264
11265 static_assertions::const_assert_eq!(
11266 std::mem::size_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11267 32
11268 );
11269 static_assertions::const_assert_eq!(
11270 std::mem::align_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11271 8
11272 );
11273
11274 static_assertions::const_assert_eq!(
11275 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh0),
11276 0
11277 );
11278
11279 static_assertions::const_assert_eq!(
11280 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh1),
11281 16
11282 );
11283
11284 impl ::fidl_next::Constrained for MultipleBoundedNonnullableVectorsOfHandles<'_> {
11285 type Constraint = ();
11286
11287 fn validate(
11288 _: ::fidl_next::Slot<'_, Self>,
11289 _: Self::Constraint,
11290 ) -> Result<(), ::fidl_next::ValidationError> {
11291 Ok(())
11292 }
11293 }
11294
11295 unsafe impl ::fidl_next::Wire for MultipleBoundedNonnullableVectorsOfHandles<'static> {
11296 type Narrowed<'de> = MultipleBoundedNonnullableVectorsOfHandles<'de>;
11297
11298 #[inline]
11299 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11300 ::fidl_next::munge! {
11301 let Self {
11302
11303 vh0,
11304 vh1,
11305
11306 } = &mut *out_;
11307 }
11308
11309 ::fidl_next::Wire::zero_padding(vh0);
11310
11311 ::fidl_next::Wire::zero_padding(vh1);
11312 }
11313 }
11314
11315 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNonnullableVectorsOfHandles<'de>
11316 where
11317 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11318 ___D: ::fidl_next::Decoder<'de>,
11319 ___D: ::fidl_next::fuchsia::HandleDecoder,
11320 {
11321 fn decode(
11322 slot_: ::fidl_next::Slot<'_, Self>,
11323 decoder_: &mut ___D,
11324 _: (),
11325 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11326 ::fidl_next::munge! {
11327 let Self {
11328
11329 mut vh0,
11330 mut vh1,
11331
11332 } = slot_;
11333 }
11334
11335 let _field = vh0.as_mut();
11336 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11337 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11338
11339 let vh0 = unsafe { vh0.deref_unchecked() };
11340
11341 if vh0.len() > 2 {
11342 return Err(::fidl_next::DecodeError::VectorTooLong {
11343 size: vh0.len() as u64,
11344 limit: 2,
11345 });
11346 }
11347
11348 let _field = vh1.as_mut();
11349 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11350 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11351
11352 let vh1 = unsafe { vh1.deref_unchecked() };
11353
11354 if vh1.len() > 32 {
11355 return Err(::fidl_next::DecodeError::VectorTooLong {
11356 size: vh1.len() as u64,
11357 limit: 32,
11358 });
11359 }
11360
11361 Ok(())
11362 }
11363 }
11364
11365 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNonnullableVectorsOfHandles<'de> {
11366 type Natural = crate::natural::MultipleBoundedNonnullableVectorsOfHandles;
11367 }
11368
11369 #[derive(Debug)]
11371 #[repr(C)]
11372 pub struct MultipleBoundedNullableVectorsOfHandles<'de> {
11373 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11374
11375 pub vh1: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11376 }
11377
11378 static_assertions::const_assert_eq!(
11379 std::mem::size_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11380 32
11381 );
11382 static_assertions::const_assert_eq!(
11383 std::mem::align_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11384 8
11385 );
11386
11387 static_assertions::const_assert_eq!(
11388 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh0),
11389 0
11390 );
11391
11392 static_assertions::const_assert_eq!(
11393 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh1),
11394 16
11395 );
11396
11397 impl ::fidl_next::Constrained for MultipleBoundedNullableVectorsOfHandles<'_> {
11398 type Constraint = ();
11399
11400 fn validate(
11401 _: ::fidl_next::Slot<'_, Self>,
11402 _: Self::Constraint,
11403 ) -> Result<(), ::fidl_next::ValidationError> {
11404 Ok(())
11405 }
11406 }
11407
11408 unsafe impl ::fidl_next::Wire for MultipleBoundedNullableVectorsOfHandles<'static> {
11409 type Narrowed<'de> = MultipleBoundedNullableVectorsOfHandles<'de>;
11410
11411 #[inline]
11412 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11413 ::fidl_next::munge! {
11414 let Self {
11415
11416 vh0,
11417 vh1,
11418
11419 } = &mut *out_;
11420 }
11421
11422 ::fidl_next::Wire::zero_padding(vh0);
11423
11424 ::fidl_next::Wire::zero_padding(vh1);
11425 }
11426 }
11427
11428 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNullableVectorsOfHandles<'de>
11429 where
11430 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11431 ___D: ::fidl_next::Decoder<'de>,
11432 ___D: ::fidl_next::fuchsia::HandleDecoder,
11433 {
11434 fn decode(
11435 slot_: ::fidl_next::Slot<'_, Self>,
11436 decoder_: &mut ___D,
11437 _: (),
11438 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11439 ::fidl_next::munge! {
11440 let Self {
11441
11442 mut vh0,
11443 mut vh1,
11444
11445 } = slot_;
11446 }
11447
11448 let _field = vh0.as_mut();
11449 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11450 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11451
11452 let vh0 = unsafe { vh0.deref_unchecked() };
11453
11454 if let Some(vh0) = vh0.as_ref() {
11455 if vh0.len() > 2 {
11456 return Err(::fidl_next::DecodeError::VectorTooLong {
11457 size: vh0.len() as u64,
11458 limit: 2,
11459 });
11460 }
11461 }
11462
11463 let _field = vh1.as_mut();
11464 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11465 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11466
11467 let vh1 = unsafe { vh1.deref_unchecked() };
11468
11469 if let Some(vh1) = vh1.as_ref() {
11470 if vh1.len() > 32 {
11471 return Err(::fidl_next::DecodeError::VectorTooLong {
11472 size: vh1.len() as u64,
11473 limit: 32,
11474 });
11475 }
11476 }
11477
11478 Ok(())
11479 }
11480 }
11481
11482 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNullableVectorsOfHandles<'de> {
11483 type Natural = crate::natural::MultipleBoundedNullableVectorsOfHandles;
11484 }
11485
11486 #[derive(Debug)]
11488 #[repr(C)]
11489 pub struct MultipleHandleSubtypes {
11490 pub untyped: ::fidl_next::wire::fuchsia::NullableHandle,
11491
11492 pub event: ::fidl_next::wire::fuchsia::Event,
11493
11494 pub channel: ::fidl_next::wire::fuchsia::Channel,
11495 }
11496
11497 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleHandleSubtypes>(), 12);
11498 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleHandleSubtypes>(), 4);
11499
11500 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, untyped), 0);
11501
11502 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, event), 4);
11503
11504 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, channel), 8);
11505
11506 impl ::fidl_next::Constrained for MultipleHandleSubtypes {
11507 type Constraint = ();
11508
11509 fn validate(
11510 _: ::fidl_next::Slot<'_, Self>,
11511 _: Self::Constraint,
11512 ) -> Result<(), ::fidl_next::ValidationError> {
11513 Ok(())
11514 }
11515 }
11516
11517 unsafe impl ::fidl_next::Wire for MultipleHandleSubtypes {
11518 type Narrowed<'de> = MultipleHandleSubtypes;
11519
11520 #[inline]
11521 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11522 ::fidl_next::munge! {
11523 let Self {
11524
11525 untyped,
11526 event,
11527 channel,
11528
11529 } = &mut *out_;
11530 }
11531
11532 ::fidl_next::Wire::zero_padding(untyped);
11533
11534 ::fidl_next::Wire::zero_padding(event);
11535
11536 ::fidl_next::Wire::zero_padding(channel);
11537 }
11538 }
11539
11540 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleHandleSubtypes
11541 where
11542 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11543 ___D: ::fidl_next::fuchsia::HandleDecoder,
11544 {
11545 fn decode(
11546 slot_: ::fidl_next::Slot<'_, Self>,
11547 decoder_: &mut ___D,
11548 _: (),
11549 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11550 ::fidl_next::munge! {
11551 let Self {
11552
11553 mut untyped,
11554 mut event,
11555 mut channel,
11556
11557 } = slot_;
11558 }
11559
11560 let _field = untyped.as_mut();
11561
11562 ::fidl_next::Decode::decode(untyped.as_mut(), decoder_, ())?;
11563
11564 let _field = event.as_mut();
11565
11566 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
11567
11568 let _field = channel.as_mut();
11569
11570 ::fidl_next::Decode::decode(channel.as_mut(), decoder_, ())?;
11571
11572 Ok(())
11573 }
11574 }
11575
11576 impl ::fidl_next::IntoNatural for MultipleHandleSubtypes {
11577 type Natural = crate::natural::MultipleHandleSubtypes;
11578 }
11579
11580 #[derive(Debug)]
11582 #[repr(C)]
11583 pub struct MultipleNonnullableHandles {
11584 pub data0: ::fidl_next::wire::Uint32,
11585
11586 pub handle0: ::fidl_next::wire::fuchsia::NullableHandle,
11587
11588 pub data1: ::fidl_next::wire::Uint64,
11589
11590 pub handle1: ::fidl_next::wire::fuchsia::Channel,
11591
11592 pub handle2: ::fidl_next::wire::fuchsia::Event,
11593
11594 pub data2: ::fidl_next::wire::Uint64,
11595 }
11596
11597 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNonnullableHandles>(), 32);
11598 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNonnullableHandles>(), 8);
11599
11600 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data0), 0);
11601
11602 static_assertions::const_assert_eq!(
11603 std::mem::offset_of!(MultipleNonnullableHandles, handle0),
11604 4
11605 );
11606
11607 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data1), 8);
11608
11609 static_assertions::const_assert_eq!(
11610 std::mem::offset_of!(MultipleNonnullableHandles, handle1),
11611 16
11612 );
11613
11614 static_assertions::const_assert_eq!(
11615 std::mem::offset_of!(MultipleNonnullableHandles, handle2),
11616 20
11617 );
11618
11619 static_assertions::const_assert_eq!(
11620 std::mem::offset_of!(MultipleNonnullableHandles, data2),
11621 24
11622 );
11623
11624 impl ::fidl_next::Constrained for MultipleNonnullableHandles {
11625 type Constraint = ();
11626
11627 fn validate(
11628 _: ::fidl_next::Slot<'_, Self>,
11629 _: Self::Constraint,
11630 ) -> Result<(), ::fidl_next::ValidationError> {
11631 Ok(())
11632 }
11633 }
11634
11635 unsafe impl ::fidl_next::Wire for MultipleNonnullableHandles {
11636 type Narrowed<'de> = MultipleNonnullableHandles;
11637
11638 #[inline]
11639 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11640 ::fidl_next::munge! {
11641 let Self {
11642
11643 data0,
11644 handle0,
11645 data1,
11646 handle1,
11647 handle2,
11648 data2,
11649
11650 } = &mut *out_;
11651 }
11652
11653 ::fidl_next::Wire::zero_padding(data0);
11654
11655 ::fidl_next::Wire::zero_padding(handle0);
11656
11657 ::fidl_next::Wire::zero_padding(data1);
11658
11659 ::fidl_next::Wire::zero_padding(handle1);
11660
11661 ::fidl_next::Wire::zero_padding(handle2);
11662
11663 ::fidl_next::Wire::zero_padding(data2);
11664 }
11665 }
11666
11667 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNonnullableHandles
11668 where
11669 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11670 ___D: ::fidl_next::fuchsia::HandleDecoder,
11671 {
11672 fn decode(
11673 slot_: ::fidl_next::Slot<'_, Self>,
11674 decoder_: &mut ___D,
11675 _: (),
11676 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11677 ::fidl_next::munge! {
11678 let Self {
11679
11680 mut data0,
11681 mut handle0,
11682 mut data1,
11683 mut handle1,
11684 mut handle2,
11685 mut data2,
11686
11687 } = slot_;
11688 }
11689
11690 let _field = data0.as_mut();
11691
11692 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
11693
11694 let _field = handle0.as_mut();
11695
11696 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
11697
11698 let _field = data1.as_mut();
11699
11700 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
11701
11702 let _field = handle1.as_mut();
11703
11704 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
11705
11706 let _field = handle2.as_mut();
11707
11708 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
11709
11710 let _field = data2.as_mut();
11711
11712 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
11713
11714 Ok(())
11715 }
11716 }
11717
11718 impl ::fidl_next::IntoNatural for MultipleNonnullableHandles {
11719 type Natural = crate::natural::MultipleNonnullableHandles;
11720 }
11721
11722 #[derive(Debug)]
11724 #[repr(C)]
11725 pub struct MultipleNullableHandles {
11726 pub data0: ::fidl_next::wire::Uint32,
11727
11728 pub handle0: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11729
11730 pub data1: ::fidl_next::wire::Uint64,
11731
11732 pub handle1: ::fidl_next::wire::fuchsia::OptionalChannel,
11733
11734 pub handle2: ::fidl_next::wire::fuchsia::OptionalEvent,
11735
11736 pub data2: ::fidl_next::wire::Uint64,
11737 }
11738
11739 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNullableHandles>(), 32);
11740 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNullableHandles>(), 8);
11741
11742 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data0), 0);
11743
11744 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle0), 4);
11745
11746 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data1), 8);
11747
11748 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle1), 16);
11749
11750 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle2), 20);
11751
11752 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data2), 24);
11753
11754 impl ::fidl_next::Constrained for MultipleNullableHandles {
11755 type Constraint = ();
11756
11757 fn validate(
11758 _: ::fidl_next::Slot<'_, Self>,
11759 _: Self::Constraint,
11760 ) -> Result<(), ::fidl_next::ValidationError> {
11761 Ok(())
11762 }
11763 }
11764
11765 unsafe impl ::fidl_next::Wire for MultipleNullableHandles {
11766 type Narrowed<'de> = MultipleNullableHandles;
11767
11768 #[inline]
11769 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11770 ::fidl_next::munge! {
11771 let Self {
11772
11773 data0,
11774 handle0,
11775 data1,
11776 handle1,
11777 handle2,
11778 data2,
11779
11780 } = &mut *out_;
11781 }
11782
11783 ::fidl_next::Wire::zero_padding(data0);
11784
11785 ::fidl_next::Wire::zero_padding(handle0);
11786
11787 ::fidl_next::Wire::zero_padding(data1);
11788
11789 ::fidl_next::Wire::zero_padding(handle1);
11790
11791 ::fidl_next::Wire::zero_padding(handle2);
11792
11793 ::fidl_next::Wire::zero_padding(data2);
11794 }
11795 }
11796
11797 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNullableHandles
11798 where
11799 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11800 ___D: ::fidl_next::fuchsia::HandleDecoder,
11801 {
11802 fn decode(
11803 slot_: ::fidl_next::Slot<'_, Self>,
11804 decoder_: &mut ___D,
11805 _: (),
11806 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11807 ::fidl_next::munge! {
11808 let Self {
11809
11810 mut data0,
11811 mut handle0,
11812 mut data1,
11813 mut handle1,
11814 mut handle2,
11815 mut data2,
11816
11817 } = slot_;
11818 }
11819
11820 let _field = data0.as_mut();
11821
11822 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
11823
11824 let _field = handle0.as_mut();
11825
11826 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
11827
11828 let _field = data1.as_mut();
11829
11830 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
11831
11832 let _field = handle1.as_mut();
11833
11834 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
11835
11836 let _field = handle2.as_mut();
11837
11838 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
11839
11840 let _field = data2.as_mut();
11841
11842 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
11843
11844 Ok(())
11845 }
11846 }
11847
11848 impl ::fidl_next::IntoNatural for MultipleNullableHandles {
11849 type Natural = crate::natural::MultipleNullableHandles;
11850 }
11851
11852 #[derive(Debug)]
11854 #[repr(C)]
11855 pub struct NonnullableHandle {
11856 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
11857 }
11858
11859 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandle>(), 4);
11860 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandle>(), 4);
11861
11862 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandle, h), 0);
11863
11864 impl ::fidl_next::Constrained for NonnullableHandle {
11865 type Constraint = ();
11866
11867 fn validate(
11868 _: ::fidl_next::Slot<'_, Self>,
11869 _: Self::Constraint,
11870 ) -> Result<(), ::fidl_next::ValidationError> {
11871 Ok(())
11872 }
11873 }
11874
11875 unsafe impl ::fidl_next::Wire for NonnullableHandle {
11876 type Narrowed<'de> = NonnullableHandle;
11877
11878 #[inline]
11879 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11880 ::fidl_next::munge! {
11881 let Self {
11882
11883 h,
11884
11885 } = &mut *out_;
11886 }
11887
11888 ::fidl_next::Wire::zero_padding(h);
11889 }
11890 }
11891
11892 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandle
11893 where
11894 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11895 ___D: ::fidl_next::fuchsia::HandleDecoder,
11896 {
11897 fn decode(
11898 slot_: ::fidl_next::Slot<'_, Self>,
11899 decoder_: &mut ___D,
11900 _: (),
11901 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11902 ::fidl_next::munge! {
11903 let Self {
11904
11905 mut h,
11906
11907 } = slot_;
11908 }
11909
11910 let _field = h.as_mut();
11911
11912 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
11913
11914 Ok(())
11915 }
11916 }
11917
11918 impl ::fidl_next::IntoNatural for NonnullableHandle {
11919 type Natural = crate::natural::NonnullableHandle;
11920 }
11921
11922 #[derive(Debug)]
11924 #[repr(C)]
11925 pub struct NonnullableHandleArray {
11926 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
11927 }
11928
11929 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandleArray>(), 16);
11930 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandleArray>(), 4);
11931
11932 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandleArray, handles), 0);
11933
11934 impl ::fidl_next::Constrained for NonnullableHandleArray {
11935 type Constraint = ();
11936
11937 fn validate(
11938 _: ::fidl_next::Slot<'_, Self>,
11939 _: Self::Constraint,
11940 ) -> Result<(), ::fidl_next::ValidationError> {
11941 Ok(())
11942 }
11943 }
11944
11945 unsafe impl ::fidl_next::Wire for NonnullableHandleArray {
11946 type Narrowed<'de> = NonnullableHandleArray;
11947
11948 #[inline]
11949 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11950 ::fidl_next::munge! {
11951 let Self {
11952
11953 handles,
11954
11955 } = &mut *out_;
11956 }
11957
11958 ::fidl_next::Wire::zero_padding(handles);
11959 }
11960 }
11961
11962 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandleArray
11963 where
11964 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11965 ___D: ::fidl_next::fuchsia::HandleDecoder,
11966 {
11967 fn decode(
11968 slot_: ::fidl_next::Slot<'_, Self>,
11969 decoder_: &mut ___D,
11970 _: (),
11971 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11972 ::fidl_next::munge! {
11973 let Self {
11974
11975 mut handles,
11976
11977 } = slot_;
11978 }
11979
11980 let _field = handles.as_mut();
11981
11982 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
11983
11984 Ok(())
11985 }
11986 }
11987
11988 impl ::fidl_next::IntoNatural for NonnullableHandleArray {
11989 type Natural = crate::natural::NonnullableHandleArray;
11990 }
11991
11992 #[derive(Debug)]
11994 #[repr(C)]
11995 pub struct NullableHandle {
11996 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11997 }
11998
11999 static_assertions::const_assert_eq!(std::mem::size_of::<NullableHandle>(), 4);
12000 static_assertions::const_assert_eq!(std::mem::align_of::<NullableHandle>(), 4);
12001
12002 static_assertions::const_assert_eq!(std::mem::offset_of!(NullableHandle, h), 0);
12003
12004 impl ::fidl_next::Constrained for NullableHandle {
12005 type Constraint = ();
12006
12007 fn validate(
12008 _: ::fidl_next::Slot<'_, Self>,
12009 _: Self::Constraint,
12010 ) -> Result<(), ::fidl_next::ValidationError> {
12011 Ok(())
12012 }
12013 }
12014
12015 unsafe impl ::fidl_next::Wire for NullableHandle {
12016 type Narrowed<'de> = NullableHandle;
12017
12018 #[inline]
12019 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12020 ::fidl_next::munge! {
12021 let Self {
12022
12023 h,
12024
12025 } = &mut *out_;
12026 }
12027
12028 ::fidl_next::Wire::zero_padding(h);
12029 }
12030 }
12031
12032 unsafe impl<___D> ::fidl_next::Decode<___D> for NullableHandle
12033 where
12034 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12035 ___D: ::fidl_next::fuchsia::HandleDecoder,
12036 {
12037 fn decode(
12038 slot_: ::fidl_next::Slot<'_, Self>,
12039 decoder_: &mut ___D,
12040 _: (),
12041 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12042 ::fidl_next::munge! {
12043 let Self {
12044
12045 mut h,
12046
12047 } = slot_;
12048 }
12049
12050 let _field = h.as_mut();
12051
12052 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12053
12054 Ok(())
12055 }
12056 }
12057
12058 impl ::fidl_next::IntoNatural for NullableHandle {
12059 type Natural = crate::natural::NullableHandle;
12060 }
12061
12062 #[derive(Debug)]
12064 #[repr(C)]
12065 pub struct OutOfLineArrayOfNonnullableHandles<'de> {
12066 pub handles: ::fidl_next::wire::Box<'de, crate::wire::NonnullableHandleArray>,
12067 }
12068
12069 static_assertions::const_assert_eq!(
12070 std::mem::size_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12071 8
12072 );
12073 static_assertions::const_assert_eq!(
12074 std::mem::align_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12075 8
12076 );
12077
12078 static_assertions::const_assert_eq!(
12079 std::mem::offset_of!(OutOfLineArrayOfNonnullableHandles<'_>, handles),
12080 0
12081 );
12082
12083 impl ::fidl_next::Constrained for OutOfLineArrayOfNonnullableHandles<'_> {
12084 type Constraint = ();
12085
12086 fn validate(
12087 _: ::fidl_next::Slot<'_, Self>,
12088 _: Self::Constraint,
12089 ) -> Result<(), ::fidl_next::ValidationError> {
12090 Ok(())
12091 }
12092 }
12093
12094 unsafe impl ::fidl_next::Wire for OutOfLineArrayOfNonnullableHandles<'static> {
12095 type Narrowed<'de> = OutOfLineArrayOfNonnullableHandles<'de>;
12096
12097 #[inline]
12098 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12099 ::fidl_next::munge! {
12100 let Self {
12101
12102 handles,
12103
12104 } = &mut *out_;
12105 }
12106
12107 ::fidl_next::Wire::zero_padding(handles);
12108 }
12109 }
12110
12111 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OutOfLineArrayOfNonnullableHandles<'de>
12112 where
12113 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12114 ___D: ::fidl_next::Decoder<'de>,
12115 ___D: ::fidl_next::fuchsia::HandleDecoder,
12116 {
12117 fn decode(
12118 slot_: ::fidl_next::Slot<'_, Self>,
12119 decoder_: &mut ___D,
12120 _: (),
12121 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12122 ::fidl_next::munge! {
12123 let Self {
12124
12125 mut handles,
12126
12127 } = slot_;
12128 }
12129
12130 let _field = handles.as_mut();
12131
12132 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
12133
12134 Ok(())
12135 }
12136 }
12137
12138 impl<'de> ::fidl_next::IntoNatural for OutOfLineArrayOfNonnullableHandles<'de> {
12139 type Natural = crate::natural::OutOfLineArrayOfNonnullableHandles;
12140 }
12141
12142 #[repr(transparent)]
12144 pub struct SampleResourceXUnion<'de> {
12145 pub(crate) raw: ::fidl_next::wire::Union,
12146 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12147 }
12148
12149 impl<'de> Drop for SampleResourceXUnion<'de> {
12150 fn drop(&mut self) {
12151 match self.raw.ordinal() {
12152 1 => {
12153 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12154 }
12155
12156 2 => {
12157 let _ =
12158 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12159 }
12160
12161 3 => {
12162 let _ =
12163 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12164 }
12165
12166 _ => (),
12167 }
12168 }
12169 }
12170
12171 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
12172 type Constraint = ();
12173
12174 fn validate(
12175 _: ::fidl_next::Slot<'_, Self>,
12176 _: Self::Constraint,
12177 ) -> Result<(), ::fidl_next::ValidationError> {
12178 Ok(())
12179 }
12180 }
12181
12182 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
12183 type Narrowed<'de> = SampleResourceXUnion<'de>;
12184
12185 #[inline]
12186 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12187 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12188 ::fidl_next::wire::Union::zero_padding(raw);
12189 }
12190 }
12191
12192 pub mod sample_resource_x_union {
12193 pub enum Ref<'de> {
12194 U(&'de ::fidl_next::wire::Uint32),
12195
12196 Su(&'de crate::wire::SimpleUnion<'de>),
12197
12198 St(&'de crate::wire::SimpleTable<'de>),
12199
12200 UnknownOrdinal_(u64),
12201 }
12202 }
12203
12204 impl<'de> SampleResourceXUnion<'de> {
12205 pub fn as_ref(&self) -> crate::wire::sample_resource_x_union::Ref<'_> {
12206 match self.raw.ordinal() {
12207 1 => crate::wire::sample_resource_x_union::Ref::U(unsafe {
12208 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12209 }),
12210
12211 2 => crate::wire::sample_resource_x_union::Ref::Su(unsafe {
12212 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12213 }),
12214
12215 3 => crate::wire::sample_resource_x_union::Ref::St(unsafe {
12216 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12217 }),
12218
12219 unknown => crate::wire::sample_resource_x_union::Ref::UnknownOrdinal_(unknown),
12220 }
12221 }
12222 }
12223
12224 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
12225 where
12226 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12227 ___D: ::fidl_next::Decoder<'de>,
12228 ___D: ::fidl_next::fuchsia::HandleDecoder,
12229 {
12230 fn decode(
12231 mut slot: ::fidl_next::Slot<'_, Self>,
12232 decoder: &mut ___D,
12233 _: (),
12234 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12235 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12236 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12237 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12238 raw,
12239 decoder,
12240 (),
12241 )?,
12242
12243 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12244 raw,
12245 decoder,
12246 (),
12247 )?,
12248
12249 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12250 raw,
12251 decoder,
12252 (),
12253 )?,
12254
12255 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
12256 }
12257
12258 Ok(())
12259 }
12260 }
12261
12262 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
12263 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12264 match self.raw.ordinal() {
12265 1 => unsafe {
12266 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12267 },
12268 2 => unsafe {
12269 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12270 },
12271 3 => unsafe {
12272 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12273 },
12274 _ => unsafe { ::core::hint::unreachable_unchecked() },
12275 }
12276 }
12277 }
12278
12279 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
12280 type Natural = crate::natural::SampleResourceXUnion;
12281 }
12282
12283 #[repr(transparent)]
12285 pub struct SampleStrictResourceXUnion<'de> {
12286 pub(crate) raw: ::fidl_next::wire::Union,
12287 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12288 }
12289
12290 impl<'de> Drop for SampleStrictResourceXUnion<'de> {
12291 fn drop(&mut self) {
12292 match self.raw.ordinal() {
12293 1 => {
12294 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12295 }
12296
12297 2 => {
12298 let _ =
12299 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12300 }
12301
12302 3 => {
12303 let _ =
12304 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12305 }
12306
12307 _ => unsafe { ::core::hint::unreachable_unchecked() },
12308 }
12309 }
12310 }
12311
12312 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
12313 type Constraint = ();
12314
12315 fn validate(
12316 _: ::fidl_next::Slot<'_, Self>,
12317 _: Self::Constraint,
12318 ) -> Result<(), ::fidl_next::ValidationError> {
12319 Ok(())
12320 }
12321 }
12322
12323 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
12324 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
12325
12326 #[inline]
12327 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12328 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12329 ::fidl_next::wire::Union::zero_padding(raw);
12330 }
12331 }
12332
12333 pub mod sample_strict_resource_x_union {
12334 pub enum Ref<'de> {
12335 U(&'de ::fidl_next::wire::Uint32),
12336
12337 Su(&'de crate::wire::SimpleUnion<'de>),
12338
12339 St(&'de crate::wire::SimpleTable<'de>),
12340 }
12341 }
12342
12343 impl<'de> SampleStrictResourceXUnion<'de> {
12344 pub fn as_ref(&self) -> crate::wire::sample_strict_resource_x_union::Ref<'_> {
12345 match self.raw.ordinal() {
12346 1 => crate::wire::sample_strict_resource_x_union::Ref::U(unsafe {
12347 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12348 }),
12349
12350 2 => crate::wire::sample_strict_resource_x_union::Ref::Su(unsafe {
12351 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12352 }),
12353
12354 3 => crate::wire::sample_strict_resource_x_union::Ref::St(unsafe {
12355 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12356 }),
12357
12358 _ => unsafe { ::core::hint::unreachable_unchecked() },
12359 }
12360 }
12361 }
12362
12363 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
12364 where
12365 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12366 ___D: ::fidl_next::Decoder<'de>,
12367 ___D: ::fidl_next::fuchsia::HandleDecoder,
12368 {
12369 fn decode(
12370 mut slot: ::fidl_next::Slot<'_, Self>,
12371 decoder: &mut ___D,
12372 _: (),
12373 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12374 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12375 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12376 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12377 raw,
12378 decoder,
12379 (),
12380 )?,
12381
12382 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12383 raw,
12384 decoder,
12385 (),
12386 )?,
12387
12388 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12389 raw,
12390 decoder,
12391 (),
12392 )?,
12393
12394 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12395 }
12396
12397 Ok(())
12398 }
12399 }
12400
12401 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
12402 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12403 match self.raw.ordinal() {
12404 1 => unsafe {
12405 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12406 },
12407 2 => unsafe {
12408 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12409 },
12410 3 => unsafe {
12411 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12412 },
12413 _ => unsafe { ::core::hint::unreachable_unchecked() },
12414 }
12415 }
12416 }
12417
12418 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
12419 type Natural = crate::natural::SampleStrictResourceXUnion;
12420 }
12421
12422 #[repr(transparent)]
12424 pub struct UnionWithVector<'de> {
12425 pub(crate) raw: ::fidl_next::wire::Union,
12426 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12427 }
12428
12429 impl<'de> Drop for UnionWithVector<'de> {
12430 fn drop(&mut self) {
12431 match self.raw.ordinal() {
12432 1 => {
12433 let _ = unsafe { self.raw.get().read_unchecked::<u8>() };
12434 }
12435
12436 2 => {
12437 let _ = unsafe {
12438 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12439 };
12440 }
12441
12442 3 => {
12443 let _ = unsafe {
12444 self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
12445 };
12446 }
12447
12448 4 => {
12449 let _ = unsafe {
12450 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
12451 };
12452 }
12453
12454 5 => {
12455 let _ = unsafe {
12456 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
12457 };
12458 }
12459
12460 6 => {
12461 let _ = unsafe {
12462 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<
12463 'de,
12464 ::fidl_next::wire::fuchsia::NullableHandle,
12465 >>()
12466 };
12467 }
12468
12469 7 => {
12470 let _ = unsafe {
12471 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12472 };
12473 }
12474
12475 8 => {
12476 let _ = unsafe {
12477 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12478 };
12479 }
12480
12481 9 => {
12482 let _ = unsafe {
12483 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
12484 };
12485 }
12486
12487 _ => unsafe { ::core::hint::unreachable_unchecked() },
12488 }
12489 }
12490 }
12491
12492 impl ::fidl_next::Constrained for UnionWithVector<'_> {
12493 type Constraint = ();
12494
12495 fn validate(
12496 _: ::fidl_next::Slot<'_, Self>,
12497 _: Self::Constraint,
12498 ) -> Result<(), ::fidl_next::ValidationError> {
12499 Ok(())
12500 }
12501 }
12502
12503 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
12504 type Narrowed<'de> = UnionWithVector<'de>;
12505
12506 #[inline]
12507 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12508 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12509 ::fidl_next::wire::Union::zero_padding(raw);
12510 }
12511 }
12512
12513 pub mod union_with_vector {
12514 pub enum Ref<'de> {
12515 Unused(&'de u8),
12516
12517 VectorOfUint8(&'de ::fidl_next::wire::Vector<'de, u8>),
12518
12519 S(&'de ::fidl_next::wire::String<'de>),
12520
12521 VectorS3A1(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>),
12522
12523 VectorS3A2(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>),
12524
12525 Handles(
12526 &'de ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
12527 ),
12528
12529 ArrayS3A1(&'de [crate::wire::StructSize3Align1; 2]),
12530
12531 ArrayS3A2(&'de [crate::wire::StructSize3Align2; 2]),
12532
12533 VectorUnion(&'de ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>),
12534 }
12535 }
12536
12537 impl<'de> UnionWithVector<'de> {
12538 pub fn as_ref(&self) -> crate::wire::union_with_vector::Ref<'_> {
12539 match self.raw.ordinal() {
12540 1 => crate::wire::union_with_vector::Ref::Unused(unsafe {
12541 self.raw.get().deref_unchecked::<u8>()
12542 }),
12543
12544 2 => crate::wire::union_with_vector::Ref::VectorOfUint8(unsafe {
12545 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
12546 }),
12547
12548 3 => crate::wire::union_with_vector::Ref::S(unsafe {
12549 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
12550 }),
12551
12552 4 => crate::wire::union_with_vector::Ref::VectorS3A1(unsafe {
12553 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>>()
12554 }),
12555
12556 5 => crate::wire::union_with_vector::Ref::VectorS3A2(unsafe {
12557 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>>()
12558 }),
12559
12560 6 => crate::wire::union_with_vector::Ref::Handles(unsafe {
12561 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>>()
12562 }),
12563
12564 7 => crate::wire::union_with_vector::Ref::ArrayS3A1(unsafe {
12565 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12566 }),
12567
12568 8 => crate::wire::union_with_vector::Ref::ArrayS3A2(unsafe {
12569 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12570 }),
12571
12572 9 => crate::wire::union_with_vector::Ref::VectorUnion(unsafe {
12573 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>>()
12574 }),
12575
12576 _ => unsafe { ::core::hint::unreachable_unchecked() },
12577 }
12578 }
12579 }
12580
12581 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
12582 where
12583 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12584 ___D: ::fidl_next::Decoder<'de>,
12585 ___D: ::fidl_next::fuchsia::HandleDecoder,
12586 {
12587 fn decode(
12588 mut slot: ::fidl_next::Slot<'_, Self>,
12589 decoder: &mut ___D,
12590 _: (),
12591 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12592 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12593 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12594 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
12595
12596 2 => {
12597 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
12598 raw,
12599 decoder,
12600 (4294967295, ()),
12601 )?
12602 }
12603
12604 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
12605 raw, decoder, 4294967295,
12606 )?,
12607
12608 4 => ::fidl_next::wire::Union::decode_as::<
12609 ___D,
12610 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
12611 >(raw, decoder, (4294967295, ()))?,
12612
12613 5 => ::fidl_next::wire::Union::decode_as::<
12614 ___D,
12615 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
12616 >(raw, decoder, (4294967295, ()))?,
12617
12618 6 => ::fidl_next::wire::Union::decode_as::<
12619 ___D,
12620 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
12621 >(raw, decoder, (4294967295, ()))?,
12622
12623 7 => ::fidl_next::wire::Union::decode_as::<
12624 ___D,
12625 [crate::wire::StructSize3Align1; 2],
12626 >(raw, decoder, ())?,
12627
12628 8 => ::fidl_next::wire::Union::decode_as::<
12629 ___D,
12630 [crate::wire::StructSize3Align2; 2],
12631 >(raw, decoder, ())?,
12632
12633 9 => ::fidl_next::wire::Union::decode_as::<
12634 ___D,
12635 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
12636 >(raw, decoder, (4294967295, ()))?,
12637
12638 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12639 }
12640
12641 Ok(())
12642 }
12643 }
12644
12645 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
12646 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12647 match self.raw.ordinal() {
12648 1 => unsafe { self.raw.get().deref_unchecked::<u8>().fmt(f) },
12649 2 => unsafe {
12650 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
12651 },
12652 3 => unsafe {
12653 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
12654 },
12655 4 => unsafe {
12656 self.raw.get().deref_unchecked::<
12657 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>
12658 >().fmt(f)
12659 },
12660 5 => unsafe {
12661 self.raw.get().deref_unchecked::<
12662 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>
12663 >().fmt(f)
12664 },
12665 6 => unsafe {
12666 self.raw.get().deref_unchecked::<
12667 ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>
12668 >().fmt(f)
12669 },
12670 7 => unsafe {
12671 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>().fmt(f)
12672 },
12673 8 => unsafe {
12674 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>().fmt(f)
12675 },
12676 9 => unsafe {
12677 self.raw.get().deref_unchecked::<
12678 ::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>
12679 >().fmt(f)
12680 },
12681 _ => unsafe { ::core::hint::unreachable_unchecked() },
12682 }
12683 }
12684 }
12685
12686 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
12687 type Natural = crate::natural::UnionWithVector;
12688 }
12689
12690 #[derive(Debug)]
12692 #[repr(C)]
12693 pub struct Sandwich6<'de> {
12694 pub before: ::fidl_next::wire::Uint32,
12695
12696 pub the_union: crate::wire::UnionWithVector<'de>,
12697
12698 pub after: ::fidl_next::wire::Uint32,
12699 }
12700
12701 static_assertions::const_assert_eq!(std::mem::size_of::<Sandwich6<'_>>(), 32);
12702 static_assertions::const_assert_eq!(std::mem::align_of::<Sandwich6<'_>>(), 8);
12703
12704 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, before), 0);
12705
12706 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, the_union), 8);
12707
12708 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, after), 24);
12709
12710 impl ::fidl_next::Constrained for Sandwich6<'_> {
12711 type Constraint = ();
12712
12713 fn validate(
12714 _: ::fidl_next::Slot<'_, Self>,
12715 _: Self::Constraint,
12716 ) -> Result<(), ::fidl_next::ValidationError> {
12717 Ok(())
12718 }
12719 }
12720
12721 unsafe impl ::fidl_next::Wire for Sandwich6<'static> {
12722 type Narrowed<'de> = Sandwich6<'de>;
12723
12724 #[inline]
12725 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12726 ::fidl_next::munge! {
12727 let Self {
12728
12729 before,
12730 the_union,
12731 after,
12732
12733 } = &mut *out_;
12734 }
12735
12736 ::fidl_next::Wire::zero_padding(before);
12737
12738 ::fidl_next::Wire::zero_padding(the_union);
12739
12740 ::fidl_next::Wire::zero_padding(after);
12741
12742 unsafe {
12743 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
12744 }
12745
12746 unsafe {
12747 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12748 }
12749 }
12750 }
12751
12752 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Sandwich6<'de>
12753 where
12754 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12755 ___D: ::fidl_next::Decoder<'de>,
12756 ___D: ::fidl_next::fuchsia::HandleDecoder,
12757 {
12758 fn decode(
12759 slot_: ::fidl_next::Slot<'_, Self>,
12760 decoder_: &mut ___D,
12761 _: (),
12762 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12763 if slot_.as_bytes()[28..32] != [0u8; 4] {
12764 return Err(::fidl_next::DecodeError::InvalidPadding);
12765 }
12766
12767 if slot_.as_bytes()[4..8] != [0u8; 4] {
12768 return Err(::fidl_next::DecodeError::InvalidPadding);
12769 }
12770
12771 ::fidl_next::munge! {
12772 let Self {
12773
12774 mut before,
12775 mut the_union,
12776 mut after,
12777
12778 } = slot_;
12779 }
12780
12781 let _field = before.as_mut();
12782
12783 ::fidl_next::Decode::decode(before.as_mut(), decoder_, ())?;
12784
12785 let _field = the_union.as_mut();
12786
12787 ::fidl_next::Decode::decode(the_union.as_mut(), decoder_, ())?;
12788
12789 let _field = after.as_mut();
12790
12791 ::fidl_next::Decode::decode(after.as_mut(), decoder_, ())?;
12792
12793 Ok(())
12794 }
12795 }
12796
12797 impl<'de> ::fidl_next::IntoNatural for Sandwich6<'de> {
12798 type Natural = crate::natural::Sandwich6;
12799 }
12800
12801 #[derive(Debug)]
12803 #[repr(C)]
12804 pub struct ShortStringThenHandle<'de> {
12805 pub s: ::fidl_next::wire::String<'de>,
12806
12807 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
12808 }
12809
12810 static_assertions::const_assert_eq!(std::mem::size_of::<ShortStringThenHandle<'_>>(), 24);
12811 static_assertions::const_assert_eq!(std::mem::align_of::<ShortStringThenHandle<'_>>(), 8);
12812
12813 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, s), 0);
12814
12815 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, h), 16);
12816
12817 impl ::fidl_next::Constrained for ShortStringThenHandle<'_> {
12818 type Constraint = ();
12819
12820 fn validate(
12821 _: ::fidl_next::Slot<'_, Self>,
12822 _: Self::Constraint,
12823 ) -> Result<(), ::fidl_next::ValidationError> {
12824 Ok(())
12825 }
12826 }
12827
12828 unsafe impl ::fidl_next::Wire for ShortStringThenHandle<'static> {
12829 type Narrowed<'de> = ShortStringThenHandle<'de>;
12830
12831 #[inline]
12832 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12833 ::fidl_next::munge! {
12834 let Self {
12835
12836 s,
12837 h,
12838
12839 } = &mut *out_;
12840 }
12841
12842 ::fidl_next::Wire::zero_padding(s);
12843
12844 ::fidl_next::Wire::zero_padding(h);
12845
12846 unsafe {
12847 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
12848 }
12849 }
12850 }
12851
12852 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ShortStringThenHandle<'de>
12853 where
12854 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12855 ___D: ::fidl_next::Decoder<'de>,
12856 ___D: ::fidl_next::fuchsia::HandleDecoder,
12857 {
12858 fn decode(
12859 slot_: ::fidl_next::Slot<'_, Self>,
12860 decoder_: &mut ___D,
12861 _: (),
12862 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12863 if slot_.as_bytes()[20..24] != [0u8; 4] {
12864 return Err(::fidl_next::DecodeError::InvalidPadding);
12865 }
12866
12867 ::fidl_next::munge! {
12868 let Self {
12869
12870 mut s,
12871 mut h,
12872
12873 } = slot_;
12874 }
12875
12876 let _field = s.as_mut();
12877 ::fidl_next::Constrained::validate(_field, 1)?;
12878 ::fidl_next::Decode::decode(s.as_mut(), decoder_, 1)?;
12879
12880 let s = unsafe { s.deref_unchecked() };
12881
12882 if s.len() > 1 {
12883 return Err(::fidl_next::DecodeError::VectorTooLong {
12884 size: s.len() as u64,
12885 limit: 1,
12886 });
12887 }
12888
12889 let _field = h.as_mut();
12890
12891 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12892
12893 Ok(())
12894 }
12895 }
12896
12897 impl<'de> ::fidl_next::IntoNatural for ShortStringThenHandle<'de> {
12898 type Natural = crate::natural::ShortStringThenHandle;
12899 }
12900
12901 #[repr(C)]
12903 pub struct SimpleResourceTable<'de> {
12904 pub(crate) table: ::fidl_next::wire::Table<'de>,
12905 }
12906
12907 impl<'de> Drop for SimpleResourceTable<'de> {
12908 fn drop(&mut self) {
12909 let _ = self
12910 .table
12911 .get(1)
12912 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
12913
12914 let _ = self
12915 .table
12916 .get(5)
12917 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
12918 }
12919 }
12920
12921 impl ::fidl_next::Constrained for SimpleResourceTable<'_> {
12922 type Constraint = ();
12923
12924 fn validate(
12925 _: ::fidl_next::Slot<'_, Self>,
12926 _: Self::Constraint,
12927 ) -> Result<(), ::fidl_next::ValidationError> {
12928 Ok(())
12929 }
12930 }
12931
12932 unsafe impl ::fidl_next::Wire for SimpleResourceTable<'static> {
12933 type Narrowed<'de> = SimpleResourceTable<'de>;
12934
12935 #[inline]
12936 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12937 ::fidl_next::munge!(let Self { table } = out);
12938 ::fidl_next::wire::Table::zero_padding(table);
12939 }
12940 }
12941
12942 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SimpleResourceTable<'de>
12943 where
12944 ___D: ::fidl_next::Decoder<'de> + ?Sized,
12945 ___D: ::fidl_next::fuchsia::HandleDecoder,
12946 {
12947 fn decode(
12948 slot: ::fidl_next::Slot<'_, Self>,
12949 decoder: &mut ___D,
12950 _: (),
12951 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12952 ::fidl_next::munge!(let Self { table } = slot);
12953
12954 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12955 match ordinal {
12956 0 => unsafe { ::core::hint::unreachable_unchecked() },
12957
12958 1 => {
12959 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
12960 slot.as_mut(),
12961 decoder,
12962 (),
12963 )?;
12964
12965 Ok(())
12966 }
12967
12968 5 => {
12969 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
12970 slot.as_mut(),
12971 decoder,
12972 (),
12973 )?;
12974
12975 Ok(())
12976 }
12977
12978 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12979 }
12980 })
12981 }
12982 }
12983
12984 impl<'de> SimpleResourceTable<'de> {
12985 pub fn x(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
12986 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12987 }
12988
12989 pub fn y(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
12990 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
12991 }
12992 }
12993
12994 impl<'de> ::core::fmt::Debug for SimpleResourceTable<'de> {
12995 fn fmt(
12996 &self,
12997 f: &mut ::core::fmt::Formatter<'_>,
12998 ) -> ::core::result::Result<(), ::core::fmt::Error> {
12999 f.debug_struct("SimpleResourceTable")
13000 .field("x", &self.x())
13001 .field("y", &self.y())
13002 .finish()
13003 }
13004 }
13005
13006 impl<'de> ::fidl_next::IntoNatural for SimpleResourceTable<'de> {
13007 type Natural = crate::natural::SimpleResourceTable;
13008 }
13009
13010 #[derive(Debug)]
13012 #[repr(C)]
13013 pub struct SingleHandle {
13014 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
13015 }
13016
13017 static_assertions::const_assert_eq!(std::mem::size_of::<SingleHandle>(), 4);
13018 static_assertions::const_assert_eq!(std::mem::align_of::<SingleHandle>(), 4);
13019
13020 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleHandle, h), 0);
13021
13022 impl ::fidl_next::Constrained for SingleHandle {
13023 type Constraint = ();
13024
13025 fn validate(
13026 _: ::fidl_next::Slot<'_, Self>,
13027 _: Self::Constraint,
13028 ) -> Result<(), ::fidl_next::ValidationError> {
13029 Ok(())
13030 }
13031 }
13032
13033 unsafe impl ::fidl_next::Wire for SingleHandle {
13034 type Narrowed<'de> = SingleHandle;
13035
13036 #[inline]
13037 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13038 ::fidl_next::munge! {
13039 let Self {
13040
13041 h,
13042
13043 } = &mut *out_;
13044 }
13045
13046 ::fidl_next::Wire::zero_padding(h);
13047 }
13048 }
13049
13050 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleHandle
13051 where
13052 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13053 ___D: ::fidl_next::fuchsia::HandleDecoder,
13054 {
13055 fn decode(
13056 slot_: ::fidl_next::Slot<'_, Self>,
13057 decoder_: &mut ___D,
13058 _: (),
13059 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13060 ::fidl_next::munge! {
13061 let Self {
13062
13063 mut h,
13064
13065 } = slot_;
13066 }
13067
13068 let _field = h.as_mut();
13069
13070 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13071
13072 Ok(())
13073 }
13074 }
13075
13076 impl ::fidl_next::IntoNatural for SingleHandle {
13077 type Natural = crate::natural::SingleHandle;
13078 }
13079
13080 #[derive(Debug)]
13082 #[repr(C)]
13083 pub struct SingleOptionalHandle {
13084 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
13085 }
13086
13087 static_assertions::const_assert_eq!(std::mem::size_of::<SingleOptionalHandle>(), 4);
13088 static_assertions::const_assert_eq!(std::mem::align_of::<SingleOptionalHandle>(), 4);
13089
13090 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleOptionalHandle, h), 0);
13091
13092 impl ::fidl_next::Constrained for SingleOptionalHandle {
13093 type Constraint = ();
13094
13095 fn validate(
13096 _: ::fidl_next::Slot<'_, Self>,
13097 _: Self::Constraint,
13098 ) -> Result<(), ::fidl_next::ValidationError> {
13099 Ok(())
13100 }
13101 }
13102
13103 unsafe impl ::fidl_next::Wire for SingleOptionalHandle {
13104 type Narrowed<'de> = SingleOptionalHandle;
13105
13106 #[inline]
13107 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13108 ::fidl_next::munge! {
13109 let Self {
13110
13111 h,
13112
13113 } = &mut *out_;
13114 }
13115
13116 ::fidl_next::Wire::zero_padding(h);
13117 }
13118 }
13119
13120 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleOptionalHandle
13121 where
13122 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13123 ___D: ::fidl_next::fuchsia::HandleDecoder,
13124 {
13125 fn decode(
13126 slot_: ::fidl_next::Slot<'_, Self>,
13127 decoder_: &mut ___D,
13128 _: (),
13129 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13130 ::fidl_next::munge! {
13131 let Self {
13132
13133 mut h,
13134
13135 } = slot_;
13136 }
13137
13138 let _field = h.as_mut();
13139
13140 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13141
13142 Ok(())
13143 }
13144 }
13145
13146 impl ::fidl_next::IntoNatural for SingleOptionalHandle {
13147 type Natural = crate::natural::SingleOptionalHandle;
13148 }
13149
13150 #[derive(Debug)]
13152 #[repr(C)]
13153 pub struct StructOfEndpoints {
13154 pub client_end:
13155 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13156
13157 pub optional_client_end:
13158 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13159
13160 pub server_end:
13161 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13162
13163 pub optional_server_end:
13164 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13165 }
13166
13167 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfEndpoints>(), 16);
13168 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfEndpoints>(), 4);
13169
13170 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, client_end), 0);
13171
13172 static_assertions::const_assert_eq!(
13173 std::mem::offset_of!(StructOfEndpoints, optional_client_end),
13174 4
13175 );
13176
13177 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, server_end), 8);
13178
13179 static_assertions::const_assert_eq!(
13180 std::mem::offset_of!(StructOfEndpoints, optional_server_end),
13181 12
13182 );
13183
13184 impl ::fidl_next::Constrained for StructOfEndpoints {
13185 type Constraint = ();
13186
13187 fn validate(
13188 _: ::fidl_next::Slot<'_, Self>,
13189 _: Self::Constraint,
13190 ) -> Result<(), ::fidl_next::ValidationError> {
13191 Ok(())
13192 }
13193 }
13194
13195 unsafe impl ::fidl_next::Wire for StructOfEndpoints {
13196 type Narrowed<'de> = StructOfEndpoints;
13197
13198 #[inline]
13199 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13200 ::fidl_next::munge! {
13201 let Self {
13202
13203 client_end,
13204 optional_client_end,
13205 server_end,
13206 optional_server_end,
13207
13208 } = &mut *out_;
13209 }
13210
13211 ::fidl_next::Wire::zero_padding(client_end);
13212
13213 ::fidl_next::Wire::zero_padding(optional_client_end);
13214
13215 ::fidl_next::Wire::zero_padding(server_end);
13216
13217 ::fidl_next::Wire::zero_padding(optional_server_end);
13218 }
13219 }
13220
13221 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfEndpoints
13222 where
13223 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13224 ___D: ::fidl_next::fuchsia::HandleDecoder,
13225 {
13226 fn decode(
13227 slot_: ::fidl_next::Slot<'_, Self>,
13228 decoder_: &mut ___D,
13229 _: (),
13230 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13231 ::fidl_next::munge! {
13232 let Self {
13233
13234 mut client_end,
13235 mut optional_client_end,
13236 mut server_end,
13237 mut optional_server_end,
13238
13239 } = slot_;
13240 }
13241
13242 let _field = client_end.as_mut();
13243
13244 ::fidl_next::Decode::decode(client_end.as_mut(), decoder_, ())?;
13245
13246 let _field = optional_client_end.as_mut();
13247
13248 ::fidl_next::Decode::decode(optional_client_end.as_mut(), decoder_, ())?;
13249
13250 let _field = server_end.as_mut();
13251
13252 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
13253
13254 let _field = optional_server_end.as_mut();
13255
13256 ::fidl_next::Decode::decode(optional_server_end.as_mut(), decoder_, ())?;
13257
13258 Ok(())
13259 }
13260 }
13261
13262 impl ::fidl_next::IntoNatural for StructOfEndpoints {
13263 type Natural = crate::natural::StructOfEndpoints;
13264 }
13265
13266 #[derive(Debug)]
13268 #[repr(C)]
13269 pub struct StructOfOptionalUnionOfHandle {
13270 pub u: crate::wire_optional::UnionOfHandle,
13271 }
13272
13273 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfOptionalUnionOfHandle>(), 16);
13274 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfOptionalUnionOfHandle>(), 8);
13275
13276 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfOptionalUnionOfHandle, u), 0);
13277
13278 impl ::fidl_next::Constrained for StructOfOptionalUnionOfHandle {
13279 type Constraint = ();
13280
13281 fn validate(
13282 _: ::fidl_next::Slot<'_, Self>,
13283 _: Self::Constraint,
13284 ) -> Result<(), ::fidl_next::ValidationError> {
13285 Ok(())
13286 }
13287 }
13288
13289 unsafe impl ::fidl_next::Wire for StructOfOptionalUnionOfHandle {
13290 type Narrowed<'de> = StructOfOptionalUnionOfHandle;
13291
13292 #[inline]
13293 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13294 ::fidl_next::munge! {
13295 let Self {
13296
13297 u,
13298
13299 } = &mut *out_;
13300 }
13301
13302 ::fidl_next::Wire::zero_padding(u);
13303 }
13304 }
13305
13306 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfOptionalUnionOfHandle
13307 where
13308 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13309 ___D: ::fidl_next::fuchsia::HandleDecoder,
13310 {
13311 fn decode(
13312 slot_: ::fidl_next::Slot<'_, Self>,
13313 decoder_: &mut ___D,
13314 _: (),
13315 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13316 ::fidl_next::munge! {
13317 let Self {
13318
13319 mut u,
13320
13321 } = slot_;
13322 }
13323
13324 let _field = u.as_mut();
13325
13326 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
13327
13328 Ok(())
13329 }
13330 }
13331
13332 impl ::fidl_next::IntoNatural for StructOfOptionalUnionOfHandle {
13333 type Natural = crate::natural::StructOfOptionalUnionOfHandle;
13334 }
13335
13336 #[derive(Debug)]
13338 #[repr(C)]
13339 pub struct StructOfSimpleResourceTable<'de> {
13340 pub table: crate::wire::SimpleResourceTable<'de>,
13341 }
13342
13343 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfSimpleResourceTable<'_>>(), 16);
13344 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfSimpleResourceTable<'_>>(), 8);
13345
13346 static_assertions::const_assert_eq!(
13347 std::mem::offset_of!(StructOfSimpleResourceTable<'_>, table),
13348 0
13349 );
13350
13351 impl ::fidl_next::Constrained for StructOfSimpleResourceTable<'_> {
13352 type Constraint = ();
13353
13354 fn validate(
13355 _: ::fidl_next::Slot<'_, Self>,
13356 _: Self::Constraint,
13357 ) -> Result<(), ::fidl_next::ValidationError> {
13358 Ok(())
13359 }
13360 }
13361
13362 unsafe impl ::fidl_next::Wire for StructOfSimpleResourceTable<'static> {
13363 type Narrowed<'de> = StructOfSimpleResourceTable<'de>;
13364
13365 #[inline]
13366 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13367 ::fidl_next::munge! {
13368 let Self {
13369
13370 table,
13371
13372 } = &mut *out_;
13373 }
13374
13375 ::fidl_next::Wire::zero_padding(table);
13376 }
13377 }
13378
13379 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StructOfSimpleResourceTable<'de>
13380 where
13381 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13382 ___D: ::fidl_next::Decoder<'de>,
13383 ___D: ::fidl_next::fuchsia::HandleDecoder,
13384 {
13385 fn decode(
13386 slot_: ::fidl_next::Slot<'_, Self>,
13387 decoder_: &mut ___D,
13388 _: (),
13389 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13390 ::fidl_next::munge! {
13391 let Self {
13392
13393 mut table,
13394
13395 } = slot_;
13396 }
13397
13398 let _field = table.as_mut();
13399
13400 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
13401
13402 Ok(())
13403 }
13404 }
13405
13406 impl<'de> ::fidl_next::IntoNatural for StructOfSimpleResourceTable<'de> {
13407 type Natural = crate::natural::StructOfSimpleResourceTable;
13408 }
13409
13410 #[repr(C)]
13412 pub struct TableFieldInlinedHandle<'de> {
13413 pub(crate) table: ::fidl_next::wire::Table<'de>,
13414 }
13415
13416 impl<'de> Drop for TableFieldInlinedHandle<'de> {
13417 fn drop(&mut self) {
13418 let _ = self.table.get(1).map(|envelope| unsafe {
13419 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
13420 });
13421 }
13422 }
13423
13424 impl ::fidl_next::Constrained for TableFieldInlinedHandle<'_> {
13425 type Constraint = ();
13426
13427 fn validate(
13428 _: ::fidl_next::Slot<'_, Self>,
13429 _: Self::Constraint,
13430 ) -> Result<(), ::fidl_next::ValidationError> {
13431 Ok(())
13432 }
13433 }
13434
13435 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandle<'static> {
13436 type Narrowed<'de> = TableFieldInlinedHandle<'de>;
13437
13438 #[inline]
13439 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13440 ::fidl_next::munge!(let Self { table } = out);
13441 ::fidl_next::wire::Table::zero_padding(table);
13442 }
13443 }
13444
13445 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandle<'de>
13446 where
13447 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13448 ___D: ::fidl_next::fuchsia::HandleDecoder,
13449 {
13450 fn decode(
13451 slot: ::fidl_next::Slot<'_, Self>,
13452 decoder: &mut ___D,
13453 _: (),
13454 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13455 ::fidl_next::munge!(let Self { table } = slot);
13456
13457 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13458 match ordinal {
13459 0 => unsafe { ::core::hint::unreachable_unchecked() },
13460
13461 1 => {
13462 ::fidl_next::wire::Envelope::decode_as::<
13463 ___D,
13464 ::fidl_next::wire::fuchsia::Channel,
13465 >(slot.as_mut(), decoder, ())?;
13466
13467 Ok(())
13468 }
13469
13470 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13471 }
13472 })
13473 }
13474 }
13475
13476 impl<'de> TableFieldInlinedHandle<'de> {
13477 pub fn f(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
13478 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13479 }
13480 }
13481
13482 impl<'de> ::core::fmt::Debug for TableFieldInlinedHandle<'de> {
13483 fn fmt(
13484 &self,
13485 f: &mut ::core::fmt::Formatter<'_>,
13486 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13487 f.debug_struct("TableFieldInlinedHandle").field("f", &self.f()).finish()
13488 }
13489 }
13490
13491 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandle<'de> {
13492 type Natural = crate::natural::TableFieldInlinedHandle;
13493 }
13494
13495 #[derive(Debug)]
13497 #[repr(C)]
13498 pub struct TableFieldInlinedHandleStruct<'de> {
13499 pub t: crate::wire::TableFieldInlinedHandle<'de>,
13500 }
13501
13502 static_assertions::const_assert_eq!(
13503 std::mem::size_of::<TableFieldInlinedHandleStruct<'_>>(),
13504 16
13505 );
13506 static_assertions::const_assert_eq!(
13507 std::mem::align_of::<TableFieldInlinedHandleStruct<'_>>(),
13508 8
13509 );
13510
13511 static_assertions::const_assert_eq!(
13512 std::mem::offset_of!(TableFieldInlinedHandleStruct<'_>, t),
13513 0
13514 );
13515
13516 impl ::fidl_next::Constrained for TableFieldInlinedHandleStruct<'_> {
13517 type Constraint = ();
13518
13519 fn validate(
13520 _: ::fidl_next::Slot<'_, Self>,
13521 _: Self::Constraint,
13522 ) -> Result<(), ::fidl_next::ValidationError> {
13523 Ok(())
13524 }
13525 }
13526
13527 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandleStruct<'static> {
13528 type Narrowed<'de> = TableFieldInlinedHandleStruct<'de>;
13529
13530 #[inline]
13531 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13532 ::fidl_next::munge! {
13533 let Self {
13534
13535 t,
13536
13537 } = &mut *out_;
13538 }
13539
13540 ::fidl_next::Wire::zero_padding(t);
13541 }
13542 }
13543
13544 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandleStruct<'de>
13545 where
13546 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13547 ___D: ::fidl_next::Decoder<'de>,
13548 ___D: ::fidl_next::fuchsia::HandleDecoder,
13549 {
13550 fn decode(
13551 slot_: ::fidl_next::Slot<'_, Self>,
13552 decoder_: &mut ___D,
13553 _: (),
13554 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13555 ::fidl_next::munge! {
13556 let Self {
13557
13558 mut t,
13559
13560 } = slot_;
13561 }
13562
13563 let _field = t.as_mut();
13564
13565 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
13566
13567 Ok(())
13568 }
13569 }
13570
13571 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandleStruct<'de> {
13572 type Natural = crate::natural::TableFieldInlinedHandleStruct;
13573 }
13574
13575 #[repr(C)]
13577 pub struct TableFieldUnknownResource<'de> {
13578 pub(crate) table: ::fidl_next::wire::Table<'de>,
13579 }
13580
13581 impl<'de> Drop for TableFieldUnknownResource<'de> {
13582 fn drop(&mut self) {}
13583 }
13584
13585 impl ::fidl_next::Constrained for TableFieldUnknownResource<'_> {
13586 type Constraint = ();
13587
13588 fn validate(
13589 _: ::fidl_next::Slot<'_, Self>,
13590 _: Self::Constraint,
13591 ) -> Result<(), ::fidl_next::ValidationError> {
13592 Ok(())
13593 }
13594 }
13595
13596 unsafe impl ::fidl_next::Wire for TableFieldUnknownResource<'static> {
13597 type Narrowed<'de> = TableFieldUnknownResource<'de>;
13598
13599 #[inline]
13600 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13601 ::fidl_next::munge!(let Self { table } = out);
13602 ::fidl_next::wire::Table::zero_padding(table);
13603 }
13604 }
13605
13606 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResource<'de>
13607 where
13608 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13609 ___D: ::fidl_next::fuchsia::HandleDecoder,
13610 {
13611 fn decode(
13612 slot: ::fidl_next::Slot<'_, Self>,
13613 decoder: &mut ___D,
13614 _: (),
13615 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13616 ::fidl_next::munge!(let Self { table } = slot);
13617
13618 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13619 match ordinal {
13620 0 => unsafe { ::core::hint::unreachable_unchecked() },
13621
13622 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13623 }
13624 })
13625 }
13626 }
13627
13628 impl<'de> TableFieldUnknownResource<'de> {}
13629
13630 impl<'de> ::core::fmt::Debug for TableFieldUnknownResource<'de> {
13631 fn fmt(
13632 &self,
13633 f: &mut ::core::fmt::Formatter<'_>,
13634 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13635 f.debug_struct("TableFieldUnknownResource").finish()
13636 }
13637 }
13638
13639 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResource<'de> {
13640 type Natural = crate::natural::TableFieldUnknownResource;
13641 }
13642
13643 #[derive(Debug)]
13645 #[repr(C)]
13646 pub struct TableFieldUnknownResourceStruct<'de> {
13647 pub t: crate::wire::TableFieldUnknownResource<'de>,
13648 }
13649
13650 static_assertions::const_assert_eq!(
13651 std::mem::size_of::<TableFieldUnknownResourceStruct<'_>>(),
13652 16
13653 );
13654 static_assertions::const_assert_eq!(
13655 std::mem::align_of::<TableFieldUnknownResourceStruct<'_>>(),
13656 8
13657 );
13658
13659 static_assertions::const_assert_eq!(
13660 std::mem::offset_of!(TableFieldUnknownResourceStruct<'_>, t),
13661 0
13662 );
13663
13664 impl ::fidl_next::Constrained for TableFieldUnknownResourceStruct<'_> {
13665 type Constraint = ();
13666
13667 fn validate(
13668 _: ::fidl_next::Slot<'_, Self>,
13669 _: Self::Constraint,
13670 ) -> Result<(), ::fidl_next::ValidationError> {
13671 Ok(())
13672 }
13673 }
13674
13675 unsafe impl ::fidl_next::Wire for TableFieldUnknownResourceStruct<'static> {
13676 type Narrowed<'de> = TableFieldUnknownResourceStruct<'de>;
13677
13678 #[inline]
13679 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13680 ::fidl_next::munge! {
13681 let Self {
13682
13683 t,
13684
13685 } = &mut *out_;
13686 }
13687
13688 ::fidl_next::Wire::zero_padding(t);
13689 }
13690 }
13691
13692 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResourceStruct<'de>
13693 where
13694 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13695 ___D: ::fidl_next::Decoder<'de>,
13696 ___D: ::fidl_next::fuchsia::HandleDecoder,
13697 {
13698 fn decode(
13699 slot_: ::fidl_next::Slot<'_, Self>,
13700 decoder_: &mut ___D,
13701 _: (),
13702 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13703 ::fidl_next::munge! {
13704 let Self {
13705
13706 mut t,
13707
13708 } = slot_;
13709 }
13710
13711 let _field = t.as_mut();
13712
13713 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
13714
13715 Ok(())
13716 }
13717 }
13718
13719 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResourceStruct<'de> {
13720 type Natural = crate::natural::TableFieldUnknownResourceStruct;
13721 }
13722
13723 #[repr(C)]
13725 pub struct TableOfEndpointsTable<'de> {
13726 pub(crate) table: ::fidl_next::wire::Table<'de>,
13727 }
13728
13729 impl<'de> Drop for TableOfEndpointsTable<'de> {
13730 fn drop(&mut self) {
13731 let _ = self.table.get(1)
13732 .map(|envelope| unsafe {
13733 envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
13734 });
13735
13736 let _ = self.table.get(2)
13737 .map(|envelope| unsafe {
13738 envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
13739 });
13740 }
13741 }
13742
13743 impl ::fidl_next::Constrained for TableOfEndpointsTable<'_> {
13744 type Constraint = ();
13745
13746 fn validate(
13747 _: ::fidl_next::Slot<'_, Self>,
13748 _: Self::Constraint,
13749 ) -> Result<(), ::fidl_next::ValidationError> {
13750 Ok(())
13751 }
13752 }
13753
13754 unsafe impl ::fidl_next::Wire for TableOfEndpointsTable<'static> {
13755 type Narrowed<'de> = TableOfEndpointsTable<'de>;
13756
13757 #[inline]
13758 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13759 ::fidl_next::munge!(let Self { table } = out);
13760 ::fidl_next::wire::Table::zero_padding(table);
13761 }
13762 }
13763
13764 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpointsTable<'de>
13765 where
13766 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13767 ___D: ::fidl_next::fuchsia::HandleDecoder,
13768 {
13769 fn decode(
13770 slot: ::fidl_next::Slot<'_, Self>,
13771 decoder: &mut ___D,
13772 _: (),
13773 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13774 ::fidl_next::munge!(let Self { table } = slot);
13775
13776 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13777 match ordinal {
13778 0 => unsafe { ::core::hint::unreachable_unchecked() },
13779
13780 1 => {
13781 ::fidl_next::wire::Envelope::decode_as::<
13782 ___D,
13783 ::fidl_next::ClientEnd<
13784 crate::Protocol,
13785 ::fidl_next::wire::fuchsia::Channel,
13786 >,
13787 >(slot.as_mut(), decoder, ())?;
13788
13789 Ok(())
13790 }
13791
13792 2 => {
13793 ::fidl_next::wire::Envelope::decode_as::<
13794 ___D,
13795 ::fidl_next::ServerEnd<
13796 crate::Protocol,
13797 ::fidl_next::wire::fuchsia::Channel,
13798 >,
13799 >(slot.as_mut(), decoder, ())?;
13800
13801 Ok(())
13802 }
13803
13804 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13805 }
13806 })
13807 }
13808 }
13809
13810 impl<'de> TableOfEndpointsTable<'de> {
13811 pub fn client_end(
13812 &self,
13813 ) -> ::core::option::Option<
13814 &::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13815 > {
13816 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13817 }
13818
13819 pub fn server_end(
13820 &self,
13821 ) -> ::core::option::Option<
13822 &::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13823 > {
13824 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13825 }
13826 }
13827
13828 impl<'de> ::core::fmt::Debug for TableOfEndpointsTable<'de> {
13829 fn fmt(
13830 &self,
13831 f: &mut ::core::fmt::Formatter<'_>,
13832 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13833 f.debug_struct("TableOfEndpointsTable")
13834 .field("client_end", &self.client_end())
13835 .field("server_end", &self.server_end())
13836 .finish()
13837 }
13838 }
13839
13840 impl<'de> ::fidl_next::IntoNatural for TableOfEndpointsTable<'de> {
13841 type Natural = crate::natural::TableOfEndpointsTable;
13842 }
13843
13844 #[derive(Debug)]
13846 #[repr(C)]
13847 pub struct TableOfEndpoints<'de> {
13848 pub t: crate::wire::TableOfEndpointsTable<'de>,
13849 }
13850
13851 static_assertions::const_assert_eq!(std::mem::size_of::<TableOfEndpoints<'_>>(), 16);
13852 static_assertions::const_assert_eq!(std::mem::align_of::<TableOfEndpoints<'_>>(), 8);
13853
13854 static_assertions::const_assert_eq!(std::mem::offset_of!(TableOfEndpoints<'_>, t), 0);
13855
13856 impl ::fidl_next::Constrained for TableOfEndpoints<'_> {
13857 type Constraint = ();
13858
13859 fn validate(
13860 _: ::fidl_next::Slot<'_, Self>,
13861 _: Self::Constraint,
13862 ) -> Result<(), ::fidl_next::ValidationError> {
13863 Ok(())
13864 }
13865 }
13866
13867 unsafe impl ::fidl_next::Wire for TableOfEndpoints<'static> {
13868 type Narrowed<'de> = TableOfEndpoints<'de>;
13869
13870 #[inline]
13871 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13872 ::fidl_next::munge! {
13873 let Self {
13874
13875 t,
13876
13877 } = &mut *out_;
13878 }
13879
13880 ::fidl_next::Wire::zero_padding(t);
13881 }
13882 }
13883
13884 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpoints<'de>
13885 where
13886 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13887 ___D: ::fidl_next::Decoder<'de>,
13888 ___D: ::fidl_next::fuchsia::HandleDecoder,
13889 {
13890 fn decode(
13891 slot_: ::fidl_next::Slot<'_, Self>,
13892 decoder_: &mut ___D,
13893 _: (),
13894 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13895 ::fidl_next::munge! {
13896 let Self {
13897
13898 mut t,
13899
13900 } = slot_;
13901 }
13902
13903 let _field = t.as_mut();
13904
13905 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
13906
13907 Ok(())
13908 }
13909 }
13910
13911 impl<'de> ::fidl_next::IntoNatural for TableOfEndpoints<'de> {
13912 type Natural = crate::natural::TableOfEndpoints;
13913 }
13914
13915 #[repr(C)]
13917 pub struct TableUnionWithVectorReservedSandwich<'de> {
13918 pub(crate) table: ::fidl_next::wire::Table<'de>,
13919 }
13920
13921 impl<'de> Drop for TableUnionWithVectorReservedSandwich<'de> {
13922 fn drop(&mut self) {
13923 let _ = self.table.get(2).map(|envelope| unsafe {
13924 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
13925 });
13926 }
13927 }
13928
13929 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwich<'_> {
13930 type Constraint = ();
13931
13932 fn validate(
13933 _: ::fidl_next::Slot<'_, Self>,
13934 _: Self::Constraint,
13935 ) -> Result<(), ::fidl_next::ValidationError> {
13936 Ok(())
13937 }
13938 }
13939
13940 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwich<'static> {
13941 type Narrowed<'de> = TableUnionWithVectorReservedSandwich<'de>;
13942
13943 #[inline]
13944 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13945 ::fidl_next::munge!(let Self { table } = out);
13946 ::fidl_next::wire::Table::zero_padding(table);
13947 }
13948 }
13949
13950 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwich<'de>
13951 where
13952 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13953 ___D: ::fidl_next::fuchsia::HandleDecoder,
13954 {
13955 fn decode(
13956 slot: ::fidl_next::Slot<'_, Self>,
13957 decoder: &mut ___D,
13958 _: (),
13959 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13960 ::fidl_next::munge!(let Self { table } = slot);
13961
13962 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13963 match ordinal {
13964 0 => unsafe { ::core::hint::unreachable_unchecked() },
13965
13966 2 => {
13967 ::fidl_next::wire::Envelope::decode_as::<
13968 ___D,
13969 crate::wire::UnionWithVector<'de>,
13970 >(slot.as_mut(), decoder, ())?;
13971
13972 Ok(())
13973 }
13974
13975 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13976 }
13977 })
13978 }
13979 }
13980
13981 impl<'de> TableUnionWithVectorReservedSandwich<'de> {
13982 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
13983 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13984 }
13985 }
13986
13987 impl<'de> ::core::fmt::Debug for TableUnionWithVectorReservedSandwich<'de> {
13988 fn fmt(
13989 &self,
13990 f: &mut ::core::fmt::Formatter<'_>,
13991 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13992 f.debug_struct("TableUnionWithVectorReservedSandwich").field("uv", &self.uv()).finish()
13993 }
13994 }
13995
13996 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwich<'de> {
13997 type Natural = crate::natural::TableUnionWithVectorReservedSandwich;
13998 }
13999
14000 #[derive(Debug)]
14002 #[repr(C)]
14003 pub struct TableUnionWithVectorReservedSandwichStruct<'de> {
14004 pub table: crate::wire::TableUnionWithVectorReservedSandwich<'de>,
14005 }
14006
14007 static_assertions::const_assert_eq!(
14008 std::mem::size_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
14009 16
14010 );
14011 static_assertions::const_assert_eq!(
14012 std::mem::align_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
14013 8
14014 );
14015
14016 static_assertions::const_assert_eq!(
14017 std::mem::offset_of!(TableUnionWithVectorReservedSandwichStruct<'_>, table),
14018 0
14019 );
14020
14021 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwichStruct<'_> {
14022 type Constraint = ();
14023
14024 fn validate(
14025 _: ::fidl_next::Slot<'_, Self>,
14026 _: Self::Constraint,
14027 ) -> Result<(), ::fidl_next::ValidationError> {
14028 Ok(())
14029 }
14030 }
14031
14032 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwichStruct<'static> {
14033 type Narrowed<'de> = TableUnionWithVectorReservedSandwichStruct<'de>;
14034
14035 #[inline]
14036 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14037 ::fidl_next::munge! {
14038 let Self {
14039
14040 table,
14041
14042 } = &mut *out_;
14043 }
14044
14045 ::fidl_next::Wire::zero_padding(table);
14046 }
14047 }
14048
14049 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwichStruct<'de>
14050 where
14051 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14052 ___D: ::fidl_next::Decoder<'de>,
14053 ___D: ::fidl_next::fuchsia::HandleDecoder,
14054 {
14055 fn decode(
14056 slot_: ::fidl_next::Slot<'_, Self>,
14057 decoder_: &mut ___D,
14058 _: (),
14059 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14060 ::fidl_next::munge! {
14061 let Self {
14062
14063 mut table,
14064
14065 } = slot_;
14066 }
14067
14068 let _field = table.as_mut();
14069
14070 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14071
14072 Ok(())
14073 }
14074 }
14075
14076 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwichStruct<'de> {
14077 type Natural = crate::natural::TableUnionWithVectorReservedSandwichStruct;
14078 }
14079
14080 #[repr(C)]
14082 pub struct TableUnionWithVectorStructSandwich<'de> {
14083 pub(crate) table: ::fidl_next::wire::Table<'de>,
14084 }
14085
14086 impl<'de> Drop for TableUnionWithVectorStructSandwich<'de> {
14087 fn drop(&mut self) {
14088 let _ = self.table.get(1).map(|envelope| unsafe {
14089 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14090 });
14091
14092 let _ = self.table.get(2).map(|envelope| unsafe {
14093 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
14094 });
14095
14096 let _ = self.table.get(3).map(|envelope| unsafe {
14097 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14098 });
14099 }
14100 }
14101
14102 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwich<'_> {
14103 type Constraint = ();
14104
14105 fn validate(
14106 _: ::fidl_next::Slot<'_, Self>,
14107 _: Self::Constraint,
14108 ) -> Result<(), ::fidl_next::ValidationError> {
14109 Ok(())
14110 }
14111 }
14112
14113 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwich<'static> {
14114 type Narrowed<'de> = TableUnionWithVectorStructSandwich<'de>;
14115
14116 #[inline]
14117 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14118 ::fidl_next::munge!(let Self { table } = out);
14119 ::fidl_next::wire::Table::zero_padding(table);
14120 }
14121 }
14122
14123 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwich<'de>
14124 where
14125 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14126 ___D: ::fidl_next::fuchsia::HandleDecoder,
14127 {
14128 fn decode(
14129 slot: ::fidl_next::Slot<'_, Self>,
14130 decoder: &mut ___D,
14131 _: (),
14132 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14133 ::fidl_next::munge!(let Self { table } = slot);
14134
14135 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14136 match ordinal {
14137 0 => unsafe { ::core::hint::unreachable_unchecked() },
14138
14139 1 => {
14140 ::fidl_next::wire::Envelope::decode_as::<
14141 ___D,
14142 crate::wire::StructSize3Align1,
14143 >(slot.as_mut(), decoder, ())?;
14144
14145 Ok(())
14146 }
14147
14148 2 => {
14149 ::fidl_next::wire::Envelope::decode_as::<
14150 ___D,
14151 crate::wire::UnionWithVector<'de>,
14152 >(slot.as_mut(), decoder, ())?;
14153
14154 Ok(())
14155 }
14156
14157 3 => {
14158 ::fidl_next::wire::Envelope::decode_as::<
14159 ___D,
14160 crate::wire::StructSize3Align1,
14161 >(slot.as_mut(), decoder, ())?;
14162
14163 Ok(())
14164 }
14165
14166 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14167 }
14168 })
14169 }
14170 }
14171
14172 impl<'de> TableUnionWithVectorStructSandwich<'de> {
14173 pub fn s1(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14174 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14175 }
14176
14177 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
14178 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14179 }
14180
14181 pub fn s2(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14182 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
14183 }
14184 }
14185
14186 impl<'de> ::core::fmt::Debug for TableUnionWithVectorStructSandwich<'de> {
14187 fn fmt(
14188 &self,
14189 f: &mut ::core::fmt::Formatter<'_>,
14190 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14191 f.debug_struct("TableUnionWithVectorStructSandwich")
14192 .field("s1", &self.s1())
14193 .field("uv", &self.uv())
14194 .field("s2", &self.s2())
14195 .finish()
14196 }
14197 }
14198
14199 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwich<'de> {
14200 type Natural = crate::natural::TableUnionWithVectorStructSandwich;
14201 }
14202
14203 #[derive(Debug)]
14205 #[repr(C)]
14206 pub struct TableUnionWithVectorStructSandwichStruct<'de> {
14207 pub table: crate::wire::TableUnionWithVectorStructSandwich<'de>,
14208 }
14209
14210 static_assertions::const_assert_eq!(
14211 std::mem::size_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14212 16
14213 );
14214 static_assertions::const_assert_eq!(
14215 std::mem::align_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14216 8
14217 );
14218
14219 static_assertions::const_assert_eq!(
14220 std::mem::offset_of!(TableUnionWithVectorStructSandwichStruct<'_>, table),
14221 0
14222 );
14223
14224 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwichStruct<'_> {
14225 type Constraint = ();
14226
14227 fn validate(
14228 _: ::fidl_next::Slot<'_, Self>,
14229 _: Self::Constraint,
14230 ) -> Result<(), ::fidl_next::ValidationError> {
14231 Ok(())
14232 }
14233 }
14234
14235 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwichStruct<'static> {
14236 type Narrowed<'de> = TableUnionWithVectorStructSandwichStruct<'de>;
14237
14238 #[inline]
14239 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14240 ::fidl_next::munge! {
14241 let Self {
14242
14243 table,
14244
14245 } = &mut *out_;
14246 }
14247
14248 ::fidl_next::Wire::zero_padding(table);
14249 }
14250 }
14251
14252 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwichStruct<'de>
14253 where
14254 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14255 ___D: ::fidl_next::Decoder<'de>,
14256 ___D: ::fidl_next::fuchsia::HandleDecoder,
14257 {
14258 fn decode(
14259 slot_: ::fidl_next::Slot<'_, Self>,
14260 decoder_: &mut ___D,
14261 _: (),
14262 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14263 ::fidl_next::munge! {
14264 let Self {
14265
14266 mut table,
14267
14268 } = slot_;
14269 }
14270
14271 let _field = table.as_mut();
14272
14273 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14274
14275 Ok(())
14276 }
14277 }
14278
14279 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwichStruct<'de> {
14280 type Natural = crate::natural::TableUnionWithVectorStructSandwichStruct;
14281 }
14282
14283 #[derive(Debug)]
14285 #[repr(C)]
14286 pub struct TestFlexibleResourceXUnionInStruct<'de> {
14287 pub xu: crate::wire::SampleResourceXUnion<'de>,
14288 }
14289
14290 static_assertions::const_assert_eq!(
14291 std::mem::size_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
14292 16
14293 );
14294 static_assertions::const_assert_eq!(
14295 std::mem::align_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
14296 8
14297 );
14298
14299 static_assertions::const_assert_eq!(
14300 std::mem::offset_of!(TestFlexibleResourceXUnionInStruct<'_>, xu),
14301 0
14302 );
14303
14304 impl ::fidl_next::Constrained for TestFlexibleResourceXUnionInStruct<'_> {
14305 type Constraint = ();
14306
14307 fn validate(
14308 _: ::fidl_next::Slot<'_, Self>,
14309 _: Self::Constraint,
14310 ) -> Result<(), ::fidl_next::ValidationError> {
14311 Ok(())
14312 }
14313 }
14314
14315 unsafe impl ::fidl_next::Wire for TestFlexibleResourceXUnionInStruct<'static> {
14316 type Narrowed<'de> = TestFlexibleResourceXUnionInStruct<'de>;
14317
14318 #[inline]
14319 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14320 ::fidl_next::munge! {
14321 let Self {
14322
14323 xu,
14324
14325 } = &mut *out_;
14326 }
14327
14328 ::fidl_next::Wire::zero_padding(xu);
14329 }
14330 }
14331
14332 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestFlexibleResourceXUnionInStruct<'de>
14333 where
14334 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14335 ___D: ::fidl_next::Decoder<'de>,
14336 ___D: ::fidl_next::fuchsia::HandleDecoder,
14337 {
14338 fn decode(
14339 slot_: ::fidl_next::Slot<'_, Self>,
14340 decoder_: &mut ___D,
14341 _: (),
14342 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14343 ::fidl_next::munge! {
14344 let Self {
14345
14346 mut xu,
14347
14348 } = slot_;
14349 }
14350
14351 let _field = xu.as_mut();
14352
14353 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14354
14355 Ok(())
14356 }
14357 }
14358
14359 impl<'de> ::fidl_next::IntoNatural for TestFlexibleResourceXUnionInStruct<'de> {
14360 type Natural = crate::natural::TestFlexibleResourceXUnionInStruct;
14361 }
14362
14363 #[derive(Debug)]
14365 #[repr(C)]
14366 pub struct TestOptionalFlexibleResourceXUnionInStruct<'de> {
14367 pub xu: crate::wire_optional::SampleResourceXUnion<'de>,
14368 }
14369
14370 static_assertions::const_assert_eq!(
14371 std::mem::size_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
14372 16
14373 );
14374 static_assertions::const_assert_eq!(
14375 std::mem::align_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
14376 8
14377 );
14378
14379 static_assertions::const_assert_eq!(
14380 std::mem::offset_of!(TestOptionalFlexibleResourceXUnionInStruct<'_>, xu),
14381 0
14382 );
14383
14384 impl ::fidl_next::Constrained for TestOptionalFlexibleResourceXUnionInStruct<'_> {
14385 type Constraint = ();
14386
14387 fn validate(
14388 _: ::fidl_next::Slot<'_, Self>,
14389 _: Self::Constraint,
14390 ) -> Result<(), ::fidl_next::ValidationError> {
14391 Ok(())
14392 }
14393 }
14394
14395 unsafe impl ::fidl_next::Wire for TestOptionalFlexibleResourceXUnionInStruct<'static> {
14396 type Narrowed<'de> = TestOptionalFlexibleResourceXUnionInStruct<'de>;
14397
14398 #[inline]
14399 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14400 ::fidl_next::munge! {
14401 let Self {
14402
14403 xu,
14404
14405 } = &mut *out_;
14406 }
14407
14408 ::fidl_next::Wire::zero_padding(xu);
14409 }
14410 }
14411
14412 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalFlexibleResourceXUnionInStruct<'de>
14413 where
14414 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14415 ___D: ::fidl_next::Decoder<'de>,
14416 ___D: ::fidl_next::fuchsia::HandleDecoder,
14417 {
14418 fn decode(
14419 slot_: ::fidl_next::Slot<'_, Self>,
14420 decoder_: &mut ___D,
14421 _: (),
14422 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14423 ::fidl_next::munge! {
14424 let Self {
14425
14426 mut xu,
14427
14428 } = slot_;
14429 }
14430
14431 let _field = xu.as_mut();
14432
14433 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14434
14435 Ok(())
14436 }
14437 }
14438
14439 impl<'de> ::fidl_next::IntoNatural for TestOptionalFlexibleResourceXUnionInStruct<'de> {
14440 type Natural = crate::natural::TestOptionalFlexibleResourceXUnionInStruct;
14441 }
14442
14443 #[derive(Debug)]
14445 #[repr(C)]
14446 pub struct TestOptionalStrictResourceXUnionInStruct<'de> {
14447 pub xu: crate::wire_optional::SampleStrictResourceXUnion<'de>,
14448 }
14449
14450 static_assertions::const_assert_eq!(
14451 std::mem::size_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
14452 16
14453 );
14454 static_assertions::const_assert_eq!(
14455 std::mem::align_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
14456 8
14457 );
14458
14459 static_assertions::const_assert_eq!(
14460 std::mem::offset_of!(TestOptionalStrictResourceXUnionInStruct<'_>, xu),
14461 0
14462 );
14463
14464 impl ::fidl_next::Constrained for TestOptionalStrictResourceXUnionInStruct<'_> {
14465 type Constraint = ();
14466
14467 fn validate(
14468 _: ::fidl_next::Slot<'_, Self>,
14469 _: Self::Constraint,
14470 ) -> Result<(), ::fidl_next::ValidationError> {
14471 Ok(())
14472 }
14473 }
14474
14475 unsafe impl ::fidl_next::Wire for TestOptionalStrictResourceXUnionInStruct<'static> {
14476 type Narrowed<'de> = TestOptionalStrictResourceXUnionInStruct<'de>;
14477
14478 #[inline]
14479 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14480 ::fidl_next::munge! {
14481 let Self {
14482
14483 xu,
14484
14485 } = &mut *out_;
14486 }
14487
14488 ::fidl_next::Wire::zero_padding(xu);
14489 }
14490 }
14491
14492 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalStrictResourceXUnionInStruct<'de>
14493 where
14494 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14495 ___D: ::fidl_next::Decoder<'de>,
14496 ___D: ::fidl_next::fuchsia::HandleDecoder,
14497 {
14498 fn decode(
14499 slot_: ::fidl_next::Slot<'_, Self>,
14500 decoder_: &mut ___D,
14501 _: (),
14502 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14503 ::fidl_next::munge! {
14504 let Self {
14505
14506 mut xu,
14507
14508 } = slot_;
14509 }
14510
14511 let _field = xu.as_mut();
14512
14513 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14514
14515 Ok(())
14516 }
14517 }
14518
14519 impl<'de> ::fidl_next::IntoNatural for TestOptionalStrictResourceXUnionInStruct<'de> {
14520 type Natural = crate::natural::TestOptionalStrictResourceXUnionInStruct;
14521 }
14522
14523 #[derive(Debug)]
14525 #[repr(C)]
14526 pub struct TestPackageResolverResolveRequest<'de> {
14527 pub package_url: ::fidl_next::wire::String<'de>,
14528
14529 pub selectors: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
14530
14531 pub update_policy: crate::wire::UpdatePolicy,
14532
14533 pub this_should_be_a_handle: ::fidl_next::wire::Uint32,
14534 }
14535
14536 static_assertions::const_assert_eq!(
14537 std::mem::size_of::<TestPackageResolverResolveRequest<'_>>(),
14538 40
14539 );
14540 static_assertions::const_assert_eq!(
14541 std::mem::align_of::<TestPackageResolverResolveRequest<'_>>(),
14542 8
14543 );
14544
14545 static_assertions::const_assert_eq!(
14546 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, package_url),
14547 0
14548 );
14549
14550 static_assertions::const_assert_eq!(
14551 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, selectors),
14552 16
14553 );
14554
14555 static_assertions::const_assert_eq!(
14556 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, update_policy),
14557 32
14558 );
14559
14560 static_assertions::const_assert_eq!(
14561 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, this_should_be_a_handle),
14562 36
14563 );
14564
14565 impl ::fidl_next::Constrained for TestPackageResolverResolveRequest<'_> {
14566 type Constraint = ();
14567
14568 fn validate(
14569 _: ::fidl_next::Slot<'_, Self>,
14570 _: Self::Constraint,
14571 ) -> Result<(), ::fidl_next::ValidationError> {
14572 Ok(())
14573 }
14574 }
14575
14576 unsafe impl ::fidl_next::Wire for TestPackageResolverResolveRequest<'static> {
14577 type Narrowed<'de> = TestPackageResolverResolveRequest<'de>;
14578
14579 #[inline]
14580 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14581 ::fidl_next::munge! {
14582 let Self {
14583
14584 package_url,
14585 selectors,
14586 update_policy,
14587 this_should_be_a_handle,
14588
14589 } = &mut *out_;
14590 }
14591
14592 ::fidl_next::Wire::zero_padding(package_url);
14593
14594 ::fidl_next::Wire::zero_padding(selectors);
14595
14596 ::fidl_next::Wire::zero_padding(update_policy);
14597
14598 ::fidl_next::Wire::zero_padding(this_should_be_a_handle);
14599
14600 unsafe {
14601 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 2);
14602 }
14603 }
14604 }
14605
14606 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestPackageResolverResolveRequest<'de>
14607 where
14608 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14609 ___D: ::fidl_next::Decoder<'de>,
14610 ___D: ::fidl_next::fuchsia::HandleDecoder,
14611 {
14612 fn decode(
14613 slot_: ::fidl_next::Slot<'_, Self>,
14614 decoder_: &mut ___D,
14615 _: (),
14616 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14617 if slot_.as_bytes()[34..36] != [0u8; 2] {
14618 return Err(::fidl_next::DecodeError::InvalidPadding);
14619 }
14620
14621 ::fidl_next::munge! {
14622 let Self {
14623
14624 mut package_url,
14625 mut selectors,
14626 mut update_policy,
14627 mut this_should_be_a_handle,
14628
14629 } = slot_;
14630 }
14631
14632 let _field = package_url.as_mut();
14633 ::fidl_next::Constrained::validate(_field, 4294967295)?;
14634 ::fidl_next::Decode::decode(package_url.as_mut(), decoder_, 4294967295)?;
14635
14636 let _field = selectors.as_mut();
14637 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
14638 ::fidl_next::Decode::decode(selectors.as_mut(), decoder_, (4294967295, 4294967295))?;
14639
14640 let _field = update_policy.as_mut();
14641
14642 ::fidl_next::Decode::decode(update_policy.as_mut(), decoder_, ())?;
14643
14644 let _field = this_should_be_a_handle.as_mut();
14645
14646 ::fidl_next::Decode::decode(this_should_be_a_handle.as_mut(), decoder_, ())?;
14647
14648 Ok(())
14649 }
14650 }
14651
14652 impl<'de> ::fidl_next::IntoNatural for TestPackageResolverResolveRequest<'de> {
14653 type Natural = crate::natural::TestPackageResolverResolveRequest;
14654 }
14655
14656 #[derive(Debug)]
14658 #[repr(C)]
14659 pub struct TestStrictResourceXUnionInStruct<'de> {
14660 pub xu: crate::wire::SampleStrictResourceXUnion<'de>,
14661 }
14662
14663 static_assertions::const_assert_eq!(
14664 std::mem::size_of::<TestStrictResourceXUnionInStruct<'_>>(),
14665 16
14666 );
14667 static_assertions::const_assert_eq!(
14668 std::mem::align_of::<TestStrictResourceXUnionInStruct<'_>>(),
14669 8
14670 );
14671
14672 static_assertions::const_assert_eq!(
14673 std::mem::offset_of!(TestStrictResourceXUnionInStruct<'_>, xu),
14674 0
14675 );
14676
14677 impl ::fidl_next::Constrained for TestStrictResourceXUnionInStruct<'_> {
14678 type Constraint = ();
14679
14680 fn validate(
14681 _: ::fidl_next::Slot<'_, Self>,
14682 _: Self::Constraint,
14683 ) -> Result<(), ::fidl_next::ValidationError> {
14684 Ok(())
14685 }
14686 }
14687
14688 unsafe impl ::fidl_next::Wire for TestStrictResourceXUnionInStruct<'static> {
14689 type Narrowed<'de> = TestStrictResourceXUnionInStruct<'de>;
14690
14691 #[inline]
14692 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14693 ::fidl_next::munge! {
14694 let Self {
14695
14696 xu,
14697
14698 } = &mut *out_;
14699 }
14700
14701 ::fidl_next::Wire::zero_padding(xu);
14702 }
14703 }
14704
14705 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestStrictResourceXUnionInStruct<'de>
14706 where
14707 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14708 ___D: ::fidl_next::Decoder<'de>,
14709 ___D: ::fidl_next::fuchsia::HandleDecoder,
14710 {
14711 fn decode(
14712 slot_: ::fidl_next::Slot<'_, Self>,
14713 decoder_: &mut ___D,
14714 _: (),
14715 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14716 ::fidl_next::munge! {
14717 let Self {
14718
14719 mut xu,
14720
14721 } = slot_;
14722 }
14723
14724 let _field = xu.as_mut();
14725
14726 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14727
14728 Ok(())
14729 }
14730 }
14731
14732 impl<'de> ::fidl_next::IntoNatural for TestStrictResourceXUnionInStruct<'de> {
14733 type Natural = crate::natural::TestStrictResourceXUnionInStruct;
14734 }
14735
14736 #[derive(Debug)]
14738 #[repr(C)]
14739 pub struct UnboundedNonnullableVectorOfHandles<'de> {
14740 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
14741 }
14742
14743 static_assertions::const_assert_eq!(
14744 std::mem::size_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
14745 16
14746 );
14747 static_assertions::const_assert_eq!(
14748 std::mem::align_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
14749 8
14750 );
14751
14752 static_assertions::const_assert_eq!(
14753 std::mem::offset_of!(UnboundedNonnullableVectorOfHandles<'_>, vh0),
14754 0
14755 );
14756
14757 impl ::fidl_next::Constrained for UnboundedNonnullableVectorOfHandles<'_> {
14758 type Constraint = ();
14759
14760 fn validate(
14761 _: ::fidl_next::Slot<'_, Self>,
14762 _: Self::Constraint,
14763 ) -> Result<(), ::fidl_next::ValidationError> {
14764 Ok(())
14765 }
14766 }
14767
14768 unsafe impl ::fidl_next::Wire for UnboundedNonnullableVectorOfHandles<'static> {
14769 type Narrowed<'de> = UnboundedNonnullableVectorOfHandles<'de>;
14770
14771 #[inline]
14772 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14773 ::fidl_next::munge! {
14774 let Self {
14775
14776 vh0,
14777
14778 } = &mut *out_;
14779 }
14780
14781 ::fidl_next::Wire::zero_padding(vh0);
14782 }
14783 }
14784
14785 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNonnullableVectorOfHandles<'de>
14786 where
14787 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14788 ___D: ::fidl_next::Decoder<'de>,
14789 ___D: ::fidl_next::fuchsia::HandleDecoder,
14790 {
14791 fn decode(
14792 slot_: ::fidl_next::Slot<'_, Self>,
14793 decoder_: &mut ___D,
14794 _: (),
14795 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14796 ::fidl_next::munge! {
14797 let Self {
14798
14799 mut vh0,
14800
14801 } = slot_;
14802 }
14803
14804 let _field = vh0.as_mut();
14805 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
14806 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
14807
14808 Ok(())
14809 }
14810 }
14811
14812 impl<'de> ::fidl_next::IntoNatural for UnboundedNonnullableVectorOfHandles<'de> {
14813 type Natural = crate::natural::UnboundedNonnullableVectorOfHandles;
14814 }
14815
14816 #[derive(Debug)]
14818 #[repr(C)]
14819 pub struct UnboundedNullableVectorOfHandles<'de> {
14820 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
14821 }
14822
14823 static_assertions::const_assert_eq!(
14824 std::mem::size_of::<UnboundedNullableVectorOfHandles<'_>>(),
14825 16
14826 );
14827 static_assertions::const_assert_eq!(
14828 std::mem::align_of::<UnboundedNullableVectorOfHandles<'_>>(),
14829 8
14830 );
14831
14832 static_assertions::const_assert_eq!(
14833 std::mem::offset_of!(UnboundedNullableVectorOfHandles<'_>, vh0),
14834 0
14835 );
14836
14837 impl ::fidl_next::Constrained for UnboundedNullableVectorOfHandles<'_> {
14838 type Constraint = ();
14839
14840 fn validate(
14841 _: ::fidl_next::Slot<'_, Self>,
14842 _: Self::Constraint,
14843 ) -> Result<(), ::fidl_next::ValidationError> {
14844 Ok(())
14845 }
14846 }
14847
14848 unsafe impl ::fidl_next::Wire for UnboundedNullableVectorOfHandles<'static> {
14849 type Narrowed<'de> = UnboundedNullableVectorOfHandles<'de>;
14850
14851 #[inline]
14852 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14853 ::fidl_next::munge! {
14854 let Self {
14855
14856 vh0,
14857
14858 } = &mut *out_;
14859 }
14860
14861 ::fidl_next::Wire::zero_padding(vh0);
14862 }
14863 }
14864
14865 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNullableVectorOfHandles<'de>
14866 where
14867 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14868 ___D: ::fidl_next::Decoder<'de>,
14869 ___D: ::fidl_next::fuchsia::HandleDecoder,
14870 {
14871 fn decode(
14872 slot_: ::fidl_next::Slot<'_, Self>,
14873 decoder_: &mut ___D,
14874 _: (),
14875 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14876 ::fidl_next::munge! {
14877 let Self {
14878
14879 mut vh0,
14880
14881 } = slot_;
14882 }
14883
14884 let _field = vh0.as_mut();
14885 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
14886 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
14887
14888 Ok(())
14889 }
14890 }
14891
14892 impl<'de> ::fidl_next::IntoNatural for UnboundedNullableVectorOfHandles<'de> {
14893 type Natural = crate::natural::UnboundedNullableVectorOfHandles;
14894 }
14895
14896 #[repr(transparent)]
14898 pub struct UnionOfEndpointsUnion<'de> {
14899 pub(crate) raw: ::fidl_next::wire::Union,
14900 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
14901 }
14902
14903 impl<'de> Drop for UnionOfEndpointsUnion<'de> {
14904 fn drop(&mut self) {
14905 match self.raw.ordinal() {
14906 1 => {
14907 let _ = unsafe {
14908 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
14909 crate::Protocol,
14910 ::fidl_next::wire::fuchsia::Channel,
14911 >>()
14912 };
14913 }
14914
14915 2 => {
14916 let _ = unsafe {
14917 self.raw.get().read_unchecked::<::fidl_next::ServerEnd<
14918 crate::Protocol,
14919 ::fidl_next::wire::fuchsia::Channel,
14920 >>()
14921 };
14922 }
14923
14924 _ => (),
14925 }
14926 }
14927 }
14928
14929 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
14930 type Constraint = ();
14931
14932 fn validate(
14933 _: ::fidl_next::Slot<'_, Self>,
14934 _: Self::Constraint,
14935 ) -> Result<(), ::fidl_next::ValidationError> {
14936 Ok(())
14937 }
14938 }
14939
14940 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
14941 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
14942
14943 #[inline]
14944 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14945 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
14946 ::fidl_next::wire::Union::zero_padding(raw);
14947 }
14948 }
14949
14950 pub mod union_of_endpoints_union {
14951 pub enum Ref<'de> {
14952 ClientEnd(
14953 &'de ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14954 ),
14955
14956 ServerEnd(
14957 &'de ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14958 ),
14959
14960 UnknownOrdinal_(u64),
14961 }
14962 }
14963
14964 impl<'de> UnionOfEndpointsUnion<'de> {
14965 pub fn as_ref(&self) -> crate::wire::union_of_endpoints_union::Ref<'_> {
14966 match self.raw.ordinal() {
14967 1 => crate::wire::union_of_endpoints_union::Ref::ClientEnd(unsafe {
14968 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
14969 }),
14970
14971 2 => crate::wire::union_of_endpoints_union::Ref::ServerEnd(unsafe {
14972 self.raw.get().deref_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
14973 }),
14974
14975 unknown => crate::wire::union_of_endpoints_union::Ref::UnknownOrdinal_(unknown),
14976 }
14977 }
14978 }
14979
14980 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
14981 where
14982 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14983 ___D: ::fidl_next::Decoder<'de>,
14984 ___D: ::fidl_next::fuchsia::HandleDecoder,
14985 {
14986 fn decode(
14987 mut slot: ::fidl_next::Slot<'_, Self>,
14988 decoder: &mut ___D,
14989 _: (),
14990 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14991 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
14992 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
14993 1 => ::fidl_next::wire::Union::decode_as::<
14994 ___D,
14995 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14996 >(raw, decoder, ())?,
14997
14998 2 => ::fidl_next::wire::Union::decode_as::<
14999 ___D,
15000 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15001 >(raw, decoder, ())?,
15002
15003 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
15004 }
15005
15006 Ok(())
15007 }
15008 }
15009
15010 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
15011 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15012 match self.raw.ordinal() {
15013 1 => unsafe {
15014 self.raw.get().deref_unchecked::<
15015 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
15016 >().fmt(f)
15017 },
15018 2 => unsafe {
15019 self.raw.get().deref_unchecked::<
15020 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
15021 >().fmt(f)
15022 },
15023 _ => unsafe { ::core::hint::unreachable_unchecked() },
15024 }
15025 }
15026 }
15027
15028 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
15029 type Natural = crate::natural::UnionOfEndpointsUnion;
15030 }
15031
15032 #[derive(Debug)]
15034 #[repr(C)]
15035 pub struct UnionOfEndpoints<'de> {
15036 pub u: crate::wire::UnionOfEndpointsUnion<'de>,
15037 }
15038
15039 static_assertions::const_assert_eq!(std::mem::size_of::<UnionOfEndpoints<'_>>(), 16);
15040 static_assertions::const_assert_eq!(std::mem::align_of::<UnionOfEndpoints<'_>>(), 8);
15041
15042 static_assertions::const_assert_eq!(std::mem::offset_of!(UnionOfEndpoints<'_>, u), 0);
15043
15044 impl ::fidl_next::Constrained for UnionOfEndpoints<'_> {
15045 type Constraint = ();
15046
15047 fn validate(
15048 _: ::fidl_next::Slot<'_, Self>,
15049 _: Self::Constraint,
15050 ) -> Result<(), ::fidl_next::ValidationError> {
15051 Ok(())
15052 }
15053 }
15054
15055 unsafe impl ::fidl_next::Wire for UnionOfEndpoints<'static> {
15056 type Narrowed<'de> = UnionOfEndpoints<'de>;
15057
15058 #[inline]
15059 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15060 ::fidl_next::munge! {
15061 let Self {
15062
15063 u,
15064
15065 } = &mut *out_;
15066 }
15067
15068 ::fidl_next::Wire::zero_padding(u);
15069 }
15070 }
15071
15072 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpoints<'de>
15073 where
15074 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15075 ___D: ::fidl_next::Decoder<'de>,
15076 ___D: ::fidl_next::fuchsia::HandleDecoder,
15077 {
15078 fn decode(
15079 slot_: ::fidl_next::Slot<'_, Self>,
15080 decoder_: &mut ___D,
15081 _: (),
15082 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15083 ::fidl_next::munge! {
15084 let Self {
15085
15086 mut u,
15087
15088 } = slot_;
15089 }
15090
15091 let _field = u.as_mut();
15092
15093 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
15094
15095 Ok(())
15096 }
15097 }
15098
15099 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpoints<'de> {
15100 type Natural = crate::natural::UnionOfEndpoints;
15101 }
15102
15103 #[repr(transparent)]
15105 pub struct UnionOfHandle {
15106 pub(crate) raw: ::fidl_next::wire::Union,
15107 pub(crate) _phantom: ::core::marker::PhantomData<()>,
15108 }
15109
15110 impl Drop for UnionOfHandle {
15111 fn drop(&mut self) {
15112 match self.raw.ordinal() {
15113 1 => {
15114 let _ = unsafe {
15115 self.raw
15116 .get()
15117 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15118 };
15119 }
15120
15121 _ => unsafe { ::core::hint::unreachable_unchecked() },
15122 }
15123 }
15124 }
15125
15126 impl ::fidl_next::Constrained for UnionOfHandle {
15127 type Constraint = ();
15128
15129 fn validate(
15130 _: ::fidl_next::Slot<'_, Self>,
15131 _: Self::Constraint,
15132 ) -> Result<(), ::fidl_next::ValidationError> {
15133 Ok(())
15134 }
15135 }
15136
15137 unsafe impl ::fidl_next::Wire for UnionOfHandle {
15138 type Narrowed<'de> = UnionOfHandle;
15139
15140 #[inline]
15141 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15142 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15143 ::fidl_next::wire::Union::zero_padding(raw);
15144 }
15145 }
15146
15147 pub mod union_of_handle {
15148 pub enum Ref<'de> {
15149 H(&'de ::fidl_next::wire::fuchsia::NullableHandle),
15150 }
15151 }
15152
15153 impl UnionOfHandle {
15154 pub fn as_ref(&self) -> crate::wire::union_of_handle::Ref<'_> {
15155 match self.raw.ordinal() {
15156 1 => crate::wire::union_of_handle::Ref::H(unsafe {
15157 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15158 }),
15159
15160 _ => unsafe { ::core::hint::unreachable_unchecked() },
15161 }
15162 }
15163 }
15164
15165 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
15166 where
15167 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15168 ___D: ::fidl_next::fuchsia::HandleDecoder,
15169 {
15170 fn decode(
15171 mut slot: ::fidl_next::Slot<'_, Self>,
15172 decoder: &mut ___D,
15173 _: (),
15174 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15175 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15176 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15177 1 => ::fidl_next::wire::Union::decode_as_static::<
15178 ___D,
15179 ::fidl_next::wire::fuchsia::NullableHandle,
15180 >(raw, decoder, ())?,
15181
15182 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
15183 }
15184
15185 Ok(())
15186 }
15187 }
15188
15189 impl ::core::fmt::Debug for UnionOfHandle {
15190 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15191 match self.raw.ordinal() {
15192 1 => unsafe {
15193 self.raw
15194 .get()
15195 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15196 .fmt(f)
15197 },
15198 _ => unsafe { ::core::hint::unreachable_unchecked() },
15199 }
15200 }
15201 }
15202
15203 impl ::fidl_next::IntoNatural for UnionOfHandle {
15204 type Natural = crate::natural::UnionOfHandle;
15205 }
15206
15207 #[derive(Debug)]
15209 #[repr(C)]
15210 pub struct VectorOfArrayOfEventInStructWithDefaultRights<'de> {
15211 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15212 }
15213
15214 static_assertions::const_assert_eq!(
15215 std::mem::size_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
15216 16
15217 );
15218 static_assertions::const_assert_eq!(
15219 std::mem::align_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
15220 8
15221 );
15222
15223 static_assertions::const_assert_eq!(
15224 std::mem::offset_of!(VectorOfArrayOfEventInStructWithDefaultRights<'_>, h),
15225 0
15226 );
15227
15228 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithDefaultRights<'_> {
15229 type Constraint = ();
15230
15231 fn validate(
15232 _: ::fidl_next::Slot<'_, Self>,
15233 _: Self::Constraint,
15234 ) -> Result<(), ::fidl_next::ValidationError> {
15235 Ok(())
15236 }
15237 }
15238
15239 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithDefaultRights<'static> {
15240 type Narrowed<'de> = VectorOfArrayOfEventInStructWithDefaultRights<'de>;
15241
15242 #[inline]
15243 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15244 ::fidl_next::munge! {
15245 let Self {
15246
15247 h,
15248
15249 } = &mut *out_;
15250 }
15251
15252 ::fidl_next::Wire::zero_padding(h);
15253 }
15254 }
15255
15256 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15257 for VectorOfArrayOfEventInStructWithDefaultRights<'de>
15258 where
15259 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15260 ___D: ::fidl_next::Decoder<'de>,
15261 ___D: ::fidl_next::fuchsia::HandleDecoder,
15262 {
15263 fn decode(
15264 slot_: ::fidl_next::Slot<'_, Self>,
15265 decoder_: &mut ___D,
15266 _: (),
15267 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15268 ::fidl_next::munge! {
15269 let Self {
15270
15271 mut h,
15272
15273 } = slot_;
15274 }
15275
15276 let _field = h.as_mut();
15277 ::fidl_next::Constrained::validate(_field, (1, ()))?;
15278 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
15279
15280 let h = unsafe { h.deref_unchecked() };
15281
15282 if h.len() > 1 {
15283 return Err(::fidl_next::DecodeError::VectorTooLong {
15284 size: h.len() as u64,
15285 limit: 1,
15286 });
15287 }
15288
15289 Ok(())
15290 }
15291 }
15292
15293 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithDefaultRights<'de> {
15294 type Natural = crate::natural::VectorOfArrayOfEventInStructWithDefaultRights;
15295 }
15296
15297 #[derive(Debug)]
15299 #[repr(C)]
15300 pub struct VectorOfArrayOfEventInStructWithReducedRights<'de> {
15301 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15302 }
15303
15304 static_assertions::const_assert_eq!(
15305 std::mem::size_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
15306 16
15307 );
15308 static_assertions::const_assert_eq!(
15309 std::mem::align_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
15310 8
15311 );
15312
15313 static_assertions::const_assert_eq!(
15314 std::mem::offset_of!(VectorOfArrayOfEventInStructWithReducedRights<'_>, h),
15315 0
15316 );
15317
15318 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithReducedRights<'_> {
15319 type Constraint = ();
15320
15321 fn validate(
15322 _: ::fidl_next::Slot<'_, Self>,
15323 _: Self::Constraint,
15324 ) -> Result<(), ::fidl_next::ValidationError> {
15325 Ok(())
15326 }
15327 }
15328
15329 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithReducedRights<'static> {
15330 type Narrowed<'de> = VectorOfArrayOfEventInStructWithReducedRights<'de>;
15331
15332 #[inline]
15333 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15334 ::fidl_next::munge! {
15335 let Self {
15336
15337 h,
15338
15339 } = &mut *out_;
15340 }
15341
15342 ::fidl_next::Wire::zero_padding(h);
15343 }
15344 }
15345
15346 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15347 for VectorOfArrayOfEventInStructWithReducedRights<'de>
15348 where
15349 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15350 ___D: ::fidl_next::Decoder<'de>,
15351 ___D: ::fidl_next::fuchsia::HandleDecoder,
15352 {
15353 fn decode(
15354 slot_: ::fidl_next::Slot<'_, Self>,
15355 decoder_: &mut ___D,
15356 _: (),
15357 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15358 ::fidl_next::munge! {
15359 let Self {
15360
15361 mut h,
15362
15363 } = slot_;
15364 }
15365
15366 let _field = h.as_mut();
15367 ::fidl_next::Constrained::validate(_field, (1, ()))?;
15368 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
15369
15370 let h = unsafe { h.deref_unchecked() };
15371
15372 if h.len() > 1 {
15373 return Err(::fidl_next::DecodeError::VectorTooLong {
15374 size: h.len() as u64,
15375 limit: 1,
15376 });
15377 }
15378
15379 Ok(())
15380 }
15381 }
15382
15383 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithReducedRights<'de> {
15384 type Natural = crate::natural::VectorOfArrayOfEventInStructWithReducedRights;
15385 }
15386
15387 #[repr(C)]
15389 pub struct VectorOfArrayOfEventInTableWithReducedRights<'de> {
15390 pub(crate) table: ::fidl_next::wire::Table<'de>,
15391 }
15392
15393 impl<'de> Drop for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15394 fn drop(&mut self) {
15395 let _ = self.table.get(1)
15396 .map(|envelope| unsafe {
15397 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
15398 });
15399 }
15400 }
15401
15402 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRights<'_> {
15403 type Constraint = ();
15404
15405 fn validate(
15406 _: ::fidl_next::Slot<'_, Self>,
15407 _: Self::Constraint,
15408 ) -> Result<(), ::fidl_next::ValidationError> {
15409 Ok(())
15410 }
15411 }
15412
15413 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRights<'static> {
15414 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRights<'de>;
15415
15416 #[inline]
15417 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15418 ::fidl_next::munge!(let Self { table } = out);
15419 ::fidl_next::wire::Table::zero_padding(table);
15420 }
15421 }
15422
15423 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15424 for VectorOfArrayOfEventInTableWithReducedRights<'de>
15425 where
15426 ___D: ::fidl_next::Decoder<'de> + ?Sized,
15427 ___D: ::fidl_next::fuchsia::HandleDecoder,
15428 {
15429 fn decode(
15430 slot: ::fidl_next::Slot<'_, Self>,
15431 decoder: &mut ___D,
15432 _: (),
15433 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15434 ::fidl_next::munge!(let Self { table } = slot);
15435
15436 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15437 match ordinal {
15438 0 => unsafe { ::core::hint::unreachable_unchecked() },
15439
15440 1 => {
15441 ::fidl_next::wire::Envelope::decode_as::<
15442 ___D,
15443 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15444 >(slot.as_mut(), decoder, (1, ()))?;
15445
15446 let value = unsafe {
15447 slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
15448 '_,
15449 [::fidl_next::wire::fuchsia::Event; 1],
15450 >>()
15451 };
15452
15453 if value.len() > 1 {
15454 return Err(::fidl_next::DecodeError::VectorTooLong {
15455 size: value.len() as u64,
15456 limit: 1,
15457 });
15458 }
15459
15460 Ok(())
15461 }
15462
15463 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15464 }
15465 })
15466 }
15467 }
15468
15469 impl<'de> VectorOfArrayOfEventInTableWithReducedRights<'de> {
15470 pub fn h(
15471 &self,
15472 ) -> ::core::option::Option<
15473 &::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15474 > {
15475 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15476 }
15477 }
15478
15479 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15480 fn fmt(
15481 &self,
15482 f: &mut ::core::fmt::Formatter<'_>,
15483 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15484 f.debug_struct("VectorOfArrayOfEventInTableWithReducedRights")
15485 .field("h", &self.h())
15486 .finish()
15487 }
15488 }
15489
15490 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15491 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRights;
15492 }
15493
15494 #[derive(Debug)]
15496 #[repr(C)]
15497 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
15498 pub t: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
15499 }
15500
15501 static_assertions::const_assert_eq!(
15502 std::mem::size_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
15503 16
15504 );
15505 static_assertions::const_assert_eq!(
15506 std::mem::align_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
15507 8
15508 );
15509
15510 static_assertions::const_assert_eq!(
15511 std::mem::offset_of!(VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>, t),
15512 0
15513 );
15514
15515 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRightsStruct<'_> {
15516 type Constraint = ();
15517
15518 fn validate(
15519 _: ::fidl_next::Slot<'_, Self>,
15520 _: Self::Constraint,
15521 ) -> Result<(), ::fidl_next::ValidationError> {
15522 Ok(())
15523 }
15524 }
15525
15526 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRightsStruct<'static> {
15527 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>;
15528
15529 #[inline]
15530 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15531 ::fidl_next::munge! {
15532 let Self {
15533
15534 t,
15535
15536 } = &mut *out_;
15537 }
15538
15539 ::fidl_next::Wire::zero_padding(t);
15540 }
15541 }
15542
15543 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15544 for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>
15545 where
15546 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15547 ___D: ::fidl_next::Decoder<'de>,
15548 ___D: ::fidl_next::fuchsia::HandleDecoder,
15549 {
15550 fn decode(
15551 slot_: ::fidl_next::Slot<'_, Self>,
15552 decoder_: &mut ___D,
15553 _: (),
15554 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15555 ::fidl_next::munge! {
15556 let Self {
15557
15558 mut t,
15559
15560 } = slot_;
15561 }
15562
15563 let _field = t.as_mut();
15564
15565 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
15566
15567 Ok(())
15568 }
15569 }
15570
15571 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
15572 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRightsStruct;
15573 }
15574
15575 #[repr(transparent)]
15577 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15578 pub(crate) raw: ::fidl_next::wire::Union,
15579 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15580 }
15581
15582 impl<'de> Drop for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15583 fn drop(&mut self) {
15584 match self.raw.ordinal() {
15585 1 => {
15586 let _ = unsafe {
15587 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
15588 };
15589 }
15590
15591 _ => unsafe { ::core::hint::unreachable_unchecked() },
15592 }
15593 }
15594 }
15595
15596 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
15597 type Constraint = ();
15598
15599 fn validate(
15600 _: ::fidl_next::Slot<'_, Self>,
15601 _: Self::Constraint,
15602 ) -> Result<(), ::fidl_next::ValidationError> {
15603 Ok(())
15604 }
15605 }
15606
15607 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
15608 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
15609
15610 #[inline]
15611 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15612 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15613 ::fidl_next::wire::Union::zero_padding(raw);
15614 }
15615 }
15616
15617 pub mod vector_of_array_of_event_in_union_with_reduced_rights {
15618 pub enum Ref<'de> {
15619 H(&'de ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>),
15620 }
15621 }
15622
15623 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15624 pub fn as_ref(
15625 &self,
15626 ) -> crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref<'_> {
15627 match self.raw.ordinal() {
15628 1 => crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref::H(
15629 unsafe {
15630 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>>()
15631 },
15632 ),
15633
15634 _ => unsafe { ::core::hint::unreachable_unchecked() },
15635 }
15636 }
15637 }
15638
15639 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15640 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
15641 where
15642 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15643 ___D: ::fidl_next::Decoder<'de>,
15644 ___D: ::fidl_next::fuchsia::HandleDecoder,
15645 {
15646 fn decode(
15647 mut slot: ::fidl_next::Slot<'_, Self>,
15648 decoder: &mut ___D,
15649 _: (),
15650 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15651 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15652 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15653 1 => ::fidl_next::wire::Union::decode_as::<
15654 ___D,
15655 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15656 >(raw, decoder, (1, ()))?,
15657
15658 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
15659 }
15660
15661 Ok(())
15662 }
15663 }
15664
15665 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15666 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15667 match self.raw.ordinal() {
15668 1 => unsafe {
15669 self.raw.get().deref_unchecked::<
15670 ::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>
15671 >().fmt(f)
15672 },
15673 _ => unsafe { ::core::hint::unreachable_unchecked() },
15674 }
15675 }
15676 }
15677
15678 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15679 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRights;
15680 }
15681
15682 #[derive(Debug)]
15684 #[repr(C)]
15685 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
15686 pub u: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
15687 }
15688
15689 static_assertions::const_assert_eq!(
15690 std::mem::size_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
15691 16
15692 );
15693 static_assertions::const_assert_eq!(
15694 std::mem::align_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
15695 8
15696 );
15697
15698 static_assertions::const_assert_eq!(
15699 std::mem::offset_of!(VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>, u),
15700 0
15701 );
15702
15703 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_> {
15704 type Constraint = ();
15705
15706 fn validate(
15707 _: ::fidl_next::Slot<'_, Self>,
15708 _: Self::Constraint,
15709 ) -> Result<(), ::fidl_next::ValidationError> {
15710 Ok(())
15711 }
15712 }
15713
15714 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static> {
15715 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>;
15716
15717 #[inline]
15718 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15719 ::fidl_next::munge! {
15720 let Self {
15721
15722 u,
15723
15724 } = &mut *out_;
15725 }
15726
15727 ::fidl_next::Wire::zero_padding(u);
15728 }
15729 }
15730
15731 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15732 for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>
15733 where
15734 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15735 ___D: ::fidl_next::Decoder<'de>,
15736 ___D: ::fidl_next::fuchsia::HandleDecoder,
15737 {
15738 fn decode(
15739 slot_: ::fidl_next::Slot<'_, Self>,
15740 decoder_: &mut ___D,
15741 _: (),
15742 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15743 ::fidl_next::munge! {
15744 let Self {
15745
15746 mut u,
15747
15748 } = slot_;
15749 }
15750
15751 let _field = u.as_mut();
15752
15753 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
15754
15755 Ok(())
15756 }
15757 }
15758
15759 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
15760 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRightsStruct;
15761 }
15762
15763 #[derive(Debug)]
15765 #[repr(C)]
15766 pub struct VectorOfHandles<'de> {
15767 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15768 }
15769
15770 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfHandles<'_>>(), 16);
15771 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfHandles<'_>>(), 8);
15772
15773 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfHandles<'_>, v), 0);
15774
15775 impl ::fidl_next::Constrained for VectorOfHandles<'_> {
15776 type Constraint = ();
15777
15778 fn validate(
15779 _: ::fidl_next::Slot<'_, Self>,
15780 _: Self::Constraint,
15781 ) -> Result<(), ::fidl_next::ValidationError> {
15782 Ok(())
15783 }
15784 }
15785
15786 unsafe impl ::fidl_next::Wire for VectorOfHandles<'static> {
15787 type Narrowed<'de> = VectorOfHandles<'de>;
15788
15789 #[inline]
15790 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15791 ::fidl_next::munge! {
15792 let Self {
15793
15794 v,
15795
15796 } = &mut *out_;
15797 }
15798
15799 ::fidl_next::Wire::zero_padding(v);
15800 }
15801 }
15802
15803 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfHandles<'de>
15804 where
15805 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15806 ___D: ::fidl_next::Decoder<'de>,
15807 ___D: ::fidl_next::fuchsia::HandleDecoder,
15808 {
15809 fn decode(
15810 slot_: ::fidl_next::Slot<'_, Self>,
15811 decoder_: &mut ___D,
15812 _: (),
15813 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15814 ::fidl_next::munge! {
15815 let Self {
15816
15817 mut v,
15818
15819 } = slot_;
15820 }
15821
15822 let _field = v.as_mut();
15823 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15824 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
15825
15826 Ok(())
15827 }
15828 }
15829
15830 impl<'de> ::fidl_next::IntoNatural for VectorOfHandles<'de> {
15831 type Natural = crate::natural::VectorOfHandles;
15832 }
15833
15834 #[derive(Debug)]
15836 #[repr(C)]
15837 pub struct VectorOfOptionalHandles<'de> {
15838 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::OptionalNullableHandle>,
15839 }
15840
15841 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfOptionalHandles<'_>>(), 16);
15842 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfOptionalHandles<'_>>(), 8);
15843
15844 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfOptionalHandles<'_>, v), 0);
15845
15846 impl ::fidl_next::Constrained for VectorOfOptionalHandles<'_> {
15847 type Constraint = ();
15848
15849 fn validate(
15850 _: ::fidl_next::Slot<'_, Self>,
15851 _: Self::Constraint,
15852 ) -> Result<(), ::fidl_next::ValidationError> {
15853 Ok(())
15854 }
15855 }
15856
15857 unsafe impl ::fidl_next::Wire for VectorOfOptionalHandles<'static> {
15858 type Narrowed<'de> = VectorOfOptionalHandles<'de>;
15859
15860 #[inline]
15861 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15862 ::fidl_next::munge! {
15863 let Self {
15864
15865 v,
15866
15867 } = &mut *out_;
15868 }
15869
15870 ::fidl_next::Wire::zero_padding(v);
15871 }
15872 }
15873
15874 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfOptionalHandles<'de>
15875 where
15876 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15877 ___D: ::fidl_next::Decoder<'de>,
15878 ___D: ::fidl_next::fuchsia::HandleDecoder,
15879 {
15880 fn decode(
15881 slot_: ::fidl_next::Slot<'_, Self>,
15882 decoder_: &mut ___D,
15883 _: (),
15884 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15885 ::fidl_next::munge! {
15886 let Self {
15887
15888 mut v,
15889
15890 } = slot_;
15891 }
15892
15893 let _field = v.as_mut();
15894 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15895 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
15896
15897 Ok(())
15898 }
15899 }
15900
15901 impl<'de> ::fidl_next::IntoNatural for VectorOfOptionalHandles<'de> {
15902 type Natural = crate::natural::VectorOfOptionalHandles;
15903 }
15904
15905 #[derive(Debug)]
15907 #[repr(C)]
15908 pub struct VectorOfUpTo2Handles<'de> {
15909 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15910 }
15911
15912 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfUpTo2Handles<'_>>(), 16);
15913 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfUpTo2Handles<'_>>(), 8);
15914
15915 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfUpTo2Handles<'_>, v), 0);
15916
15917 impl ::fidl_next::Constrained for VectorOfUpTo2Handles<'_> {
15918 type Constraint = ();
15919
15920 fn validate(
15921 _: ::fidl_next::Slot<'_, Self>,
15922 _: Self::Constraint,
15923 ) -> Result<(), ::fidl_next::ValidationError> {
15924 Ok(())
15925 }
15926 }
15927
15928 unsafe impl ::fidl_next::Wire for VectorOfUpTo2Handles<'static> {
15929 type Narrowed<'de> = VectorOfUpTo2Handles<'de>;
15930
15931 #[inline]
15932 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15933 ::fidl_next::munge! {
15934 let Self {
15935
15936 v,
15937
15938 } = &mut *out_;
15939 }
15940
15941 ::fidl_next::Wire::zero_padding(v);
15942 }
15943 }
15944
15945 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfUpTo2Handles<'de>
15946 where
15947 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15948 ___D: ::fidl_next::Decoder<'de>,
15949 ___D: ::fidl_next::fuchsia::HandleDecoder,
15950 {
15951 fn decode(
15952 slot_: ::fidl_next::Slot<'_, Self>,
15953 decoder_: &mut ___D,
15954 _: (),
15955 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15956 ::fidl_next::munge! {
15957 let Self {
15958
15959 mut v,
15960
15961 } = slot_;
15962 }
15963
15964 let _field = v.as_mut();
15965 ::fidl_next::Constrained::validate(_field, (2, ()))?;
15966 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (2, ()))?;
15967
15968 let v = unsafe { v.deref_unchecked() };
15969
15970 if v.len() > 2 {
15971 return Err(::fidl_next::DecodeError::VectorTooLong {
15972 size: v.len() as u64,
15973 limit: 2,
15974 });
15975 }
15976
15977 Ok(())
15978 }
15979 }
15980
15981 impl<'de> ::fidl_next::IntoNatural for VectorOfUpTo2Handles<'de> {
15982 type Natural = crate::natural::VectorOfUpTo2Handles;
15983 }
15984}
15985
15986pub mod wire_optional {
15987
15988 pub use fidl_next_common_test_conformance::wire_optional::*;
15989
15990 #[repr(transparent)]
15991 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
15992 pub(crate) raw: ::fidl_next::wire::Union,
15993 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15994 }
15995
15996 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
15997 type Constraint = ();
15998
15999 fn validate(
16000 _: ::fidl_next::Slot<'_, Self>,
16001 _: Self::Constraint,
16002 ) -> Result<(), ::fidl_next::ValidationError> {
16003 Ok(())
16004 }
16005 }
16006
16007 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
16008 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
16009
16010 #[inline]
16011 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16012 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16013 ::fidl_next::wire::Union::zero_padding(raw);
16014 }
16015 }
16016
16017 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16018 pub fn is_some(&self) -> bool {
16019 self.raw.is_some()
16020 }
16021
16022 pub fn is_none(&self) -> bool {
16023 self.raw.is_none()
16024 }
16025
16026 pub fn as_ref(
16027 &self,
16028 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
16029 {
16030 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16031 }
16032
16033 pub fn into_option(
16034 self,
16035 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
16036 {
16037 if self.is_some() {
16038 Some(crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights {
16039 raw: self.raw,
16040 _phantom: ::core::marker::PhantomData,
16041 })
16042 } else {
16043 None
16044 }
16045 }
16046 }
16047
16048 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16049 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
16050 where
16051 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16052 ___D: ::fidl_next::Decoder<'de>,
16053 ___D: ::fidl_next::fuchsia::HandleDecoder,
16054 {
16055 fn decode(
16056 mut slot: ::fidl_next::Slot<'_, Self>,
16057 decoder: &mut ___D,
16058 _: (),
16059 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16060 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16061 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16062 1 => ::fidl_next::wire::Union::decode_as::<
16063 ___D,
16064 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
16065 >(raw, decoder, (1, ()))?,
16066
16067 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16068 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16069 }
16070
16071 Ok(())
16072 }
16073 }
16074
16075 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16076 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16077 self.as_ref().fmt(f)
16078 }
16079 }
16080
16081 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16082 type Natural =
16083 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights>;
16084 }
16085
16086 #[repr(transparent)]
16087 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16088 pub(crate) raw: ::fidl_next::wire::Union,
16089 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16090 }
16091
16092 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
16093 type Constraint = ();
16094
16095 fn validate(
16096 _: ::fidl_next::Slot<'_, Self>,
16097 _: Self::Constraint,
16098 ) -> Result<(), ::fidl_next::ValidationError> {
16099 Ok(())
16100 }
16101 }
16102
16103 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
16104 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
16105
16106 #[inline]
16107 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16108 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16109 ::fidl_next::wire::Union::zero_padding(raw);
16110 }
16111 }
16112
16113 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16114 pub fn is_some(&self) -> bool {
16115 self.raw.is_some()
16116 }
16117
16118 pub fn is_none(&self) -> bool {
16119 self.raw.is_none()
16120 }
16121
16122 pub fn as_ref(
16123 &self,
16124 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
16125 {
16126 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16127 }
16128
16129 pub fn into_option(
16130 self,
16131 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
16132 {
16133 if self.is_some() {
16134 Some(crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights {
16135 raw: self.raw,
16136 _phantom: ::core::marker::PhantomData,
16137 })
16138 } else {
16139 None
16140 }
16141 }
16142 }
16143
16144 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16145 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
16146 where
16147 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16148 ___D: ::fidl_next::Decoder<'de>,
16149 ___D: ::fidl_next::fuchsia::HandleDecoder,
16150 {
16151 fn decode(
16152 mut slot: ::fidl_next::Slot<'_, Self>,
16153 decoder: &mut ___D,
16154 _: (),
16155 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16156 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16157 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16158 1 => ::fidl_next::wire::Union::decode_as::<
16159 ___D,
16160 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
16161 >(raw, decoder, (1, ()))?,
16162
16163 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16164 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16165 }
16166
16167 Ok(())
16168 }
16169 }
16170
16171 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16172 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16173 self.as_ref().fmt(f)
16174 }
16175 }
16176
16177 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16178 type Natural =
16179 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights>;
16180 }
16181
16182 #[repr(transparent)]
16183 pub struct EnvelopeInliningTestUnion<'de> {
16184 pub(crate) raw: ::fidl_next::wire::Union,
16185 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16186 }
16187
16188 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
16189 type Constraint = ();
16190
16191 fn validate(
16192 _: ::fidl_next::Slot<'_, Self>,
16193 _: Self::Constraint,
16194 ) -> Result<(), ::fidl_next::ValidationError> {
16195 Ok(())
16196 }
16197 }
16198
16199 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
16200 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
16201
16202 #[inline]
16203 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16204 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16205 ::fidl_next::wire::Union::zero_padding(raw);
16206 }
16207 }
16208
16209 impl<'de> EnvelopeInliningTestUnion<'de> {
16210 pub fn is_some(&self) -> bool {
16211 self.raw.is_some()
16212 }
16213
16214 pub fn is_none(&self) -> bool {
16215 self.raw.is_none()
16216 }
16217
16218 pub fn as_ref(
16219 &self,
16220 ) -> ::core::option::Option<&crate::wire::EnvelopeInliningTestUnion<'de>> {
16221 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16222 }
16223
16224 pub fn into_option(
16225 self,
16226 ) -> ::core::option::Option<crate::wire::EnvelopeInliningTestUnion<'de>> {
16227 if self.is_some() {
16228 Some(crate::wire::EnvelopeInliningTestUnion {
16229 raw: self.raw,
16230 _phantom: ::core::marker::PhantomData,
16231 })
16232 } else {
16233 None
16234 }
16235 }
16236 }
16237
16238 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
16239 where
16240 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16241 ___D: ::fidl_next::Decoder<'de>,
16242 ___D: ::fidl_next::fuchsia::HandleDecoder,
16243 {
16244 fn decode(
16245 mut slot: ::fidl_next::Slot<'_, Self>,
16246 decoder: &mut ___D,
16247 _: (),
16248 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16249 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16250 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16251 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16252 raw,
16253 decoder,
16254 (),
16255 )?,
16256
16257 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
16258 raw,
16259 decoder,
16260 (),
16261 )?,
16262
16263 3 => ::fidl_next::wire::Union::decode_as::<
16264 ___D,
16265 ::fidl_next::wire::fuchsia::NullableHandle,
16266 >(raw, decoder, ())?,
16267
16268 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16269 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16270 }
16271
16272 Ok(())
16273 }
16274 }
16275
16276 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
16277 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16278 self.as_ref().fmt(f)
16279 }
16280 }
16281
16282 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
16283 type Natural = ::core::option::Option<crate::natural::EnvelopeInliningTestUnion>;
16284 }
16285
16286 #[repr(transparent)]
16287 pub struct SampleResourceXUnion<'de> {
16288 pub(crate) raw: ::fidl_next::wire::Union,
16289 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16290 }
16291
16292 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
16293 type Constraint = ();
16294
16295 fn validate(
16296 _: ::fidl_next::Slot<'_, Self>,
16297 _: Self::Constraint,
16298 ) -> Result<(), ::fidl_next::ValidationError> {
16299 Ok(())
16300 }
16301 }
16302
16303 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
16304 type Narrowed<'de> = SampleResourceXUnion<'de>;
16305
16306 #[inline]
16307 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16308 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16309 ::fidl_next::wire::Union::zero_padding(raw);
16310 }
16311 }
16312
16313 impl<'de> SampleResourceXUnion<'de> {
16314 pub fn is_some(&self) -> bool {
16315 self.raw.is_some()
16316 }
16317
16318 pub fn is_none(&self) -> bool {
16319 self.raw.is_none()
16320 }
16321
16322 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SampleResourceXUnion<'de>> {
16323 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16324 }
16325
16326 pub fn into_option(self) -> ::core::option::Option<crate::wire::SampleResourceXUnion<'de>> {
16327 if self.is_some() {
16328 Some(crate::wire::SampleResourceXUnion {
16329 raw: self.raw,
16330 _phantom: ::core::marker::PhantomData,
16331 })
16332 } else {
16333 None
16334 }
16335 }
16336 }
16337
16338 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
16339 where
16340 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16341 ___D: ::fidl_next::Decoder<'de>,
16342 ___D: ::fidl_next::fuchsia::HandleDecoder,
16343 {
16344 fn decode(
16345 mut slot: ::fidl_next::Slot<'_, Self>,
16346 decoder: &mut ___D,
16347 _: (),
16348 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16349 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16350 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16351 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16352 raw,
16353 decoder,
16354 (),
16355 )?,
16356
16357 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
16358 raw,
16359 decoder,
16360 (),
16361 )?,
16362
16363 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
16364 raw,
16365 decoder,
16366 (),
16367 )?,
16368
16369 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16370 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16371 }
16372
16373 Ok(())
16374 }
16375 }
16376
16377 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
16378 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16379 self.as_ref().fmt(f)
16380 }
16381 }
16382
16383 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
16384 type Natural = ::core::option::Option<crate::natural::SampleResourceXUnion>;
16385 }
16386
16387 #[repr(transparent)]
16388 pub struct SampleStrictResourceXUnion<'de> {
16389 pub(crate) raw: ::fidl_next::wire::Union,
16390 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16391 }
16392
16393 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
16394 type Constraint = ();
16395
16396 fn validate(
16397 _: ::fidl_next::Slot<'_, Self>,
16398 _: Self::Constraint,
16399 ) -> Result<(), ::fidl_next::ValidationError> {
16400 Ok(())
16401 }
16402 }
16403
16404 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
16405 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
16406
16407 #[inline]
16408 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16409 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16410 ::fidl_next::wire::Union::zero_padding(raw);
16411 }
16412 }
16413
16414 impl<'de> SampleStrictResourceXUnion<'de> {
16415 pub fn is_some(&self) -> bool {
16416 self.raw.is_some()
16417 }
16418
16419 pub fn is_none(&self) -> bool {
16420 self.raw.is_none()
16421 }
16422
16423 pub fn as_ref(
16424 &self,
16425 ) -> ::core::option::Option<&crate::wire::SampleStrictResourceXUnion<'de>> {
16426 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16427 }
16428
16429 pub fn into_option(
16430 self,
16431 ) -> ::core::option::Option<crate::wire::SampleStrictResourceXUnion<'de>> {
16432 if self.is_some() {
16433 Some(crate::wire::SampleStrictResourceXUnion {
16434 raw: self.raw,
16435 _phantom: ::core::marker::PhantomData,
16436 })
16437 } else {
16438 None
16439 }
16440 }
16441 }
16442
16443 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
16444 where
16445 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16446 ___D: ::fidl_next::Decoder<'de>,
16447 ___D: ::fidl_next::fuchsia::HandleDecoder,
16448 {
16449 fn decode(
16450 mut slot: ::fidl_next::Slot<'_, Self>,
16451 decoder: &mut ___D,
16452 _: (),
16453 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16454 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16455 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16456 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16457 raw,
16458 decoder,
16459 (),
16460 )?,
16461
16462 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
16463 raw,
16464 decoder,
16465 (),
16466 )?,
16467
16468 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
16469 raw,
16470 decoder,
16471 (),
16472 )?,
16473
16474 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16475 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16476 }
16477
16478 Ok(())
16479 }
16480 }
16481
16482 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
16483 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16484 self.as_ref().fmt(f)
16485 }
16486 }
16487
16488 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
16489 type Natural = ::core::option::Option<crate::natural::SampleStrictResourceXUnion>;
16490 }
16491
16492 #[repr(transparent)]
16493 pub struct UnionWithVector<'de> {
16494 pub(crate) raw: ::fidl_next::wire::Union,
16495 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16496 }
16497
16498 impl ::fidl_next::Constrained for UnionWithVector<'_> {
16499 type Constraint = ();
16500
16501 fn validate(
16502 _: ::fidl_next::Slot<'_, Self>,
16503 _: Self::Constraint,
16504 ) -> Result<(), ::fidl_next::ValidationError> {
16505 Ok(())
16506 }
16507 }
16508
16509 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
16510 type Narrowed<'de> = UnionWithVector<'de>;
16511
16512 #[inline]
16513 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16514 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16515 ::fidl_next::wire::Union::zero_padding(raw);
16516 }
16517 }
16518
16519 impl<'de> UnionWithVector<'de> {
16520 pub fn is_some(&self) -> bool {
16521 self.raw.is_some()
16522 }
16523
16524 pub fn is_none(&self) -> bool {
16525 self.raw.is_none()
16526 }
16527
16528 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
16529 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16530 }
16531
16532 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
16533 if self.is_some() {
16534 Some(crate::wire::UnionWithVector {
16535 raw: self.raw,
16536 _phantom: ::core::marker::PhantomData,
16537 })
16538 } else {
16539 None
16540 }
16541 }
16542 }
16543
16544 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
16545 where
16546 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16547 ___D: ::fidl_next::Decoder<'de>,
16548 ___D: ::fidl_next::fuchsia::HandleDecoder,
16549 {
16550 fn decode(
16551 mut slot: ::fidl_next::Slot<'_, Self>,
16552 decoder: &mut ___D,
16553 _: (),
16554 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16555 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16556 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16557 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
16558
16559 2 => {
16560 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
16561 raw,
16562 decoder,
16563 (4294967295, ()),
16564 )?
16565 }
16566
16567 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
16568 raw, decoder, 4294967295,
16569 )?,
16570
16571 4 => ::fidl_next::wire::Union::decode_as::<
16572 ___D,
16573 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
16574 >(raw, decoder, (4294967295, ()))?,
16575
16576 5 => ::fidl_next::wire::Union::decode_as::<
16577 ___D,
16578 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
16579 >(raw, decoder, (4294967295, ()))?,
16580
16581 6 => ::fidl_next::wire::Union::decode_as::<
16582 ___D,
16583 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
16584 >(raw, decoder, (4294967295, ()))?,
16585
16586 7 => ::fidl_next::wire::Union::decode_as::<
16587 ___D,
16588 [crate::wire::StructSize3Align1; 2],
16589 >(raw, decoder, ())?,
16590
16591 8 => ::fidl_next::wire::Union::decode_as::<
16592 ___D,
16593 [crate::wire::StructSize3Align2; 2],
16594 >(raw, decoder, ())?,
16595
16596 9 => ::fidl_next::wire::Union::decode_as::<
16597 ___D,
16598 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
16599 >(raw, decoder, (4294967295, ()))?,
16600
16601 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16602 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16603 }
16604
16605 Ok(())
16606 }
16607 }
16608
16609 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
16610 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16611 self.as_ref().fmt(f)
16612 }
16613 }
16614
16615 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
16616 type Natural = ::core::option::Option<crate::natural::UnionWithVector>;
16617 }
16618
16619 #[repr(transparent)]
16620 pub struct UnionOfEndpointsUnion<'de> {
16621 pub(crate) raw: ::fidl_next::wire::Union,
16622 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16623 }
16624
16625 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
16626 type Constraint = ();
16627
16628 fn validate(
16629 _: ::fidl_next::Slot<'_, Self>,
16630 _: Self::Constraint,
16631 ) -> Result<(), ::fidl_next::ValidationError> {
16632 Ok(())
16633 }
16634 }
16635
16636 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
16637 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
16638
16639 #[inline]
16640 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16641 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16642 ::fidl_next::wire::Union::zero_padding(raw);
16643 }
16644 }
16645
16646 impl<'de> UnionOfEndpointsUnion<'de> {
16647 pub fn is_some(&self) -> bool {
16648 self.raw.is_some()
16649 }
16650
16651 pub fn is_none(&self) -> bool {
16652 self.raw.is_none()
16653 }
16654
16655 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfEndpointsUnion<'de>> {
16656 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16657 }
16658
16659 pub fn into_option(
16660 self,
16661 ) -> ::core::option::Option<crate::wire::UnionOfEndpointsUnion<'de>> {
16662 if self.is_some() {
16663 Some(crate::wire::UnionOfEndpointsUnion {
16664 raw: self.raw,
16665 _phantom: ::core::marker::PhantomData,
16666 })
16667 } else {
16668 None
16669 }
16670 }
16671 }
16672
16673 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
16674 where
16675 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16676 ___D: ::fidl_next::Decoder<'de>,
16677 ___D: ::fidl_next::fuchsia::HandleDecoder,
16678 {
16679 fn decode(
16680 mut slot: ::fidl_next::Slot<'_, Self>,
16681 decoder: &mut ___D,
16682 _: (),
16683 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16684 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16685 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16686 1 => ::fidl_next::wire::Union::decode_as::<
16687 ___D,
16688 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
16689 >(raw, decoder, ())?,
16690
16691 2 => ::fidl_next::wire::Union::decode_as::<
16692 ___D,
16693 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
16694 >(raw, decoder, ())?,
16695
16696 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16697 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16698 }
16699
16700 Ok(())
16701 }
16702 }
16703
16704 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
16705 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16706 self.as_ref().fmt(f)
16707 }
16708 }
16709
16710 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
16711 type Natural = ::core::option::Option<crate::natural::UnionOfEndpointsUnion>;
16712 }
16713
16714 #[repr(transparent)]
16715 pub struct UnionOfHandle {
16716 pub(crate) raw: ::fidl_next::wire::Union,
16717 pub(crate) _phantom: ::core::marker::PhantomData<()>,
16718 }
16719
16720 impl ::fidl_next::Constrained for UnionOfHandle {
16721 type Constraint = ();
16722
16723 fn validate(
16724 _: ::fidl_next::Slot<'_, Self>,
16725 _: Self::Constraint,
16726 ) -> Result<(), ::fidl_next::ValidationError> {
16727 Ok(())
16728 }
16729 }
16730
16731 unsafe impl ::fidl_next::Wire for UnionOfHandle {
16732 type Narrowed<'de> = UnionOfHandle;
16733
16734 #[inline]
16735 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16736 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16737 ::fidl_next::wire::Union::zero_padding(raw);
16738 }
16739 }
16740
16741 impl UnionOfHandle {
16742 pub fn is_some(&self) -> bool {
16743 self.raw.is_some()
16744 }
16745
16746 pub fn is_none(&self) -> bool {
16747 self.raw.is_none()
16748 }
16749
16750 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfHandle> {
16751 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16752 }
16753
16754 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionOfHandle> {
16755 if self.is_some() {
16756 Some(crate::wire::UnionOfHandle {
16757 raw: self.raw,
16758 _phantom: ::core::marker::PhantomData,
16759 })
16760 } else {
16761 None
16762 }
16763 }
16764 }
16765
16766 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
16767 where
16768 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16769 ___D: ::fidl_next::fuchsia::HandleDecoder,
16770 {
16771 fn decode(
16772 mut slot: ::fidl_next::Slot<'_, Self>,
16773 decoder: &mut ___D,
16774 _: (),
16775 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16776 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16777 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16778 1 => ::fidl_next::wire::Union::decode_as_static::<
16779 ___D,
16780 ::fidl_next::wire::fuchsia::NullableHandle,
16781 >(raw, decoder, ())?,
16782
16783 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16784 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
16785 }
16786
16787 Ok(())
16788 }
16789 }
16790
16791 impl ::core::fmt::Debug for UnionOfHandle {
16792 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16793 self.as_ref().fmt(f)
16794 }
16795 }
16796
16797 impl ::fidl_next::IntoNatural for UnionOfHandle {
16798 type Natural = ::core::option::Option<crate::natural::UnionOfHandle>;
16799 }
16800
16801 #[repr(transparent)]
16802 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16803 pub(crate) raw: ::fidl_next::wire::Union,
16804 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16805 }
16806
16807 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
16808 type Constraint = ();
16809
16810 fn validate(
16811 _: ::fidl_next::Slot<'_, Self>,
16812 _: Self::Constraint,
16813 ) -> Result<(), ::fidl_next::ValidationError> {
16814 Ok(())
16815 }
16816 }
16817
16818 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
16819 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
16820
16821 #[inline]
16822 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16823 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16824 ::fidl_next::wire::Union::zero_padding(raw);
16825 }
16826 }
16827
16828 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16829 pub fn is_some(&self) -> bool {
16830 self.raw.is_some()
16831 }
16832
16833 pub fn is_none(&self) -> bool {
16834 self.raw.is_none()
16835 }
16836
16837 pub fn as_ref(
16838 &self,
16839 ) -> ::core::option::Option<&crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
16840 {
16841 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16842 }
16843
16844 pub fn into_option(
16845 self,
16846 ) -> ::core::option::Option<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
16847 {
16848 if self.is_some() {
16849 Some(crate::wire::VectorOfArrayOfEventInUnionWithReducedRights {
16850 raw: self.raw,
16851 _phantom: ::core::marker::PhantomData,
16852 })
16853 } else {
16854 None
16855 }
16856 }
16857 }
16858
16859 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16860 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
16861 where
16862 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16863 ___D: ::fidl_next::Decoder<'de>,
16864 ___D: ::fidl_next::fuchsia::HandleDecoder,
16865 {
16866 fn decode(
16867 mut slot: ::fidl_next::Slot<'_, Self>,
16868 decoder: &mut ___D,
16869 _: (),
16870 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16871 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16872 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16873 1 => ::fidl_next::wire::Union::decode_as::<
16874 ___D,
16875 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16876 >(raw, decoder, (1, ()))?,
16877
16878 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16879 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16880 }
16881
16882 Ok(())
16883 }
16884 }
16885
16886 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16887 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16888 self.as_ref().fmt(f)
16889 }
16890 }
16891
16892 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16893 type Natural =
16894 ::core::option::Option<crate::natural::VectorOfArrayOfEventInUnionWithReducedRights>;
16895 }
16896}
16897
16898pub mod generic {
16899
16900 pub use fidl_next_common_test_conformance::generic::*;
16901
16902 pub struct AlternatingHandlesAndFailures<T0, T1, T2, T3, T4> {
16903 pub h1: T0,
16904
16905 pub failure_trigger1: T1,
16906
16907 pub h2: T2,
16908
16909 pub failure_trigger2: T3,
16910
16911 pub h3: T4,
16912 }
16913
16914 unsafe impl<___E, T0, T1, T2, T3, T4>
16915 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
16916 for AlternatingHandlesAndFailures<T0, T1, T2, T3, T4>
16917 where
16918 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16919 ___E: ::fidl_next::Encoder,
16920 ___E: ::fidl_next::fuchsia::HandleEncoder,
16921 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
16922 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
16923 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
16924 T3: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
16925 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
16926 {
16927 #[inline]
16928 fn encode(
16929 self,
16930 encoder_: &mut ___E,
16931 out_: &mut ::core::mem::MaybeUninit<
16932 crate::wire::AlternatingHandlesAndFailures<'static>,
16933 >,
16934 _: (),
16935 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16936 ::fidl_next::munge! {
16937 let crate::wire::AlternatingHandlesAndFailures {
16938
16939 h1,
16940 failure_trigger1,
16941 h2,
16942 failure_trigger2,
16943 h3,
16944
16945 } = out_;
16946 }
16947
16948 ::fidl_next::Encode::encode(self.h1, encoder_, h1, ())?;
16949
16950 ::fidl_next::Encode::encode(self.failure_trigger1, encoder_, failure_trigger1, 1)?;
16951
16952 ::fidl_next::Encode::encode(self.h2, encoder_, h2, ())?;
16953
16954 ::fidl_next::Encode::encode(self.failure_trigger2, encoder_, failure_trigger2, 1)?;
16955
16956 ::fidl_next::Encode::encode(self.h3, encoder_, h3, ())?;
16957
16958 Ok(())
16959 }
16960 }
16961
16962 pub struct ArrayOfArrayOfNonnullableHandles<T0> {
16963 pub handles: T0,
16964 }
16965
16966 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
16967 for ArrayOfArrayOfNonnullableHandles<T0>
16968 where
16969 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16970 ___E: ::fidl_next::fuchsia::HandleEncoder,
16971 T0: ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>,
16972 {
16973 #[inline]
16974 fn encode(
16975 self,
16976 encoder_: &mut ___E,
16977 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
16978 _: (),
16979 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16980 ::fidl_next::munge! {
16981 let crate::wire::ArrayOfArrayOfNonnullableHandles {
16982
16983 handles,
16984
16985 } = out_;
16986 }
16987
16988 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
16989
16990 Ok(())
16991 }
16992 }
16993
16994 pub struct ArrayOfHandles<T0> {
16995 pub a: T0,
16996 }
16997
16998 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E> for ArrayOfHandles<T0>
16999 where
17000 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17001 ___E: ::fidl_next::fuchsia::HandleEncoder,
17002 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 3], ___E>,
17003 {
17004 #[inline]
17005 fn encode(
17006 self,
17007 encoder_: &mut ___E,
17008 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
17009 _: (),
17010 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17011 ::fidl_next::munge! {
17012 let crate::wire::ArrayOfHandles {
17013
17014 a,
17015
17016 } = out_;
17017 }
17018
17019 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
17020
17021 Ok(())
17022 }
17023 }
17024
17025 pub struct ArrayOfNonnullableHandles<T0> {
17026 pub handles: T0,
17027 }
17028
17029 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
17030 for ArrayOfNonnullableHandles<T0>
17031 where
17032 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17033 ___E: ::fidl_next::fuchsia::HandleEncoder,
17034 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
17035 {
17036 #[inline]
17037 fn encode(
17038 self,
17039 encoder_: &mut ___E,
17040 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
17041 _: (),
17042 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17043 ::fidl_next::munge! {
17044 let crate::wire::ArrayOfNonnullableHandles {
17045
17046 handles,
17047
17048 } = out_;
17049 }
17050
17051 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17052
17053 Ok(())
17054 }
17055 }
17056
17057 pub struct ArrayOfNullableHandles<T0> {
17058 pub handles: T0,
17059 }
17060
17061 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
17062 for ArrayOfNullableHandles<T0>
17063 where
17064 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17065 ___E: ::fidl_next::fuchsia::HandleEncoder,
17066 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>,
17067 {
17068 #[inline]
17069 fn encode(
17070 self,
17071 encoder_: &mut ___E,
17072 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
17073 _: (),
17074 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17075 ::fidl_next::munge! {
17076 let crate::wire::ArrayOfNullableHandles {
17077
17078 handles,
17079
17080 } = out_;
17081 }
17082
17083 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17084
17085 Ok(())
17086 }
17087 }
17088
17089 pub struct ArrayOfOptionalHandles<T0> {
17090 pub a: T0,
17091 }
17092
17093 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
17094 for ArrayOfOptionalHandles<T0>
17095 where
17096 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17097 ___E: ::fidl_next::fuchsia::HandleEncoder,
17098 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>,
17099 {
17100 #[inline]
17101 fn encode(
17102 self,
17103 encoder_: &mut ___E,
17104 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
17105 _: (),
17106 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17107 ::fidl_next::munge! {
17108 let crate::wire::ArrayOfOptionalHandles {
17109
17110 a,
17111
17112 } = out_;
17113 }
17114
17115 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
17116
17117 Ok(())
17118 }
17119 }
17120
17121 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<T0> {
17122 pub h: T0,
17123 }
17124
17125 unsafe impl<___E, T0>
17126 ::fidl_next::Encode<
17127 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
17128 ___E,
17129 > for ArrayOfVectorOfEventInStructWithDefaultRights<T0>
17130 where
17131 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17132 ___E: ::fidl_next::Encoder,
17133 ___E: ::fidl_next::fuchsia::HandleEncoder,
17134 T0: ::fidl_next::Encode<
17135 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
17136 ___E,
17137 >,
17138 {
17139 #[inline]
17140 fn encode(
17141 self,
17142 encoder_: &mut ___E,
17143 out_: &mut ::core::mem::MaybeUninit<
17144 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
17145 >,
17146 _: (),
17147 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17148 ::fidl_next::munge! {
17149 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
17150
17151 h,
17152
17153 } = out_;
17154 }
17155
17156 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
17157
17158 Ok(())
17159 }
17160 }
17161
17162 pub struct ArrayOfVectorOfEventInStructWithReducedRights<T0> {
17163 pub h: T0,
17164 }
17165
17166 unsafe impl<___E, T0>
17167 ::fidl_next::Encode<
17168 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
17169 ___E,
17170 > for ArrayOfVectorOfEventInStructWithReducedRights<T0>
17171 where
17172 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17173 ___E: ::fidl_next::Encoder,
17174 ___E: ::fidl_next::fuchsia::HandleEncoder,
17175 T0: ::fidl_next::Encode<
17176 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
17177 ___E,
17178 >,
17179 {
17180 #[inline]
17181 fn encode(
17182 self,
17183 encoder_: &mut ___E,
17184 out_: &mut ::core::mem::MaybeUninit<
17185 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
17186 >,
17187 _: (),
17188 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17189 ::fidl_next::munge! {
17190 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
17191
17192 h,
17193
17194 } = out_;
17195 }
17196
17197 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
17198
17199 Ok(())
17200 }
17201 }
17202
17203 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0> {
17204 pub t: T0,
17205 }
17206
17207 unsafe impl<___E, T0>
17208 ::fidl_next::Encode<
17209 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
17210 ___E,
17211 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0>
17212 where
17213 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17214 ___E: ::fidl_next::Encoder,
17215 ___E: ::fidl_next::fuchsia::HandleEncoder,
17216 T0: ::fidl_next::Encode<
17217 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
17218 ___E,
17219 >,
17220 {
17221 #[inline]
17222 fn encode(
17223 self,
17224 encoder_: &mut ___E,
17225 out_: &mut ::core::mem::MaybeUninit<
17226 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
17227 >,
17228 _: (),
17229 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17230 ::fidl_next::munge! {
17231 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
17232
17233 t,
17234
17235 } = out_;
17236 }
17237
17238 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
17239
17240 Ok(())
17241 }
17242 }
17243
17244 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0> {
17245 pub t: T0,
17246 }
17247
17248 unsafe impl<___E, T0>
17249 ::fidl_next::Encode<
17250 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
17251 ___E,
17252 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0>
17253 where
17254 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17255 ___E: ::fidl_next::Encoder,
17256 ___E: ::fidl_next::fuchsia::HandleEncoder,
17257 T0: ::fidl_next::Encode<
17258 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
17259 ___E,
17260 >,
17261 {
17262 #[inline]
17263 fn encode(
17264 self,
17265 encoder_: &mut ___E,
17266 out_: &mut ::core::mem::MaybeUninit<
17267 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
17268 >,
17269 _: (),
17270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17271 ::fidl_next::munge! {
17272 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
17273
17274 t,
17275
17276 } = out_;
17277 }
17278
17279 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
17280
17281 Ok(())
17282 }
17283 }
17284
17285 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0> {
17286 pub u: T0,
17287 }
17288
17289 unsafe impl<___E, T0>
17290 ::fidl_next::Encode<
17291 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
17292 ___E,
17293 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0>
17294 where
17295 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17296 ___E: ::fidl_next::Encoder,
17297 ___E: ::fidl_next::fuchsia::HandleEncoder,
17298 T0: ::fidl_next::Encode<
17299 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
17300 ___E,
17301 >,
17302 {
17303 #[inline]
17304 fn encode(
17305 self,
17306 encoder_: &mut ___E,
17307 out_: &mut ::core::mem::MaybeUninit<
17308 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
17309 >,
17310 _: (),
17311 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17312 ::fidl_next::munge! {
17313 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
17314
17315 u,
17316
17317 } = out_;
17318 }
17319
17320 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17321
17322 Ok(())
17323 }
17324 }
17325
17326 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0> {
17327 pub u: T0,
17328 }
17329
17330 unsafe impl<___E, T0>
17331 ::fidl_next::Encode<
17332 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
17333 ___E,
17334 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0>
17335 where
17336 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17337 ___E: ::fidl_next::Encoder,
17338 ___E: ::fidl_next::fuchsia::HandleEncoder,
17339 T0: ::fidl_next::Encode<
17340 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
17341 ___E,
17342 >,
17343 {
17344 #[inline]
17345 fn encode(
17346 self,
17347 encoder_: &mut ___E,
17348 out_: &mut ::core::mem::MaybeUninit<
17349 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
17350 >,
17351 _: (),
17352 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17353 ::fidl_next::munge! {
17354 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
17355
17356 u,
17357
17358 } = out_;
17359 }
17360
17361 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17362
17363 Ok(())
17364 }
17365 }
17366
17367 pub struct Bounded32NonnullableVectorOfHandles<T0> {
17368 pub vh0: T0,
17369 }
17370
17371 unsafe impl<___E, T0>
17372 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
17373 for Bounded32NonnullableVectorOfHandles<T0>
17374 where
17375 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17376 ___E: ::fidl_next::Encoder,
17377 ___E: ::fidl_next::fuchsia::HandleEncoder,
17378 T0: ::fidl_next::Encode<
17379 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
17380 ___E,
17381 >,
17382 {
17383 #[inline]
17384 fn encode(
17385 self,
17386 encoder_: &mut ___E,
17387 out_: &mut ::core::mem::MaybeUninit<
17388 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
17389 >,
17390 _: (),
17391 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17392 ::fidl_next::munge! {
17393 let crate::wire::Bounded32NonnullableVectorOfHandles {
17394
17395 vh0,
17396
17397 } = out_;
17398 }
17399
17400 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
17401
17402 Ok(())
17403 }
17404 }
17405
17406 pub struct Bounded32NullableVectorOfHandles<T0> {
17407 pub vh0: T0,
17408 }
17409
17410 unsafe impl<___E, T0>
17411 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
17412 for Bounded32NullableVectorOfHandles<T0>
17413 where
17414 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17415 ___E: ::fidl_next::Encoder,
17416 ___E: ::fidl_next::fuchsia::HandleEncoder,
17417 T0: ::fidl_next::Encode<
17418 ::fidl_next::wire::OptionalVector<
17419 'static,
17420 ::fidl_next::wire::fuchsia::NullableHandle,
17421 >,
17422 ___E,
17423 >,
17424 {
17425 #[inline]
17426 fn encode(
17427 self,
17428 encoder_: &mut ___E,
17429 out_: &mut ::core::mem::MaybeUninit<
17430 crate::wire::Bounded32NullableVectorOfHandles<'static>,
17431 >,
17432 _: (),
17433 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17434 ::fidl_next::munge! {
17435 let crate::wire::Bounded32NullableVectorOfHandles {
17436
17437 vh0,
17438
17439 } = out_;
17440 }
17441
17442 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
17443
17444 Ok(())
17445 }
17446 }
17447
17448 pub struct BoxOfSingleHandle<T0> {
17449 pub b: T0,
17450 }
17451
17452 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
17453 for BoxOfSingleHandle<T0>
17454 where
17455 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17456 ___E: ::fidl_next::Encoder,
17457 ___E: ::fidl_next::fuchsia::HandleEncoder,
17458 T0: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>,
17459 {
17460 #[inline]
17461 fn encode(
17462 self,
17463 encoder_: &mut ___E,
17464 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
17465 _: (),
17466 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17467 ::fidl_next::munge! {
17468 let crate::wire::BoxOfSingleHandle {
17469
17470 b,
17471
17472 } = out_;
17473 }
17474
17475 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
17476
17477 Ok(())
17478 }
17479 }
17480
17481 pub struct BoxOfSingleOptionalHandle<T0> {
17482 pub b: T0,
17483 }
17484
17485 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
17486 for BoxOfSingleOptionalHandle<T0>
17487 where
17488 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17489 ___E: ::fidl_next::Encoder,
17490 ___E: ::fidl_next::fuchsia::HandleEncoder,
17491 T0: ::fidl_next::Encode<
17492 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
17493 ___E,
17494 >,
17495 {
17496 #[inline]
17497 fn encode(
17498 self,
17499 encoder_: &mut ___E,
17500 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
17501 _: (),
17502 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17503 ::fidl_next::munge! {
17504 let crate::wire::BoxOfSingleOptionalHandle {
17505
17506 b,
17507
17508 } = out_;
17509 }
17510
17511 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
17512
17513 Ok(())
17514 }
17515 }
17516
17517 pub struct LaunchInfo<T0, T1, T2, T3, T4, T5, T6> {
17518 pub url: T0,
17519
17520 pub arguments: T1,
17521
17522 pub out: T2,
17523
17524 pub err: T3,
17525
17526 pub directory_request: T4,
17527
17528 pub flat_namespace: T5,
17529
17530 pub additional_services: T6,
17531 }
17532
17533 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
17534 ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>
17535 for LaunchInfo<T0, T1, T2, T3, T4, T5, T6>
17536 where
17537 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17538 ___E: ::fidl_next::Encoder,
17539 ___E: ::fidl_next::fuchsia::HandleEncoder,
17540 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17541 T1: ::fidl_next::Encode<
17542 ::fidl_next::wire::OptionalVector<'static, ::fidl_next::wire::String<'static>>,
17543 ___E,
17544 >,
17545 T2: ::fidl_next::Encode<
17546 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17547 ___E,
17548 >,
17549 T3: ::fidl_next::Encode<
17550 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17551 ___E,
17552 >,
17553 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
17554 T5: ::fidl_next::Encode<
17555 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17556 ___E,
17557 >,
17558 T6: ::fidl_next::Encode<
17559 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17560 ___E,
17561 >,
17562 {
17563 #[inline]
17564 fn encode(
17565 self,
17566 encoder_: &mut ___E,
17567 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
17568 _: (),
17569 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17570 ::fidl_next::munge! {
17571 let crate::wire::LaunchInfo {
17572
17573 url,
17574 arguments,
17575 out,
17576 err,
17577 directory_request,
17578 flat_namespace,
17579 additional_services,
17580
17581 } = out_;
17582 }
17583
17584 ::fidl_next::Encode::encode(self.url, encoder_, url, 200)?;
17585
17586 ::fidl_next::Encode::encode(
17587 self.arguments,
17588 encoder_,
17589 arguments,
17590 (4294967295, 4294967295),
17591 )?;
17592
17593 ::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
17594
17595 ::fidl_next::Encode::encode(self.err, encoder_, err, ())?;
17596
17597 ::fidl_next::Encode::encode(self.directory_request, encoder_, directory_request, ())?;
17598
17599 ::fidl_next::Encode::encode(self.flat_namespace, encoder_, flat_namespace, ())?;
17600
17601 ::fidl_next::Encode::encode(
17602 self.additional_services,
17603 encoder_,
17604 additional_services,
17605 (),
17606 )?;
17607
17608 Ok(())
17609 }
17610 }
17611
17612 pub struct CreateComponentRequest<T0, T1> {
17613 pub launch_info: T0,
17614
17615 pub controller: T1,
17616 }
17617
17618 unsafe impl<___E, T0, T1>
17619 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
17620 for CreateComponentRequest<T0, T1>
17621 where
17622 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17623 ___E: ::fidl_next::Encoder,
17624 ___E: ::fidl_next::fuchsia::HandleEncoder,
17625 T0: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
17626 T1: ::fidl_next::Encode<
17627 ::fidl_next::ServerEnd<
17628 crate::ComponentController,
17629 ::fidl_next::wire::fuchsia::OptionalChannel,
17630 >,
17631 ___E,
17632 >,
17633 {
17634 #[inline]
17635 fn encode(
17636 self,
17637 encoder_: &mut ___E,
17638 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
17639 _: (),
17640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17641 ::fidl_next::munge! {
17642 let crate::wire::CreateComponentRequest {
17643
17644 launch_info,
17645 controller,
17646
17647 } = out_;
17648 }
17649
17650 ::fidl_next::Encode::encode(self.launch_info, encoder_, launch_info, ())?;
17651
17652 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
17653
17654 Ok(())
17655 }
17656 }
17657
17658 pub struct EmptyResourceTableStruct<T0> {
17659 pub table: T0,
17660 }
17661
17662 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
17663 for EmptyResourceTableStruct<T0>
17664 where
17665 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17666 ___E: ::fidl_next::Encoder,
17667 ___E: ::fidl_next::fuchsia::HandleEncoder,
17668 T0: ::fidl_next::Encode<crate::wire::EmptyResourceTable<'static>, ___E>,
17669 {
17670 #[inline]
17671 fn encode(
17672 self,
17673 encoder_: &mut ___E,
17674 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
17675 _: (),
17676 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17677 ::fidl_next::munge! {
17678 let crate::wire::EmptyResourceTableStruct {
17679
17680 table,
17681
17682 } = out_;
17683 }
17684
17685 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
17686
17687 Ok(())
17688 }
17689 }
17690
17691 pub struct EnvelopeInliningTestUnionStruct<T0> {
17692 pub u: T0,
17693 }
17694
17695 unsafe impl<___E, T0>
17696 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
17697 for EnvelopeInliningTestUnionStruct<T0>
17698 where
17699 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17700 ___E: ::fidl_next::Encoder,
17701 ___E: ::fidl_next::fuchsia::HandleEncoder,
17702 T0: ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
17703 {
17704 #[inline]
17705 fn encode(
17706 self,
17707 encoder_: &mut ___E,
17708 out_: &mut ::core::mem::MaybeUninit<
17709 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
17710 >,
17711 _: (),
17712 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17713 ::fidl_next::munge! {
17714 let crate::wire::EnvelopeInliningTestUnionStruct {
17715
17716 u,
17717
17718 } = out_;
17719 }
17720
17721 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17722
17723 Ok(())
17724 }
17725 }
17726
17727 pub struct EventWithDefaultRights<T0> {
17728 pub h: T0,
17729 }
17730
17731 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
17732 for EventWithDefaultRights<T0>
17733 where
17734 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17735 ___E: ::fidl_next::fuchsia::HandleEncoder,
17736 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
17737 {
17738 #[inline]
17739 fn encode(
17740 self,
17741 encoder_: &mut ___E,
17742 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
17743 _: (),
17744 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17745 ::fidl_next::munge! {
17746 let crate::wire::EventWithDefaultRights {
17747
17748 h,
17749
17750 } = out_;
17751 }
17752
17753 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
17754
17755 Ok(())
17756 }
17757 }
17758
17759 pub struct EventWithReducedRights<T0> {
17760 pub h: T0,
17761 }
17762
17763 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
17764 for EventWithReducedRights<T0>
17765 where
17766 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17767 ___E: ::fidl_next::fuchsia::HandleEncoder,
17768 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
17769 {
17770 #[inline]
17771 fn encode(
17772 self,
17773 encoder_: &mut ___E,
17774 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
17775 _: (),
17776 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17777 ::fidl_next::munge! {
17778 let crate::wire::EventWithReducedRights {
17779
17780 h,
17781
17782 } = out_;
17783 }
17784
17785 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
17786
17787 Ok(())
17788 }
17789 }
17790
17791 pub struct FidlvizDemo<
17792 T0,
17793 T1,
17794 T2,
17795 T3,
17796 T4,
17797 T5,
17798 T6,
17799 T7,
17800 T8,
17801 T9,
17802 T10,
17803 T11,
17804 T12,
17805 T13,
17806 T14,
17807 T15,
17808 T16,
17809 T17,
17810 T18,
17811 T19,
17812 T20,
17813 T21,
17814 T22,
17815 T23,
17816 T24,
17817 T25,
17818 T26,
17819 T27,
17820 T28,
17821 T29,
17822 T30,
17823 > {
17824 pub f1: T0,
17825
17826 pub f2: T1,
17827
17828 pub f3: T2,
17829
17830 pub f4: T3,
17831
17832 pub f5: T4,
17833
17834 pub f6: T5,
17835
17836 pub f7: T6,
17837
17838 pub f8: T7,
17839
17840 pub f9: T8,
17841
17842 pub f10: T9,
17843
17844 pub f11: T10,
17845
17846 pub f12: T11,
17847
17848 pub f13: T12,
17849
17850 pub f14: T13,
17851
17852 pub f15: T14,
17853
17854 pub f16: T15,
17855
17856 pub f17: T16,
17857
17858 pub f18: T17,
17859
17860 pub f19: T18,
17861
17862 pub f20: T19,
17863
17864 pub f21: T20,
17865
17866 pub f22: T21,
17867
17868 pub f23: T22,
17869
17870 pub f24: T23,
17871
17872 pub f25: T24,
17873
17874 pub f26: T25,
17875
17876 pub f27: T26,
17877
17878 pub f28: T27,
17879
17880 pub f29: T28,
17881
17882 pub f30: T29,
17883
17884 pub f31: T30,
17885 }
17886
17887 unsafe impl<
17888 ___E,
17889 T0,
17890 T1,
17891 T2,
17892 T3,
17893 T4,
17894 T5,
17895 T6,
17896 T7,
17897 T8,
17898 T9,
17899 T10,
17900 T11,
17901 T12,
17902 T13,
17903 T14,
17904 T15,
17905 T16,
17906 T17,
17907 T18,
17908 T19,
17909 T20,
17910 T21,
17911 T22,
17912 T23,
17913 T24,
17914 T25,
17915 T26,
17916 T27,
17917 T28,
17918 T29,
17919 T30,
17920 > ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>
17921 for FidlvizDemo<
17922 T0,
17923 T1,
17924 T2,
17925 T3,
17926 T4,
17927 T5,
17928 T6,
17929 T7,
17930 T8,
17931 T9,
17932 T10,
17933 T11,
17934 T12,
17935 T13,
17936 T14,
17937 T15,
17938 T16,
17939 T17,
17940 T18,
17941 T19,
17942 T20,
17943 T21,
17944 T22,
17945 T23,
17946 T24,
17947 T25,
17948 T26,
17949 T27,
17950 T28,
17951 T29,
17952 T30,
17953 >
17954 where
17955 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17956 ___E: ::fidl_next::Encoder,
17957 ___E: ::fidl_next::fuchsia::HandleEncoder,
17958 T0: ::fidl_next::Encode<u8, ___E>,
17959 T1: ::fidl_next::Encode<i8, ___E>,
17960 T2: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
17961 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17962 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17963 T5: ::fidl_next::Encode<u8, ___E>,
17964 T6: ::fidl_next::Encode<u8, ___E>,
17965 T7: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
17966 T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
17967 T9: ::fidl_next::Encode<::fidl_next::wire::Float64, ___E>,
17968 T10: ::fidl_next::Encode<bool, ___E>,
17969 T11: ::fidl_next::Encode<bool, ___E>,
17970 T12: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17971 T13: ::fidl_next::Encode<::fidl_next::wire::OptionalString<'static>, ___E>,
17972 T14: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17973 T15: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
17974 T16: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17975 T17: ::fidl_next::Encode<[u8; 3], ___E>,
17976 T18: ::fidl_next::Encode<
17977 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Float64>,
17978 ___E,
17979 >,
17980 T19: ::fidl_next::Encode<::fidl_next::wire::OptionalVector<'static, u8>, ___E>,
17981 T20: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17982 T21: ::fidl_next::Encode<crate::wire::FidlvizBits, ___E>,
17983 T22: ::fidl_next::Encode<crate::wire::FidlvizEnum, ___E>,
17984 T23: ::fidl_next::Encode<crate::wire::FidlvizStruct1, ___E>,
17985 T24: ::fidl_next::Encode<crate::wire::FidlvizStruct2, ___E>,
17986 T25:
17987 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct1>, ___E>,
17988 T26:
17989 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct2>, ___E>,
17990 T27: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
17991 T28: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
17992 T29: ::fidl_next::Encode<crate::wire_optional::FidlvizUnion<'static>, ___E>,
17993 T30: ::fidl_next::Encode<crate::wire::FidlvizUnion<'static>, ___E>,
17994 {
17995 #[inline]
17996 fn encode(
17997 self,
17998 encoder_: &mut ___E,
17999 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
18000 _: (),
18001 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18002 ::fidl_next::munge! {
18003 let crate::wire::FidlvizDemo {
18004
18005 f1,
18006 f2,
18007 f3,
18008 f4,
18009 f5,
18010 f6,
18011 f7,
18012 f8,
18013 f9,
18014 f10,
18015 f11,
18016 f12,
18017 f13,
18018 f14,
18019 f15,
18020 f16,
18021 f17,
18022 f18,
18023 f19,
18024 f20,
18025 f21,
18026 f22,
18027 f23,
18028 f24,
18029 f25,
18030 f26,
18031 f27,
18032 f28,
18033 f29,
18034 f30,
18035 f31,
18036
18037 } = out_;
18038 }
18039
18040 ::fidl_next::Encode::encode(self.f1, encoder_, f1, ())?;
18041
18042 ::fidl_next::Encode::encode(self.f2, encoder_, f2, ())?;
18043
18044 ::fidl_next::Encode::encode(self.f3, encoder_, f3, ())?;
18045
18046 ::fidl_next::Encode::encode(self.f4, encoder_, f4, ())?;
18047
18048 ::fidl_next::Encode::encode(self.f5, encoder_, f5, ())?;
18049
18050 ::fidl_next::Encode::encode(self.f6, encoder_, f6, ())?;
18051
18052 ::fidl_next::Encode::encode(self.f7, encoder_, f7, ())?;
18053
18054 ::fidl_next::Encode::encode(self.f8, encoder_, f8, ())?;
18055
18056 ::fidl_next::Encode::encode(self.f9, encoder_, f9, ())?;
18057
18058 ::fidl_next::Encode::encode(self.f10, encoder_, f10, ())?;
18059
18060 ::fidl_next::Encode::encode(self.f11, encoder_, f11, ())?;
18061
18062 ::fidl_next::Encode::encode(self.f12, encoder_, f12, ())?;
18063
18064 ::fidl_next::Encode::encode(self.f13, encoder_, f13, 4294967295)?;
18065
18066 ::fidl_next::Encode::encode(self.f14, encoder_, f14, 4294967295)?;
18067
18068 ::fidl_next::Encode::encode(self.f15, encoder_, f15, 4294967295)?;
18069
18070 ::fidl_next::Encode::encode(self.f16, encoder_, f16, ())?;
18071
18072 ::fidl_next::Encode::encode(self.f17, encoder_, f17, ())?;
18073
18074 ::fidl_next::Encode::encode(self.f18, encoder_, f18, ())?;
18075
18076 ::fidl_next::Encode::encode(self.f19, encoder_, f19, (4294967295, ()))?;
18077
18078 ::fidl_next::Encode::encode(self.f20, encoder_, f20, (4294967295, ()))?;
18079
18080 ::fidl_next::Encode::encode(self.f21, encoder_, f21, (4294967295, ()))?;
18081
18082 ::fidl_next::Encode::encode(self.f22, encoder_, f22, ())?;
18083
18084 ::fidl_next::Encode::encode(self.f23, encoder_, f23, ())?;
18085
18086 ::fidl_next::Encode::encode(self.f24, encoder_, f24, ())?;
18087
18088 ::fidl_next::Encode::encode(self.f25, encoder_, f25, ())?;
18089
18090 ::fidl_next::Encode::encode(self.f26, encoder_, f26, ())?;
18091
18092 ::fidl_next::Encode::encode(self.f27, encoder_, f27, ())?;
18093
18094 ::fidl_next::Encode::encode(self.f28, encoder_, f28, ())?;
18095
18096 ::fidl_next::Encode::encode(self.f29, encoder_, f29, ())?;
18097
18098 ::fidl_next::Encode::encode(self.f30, encoder_, f30, ())?;
18099
18100 ::fidl_next::Encode::encode(self.f31, encoder_, f31, ())?;
18101
18102 Ok(())
18103 }
18104 }
18105
18106 pub struct GoldenHandleBasicRightsStruct<T0> {
18107 pub v: T0,
18108 }
18109
18110 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
18111 for GoldenHandleBasicRightsStruct<T0>
18112 where
18113 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18114 ___E: ::fidl_next::fuchsia::HandleEncoder,
18115 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18116 {
18117 #[inline]
18118 fn encode(
18119 self,
18120 encoder_: &mut ___E,
18121 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
18122 _: (),
18123 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18124 ::fidl_next::munge! {
18125 let crate::wire::GoldenHandleBasicRightsStruct {
18126
18127 v,
18128
18129 } = out_;
18130 }
18131
18132 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
18133
18134 Ok(())
18135 }
18136 }
18137
18138 pub struct GoldenNullableHandleStruct<T0> {
18139 pub v: T0,
18140 }
18141
18142 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
18143 for GoldenNullableHandleStruct<T0>
18144 where
18145 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18146 ___E: ::fidl_next::fuchsia::HandleEncoder,
18147 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18148 {
18149 #[inline]
18150 fn encode(
18151 self,
18152 encoder_: &mut ___E,
18153 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
18154 _: (),
18155 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18156 ::fidl_next::munge! {
18157 let crate::wire::GoldenNullableHandleStruct {
18158
18159 v,
18160
18161 } = out_;
18162 }
18163
18164 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
18165
18166 Ok(())
18167 }
18168 }
18169
18170 pub struct MultipleBoundedNonnullableVectorsOfHandles<T0, T1> {
18171 pub vh0: T0,
18172
18173 pub vh1: T1,
18174 }
18175
18176 unsafe impl<___E, T0, T1>
18177 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
18178 for MultipleBoundedNonnullableVectorsOfHandles<T0, T1>
18179 where
18180 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18181 ___E: ::fidl_next::Encoder,
18182 ___E: ::fidl_next::fuchsia::HandleEncoder,
18183 T0: ::fidl_next::Encode<
18184 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18185 ___E,
18186 >,
18187 T1: ::fidl_next::Encode<
18188 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18189 ___E,
18190 >,
18191 {
18192 #[inline]
18193 fn encode(
18194 self,
18195 encoder_: &mut ___E,
18196 out_: &mut ::core::mem::MaybeUninit<
18197 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
18198 >,
18199 _: (),
18200 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18201 ::fidl_next::munge! {
18202 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
18203
18204 vh0,
18205 vh1,
18206
18207 } = out_;
18208 }
18209
18210 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
18211
18212 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
18213
18214 Ok(())
18215 }
18216 }
18217
18218 pub struct MultipleBoundedNullableVectorsOfHandles<T0, T1> {
18219 pub vh0: T0,
18220
18221 pub vh1: T1,
18222 }
18223
18224 unsafe impl<___E, T0, T1>
18225 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
18226 for MultipleBoundedNullableVectorsOfHandles<T0, T1>
18227 where
18228 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18229 ___E: ::fidl_next::Encoder,
18230 ___E: ::fidl_next::fuchsia::HandleEncoder,
18231 T0: ::fidl_next::Encode<
18232 ::fidl_next::wire::OptionalVector<
18233 'static,
18234 ::fidl_next::wire::fuchsia::NullableHandle,
18235 >,
18236 ___E,
18237 >,
18238 T1: ::fidl_next::Encode<
18239 ::fidl_next::wire::OptionalVector<
18240 'static,
18241 ::fidl_next::wire::fuchsia::NullableHandle,
18242 >,
18243 ___E,
18244 >,
18245 {
18246 #[inline]
18247 fn encode(
18248 self,
18249 encoder_: &mut ___E,
18250 out_: &mut ::core::mem::MaybeUninit<
18251 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
18252 >,
18253 _: (),
18254 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18255 ::fidl_next::munge! {
18256 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
18257
18258 vh0,
18259 vh1,
18260
18261 } = out_;
18262 }
18263
18264 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
18265
18266 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
18267
18268 Ok(())
18269 }
18270 }
18271
18272 pub struct MultipleHandleSubtypes<T0, T1, T2> {
18273 pub untyped: T0,
18274
18275 pub event: T1,
18276
18277 pub channel: T2,
18278 }
18279
18280 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
18281 for MultipleHandleSubtypes<T0, T1, T2>
18282 where
18283 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18284 ___E: ::fidl_next::fuchsia::HandleEncoder,
18285 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18286 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18287 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
18288 {
18289 #[inline]
18290 fn encode(
18291 self,
18292 encoder_: &mut ___E,
18293 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
18294 _: (),
18295 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18296 ::fidl_next::munge! {
18297 let crate::wire::MultipleHandleSubtypes {
18298
18299 untyped,
18300 event,
18301 channel,
18302
18303 } = out_;
18304 }
18305
18306 ::fidl_next::Encode::encode(self.untyped, encoder_, untyped, ())?;
18307
18308 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
18309
18310 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
18311
18312 Ok(())
18313 }
18314 }
18315
18316 pub struct MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5> {
18317 pub data0: T0,
18318
18319 pub handle0: T1,
18320
18321 pub data1: T2,
18322
18323 pub handle1: T3,
18324
18325 pub handle2: T4,
18326
18327 pub data2: T5,
18328 }
18329
18330 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
18331 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
18332 for MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5>
18333 where
18334 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18335 ___E: ::fidl_next::fuchsia::HandleEncoder,
18336 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18337 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18338 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18339 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
18340 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18341 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18342 {
18343 #[inline]
18344 fn encode(
18345 self,
18346 encoder_: &mut ___E,
18347 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
18348 _: (),
18349 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18350 ::fidl_next::munge! {
18351 let crate::wire::MultipleNonnullableHandles {
18352
18353 data0,
18354 handle0,
18355 data1,
18356 handle1,
18357 handle2,
18358 data2,
18359
18360 } = out_;
18361 }
18362
18363 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
18364
18365 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
18366
18367 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
18368
18369 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
18370
18371 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
18372
18373 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
18374
18375 Ok(())
18376 }
18377 }
18378
18379 pub struct MultipleNullableHandles<T0, T1, T2, T3, T4, T5> {
18380 pub data0: T0,
18381
18382 pub handle0: T1,
18383
18384 pub data1: T2,
18385
18386 pub handle1: T3,
18387
18388 pub handle2: T4,
18389
18390 pub data2: T5,
18391 }
18392
18393 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
18394 ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
18395 for MultipleNullableHandles<T0, T1, T2, T3, T4, T5>
18396 where
18397 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18398 ___E: ::fidl_next::fuchsia::HandleEncoder,
18399 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18400 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18401 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18402 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
18403 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
18404 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18405 {
18406 #[inline]
18407 fn encode(
18408 self,
18409 encoder_: &mut ___E,
18410 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
18411 _: (),
18412 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18413 ::fidl_next::munge! {
18414 let crate::wire::MultipleNullableHandles {
18415
18416 data0,
18417 handle0,
18418 data1,
18419 handle1,
18420 handle2,
18421 data2,
18422
18423 } = out_;
18424 }
18425
18426 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
18427
18428 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
18429
18430 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
18431
18432 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
18433
18434 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
18435
18436 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
18437
18438 Ok(())
18439 }
18440 }
18441
18442 pub struct NonnullableHandle<T0> {
18443 pub h: T0,
18444 }
18445
18446 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>
18447 for NonnullableHandle<T0>
18448 where
18449 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18450 ___E: ::fidl_next::fuchsia::HandleEncoder,
18451 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18452 {
18453 #[inline]
18454 fn encode(
18455 self,
18456 encoder_: &mut ___E,
18457 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
18458 _: (),
18459 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18460 ::fidl_next::munge! {
18461 let crate::wire::NonnullableHandle {
18462
18463 h,
18464
18465 } = out_;
18466 }
18467
18468 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18469
18470 Ok(())
18471 }
18472 }
18473
18474 pub struct NonnullableHandleArray<T0> {
18475 pub handles: T0,
18476 }
18477
18478 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
18479 for NonnullableHandleArray<T0>
18480 where
18481 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18482 ___E: ::fidl_next::fuchsia::HandleEncoder,
18483 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
18484 {
18485 #[inline]
18486 fn encode(
18487 self,
18488 encoder_: &mut ___E,
18489 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
18490 _: (),
18491 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18492 ::fidl_next::munge! {
18493 let crate::wire::NonnullableHandleArray {
18494
18495 handles,
18496
18497 } = out_;
18498 }
18499
18500 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
18501
18502 Ok(())
18503 }
18504 }
18505
18506 pub struct NullableHandle<T0> {
18507 pub h: T0,
18508 }
18509
18510 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NullableHandle, ___E> for NullableHandle<T0>
18511 where
18512 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18513 ___E: ::fidl_next::fuchsia::HandleEncoder,
18514 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18515 {
18516 #[inline]
18517 fn encode(
18518 self,
18519 encoder_: &mut ___E,
18520 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
18521 _: (),
18522 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18523 ::fidl_next::munge! {
18524 let crate::wire::NullableHandle {
18525
18526 h,
18527
18528 } = out_;
18529 }
18530
18531 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18532
18533 Ok(())
18534 }
18535 }
18536
18537 pub struct OutOfLineArrayOfNonnullableHandles<T0> {
18538 pub handles: T0,
18539 }
18540
18541 unsafe impl<___E, T0>
18542 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
18543 for OutOfLineArrayOfNonnullableHandles<T0>
18544 where
18545 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18546 ___E: ::fidl_next::Encoder,
18547 ___E: ::fidl_next::fuchsia::HandleEncoder,
18548 T0: ::fidl_next::Encode<
18549 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
18550 ___E,
18551 >,
18552 {
18553 #[inline]
18554 fn encode(
18555 self,
18556 encoder_: &mut ___E,
18557 out_: &mut ::core::mem::MaybeUninit<
18558 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
18559 >,
18560 _: (),
18561 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18562 ::fidl_next::munge! {
18563 let crate::wire::OutOfLineArrayOfNonnullableHandles {
18564
18565 handles,
18566
18567 } = out_;
18568 }
18569
18570 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
18571
18572 Ok(())
18573 }
18574 }
18575
18576 pub struct Sandwich6<T0, T1, T2> {
18577 pub before: T0,
18578
18579 pub the_union: T1,
18580
18581 pub after: T2,
18582 }
18583
18584 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>
18585 for Sandwich6<T0, T1, T2>
18586 where
18587 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18588 ___E: ::fidl_next::Encoder,
18589 ___E: ::fidl_next::fuchsia::HandleEncoder,
18590 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18591 T1: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
18592 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18593 {
18594 #[inline]
18595 fn encode(
18596 self,
18597 encoder_: &mut ___E,
18598 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
18599 _: (),
18600 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18601 ::fidl_next::munge! {
18602 let crate::wire::Sandwich6 {
18603
18604 before,
18605 the_union,
18606 after,
18607
18608 } = out_;
18609 }
18610
18611 ::fidl_next::Encode::encode(self.before, encoder_, before, ())?;
18612
18613 ::fidl_next::Encode::encode(self.the_union, encoder_, the_union, ())?;
18614
18615 ::fidl_next::Encode::encode(self.after, encoder_, after, ())?;
18616
18617 Ok(())
18618 }
18619 }
18620
18621 pub struct ShortStringThenHandle<T0, T1> {
18622 pub s: T0,
18623
18624 pub h: T1,
18625 }
18626
18627 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
18628 for ShortStringThenHandle<T0, T1>
18629 where
18630 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18631 ___E: ::fidl_next::Encoder,
18632 ___E: ::fidl_next::fuchsia::HandleEncoder,
18633 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18634 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18635 {
18636 #[inline]
18637 fn encode(
18638 self,
18639 encoder_: &mut ___E,
18640 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
18641 _: (),
18642 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18643 ::fidl_next::munge! {
18644 let crate::wire::ShortStringThenHandle {
18645
18646 s,
18647 h,
18648
18649 } = out_;
18650 }
18651
18652 ::fidl_next::Encode::encode(self.s, encoder_, s, 1)?;
18653
18654 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18655
18656 Ok(())
18657 }
18658 }
18659
18660 pub struct SingleHandle<T0> {
18661 pub h: T0,
18662 }
18663
18664 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleHandle, ___E> for SingleHandle<T0>
18665 where
18666 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18667 ___E: ::fidl_next::fuchsia::HandleEncoder,
18668 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18669 {
18670 #[inline]
18671 fn encode(
18672 self,
18673 encoder_: &mut ___E,
18674 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
18675 _: (),
18676 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18677 ::fidl_next::munge! {
18678 let crate::wire::SingleHandle {
18679
18680 h,
18681
18682 } = out_;
18683 }
18684
18685 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18686
18687 Ok(())
18688 }
18689 }
18690
18691 pub struct SingleOptionalHandle<T0> {
18692 pub h: T0,
18693 }
18694
18695 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
18696 for SingleOptionalHandle<T0>
18697 where
18698 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18699 ___E: ::fidl_next::fuchsia::HandleEncoder,
18700 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18701 {
18702 #[inline]
18703 fn encode(
18704 self,
18705 encoder_: &mut ___E,
18706 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
18707 _: (),
18708 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18709 ::fidl_next::munge! {
18710 let crate::wire::SingleOptionalHandle {
18711
18712 h,
18713
18714 } = out_;
18715 }
18716
18717 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18718
18719 Ok(())
18720 }
18721 }
18722
18723 pub struct StructOfEndpoints<T0, T1, T2, T3> {
18724 pub client_end: T0,
18725
18726 pub optional_client_end: T1,
18727
18728 pub server_end: T2,
18729
18730 pub optional_server_end: T3,
18731 }
18732
18733 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>
18734 for StructOfEndpoints<T0, T1, T2, T3>
18735 where
18736 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18737 ___E: ::fidl_next::fuchsia::HandleEncoder,
18738 T0: ::fidl_next::Encode<
18739 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
18740 ___E,
18741 >,
18742 T1: ::fidl_next::Encode<
18743 ::fidl_next::ClientEnd<
18744 crate::Protocol,
18745 ::fidl_next::wire::fuchsia::OptionalChannel,
18746 >,
18747 ___E,
18748 >,
18749 T2: ::fidl_next::Encode<
18750 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
18751 ___E,
18752 >,
18753 T3: ::fidl_next::Encode<
18754 ::fidl_next::ServerEnd<
18755 crate::Protocol,
18756 ::fidl_next::wire::fuchsia::OptionalChannel,
18757 >,
18758 ___E,
18759 >,
18760 {
18761 #[inline]
18762 fn encode(
18763 self,
18764 encoder_: &mut ___E,
18765 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
18766 _: (),
18767 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18768 ::fidl_next::munge! {
18769 let crate::wire::StructOfEndpoints {
18770
18771 client_end,
18772 optional_client_end,
18773 server_end,
18774 optional_server_end,
18775
18776 } = out_;
18777 }
18778
18779 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
18780
18781 ::fidl_next::Encode::encode(
18782 self.optional_client_end,
18783 encoder_,
18784 optional_client_end,
18785 (),
18786 )?;
18787
18788 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
18789
18790 ::fidl_next::Encode::encode(
18791 self.optional_server_end,
18792 encoder_,
18793 optional_server_end,
18794 (),
18795 )?;
18796
18797 Ok(())
18798 }
18799 }
18800
18801 pub struct StructOfOptionalUnionOfHandle<T0> {
18802 pub u: T0,
18803 }
18804
18805 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
18806 for StructOfOptionalUnionOfHandle<T0>
18807 where
18808 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18809 ___E: ::fidl_next::fuchsia::HandleEncoder,
18810 T0: ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>,
18811 {
18812 #[inline]
18813 fn encode(
18814 self,
18815 encoder_: &mut ___E,
18816 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
18817 _: (),
18818 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18819 ::fidl_next::munge! {
18820 let crate::wire::StructOfOptionalUnionOfHandle {
18821
18822 u,
18823
18824 } = out_;
18825 }
18826
18827 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
18828
18829 Ok(())
18830 }
18831 }
18832
18833 pub struct StructOfSimpleResourceTable<T0> {
18834 pub table: T0,
18835 }
18836
18837 unsafe impl<___E, T0>
18838 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
18839 for StructOfSimpleResourceTable<T0>
18840 where
18841 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18842 ___E: ::fidl_next::Encoder,
18843 ___E: ::fidl_next::fuchsia::HandleEncoder,
18844 T0: ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>,
18845 {
18846 #[inline]
18847 fn encode(
18848 self,
18849 encoder_: &mut ___E,
18850 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
18851 _: (),
18852 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18853 ::fidl_next::munge! {
18854 let crate::wire::StructOfSimpleResourceTable {
18855
18856 table,
18857
18858 } = out_;
18859 }
18860
18861 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
18862
18863 Ok(())
18864 }
18865 }
18866
18867 pub struct TableFieldInlinedHandleStruct<T0> {
18868 pub t: T0,
18869 }
18870
18871 unsafe impl<___E, T0>
18872 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
18873 for TableFieldInlinedHandleStruct<T0>
18874 where
18875 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18876 ___E: ::fidl_next::Encoder,
18877 ___E: ::fidl_next::fuchsia::HandleEncoder,
18878 T0: ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>,
18879 {
18880 #[inline]
18881 fn encode(
18882 self,
18883 encoder_: &mut ___E,
18884 out_: &mut ::core::mem::MaybeUninit<
18885 crate::wire::TableFieldInlinedHandleStruct<'static>,
18886 >,
18887 _: (),
18888 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18889 ::fidl_next::munge! {
18890 let crate::wire::TableFieldInlinedHandleStruct {
18891
18892 t,
18893
18894 } = out_;
18895 }
18896
18897 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18898
18899 Ok(())
18900 }
18901 }
18902
18903 pub struct TableFieldUnknownResourceStruct<T0> {
18904 pub t: T0,
18905 }
18906
18907 unsafe impl<___E, T0>
18908 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
18909 for TableFieldUnknownResourceStruct<T0>
18910 where
18911 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18912 ___E: ::fidl_next::Encoder,
18913 ___E: ::fidl_next::fuchsia::HandleEncoder,
18914 T0: ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>,
18915 {
18916 #[inline]
18917 fn encode(
18918 self,
18919 encoder_: &mut ___E,
18920 out_: &mut ::core::mem::MaybeUninit<
18921 crate::wire::TableFieldUnknownResourceStruct<'static>,
18922 >,
18923 _: (),
18924 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18925 ::fidl_next::munge! {
18926 let crate::wire::TableFieldUnknownResourceStruct {
18927
18928 t,
18929
18930 } = out_;
18931 }
18932
18933 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18934
18935 Ok(())
18936 }
18937 }
18938
18939 pub struct TableOfEndpoints<T0> {
18940 pub t: T0,
18941 }
18942
18943 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
18944 for TableOfEndpoints<T0>
18945 where
18946 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18947 ___E: ::fidl_next::Encoder,
18948 ___E: ::fidl_next::fuchsia::HandleEncoder,
18949 T0: ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>,
18950 {
18951 #[inline]
18952 fn encode(
18953 self,
18954 encoder_: &mut ___E,
18955 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
18956 _: (),
18957 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18958 ::fidl_next::munge! {
18959 let crate::wire::TableOfEndpoints {
18960
18961 t,
18962
18963 } = out_;
18964 }
18965
18966 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18967
18968 Ok(())
18969 }
18970 }
18971
18972 pub struct TableUnionWithVectorReservedSandwichStruct<T0> {
18973 pub table: T0,
18974 }
18975
18976 unsafe impl<___E, T0>
18977 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
18978 for TableUnionWithVectorReservedSandwichStruct<T0>
18979 where
18980 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18981 ___E: ::fidl_next::Encoder,
18982 ___E: ::fidl_next::fuchsia::HandleEncoder,
18983 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>,
18984 {
18985 #[inline]
18986 fn encode(
18987 self,
18988 encoder_: &mut ___E,
18989 out_: &mut ::core::mem::MaybeUninit<
18990 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
18991 >,
18992 _: (),
18993 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18994 ::fidl_next::munge! {
18995 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
18996
18997 table,
18998
18999 } = out_;
19000 }
19001
19002 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19003
19004 Ok(())
19005 }
19006 }
19007
19008 pub struct TableUnionWithVectorStructSandwichStruct<T0> {
19009 pub table: T0,
19010 }
19011
19012 unsafe impl<___E, T0>
19013 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
19014 for TableUnionWithVectorStructSandwichStruct<T0>
19015 where
19016 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19017 ___E: ::fidl_next::Encoder,
19018 ___E: ::fidl_next::fuchsia::HandleEncoder,
19019 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>,
19020 {
19021 #[inline]
19022 fn encode(
19023 self,
19024 encoder_: &mut ___E,
19025 out_: &mut ::core::mem::MaybeUninit<
19026 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
19027 >,
19028 _: (),
19029 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19030 ::fidl_next::munge! {
19031 let crate::wire::TableUnionWithVectorStructSandwichStruct {
19032
19033 table,
19034
19035 } = out_;
19036 }
19037
19038 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19039
19040 Ok(())
19041 }
19042 }
19043
19044 pub struct TestFlexibleResourceXUnionInStruct<T0> {
19045 pub xu: T0,
19046 }
19047
19048 unsafe impl<___E, T0>
19049 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
19050 for TestFlexibleResourceXUnionInStruct<T0>
19051 where
19052 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19053 ___E: ::fidl_next::Encoder,
19054 ___E: ::fidl_next::fuchsia::HandleEncoder,
19055 T0: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
19056 {
19057 #[inline]
19058 fn encode(
19059 self,
19060 encoder_: &mut ___E,
19061 out_: &mut ::core::mem::MaybeUninit<
19062 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
19063 >,
19064 _: (),
19065 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19066 ::fidl_next::munge! {
19067 let crate::wire::TestFlexibleResourceXUnionInStruct {
19068
19069 xu,
19070
19071 } = out_;
19072 }
19073
19074 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19075
19076 Ok(())
19077 }
19078 }
19079
19080 pub struct TestOptionalFlexibleResourceXUnionInStruct<T0> {
19081 pub xu: T0,
19082 }
19083
19084 unsafe impl<___E, T0>
19085 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
19086 for TestOptionalFlexibleResourceXUnionInStruct<T0>
19087 where
19088 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19089 ___E: ::fidl_next::Encoder,
19090 ___E: ::fidl_next::fuchsia::HandleEncoder,
19091 T0: ::fidl_next::Encode<crate::wire_optional::SampleResourceXUnion<'static>, ___E>,
19092 {
19093 #[inline]
19094 fn encode(
19095 self,
19096 encoder_: &mut ___E,
19097 out_: &mut ::core::mem::MaybeUninit<
19098 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
19099 >,
19100 _: (),
19101 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19102 ::fidl_next::munge! {
19103 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
19104
19105 xu,
19106
19107 } = out_;
19108 }
19109
19110 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19111
19112 Ok(())
19113 }
19114 }
19115
19116 pub struct TestOptionalStrictResourceXUnionInStruct<T0> {
19117 pub xu: T0,
19118 }
19119
19120 unsafe impl<___E, T0>
19121 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
19122 for TestOptionalStrictResourceXUnionInStruct<T0>
19123 where
19124 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19125 ___E: ::fidl_next::Encoder,
19126 ___E: ::fidl_next::fuchsia::HandleEncoder,
19127 T0: ::fidl_next::Encode<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>,
19128 {
19129 #[inline]
19130 fn encode(
19131 self,
19132 encoder_: &mut ___E,
19133 out_: &mut ::core::mem::MaybeUninit<
19134 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
19135 >,
19136 _: (),
19137 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19138 ::fidl_next::munge! {
19139 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
19140
19141 xu,
19142
19143 } = out_;
19144 }
19145
19146 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19147
19148 Ok(())
19149 }
19150 }
19151
19152 pub struct TestPackageResolverResolveRequest<T0, T1, T2, T3> {
19153 pub package_url: T0,
19154
19155 pub selectors: T1,
19156
19157 pub update_policy: T2,
19158
19159 pub this_should_be_a_handle: T3,
19160 }
19161
19162 unsafe impl<___E, T0, T1, T2, T3>
19163 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
19164 for TestPackageResolverResolveRequest<T0, T1, T2, T3>
19165 where
19166 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19167 ___E: ::fidl_next::Encoder,
19168 ___E: ::fidl_next::fuchsia::HandleEncoder,
19169 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19170 T1: ::fidl_next::Encode<
19171 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
19172 ___E,
19173 >,
19174 T2: ::fidl_next::Encode<crate::wire::UpdatePolicy, ___E>,
19175 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19176 {
19177 #[inline]
19178 fn encode(
19179 self,
19180 encoder_: &mut ___E,
19181 out_: &mut ::core::mem::MaybeUninit<
19182 crate::wire::TestPackageResolverResolveRequest<'static>,
19183 >,
19184 _: (),
19185 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19186 ::fidl_next::munge! {
19187 let crate::wire::TestPackageResolverResolveRequest {
19188
19189 package_url,
19190 selectors,
19191 update_policy,
19192 this_should_be_a_handle,
19193
19194 } = out_;
19195 }
19196
19197 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
19198
19199 ::fidl_next::Encode::encode(
19200 self.selectors,
19201 encoder_,
19202 selectors,
19203 (4294967295, 4294967295),
19204 )?;
19205
19206 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
19207
19208 ::fidl_next::Encode::encode(
19209 self.this_should_be_a_handle,
19210 encoder_,
19211 this_should_be_a_handle,
19212 (),
19213 )?;
19214
19215 Ok(())
19216 }
19217 }
19218
19219 pub struct TestStrictResourceXUnionInStruct<T0> {
19220 pub xu: T0,
19221 }
19222
19223 unsafe impl<___E, T0>
19224 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
19225 for TestStrictResourceXUnionInStruct<T0>
19226 where
19227 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19228 ___E: ::fidl_next::Encoder,
19229 ___E: ::fidl_next::fuchsia::HandleEncoder,
19230 T0: ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
19231 {
19232 #[inline]
19233 fn encode(
19234 self,
19235 encoder_: &mut ___E,
19236 out_: &mut ::core::mem::MaybeUninit<
19237 crate::wire::TestStrictResourceXUnionInStruct<'static>,
19238 >,
19239 _: (),
19240 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19241 ::fidl_next::munge! {
19242 let crate::wire::TestStrictResourceXUnionInStruct {
19243
19244 xu,
19245
19246 } = out_;
19247 }
19248
19249 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19250
19251 Ok(())
19252 }
19253 }
19254
19255 pub struct UnboundedNonnullableVectorOfHandles<T0> {
19256 pub vh0: T0,
19257 }
19258
19259 unsafe impl<___E, T0>
19260 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
19261 for UnboundedNonnullableVectorOfHandles<T0>
19262 where
19263 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19264 ___E: ::fidl_next::Encoder,
19265 ___E: ::fidl_next::fuchsia::HandleEncoder,
19266 T0: ::fidl_next::Encode<
19267 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19268 ___E,
19269 >,
19270 {
19271 #[inline]
19272 fn encode(
19273 self,
19274 encoder_: &mut ___E,
19275 out_: &mut ::core::mem::MaybeUninit<
19276 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
19277 >,
19278 _: (),
19279 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19280 ::fidl_next::munge! {
19281 let crate::wire::UnboundedNonnullableVectorOfHandles {
19282
19283 vh0,
19284
19285 } = out_;
19286 }
19287
19288 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
19289
19290 Ok(())
19291 }
19292 }
19293
19294 pub struct UnboundedNullableVectorOfHandles<T0> {
19295 pub vh0: T0,
19296 }
19297
19298 unsafe impl<___E, T0>
19299 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
19300 for UnboundedNullableVectorOfHandles<T0>
19301 where
19302 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19303 ___E: ::fidl_next::Encoder,
19304 ___E: ::fidl_next::fuchsia::HandleEncoder,
19305 T0: ::fidl_next::Encode<
19306 ::fidl_next::wire::OptionalVector<
19307 'static,
19308 ::fidl_next::wire::fuchsia::NullableHandle,
19309 >,
19310 ___E,
19311 >,
19312 {
19313 #[inline]
19314 fn encode(
19315 self,
19316 encoder_: &mut ___E,
19317 out_: &mut ::core::mem::MaybeUninit<
19318 crate::wire::UnboundedNullableVectorOfHandles<'static>,
19319 >,
19320 _: (),
19321 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19322 ::fidl_next::munge! {
19323 let crate::wire::UnboundedNullableVectorOfHandles {
19324
19325 vh0,
19326
19327 } = out_;
19328 }
19329
19330 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
19331
19332 Ok(())
19333 }
19334 }
19335
19336 pub struct UnionOfEndpoints<T0> {
19337 pub u: T0,
19338 }
19339
19340 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
19341 for UnionOfEndpoints<T0>
19342 where
19343 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19344 ___E: ::fidl_next::Encoder,
19345 ___E: ::fidl_next::fuchsia::HandleEncoder,
19346 T0: ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
19347 {
19348 #[inline]
19349 fn encode(
19350 self,
19351 encoder_: &mut ___E,
19352 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
19353 _: (),
19354 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19355 ::fidl_next::munge! {
19356 let crate::wire::UnionOfEndpoints {
19357
19358 u,
19359
19360 } = out_;
19361 }
19362
19363 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19364
19365 Ok(())
19366 }
19367 }
19368
19369 pub struct VectorOfArrayOfEventInStructWithDefaultRights<T0> {
19370 pub h: T0,
19371 }
19372
19373 unsafe impl<___E, T0>
19374 ::fidl_next::Encode<
19375 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
19376 ___E,
19377 > for VectorOfArrayOfEventInStructWithDefaultRights<T0>
19378 where
19379 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19380 ___E: ::fidl_next::Encoder,
19381 ___E: ::fidl_next::fuchsia::HandleEncoder,
19382 T0: ::fidl_next::Encode<
19383 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
19384 ___E,
19385 >,
19386 {
19387 #[inline]
19388 fn encode(
19389 self,
19390 encoder_: &mut ___E,
19391 out_: &mut ::core::mem::MaybeUninit<
19392 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
19393 >,
19394 _: (),
19395 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19396 ::fidl_next::munge! {
19397 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
19398
19399 h,
19400
19401 } = out_;
19402 }
19403
19404 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
19405
19406 Ok(())
19407 }
19408 }
19409
19410 pub struct VectorOfArrayOfEventInStructWithReducedRights<T0> {
19411 pub h: T0,
19412 }
19413
19414 unsafe impl<___E, T0>
19415 ::fidl_next::Encode<
19416 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
19417 ___E,
19418 > for VectorOfArrayOfEventInStructWithReducedRights<T0>
19419 where
19420 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19421 ___E: ::fidl_next::Encoder,
19422 ___E: ::fidl_next::fuchsia::HandleEncoder,
19423 T0: ::fidl_next::Encode<
19424 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
19425 ___E,
19426 >,
19427 {
19428 #[inline]
19429 fn encode(
19430 self,
19431 encoder_: &mut ___E,
19432 out_: &mut ::core::mem::MaybeUninit<
19433 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
19434 >,
19435 _: (),
19436 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19437 ::fidl_next::munge! {
19438 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
19439
19440 h,
19441
19442 } = out_;
19443 }
19444
19445 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
19446
19447 Ok(())
19448 }
19449 }
19450
19451 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<T0> {
19452 pub t: T0,
19453 }
19454
19455 unsafe impl<___E, T0>
19456 ::fidl_next::Encode<
19457 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
19458 ___E,
19459 > for VectorOfArrayOfEventInTableWithReducedRightsStruct<T0>
19460 where
19461 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19462 ___E: ::fidl_next::Encoder,
19463 ___E: ::fidl_next::fuchsia::HandleEncoder,
19464 T0: ::fidl_next::Encode<
19465 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
19466 ___E,
19467 >,
19468 {
19469 #[inline]
19470 fn encode(
19471 self,
19472 encoder_: &mut ___E,
19473 out_: &mut ::core::mem::MaybeUninit<
19474 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
19475 >,
19476 _: (),
19477 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19478 ::fidl_next::munge! {
19479 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
19480
19481 t,
19482
19483 } = out_;
19484 }
19485
19486 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19487
19488 Ok(())
19489 }
19490 }
19491
19492 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0> {
19493 pub u: T0,
19494 }
19495
19496 unsafe impl<___E, T0>
19497 ::fidl_next::Encode<
19498 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
19499 ___E,
19500 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0>
19501 where
19502 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19503 ___E: ::fidl_next::Encoder,
19504 ___E: ::fidl_next::fuchsia::HandleEncoder,
19505 T0: ::fidl_next::Encode<
19506 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
19507 ___E,
19508 >,
19509 {
19510 #[inline]
19511 fn encode(
19512 self,
19513 encoder_: &mut ___E,
19514 out_: &mut ::core::mem::MaybeUninit<
19515 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
19516 >,
19517 _: (),
19518 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19519 ::fidl_next::munge! {
19520 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
19521
19522 u,
19523
19524 } = out_;
19525 }
19526
19527 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19528
19529 Ok(())
19530 }
19531 }
19532
19533 pub struct VectorOfHandles<T0> {
19534 pub v: T0,
19535 }
19536
19537 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
19538 for VectorOfHandles<T0>
19539 where
19540 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19541 ___E: ::fidl_next::Encoder,
19542 ___E: ::fidl_next::fuchsia::HandleEncoder,
19543 T0: ::fidl_next::Encode<
19544 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19545 ___E,
19546 >,
19547 {
19548 #[inline]
19549 fn encode(
19550 self,
19551 encoder_: &mut ___E,
19552 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
19553 _: (),
19554 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19555 ::fidl_next::munge! {
19556 let crate::wire::VectorOfHandles {
19557
19558 v,
19559
19560 } = out_;
19561 }
19562
19563 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
19564
19565 Ok(())
19566 }
19567 }
19568
19569 pub struct VectorOfOptionalHandles<T0> {
19570 pub v: T0,
19571 }
19572
19573 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
19574 for VectorOfOptionalHandles<T0>
19575 where
19576 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19577 ___E: ::fidl_next::Encoder,
19578 ___E: ::fidl_next::fuchsia::HandleEncoder,
19579 T0: ::fidl_next::Encode<
19580 ::fidl_next::wire::Vector<
19581 'static,
19582 ::fidl_next::wire::fuchsia::OptionalNullableHandle,
19583 >,
19584 ___E,
19585 >,
19586 {
19587 #[inline]
19588 fn encode(
19589 self,
19590 encoder_: &mut ___E,
19591 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
19592 _: (),
19593 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19594 ::fidl_next::munge! {
19595 let crate::wire::VectorOfOptionalHandles {
19596
19597 v,
19598
19599 } = out_;
19600 }
19601
19602 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
19603
19604 Ok(())
19605 }
19606 }
19607
19608 pub struct VectorOfUpTo2Handles<T0> {
19609 pub v: T0,
19610 }
19611
19612 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
19613 for VectorOfUpTo2Handles<T0>
19614 where
19615 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19616 ___E: ::fidl_next::Encoder,
19617 ___E: ::fidl_next::fuchsia::HandleEncoder,
19618 T0: ::fidl_next::Encode<
19619 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19620 ___E,
19621 >,
19622 {
19623 #[inline]
19624 fn encode(
19625 self,
19626 encoder_: &mut ___E,
19627 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
19628 _: (),
19629 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19630 ::fidl_next::munge! {
19631 let crate::wire::VectorOfUpTo2Handles {
19632
19633 v,
19634
19635 } = out_;
19636 }
19637
19638 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
19639
19640 Ok(())
19641 }
19642 }
19643}
19644
19645pub use self::natural::*;
19646
19647pub use fidl_next_common_test_conformance::*;
19648
19649pub mod compat {
19651
19652 pub use fidl_next_common_test_conformance::compat::*;
19653
19654 impl ::fidl_next::CompatFrom<crate::AlternatingHandlesAndFailures>
19655 for ::fidl_test_conformance::AlternatingHandlesAndFailures
19656 {
19657 #[inline]
19658 fn compat_from(value: crate::AlternatingHandlesAndFailures) -> Self {
19659 Self {
19660 h1: ::fidl_next::CompatFrom::compat_from(value.h1),
19661
19662 failure_trigger1: ::fidl_next::CompatFrom::compat_from(value.failure_trigger1),
19663
19664 h2: ::fidl_next::CompatFrom::compat_from(value.h2),
19665
19666 failure_trigger2: ::fidl_next::CompatFrom::compat_from(value.failure_trigger2),
19667
19668 h3: ::fidl_next::CompatFrom::compat_from(value.h3),
19669 }
19670 }
19671 }
19672
19673 impl ::fidl_next::CompatFrom<::fidl_test_conformance::AlternatingHandlesAndFailures>
19674 for crate::AlternatingHandlesAndFailures
19675 {
19676 #[inline]
19677 fn compat_from(value: ::fidl_test_conformance::AlternatingHandlesAndFailures) -> Self {
19678 Self {
19679 h1: ::fidl_next::CompatFrom::compat_from(value.h1),
19680
19681 failure_trigger1: ::fidl_next::CompatFrom::compat_from(value.failure_trigger1),
19682
19683 h2: ::fidl_next::CompatFrom::compat_from(value.h2),
19684
19685 failure_trigger2: ::fidl_next::CompatFrom::compat_from(value.failure_trigger2),
19686
19687 h3: ::fidl_next::CompatFrom::compat_from(value.h3),
19688 }
19689 }
19690 }
19691
19692 impl ::fidl_next::CompatFrom<crate::ArrayOfArrayOfNonnullableHandles>
19693 for ::fidl_test_conformance::ArrayOfArrayOfNonnullableHandles
19694 {
19695 #[inline]
19696 fn compat_from(value: crate::ArrayOfArrayOfNonnullableHandles) -> Self {
19697 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
19698 }
19699 }
19700
19701 impl ::fidl_next::CompatFrom<::fidl_test_conformance::ArrayOfArrayOfNonnullableHandles>
19702 for crate::ArrayOfArrayOfNonnullableHandles
19703 {
19704 #[inline]
19705 fn compat_from(value: ::fidl_test_conformance::ArrayOfArrayOfNonnullableHandles) -> Self {
19706 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
19707 }
19708 }
19709
19710 impl ::fidl_next::CompatFrom<crate::ArrayOfHandles> for ::fidl_test_conformance::ArrayOfHandles {
19711 #[inline]
19712 fn compat_from(value: crate::ArrayOfHandles) -> Self {
19713 Self { a: ::fidl_next::CompatFrom::compat_from(value.a) }
19714 }
19715 }
19716
19717 impl ::fidl_next::CompatFrom<::fidl_test_conformance::ArrayOfHandles> for crate::ArrayOfHandles {
19718 #[inline]
19719 fn compat_from(value: ::fidl_test_conformance::ArrayOfHandles) -> Self {
19720 Self { a: ::fidl_next::CompatFrom::compat_from(value.a) }
19721 }
19722 }
19723
19724 impl ::fidl_next::CompatFrom<crate::ArrayOfNonnullableHandles>
19725 for ::fidl_test_conformance::ArrayOfNonnullableHandles
19726 {
19727 #[inline]
19728 fn compat_from(value: crate::ArrayOfNonnullableHandles) -> Self {
19729 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
19730 }
19731 }
19732
19733 impl ::fidl_next::CompatFrom<::fidl_test_conformance::ArrayOfNonnullableHandles>
19734 for crate::ArrayOfNonnullableHandles
19735 {
19736 #[inline]
19737 fn compat_from(value: ::fidl_test_conformance::ArrayOfNonnullableHandles) -> Self {
19738 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
19739 }
19740 }
19741
19742 impl ::fidl_next::CompatFrom<crate::ArrayOfNullableHandles>
19743 for ::fidl_test_conformance::ArrayOfNullableHandles
19744 {
19745 #[inline]
19746 fn compat_from(value: crate::ArrayOfNullableHandles) -> Self {
19747 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
19748 }
19749 }
19750
19751 impl ::fidl_next::CompatFrom<::fidl_test_conformance::ArrayOfNullableHandles>
19752 for crate::ArrayOfNullableHandles
19753 {
19754 #[inline]
19755 fn compat_from(value: ::fidl_test_conformance::ArrayOfNullableHandles) -> Self {
19756 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
19757 }
19758 }
19759
19760 impl ::fidl_next::CompatFrom<crate::ArrayOfOptionalHandles>
19761 for ::fidl_test_conformance::ArrayOfOptionalHandles
19762 {
19763 #[inline]
19764 fn compat_from(value: crate::ArrayOfOptionalHandles) -> Self {
19765 Self { a: ::fidl_next::CompatFrom::compat_from(value.a) }
19766 }
19767 }
19768
19769 impl ::fidl_next::CompatFrom<::fidl_test_conformance::ArrayOfOptionalHandles>
19770 for crate::ArrayOfOptionalHandles
19771 {
19772 #[inline]
19773 fn compat_from(value: ::fidl_test_conformance::ArrayOfOptionalHandles) -> Self {
19774 Self { a: ::fidl_next::CompatFrom::compat_from(value.a) }
19775 }
19776 }
19777
19778 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInStructWithDefaultRights>
19779 for ::fidl_test_conformance::ArrayOfVectorOfEventInStructWithDefaultRights
19780 {
19781 #[inline]
19782 fn compat_from(value: crate::ArrayOfVectorOfEventInStructWithDefaultRights) -> Self {
19783 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
19784 }
19785 }
19786
19787 impl
19788 ::fidl_next::CompatFrom<
19789 ::fidl_test_conformance::ArrayOfVectorOfEventInStructWithDefaultRights,
19790 > for crate::ArrayOfVectorOfEventInStructWithDefaultRights
19791 {
19792 #[inline]
19793 fn compat_from(
19794 value: ::fidl_test_conformance::ArrayOfVectorOfEventInStructWithDefaultRights,
19795 ) -> Self {
19796 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
19797 }
19798 }
19799
19800 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInStructWithReducedRights>
19801 for ::fidl_test_conformance::ArrayOfVectorOfEventInStructWithReducedRights
19802 {
19803 #[inline]
19804 fn compat_from(value: crate::ArrayOfVectorOfEventInStructWithReducedRights) -> Self {
19805 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
19806 }
19807 }
19808
19809 impl
19810 ::fidl_next::CompatFrom<
19811 ::fidl_test_conformance::ArrayOfVectorOfEventInStructWithReducedRights,
19812 > for crate::ArrayOfVectorOfEventInStructWithReducedRights
19813 {
19814 #[inline]
19815 fn compat_from(
19816 value: ::fidl_test_conformance::ArrayOfVectorOfEventInStructWithReducedRights,
19817 ) -> Self {
19818 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
19819 }
19820 }
19821
19822 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInTableWithDefaultRights>
19823 for ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithDefaultRights
19824 {
19825 fn compat_from(value: crate::ArrayOfVectorOfEventInTableWithDefaultRights) -> Self {
19826 Self {
19827 h: ::fidl_next::CompatFrom::compat_from(value.h),
19828
19829 __source_breaking: ::fidl::marker::SourceBreaking,
19830 }
19831 }
19832 }
19833
19834 impl
19835 ::fidl_next::CompatFrom<
19836 ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithDefaultRights,
19837 > for crate::ArrayOfVectorOfEventInTableWithDefaultRights
19838 {
19839 fn compat_from(
19840 value: ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithDefaultRights,
19841 ) -> Self {
19842 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
19843 }
19844 }
19845
19846 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInTableWithDefaultRightsStruct>
19847 for ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithDefaultRightsStruct
19848 {
19849 #[inline]
19850 fn compat_from(value: crate::ArrayOfVectorOfEventInTableWithDefaultRightsStruct) -> Self {
19851 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
19852 }
19853 }
19854
19855 impl
19856 ::fidl_next::CompatFrom<
19857 ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
19858 > for crate::ArrayOfVectorOfEventInTableWithDefaultRightsStruct
19859 {
19860 #[inline]
19861 fn compat_from(
19862 value: ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithDefaultRightsStruct,
19863 ) -> Self {
19864 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
19865 }
19866 }
19867
19868 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInTableWithReducedRights>
19869 for ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithReducedRights
19870 {
19871 fn compat_from(value: crate::ArrayOfVectorOfEventInTableWithReducedRights) -> Self {
19872 Self {
19873 h: ::fidl_next::CompatFrom::compat_from(value.h),
19874
19875 __source_breaking: ::fidl::marker::SourceBreaking,
19876 }
19877 }
19878 }
19879
19880 impl
19881 ::fidl_next::CompatFrom<
19882 ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithReducedRights,
19883 > for crate::ArrayOfVectorOfEventInTableWithReducedRights
19884 {
19885 fn compat_from(
19886 value: ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithReducedRights,
19887 ) -> Self {
19888 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
19889 }
19890 }
19891
19892 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInTableWithReducedRightsStruct>
19893 for ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithReducedRightsStruct
19894 {
19895 #[inline]
19896 fn compat_from(value: crate::ArrayOfVectorOfEventInTableWithReducedRightsStruct) -> Self {
19897 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
19898 }
19899 }
19900
19901 impl
19902 ::fidl_next::CompatFrom<
19903 ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithReducedRightsStruct,
19904 > for crate::ArrayOfVectorOfEventInTableWithReducedRightsStruct
19905 {
19906 #[inline]
19907 fn compat_from(
19908 value: ::fidl_test_conformance::ArrayOfVectorOfEventInTableWithReducedRightsStruct,
19909 ) -> Self {
19910 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
19911 }
19912 }
19913
19914 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInUnionWithDefaultRights>
19915 for ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithDefaultRights
19916 {
19917 fn compat_from(value: crate::ArrayOfVectorOfEventInUnionWithDefaultRights) -> Self {
19918 match value {
19919 crate::ArrayOfVectorOfEventInUnionWithDefaultRights::H(value) => {
19920 Self::H(::fidl_next::CompatFrom::compat_from(value))
19921 }
19922 }
19923 }
19924 }
19925
19926 impl
19927 ::fidl_next::CompatFrom<
19928 ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithDefaultRights,
19929 > for crate::ArrayOfVectorOfEventInUnionWithDefaultRights
19930 {
19931 fn compat_from(
19932 value: ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithDefaultRights,
19933 ) -> Self {
19934 match value {
19935 ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithDefaultRights::H(value) => {
19936 Self::H(::fidl_next::CompatFrom::compat_from(value))
19937 }
19938 }
19939 }
19940 }
19941
19942 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct>
19943 for ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
19944 {
19945 #[inline]
19946 fn compat_from(value: crate::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct) -> Self {
19947 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
19948 }
19949 }
19950
19951 impl
19952 ::fidl_next::CompatFrom<
19953 ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
19954 > for crate::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
19955 {
19956 #[inline]
19957 fn compat_from(
19958 value: ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct,
19959 ) -> Self {
19960 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
19961 }
19962 }
19963
19964 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInUnionWithReducedRights>
19965 for ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithReducedRights
19966 {
19967 fn compat_from(value: crate::ArrayOfVectorOfEventInUnionWithReducedRights) -> Self {
19968 match value {
19969 crate::ArrayOfVectorOfEventInUnionWithReducedRights::H(value) => {
19970 Self::H(::fidl_next::CompatFrom::compat_from(value))
19971 }
19972 }
19973 }
19974 }
19975
19976 impl
19977 ::fidl_next::CompatFrom<
19978 ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithReducedRights,
19979 > for crate::ArrayOfVectorOfEventInUnionWithReducedRights
19980 {
19981 fn compat_from(
19982 value: ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithReducedRights,
19983 ) -> Self {
19984 match value {
19985 ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithReducedRights::H(value) => {
19986 Self::H(::fidl_next::CompatFrom::compat_from(value))
19987 }
19988 }
19989 }
19990 }
19991
19992 impl ::fidl_next::CompatFrom<crate::ArrayOfVectorOfEventInUnionWithReducedRightsStruct>
19993 for ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithReducedRightsStruct
19994 {
19995 #[inline]
19996 fn compat_from(value: crate::ArrayOfVectorOfEventInUnionWithReducedRightsStruct) -> Self {
19997 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
19998 }
19999 }
20000
20001 impl
20002 ::fidl_next::CompatFrom<
20003 ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
20004 > for crate::ArrayOfVectorOfEventInUnionWithReducedRightsStruct
20005 {
20006 #[inline]
20007 fn compat_from(
20008 value: ::fidl_test_conformance::ArrayOfVectorOfEventInUnionWithReducedRightsStruct,
20009 ) -> Self {
20010 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
20011 }
20012 }
20013
20014 impl ::fidl_next::CompatFrom<crate::Bounded32NonnullableVectorOfHandles>
20015 for ::fidl_test_conformance::Bounded32NonnullableVectorOfHandles
20016 {
20017 #[inline]
20018 fn compat_from(value: crate::Bounded32NonnullableVectorOfHandles) -> Self {
20019 Self { vh0: ::fidl_next::CompatFrom::compat_from(value.vh0) }
20020 }
20021 }
20022
20023 impl ::fidl_next::CompatFrom<::fidl_test_conformance::Bounded32NonnullableVectorOfHandles>
20024 for crate::Bounded32NonnullableVectorOfHandles
20025 {
20026 #[inline]
20027 fn compat_from(
20028 value: ::fidl_test_conformance::Bounded32NonnullableVectorOfHandles,
20029 ) -> Self {
20030 Self { vh0: ::fidl_next::CompatFrom::compat_from(value.vh0) }
20031 }
20032 }
20033
20034 impl ::fidl_next::CompatFrom<crate::Bounded32NullableVectorOfHandles>
20035 for ::fidl_test_conformance::Bounded32NullableVectorOfHandles
20036 {
20037 #[inline]
20038 fn compat_from(value: crate::Bounded32NullableVectorOfHandles) -> Self {
20039 Self { vh0: ::fidl_next::CompatFrom::compat_from(value.vh0) }
20040 }
20041 }
20042
20043 impl ::fidl_next::CompatFrom<::fidl_test_conformance::Bounded32NullableVectorOfHandles>
20044 for crate::Bounded32NullableVectorOfHandles
20045 {
20046 #[inline]
20047 fn compat_from(value: ::fidl_test_conformance::Bounded32NullableVectorOfHandles) -> Self {
20048 Self { vh0: ::fidl_next::CompatFrom::compat_from(value.vh0) }
20049 }
20050 }
20051
20052 impl ::fidl_next::CompatFrom<crate::BoxOfSingleHandle>
20053 for ::fidl_test_conformance::BoxOfSingleHandle
20054 {
20055 #[inline]
20056 fn compat_from(value: crate::BoxOfSingleHandle) -> Self {
20057 Self { b: ::fidl_next::CompatFrom::compat_from(value.b) }
20058 }
20059 }
20060
20061 impl ::fidl_next::CompatFrom<::fidl_test_conformance::BoxOfSingleHandle>
20062 for crate::BoxOfSingleHandle
20063 {
20064 #[inline]
20065 fn compat_from(value: ::fidl_test_conformance::BoxOfSingleHandle) -> Self {
20066 Self { b: ::fidl_next::CompatFrom::compat_from(value.b) }
20067 }
20068 }
20069
20070 impl ::fidl_next::CompatFrom<crate::BoxOfSingleOptionalHandle>
20071 for ::fidl_test_conformance::BoxOfSingleOptionalHandle
20072 {
20073 #[inline]
20074 fn compat_from(value: crate::BoxOfSingleOptionalHandle) -> Self {
20075 Self { b: ::fidl_next::CompatFrom::compat_from(value.b) }
20076 }
20077 }
20078
20079 impl ::fidl_next::CompatFrom<::fidl_test_conformance::BoxOfSingleOptionalHandle>
20080 for crate::BoxOfSingleOptionalHandle
20081 {
20082 #[inline]
20083 fn compat_from(value: ::fidl_test_conformance::BoxOfSingleOptionalHandle) -> Self {
20084 Self { b: ::fidl_next::CompatFrom::compat_from(value.b) }
20085 }
20086 }
20087
20088 impl ::fidl_next::CompatFrom<crate::LaunchInfo> for ::fidl_test_conformance::LaunchInfo {
20089 #[inline]
20090 fn compat_from(value: crate::LaunchInfo) -> Self {
20091 Self {
20092 url: ::fidl_next::CompatFrom::compat_from(value.url),
20093
20094 arguments: ::fidl_next::CompatFrom::compat_from(value.arguments),
20095
20096 out: ::fidl_next::CompatFrom::compat_from(value.out),
20097
20098 err: ::fidl_next::CompatFrom::compat_from(value.err),
20099
20100 directory_request: ::fidl_next::CompatFrom::compat_from(value.directory_request),
20101
20102 flat_namespace: ::fidl_next::CompatFrom::compat_from(value.flat_namespace),
20103
20104 additional_services: ::fidl_next::CompatFrom::compat_from(
20105 value.additional_services,
20106 ),
20107 }
20108 }
20109 }
20110
20111 impl ::fidl_next::CompatFrom<::fidl_test_conformance::LaunchInfo> for crate::LaunchInfo {
20112 #[inline]
20113 fn compat_from(value: ::fidl_test_conformance::LaunchInfo) -> Self {
20114 Self {
20115 url: ::fidl_next::CompatFrom::compat_from(value.url),
20116
20117 arguments: ::fidl_next::CompatFrom::compat_from(value.arguments),
20118
20119 out: ::fidl_next::CompatFrom::compat_from(value.out),
20120
20121 err: ::fidl_next::CompatFrom::compat_from(value.err),
20122
20123 directory_request: ::fidl_next::CompatFrom::compat_from(value.directory_request),
20124
20125 flat_namespace: ::fidl_next::CompatFrom::compat_from(value.flat_namespace),
20126
20127 additional_services: ::fidl_next::CompatFrom::compat_from(
20128 value.additional_services,
20129 ),
20130 }
20131 }
20132 }
20133
20134 impl ::fidl_next::CompatFrom<crate::CreateComponentRequest>
20135 for ::fidl_test_conformance::CreateComponentRequest
20136 {
20137 #[inline]
20138 fn compat_from(value: crate::CreateComponentRequest) -> Self {
20139 Self {
20140 launch_info: ::fidl_next::CompatFrom::compat_from(value.launch_info),
20141
20142 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
20143 }
20144 }
20145 }
20146
20147 impl ::fidl_next::CompatFrom<::fidl_test_conformance::CreateComponentRequest>
20148 for crate::CreateComponentRequest
20149 {
20150 #[inline]
20151 fn compat_from(value: ::fidl_test_conformance::CreateComponentRequest) -> Self {
20152 Self {
20153 launch_info: ::fidl_next::CompatFrom::compat_from(value.launch_info),
20154
20155 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
20156 }
20157 }
20158 }
20159
20160 impl ::fidl_next::CompatFrom<crate::EmptyResourceTable>
20161 for ::fidl_test_conformance::EmptyResourceTable
20162 {
20163 fn compat_from(value: crate::EmptyResourceTable) -> Self {
20164 Self { __source_breaking: ::fidl::marker::SourceBreaking }
20165 }
20166 }
20167
20168 impl ::fidl_next::CompatFrom<::fidl_test_conformance::EmptyResourceTable>
20169 for crate::EmptyResourceTable
20170 {
20171 fn compat_from(value: ::fidl_test_conformance::EmptyResourceTable) -> Self {
20172 Self {}
20173 }
20174 }
20175
20176 impl ::fidl_next::CompatFrom<crate::EmptyResourceTableStruct>
20177 for ::fidl_test_conformance::EmptyResourceTableStruct
20178 {
20179 #[inline]
20180 fn compat_from(value: crate::EmptyResourceTableStruct) -> Self {
20181 Self { table: ::fidl_next::CompatFrom::compat_from(value.table) }
20182 }
20183 }
20184
20185 impl ::fidl_next::CompatFrom<::fidl_test_conformance::EmptyResourceTableStruct>
20186 for crate::EmptyResourceTableStruct
20187 {
20188 #[inline]
20189 fn compat_from(value: ::fidl_test_conformance::EmptyResourceTableStruct) -> Self {
20190 Self { table: ::fidl_next::CompatFrom::compat_from(value.table) }
20191 }
20192 }
20193
20194 impl ::fidl_next::CompatFrom<crate::EnvelopeInliningTestUnion>
20195 for ::fidl_test_conformance::EnvelopeInliningTestUnion
20196 {
20197 fn compat_from(value: crate::EnvelopeInliningTestUnion) -> Self {
20198 match value {
20199 crate::EnvelopeInliningTestUnion::Small(value) => {
20200 Self::Small(::fidl_next::CompatFrom::compat_from(value))
20201 }
20202
20203 crate::EnvelopeInliningTestUnion::Large(value) => {
20204 Self::Large(::fidl_next::CompatFrom::compat_from(value))
20205 }
20206
20207 crate::EnvelopeInliningTestUnion::Handle(value) => {
20208 Self::Handle(::fidl_next::CompatFrom::compat_from(value))
20209 }
20210
20211 crate::EnvelopeInliningTestUnion::UnknownOrdinal_(unknown_ordinal) => {
20212 Self::__SourceBreaking { unknown_ordinal }
20213 }
20214 }
20215 }
20216 }
20217
20218 impl ::fidl_next::CompatFrom<::fidl_test_conformance::EnvelopeInliningTestUnion>
20219 for crate::EnvelopeInliningTestUnion
20220 {
20221 fn compat_from(value: ::fidl_test_conformance::EnvelopeInliningTestUnion) -> Self {
20222 match value {
20223 ::fidl_test_conformance::EnvelopeInliningTestUnion::Small(value) => {
20224 Self::Small(::fidl_next::CompatFrom::compat_from(value))
20225 }
20226
20227 ::fidl_test_conformance::EnvelopeInliningTestUnion::Large(value) => {
20228 Self::Large(::fidl_next::CompatFrom::compat_from(value))
20229 }
20230
20231 ::fidl_test_conformance::EnvelopeInliningTestUnion::Handle(value) => {
20232 Self::Handle(::fidl_next::CompatFrom::compat_from(value))
20233 }
20234
20235 ::fidl_test_conformance::EnvelopeInliningTestUnion::__SourceBreaking {
20236 unknown_ordinal,
20237 } => Self::UnknownOrdinal_(unknown_ordinal),
20238 }
20239 }
20240 }
20241
20242 impl ::fidl_next::CompatFrom<crate::EnvelopeInliningTestUnionStruct>
20243 for ::fidl_test_conformance::EnvelopeInliningTestUnionStruct
20244 {
20245 #[inline]
20246 fn compat_from(value: crate::EnvelopeInliningTestUnionStruct) -> Self {
20247 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
20248 }
20249 }
20250
20251 impl ::fidl_next::CompatFrom<::fidl_test_conformance::EnvelopeInliningTestUnionStruct>
20252 for crate::EnvelopeInliningTestUnionStruct
20253 {
20254 #[inline]
20255 fn compat_from(value: ::fidl_test_conformance::EnvelopeInliningTestUnionStruct) -> Self {
20256 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
20257 }
20258 }
20259
20260 impl ::fidl_next::CompatFrom<crate::EventWithDefaultRights>
20261 for ::fidl_test_conformance::EventWithDefaultRights
20262 {
20263 #[inline]
20264 fn compat_from(value: crate::EventWithDefaultRights) -> Self {
20265 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20266 }
20267 }
20268
20269 impl ::fidl_next::CompatFrom<::fidl_test_conformance::EventWithDefaultRights>
20270 for crate::EventWithDefaultRights
20271 {
20272 #[inline]
20273 fn compat_from(value: ::fidl_test_conformance::EventWithDefaultRights) -> Self {
20274 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20275 }
20276 }
20277
20278 impl ::fidl_next::CompatFrom<crate::EventWithReducedRights>
20279 for ::fidl_test_conformance::EventWithReducedRights
20280 {
20281 #[inline]
20282 fn compat_from(value: crate::EventWithReducedRights) -> Self {
20283 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20284 }
20285 }
20286
20287 impl ::fidl_next::CompatFrom<::fidl_test_conformance::EventWithReducedRights>
20288 for crate::EventWithReducedRights
20289 {
20290 #[inline]
20291 fn compat_from(value: ::fidl_test_conformance::EventWithReducedRights) -> Self {
20292 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20293 }
20294 }
20295
20296 impl ::fidl_next::CompatFrom<crate::FidlvizDemo> for ::fidl_test_conformance::FidlvizDemo {
20297 #[inline]
20298 fn compat_from(value: crate::FidlvizDemo) -> Self {
20299 Self {
20300 f1: ::fidl_next::CompatFrom::compat_from(value.f1),
20301
20302 f2: ::fidl_next::CompatFrom::compat_from(value.f2),
20303
20304 f3: ::fidl_next::CompatFrom::compat_from(value.f3),
20305
20306 f4: ::fidl_next::CompatFrom::compat_from(value.f4),
20307
20308 f5: ::fidl_next::CompatFrom::compat_from(value.f5),
20309
20310 f6: ::fidl_next::CompatFrom::compat_from(value.f6),
20311
20312 f7: ::fidl_next::CompatFrom::compat_from(value.f7),
20313
20314 f8: ::fidl_next::CompatFrom::compat_from(value.f8),
20315
20316 f9: ::fidl_next::CompatFrom::compat_from(value.f9),
20317
20318 f10: ::fidl_next::CompatFrom::compat_from(value.f10),
20319
20320 f11: ::fidl_next::CompatFrom::compat_from(value.f11),
20321
20322 f12: ::fidl_next::CompatFrom::compat_from(value.f12),
20323
20324 f13: ::fidl_next::CompatFrom::compat_from(value.f13),
20325
20326 f14: ::fidl_next::CompatFrom::compat_from(value.f14),
20327
20328 f15: ::fidl_next::CompatFrom::compat_from(value.f15),
20329
20330 f16: ::fidl_next::CompatFrom::compat_from(value.f16),
20331
20332 f17: ::fidl_next::CompatFrom::compat_from(value.f17),
20333
20334 f18: ::fidl_next::CompatFrom::compat_from(value.f18),
20335
20336 f19: ::fidl_next::CompatFrom::compat_from(value.f19),
20337
20338 f20: ::fidl_next::CompatFrom::compat_from(value.f20),
20339
20340 f21: ::fidl_next::CompatFrom::compat_from(value.f21),
20341
20342 f22: ::fidl_next::CompatFrom::compat_from(value.f22),
20343
20344 f23: ::fidl_next::CompatFrom::compat_from(value.f23),
20345
20346 f24: ::fidl_next::CompatFrom::compat_from(value.f24),
20347
20348 f25: ::fidl_next::CompatFrom::compat_from(value.f25),
20349
20350 f26: ::fidl_next::CompatFrom::compat_from(value.f26),
20351
20352 f27: ::fidl_next::CompatFrom::compat_from(value.f27),
20353
20354 f28: ::fidl_next::CompatFrom::compat_from(value.f28),
20355
20356 f29: ::fidl_next::CompatFrom::compat_from(value.f29),
20357
20358 f30: ::fidl_next::CompatFrom::compat_from(value.f30),
20359
20360 f31: ::fidl_next::CompatFrom::compat_from(value.f31),
20361 }
20362 }
20363 }
20364
20365 impl ::fidl_next::CompatFrom<::fidl_test_conformance::FidlvizDemo> for crate::FidlvizDemo {
20366 #[inline]
20367 fn compat_from(value: ::fidl_test_conformance::FidlvizDemo) -> Self {
20368 Self {
20369 f1: ::fidl_next::CompatFrom::compat_from(value.f1),
20370
20371 f2: ::fidl_next::CompatFrom::compat_from(value.f2),
20372
20373 f3: ::fidl_next::CompatFrom::compat_from(value.f3),
20374
20375 f4: ::fidl_next::CompatFrom::compat_from(value.f4),
20376
20377 f5: ::fidl_next::CompatFrom::compat_from(value.f5),
20378
20379 f6: ::fidl_next::CompatFrom::compat_from(value.f6),
20380
20381 f7: ::fidl_next::CompatFrom::compat_from(value.f7),
20382
20383 f8: ::fidl_next::CompatFrom::compat_from(value.f8),
20384
20385 f9: ::fidl_next::CompatFrom::compat_from(value.f9),
20386
20387 f10: ::fidl_next::CompatFrom::compat_from(value.f10),
20388
20389 f11: ::fidl_next::CompatFrom::compat_from(value.f11),
20390
20391 f12: ::fidl_next::CompatFrom::compat_from(value.f12),
20392
20393 f13: ::fidl_next::CompatFrom::compat_from(value.f13),
20394
20395 f14: ::fidl_next::CompatFrom::compat_from(value.f14),
20396
20397 f15: ::fidl_next::CompatFrom::compat_from(value.f15),
20398
20399 f16: ::fidl_next::CompatFrom::compat_from(value.f16),
20400
20401 f17: ::fidl_next::CompatFrom::compat_from(value.f17),
20402
20403 f18: ::fidl_next::CompatFrom::compat_from(value.f18),
20404
20405 f19: ::fidl_next::CompatFrom::compat_from(value.f19),
20406
20407 f20: ::fidl_next::CompatFrom::compat_from(value.f20),
20408
20409 f21: ::fidl_next::CompatFrom::compat_from(value.f21),
20410
20411 f22: ::fidl_next::CompatFrom::compat_from(value.f22),
20412
20413 f23: ::fidl_next::CompatFrom::compat_from(value.f23),
20414
20415 f24: ::fidl_next::CompatFrom::compat_from(value.f24),
20416
20417 f25: ::fidl_next::CompatFrom::compat_from(value.f25),
20418
20419 f26: ::fidl_next::CompatFrom::compat_from(value.f26),
20420
20421 f27: ::fidl_next::CompatFrom::compat_from(value.f27),
20422
20423 f28: ::fidl_next::CompatFrom::compat_from(value.f28),
20424
20425 f29: ::fidl_next::CompatFrom::compat_from(value.f29),
20426
20427 f30: ::fidl_next::CompatFrom::compat_from(value.f30),
20428
20429 f31: ::fidl_next::CompatFrom::compat_from(value.f31),
20430 }
20431 }
20432 }
20433
20434 impl ::fidl_next::CompatFrom<crate::GoldenHandleBasicRightsStruct>
20435 for ::fidl_test_conformance::GoldenHandleBasicRightsStruct
20436 {
20437 #[inline]
20438 fn compat_from(value: crate::GoldenHandleBasicRightsStruct) -> Self {
20439 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
20440 }
20441 }
20442
20443 impl ::fidl_next::CompatFrom<::fidl_test_conformance::GoldenHandleBasicRightsStruct>
20444 for crate::GoldenHandleBasicRightsStruct
20445 {
20446 #[inline]
20447 fn compat_from(value: ::fidl_test_conformance::GoldenHandleBasicRightsStruct) -> Self {
20448 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
20449 }
20450 }
20451
20452 impl ::fidl_next::CompatFrom<crate::GoldenNullableHandleStruct>
20453 for ::fidl_test_conformance::GoldenNullableHandleStruct
20454 {
20455 #[inline]
20456 fn compat_from(value: crate::GoldenNullableHandleStruct) -> Self {
20457 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
20458 }
20459 }
20460
20461 impl ::fidl_next::CompatFrom<::fidl_test_conformance::GoldenNullableHandleStruct>
20462 for crate::GoldenNullableHandleStruct
20463 {
20464 #[inline]
20465 fn compat_from(value: ::fidl_test_conformance::GoldenNullableHandleStruct) -> Self {
20466 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
20467 }
20468 }
20469
20470 impl ::fidl_next::CompatFrom<crate::MultipleBoundedNonnullableVectorsOfHandles>
20471 for ::fidl_test_conformance::MultipleBoundedNonnullableVectorsOfHandles
20472 {
20473 #[inline]
20474 fn compat_from(value: crate::MultipleBoundedNonnullableVectorsOfHandles) -> Self {
20475 Self {
20476 vh0: ::fidl_next::CompatFrom::compat_from(value.vh0),
20477
20478 vh1: ::fidl_next::CompatFrom::compat_from(value.vh1),
20479 }
20480 }
20481 }
20482
20483 impl
20484 ::fidl_next::CompatFrom<::fidl_test_conformance::MultipleBoundedNonnullableVectorsOfHandles>
20485 for crate::MultipleBoundedNonnullableVectorsOfHandles
20486 {
20487 #[inline]
20488 fn compat_from(
20489 value: ::fidl_test_conformance::MultipleBoundedNonnullableVectorsOfHandles,
20490 ) -> Self {
20491 Self {
20492 vh0: ::fidl_next::CompatFrom::compat_from(value.vh0),
20493
20494 vh1: ::fidl_next::CompatFrom::compat_from(value.vh1),
20495 }
20496 }
20497 }
20498
20499 impl ::fidl_next::CompatFrom<crate::MultipleBoundedNullableVectorsOfHandles>
20500 for ::fidl_test_conformance::MultipleBoundedNullableVectorsOfHandles
20501 {
20502 #[inline]
20503 fn compat_from(value: crate::MultipleBoundedNullableVectorsOfHandles) -> Self {
20504 Self {
20505 vh0: ::fidl_next::CompatFrom::compat_from(value.vh0),
20506
20507 vh1: ::fidl_next::CompatFrom::compat_from(value.vh1),
20508 }
20509 }
20510 }
20511
20512 impl ::fidl_next::CompatFrom<::fidl_test_conformance::MultipleBoundedNullableVectorsOfHandles>
20513 for crate::MultipleBoundedNullableVectorsOfHandles
20514 {
20515 #[inline]
20516 fn compat_from(
20517 value: ::fidl_test_conformance::MultipleBoundedNullableVectorsOfHandles,
20518 ) -> Self {
20519 Self {
20520 vh0: ::fidl_next::CompatFrom::compat_from(value.vh0),
20521
20522 vh1: ::fidl_next::CompatFrom::compat_from(value.vh1),
20523 }
20524 }
20525 }
20526
20527 impl ::fidl_next::CompatFrom<crate::MultipleHandleSubtypes>
20528 for ::fidl_test_conformance::MultipleHandleSubtypes
20529 {
20530 #[inline]
20531 fn compat_from(value: crate::MultipleHandleSubtypes) -> Self {
20532 Self {
20533 untyped: ::fidl_next::CompatFrom::compat_from(value.untyped),
20534
20535 event: ::fidl_next::CompatFrom::compat_from(value.event),
20536
20537 channel: ::fidl_next::CompatFrom::compat_from(value.channel),
20538 }
20539 }
20540 }
20541
20542 impl ::fidl_next::CompatFrom<::fidl_test_conformance::MultipleHandleSubtypes>
20543 for crate::MultipleHandleSubtypes
20544 {
20545 #[inline]
20546 fn compat_from(value: ::fidl_test_conformance::MultipleHandleSubtypes) -> Self {
20547 Self {
20548 untyped: ::fidl_next::CompatFrom::compat_from(value.untyped),
20549
20550 event: ::fidl_next::CompatFrom::compat_from(value.event),
20551
20552 channel: ::fidl_next::CompatFrom::compat_from(value.channel),
20553 }
20554 }
20555 }
20556
20557 impl ::fidl_next::CompatFrom<crate::MultipleNonnullableHandles>
20558 for ::fidl_test_conformance::MultipleNonnullableHandles
20559 {
20560 #[inline]
20561 fn compat_from(value: crate::MultipleNonnullableHandles) -> Self {
20562 Self {
20563 data0: ::fidl_next::CompatFrom::compat_from(value.data0),
20564
20565 handle0: ::fidl_next::CompatFrom::compat_from(value.handle0),
20566
20567 data1: ::fidl_next::CompatFrom::compat_from(value.data1),
20568
20569 handle1: ::fidl_next::CompatFrom::compat_from(value.handle1),
20570
20571 handle2: ::fidl_next::CompatFrom::compat_from(value.handle2),
20572
20573 data2: ::fidl_next::CompatFrom::compat_from(value.data2),
20574 }
20575 }
20576 }
20577
20578 impl ::fidl_next::CompatFrom<::fidl_test_conformance::MultipleNonnullableHandles>
20579 for crate::MultipleNonnullableHandles
20580 {
20581 #[inline]
20582 fn compat_from(value: ::fidl_test_conformance::MultipleNonnullableHandles) -> Self {
20583 Self {
20584 data0: ::fidl_next::CompatFrom::compat_from(value.data0),
20585
20586 handle0: ::fidl_next::CompatFrom::compat_from(value.handle0),
20587
20588 data1: ::fidl_next::CompatFrom::compat_from(value.data1),
20589
20590 handle1: ::fidl_next::CompatFrom::compat_from(value.handle1),
20591
20592 handle2: ::fidl_next::CompatFrom::compat_from(value.handle2),
20593
20594 data2: ::fidl_next::CompatFrom::compat_from(value.data2),
20595 }
20596 }
20597 }
20598
20599 impl ::fidl_next::CompatFrom<crate::MultipleNullableHandles>
20600 for ::fidl_test_conformance::MultipleNullableHandles
20601 {
20602 #[inline]
20603 fn compat_from(value: crate::MultipleNullableHandles) -> Self {
20604 Self {
20605 data0: ::fidl_next::CompatFrom::compat_from(value.data0),
20606
20607 handle0: ::fidl_next::CompatFrom::compat_from(value.handle0),
20608
20609 data1: ::fidl_next::CompatFrom::compat_from(value.data1),
20610
20611 handle1: ::fidl_next::CompatFrom::compat_from(value.handle1),
20612
20613 handle2: ::fidl_next::CompatFrom::compat_from(value.handle2),
20614
20615 data2: ::fidl_next::CompatFrom::compat_from(value.data2),
20616 }
20617 }
20618 }
20619
20620 impl ::fidl_next::CompatFrom<::fidl_test_conformance::MultipleNullableHandles>
20621 for crate::MultipleNullableHandles
20622 {
20623 #[inline]
20624 fn compat_from(value: ::fidl_test_conformance::MultipleNullableHandles) -> Self {
20625 Self {
20626 data0: ::fidl_next::CompatFrom::compat_from(value.data0),
20627
20628 handle0: ::fidl_next::CompatFrom::compat_from(value.handle0),
20629
20630 data1: ::fidl_next::CompatFrom::compat_from(value.data1),
20631
20632 handle1: ::fidl_next::CompatFrom::compat_from(value.handle1),
20633
20634 handle2: ::fidl_next::CompatFrom::compat_from(value.handle2),
20635
20636 data2: ::fidl_next::CompatFrom::compat_from(value.data2),
20637 }
20638 }
20639 }
20640
20641 impl ::fidl_next::CompatFrom<crate::NonnullableHandle>
20642 for ::fidl_test_conformance::NonnullableHandle
20643 {
20644 #[inline]
20645 fn compat_from(value: crate::NonnullableHandle) -> Self {
20646 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20647 }
20648 }
20649
20650 impl ::fidl_next::CompatFrom<::fidl_test_conformance::NonnullableHandle>
20651 for crate::NonnullableHandle
20652 {
20653 #[inline]
20654 fn compat_from(value: ::fidl_test_conformance::NonnullableHandle) -> Self {
20655 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20656 }
20657 }
20658
20659 impl ::fidl_next::CompatFrom<crate::NonnullableHandleArray>
20660 for ::fidl_test_conformance::NonnullableHandleArray
20661 {
20662 #[inline]
20663 fn compat_from(value: crate::NonnullableHandleArray) -> Self {
20664 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
20665 }
20666 }
20667
20668 impl ::fidl_next::CompatFrom<::fidl_test_conformance::NonnullableHandleArray>
20669 for crate::NonnullableHandleArray
20670 {
20671 #[inline]
20672 fn compat_from(value: ::fidl_test_conformance::NonnullableHandleArray) -> Self {
20673 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
20674 }
20675 }
20676
20677 impl ::fidl_next::CompatFrom<crate::NullableHandle> for ::fidl_test_conformance::NullableHandle {
20678 #[inline]
20679 fn compat_from(value: crate::NullableHandle) -> Self {
20680 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20681 }
20682 }
20683
20684 impl ::fidl_next::CompatFrom<::fidl_test_conformance::NullableHandle> for crate::NullableHandle {
20685 #[inline]
20686 fn compat_from(value: ::fidl_test_conformance::NullableHandle) -> Self {
20687 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20688 }
20689 }
20690
20691 impl ::fidl_next::CompatFrom<crate::OutOfLineArrayOfNonnullableHandles>
20692 for ::fidl_test_conformance::OutOfLineArrayOfNonnullableHandles
20693 {
20694 #[inline]
20695 fn compat_from(value: crate::OutOfLineArrayOfNonnullableHandles) -> Self {
20696 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
20697 }
20698 }
20699
20700 impl ::fidl_next::CompatFrom<::fidl_test_conformance::OutOfLineArrayOfNonnullableHandles>
20701 for crate::OutOfLineArrayOfNonnullableHandles
20702 {
20703 #[inline]
20704 fn compat_from(value: ::fidl_test_conformance::OutOfLineArrayOfNonnullableHandles) -> Self {
20705 Self { handles: ::fidl_next::CompatFrom::compat_from(value.handles) }
20706 }
20707 }
20708
20709 impl ::fidl_next::CompatFrom<crate::SampleResourceXUnion>
20710 for ::fidl_test_conformance::SampleResourceXUnion
20711 {
20712 fn compat_from(value: crate::SampleResourceXUnion) -> Self {
20713 match value {
20714 crate::SampleResourceXUnion::U(value) => {
20715 Self::U(::fidl_next::CompatFrom::compat_from(value))
20716 }
20717
20718 crate::SampleResourceXUnion::Su(value) => {
20719 Self::Su(::fidl_next::CompatFrom::compat_from(value))
20720 }
20721
20722 crate::SampleResourceXUnion::St(value) => {
20723 Self::St(::fidl_next::CompatFrom::compat_from(value))
20724 }
20725
20726 crate::SampleResourceXUnion::UnknownOrdinal_(unknown_ordinal) => {
20727 Self::__SourceBreaking { unknown_ordinal }
20728 }
20729 }
20730 }
20731 }
20732
20733 impl ::fidl_next::CompatFrom<::fidl_test_conformance::SampleResourceXUnion>
20734 for crate::SampleResourceXUnion
20735 {
20736 fn compat_from(value: ::fidl_test_conformance::SampleResourceXUnion) -> Self {
20737 match value {
20738 ::fidl_test_conformance::SampleResourceXUnion::U(value) => {
20739 Self::U(::fidl_next::CompatFrom::compat_from(value))
20740 }
20741
20742 ::fidl_test_conformance::SampleResourceXUnion::Su(value) => {
20743 Self::Su(::fidl_next::CompatFrom::compat_from(value))
20744 }
20745
20746 ::fidl_test_conformance::SampleResourceXUnion::St(value) => {
20747 Self::St(::fidl_next::CompatFrom::compat_from(value))
20748 }
20749
20750 ::fidl_test_conformance::SampleResourceXUnion::__SourceBreaking {
20751 unknown_ordinal,
20752 } => Self::UnknownOrdinal_(unknown_ordinal),
20753 }
20754 }
20755 }
20756
20757 impl ::fidl_next::CompatFrom<crate::SampleStrictResourceXUnion>
20758 for ::fidl_test_conformance::SampleStrictResourceXUnion
20759 {
20760 fn compat_from(value: crate::SampleStrictResourceXUnion) -> Self {
20761 match value {
20762 crate::SampleStrictResourceXUnion::U(value) => {
20763 Self::U(::fidl_next::CompatFrom::compat_from(value))
20764 }
20765
20766 crate::SampleStrictResourceXUnion::Su(value) => {
20767 Self::Su(::fidl_next::CompatFrom::compat_from(value))
20768 }
20769
20770 crate::SampleStrictResourceXUnion::St(value) => {
20771 Self::St(::fidl_next::CompatFrom::compat_from(value))
20772 }
20773 }
20774 }
20775 }
20776
20777 impl ::fidl_next::CompatFrom<::fidl_test_conformance::SampleStrictResourceXUnion>
20778 for crate::SampleStrictResourceXUnion
20779 {
20780 fn compat_from(value: ::fidl_test_conformance::SampleStrictResourceXUnion) -> Self {
20781 match value {
20782 ::fidl_test_conformance::SampleStrictResourceXUnion::U(value) => {
20783 Self::U(::fidl_next::CompatFrom::compat_from(value))
20784 }
20785
20786 ::fidl_test_conformance::SampleStrictResourceXUnion::Su(value) => {
20787 Self::Su(::fidl_next::CompatFrom::compat_from(value))
20788 }
20789
20790 ::fidl_test_conformance::SampleStrictResourceXUnion::St(value) => {
20791 Self::St(::fidl_next::CompatFrom::compat_from(value))
20792 }
20793 }
20794 }
20795 }
20796
20797 impl ::fidl_next::CompatFrom<crate::UnionWithVector> for ::fidl_test_conformance::UnionWithVector {
20798 fn compat_from(value: crate::UnionWithVector) -> Self {
20799 match value {
20800 crate::UnionWithVector::Unused(value) => {
20801 Self::Unused(::fidl_next::CompatFrom::compat_from(value))
20802 }
20803
20804 crate::UnionWithVector::VectorOfUint8(value) => {
20805 Self::VectorOfUint8(::fidl_next::CompatFrom::compat_from(value))
20806 }
20807
20808 crate::UnionWithVector::S(value) => {
20809 Self::S(::fidl_next::CompatFrom::compat_from(value))
20810 }
20811
20812 crate::UnionWithVector::VectorS3A1(value) => {
20813 Self::VectorS3A1(::fidl_next::CompatFrom::compat_from(value))
20814 }
20815
20816 crate::UnionWithVector::VectorS3A2(value) => {
20817 Self::VectorS3A2(::fidl_next::CompatFrom::compat_from(value))
20818 }
20819
20820 crate::UnionWithVector::Handles(value) => {
20821 Self::Handles(::fidl_next::CompatFrom::compat_from(value))
20822 }
20823
20824 crate::UnionWithVector::ArrayS3A1(value) => {
20825 Self::ArrayS3A1(::fidl_next::CompatFrom::compat_from(value))
20826 }
20827
20828 crate::UnionWithVector::ArrayS3A2(value) => {
20829 Self::ArrayS3A2(::fidl_next::CompatFrom::compat_from(value))
20830 }
20831
20832 crate::UnionWithVector::VectorUnion(value) => {
20833 Self::VectorUnion(::fidl_next::CompatFrom::compat_from(value))
20834 }
20835 }
20836 }
20837 }
20838
20839 impl ::fidl_next::CompatFrom<::fidl_test_conformance::UnionWithVector> for crate::UnionWithVector {
20840 fn compat_from(value: ::fidl_test_conformance::UnionWithVector) -> Self {
20841 match value {
20842 ::fidl_test_conformance::UnionWithVector::Unused(value) => {
20843 Self::Unused(::fidl_next::CompatFrom::compat_from(value))
20844 }
20845
20846 ::fidl_test_conformance::UnionWithVector::VectorOfUint8(value) => {
20847 Self::VectorOfUint8(::fidl_next::CompatFrom::compat_from(value))
20848 }
20849
20850 ::fidl_test_conformance::UnionWithVector::S(value) => {
20851 Self::S(::fidl_next::CompatFrom::compat_from(value))
20852 }
20853
20854 ::fidl_test_conformance::UnionWithVector::VectorS3A1(value) => {
20855 Self::VectorS3A1(::fidl_next::CompatFrom::compat_from(value))
20856 }
20857
20858 ::fidl_test_conformance::UnionWithVector::VectorS3A2(value) => {
20859 Self::VectorS3A2(::fidl_next::CompatFrom::compat_from(value))
20860 }
20861
20862 ::fidl_test_conformance::UnionWithVector::Handles(value) => {
20863 Self::Handles(::fidl_next::CompatFrom::compat_from(value))
20864 }
20865
20866 ::fidl_test_conformance::UnionWithVector::ArrayS3A1(value) => {
20867 Self::ArrayS3A1(::fidl_next::CompatFrom::compat_from(value))
20868 }
20869
20870 ::fidl_test_conformance::UnionWithVector::ArrayS3A2(value) => {
20871 Self::ArrayS3A2(::fidl_next::CompatFrom::compat_from(value))
20872 }
20873
20874 ::fidl_test_conformance::UnionWithVector::VectorUnion(value) => {
20875 Self::VectorUnion(::fidl_next::CompatFrom::compat_from(value))
20876 }
20877 }
20878 }
20879 }
20880
20881 impl ::fidl_next::CompatFrom<crate::Sandwich6> for ::fidl_test_conformance::Sandwich6 {
20882 #[inline]
20883 fn compat_from(value: crate::Sandwich6) -> Self {
20884 Self {
20885 before: ::fidl_next::CompatFrom::compat_from(value.before),
20886
20887 the_union: ::fidl_next::CompatFrom::compat_from(value.the_union),
20888
20889 after: ::fidl_next::CompatFrom::compat_from(value.after),
20890 }
20891 }
20892 }
20893
20894 impl ::fidl_next::CompatFrom<::fidl_test_conformance::Sandwich6> for crate::Sandwich6 {
20895 #[inline]
20896 fn compat_from(value: ::fidl_test_conformance::Sandwich6) -> Self {
20897 Self {
20898 before: ::fidl_next::CompatFrom::compat_from(value.before),
20899
20900 the_union: ::fidl_next::CompatFrom::compat_from(value.the_union),
20901
20902 after: ::fidl_next::CompatFrom::compat_from(value.after),
20903 }
20904 }
20905 }
20906
20907 impl ::fidl_next::CompatFrom<crate::ShortStringThenHandle>
20908 for ::fidl_test_conformance::ShortStringThenHandle
20909 {
20910 #[inline]
20911 fn compat_from(value: crate::ShortStringThenHandle) -> Self {
20912 Self {
20913 s: ::fidl_next::CompatFrom::compat_from(value.s),
20914
20915 h: ::fidl_next::CompatFrom::compat_from(value.h),
20916 }
20917 }
20918 }
20919
20920 impl ::fidl_next::CompatFrom<::fidl_test_conformance::ShortStringThenHandle>
20921 for crate::ShortStringThenHandle
20922 {
20923 #[inline]
20924 fn compat_from(value: ::fidl_test_conformance::ShortStringThenHandle) -> Self {
20925 Self {
20926 s: ::fidl_next::CompatFrom::compat_from(value.s),
20927
20928 h: ::fidl_next::CompatFrom::compat_from(value.h),
20929 }
20930 }
20931 }
20932
20933 impl ::fidl_next::CompatFrom<crate::SimpleResourceTable>
20934 for ::fidl_test_conformance::SimpleResourceTable
20935 {
20936 fn compat_from(value: crate::SimpleResourceTable) -> Self {
20937 Self {
20938 x: ::fidl_next::CompatFrom::compat_from(value.x),
20939
20940 y: ::fidl_next::CompatFrom::compat_from(value.y),
20941
20942 __source_breaking: ::fidl::marker::SourceBreaking,
20943 }
20944 }
20945 }
20946
20947 impl ::fidl_next::CompatFrom<::fidl_test_conformance::SimpleResourceTable>
20948 for crate::SimpleResourceTable
20949 {
20950 fn compat_from(value: ::fidl_test_conformance::SimpleResourceTable) -> Self {
20951 Self {
20952 x: ::fidl_next::CompatFrom::compat_from(value.x),
20953
20954 y: ::fidl_next::CompatFrom::compat_from(value.y),
20955 }
20956 }
20957 }
20958
20959 impl ::fidl_next::CompatFrom<crate::SingleHandle> for ::fidl_test_conformance::SingleHandle {
20960 #[inline]
20961 fn compat_from(value: crate::SingleHandle) -> Self {
20962 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20963 }
20964 }
20965
20966 impl ::fidl_next::CompatFrom<::fidl_test_conformance::SingleHandle> for crate::SingleHandle {
20967 #[inline]
20968 fn compat_from(value: ::fidl_test_conformance::SingleHandle) -> Self {
20969 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20970 }
20971 }
20972
20973 impl ::fidl_next::CompatFrom<crate::SingleOptionalHandle>
20974 for ::fidl_test_conformance::SingleOptionalHandle
20975 {
20976 #[inline]
20977 fn compat_from(value: crate::SingleOptionalHandle) -> Self {
20978 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20979 }
20980 }
20981
20982 impl ::fidl_next::CompatFrom<::fidl_test_conformance::SingleOptionalHandle>
20983 for crate::SingleOptionalHandle
20984 {
20985 #[inline]
20986 fn compat_from(value: ::fidl_test_conformance::SingleOptionalHandle) -> Self {
20987 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
20988 }
20989 }
20990
20991 impl ::fidl_next::CompatFrom<crate::StructOfEndpoints>
20992 for ::fidl_test_conformance::StructOfEndpoints
20993 {
20994 #[inline]
20995 fn compat_from(value: crate::StructOfEndpoints) -> Self {
20996 Self {
20997 client_end: ::fidl_next::CompatFrom::compat_from(value.client_end),
20998
20999 optional_client_end: ::fidl_next::CompatFrom::compat_from(
21000 value.optional_client_end,
21001 ),
21002
21003 server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
21004
21005 optional_server_end: ::fidl_next::CompatFrom::compat_from(
21006 value.optional_server_end,
21007 ),
21008 }
21009 }
21010 }
21011
21012 impl ::fidl_next::CompatFrom<::fidl_test_conformance::StructOfEndpoints>
21013 for crate::StructOfEndpoints
21014 {
21015 #[inline]
21016 fn compat_from(value: ::fidl_test_conformance::StructOfEndpoints) -> Self {
21017 Self {
21018 client_end: ::fidl_next::CompatFrom::compat_from(value.client_end),
21019
21020 optional_client_end: ::fidl_next::CompatFrom::compat_from(
21021 value.optional_client_end,
21022 ),
21023
21024 server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
21025
21026 optional_server_end: ::fidl_next::CompatFrom::compat_from(
21027 value.optional_server_end,
21028 ),
21029 }
21030 }
21031 }
21032
21033 impl ::fidl_next::CompatFrom<crate::StructOfOptionalUnionOfHandle>
21034 for ::fidl_test_conformance::StructOfOptionalUnionOfHandle
21035 {
21036 #[inline]
21037 fn compat_from(value: crate::StructOfOptionalUnionOfHandle) -> Self {
21038 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
21039 }
21040 }
21041
21042 impl ::fidl_next::CompatFrom<::fidl_test_conformance::StructOfOptionalUnionOfHandle>
21043 for crate::StructOfOptionalUnionOfHandle
21044 {
21045 #[inline]
21046 fn compat_from(value: ::fidl_test_conformance::StructOfOptionalUnionOfHandle) -> Self {
21047 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
21048 }
21049 }
21050
21051 impl ::fidl_next::CompatFrom<crate::StructOfSimpleResourceTable>
21052 for ::fidl_test_conformance::StructOfSimpleResourceTable
21053 {
21054 #[inline]
21055 fn compat_from(value: crate::StructOfSimpleResourceTable) -> Self {
21056 Self { table: ::fidl_next::CompatFrom::compat_from(value.table) }
21057 }
21058 }
21059
21060 impl ::fidl_next::CompatFrom<::fidl_test_conformance::StructOfSimpleResourceTable>
21061 for crate::StructOfSimpleResourceTable
21062 {
21063 #[inline]
21064 fn compat_from(value: ::fidl_test_conformance::StructOfSimpleResourceTable) -> Self {
21065 Self { table: ::fidl_next::CompatFrom::compat_from(value.table) }
21066 }
21067 }
21068
21069 impl ::fidl_next::CompatFrom<crate::TableFieldInlinedHandle>
21070 for ::fidl_test_conformance::TableFieldInlinedHandle
21071 {
21072 fn compat_from(value: crate::TableFieldInlinedHandle) -> Self {
21073 Self {
21074 f: ::fidl_next::CompatFrom::compat_from(value.f),
21075
21076 __source_breaking: ::fidl::marker::SourceBreaking,
21077 }
21078 }
21079 }
21080
21081 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableFieldInlinedHandle>
21082 for crate::TableFieldInlinedHandle
21083 {
21084 fn compat_from(value: ::fidl_test_conformance::TableFieldInlinedHandle) -> Self {
21085 Self { f: ::fidl_next::CompatFrom::compat_from(value.f) }
21086 }
21087 }
21088
21089 impl ::fidl_next::CompatFrom<crate::TableFieldInlinedHandleStruct>
21090 for ::fidl_test_conformance::TableFieldInlinedHandleStruct
21091 {
21092 #[inline]
21093 fn compat_from(value: crate::TableFieldInlinedHandleStruct) -> Self {
21094 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
21095 }
21096 }
21097
21098 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableFieldInlinedHandleStruct>
21099 for crate::TableFieldInlinedHandleStruct
21100 {
21101 #[inline]
21102 fn compat_from(value: ::fidl_test_conformance::TableFieldInlinedHandleStruct) -> Self {
21103 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
21104 }
21105 }
21106
21107 impl ::fidl_next::CompatFrom<crate::TableFieldUnknownResource>
21108 for ::fidl_test_conformance::TableFieldUnknownResource
21109 {
21110 fn compat_from(value: crate::TableFieldUnknownResource) -> Self {
21111 Self { __source_breaking: ::fidl::marker::SourceBreaking }
21112 }
21113 }
21114
21115 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableFieldUnknownResource>
21116 for crate::TableFieldUnknownResource
21117 {
21118 fn compat_from(value: ::fidl_test_conformance::TableFieldUnknownResource) -> Self {
21119 Self {}
21120 }
21121 }
21122
21123 impl ::fidl_next::CompatFrom<crate::TableFieldUnknownResourceStruct>
21124 for ::fidl_test_conformance::TableFieldUnknownResourceStruct
21125 {
21126 #[inline]
21127 fn compat_from(value: crate::TableFieldUnknownResourceStruct) -> Self {
21128 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
21129 }
21130 }
21131
21132 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableFieldUnknownResourceStruct>
21133 for crate::TableFieldUnknownResourceStruct
21134 {
21135 #[inline]
21136 fn compat_from(value: ::fidl_test_conformance::TableFieldUnknownResourceStruct) -> Self {
21137 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
21138 }
21139 }
21140
21141 impl ::fidl_next::CompatFrom<crate::TableOfEndpointsTable>
21142 for ::fidl_test_conformance::TableOfEndpointsTable
21143 {
21144 fn compat_from(value: crate::TableOfEndpointsTable) -> Self {
21145 Self {
21146 client_end: ::fidl_next::CompatFrom::compat_from(value.client_end),
21147
21148 server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
21149
21150 __source_breaking: ::fidl::marker::SourceBreaking,
21151 }
21152 }
21153 }
21154
21155 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableOfEndpointsTable>
21156 for crate::TableOfEndpointsTable
21157 {
21158 fn compat_from(value: ::fidl_test_conformance::TableOfEndpointsTable) -> Self {
21159 Self {
21160 client_end: ::fidl_next::CompatFrom::compat_from(value.client_end),
21161
21162 server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
21163 }
21164 }
21165 }
21166
21167 impl ::fidl_next::CompatFrom<crate::TableOfEndpoints>
21168 for ::fidl_test_conformance::TableOfEndpoints
21169 {
21170 #[inline]
21171 fn compat_from(value: crate::TableOfEndpoints) -> Self {
21172 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
21173 }
21174 }
21175
21176 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableOfEndpoints>
21177 for crate::TableOfEndpoints
21178 {
21179 #[inline]
21180 fn compat_from(value: ::fidl_test_conformance::TableOfEndpoints) -> Self {
21181 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
21182 }
21183 }
21184
21185 impl ::fidl_next::CompatFrom<crate::TableUnionWithVectorReservedSandwich>
21186 for ::fidl_test_conformance::TableUnionWithVectorReservedSandwich
21187 {
21188 fn compat_from(value: crate::TableUnionWithVectorReservedSandwich) -> Self {
21189 Self {
21190 uv: ::fidl_next::CompatFrom::compat_from(value.uv),
21191
21192 __source_breaking: ::fidl::marker::SourceBreaking,
21193 }
21194 }
21195 }
21196
21197 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableUnionWithVectorReservedSandwich>
21198 for crate::TableUnionWithVectorReservedSandwich
21199 {
21200 fn compat_from(
21201 value: ::fidl_test_conformance::TableUnionWithVectorReservedSandwich,
21202 ) -> Self {
21203 Self { uv: ::fidl_next::CompatFrom::compat_from(value.uv) }
21204 }
21205 }
21206
21207 impl ::fidl_next::CompatFrom<crate::TableUnionWithVectorReservedSandwichStruct>
21208 for ::fidl_test_conformance::TableUnionWithVectorReservedSandwichStruct
21209 {
21210 #[inline]
21211 fn compat_from(value: crate::TableUnionWithVectorReservedSandwichStruct) -> Self {
21212 Self { table: ::fidl_next::CompatFrom::compat_from(value.table) }
21213 }
21214 }
21215
21216 impl
21217 ::fidl_next::CompatFrom<::fidl_test_conformance::TableUnionWithVectorReservedSandwichStruct>
21218 for crate::TableUnionWithVectorReservedSandwichStruct
21219 {
21220 #[inline]
21221 fn compat_from(
21222 value: ::fidl_test_conformance::TableUnionWithVectorReservedSandwichStruct,
21223 ) -> Self {
21224 Self { table: ::fidl_next::CompatFrom::compat_from(value.table) }
21225 }
21226 }
21227
21228 impl ::fidl_next::CompatFrom<crate::TableUnionWithVectorStructSandwich>
21229 for ::fidl_test_conformance::TableUnionWithVectorStructSandwich
21230 {
21231 fn compat_from(value: crate::TableUnionWithVectorStructSandwich) -> Self {
21232 Self {
21233 s1: ::fidl_next::CompatFrom::compat_from(value.s1),
21234
21235 uv: ::fidl_next::CompatFrom::compat_from(value.uv),
21236
21237 s2: ::fidl_next::CompatFrom::compat_from(value.s2),
21238
21239 __source_breaking: ::fidl::marker::SourceBreaking,
21240 }
21241 }
21242 }
21243
21244 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableUnionWithVectorStructSandwich>
21245 for crate::TableUnionWithVectorStructSandwich
21246 {
21247 fn compat_from(value: ::fidl_test_conformance::TableUnionWithVectorStructSandwich) -> Self {
21248 Self {
21249 s1: ::fidl_next::CompatFrom::compat_from(value.s1),
21250
21251 uv: ::fidl_next::CompatFrom::compat_from(value.uv),
21252
21253 s2: ::fidl_next::CompatFrom::compat_from(value.s2),
21254 }
21255 }
21256 }
21257
21258 impl ::fidl_next::CompatFrom<crate::TableUnionWithVectorStructSandwichStruct>
21259 for ::fidl_test_conformance::TableUnionWithVectorStructSandwichStruct
21260 {
21261 #[inline]
21262 fn compat_from(value: crate::TableUnionWithVectorStructSandwichStruct) -> Self {
21263 Self { table: ::fidl_next::CompatFrom::compat_from(value.table) }
21264 }
21265 }
21266
21267 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TableUnionWithVectorStructSandwichStruct>
21268 for crate::TableUnionWithVectorStructSandwichStruct
21269 {
21270 #[inline]
21271 fn compat_from(
21272 value: ::fidl_test_conformance::TableUnionWithVectorStructSandwichStruct,
21273 ) -> Self {
21274 Self { table: ::fidl_next::CompatFrom::compat_from(value.table) }
21275 }
21276 }
21277
21278 impl ::fidl_next::CompatFrom<crate::TestFlexibleResourceXUnionInStruct>
21279 for ::fidl_test_conformance::TestFlexibleResourceXUnionInStruct
21280 {
21281 #[inline]
21282 fn compat_from(value: crate::TestFlexibleResourceXUnionInStruct) -> Self {
21283 Self { xu: ::fidl_next::CompatFrom::compat_from(value.xu) }
21284 }
21285 }
21286
21287 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TestFlexibleResourceXUnionInStruct>
21288 for crate::TestFlexibleResourceXUnionInStruct
21289 {
21290 #[inline]
21291 fn compat_from(value: ::fidl_test_conformance::TestFlexibleResourceXUnionInStruct) -> Self {
21292 Self { xu: ::fidl_next::CompatFrom::compat_from(value.xu) }
21293 }
21294 }
21295
21296 impl ::fidl_next::CompatFrom<crate::TestOptionalFlexibleResourceXUnionInStruct>
21297 for ::fidl_test_conformance::TestOptionalFlexibleResourceXUnionInStruct
21298 {
21299 #[inline]
21300 fn compat_from(value: crate::TestOptionalFlexibleResourceXUnionInStruct) -> Self {
21301 Self { xu: ::fidl_next::CompatFrom::compat_from(value.xu) }
21302 }
21303 }
21304
21305 impl
21306 ::fidl_next::CompatFrom<::fidl_test_conformance::TestOptionalFlexibleResourceXUnionInStruct>
21307 for crate::TestOptionalFlexibleResourceXUnionInStruct
21308 {
21309 #[inline]
21310 fn compat_from(
21311 value: ::fidl_test_conformance::TestOptionalFlexibleResourceXUnionInStruct,
21312 ) -> Self {
21313 Self { xu: ::fidl_next::CompatFrom::compat_from(value.xu) }
21314 }
21315 }
21316
21317 impl ::fidl_next::CompatFrom<crate::TestOptionalStrictResourceXUnionInStruct>
21318 for ::fidl_test_conformance::TestOptionalStrictResourceXUnionInStruct
21319 {
21320 #[inline]
21321 fn compat_from(value: crate::TestOptionalStrictResourceXUnionInStruct) -> Self {
21322 Self { xu: ::fidl_next::CompatFrom::compat_from(value.xu) }
21323 }
21324 }
21325
21326 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TestOptionalStrictResourceXUnionInStruct>
21327 for crate::TestOptionalStrictResourceXUnionInStruct
21328 {
21329 #[inline]
21330 fn compat_from(
21331 value: ::fidl_test_conformance::TestOptionalStrictResourceXUnionInStruct,
21332 ) -> Self {
21333 Self { xu: ::fidl_next::CompatFrom::compat_from(value.xu) }
21334 }
21335 }
21336
21337 impl ::fidl_next::CompatFrom<crate::TestPackageResolverResolveRequest>
21338 for ::fidl_test_conformance::TestPackageResolverResolveRequest
21339 {
21340 #[inline]
21341 fn compat_from(value: crate::TestPackageResolverResolveRequest) -> Self {
21342 Self {
21343 package_url: ::fidl_next::CompatFrom::compat_from(value.package_url),
21344
21345 selectors: ::fidl_next::CompatFrom::compat_from(value.selectors),
21346
21347 update_policy: ::fidl_next::CompatFrom::compat_from(value.update_policy),
21348
21349 this_should_be_a_handle: ::fidl_next::CompatFrom::compat_from(
21350 value.this_should_be_a_handle,
21351 ),
21352 }
21353 }
21354 }
21355
21356 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TestPackageResolverResolveRequest>
21357 for crate::TestPackageResolverResolveRequest
21358 {
21359 #[inline]
21360 fn compat_from(value: ::fidl_test_conformance::TestPackageResolverResolveRequest) -> Self {
21361 Self {
21362 package_url: ::fidl_next::CompatFrom::compat_from(value.package_url),
21363
21364 selectors: ::fidl_next::CompatFrom::compat_from(value.selectors),
21365
21366 update_policy: ::fidl_next::CompatFrom::compat_from(value.update_policy),
21367
21368 this_should_be_a_handle: ::fidl_next::CompatFrom::compat_from(
21369 value.this_should_be_a_handle,
21370 ),
21371 }
21372 }
21373 }
21374
21375 impl ::fidl_next::CompatFrom<crate::TestStrictResourceXUnionInStruct>
21376 for ::fidl_test_conformance::TestStrictResourceXUnionInStruct
21377 {
21378 #[inline]
21379 fn compat_from(value: crate::TestStrictResourceXUnionInStruct) -> Self {
21380 Self { xu: ::fidl_next::CompatFrom::compat_from(value.xu) }
21381 }
21382 }
21383
21384 impl ::fidl_next::CompatFrom<::fidl_test_conformance::TestStrictResourceXUnionInStruct>
21385 for crate::TestStrictResourceXUnionInStruct
21386 {
21387 #[inline]
21388 fn compat_from(value: ::fidl_test_conformance::TestStrictResourceXUnionInStruct) -> Self {
21389 Self { xu: ::fidl_next::CompatFrom::compat_from(value.xu) }
21390 }
21391 }
21392
21393 impl ::fidl_next::CompatFrom<crate::UnboundedNonnullableVectorOfHandles>
21394 for ::fidl_test_conformance::UnboundedNonnullableVectorOfHandles
21395 {
21396 #[inline]
21397 fn compat_from(value: crate::UnboundedNonnullableVectorOfHandles) -> Self {
21398 Self { vh0: ::fidl_next::CompatFrom::compat_from(value.vh0) }
21399 }
21400 }
21401
21402 impl ::fidl_next::CompatFrom<::fidl_test_conformance::UnboundedNonnullableVectorOfHandles>
21403 for crate::UnboundedNonnullableVectorOfHandles
21404 {
21405 #[inline]
21406 fn compat_from(
21407 value: ::fidl_test_conformance::UnboundedNonnullableVectorOfHandles,
21408 ) -> Self {
21409 Self { vh0: ::fidl_next::CompatFrom::compat_from(value.vh0) }
21410 }
21411 }
21412
21413 impl ::fidl_next::CompatFrom<crate::UnboundedNullableVectorOfHandles>
21414 for ::fidl_test_conformance::UnboundedNullableVectorOfHandles
21415 {
21416 #[inline]
21417 fn compat_from(value: crate::UnboundedNullableVectorOfHandles) -> Self {
21418 Self { vh0: ::fidl_next::CompatFrom::compat_from(value.vh0) }
21419 }
21420 }
21421
21422 impl ::fidl_next::CompatFrom<::fidl_test_conformance::UnboundedNullableVectorOfHandles>
21423 for crate::UnboundedNullableVectorOfHandles
21424 {
21425 #[inline]
21426 fn compat_from(value: ::fidl_test_conformance::UnboundedNullableVectorOfHandles) -> Self {
21427 Self { vh0: ::fidl_next::CompatFrom::compat_from(value.vh0) }
21428 }
21429 }
21430
21431 impl ::fidl_next::CompatFrom<crate::UnionOfEndpointsUnion>
21432 for ::fidl_test_conformance::UnionOfEndpointsUnion
21433 {
21434 fn compat_from(value: crate::UnionOfEndpointsUnion) -> Self {
21435 match value {
21436 crate::UnionOfEndpointsUnion::ClientEnd(value) => {
21437 Self::ClientEnd(::fidl_next::CompatFrom::compat_from(value))
21438 }
21439
21440 crate::UnionOfEndpointsUnion::ServerEnd(value) => {
21441 Self::ServerEnd(::fidl_next::CompatFrom::compat_from(value))
21442 }
21443
21444 crate::UnionOfEndpointsUnion::UnknownOrdinal_(unknown_ordinal) => {
21445 Self::__SourceBreaking { unknown_ordinal }
21446 }
21447 }
21448 }
21449 }
21450
21451 impl ::fidl_next::CompatFrom<::fidl_test_conformance::UnionOfEndpointsUnion>
21452 for crate::UnionOfEndpointsUnion
21453 {
21454 fn compat_from(value: ::fidl_test_conformance::UnionOfEndpointsUnion) -> Self {
21455 match value {
21456 ::fidl_test_conformance::UnionOfEndpointsUnion::ClientEnd(value) => {
21457 Self::ClientEnd(::fidl_next::CompatFrom::compat_from(value))
21458 }
21459
21460 ::fidl_test_conformance::UnionOfEndpointsUnion::ServerEnd(value) => {
21461 Self::ServerEnd(::fidl_next::CompatFrom::compat_from(value))
21462 }
21463
21464 ::fidl_test_conformance::UnionOfEndpointsUnion::__SourceBreaking {
21465 unknown_ordinal,
21466 } => Self::UnknownOrdinal_(unknown_ordinal),
21467 }
21468 }
21469 }
21470
21471 impl ::fidl_next::CompatFrom<crate::UnionOfEndpoints>
21472 for ::fidl_test_conformance::UnionOfEndpoints
21473 {
21474 #[inline]
21475 fn compat_from(value: crate::UnionOfEndpoints) -> Self {
21476 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
21477 }
21478 }
21479
21480 impl ::fidl_next::CompatFrom<::fidl_test_conformance::UnionOfEndpoints>
21481 for crate::UnionOfEndpoints
21482 {
21483 #[inline]
21484 fn compat_from(value: ::fidl_test_conformance::UnionOfEndpoints) -> Self {
21485 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
21486 }
21487 }
21488
21489 impl ::fidl_next::CompatFrom<crate::UnionOfHandle> for ::fidl_test_conformance::UnionOfHandle {
21490 fn compat_from(value: crate::UnionOfHandle) -> Self {
21491 match value {
21492 crate::UnionOfHandle::H(value) => {
21493 Self::H(::fidl_next::CompatFrom::compat_from(value))
21494 }
21495 }
21496 }
21497 }
21498
21499 impl ::fidl_next::CompatFrom<::fidl_test_conformance::UnionOfHandle> for crate::UnionOfHandle {
21500 fn compat_from(value: ::fidl_test_conformance::UnionOfHandle) -> Self {
21501 match value {
21502 ::fidl_test_conformance::UnionOfHandle::H(value) => {
21503 Self::H(::fidl_next::CompatFrom::compat_from(value))
21504 }
21505 }
21506 }
21507 }
21508
21509 impl ::fidl_next::CompatFrom<crate::VectorOfArrayOfEventInStructWithDefaultRights>
21510 for ::fidl_test_conformance::VectorOfArrayOfEventInStructWithDefaultRights
21511 {
21512 #[inline]
21513 fn compat_from(value: crate::VectorOfArrayOfEventInStructWithDefaultRights) -> Self {
21514 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
21515 }
21516 }
21517
21518 impl
21519 ::fidl_next::CompatFrom<
21520 ::fidl_test_conformance::VectorOfArrayOfEventInStructWithDefaultRights,
21521 > for crate::VectorOfArrayOfEventInStructWithDefaultRights
21522 {
21523 #[inline]
21524 fn compat_from(
21525 value: ::fidl_test_conformance::VectorOfArrayOfEventInStructWithDefaultRights,
21526 ) -> Self {
21527 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
21528 }
21529 }
21530
21531 impl ::fidl_next::CompatFrom<crate::VectorOfArrayOfEventInStructWithReducedRights>
21532 for ::fidl_test_conformance::VectorOfArrayOfEventInStructWithReducedRights
21533 {
21534 #[inline]
21535 fn compat_from(value: crate::VectorOfArrayOfEventInStructWithReducedRights) -> Self {
21536 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
21537 }
21538 }
21539
21540 impl
21541 ::fidl_next::CompatFrom<
21542 ::fidl_test_conformance::VectorOfArrayOfEventInStructWithReducedRights,
21543 > for crate::VectorOfArrayOfEventInStructWithReducedRights
21544 {
21545 #[inline]
21546 fn compat_from(
21547 value: ::fidl_test_conformance::VectorOfArrayOfEventInStructWithReducedRights,
21548 ) -> Self {
21549 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
21550 }
21551 }
21552
21553 impl ::fidl_next::CompatFrom<crate::VectorOfArrayOfEventInTableWithReducedRights>
21554 for ::fidl_test_conformance::VectorOfArrayOfEventInTableWithReducedRights
21555 {
21556 fn compat_from(value: crate::VectorOfArrayOfEventInTableWithReducedRights) -> Self {
21557 Self {
21558 h: ::fidl_next::CompatFrom::compat_from(value.h),
21559
21560 __source_breaking: ::fidl::marker::SourceBreaking,
21561 }
21562 }
21563 }
21564
21565 impl
21566 ::fidl_next::CompatFrom<
21567 ::fidl_test_conformance::VectorOfArrayOfEventInTableWithReducedRights,
21568 > for crate::VectorOfArrayOfEventInTableWithReducedRights
21569 {
21570 fn compat_from(
21571 value: ::fidl_test_conformance::VectorOfArrayOfEventInTableWithReducedRights,
21572 ) -> Self {
21573 Self { h: ::fidl_next::CompatFrom::compat_from(value.h) }
21574 }
21575 }
21576
21577 impl ::fidl_next::CompatFrom<crate::VectorOfArrayOfEventInTableWithReducedRightsStruct>
21578 for ::fidl_test_conformance::VectorOfArrayOfEventInTableWithReducedRightsStruct
21579 {
21580 #[inline]
21581 fn compat_from(value: crate::VectorOfArrayOfEventInTableWithReducedRightsStruct) -> Self {
21582 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
21583 }
21584 }
21585
21586 impl
21587 ::fidl_next::CompatFrom<
21588 ::fidl_test_conformance::VectorOfArrayOfEventInTableWithReducedRightsStruct,
21589 > for crate::VectorOfArrayOfEventInTableWithReducedRightsStruct
21590 {
21591 #[inline]
21592 fn compat_from(
21593 value: ::fidl_test_conformance::VectorOfArrayOfEventInTableWithReducedRightsStruct,
21594 ) -> Self {
21595 Self { t: ::fidl_next::CompatFrom::compat_from(value.t) }
21596 }
21597 }
21598
21599 impl ::fidl_next::CompatFrom<crate::VectorOfArrayOfEventInUnionWithReducedRights>
21600 for ::fidl_test_conformance::VectorOfArrayOfEventInUnionWithReducedRights
21601 {
21602 fn compat_from(value: crate::VectorOfArrayOfEventInUnionWithReducedRights) -> Self {
21603 match value {
21604 crate::VectorOfArrayOfEventInUnionWithReducedRights::H(value) => {
21605 Self::H(::fidl_next::CompatFrom::compat_from(value))
21606 }
21607 }
21608 }
21609 }
21610
21611 impl
21612 ::fidl_next::CompatFrom<
21613 ::fidl_test_conformance::VectorOfArrayOfEventInUnionWithReducedRights,
21614 > for crate::VectorOfArrayOfEventInUnionWithReducedRights
21615 {
21616 fn compat_from(
21617 value: ::fidl_test_conformance::VectorOfArrayOfEventInUnionWithReducedRights,
21618 ) -> Self {
21619 match value {
21620 ::fidl_test_conformance::VectorOfArrayOfEventInUnionWithReducedRights::H(value) => {
21621 Self::H(::fidl_next::CompatFrom::compat_from(value))
21622 }
21623 }
21624 }
21625 }
21626
21627 impl ::fidl_next::CompatFrom<crate::VectorOfArrayOfEventInUnionWithReducedRightsStruct>
21628 for ::fidl_test_conformance::VectorOfArrayOfEventInUnionWithReducedRightsStruct
21629 {
21630 #[inline]
21631 fn compat_from(value: crate::VectorOfArrayOfEventInUnionWithReducedRightsStruct) -> Self {
21632 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
21633 }
21634 }
21635
21636 impl
21637 ::fidl_next::CompatFrom<
21638 ::fidl_test_conformance::VectorOfArrayOfEventInUnionWithReducedRightsStruct,
21639 > for crate::VectorOfArrayOfEventInUnionWithReducedRightsStruct
21640 {
21641 #[inline]
21642 fn compat_from(
21643 value: ::fidl_test_conformance::VectorOfArrayOfEventInUnionWithReducedRightsStruct,
21644 ) -> Self {
21645 Self { u: ::fidl_next::CompatFrom::compat_from(value.u) }
21646 }
21647 }
21648
21649 impl ::fidl_next::CompatFrom<crate::VectorOfHandles> for ::fidl_test_conformance::VectorOfHandles {
21650 #[inline]
21651 fn compat_from(value: crate::VectorOfHandles) -> Self {
21652 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
21653 }
21654 }
21655
21656 impl ::fidl_next::CompatFrom<::fidl_test_conformance::VectorOfHandles> for crate::VectorOfHandles {
21657 #[inline]
21658 fn compat_from(value: ::fidl_test_conformance::VectorOfHandles) -> Self {
21659 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
21660 }
21661 }
21662
21663 impl ::fidl_next::CompatFrom<crate::VectorOfOptionalHandles>
21664 for ::fidl_test_conformance::VectorOfOptionalHandles
21665 {
21666 #[inline]
21667 fn compat_from(value: crate::VectorOfOptionalHandles) -> Self {
21668 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
21669 }
21670 }
21671
21672 impl ::fidl_next::CompatFrom<::fidl_test_conformance::VectorOfOptionalHandles>
21673 for crate::VectorOfOptionalHandles
21674 {
21675 #[inline]
21676 fn compat_from(value: ::fidl_test_conformance::VectorOfOptionalHandles) -> Self {
21677 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
21678 }
21679 }
21680
21681 impl ::fidl_next::CompatFrom<crate::VectorOfUpTo2Handles>
21682 for ::fidl_test_conformance::VectorOfUpTo2Handles
21683 {
21684 #[inline]
21685 fn compat_from(value: crate::VectorOfUpTo2Handles) -> Self {
21686 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
21687 }
21688 }
21689
21690 impl ::fidl_next::CompatFrom<::fidl_test_conformance::VectorOfUpTo2Handles>
21691 for crate::VectorOfUpTo2Handles
21692 {
21693 #[inline]
21694 fn compat_from(value: ::fidl_test_conformance::VectorOfUpTo2Handles) -> Self {
21695 Self { v: ::fidl_next::CompatFrom::compat_from(value.v) }
21696 }
21697 }
21698}