1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_test_conformance::natural::*;
8
9 #[derive(Debug, PartialEq)]
10 pub struct AlternatingHandlesAndFailures {
11 pub h1: ::fidl_next::fuchsia::zx::NullableHandle,
12
13 pub failure_trigger1: ::std::string::String,
14
15 pub h2: ::fidl_next::fuchsia::zx::NullableHandle,
16
17 pub failure_trigger2: ::std::string::String,
18
19 pub h3: ::fidl_next::fuchsia::zx::NullableHandle,
20 }
21
22 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
23 for AlternatingHandlesAndFailures
24 where
25 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
26 ___E: ::fidl_next::Encoder,
27 ___E: ::fidl_next::fuchsia::HandleEncoder,
28 {
29 #[inline]
30 fn encode(
31 self,
32 encoder_: &mut ___E,
33 out_: &mut ::core::mem::MaybeUninit<
34 crate::wire::AlternatingHandlesAndFailures<'static>,
35 >,
36 _: (),
37 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
38 ::fidl_next::munge! {
39 let crate::wire::AlternatingHandlesAndFailures {
40 h1,
41 failure_trigger1,
42 h2,
43 failure_trigger2,
44 h3,
45
46 } = out_;
47 }
48
49 ::fidl_next::Encode::encode(self.h1, encoder_, h1, ())?;
50
51 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h1.as_mut_ptr()) };
52
53 ::fidl_next::Encode::encode(self.failure_trigger1, encoder_, failure_trigger1, 1)?;
54
55 let mut _field =
56 unsafe { ::fidl_next::Slot::new_unchecked(failure_trigger1.as_mut_ptr()) };
57 ::fidl_next::Constrained::validate(_field, 1)?;
58
59 ::fidl_next::Encode::encode(self.h2, encoder_, h2, ())?;
60
61 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h2.as_mut_ptr()) };
62
63 ::fidl_next::Encode::encode(self.failure_trigger2, encoder_, failure_trigger2, 1)?;
64
65 let mut _field =
66 unsafe { ::fidl_next::Slot::new_unchecked(failure_trigger2.as_mut_ptr()) };
67 ::fidl_next::Constrained::validate(_field, 1)?;
68
69 ::fidl_next::Encode::encode(self.h3, encoder_, h3, ())?;
70
71 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h3.as_mut_ptr()) };
72
73 Ok(())
74 }
75 }
76
77 unsafe impl<___E>
78 ::fidl_next::EncodeOption<
79 ::fidl_next::wire::Box<'static, crate::wire::AlternatingHandlesAndFailures<'static>>,
80 ___E,
81 > for AlternatingHandlesAndFailures
82 where
83 ___E: ::fidl_next::Encoder + ?Sized,
84 AlternatingHandlesAndFailures:
85 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>,
86 {
87 #[inline]
88 fn encode_option(
89 this: ::core::option::Option<Self>,
90 encoder: &mut ___E,
91 out: &mut ::core::mem::MaybeUninit<
92 ::fidl_next::wire::Box<
93 'static,
94 crate::wire::AlternatingHandlesAndFailures<'static>,
95 >,
96 >,
97 _: (),
98 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
99 if let Some(inner) = this {
100 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
101 ::fidl_next::wire::Box::encode_present(out);
102 } else {
103 ::fidl_next::wire::Box::encode_absent(out);
104 }
105
106 Ok(())
107 }
108 }
109
110 impl<'de> ::fidl_next::FromWire<crate::wire::AlternatingHandlesAndFailures<'de>>
111 for AlternatingHandlesAndFailures
112 {
113 #[inline]
114 fn from_wire(wire: crate::wire::AlternatingHandlesAndFailures<'de>) -> Self {
115 Self {
116 h1: ::fidl_next::FromWire::from_wire(wire.h1),
117
118 failure_trigger1: ::fidl_next::FromWire::from_wire(wire.failure_trigger1),
119
120 h2: ::fidl_next::FromWire::from_wire(wire.h2),
121
122 failure_trigger2: ::fidl_next::FromWire::from_wire(wire.failure_trigger2),
123
124 h3: ::fidl_next::FromWire::from_wire(wire.h3),
125 }
126 }
127 }
128
129 #[derive(Debug, PartialEq)]
130 #[repr(C)]
131 pub struct ArrayOfArrayOfNonnullableHandles {
132 pub handles: [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4],
133 }
134
135 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
136 for ArrayOfArrayOfNonnullableHandles
137 where
138 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
139 ___E: ::fidl_next::fuchsia::HandleEncoder,
140 {
141 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
142 Self,
143 crate::wire::ArrayOfArrayOfNonnullableHandles,
144 > = unsafe {
145 ::fidl_next::CopyOptimization::enable_if(
146 true
147
148 && <
149 [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4] as ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>
150 >::COPY_OPTIMIZATION.is_enabled()
151
152 )
153 };
154
155 #[inline]
156 fn encode(
157 self,
158 encoder_: &mut ___E,
159 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
160 _: (),
161 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
162 ::fidl_next::munge! {
163 let crate::wire::ArrayOfArrayOfNonnullableHandles {
164 handles,
165
166 } = out_;
167 }
168
169 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
170
171 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
172
173 Ok(())
174 }
175 }
176
177 unsafe impl<___E>
178 ::fidl_next::EncodeOption<
179 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfArrayOfNonnullableHandles>,
180 ___E,
181 > for ArrayOfArrayOfNonnullableHandles
182 where
183 ___E: ::fidl_next::Encoder + ?Sized,
184 ArrayOfArrayOfNonnullableHandles:
185 ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>,
186 {
187 #[inline]
188 fn encode_option(
189 this: ::core::option::Option<Self>,
190 encoder: &mut ___E,
191 out: &mut ::core::mem::MaybeUninit<
192 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfArrayOfNonnullableHandles>,
193 >,
194 _: (),
195 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
196 if let Some(inner) = this {
197 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
198 ::fidl_next::wire::Box::encode_present(out);
199 } else {
200 ::fidl_next::wire::Box::encode_absent(out);
201 }
202
203 Ok(())
204 }
205 }
206
207 impl ::fidl_next::FromWire<crate::wire::ArrayOfArrayOfNonnullableHandles>
208 for ArrayOfArrayOfNonnullableHandles
209 {
210 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
211 crate::wire::ArrayOfArrayOfNonnullableHandles,
212 Self,
213 > = unsafe {
214 ::fidl_next::CopyOptimization::enable_if(
215 true
216
217 && <
218 [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4] as ::fidl_next::FromWire<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4]>
219 >::COPY_OPTIMIZATION.is_enabled()
220
221 )
222 };
223
224 #[inline]
225 fn from_wire(wire: crate::wire::ArrayOfArrayOfNonnullableHandles) -> Self {
226 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
227 }
228 }
229
230 #[derive(Debug, PartialEq)]
231 #[repr(C)]
232 pub struct ArrayOfHandles {
233 pub a: [::fidl_next::fuchsia::zx::NullableHandle; 3],
234 }
235
236 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E> for ArrayOfHandles
237 where
238 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
239 ___E: ::fidl_next::fuchsia::HandleEncoder,
240 {
241 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ArrayOfHandles> = unsafe {
242 ::fidl_next::CopyOptimization::enable_if(
243 true && <[::fidl_next::fuchsia::zx::NullableHandle; 3] as ::fidl_next::Encode<
244 [::fidl_next::wire::fuchsia::NullableHandle; 3],
245 ___E,
246 >>::COPY_OPTIMIZATION
247 .is_enabled(),
248 )
249 };
250
251 #[inline]
252 fn encode(
253 self,
254 encoder_: &mut ___E,
255 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
256 _: (),
257 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
258 ::fidl_next::munge! {
259 let crate::wire::ArrayOfHandles {
260 a,
261
262 } = out_;
263 }
264
265 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
266
267 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) };
268
269 Ok(())
270 }
271 }
272
273 unsafe impl<___E>
274 ::fidl_next::EncodeOption<
275 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfHandles>,
276 ___E,
277 > for ArrayOfHandles
278 where
279 ___E: ::fidl_next::Encoder + ?Sized,
280 ArrayOfHandles: ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E>,
281 {
282 #[inline]
283 fn encode_option(
284 this: ::core::option::Option<Self>,
285 encoder: &mut ___E,
286 out: &mut ::core::mem::MaybeUninit<
287 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfHandles>,
288 >,
289 _: (),
290 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
291 if let Some(inner) = this {
292 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
293 ::fidl_next::wire::Box::encode_present(out);
294 } else {
295 ::fidl_next::wire::Box::encode_absent(out);
296 }
297
298 Ok(())
299 }
300 }
301
302 impl ::fidl_next::FromWire<crate::wire::ArrayOfHandles> for ArrayOfHandles {
303 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ArrayOfHandles, Self> = unsafe {
304 ::fidl_next::CopyOptimization::enable_if(
305 true && <[::fidl_next::fuchsia::zx::NullableHandle; 3] as ::fidl_next::FromWire<
306 [::fidl_next::wire::fuchsia::NullableHandle; 3],
307 >>::COPY_OPTIMIZATION
308 .is_enabled(),
309 )
310 };
311
312 #[inline]
313 fn from_wire(wire: crate::wire::ArrayOfHandles) -> Self {
314 Self { a: ::fidl_next::FromWire::from_wire(wire.a) }
315 }
316 }
317
318 #[derive(Debug, PartialEq)]
319 #[repr(C)]
320 pub struct ArrayOfNonnullableHandles {
321 pub handles: [::fidl_next::fuchsia::zx::NullableHandle; 4],
322 }
323
324 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
325 for ArrayOfNonnullableHandles
326 where
327 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
328 ___E: ::fidl_next::fuchsia::HandleEncoder,
329 {
330 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
331 Self,
332 crate::wire::ArrayOfNonnullableHandles,
333 > = unsafe {
334 ::fidl_next::CopyOptimization::enable_if(
335 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::Encode<
336 [::fidl_next::wire::fuchsia::NullableHandle; 4],
337 ___E,
338 >>::COPY_OPTIMIZATION
339 .is_enabled(),
340 )
341 };
342
343 #[inline]
344 fn encode(
345 self,
346 encoder_: &mut ___E,
347 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
348 _: (),
349 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
350 ::fidl_next::munge! {
351 let crate::wire::ArrayOfNonnullableHandles {
352 handles,
353
354 } = out_;
355 }
356
357 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
358
359 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
360
361 Ok(())
362 }
363 }
364
365 unsafe impl<___E>
366 ::fidl_next::EncodeOption<
367 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNonnullableHandles>,
368 ___E,
369 > for ArrayOfNonnullableHandles
370 where
371 ___E: ::fidl_next::Encoder + ?Sized,
372 ArrayOfNonnullableHandles:
373 ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>,
374 {
375 #[inline]
376 fn encode_option(
377 this: ::core::option::Option<Self>,
378 encoder: &mut ___E,
379 out: &mut ::core::mem::MaybeUninit<
380 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNonnullableHandles>,
381 >,
382 _: (),
383 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
384 if let Some(inner) = this {
385 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
386 ::fidl_next::wire::Box::encode_present(out);
387 } else {
388 ::fidl_next::wire::Box::encode_absent(out);
389 }
390
391 Ok(())
392 }
393 }
394
395 impl ::fidl_next::FromWire<crate::wire::ArrayOfNonnullableHandles> for ArrayOfNonnullableHandles {
396 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
397 crate::wire::ArrayOfNonnullableHandles,
398 Self,
399 > = unsafe {
400 ::fidl_next::CopyOptimization::enable_if(
401 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::FromWire<
402 [::fidl_next::wire::fuchsia::NullableHandle; 4],
403 >>::COPY_OPTIMIZATION
404 .is_enabled(),
405 )
406 };
407
408 #[inline]
409 fn from_wire(wire: crate::wire::ArrayOfNonnullableHandles) -> Self {
410 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
411 }
412 }
413
414 #[derive(Debug, PartialEq)]
415 #[repr(C)]
416 pub struct ArrayOfNullableHandles {
417 pub handles: [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5],
418 }
419
420 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
421 for ArrayOfNullableHandles
422 where
423 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
424 ___E: ::fidl_next::fuchsia::HandleEncoder,
425 {
426 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
427 Self,
428 crate::wire::ArrayOfNullableHandles,
429 > = unsafe {
430 ::fidl_next::CopyOptimization::enable_if(
431 true
432
433 && <
434 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5] as ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>
435 >::COPY_OPTIMIZATION.is_enabled()
436
437 )
438 };
439
440 #[inline]
441 fn encode(
442 self,
443 encoder_: &mut ___E,
444 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
445 _: (),
446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
447 ::fidl_next::munge! {
448 let crate::wire::ArrayOfNullableHandles {
449 handles,
450
451 } = out_;
452 }
453
454 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
455
456 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
457
458 Ok(())
459 }
460 }
461
462 unsafe impl<___E>
463 ::fidl_next::EncodeOption<
464 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNullableHandles>,
465 ___E,
466 > for ArrayOfNullableHandles
467 where
468 ___E: ::fidl_next::Encoder + ?Sized,
469 ArrayOfNullableHandles: ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>,
470 {
471 #[inline]
472 fn encode_option(
473 this: ::core::option::Option<Self>,
474 encoder: &mut ___E,
475 out: &mut ::core::mem::MaybeUninit<
476 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNullableHandles>,
477 >,
478 _: (),
479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
480 if let Some(inner) = this {
481 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
482 ::fidl_next::wire::Box::encode_present(out);
483 } else {
484 ::fidl_next::wire::Box::encode_absent(out);
485 }
486
487 Ok(())
488 }
489 }
490
491 impl ::fidl_next::FromWire<crate::wire::ArrayOfNullableHandles> for ArrayOfNullableHandles {
492 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
493 crate::wire::ArrayOfNullableHandles,
494 Self,
495 > = unsafe {
496 ::fidl_next::CopyOptimization::enable_if(
497 true
498
499 && <
500 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5] as ::fidl_next::FromWire<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5]>
501 >::COPY_OPTIMIZATION.is_enabled()
502
503 )
504 };
505
506 #[inline]
507 fn from_wire(wire: crate::wire::ArrayOfNullableHandles) -> Self {
508 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
509 }
510 }
511
512 #[derive(Debug, PartialEq)]
513 #[repr(C)]
514 pub struct ArrayOfOptionalHandles {
515 pub a: [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3],
516 }
517
518 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
519 for ArrayOfOptionalHandles
520 where
521 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
522 ___E: ::fidl_next::fuchsia::HandleEncoder,
523 {
524 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
525 Self,
526 crate::wire::ArrayOfOptionalHandles,
527 > = unsafe {
528 ::fidl_next::CopyOptimization::enable_if(
529 true
530
531 && <
532 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3] as ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>
533 >::COPY_OPTIMIZATION.is_enabled()
534
535 )
536 };
537
538 #[inline]
539 fn encode(
540 self,
541 encoder_: &mut ___E,
542 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
543 _: (),
544 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
545 ::fidl_next::munge! {
546 let crate::wire::ArrayOfOptionalHandles {
547 a,
548
549 } = out_;
550 }
551
552 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
553
554 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) };
555
556 Ok(())
557 }
558 }
559
560 unsafe impl<___E>
561 ::fidl_next::EncodeOption<
562 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfOptionalHandles>,
563 ___E,
564 > for ArrayOfOptionalHandles
565 where
566 ___E: ::fidl_next::Encoder + ?Sized,
567 ArrayOfOptionalHandles: ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>,
568 {
569 #[inline]
570 fn encode_option(
571 this: ::core::option::Option<Self>,
572 encoder: &mut ___E,
573 out: &mut ::core::mem::MaybeUninit<
574 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfOptionalHandles>,
575 >,
576 _: (),
577 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
578 if let Some(inner) = this {
579 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
580 ::fidl_next::wire::Box::encode_present(out);
581 } else {
582 ::fidl_next::wire::Box::encode_absent(out);
583 }
584
585 Ok(())
586 }
587 }
588
589 impl ::fidl_next::FromWire<crate::wire::ArrayOfOptionalHandles> for ArrayOfOptionalHandles {
590 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
591 crate::wire::ArrayOfOptionalHandles,
592 Self,
593 > = unsafe {
594 ::fidl_next::CopyOptimization::enable_if(
595 true
596
597 && <
598 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3] as ::fidl_next::FromWire<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3]>
599 >::COPY_OPTIMIZATION.is_enabled()
600
601 )
602 };
603
604 #[inline]
605 fn from_wire(wire: crate::wire::ArrayOfOptionalHandles) -> Self {
606 Self { a: ::fidl_next::FromWire::from_wire(wire.a) }
607 }
608 }
609
610 #[derive(Debug, PartialEq)]
611 pub struct ArrayOfVectorOfEventInStructWithDefaultRights {
612 pub h: [::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1],
613 }
614
615 unsafe impl<___E>
616 ::fidl_next::Encode<
617 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
618 ___E,
619 > for ArrayOfVectorOfEventInStructWithDefaultRights
620 where
621 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
622 ___E: ::fidl_next::Encoder,
623 ___E: ::fidl_next::fuchsia::HandleEncoder,
624 {
625 #[inline]
626 fn encode(
627 self,
628 encoder_: &mut ___E,
629 out_: &mut ::core::mem::MaybeUninit<
630 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
631 >,
632 _: (),
633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
634 ::fidl_next::munge! {
635 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
636 h,
637
638 } = out_;
639 }
640
641 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
642
643 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
644 ::fidl_next::Constrained::validate(_field, (1, ()))?;
645
646 Ok(())
647 }
648 }
649
650 unsafe impl<___E>
651 ::fidl_next::EncodeOption<
652 ::fidl_next::wire::Box<
653 'static,
654 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
655 >,
656 ___E,
657 > for ArrayOfVectorOfEventInStructWithDefaultRights
658 where
659 ___E: ::fidl_next::Encoder + ?Sized,
660 ArrayOfVectorOfEventInStructWithDefaultRights: ::fidl_next::Encode<
661 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
662 ___E,
663 >,
664 {
665 #[inline]
666 fn encode_option(
667 this: ::core::option::Option<Self>,
668 encoder: &mut ___E,
669 out: &mut ::core::mem::MaybeUninit<
670 ::fidl_next::wire::Box<
671 'static,
672 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
673 >,
674 >,
675 _: (),
676 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
677 if let Some(inner) = this {
678 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
679 ::fidl_next::wire::Box::encode_present(out);
680 } else {
681 ::fidl_next::wire::Box::encode_absent(out);
682 }
683
684 Ok(())
685 }
686 }
687
688 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'de>>
689 for ArrayOfVectorOfEventInStructWithDefaultRights
690 {
691 #[inline]
692 fn from_wire(
693 wire: crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'de>,
694 ) -> Self {
695 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
696 }
697 }
698
699 #[derive(Debug, PartialEq)]
700 pub struct ArrayOfVectorOfEventInStructWithReducedRights {
701 pub h: [::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1],
702 }
703
704 unsafe impl<___E>
705 ::fidl_next::Encode<
706 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
707 ___E,
708 > for ArrayOfVectorOfEventInStructWithReducedRights
709 where
710 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
711 ___E: ::fidl_next::Encoder,
712 ___E: ::fidl_next::fuchsia::HandleEncoder,
713 {
714 #[inline]
715 fn encode(
716 self,
717 encoder_: &mut ___E,
718 out_: &mut ::core::mem::MaybeUninit<
719 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
720 >,
721 _: (),
722 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
723 ::fidl_next::munge! {
724 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
725 h,
726
727 } = out_;
728 }
729
730 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
731
732 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
733 ::fidl_next::Constrained::validate(_field, (1, ()))?;
734
735 Ok(())
736 }
737 }
738
739 unsafe impl<___E>
740 ::fidl_next::EncodeOption<
741 ::fidl_next::wire::Box<
742 'static,
743 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
744 >,
745 ___E,
746 > for ArrayOfVectorOfEventInStructWithReducedRights
747 where
748 ___E: ::fidl_next::Encoder + ?Sized,
749 ArrayOfVectorOfEventInStructWithReducedRights: ::fidl_next::Encode<
750 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
751 ___E,
752 >,
753 {
754 #[inline]
755 fn encode_option(
756 this: ::core::option::Option<Self>,
757 encoder: &mut ___E,
758 out: &mut ::core::mem::MaybeUninit<
759 ::fidl_next::wire::Box<
760 'static,
761 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
762 >,
763 >,
764 _: (),
765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
766 if let Some(inner) = this {
767 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
768 ::fidl_next::wire::Box::encode_present(out);
769 } else {
770 ::fidl_next::wire::Box::encode_absent(out);
771 }
772
773 Ok(())
774 }
775 }
776
777 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'de>>
778 for ArrayOfVectorOfEventInStructWithReducedRights
779 {
780 #[inline]
781 fn from_wire(
782 wire: crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'de>,
783 ) -> Self {
784 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
785 }
786 }
787
788 #[derive(Debug, Default, PartialEq)]
789 pub struct ArrayOfVectorOfEventInTableWithDefaultRights {
790 pub h: ::core::option::Option<[::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]>,
791 }
792
793 impl ArrayOfVectorOfEventInTableWithDefaultRights {
794 fn __max_ordinal(&self) -> usize {
795 if self.h.is_some() {
796 return 1;
797 }
798
799 0
800 }
801 }
802
803 unsafe impl<___E>
804 ::fidl_next::Encode<
805 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
806 ___E,
807 > for ArrayOfVectorOfEventInTableWithDefaultRights
808 where
809 ___E: ::fidl_next::Encoder + ?Sized,
810 ___E: ::fidl_next::fuchsia::HandleEncoder,
811 {
812 #[inline]
813 fn encode(
814 mut self,
815 encoder: &mut ___E,
816 out: &mut ::core::mem::MaybeUninit<
817 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
818 >,
819 _: (),
820 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
821 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights { table } = out);
822
823 let max_ord = self.__max_ordinal();
824
825 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
826 ::fidl_next::Wire::zero_padding(&mut out);
827
828 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
829 ::fidl_next::wire::Envelope,
830 >(encoder, max_ord);
831
832 for i in 1..=max_ord {
833 match i {
834 1 => {
835 if let Some(value) = self.h.take() {
836 ::fidl_next::wire::Envelope::encode_value::<
837 [::fidl_next::wire::Vector<
838 'static,
839 ::fidl_next::wire::fuchsia::Event,
840 >; 1],
841 ___E,
842 >(
843 value, preallocated.encoder, &mut out, (1, ())
844 )?;
845 } else {
846 ::fidl_next::wire::Envelope::encode_zero(&mut out)
847 }
848 }
849
850 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
851 }
852 unsafe {
853 preallocated.write_next(out.assume_init_ref());
854 }
855 }
856
857 ::fidl_next::wire::Table::encode_len(table, max_ord);
858
859 Ok(())
860 }
861 }
862
863 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>>
864 for ArrayOfVectorOfEventInTableWithDefaultRights
865 {
866 #[inline]
867 fn from_wire(
868 wire_: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>,
869 ) -> Self {
870 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
871
872 let h = wire_.table.get(1);
873
874 Self {
875
876
877 h: h.map(|envelope| ::fidl_next::FromWire::from_wire(
878 unsafe { envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>() }
879 )),
880
881 }
882 }
883 }
884
885 #[derive(Debug, PartialEq)]
886 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
887 pub t: crate::natural::ArrayOfVectorOfEventInTableWithDefaultRights,
888 }
889
890 unsafe impl<___E>
891 ::fidl_next::Encode<
892 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
893 ___E,
894 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
895 where
896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
897 ___E: ::fidl_next::Encoder,
898 ___E: ::fidl_next::fuchsia::HandleEncoder,
899 {
900 #[inline]
901 fn encode(
902 self,
903 encoder_: &mut ___E,
904 out_: &mut ::core::mem::MaybeUninit<
905 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
906 >,
907 _: (),
908 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
909 ::fidl_next::munge! {
910 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
911 t,
912
913 } = out_;
914 }
915
916 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
917
918 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
919
920 Ok(())
921 }
922 }
923
924 unsafe impl<___E>
925 ::fidl_next::EncodeOption<
926 ::fidl_next::wire::Box<
927 'static,
928 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
929 >,
930 ___E,
931 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
932 where
933 ___E: ::fidl_next::Encoder + ?Sized,
934 ArrayOfVectorOfEventInTableWithDefaultRightsStruct: ::fidl_next::Encode<
935 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
936 ___E,
937 >,
938 {
939 #[inline]
940 fn encode_option(
941 this: ::core::option::Option<Self>,
942 encoder: &mut ___E,
943 out: &mut ::core::mem::MaybeUninit<
944 ::fidl_next::wire::Box<
945 'static,
946 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
947 >,
948 >,
949 _: (),
950 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
951 if let Some(inner) = this {
952 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
953 ::fidl_next::wire::Box::encode_present(out);
954 } else {
955 ::fidl_next::wire::Box::encode_absent(out);
956 }
957
958 Ok(())
959 }
960 }
961
962 impl<'de>
963 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>>
964 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
965 {
966 #[inline]
967 fn from_wire(
968 wire: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>,
969 ) -> Self {
970 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
971 }
972 }
973
974 #[derive(Debug, Default, PartialEq)]
975 pub struct ArrayOfVectorOfEventInTableWithReducedRights {
976 pub h: ::core::option::Option<[::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]>,
977 }
978
979 impl ArrayOfVectorOfEventInTableWithReducedRights {
980 fn __max_ordinal(&self) -> usize {
981 if self.h.is_some() {
982 return 1;
983 }
984
985 0
986 }
987 }
988
989 unsafe impl<___E>
990 ::fidl_next::Encode<
991 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
992 ___E,
993 > for ArrayOfVectorOfEventInTableWithReducedRights
994 where
995 ___E: ::fidl_next::Encoder + ?Sized,
996 ___E: ::fidl_next::fuchsia::HandleEncoder,
997 {
998 #[inline]
999 fn encode(
1000 mut self,
1001 encoder: &mut ___E,
1002 out: &mut ::core::mem::MaybeUninit<
1003 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
1004 >,
1005 _: (),
1006 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1007 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInTableWithReducedRights { table } = out);
1008
1009 let max_ord = self.__max_ordinal();
1010
1011 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1012 ::fidl_next::Wire::zero_padding(&mut out);
1013
1014 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1015 ::fidl_next::wire::Envelope,
1016 >(encoder, max_ord);
1017
1018 for i in 1..=max_ord {
1019 match i {
1020 1 => {
1021 if let Some(value) = self.h.take() {
1022 ::fidl_next::wire::Envelope::encode_value::<
1023 [::fidl_next::wire::Vector<
1024 'static,
1025 ::fidl_next::wire::fuchsia::Event,
1026 >; 1],
1027 ___E,
1028 >(
1029 value, preallocated.encoder, &mut out, (1, ())
1030 )?;
1031 } else {
1032 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1033 }
1034 }
1035
1036 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1037 }
1038 unsafe {
1039 preallocated.write_next(out.assume_init_ref());
1040 }
1041 }
1042
1043 ::fidl_next::wire::Table::encode_len(table, max_ord);
1044
1045 Ok(())
1046 }
1047 }
1048
1049 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>>
1050 for ArrayOfVectorOfEventInTableWithReducedRights
1051 {
1052 #[inline]
1053 fn from_wire(
1054 wire_: crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>,
1055 ) -> Self {
1056 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1057
1058 let h = wire_.table.get(1);
1059
1060 Self {
1061
1062
1063 h: h.map(|envelope| ::fidl_next::FromWire::from_wire(
1064 unsafe { envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>() }
1065 )),
1066
1067 }
1068 }
1069 }
1070
1071 #[derive(Debug, PartialEq)]
1072 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct {
1073 pub t: crate::natural::ArrayOfVectorOfEventInTableWithReducedRights,
1074 }
1075
1076 unsafe impl<___E>
1077 ::fidl_next::Encode<
1078 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1079 ___E,
1080 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1081 where
1082 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1083 ___E: ::fidl_next::Encoder,
1084 ___E: ::fidl_next::fuchsia::HandleEncoder,
1085 {
1086 #[inline]
1087 fn encode(
1088 self,
1089 encoder_: &mut ___E,
1090 out_: &mut ::core::mem::MaybeUninit<
1091 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1092 >,
1093 _: (),
1094 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1095 ::fidl_next::munge! {
1096 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
1097 t,
1098
1099 } = out_;
1100 }
1101
1102 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
1103
1104 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
1105
1106 Ok(())
1107 }
1108 }
1109
1110 unsafe impl<___E>
1111 ::fidl_next::EncodeOption<
1112 ::fidl_next::wire::Box<
1113 'static,
1114 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1115 >,
1116 ___E,
1117 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1118 where
1119 ___E: ::fidl_next::Encoder + ?Sized,
1120 ArrayOfVectorOfEventInTableWithReducedRightsStruct: ::fidl_next::Encode<
1121 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1122 ___E,
1123 >,
1124 {
1125 #[inline]
1126 fn encode_option(
1127 this: ::core::option::Option<Self>,
1128 encoder: &mut ___E,
1129 out: &mut ::core::mem::MaybeUninit<
1130 ::fidl_next::wire::Box<
1131 'static,
1132 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1133 >,
1134 >,
1135 _: (),
1136 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1137 if let Some(inner) = this {
1138 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1139 ::fidl_next::wire::Box::encode_present(out);
1140 } else {
1141 ::fidl_next::wire::Box::encode_absent(out);
1142 }
1143
1144 Ok(())
1145 }
1146 }
1147
1148 impl<'de>
1149 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>>
1150 for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1151 {
1152 #[inline]
1153 fn from_wire(
1154 wire: crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>,
1155 ) -> Self {
1156 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
1157 }
1158 }
1159
1160 #[derive(Debug, PartialEq)]
1161 pub enum ArrayOfVectorOfEventInUnionWithDefaultRights {
1162 H([::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]),
1163 }
1164
1165 unsafe impl<___E>
1166 ::fidl_next::Encode<
1167 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1168 ___E,
1169 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1170 where
1171 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1172 ___E: ::fidl_next::Encoder,
1173 ___E: ::fidl_next::fuchsia::HandleEncoder,
1174 {
1175 #[inline]
1176 fn encode(
1177 self,
1178 encoder: &mut ___E,
1179 out: &mut ::core::mem::MaybeUninit<
1180 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1181 >,
1182 _: (),
1183 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1184 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights { raw, _phantom: _ } = out);
1185
1186 match self {
1187 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
1188 ___E,
1189 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
1190 >(value, 1, encoder, raw, (1, ()))?,
1191 }
1192
1193 Ok(())
1194 }
1195 }
1196
1197 unsafe impl<___E>
1198 ::fidl_next::EncodeOption<
1199 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1200 ___E,
1201 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1202 where
1203 ___E: ?Sized,
1204 ArrayOfVectorOfEventInUnionWithDefaultRights: ::fidl_next::Encode<
1205 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1206 ___E,
1207 >,
1208 {
1209 #[inline]
1210 fn encode_option(
1211 this: ::core::option::Option<Self>,
1212 encoder: &mut ___E,
1213 out: &mut ::core::mem::MaybeUninit<
1214 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1215 >,
1216 _: (),
1217 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1218 ::fidl_next::munge!(let crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights { raw, _phantom: _ } = &mut *out);
1219
1220 if let Some(inner) = this {
1221 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1222 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1223 } else {
1224 ::fidl_next::wire::Union::encode_absent(raw);
1225 }
1226
1227 Ok(())
1228 }
1229 }
1230
1231 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
1232 for ArrayOfVectorOfEventInUnionWithDefaultRights
1233 {
1234 #[inline]
1235 fn from_wire(wire: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>) -> Self {
1236 let wire = ::core::mem::ManuallyDrop::new(wire);
1237 match wire.raw.ordinal() {
1238 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
1239 wire.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
1240 })),
1241
1242 _ => unsafe { ::core::hint::unreachable_unchecked() },
1243 }
1244 }
1245 }
1246
1247 impl<'de>
1248 ::fidl_next::FromWireOption<
1249 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1250 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1251 {
1252 #[inline]
1253 fn from_wire_option(
1254 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1255 ) -> ::core::option::Option<Self> {
1256 if let Some(inner) = wire.into_option() {
1257 Some(::fidl_next::FromWire::from_wire(inner))
1258 } else {
1259 None
1260 }
1261 }
1262 }
1263
1264 impl<'de>
1265 ::fidl_next::FromWireOption<
1266 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1267 > for Box<ArrayOfVectorOfEventInUnionWithDefaultRights>
1268 {
1269 #[inline]
1270 fn from_wire_option(
1271 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1272 ) -> ::core::option::Option<Self> {
1273 <ArrayOfVectorOfEventInUnionWithDefaultRights as ::fidl_next::FromWireOption<
1274 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1275 >>::from_wire_option(wire)
1276 .map(Box::new)
1277 }
1278 }
1279
1280 #[derive(Debug, PartialEq)]
1281 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
1282 pub u: crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights,
1283 }
1284
1285 unsafe impl<___E>
1286 ::fidl_next::Encode<
1287 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1288 ___E,
1289 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1290 where
1291 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1292 ___E: ::fidl_next::Encoder,
1293 ___E: ::fidl_next::fuchsia::HandleEncoder,
1294 {
1295 #[inline]
1296 fn encode(
1297 self,
1298 encoder_: &mut ___E,
1299 out_: &mut ::core::mem::MaybeUninit<
1300 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1301 >,
1302 _: (),
1303 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1304 ::fidl_next::munge! {
1305 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
1306 u,
1307
1308 } = out_;
1309 }
1310
1311 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
1312
1313 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
1314
1315 Ok(())
1316 }
1317 }
1318
1319 unsafe impl<___E>
1320 ::fidl_next::EncodeOption<
1321 ::fidl_next::wire::Box<
1322 'static,
1323 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1324 >,
1325 ___E,
1326 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1327 where
1328 ___E: ::fidl_next::Encoder + ?Sized,
1329 ArrayOfVectorOfEventInUnionWithDefaultRightsStruct: ::fidl_next::Encode<
1330 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1331 ___E,
1332 >,
1333 {
1334 #[inline]
1335 fn encode_option(
1336 this: ::core::option::Option<Self>,
1337 encoder: &mut ___E,
1338 out: &mut ::core::mem::MaybeUninit<
1339 ::fidl_next::wire::Box<
1340 'static,
1341 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1342 >,
1343 >,
1344 _: (),
1345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1346 if let Some(inner) = this {
1347 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1348 ::fidl_next::wire::Box::encode_present(out);
1349 } else {
1350 ::fidl_next::wire::Box::encode_absent(out);
1351 }
1352
1353 Ok(())
1354 }
1355 }
1356
1357 impl<'de>
1358 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>>
1359 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1360 {
1361 #[inline]
1362 fn from_wire(
1363 wire: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>,
1364 ) -> Self {
1365 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
1366 }
1367 }
1368
1369 #[derive(Debug, PartialEq)]
1370 pub enum ArrayOfVectorOfEventInUnionWithReducedRights {
1371 H([::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]),
1372 }
1373
1374 unsafe impl<___E>
1375 ::fidl_next::Encode<
1376 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1377 ___E,
1378 > for ArrayOfVectorOfEventInUnionWithReducedRights
1379 where
1380 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1381 ___E: ::fidl_next::Encoder,
1382 ___E: ::fidl_next::fuchsia::HandleEncoder,
1383 {
1384 #[inline]
1385 fn encode(
1386 self,
1387 encoder: &mut ___E,
1388 out: &mut ::core::mem::MaybeUninit<
1389 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1390 >,
1391 _: (),
1392 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1393 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights { raw, _phantom: _ } = out);
1394
1395 match self {
1396 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
1397 ___E,
1398 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
1399 >(value, 1, encoder, raw, (1, ()))?,
1400 }
1401
1402 Ok(())
1403 }
1404 }
1405
1406 unsafe impl<___E>
1407 ::fidl_next::EncodeOption<
1408 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1409 ___E,
1410 > for ArrayOfVectorOfEventInUnionWithReducedRights
1411 where
1412 ___E: ?Sized,
1413 ArrayOfVectorOfEventInUnionWithReducedRights: ::fidl_next::Encode<
1414 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1415 ___E,
1416 >,
1417 {
1418 #[inline]
1419 fn encode_option(
1420 this: ::core::option::Option<Self>,
1421 encoder: &mut ___E,
1422 out: &mut ::core::mem::MaybeUninit<
1423 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1424 >,
1425 _: (),
1426 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1427 ::fidl_next::munge!(let crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights { raw, _phantom: _ } = &mut *out);
1428
1429 if let Some(inner) = this {
1430 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1431 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1432 } else {
1433 ::fidl_next::wire::Union::encode_absent(raw);
1434 }
1435
1436 Ok(())
1437 }
1438 }
1439
1440 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
1441 for ArrayOfVectorOfEventInUnionWithReducedRights
1442 {
1443 #[inline]
1444 fn from_wire(wire: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>) -> Self {
1445 let wire = ::core::mem::ManuallyDrop::new(wire);
1446 match wire.raw.ordinal() {
1447 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
1448 wire.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
1449 })),
1450
1451 _ => unsafe { ::core::hint::unreachable_unchecked() },
1452 }
1453 }
1454 }
1455
1456 impl<'de>
1457 ::fidl_next::FromWireOption<
1458 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1459 > for ArrayOfVectorOfEventInUnionWithReducedRights
1460 {
1461 #[inline]
1462 fn from_wire_option(
1463 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1464 ) -> ::core::option::Option<Self> {
1465 if let Some(inner) = wire.into_option() {
1466 Some(::fidl_next::FromWire::from_wire(inner))
1467 } else {
1468 None
1469 }
1470 }
1471 }
1472
1473 impl<'de>
1474 ::fidl_next::FromWireOption<
1475 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1476 > for Box<ArrayOfVectorOfEventInUnionWithReducedRights>
1477 {
1478 #[inline]
1479 fn from_wire_option(
1480 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1481 ) -> ::core::option::Option<Self> {
1482 <ArrayOfVectorOfEventInUnionWithReducedRights as ::fidl_next::FromWireOption<
1483 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1484 >>::from_wire_option(wire)
1485 .map(Box::new)
1486 }
1487 }
1488
1489 #[derive(Debug, PartialEq)]
1490 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
1491 pub u: crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights,
1492 }
1493
1494 unsafe impl<___E>
1495 ::fidl_next::Encode<
1496 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1497 ___E,
1498 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1499 where
1500 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1501 ___E: ::fidl_next::Encoder,
1502 ___E: ::fidl_next::fuchsia::HandleEncoder,
1503 {
1504 #[inline]
1505 fn encode(
1506 self,
1507 encoder_: &mut ___E,
1508 out_: &mut ::core::mem::MaybeUninit<
1509 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1510 >,
1511 _: (),
1512 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1513 ::fidl_next::munge! {
1514 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
1515 u,
1516
1517 } = out_;
1518 }
1519
1520 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
1521
1522 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
1523
1524 Ok(())
1525 }
1526 }
1527
1528 unsafe impl<___E>
1529 ::fidl_next::EncodeOption<
1530 ::fidl_next::wire::Box<
1531 'static,
1532 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1533 >,
1534 ___E,
1535 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1536 where
1537 ___E: ::fidl_next::Encoder + ?Sized,
1538 ArrayOfVectorOfEventInUnionWithReducedRightsStruct: ::fidl_next::Encode<
1539 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1540 ___E,
1541 >,
1542 {
1543 #[inline]
1544 fn encode_option(
1545 this: ::core::option::Option<Self>,
1546 encoder: &mut ___E,
1547 out: &mut ::core::mem::MaybeUninit<
1548 ::fidl_next::wire::Box<
1549 'static,
1550 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1551 >,
1552 >,
1553 _: (),
1554 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1555 if let Some(inner) = this {
1556 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1557 ::fidl_next::wire::Box::encode_present(out);
1558 } else {
1559 ::fidl_next::wire::Box::encode_absent(out);
1560 }
1561
1562 Ok(())
1563 }
1564 }
1565
1566 impl<'de>
1567 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>>
1568 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1569 {
1570 #[inline]
1571 fn from_wire(
1572 wire: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>,
1573 ) -> Self {
1574 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
1575 }
1576 }
1577
1578 #[derive(Debug, PartialEq)]
1579 pub struct Bounded32NonnullableVectorOfHandles {
1580 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
1581 }
1582
1583 unsafe impl<___E>
1584 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
1585 for Bounded32NonnullableVectorOfHandles
1586 where
1587 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1588 ___E: ::fidl_next::Encoder,
1589 ___E: ::fidl_next::fuchsia::HandleEncoder,
1590 {
1591 #[inline]
1592 fn encode(
1593 self,
1594 encoder_: &mut ___E,
1595 out_: &mut ::core::mem::MaybeUninit<
1596 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1597 >,
1598 _: (),
1599 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1600 ::fidl_next::munge! {
1601 let crate::wire::Bounded32NonnullableVectorOfHandles {
1602 vh0,
1603
1604 } = out_;
1605 }
1606
1607 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
1608
1609 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
1610 ::fidl_next::Constrained::validate(_field, (32, ()))?;
1611
1612 Ok(())
1613 }
1614 }
1615
1616 unsafe impl<___E>
1617 ::fidl_next::EncodeOption<
1618 ::fidl_next::wire::Box<
1619 'static,
1620 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1621 >,
1622 ___E,
1623 > for Bounded32NonnullableVectorOfHandles
1624 where
1625 ___E: ::fidl_next::Encoder + ?Sized,
1626 Bounded32NonnullableVectorOfHandles:
1627 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>,
1628 {
1629 #[inline]
1630 fn encode_option(
1631 this: ::core::option::Option<Self>,
1632 encoder: &mut ___E,
1633 out: &mut ::core::mem::MaybeUninit<
1634 ::fidl_next::wire::Box<
1635 'static,
1636 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1637 >,
1638 >,
1639 _: (),
1640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1641 if let Some(inner) = this {
1642 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1643 ::fidl_next::wire::Box::encode_present(out);
1644 } else {
1645 ::fidl_next::wire::Box::encode_absent(out);
1646 }
1647
1648 Ok(())
1649 }
1650 }
1651
1652 impl<'de> ::fidl_next::FromWire<crate::wire::Bounded32NonnullableVectorOfHandles<'de>>
1653 for Bounded32NonnullableVectorOfHandles
1654 {
1655 #[inline]
1656 fn from_wire(wire: crate::wire::Bounded32NonnullableVectorOfHandles<'de>) -> Self {
1657 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
1658 }
1659 }
1660
1661 #[derive(Debug, PartialEq)]
1662 pub struct Bounded32NullableVectorOfHandles {
1663 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
1664 }
1665
1666 unsafe impl<___E>
1667 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
1668 for Bounded32NullableVectorOfHandles
1669 where
1670 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1671 ___E: ::fidl_next::Encoder,
1672 ___E: ::fidl_next::fuchsia::HandleEncoder,
1673 {
1674 #[inline]
1675 fn encode(
1676 self,
1677 encoder_: &mut ___E,
1678 out_: &mut ::core::mem::MaybeUninit<
1679 crate::wire::Bounded32NullableVectorOfHandles<'static>,
1680 >,
1681 _: (),
1682 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1683 ::fidl_next::munge! {
1684 let crate::wire::Bounded32NullableVectorOfHandles {
1685 vh0,
1686
1687 } = out_;
1688 }
1689
1690 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
1691
1692 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
1693 ::fidl_next::Constrained::validate(_field, (32, ()))?;
1694
1695 Ok(())
1696 }
1697 }
1698
1699 unsafe impl<___E>
1700 ::fidl_next::EncodeOption<
1701 ::fidl_next::wire::Box<'static, crate::wire::Bounded32NullableVectorOfHandles<'static>>,
1702 ___E,
1703 > for Bounded32NullableVectorOfHandles
1704 where
1705 ___E: ::fidl_next::Encoder + ?Sized,
1706 Bounded32NullableVectorOfHandles:
1707 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>,
1708 {
1709 #[inline]
1710 fn encode_option(
1711 this: ::core::option::Option<Self>,
1712 encoder: &mut ___E,
1713 out: &mut ::core::mem::MaybeUninit<
1714 ::fidl_next::wire::Box<
1715 'static,
1716 crate::wire::Bounded32NullableVectorOfHandles<'static>,
1717 >,
1718 >,
1719 _: (),
1720 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1721 if let Some(inner) = this {
1722 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1723 ::fidl_next::wire::Box::encode_present(out);
1724 } else {
1725 ::fidl_next::wire::Box::encode_absent(out);
1726 }
1727
1728 Ok(())
1729 }
1730 }
1731
1732 impl<'de> ::fidl_next::FromWire<crate::wire::Bounded32NullableVectorOfHandles<'de>>
1733 for Bounded32NullableVectorOfHandles
1734 {
1735 #[inline]
1736 fn from_wire(wire: crate::wire::Bounded32NullableVectorOfHandles<'de>) -> Self {
1737 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
1738 }
1739 }
1740
1741 #[derive(Debug, PartialEq)]
1742 pub struct BoxOfSingleHandle {
1743 pub b: ::core::option::Option<::std::boxed::Box<crate::natural::SingleHandle>>,
1744 }
1745
1746 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
1747 for BoxOfSingleHandle
1748 where
1749 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1750 ___E: ::fidl_next::Encoder,
1751 ___E: ::fidl_next::fuchsia::HandleEncoder,
1752 {
1753 #[inline]
1754 fn encode(
1755 self,
1756 encoder_: &mut ___E,
1757 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
1758 _: (),
1759 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1760 ::fidl_next::munge! {
1761 let crate::wire::BoxOfSingleHandle {
1762 b,
1763
1764 } = out_;
1765 }
1766
1767 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
1768
1769 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) };
1770
1771 Ok(())
1772 }
1773 }
1774
1775 unsafe impl<___E>
1776 ::fidl_next::EncodeOption<
1777 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleHandle<'static>>,
1778 ___E,
1779 > for BoxOfSingleHandle
1780 where
1781 ___E: ::fidl_next::Encoder + ?Sized,
1782 BoxOfSingleHandle: ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>,
1783 {
1784 #[inline]
1785 fn encode_option(
1786 this: ::core::option::Option<Self>,
1787 encoder: &mut ___E,
1788 out: &mut ::core::mem::MaybeUninit<
1789 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleHandle<'static>>,
1790 >,
1791 _: (),
1792 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1793 if let Some(inner) = this {
1794 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1795 ::fidl_next::wire::Box::encode_present(out);
1796 } else {
1797 ::fidl_next::wire::Box::encode_absent(out);
1798 }
1799
1800 Ok(())
1801 }
1802 }
1803
1804 impl<'de> ::fidl_next::FromWire<crate::wire::BoxOfSingleHandle<'de>> for BoxOfSingleHandle {
1805 #[inline]
1806 fn from_wire(wire: crate::wire::BoxOfSingleHandle<'de>) -> Self {
1807 Self { b: ::fidl_next::FromWire::from_wire(wire.b) }
1808 }
1809 }
1810
1811 #[derive(Debug, PartialEq)]
1812 pub struct BoxOfSingleOptionalHandle {
1813 pub b: ::core::option::Option<::std::boxed::Box<crate::natural::SingleOptionalHandle>>,
1814 }
1815
1816 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
1817 for BoxOfSingleOptionalHandle
1818 where
1819 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1820 ___E: ::fidl_next::Encoder,
1821 ___E: ::fidl_next::fuchsia::HandleEncoder,
1822 {
1823 #[inline]
1824 fn encode(
1825 self,
1826 encoder_: &mut ___E,
1827 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
1828 _: (),
1829 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1830 ::fidl_next::munge! {
1831 let crate::wire::BoxOfSingleOptionalHandle {
1832 b,
1833
1834 } = out_;
1835 }
1836
1837 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
1838
1839 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) };
1840
1841 Ok(())
1842 }
1843 }
1844
1845 unsafe impl<___E>
1846 ::fidl_next::EncodeOption<
1847 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleOptionalHandle<'static>>,
1848 ___E,
1849 > for BoxOfSingleOptionalHandle
1850 where
1851 ___E: ::fidl_next::Encoder + ?Sized,
1852 BoxOfSingleOptionalHandle:
1853 ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>,
1854 {
1855 #[inline]
1856 fn encode_option(
1857 this: ::core::option::Option<Self>,
1858 encoder: &mut ___E,
1859 out: &mut ::core::mem::MaybeUninit<
1860 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleOptionalHandle<'static>>,
1861 >,
1862 _: (),
1863 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1864 if let Some(inner) = this {
1865 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1866 ::fidl_next::wire::Box::encode_present(out);
1867 } else {
1868 ::fidl_next::wire::Box::encode_absent(out);
1869 }
1870
1871 Ok(())
1872 }
1873 }
1874
1875 impl<'de> ::fidl_next::FromWire<crate::wire::BoxOfSingleOptionalHandle<'de>>
1876 for BoxOfSingleOptionalHandle
1877 {
1878 #[inline]
1879 fn from_wire(wire: crate::wire::BoxOfSingleOptionalHandle<'de>) -> Self {
1880 Self { b: ::fidl_next::FromWire::from_wire(wire.b) }
1881 }
1882 }
1883
1884 #[derive(Debug, PartialEq)]
1885 pub struct LaunchInfo {
1886 pub url: ::std::string::String,
1887
1888 pub arguments: ::core::option::Option<::std::vec::Vec<::std::string::String>>,
1889
1890 pub out: ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1891
1892 pub err: ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1893
1894 pub directory_request: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
1895
1896 pub flat_namespace:
1897 ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1898
1899 pub additional_services:
1900 ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1901 }
1902
1903 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E> for LaunchInfo
1904 where
1905 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1906 ___E: ::fidl_next::Encoder,
1907 ___E: ::fidl_next::fuchsia::HandleEncoder,
1908 {
1909 #[inline]
1910 fn encode(
1911 self,
1912 encoder_: &mut ___E,
1913 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
1914 _: (),
1915 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1916 ::fidl_next::munge! {
1917 let crate::wire::LaunchInfo {
1918 url,
1919 arguments,
1920 out,
1921 err,
1922 directory_request,
1923 flat_namespace,
1924 additional_services,
1925
1926 } = out_;
1927 }
1928
1929 ::fidl_next::Encode::encode(self.url, encoder_, url, 200)?;
1930
1931 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(url.as_mut_ptr()) };
1932 ::fidl_next::Constrained::validate(_field, 200)?;
1933
1934 ::fidl_next::Encode::encode(
1935 self.arguments,
1936 encoder_,
1937 arguments,
1938 (4294967295, 4294967295),
1939 )?;
1940
1941 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arguments.as_mut_ptr()) };
1942 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
1943
1944 ::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
1945
1946 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(out.as_mut_ptr()) };
1947
1948 ::fidl_next::Encode::encode(self.err, encoder_, err, ())?;
1949
1950 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(err.as_mut_ptr()) };
1951
1952 ::fidl_next::Encode::encode(self.directory_request, encoder_, directory_request, ())?;
1953
1954 let mut _field =
1955 unsafe { ::fidl_next::Slot::new_unchecked(directory_request.as_mut_ptr()) };
1956
1957 ::fidl_next::Encode::encode(self.flat_namespace, encoder_, flat_namespace, ())?;
1958
1959 let mut _field =
1960 unsafe { ::fidl_next::Slot::new_unchecked(flat_namespace.as_mut_ptr()) };
1961
1962 ::fidl_next::Encode::encode(
1963 self.additional_services,
1964 encoder_,
1965 additional_services,
1966 (),
1967 )?;
1968
1969 let mut _field =
1970 unsafe { ::fidl_next::Slot::new_unchecked(additional_services.as_mut_ptr()) };
1971
1972 Ok(())
1973 }
1974 }
1975
1976 unsafe impl<___E>
1977 ::fidl_next::EncodeOption<
1978 ::fidl_next::wire::Box<'static, crate::wire::LaunchInfo<'static>>,
1979 ___E,
1980 > for LaunchInfo
1981 where
1982 ___E: ::fidl_next::Encoder + ?Sized,
1983 LaunchInfo: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
1984 {
1985 #[inline]
1986 fn encode_option(
1987 this: ::core::option::Option<Self>,
1988 encoder: &mut ___E,
1989 out: &mut ::core::mem::MaybeUninit<
1990 ::fidl_next::wire::Box<'static, crate::wire::LaunchInfo<'static>>,
1991 >,
1992 _: (),
1993 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1994 if let Some(inner) = this {
1995 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1996 ::fidl_next::wire::Box::encode_present(out);
1997 } else {
1998 ::fidl_next::wire::Box::encode_absent(out);
1999 }
2000
2001 Ok(())
2002 }
2003 }
2004
2005 impl<'de> ::fidl_next::FromWire<crate::wire::LaunchInfo<'de>> for LaunchInfo {
2006 #[inline]
2007 fn from_wire(wire: crate::wire::LaunchInfo<'de>) -> Self {
2008 Self {
2009 url: ::fidl_next::FromWire::from_wire(wire.url),
2010
2011 arguments: ::fidl_next::FromWire::from_wire(wire.arguments),
2012
2013 out: ::fidl_next::FromWire::from_wire(wire.out),
2014
2015 err: ::fidl_next::FromWire::from_wire(wire.err),
2016
2017 directory_request: ::fidl_next::FromWire::from_wire(wire.directory_request),
2018
2019 flat_namespace: ::fidl_next::FromWire::from_wire(wire.flat_namespace),
2020
2021 additional_services: ::fidl_next::FromWire::from_wire(wire.additional_services),
2022 }
2023 }
2024 }
2025
2026 #[derive(Debug, PartialEq)]
2027 pub struct CreateComponentRequest {
2028 pub launch_info: crate::natural::LaunchInfo,
2029
2030 pub controller: ::core::option::Option<
2031 ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::fuchsia::zx::Channel>,
2032 >,
2033 }
2034
2035 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
2036 for CreateComponentRequest
2037 where
2038 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2039 ___E: ::fidl_next::Encoder,
2040 ___E: ::fidl_next::fuchsia::HandleEncoder,
2041 {
2042 #[inline]
2043 fn encode(
2044 self,
2045 encoder_: &mut ___E,
2046 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
2047 _: (),
2048 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2049 ::fidl_next::munge! {
2050 let crate::wire::CreateComponentRequest {
2051 launch_info,
2052 controller,
2053
2054 } = out_;
2055 }
2056
2057 ::fidl_next::Encode::encode(self.launch_info, encoder_, launch_info, ())?;
2058
2059 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(launch_info.as_mut_ptr()) };
2060
2061 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
2062
2063 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
2064
2065 Ok(())
2066 }
2067 }
2068
2069 unsafe impl<___E>
2070 ::fidl_next::EncodeOption<
2071 ::fidl_next::wire::Box<'static, crate::wire::CreateComponentRequest<'static>>,
2072 ___E,
2073 > for CreateComponentRequest
2074 where
2075 ___E: ::fidl_next::Encoder + ?Sized,
2076 CreateComponentRequest:
2077 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>,
2078 {
2079 #[inline]
2080 fn encode_option(
2081 this: ::core::option::Option<Self>,
2082 encoder: &mut ___E,
2083 out: &mut ::core::mem::MaybeUninit<
2084 ::fidl_next::wire::Box<'static, crate::wire::CreateComponentRequest<'static>>,
2085 >,
2086 _: (),
2087 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2088 if let Some(inner) = this {
2089 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2090 ::fidl_next::wire::Box::encode_present(out);
2091 } else {
2092 ::fidl_next::wire::Box::encode_absent(out);
2093 }
2094
2095 Ok(())
2096 }
2097 }
2098
2099 impl<'de> ::fidl_next::FromWire<crate::wire::CreateComponentRequest<'de>>
2100 for CreateComponentRequest
2101 {
2102 #[inline]
2103 fn from_wire(wire: crate::wire::CreateComponentRequest<'de>) -> Self {
2104 Self {
2105 launch_info: ::fidl_next::FromWire::from_wire(wire.launch_info),
2106
2107 controller: ::fidl_next::FromWire::from_wire(wire.controller),
2108 }
2109 }
2110 }
2111
2112 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2113 pub struct EmptyResourceTable {}
2114
2115 impl EmptyResourceTable {
2116 fn __max_ordinal(&self) -> usize {
2117 0
2118 }
2119 }
2120
2121 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyResourceTable<'static>, ___E>
2122 for EmptyResourceTable
2123 where
2124 ___E: ::fidl_next::Encoder + ?Sized,
2125 ___E: ::fidl_next::fuchsia::HandleEncoder,
2126 {
2127 #[inline]
2128 fn encode(
2129 mut self,
2130 encoder: &mut ___E,
2131 out: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTable<'static>>,
2132 _: (),
2133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2134 ::fidl_next::munge!(let crate::wire::EmptyResourceTable { table } = out);
2135
2136 let max_ord = self.__max_ordinal();
2137
2138 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2139 ::fidl_next::Wire::zero_padding(&mut out);
2140
2141 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2142 ::fidl_next::wire::Envelope,
2143 >(encoder, max_ord);
2144
2145 for i in 1..=max_ord {
2146 match i {
2147 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2148 }
2149 unsafe {
2150 preallocated.write_next(out.assume_init_ref());
2151 }
2152 }
2153
2154 ::fidl_next::wire::Table::encode_len(table, max_ord);
2155
2156 Ok(())
2157 }
2158 }
2159
2160 impl<'de> ::fidl_next::FromWire<crate::wire::EmptyResourceTable<'de>> for EmptyResourceTable {
2161 #[inline]
2162 fn from_wire(wire_: crate::wire::EmptyResourceTable<'de>) -> Self {
2163 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2164
2165 Self {}
2166 }
2167 }
2168
2169 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2170 pub struct EmptyResourceTableStruct {
2171 pub table: crate::natural::EmptyResourceTable,
2172 }
2173
2174 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
2175 for EmptyResourceTableStruct
2176 where
2177 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2178 ___E: ::fidl_next::Encoder,
2179 ___E: ::fidl_next::fuchsia::HandleEncoder,
2180 {
2181 #[inline]
2182 fn encode(
2183 self,
2184 encoder_: &mut ___E,
2185 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
2186 _: (),
2187 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2188 ::fidl_next::munge! {
2189 let crate::wire::EmptyResourceTableStruct {
2190 table,
2191
2192 } = out_;
2193 }
2194
2195 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
2196
2197 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
2198
2199 Ok(())
2200 }
2201 }
2202
2203 unsafe impl<___E>
2204 ::fidl_next::EncodeOption<
2205 ::fidl_next::wire::Box<'static, crate::wire::EmptyResourceTableStruct<'static>>,
2206 ___E,
2207 > for EmptyResourceTableStruct
2208 where
2209 ___E: ::fidl_next::Encoder + ?Sized,
2210 EmptyResourceTableStruct:
2211 ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>,
2212 {
2213 #[inline]
2214 fn encode_option(
2215 this: ::core::option::Option<Self>,
2216 encoder: &mut ___E,
2217 out: &mut ::core::mem::MaybeUninit<
2218 ::fidl_next::wire::Box<'static, crate::wire::EmptyResourceTableStruct<'static>>,
2219 >,
2220 _: (),
2221 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2222 if let Some(inner) = this {
2223 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2224 ::fidl_next::wire::Box::encode_present(out);
2225 } else {
2226 ::fidl_next::wire::Box::encode_absent(out);
2227 }
2228
2229 Ok(())
2230 }
2231 }
2232
2233 impl<'de> ::fidl_next::FromWire<crate::wire::EmptyResourceTableStruct<'de>>
2234 for EmptyResourceTableStruct
2235 {
2236 #[inline]
2237 fn from_wire(wire: crate::wire::EmptyResourceTableStruct<'de>) -> Self {
2238 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
2239 }
2240 }
2241
2242 #[derive(Debug, PartialEq)]
2243 pub enum EnvelopeInliningTestUnion {
2244 Small(u32),
2245
2246 Large(u64),
2247
2248 Handle(::fidl_next::fuchsia::zx::NullableHandle),
2249
2250 UnknownOrdinal_(u64),
2251 }
2252
2253 impl EnvelopeInliningTestUnion {
2254 pub fn is_unknown(&self) -> bool {
2255 #[allow(unreachable_patterns)]
2256 match self {
2257 Self::UnknownOrdinal_(_) => true,
2258 _ => false,
2259 }
2260 }
2261 }
2262
2263 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>
2264 for EnvelopeInliningTestUnion
2265 where
2266 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2267 ___E: ::fidl_next::Encoder,
2268 ___E: ::fidl_next::fuchsia::HandleEncoder,
2269 {
2270 #[inline]
2271 fn encode(
2272 self,
2273 encoder: &mut ___E,
2274 out: &mut ::core::mem::MaybeUninit<crate::wire::EnvelopeInliningTestUnion<'static>>,
2275 _: (),
2276 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2277 ::fidl_next::munge!(let crate::wire::EnvelopeInliningTestUnion { raw, _phantom: _ } = out);
2278
2279 match self {
2280 Self::Small(value) => ::fidl_next::wire::Union::encode_as::<
2281 ___E,
2282 ::fidl_next::wire::Uint32,
2283 >(value, 1, encoder, raw, ())?,
2284
2285 Self::Large(value) => ::fidl_next::wire::Union::encode_as::<
2286 ___E,
2287 ::fidl_next::wire::Uint64,
2288 >(value, 2, encoder, raw, ())?,
2289
2290 Self::Handle(value) => ::fidl_next::wire::Union::encode_as::<
2291 ___E,
2292 ::fidl_next::wire::fuchsia::NullableHandle,
2293 >(value, 3, encoder, raw, ())?,
2294
2295 Self::UnknownOrdinal_(ordinal) => {
2296 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
2297 }
2298 }
2299
2300 Ok(())
2301 }
2302 }
2303
2304 unsafe impl<___E>
2305 ::fidl_next::EncodeOption<crate::wire_optional::EnvelopeInliningTestUnion<'static>, ___E>
2306 for EnvelopeInliningTestUnion
2307 where
2308 ___E: ?Sized,
2309 EnvelopeInliningTestUnion:
2310 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
2311 {
2312 #[inline]
2313 fn encode_option(
2314 this: ::core::option::Option<Self>,
2315 encoder: &mut ___E,
2316 out: &mut ::core::mem::MaybeUninit<
2317 crate::wire_optional::EnvelopeInliningTestUnion<'static>,
2318 >,
2319 _: (),
2320 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2321 ::fidl_next::munge!(let crate::wire_optional::EnvelopeInliningTestUnion { raw, _phantom: _ } = &mut *out);
2322
2323 if let Some(inner) = this {
2324 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2325 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2326 } else {
2327 ::fidl_next::wire::Union::encode_absent(raw);
2328 }
2329
2330 Ok(())
2331 }
2332 }
2333
2334 impl<'de> ::fidl_next::FromWire<crate::wire::EnvelopeInliningTestUnion<'de>>
2335 for EnvelopeInliningTestUnion
2336 {
2337 #[inline]
2338 fn from_wire(wire: crate::wire::EnvelopeInliningTestUnion<'de>) -> Self {
2339 let wire = ::core::mem::ManuallyDrop::new(wire);
2340 match wire.raw.ordinal() {
2341 1 => Self::Small(::fidl_next::FromWire::from_wire(unsafe {
2342 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
2343 })),
2344
2345 2 => Self::Large(::fidl_next::FromWire::from_wire(unsafe {
2346 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint64>()
2347 })),
2348
2349 3 => Self::Handle(::fidl_next::FromWire::from_wire(unsafe {
2350 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
2351 })),
2352
2353 ord => return Self::UnknownOrdinal_(ord as u64),
2354 }
2355 }
2356 }
2357
2358 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EnvelopeInliningTestUnion<'de>>
2359 for EnvelopeInliningTestUnion
2360 {
2361 #[inline]
2362 fn from_wire_option(
2363 wire: crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2364 ) -> ::core::option::Option<Self> {
2365 if let Some(inner) = wire.into_option() {
2366 Some(::fidl_next::FromWire::from_wire(inner))
2367 } else {
2368 None
2369 }
2370 }
2371 }
2372
2373 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EnvelopeInliningTestUnion<'de>>
2374 for Box<EnvelopeInliningTestUnion>
2375 {
2376 #[inline]
2377 fn from_wire_option(
2378 wire: crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2379 ) -> ::core::option::Option<Self> {
2380 <EnvelopeInliningTestUnion as ::fidl_next::FromWireOption<
2381 crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2382 >>::from_wire_option(wire)
2383 .map(Box::new)
2384 }
2385 }
2386
2387 #[derive(Debug, PartialEq)]
2388 pub struct EnvelopeInliningTestUnionStruct {
2389 pub u: crate::natural::EnvelopeInliningTestUnion,
2390 }
2391
2392 unsafe impl<___E>
2393 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
2394 for EnvelopeInliningTestUnionStruct
2395 where
2396 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2397 ___E: ::fidl_next::Encoder,
2398 ___E: ::fidl_next::fuchsia::HandleEncoder,
2399 {
2400 #[inline]
2401 fn encode(
2402 self,
2403 encoder_: &mut ___E,
2404 out_: &mut ::core::mem::MaybeUninit<
2405 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
2406 >,
2407 _: (),
2408 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2409 ::fidl_next::munge! {
2410 let crate::wire::EnvelopeInliningTestUnionStruct {
2411 u,
2412
2413 } = out_;
2414 }
2415
2416 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
2417
2418 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
2419
2420 Ok(())
2421 }
2422 }
2423
2424 unsafe impl<___E>
2425 ::fidl_next::EncodeOption<
2426 ::fidl_next::wire::Box<'static, crate::wire::EnvelopeInliningTestUnionStruct<'static>>,
2427 ___E,
2428 > for EnvelopeInliningTestUnionStruct
2429 where
2430 ___E: ::fidl_next::Encoder + ?Sized,
2431 EnvelopeInliningTestUnionStruct:
2432 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>,
2433 {
2434 #[inline]
2435 fn encode_option(
2436 this: ::core::option::Option<Self>,
2437 encoder: &mut ___E,
2438 out: &mut ::core::mem::MaybeUninit<
2439 ::fidl_next::wire::Box<
2440 'static,
2441 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
2442 >,
2443 >,
2444 _: (),
2445 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2446 if let Some(inner) = this {
2447 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2448 ::fidl_next::wire::Box::encode_present(out);
2449 } else {
2450 ::fidl_next::wire::Box::encode_absent(out);
2451 }
2452
2453 Ok(())
2454 }
2455 }
2456
2457 impl<'de> ::fidl_next::FromWire<crate::wire::EnvelopeInliningTestUnionStruct<'de>>
2458 for EnvelopeInliningTestUnionStruct
2459 {
2460 #[inline]
2461 fn from_wire(wire: crate::wire::EnvelopeInliningTestUnionStruct<'de>) -> Self {
2462 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
2463 }
2464 }
2465
2466 #[derive(Debug, PartialEq)]
2467 #[repr(C)]
2468 pub struct EventWithDefaultRights {
2469 pub h: ::fidl_next::fuchsia::zx::Event,
2470 }
2471
2472 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
2473 for EventWithDefaultRights
2474 where
2475 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2476 ___E: ::fidl_next::fuchsia::HandleEncoder,
2477 {
2478 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2479 Self,
2480 crate::wire::EventWithDefaultRights,
2481 > = unsafe {
2482 ::fidl_next::CopyOptimization::enable_if(
2483 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
2484 ::fidl_next::wire::fuchsia::Event,
2485 ___E,
2486 >>::COPY_OPTIMIZATION
2487 .is_enabled(),
2488 )
2489 };
2490
2491 #[inline]
2492 fn encode(
2493 self,
2494 encoder_: &mut ___E,
2495 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
2496 _: (),
2497 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2498 ::fidl_next::munge! {
2499 let crate::wire::EventWithDefaultRights {
2500 h,
2501
2502 } = out_;
2503 }
2504
2505 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
2506
2507 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
2508
2509 Ok(())
2510 }
2511 }
2512
2513 unsafe impl<___E>
2514 ::fidl_next::EncodeOption<
2515 ::fidl_next::wire::Box<'static, crate::wire::EventWithDefaultRights>,
2516 ___E,
2517 > for EventWithDefaultRights
2518 where
2519 ___E: ::fidl_next::Encoder + ?Sized,
2520 EventWithDefaultRights: ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>,
2521 {
2522 #[inline]
2523 fn encode_option(
2524 this: ::core::option::Option<Self>,
2525 encoder: &mut ___E,
2526 out: &mut ::core::mem::MaybeUninit<
2527 ::fidl_next::wire::Box<'static, crate::wire::EventWithDefaultRights>,
2528 >,
2529 _: (),
2530 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2531 if let Some(inner) = this {
2532 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2533 ::fidl_next::wire::Box::encode_present(out);
2534 } else {
2535 ::fidl_next::wire::Box::encode_absent(out);
2536 }
2537
2538 Ok(())
2539 }
2540 }
2541
2542 impl ::fidl_next::FromWire<crate::wire::EventWithDefaultRights> for EventWithDefaultRights {
2543 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2544 crate::wire::EventWithDefaultRights,
2545 Self,
2546 > = unsafe {
2547 ::fidl_next::CopyOptimization::enable_if(
2548 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
2549 ::fidl_next::wire::fuchsia::Event,
2550 >>::COPY_OPTIMIZATION
2551 .is_enabled(),
2552 )
2553 };
2554
2555 #[inline]
2556 fn from_wire(wire: crate::wire::EventWithDefaultRights) -> Self {
2557 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
2558 }
2559 }
2560
2561 #[derive(Debug, PartialEq)]
2562 #[repr(C)]
2563 pub struct EventWithReducedRights {
2564 pub h: ::fidl_next::fuchsia::zx::Event,
2565 }
2566
2567 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
2568 for EventWithReducedRights
2569 where
2570 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2571 ___E: ::fidl_next::fuchsia::HandleEncoder,
2572 {
2573 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2574 Self,
2575 crate::wire::EventWithReducedRights,
2576 > = unsafe {
2577 ::fidl_next::CopyOptimization::enable_if(
2578 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
2579 ::fidl_next::wire::fuchsia::Event,
2580 ___E,
2581 >>::COPY_OPTIMIZATION
2582 .is_enabled(),
2583 )
2584 };
2585
2586 #[inline]
2587 fn encode(
2588 self,
2589 encoder_: &mut ___E,
2590 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
2591 _: (),
2592 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2593 ::fidl_next::munge! {
2594 let crate::wire::EventWithReducedRights {
2595 h,
2596
2597 } = out_;
2598 }
2599
2600 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
2601
2602 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
2603
2604 Ok(())
2605 }
2606 }
2607
2608 unsafe impl<___E>
2609 ::fidl_next::EncodeOption<
2610 ::fidl_next::wire::Box<'static, crate::wire::EventWithReducedRights>,
2611 ___E,
2612 > for EventWithReducedRights
2613 where
2614 ___E: ::fidl_next::Encoder + ?Sized,
2615 EventWithReducedRights: ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>,
2616 {
2617 #[inline]
2618 fn encode_option(
2619 this: ::core::option::Option<Self>,
2620 encoder: &mut ___E,
2621 out: &mut ::core::mem::MaybeUninit<
2622 ::fidl_next::wire::Box<'static, crate::wire::EventWithReducedRights>,
2623 >,
2624 _: (),
2625 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2626 if let Some(inner) = this {
2627 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2628 ::fidl_next::wire::Box::encode_present(out);
2629 } else {
2630 ::fidl_next::wire::Box::encode_absent(out);
2631 }
2632
2633 Ok(())
2634 }
2635 }
2636
2637 impl ::fidl_next::FromWire<crate::wire::EventWithReducedRights> for EventWithReducedRights {
2638 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2639 crate::wire::EventWithReducedRights,
2640 Self,
2641 > = unsafe {
2642 ::fidl_next::CopyOptimization::enable_if(
2643 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
2644 ::fidl_next::wire::fuchsia::Event,
2645 >>::COPY_OPTIMIZATION
2646 .is_enabled(),
2647 )
2648 };
2649
2650 #[inline]
2651 fn from_wire(wire: crate::wire::EventWithReducedRights) -> Self {
2652 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
2653 }
2654 }
2655
2656 #[derive(Debug, PartialEq)]
2657 pub struct FidlvizDemo {
2658 pub f1: u8,
2659
2660 pub f2: i8,
2661
2662 pub f3: u16,
2663
2664 pub f4: u32,
2665
2666 pub f5: u64,
2667
2668 pub f6: u8,
2669
2670 pub f7: u8,
2671
2672 pub f8: u16,
2673
2674 pub f9: f32,
2675
2676 pub f10: f64,
2677
2678 pub f11: bool,
2679
2680 pub f12: bool,
2681
2682 pub f13: ::std::string::String,
2683
2684 pub f14: ::core::option::Option<::std::string::String>,
2685
2686 pub f15: ::std::string::String,
2687
2688 pub f16: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
2689
2690 pub f17: ::fidl_next::fuchsia::zx::NullableHandle,
2691
2692 pub f18: [u8; 3],
2693
2694 pub f19: ::std::vec::Vec<f64>,
2695
2696 pub f20: ::core::option::Option<::std::vec::Vec<u8>>,
2697
2698 pub f21: ::std::vec::Vec<u8>,
2699
2700 pub f22: crate::natural::FidlvizBits,
2701
2702 pub f23: crate::natural::FidlvizEnum,
2703
2704 pub f24: crate::natural::FidlvizStruct1,
2705
2706 pub f25: crate::natural::FidlvizStruct2,
2707
2708 pub f26: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizStruct1>>,
2709
2710 pub f27: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizStruct2>>,
2711
2712 pub f28: crate::natural::FidlvizTable,
2713
2714 pub f29: crate::natural::FidlvizTable,
2715
2716 pub f30: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizUnion>>,
2717
2718 pub f31: crate::natural::FidlvizUnion,
2719 }
2720
2721 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E> for FidlvizDemo
2722 where
2723 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2724 ___E: ::fidl_next::Encoder,
2725 ___E: ::fidl_next::fuchsia::HandleEncoder,
2726 {
2727 #[inline]
2728 fn encode(
2729 self,
2730 encoder_: &mut ___E,
2731 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
2732 _: (),
2733 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2734 ::fidl_next::munge! {
2735 let crate::wire::FidlvizDemo {
2736 f1,
2737 f2,
2738 f3,
2739 f4,
2740 f5,
2741 f6,
2742 f7,
2743 f8,
2744 f9,
2745 f10,
2746 f11,
2747 f12,
2748 f13,
2749 f14,
2750 f15,
2751 f16,
2752 f17,
2753 f18,
2754 f19,
2755 f20,
2756 f21,
2757 f22,
2758 f23,
2759 f24,
2760 f25,
2761 f26,
2762 f27,
2763 f28,
2764 f29,
2765 f30,
2766 f31,
2767
2768 } = out_;
2769 }
2770
2771 ::fidl_next::Encode::encode(self.f1, encoder_, f1, ())?;
2772
2773 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f1.as_mut_ptr()) };
2774
2775 ::fidl_next::Encode::encode(self.f2, encoder_, f2, ())?;
2776
2777 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f2.as_mut_ptr()) };
2778
2779 ::fidl_next::Encode::encode(self.f3, encoder_, f3, ())?;
2780
2781 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f3.as_mut_ptr()) };
2782
2783 ::fidl_next::Encode::encode(self.f4, encoder_, f4, ())?;
2784
2785 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f4.as_mut_ptr()) };
2786
2787 ::fidl_next::Encode::encode(self.f5, encoder_, f5, ())?;
2788
2789 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f5.as_mut_ptr()) };
2790
2791 ::fidl_next::Encode::encode(self.f6, encoder_, f6, ())?;
2792
2793 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f6.as_mut_ptr()) };
2794
2795 ::fidl_next::Encode::encode(self.f7, encoder_, f7, ())?;
2796
2797 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f7.as_mut_ptr()) };
2798
2799 ::fidl_next::Encode::encode(self.f8, encoder_, f8, ())?;
2800
2801 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f8.as_mut_ptr()) };
2802
2803 ::fidl_next::Encode::encode(self.f9, encoder_, f9, ())?;
2804
2805 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f9.as_mut_ptr()) };
2806
2807 ::fidl_next::Encode::encode(self.f10, encoder_, f10, ())?;
2808
2809 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f10.as_mut_ptr()) };
2810
2811 ::fidl_next::Encode::encode(self.f11, encoder_, f11, ())?;
2812
2813 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f11.as_mut_ptr()) };
2814
2815 ::fidl_next::Encode::encode(self.f12, encoder_, f12, ())?;
2816
2817 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f12.as_mut_ptr()) };
2818
2819 ::fidl_next::Encode::encode(self.f13, encoder_, f13, 4294967295)?;
2820
2821 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f13.as_mut_ptr()) };
2822 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2823
2824 ::fidl_next::Encode::encode(self.f14, encoder_, f14, 4294967295)?;
2825
2826 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f14.as_mut_ptr()) };
2827 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2828
2829 ::fidl_next::Encode::encode(self.f15, encoder_, f15, 4294967295)?;
2830
2831 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f15.as_mut_ptr()) };
2832 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2833
2834 ::fidl_next::Encode::encode(self.f16, encoder_, f16, ())?;
2835
2836 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f16.as_mut_ptr()) };
2837
2838 ::fidl_next::Encode::encode(self.f17, encoder_, f17, ())?;
2839
2840 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f17.as_mut_ptr()) };
2841
2842 ::fidl_next::Encode::encode(self.f18, encoder_, f18, ())?;
2843
2844 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f18.as_mut_ptr()) };
2845
2846 ::fidl_next::Encode::encode(self.f19, encoder_, f19, (4294967295, ()))?;
2847
2848 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f19.as_mut_ptr()) };
2849 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2850
2851 ::fidl_next::Encode::encode(self.f20, encoder_, f20, (4294967295, ()))?;
2852
2853 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f20.as_mut_ptr()) };
2854 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2855
2856 ::fidl_next::Encode::encode(self.f21, encoder_, f21, (4294967295, ()))?;
2857
2858 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f21.as_mut_ptr()) };
2859 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2860
2861 ::fidl_next::Encode::encode(self.f22, encoder_, f22, ())?;
2862
2863 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f22.as_mut_ptr()) };
2864
2865 ::fidl_next::Encode::encode(self.f23, encoder_, f23, ())?;
2866
2867 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f23.as_mut_ptr()) };
2868
2869 ::fidl_next::Encode::encode(self.f24, encoder_, f24, ())?;
2870
2871 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f24.as_mut_ptr()) };
2872
2873 ::fidl_next::Encode::encode(self.f25, encoder_, f25, ())?;
2874
2875 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f25.as_mut_ptr()) };
2876
2877 ::fidl_next::Encode::encode(self.f26, encoder_, f26, ())?;
2878
2879 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f26.as_mut_ptr()) };
2880
2881 ::fidl_next::Encode::encode(self.f27, encoder_, f27, ())?;
2882
2883 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f27.as_mut_ptr()) };
2884
2885 ::fidl_next::Encode::encode(self.f28, encoder_, f28, ())?;
2886
2887 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f28.as_mut_ptr()) };
2888
2889 ::fidl_next::Encode::encode(self.f29, encoder_, f29, ())?;
2890
2891 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f29.as_mut_ptr()) };
2892
2893 ::fidl_next::Encode::encode(self.f30, encoder_, f30, ())?;
2894
2895 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f30.as_mut_ptr()) };
2896
2897 ::fidl_next::Encode::encode(self.f31, encoder_, f31, ())?;
2898
2899 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f31.as_mut_ptr()) };
2900
2901 Ok(())
2902 }
2903 }
2904
2905 unsafe impl<___E>
2906 ::fidl_next::EncodeOption<
2907 ::fidl_next::wire::Box<'static, crate::wire::FidlvizDemo<'static>>,
2908 ___E,
2909 > for FidlvizDemo
2910 where
2911 ___E: ::fidl_next::Encoder + ?Sized,
2912 FidlvizDemo: ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>,
2913 {
2914 #[inline]
2915 fn encode_option(
2916 this: ::core::option::Option<Self>,
2917 encoder: &mut ___E,
2918 out: &mut ::core::mem::MaybeUninit<
2919 ::fidl_next::wire::Box<'static, crate::wire::FidlvizDemo<'static>>,
2920 >,
2921 _: (),
2922 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2923 if let Some(inner) = this {
2924 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2925 ::fidl_next::wire::Box::encode_present(out);
2926 } else {
2927 ::fidl_next::wire::Box::encode_absent(out);
2928 }
2929
2930 Ok(())
2931 }
2932 }
2933
2934 impl<'de> ::fidl_next::FromWire<crate::wire::FidlvizDemo<'de>> for FidlvizDemo {
2935 #[inline]
2936 fn from_wire(wire: crate::wire::FidlvizDemo<'de>) -> Self {
2937 Self {
2938 f1: ::fidl_next::FromWire::from_wire(wire.f1),
2939
2940 f2: ::fidl_next::FromWire::from_wire(wire.f2),
2941
2942 f3: ::fidl_next::FromWire::from_wire(wire.f3),
2943
2944 f4: ::fidl_next::FromWire::from_wire(wire.f4),
2945
2946 f5: ::fidl_next::FromWire::from_wire(wire.f5),
2947
2948 f6: ::fidl_next::FromWire::from_wire(wire.f6),
2949
2950 f7: ::fidl_next::FromWire::from_wire(wire.f7),
2951
2952 f8: ::fidl_next::FromWire::from_wire(wire.f8),
2953
2954 f9: ::fidl_next::FromWire::from_wire(wire.f9),
2955
2956 f10: ::fidl_next::FromWire::from_wire(wire.f10),
2957
2958 f11: ::fidl_next::FromWire::from_wire(wire.f11),
2959
2960 f12: ::fidl_next::FromWire::from_wire(wire.f12),
2961
2962 f13: ::fidl_next::FromWire::from_wire(wire.f13),
2963
2964 f14: ::fidl_next::FromWire::from_wire(wire.f14),
2965
2966 f15: ::fidl_next::FromWire::from_wire(wire.f15),
2967
2968 f16: ::fidl_next::FromWire::from_wire(wire.f16),
2969
2970 f17: ::fidl_next::FromWire::from_wire(wire.f17),
2971
2972 f18: ::fidl_next::FromWire::from_wire(wire.f18),
2973
2974 f19: ::fidl_next::FromWire::from_wire(wire.f19),
2975
2976 f20: ::fidl_next::FromWire::from_wire(wire.f20),
2977
2978 f21: ::fidl_next::FromWire::from_wire(wire.f21),
2979
2980 f22: ::fidl_next::FromWire::from_wire(wire.f22),
2981
2982 f23: ::fidl_next::FromWire::from_wire(wire.f23),
2983
2984 f24: ::fidl_next::FromWire::from_wire(wire.f24),
2985
2986 f25: ::fidl_next::FromWire::from_wire(wire.f25),
2987
2988 f26: ::fidl_next::FromWire::from_wire(wire.f26),
2989
2990 f27: ::fidl_next::FromWire::from_wire(wire.f27),
2991
2992 f28: ::fidl_next::FromWire::from_wire(wire.f28),
2993
2994 f29: ::fidl_next::FromWire::from_wire(wire.f29),
2995
2996 f30: ::fidl_next::FromWire::from_wire(wire.f30),
2997
2998 f31: ::fidl_next::FromWire::from_wire(wire.f31),
2999 }
3000 }
3001 }
3002
3003 #[derive(Debug, PartialEq)]
3004 #[repr(C)]
3005 pub struct GoldenHandleBasicRightsStruct {
3006 pub v: ::fidl_next::fuchsia::zx::Event,
3007 }
3008
3009 unsafe impl<___E> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
3010 for GoldenHandleBasicRightsStruct
3011 where
3012 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3013 ___E: ::fidl_next::fuchsia::HandleEncoder,
3014 {
3015 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3016 Self,
3017 crate::wire::GoldenHandleBasicRightsStruct,
3018 > = unsafe {
3019 ::fidl_next::CopyOptimization::enable_if(
3020 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
3021 ::fidl_next::wire::fuchsia::Event,
3022 ___E,
3023 >>::COPY_OPTIMIZATION
3024 .is_enabled(),
3025 )
3026 };
3027
3028 #[inline]
3029 fn encode(
3030 self,
3031 encoder_: &mut ___E,
3032 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
3033 _: (),
3034 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3035 ::fidl_next::munge! {
3036 let crate::wire::GoldenHandleBasicRightsStruct {
3037 v,
3038
3039 } = out_;
3040 }
3041
3042 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
3043
3044 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
3045
3046 Ok(())
3047 }
3048 }
3049
3050 unsafe impl<___E>
3051 ::fidl_next::EncodeOption<
3052 ::fidl_next::wire::Box<'static, crate::wire::GoldenHandleBasicRightsStruct>,
3053 ___E,
3054 > for GoldenHandleBasicRightsStruct
3055 where
3056 ___E: ::fidl_next::Encoder + ?Sized,
3057 GoldenHandleBasicRightsStruct:
3058 ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>,
3059 {
3060 #[inline]
3061 fn encode_option(
3062 this: ::core::option::Option<Self>,
3063 encoder: &mut ___E,
3064 out: &mut ::core::mem::MaybeUninit<
3065 ::fidl_next::wire::Box<'static, crate::wire::GoldenHandleBasicRightsStruct>,
3066 >,
3067 _: (),
3068 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3069 if let Some(inner) = this {
3070 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3071 ::fidl_next::wire::Box::encode_present(out);
3072 } else {
3073 ::fidl_next::wire::Box::encode_absent(out);
3074 }
3075
3076 Ok(())
3077 }
3078 }
3079
3080 impl ::fidl_next::FromWire<crate::wire::GoldenHandleBasicRightsStruct>
3081 for GoldenHandleBasicRightsStruct
3082 {
3083 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3084 crate::wire::GoldenHandleBasicRightsStruct,
3085 Self,
3086 > = unsafe {
3087 ::fidl_next::CopyOptimization::enable_if(
3088 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3089 ::fidl_next::wire::fuchsia::Event,
3090 >>::COPY_OPTIMIZATION
3091 .is_enabled(),
3092 )
3093 };
3094
3095 #[inline]
3096 fn from_wire(wire: crate::wire::GoldenHandleBasicRightsStruct) -> Self {
3097 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
3098 }
3099 }
3100
3101 #[derive(Debug, PartialEq)]
3102 #[repr(C)]
3103 pub struct GoldenNullableHandleStruct {
3104 pub v: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
3105 }
3106
3107 unsafe impl<___E> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
3108 for GoldenNullableHandleStruct
3109 where
3110 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3111 ___E: ::fidl_next::fuchsia::HandleEncoder,
3112 {
3113 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3114 Self,
3115 crate::wire::GoldenNullableHandleStruct,
3116 > = unsafe {
3117 ::fidl_next::CopyOptimization::enable_if(
3118 true
3119
3120 && <
3121 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
3122 >::COPY_OPTIMIZATION.is_enabled()
3123
3124 )
3125 };
3126
3127 #[inline]
3128 fn encode(
3129 self,
3130 encoder_: &mut ___E,
3131 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
3132 _: (),
3133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3134 ::fidl_next::munge! {
3135 let crate::wire::GoldenNullableHandleStruct {
3136 v,
3137
3138 } = out_;
3139 }
3140
3141 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
3142
3143 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
3144
3145 Ok(())
3146 }
3147 }
3148
3149 unsafe impl<___E>
3150 ::fidl_next::EncodeOption<
3151 ::fidl_next::wire::Box<'static, crate::wire::GoldenNullableHandleStruct>,
3152 ___E,
3153 > for GoldenNullableHandleStruct
3154 where
3155 ___E: ::fidl_next::Encoder + ?Sized,
3156 GoldenNullableHandleStruct:
3157 ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>,
3158 {
3159 #[inline]
3160 fn encode_option(
3161 this: ::core::option::Option<Self>,
3162 encoder: &mut ___E,
3163 out: &mut ::core::mem::MaybeUninit<
3164 ::fidl_next::wire::Box<'static, crate::wire::GoldenNullableHandleStruct>,
3165 >,
3166 _: (),
3167 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3168 if let Some(inner) = this {
3169 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3170 ::fidl_next::wire::Box::encode_present(out);
3171 } else {
3172 ::fidl_next::wire::Box::encode_absent(out);
3173 }
3174
3175 Ok(())
3176 }
3177 }
3178
3179 impl ::fidl_next::FromWire<crate::wire::GoldenNullableHandleStruct> for GoldenNullableHandleStruct {
3180 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3181 crate::wire::GoldenNullableHandleStruct,
3182 Self,
3183 > = unsafe {
3184 ::fidl_next::CopyOptimization::enable_if(
3185 true
3186
3187 && <
3188 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
3189 >::COPY_OPTIMIZATION.is_enabled()
3190
3191 )
3192 };
3193
3194 #[inline]
3195 fn from_wire(wire: crate::wire::GoldenNullableHandleStruct) -> Self {
3196 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
3197 }
3198 }
3199
3200 #[derive(Debug, PartialEq)]
3201 pub struct MultipleBoundedNonnullableVectorsOfHandles {
3202 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
3203
3204 pub vh1: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
3205 }
3206
3207 unsafe impl<___E>
3208 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
3209 for MultipleBoundedNonnullableVectorsOfHandles
3210 where
3211 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3212 ___E: ::fidl_next::Encoder,
3213 ___E: ::fidl_next::fuchsia::HandleEncoder,
3214 {
3215 #[inline]
3216 fn encode(
3217 self,
3218 encoder_: &mut ___E,
3219 out_: &mut ::core::mem::MaybeUninit<
3220 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3221 >,
3222 _: (),
3223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3224 ::fidl_next::munge! {
3225 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
3226 vh0,
3227 vh1,
3228
3229 } = out_;
3230 }
3231
3232 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
3233
3234 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
3235 ::fidl_next::Constrained::validate(_field, (2, ()))?;
3236
3237 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
3238
3239 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh1.as_mut_ptr()) };
3240 ::fidl_next::Constrained::validate(_field, (32, ()))?;
3241
3242 Ok(())
3243 }
3244 }
3245
3246 unsafe impl<___E>
3247 ::fidl_next::EncodeOption<
3248 ::fidl_next::wire::Box<
3249 'static,
3250 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3251 >,
3252 ___E,
3253 > for MultipleBoundedNonnullableVectorsOfHandles
3254 where
3255 ___E: ::fidl_next::Encoder + ?Sized,
3256 MultipleBoundedNonnullableVectorsOfHandles: ::fidl_next::Encode<
3257 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3258 ___E,
3259 >,
3260 {
3261 #[inline]
3262 fn encode_option(
3263 this: ::core::option::Option<Self>,
3264 encoder: &mut ___E,
3265 out: &mut ::core::mem::MaybeUninit<
3266 ::fidl_next::wire::Box<
3267 'static,
3268 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3269 >,
3270 >,
3271 _: (),
3272 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3273 if let Some(inner) = this {
3274 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3275 ::fidl_next::wire::Box::encode_present(out);
3276 } else {
3277 ::fidl_next::wire::Box::encode_absent(out);
3278 }
3279
3280 Ok(())
3281 }
3282 }
3283
3284 impl<'de> ::fidl_next::FromWire<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'de>>
3285 for MultipleBoundedNonnullableVectorsOfHandles
3286 {
3287 #[inline]
3288 fn from_wire(wire: crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'de>) -> Self {
3289 Self {
3290 vh0: ::fidl_next::FromWire::from_wire(wire.vh0),
3291
3292 vh1: ::fidl_next::FromWire::from_wire(wire.vh1),
3293 }
3294 }
3295 }
3296
3297 #[derive(Debug, PartialEq)]
3298 pub struct MultipleBoundedNullableVectorsOfHandles {
3299 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
3300
3301 pub vh1: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
3302 }
3303
3304 unsafe impl<___E>
3305 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
3306 for MultipleBoundedNullableVectorsOfHandles
3307 where
3308 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3309 ___E: ::fidl_next::Encoder,
3310 ___E: ::fidl_next::fuchsia::HandleEncoder,
3311 {
3312 #[inline]
3313 fn encode(
3314 self,
3315 encoder_: &mut ___E,
3316 out_: &mut ::core::mem::MaybeUninit<
3317 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3318 >,
3319 _: (),
3320 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3321 ::fidl_next::munge! {
3322 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
3323 vh0,
3324 vh1,
3325
3326 } = out_;
3327 }
3328
3329 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
3330
3331 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
3332 ::fidl_next::Constrained::validate(_field, (2, ()))?;
3333
3334 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
3335
3336 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh1.as_mut_ptr()) };
3337 ::fidl_next::Constrained::validate(_field, (32, ()))?;
3338
3339 Ok(())
3340 }
3341 }
3342
3343 unsafe impl<___E>
3344 ::fidl_next::EncodeOption<
3345 ::fidl_next::wire::Box<
3346 'static,
3347 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3348 >,
3349 ___E,
3350 > for MultipleBoundedNullableVectorsOfHandles
3351 where
3352 ___E: ::fidl_next::Encoder + ?Sized,
3353 MultipleBoundedNullableVectorsOfHandles: ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>,
3354 {
3355 #[inline]
3356 fn encode_option(
3357 this: ::core::option::Option<Self>,
3358 encoder: &mut ___E,
3359 out: &mut ::core::mem::MaybeUninit<
3360 ::fidl_next::wire::Box<
3361 'static,
3362 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3363 >,
3364 >,
3365 _: (),
3366 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3367 if let Some(inner) = this {
3368 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3369 ::fidl_next::wire::Box::encode_present(out);
3370 } else {
3371 ::fidl_next::wire::Box::encode_absent(out);
3372 }
3373
3374 Ok(())
3375 }
3376 }
3377
3378 impl<'de> ::fidl_next::FromWire<crate::wire::MultipleBoundedNullableVectorsOfHandles<'de>>
3379 for MultipleBoundedNullableVectorsOfHandles
3380 {
3381 #[inline]
3382 fn from_wire(wire: crate::wire::MultipleBoundedNullableVectorsOfHandles<'de>) -> Self {
3383 Self {
3384 vh0: ::fidl_next::FromWire::from_wire(wire.vh0),
3385
3386 vh1: ::fidl_next::FromWire::from_wire(wire.vh1),
3387 }
3388 }
3389 }
3390
3391 #[derive(Debug, PartialEq)]
3392 #[repr(C)]
3393 pub struct MultipleHandleSubtypes {
3394 pub untyped: ::fidl_next::fuchsia::zx::NullableHandle,
3395
3396 pub event: ::fidl_next::fuchsia::zx::Event,
3397
3398 pub channel: ::fidl_next::fuchsia::zx::Channel,
3399 }
3400
3401 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
3402 for MultipleHandleSubtypes
3403 where
3404 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3405 ___E: ::fidl_next::fuchsia::HandleEncoder,
3406 {
3407 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3408 Self,
3409 crate::wire::MultipleHandleSubtypes,
3410 > = unsafe {
3411 ::fidl_next::CopyOptimization::enable_if(
3412 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
3413 ::fidl_next::wire::fuchsia::NullableHandle,
3414 ___E,
3415 >>::COPY_OPTIMIZATION
3416 .is_enabled()
3417 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
3418 ::fidl_next::wire::fuchsia::Event,
3419 ___E,
3420 >>::COPY_OPTIMIZATION
3421 .is_enabled()
3422 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<
3423 ::fidl_next::wire::fuchsia::Channel,
3424 ___E,
3425 >>::COPY_OPTIMIZATION
3426 .is_enabled(),
3427 )
3428 };
3429
3430 #[inline]
3431 fn encode(
3432 self,
3433 encoder_: &mut ___E,
3434 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
3435 _: (),
3436 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3437 ::fidl_next::munge! {
3438 let crate::wire::MultipleHandleSubtypes {
3439 untyped,
3440 event,
3441 channel,
3442
3443 } = out_;
3444 }
3445
3446 ::fidl_next::Encode::encode(self.untyped, encoder_, untyped, ())?;
3447
3448 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(untyped.as_mut_ptr()) };
3449
3450 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
3451
3452 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
3453
3454 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
3455
3456 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(channel.as_mut_ptr()) };
3457
3458 Ok(())
3459 }
3460 }
3461
3462 unsafe impl<___E>
3463 ::fidl_next::EncodeOption<
3464 ::fidl_next::wire::Box<'static, crate::wire::MultipleHandleSubtypes>,
3465 ___E,
3466 > for MultipleHandleSubtypes
3467 where
3468 ___E: ::fidl_next::Encoder + ?Sized,
3469 MultipleHandleSubtypes: ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>,
3470 {
3471 #[inline]
3472 fn encode_option(
3473 this: ::core::option::Option<Self>,
3474 encoder: &mut ___E,
3475 out: &mut ::core::mem::MaybeUninit<
3476 ::fidl_next::wire::Box<'static, crate::wire::MultipleHandleSubtypes>,
3477 >,
3478 _: (),
3479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3480 if let Some(inner) = this {
3481 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3482 ::fidl_next::wire::Box::encode_present(out);
3483 } else {
3484 ::fidl_next::wire::Box::encode_absent(out);
3485 }
3486
3487 Ok(())
3488 }
3489 }
3490
3491 impl ::fidl_next::FromWire<crate::wire::MultipleHandleSubtypes> for MultipleHandleSubtypes {
3492 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3493 crate::wire::MultipleHandleSubtypes,
3494 Self,
3495 > = unsafe {
3496 ::fidl_next::CopyOptimization::enable_if(
3497 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3498 ::fidl_next::wire::fuchsia::NullableHandle,
3499 >>::COPY_OPTIMIZATION
3500 .is_enabled()
3501 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3502 ::fidl_next::wire::fuchsia::Event,
3503 >>::COPY_OPTIMIZATION
3504 .is_enabled()
3505 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
3506 ::fidl_next::wire::fuchsia::Channel,
3507 >>::COPY_OPTIMIZATION
3508 .is_enabled(),
3509 )
3510 };
3511
3512 #[inline]
3513 fn from_wire(wire: crate::wire::MultipleHandleSubtypes) -> Self {
3514 Self {
3515 untyped: ::fidl_next::FromWire::from_wire(wire.untyped),
3516
3517 event: ::fidl_next::FromWire::from_wire(wire.event),
3518
3519 channel: ::fidl_next::FromWire::from_wire(wire.channel),
3520 }
3521 }
3522 }
3523
3524 #[derive(Debug, PartialEq)]
3525 #[repr(C)]
3526 pub struct MultipleNonnullableHandles {
3527 pub data0: u32,
3528
3529 pub handle0: ::fidl_next::fuchsia::zx::NullableHandle,
3530
3531 pub data1: u64,
3532
3533 pub handle1: ::fidl_next::fuchsia::zx::Channel,
3534
3535 pub handle2: ::fidl_next::fuchsia::zx::Event,
3536
3537 pub data2: u64,
3538 }
3539
3540 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
3541 for MultipleNonnullableHandles
3542 where
3543 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3544 ___E: ::fidl_next::fuchsia::HandleEncoder,
3545 {
3546 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3547 Self,
3548 crate::wire::MultipleNonnullableHandles,
3549 > = unsafe {
3550 ::fidl_next::CopyOptimization::enable_if(
3551 true
3552
3553 && <
3554 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3555 >::COPY_OPTIMIZATION.is_enabled()
3556
3557 && <
3558 ::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>
3559 >::COPY_OPTIMIZATION.is_enabled()
3560
3561 && <
3562 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3563 >::COPY_OPTIMIZATION.is_enabled()
3564
3565 && <
3566 ::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>
3567 >::COPY_OPTIMIZATION.is_enabled()
3568
3569 && <
3570 ::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>
3571 >::COPY_OPTIMIZATION.is_enabled()
3572
3573 && <
3574 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3575 >::COPY_OPTIMIZATION.is_enabled()
3576
3577 )
3578 };
3579
3580 #[inline]
3581 fn encode(
3582 self,
3583 encoder_: &mut ___E,
3584 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
3585 _: (),
3586 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3587 ::fidl_next::munge! {
3588 let crate::wire::MultipleNonnullableHandles {
3589 data0,
3590 handle0,
3591 data1,
3592 handle1,
3593 handle2,
3594 data2,
3595
3596 } = out_;
3597 }
3598
3599 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
3600
3601 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data0.as_mut_ptr()) };
3602
3603 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
3604
3605 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle0.as_mut_ptr()) };
3606
3607 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
3608
3609 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data1.as_mut_ptr()) };
3610
3611 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
3612
3613 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle1.as_mut_ptr()) };
3614
3615 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
3616
3617 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle2.as_mut_ptr()) };
3618
3619 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
3620
3621 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data2.as_mut_ptr()) };
3622
3623 Ok(())
3624 }
3625 }
3626
3627 unsafe impl<___E>
3628 ::fidl_next::EncodeOption<
3629 ::fidl_next::wire::Box<'static, crate::wire::MultipleNonnullableHandles>,
3630 ___E,
3631 > for MultipleNonnullableHandles
3632 where
3633 ___E: ::fidl_next::Encoder + ?Sized,
3634 MultipleNonnullableHandles:
3635 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>,
3636 {
3637 #[inline]
3638 fn encode_option(
3639 this: ::core::option::Option<Self>,
3640 encoder: &mut ___E,
3641 out: &mut ::core::mem::MaybeUninit<
3642 ::fidl_next::wire::Box<'static, crate::wire::MultipleNonnullableHandles>,
3643 >,
3644 _: (),
3645 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3646 if let Some(inner) = this {
3647 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3648 ::fidl_next::wire::Box::encode_present(out);
3649 } else {
3650 ::fidl_next::wire::Box::encode_absent(out);
3651 }
3652
3653 Ok(())
3654 }
3655 }
3656
3657 impl ::fidl_next::FromWire<crate::wire::MultipleNonnullableHandles> for MultipleNonnullableHandles {
3658 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3659 crate::wire::MultipleNonnullableHandles,
3660 Self,
3661 > = unsafe {
3662 ::fidl_next::CopyOptimization::enable_if(
3663 true
3664 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
3665 .is_enabled()
3666 && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3667 ::fidl_next::wire::fuchsia::NullableHandle,
3668 >>::COPY_OPTIMIZATION
3669 .is_enabled()
3670 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
3671 .is_enabled()
3672 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
3673 ::fidl_next::wire::fuchsia::Channel,
3674 >>::COPY_OPTIMIZATION
3675 .is_enabled()
3676 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3677 ::fidl_next::wire::fuchsia::Event,
3678 >>::COPY_OPTIMIZATION
3679 .is_enabled()
3680 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
3681 .is_enabled(),
3682 )
3683 };
3684
3685 #[inline]
3686 fn from_wire(wire: crate::wire::MultipleNonnullableHandles) -> Self {
3687 Self {
3688 data0: ::fidl_next::FromWire::from_wire(wire.data0),
3689
3690 handle0: ::fidl_next::FromWire::from_wire(wire.handle0),
3691
3692 data1: ::fidl_next::FromWire::from_wire(wire.data1),
3693
3694 handle1: ::fidl_next::FromWire::from_wire(wire.handle1),
3695
3696 handle2: ::fidl_next::FromWire::from_wire(wire.handle2),
3697
3698 data2: ::fidl_next::FromWire::from_wire(wire.data2),
3699 }
3700 }
3701 }
3702
3703 #[derive(Debug, PartialEq)]
3704 #[repr(C)]
3705 pub struct MultipleNullableHandles {
3706 pub data0: u32,
3707
3708 pub handle0: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
3709
3710 pub data1: u64,
3711
3712 pub handle1: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
3713
3714 pub handle2: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
3715
3716 pub data2: u64,
3717 }
3718
3719 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
3720 for MultipleNullableHandles
3721 where
3722 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3723 ___E: ::fidl_next::fuchsia::HandleEncoder,
3724 {
3725 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3726 Self,
3727 crate::wire::MultipleNullableHandles,
3728 > = unsafe {
3729 ::fidl_next::CopyOptimization::enable_if(
3730 true
3731
3732 && <
3733 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3734 >::COPY_OPTIMIZATION.is_enabled()
3735
3736 && <
3737 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
3738 >::COPY_OPTIMIZATION.is_enabled()
3739
3740 && <
3741 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3742 >::COPY_OPTIMIZATION.is_enabled()
3743
3744 && <
3745 ::core::option::Option<::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>
3746 >::COPY_OPTIMIZATION.is_enabled()
3747
3748 && <
3749 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>
3750 >::COPY_OPTIMIZATION.is_enabled()
3751
3752 && <
3753 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3754 >::COPY_OPTIMIZATION.is_enabled()
3755
3756 )
3757 };
3758
3759 #[inline]
3760 fn encode(
3761 self,
3762 encoder_: &mut ___E,
3763 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
3764 _: (),
3765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3766 ::fidl_next::munge! {
3767 let crate::wire::MultipleNullableHandles {
3768 data0,
3769 handle0,
3770 data1,
3771 handle1,
3772 handle2,
3773 data2,
3774
3775 } = out_;
3776 }
3777
3778 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
3779
3780 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data0.as_mut_ptr()) };
3781
3782 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
3783
3784 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle0.as_mut_ptr()) };
3785
3786 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
3787
3788 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data1.as_mut_ptr()) };
3789
3790 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
3791
3792 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle1.as_mut_ptr()) };
3793
3794 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
3795
3796 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle2.as_mut_ptr()) };
3797
3798 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
3799
3800 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data2.as_mut_ptr()) };
3801
3802 Ok(())
3803 }
3804 }
3805
3806 unsafe impl<___E>
3807 ::fidl_next::EncodeOption<
3808 ::fidl_next::wire::Box<'static, crate::wire::MultipleNullableHandles>,
3809 ___E,
3810 > for MultipleNullableHandles
3811 where
3812 ___E: ::fidl_next::Encoder + ?Sized,
3813 MultipleNullableHandles: ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>,
3814 {
3815 #[inline]
3816 fn encode_option(
3817 this: ::core::option::Option<Self>,
3818 encoder: &mut ___E,
3819 out: &mut ::core::mem::MaybeUninit<
3820 ::fidl_next::wire::Box<'static, crate::wire::MultipleNullableHandles>,
3821 >,
3822 _: (),
3823 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3824 if let Some(inner) = this {
3825 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3826 ::fidl_next::wire::Box::encode_present(out);
3827 } else {
3828 ::fidl_next::wire::Box::encode_absent(out);
3829 }
3830
3831 Ok(())
3832 }
3833 }
3834
3835 impl ::fidl_next::FromWire<crate::wire::MultipleNullableHandles> for MultipleNullableHandles {
3836 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3837 crate::wire::MultipleNullableHandles,
3838 Self,
3839 > = unsafe {
3840 ::fidl_next::CopyOptimization::enable_if(
3841 true
3842
3843 && <
3844 u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>
3845 >::COPY_OPTIMIZATION.is_enabled()
3846
3847 && <
3848 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
3849 >::COPY_OPTIMIZATION.is_enabled()
3850
3851 && <
3852 u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>
3853 >::COPY_OPTIMIZATION.is_enabled()
3854
3855 && <
3856 ::core::option::Option<::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalChannel>
3857 >::COPY_OPTIMIZATION.is_enabled()
3858
3859 && <
3860 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalEvent>
3861 >::COPY_OPTIMIZATION.is_enabled()
3862
3863 && <
3864 u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>
3865 >::COPY_OPTIMIZATION.is_enabled()
3866
3867 )
3868 };
3869
3870 #[inline]
3871 fn from_wire(wire: crate::wire::MultipleNullableHandles) -> Self {
3872 Self {
3873 data0: ::fidl_next::FromWire::from_wire(wire.data0),
3874
3875 handle0: ::fidl_next::FromWire::from_wire(wire.handle0),
3876
3877 data1: ::fidl_next::FromWire::from_wire(wire.data1),
3878
3879 handle1: ::fidl_next::FromWire::from_wire(wire.handle1),
3880
3881 handle2: ::fidl_next::FromWire::from_wire(wire.handle2),
3882
3883 data2: ::fidl_next::FromWire::from_wire(wire.data2),
3884 }
3885 }
3886 }
3887
3888 #[derive(Debug, PartialEq)]
3889 #[repr(C)]
3890 pub struct NonnullableHandle {
3891 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
3892 }
3893
3894 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E> for NonnullableHandle
3895 where
3896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3897 ___E: ::fidl_next::fuchsia::HandleEncoder,
3898 {
3899 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3900 Self,
3901 crate::wire::NonnullableHandle,
3902 > = unsafe {
3903 ::fidl_next::CopyOptimization::enable_if(
3904 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
3905 ::fidl_next::wire::fuchsia::NullableHandle,
3906 ___E,
3907 >>::COPY_OPTIMIZATION
3908 .is_enabled(),
3909 )
3910 };
3911
3912 #[inline]
3913 fn encode(
3914 self,
3915 encoder_: &mut ___E,
3916 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
3917 _: (),
3918 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3919 ::fidl_next::munge! {
3920 let crate::wire::NonnullableHandle {
3921 h,
3922
3923 } = out_;
3924 }
3925
3926 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
3927
3928 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
3929
3930 Ok(())
3931 }
3932 }
3933
3934 unsafe impl<___E>
3935 ::fidl_next::EncodeOption<
3936 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandle>,
3937 ___E,
3938 > for NonnullableHandle
3939 where
3940 ___E: ::fidl_next::Encoder + ?Sized,
3941 NonnullableHandle: ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>,
3942 {
3943 #[inline]
3944 fn encode_option(
3945 this: ::core::option::Option<Self>,
3946 encoder: &mut ___E,
3947 out: &mut ::core::mem::MaybeUninit<
3948 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandle>,
3949 >,
3950 _: (),
3951 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3952 if let Some(inner) = this {
3953 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3954 ::fidl_next::wire::Box::encode_present(out);
3955 } else {
3956 ::fidl_next::wire::Box::encode_absent(out);
3957 }
3958
3959 Ok(())
3960 }
3961 }
3962
3963 impl ::fidl_next::FromWire<crate::wire::NonnullableHandle> for NonnullableHandle {
3964 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3965 crate::wire::NonnullableHandle,
3966 Self,
3967 > = unsafe {
3968 ::fidl_next::CopyOptimization::enable_if(
3969 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3970 ::fidl_next::wire::fuchsia::NullableHandle,
3971 >>::COPY_OPTIMIZATION
3972 .is_enabled(),
3973 )
3974 };
3975
3976 #[inline]
3977 fn from_wire(wire: crate::wire::NonnullableHandle) -> Self {
3978 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
3979 }
3980 }
3981
3982 #[derive(Debug, PartialEq)]
3983 #[repr(C)]
3984 pub struct NonnullableHandleArray {
3985 pub handles: [::fidl_next::fuchsia::zx::NullableHandle; 4],
3986 }
3987
3988 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
3989 for NonnullableHandleArray
3990 where
3991 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3992 ___E: ::fidl_next::fuchsia::HandleEncoder,
3993 {
3994 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3995 Self,
3996 crate::wire::NonnullableHandleArray,
3997 > = unsafe {
3998 ::fidl_next::CopyOptimization::enable_if(
3999 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::Encode<
4000 [::fidl_next::wire::fuchsia::NullableHandle; 4],
4001 ___E,
4002 >>::COPY_OPTIMIZATION
4003 .is_enabled(),
4004 )
4005 };
4006
4007 #[inline]
4008 fn encode(
4009 self,
4010 encoder_: &mut ___E,
4011 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
4012 _: (),
4013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4014 ::fidl_next::munge! {
4015 let crate::wire::NonnullableHandleArray {
4016 handles,
4017
4018 } = out_;
4019 }
4020
4021 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
4022
4023 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
4024
4025 Ok(())
4026 }
4027 }
4028
4029 unsafe impl<___E>
4030 ::fidl_next::EncodeOption<
4031 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
4032 ___E,
4033 > for NonnullableHandleArray
4034 where
4035 ___E: ::fidl_next::Encoder + ?Sized,
4036 NonnullableHandleArray: ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>,
4037 {
4038 #[inline]
4039 fn encode_option(
4040 this: ::core::option::Option<Self>,
4041 encoder: &mut ___E,
4042 out: &mut ::core::mem::MaybeUninit<
4043 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
4044 >,
4045 _: (),
4046 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4047 if let Some(inner) = this {
4048 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4049 ::fidl_next::wire::Box::encode_present(out);
4050 } else {
4051 ::fidl_next::wire::Box::encode_absent(out);
4052 }
4053
4054 Ok(())
4055 }
4056 }
4057
4058 impl ::fidl_next::FromWire<crate::wire::NonnullableHandleArray> for NonnullableHandleArray {
4059 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4060 crate::wire::NonnullableHandleArray,
4061 Self,
4062 > = unsafe {
4063 ::fidl_next::CopyOptimization::enable_if(
4064 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::FromWire<
4065 [::fidl_next::wire::fuchsia::NullableHandle; 4],
4066 >>::COPY_OPTIMIZATION
4067 .is_enabled(),
4068 )
4069 };
4070
4071 #[inline]
4072 fn from_wire(wire: crate::wire::NonnullableHandleArray) -> Self {
4073 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
4074 }
4075 }
4076
4077 #[derive(Debug, PartialEq)]
4078 #[repr(C)]
4079 pub struct NullableHandle {
4080 pub h: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
4081 }
4082
4083 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NullableHandle, ___E> for NullableHandle
4084 where
4085 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4086 ___E: ::fidl_next::fuchsia::HandleEncoder,
4087 {
4088 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::NullableHandle> = unsafe {
4089 ::fidl_next::CopyOptimization::enable_if(
4090 true
4091
4092 && <
4093 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
4094 >::COPY_OPTIMIZATION.is_enabled()
4095
4096 )
4097 };
4098
4099 #[inline]
4100 fn encode(
4101 self,
4102 encoder_: &mut ___E,
4103 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
4104 _: (),
4105 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4106 ::fidl_next::munge! {
4107 let crate::wire::NullableHandle {
4108 h,
4109
4110 } = out_;
4111 }
4112
4113 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
4114
4115 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
4116
4117 Ok(())
4118 }
4119 }
4120
4121 unsafe impl<___E>
4122 ::fidl_next::EncodeOption<
4123 ::fidl_next::wire::Box<'static, crate::wire::NullableHandle>,
4124 ___E,
4125 > for NullableHandle
4126 where
4127 ___E: ::fidl_next::Encoder + ?Sized,
4128 NullableHandle: ::fidl_next::Encode<crate::wire::NullableHandle, ___E>,
4129 {
4130 #[inline]
4131 fn encode_option(
4132 this: ::core::option::Option<Self>,
4133 encoder: &mut ___E,
4134 out: &mut ::core::mem::MaybeUninit<
4135 ::fidl_next::wire::Box<'static, crate::wire::NullableHandle>,
4136 >,
4137 _: (),
4138 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4139 if let Some(inner) = this {
4140 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4141 ::fidl_next::wire::Box::encode_present(out);
4142 } else {
4143 ::fidl_next::wire::Box::encode_absent(out);
4144 }
4145
4146 Ok(())
4147 }
4148 }
4149
4150 impl ::fidl_next::FromWire<crate::wire::NullableHandle> for NullableHandle {
4151 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::NullableHandle, Self> = unsafe {
4152 ::fidl_next::CopyOptimization::enable_if(
4153 true
4154
4155 && <
4156 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
4157 >::COPY_OPTIMIZATION.is_enabled()
4158
4159 )
4160 };
4161
4162 #[inline]
4163 fn from_wire(wire: crate::wire::NullableHandle) -> Self {
4164 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
4165 }
4166 }
4167
4168 #[derive(Debug, PartialEq)]
4169 pub struct OutOfLineArrayOfNonnullableHandles {
4170 pub handles:
4171 ::core::option::Option<::std::boxed::Box<crate::natural::NonnullableHandleArray>>,
4172 }
4173
4174 unsafe impl<___E>
4175 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
4176 for OutOfLineArrayOfNonnullableHandles
4177 where
4178 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4179 ___E: ::fidl_next::Encoder,
4180 ___E: ::fidl_next::fuchsia::HandleEncoder,
4181 {
4182 #[inline]
4183 fn encode(
4184 self,
4185 encoder_: &mut ___E,
4186 out_: &mut ::core::mem::MaybeUninit<
4187 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4188 >,
4189 _: (),
4190 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4191 ::fidl_next::munge! {
4192 let crate::wire::OutOfLineArrayOfNonnullableHandles {
4193 handles,
4194
4195 } = out_;
4196 }
4197
4198 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
4199
4200 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
4201
4202 Ok(())
4203 }
4204 }
4205
4206 unsafe impl<___E>
4207 ::fidl_next::EncodeOption<
4208 ::fidl_next::wire::Box<
4209 'static,
4210 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4211 >,
4212 ___E,
4213 > for OutOfLineArrayOfNonnullableHandles
4214 where
4215 ___E: ::fidl_next::Encoder + ?Sized,
4216 OutOfLineArrayOfNonnullableHandles:
4217 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>,
4218 {
4219 #[inline]
4220 fn encode_option(
4221 this: ::core::option::Option<Self>,
4222 encoder: &mut ___E,
4223 out: &mut ::core::mem::MaybeUninit<
4224 ::fidl_next::wire::Box<
4225 'static,
4226 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4227 >,
4228 >,
4229 _: (),
4230 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4231 if let Some(inner) = this {
4232 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4233 ::fidl_next::wire::Box::encode_present(out);
4234 } else {
4235 ::fidl_next::wire::Box::encode_absent(out);
4236 }
4237
4238 Ok(())
4239 }
4240 }
4241
4242 impl<'de> ::fidl_next::FromWire<crate::wire::OutOfLineArrayOfNonnullableHandles<'de>>
4243 for OutOfLineArrayOfNonnullableHandles
4244 {
4245 #[inline]
4246 fn from_wire(wire: crate::wire::OutOfLineArrayOfNonnullableHandles<'de>) -> Self {
4247 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
4248 }
4249 }
4250
4251 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4252 pub enum SampleResourceXUnion {
4253 U(u32),
4254
4255 Su(crate::natural::SimpleUnion),
4256
4257 St(crate::natural::SimpleTable),
4258
4259 UnknownOrdinal_(u64),
4260 }
4261
4262 impl SampleResourceXUnion {
4263 pub fn is_unknown(&self) -> bool {
4264 #[allow(unreachable_patterns)]
4265 match self {
4266 Self::UnknownOrdinal_(_) => true,
4267 _ => false,
4268 }
4269 }
4270 }
4271
4272 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>
4273 for SampleResourceXUnion
4274 where
4275 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4276 ___E: ::fidl_next::Encoder,
4277 ___E: ::fidl_next::fuchsia::HandleEncoder,
4278 {
4279 #[inline]
4280 fn encode(
4281 self,
4282 encoder: &mut ___E,
4283 out: &mut ::core::mem::MaybeUninit<crate::wire::SampleResourceXUnion<'static>>,
4284 _: (),
4285 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4286 ::fidl_next::munge!(let crate::wire::SampleResourceXUnion { raw, _phantom: _ } = out);
4287
4288 match self {
4289 Self::U(value) => ::fidl_next::wire::Union::encode_as::<
4290 ___E,
4291 ::fidl_next::wire::Uint32,
4292 >(value, 1, encoder, raw, ())?,
4293
4294 Self::Su(value) => ::fidl_next::wire::Union::encode_as::<
4295 ___E,
4296 crate::wire::SimpleUnion<'static>,
4297 >(value, 2, encoder, raw, ())?,
4298
4299 Self::St(value) => ::fidl_next::wire::Union::encode_as::<
4300 ___E,
4301 crate::wire::SimpleTable<'static>,
4302 >(value, 3, encoder, raw, ())?,
4303
4304 Self::UnknownOrdinal_(ordinal) => {
4305 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
4306 }
4307 }
4308
4309 Ok(())
4310 }
4311 }
4312
4313 unsafe impl<___E>
4314 ::fidl_next::EncodeOption<crate::wire_optional::SampleResourceXUnion<'static>, ___E>
4315 for SampleResourceXUnion
4316 where
4317 ___E: ?Sized,
4318 SampleResourceXUnion: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
4319 {
4320 #[inline]
4321 fn encode_option(
4322 this: ::core::option::Option<Self>,
4323 encoder: &mut ___E,
4324 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SampleResourceXUnion<'static>>,
4325 _: (),
4326 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4327 ::fidl_next::munge!(let crate::wire_optional::SampleResourceXUnion { raw, _phantom: _ } = &mut *out);
4328
4329 if let Some(inner) = this {
4330 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4331 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4332 } else {
4333 ::fidl_next::wire::Union::encode_absent(raw);
4334 }
4335
4336 Ok(())
4337 }
4338 }
4339
4340 impl<'de> ::fidl_next::FromWire<crate::wire::SampleResourceXUnion<'de>> for SampleResourceXUnion {
4341 #[inline]
4342 fn from_wire(wire: crate::wire::SampleResourceXUnion<'de>) -> Self {
4343 let wire = ::core::mem::ManuallyDrop::new(wire);
4344 match wire.raw.ordinal() {
4345 1 => Self::U(::fidl_next::FromWire::from_wire(unsafe {
4346 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
4347 })),
4348
4349 2 => Self::Su(::fidl_next::FromWire::from_wire(unsafe {
4350 wire.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
4351 })),
4352
4353 3 => Self::St(::fidl_next::FromWire::from_wire(unsafe {
4354 wire.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
4355 })),
4356
4357 ord => return Self::UnknownOrdinal_(ord as u64),
4358 }
4359 }
4360 }
4361
4362 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleResourceXUnion<'de>>
4363 for SampleResourceXUnion
4364 {
4365 #[inline]
4366 fn from_wire_option(
4367 wire: crate::wire_optional::SampleResourceXUnion<'de>,
4368 ) -> ::core::option::Option<Self> {
4369 if let Some(inner) = wire.into_option() {
4370 Some(::fidl_next::FromWire::from_wire(inner))
4371 } else {
4372 None
4373 }
4374 }
4375 }
4376
4377 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleResourceXUnion<'de>>
4378 for Box<SampleResourceXUnion>
4379 {
4380 #[inline]
4381 fn from_wire_option(
4382 wire: crate::wire_optional::SampleResourceXUnion<'de>,
4383 ) -> ::core::option::Option<Self> {
4384 <SampleResourceXUnion as ::fidl_next::FromWireOption<
4385 crate::wire_optional::SampleResourceXUnion<'de>,
4386 >>::from_wire_option(wire)
4387 .map(Box::new)
4388 }
4389 }
4390
4391 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4392 pub enum SampleStrictResourceXUnion {
4393 U(u32),
4394
4395 Su(crate::natural::SimpleUnion),
4396
4397 St(crate::natural::SimpleTable),
4398 }
4399
4400 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>
4401 for SampleStrictResourceXUnion
4402 where
4403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4404 ___E: ::fidl_next::Encoder,
4405 ___E: ::fidl_next::fuchsia::HandleEncoder,
4406 {
4407 #[inline]
4408 fn encode(
4409 self,
4410 encoder: &mut ___E,
4411 out: &mut ::core::mem::MaybeUninit<crate::wire::SampleStrictResourceXUnion<'static>>,
4412 _: (),
4413 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4414 ::fidl_next::munge!(let crate::wire::SampleStrictResourceXUnion { raw, _phantom: _ } = out);
4415
4416 match self {
4417 Self::U(value) => ::fidl_next::wire::Union::encode_as::<
4418 ___E,
4419 ::fidl_next::wire::Uint32,
4420 >(value, 1, encoder, raw, ())?,
4421
4422 Self::Su(value) => ::fidl_next::wire::Union::encode_as::<
4423 ___E,
4424 crate::wire::SimpleUnion<'static>,
4425 >(value, 2, encoder, raw, ())?,
4426
4427 Self::St(value) => ::fidl_next::wire::Union::encode_as::<
4428 ___E,
4429 crate::wire::SimpleTable<'static>,
4430 >(value, 3, encoder, raw, ())?,
4431 }
4432
4433 Ok(())
4434 }
4435 }
4436
4437 unsafe impl<___E>
4438 ::fidl_next::EncodeOption<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>
4439 for SampleStrictResourceXUnion
4440 where
4441 ___E: ?Sized,
4442 SampleStrictResourceXUnion:
4443 ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
4444 {
4445 #[inline]
4446 fn encode_option(
4447 this: ::core::option::Option<Self>,
4448 encoder: &mut ___E,
4449 out: &mut ::core::mem::MaybeUninit<
4450 crate::wire_optional::SampleStrictResourceXUnion<'static>,
4451 >,
4452 _: (),
4453 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4454 ::fidl_next::munge!(let crate::wire_optional::SampleStrictResourceXUnion { raw, _phantom: _ } = &mut *out);
4455
4456 if let Some(inner) = this {
4457 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4458 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4459 } else {
4460 ::fidl_next::wire::Union::encode_absent(raw);
4461 }
4462
4463 Ok(())
4464 }
4465 }
4466
4467 impl<'de> ::fidl_next::FromWire<crate::wire::SampleStrictResourceXUnion<'de>>
4468 for SampleStrictResourceXUnion
4469 {
4470 #[inline]
4471 fn from_wire(wire: crate::wire::SampleStrictResourceXUnion<'de>) -> Self {
4472 let wire = ::core::mem::ManuallyDrop::new(wire);
4473 match wire.raw.ordinal() {
4474 1 => Self::U(::fidl_next::FromWire::from_wire(unsafe {
4475 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
4476 })),
4477
4478 2 => Self::Su(::fidl_next::FromWire::from_wire(unsafe {
4479 wire.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
4480 })),
4481
4482 3 => Self::St(::fidl_next::FromWire::from_wire(unsafe {
4483 wire.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
4484 })),
4485
4486 _ => unsafe { ::core::hint::unreachable_unchecked() },
4487 }
4488 }
4489 }
4490
4491 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleStrictResourceXUnion<'de>>
4492 for SampleStrictResourceXUnion
4493 {
4494 #[inline]
4495 fn from_wire_option(
4496 wire: crate::wire_optional::SampleStrictResourceXUnion<'de>,
4497 ) -> ::core::option::Option<Self> {
4498 if let Some(inner) = wire.into_option() {
4499 Some(::fidl_next::FromWire::from_wire(inner))
4500 } else {
4501 None
4502 }
4503 }
4504 }
4505
4506 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleStrictResourceXUnion<'de>>
4507 for Box<SampleStrictResourceXUnion>
4508 {
4509 #[inline]
4510 fn from_wire_option(
4511 wire: crate::wire_optional::SampleStrictResourceXUnion<'de>,
4512 ) -> ::core::option::Option<Self> {
4513 <SampleStrictResourceXUnion as ::fidl_next::FromWireOption<
4514 crate::wire_optional::SampleStrictResourceXUnion<'de>,
4515 >>::from_wire_option(wire)
4516 .map(Box::new)
4517 }
4518 }
4519
4520 #[derive(Debug, PartialEq)]
4521 pub enum UnionWithVector {
4522 Unused(u8),
4523
4524 VectorOfUint8(::std::vec::Vec<u8>),
4525
4526 S(::std::string::String),
4527
4528 VectorS3A1(::std::vec::Vec<crate::natural::StructSize3Align1>),
4529
4530 VectorS3A2(::std::vec::Vec<crate::natural::StructSize3Align2>),
4531
4532 Handles(::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>),
4533
4534 ArrayS3A1([crate::natural::StructSize3Align1; 2]),
4535
4536 ArrayS3A2([crate::natural::StructSize3Align2; 2]),
4537
4538 VectorUnion(::std::vec::Vec<crate::natural::UnionSize8Align4>),
4539 }
4540
4541 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>
4542 for UnionWithVector
4543 where
4544 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4545 ___E: ::fidl_next::Encoder,
4546 ___E: ::fidl_next::fuchsia::HandleEncoder,
4547 {
4548 #[inline]
4549 fn encode(
4550 self,
4551 encoder: &mut ___E,
4552 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionWithVector<'static>>,
4553 _: (),
4554 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4555 ::fidl_next::munge!(let crate::wire::UnionWithVector { raw, _phantom: _ } = out);
4556
4557 match self {
4558 Self::Unused(value) => {
4559 ::fidl_next::wire::Union::encode_as::<___E, u8>(value, 1, encoder, raw, ())?
4560 }
4561
4562 Self::VectorOfUint8(value) => {
4563 ::fidl_next::wire::Union::encode_as::<
4564 ___E,
4565 ::fidl_next::wire::Vector<'static, u8>,
4566 >(value, 2, encoder, raw, (4294967295, ()))?
4567 }
4568
4569 Self::S(value) => ::fidl_next::wire::Union::encode_as::<
4570 ___E,
4571 ::fidl_next::wire::String<'static>,
4572 >(value, 3, encoder, raw, 4294967295)?,
4573
4574 Self::VectorS3A1(value) => {
4575 ::fidl_next::wire::Union::encode_as::<
4576 ___E,
4577 ::fidl_next::wire::Vector<'static, crate::wire::StructSize3Align1>,
4578 >(value, 4, encoder, raw, (4294967295, ()))?
4579 }
4580
4581 Self::VectorS3A2(value) => {
4582 ::fidl_next::wire::Union::encode_as::<
4583 ___E,
4584 ::fidl_next::wire::Vector<'static, crate::wire::StructSize3Align2>,
4585 >(value, 5, encoder, raw, (4294967295, ()))?
4586 }
4587
4588 Self::Handles(value) => ::fidl_next::wire::Union::encode_as::<
4589 ___E,
4590 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
4591 >(value, 6, encoder, raw, (4294967295, ()))?,
4592
4593 Self::ArrayS3A1(value) => ::fidl_next::wire::Union::encode_as::<
4594 ___E,
4595 [crate::wire::StructSize3Align1; 2],
4596 >(value, 7, encoder, raw, ())?,
4597
4598 Self::ArrayS3A2(value) => ::fidl_next::wire::Union::encode_as::<
4599 ___E,
4600 [crate::wire::StructSize3Align2; 2],
4601 >(value, 8, encoder, raw, ())?,
4602
4603 Self::VectorUnion(value) => {
4604 ::fidl_next::wire::Union::encode_as::<
4605 ___E,
4606 ::fidl_next::wire::Vector<'static, crate::wire::UnionSize8Align4>,
4607 >(value, 9, encoder, raw, (4294967295, ()))?
4608 }
4609 }
4610
4611 Ok(())
4612 }
4613 }
4614
4615 unsafe impl<___E>
4616 ::fidl_next::EncodeOption<crate::wire_optional::UnionWithVector<'static>, ___E>
4617 for UnionWithVector
4618 where
4619 ___E: ?Sized,
4620 UnionWithVector: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
4621 {
4622 #[inline]
4623 fn encode_option(
4624 this: ::core::option::Option<Self>,
4625 encoder: &mut ___E,
4626 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::UnionWithVector<'static>>,
4627 _: (),
4628 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4629 ::fidl_next::munge!(let crate::wire_optional::UnionWithVector { raw, _phantom: _ } = &mut *out);
4630
4631 if let Some(inner) = this {
4632 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4633 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4634 } else {
4635 ::fidl_next::wire::Union::encode_absent(raw);
4636 }
4637
4638 Ok(())
4639 }
4640 }
4641
4642 impl<'de> ::fidl_next::FromWire<crate::wire::UnionWithVector<'de>> for UnionWithVector {
4643 #[inline]
4644 fn from_wire(wire: crate::wire::UnionWithVector<'de>) -> Self {
4645 let wire = ::core::mem::ManuallyDrop::new(wire);
4646 match wire.raw.ordinal() {
4647 1 => Self::Unused(::fidl_next::FromWire::from_wire(unsafe {
4648 wire.raw.get().read_unchecked::<u8>()
4649 })),
4650
4651 2 => Self::VectorOfUint8(::fidl_next::FromWire::from_wire(unsafe {
4652 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4653 })),
4654
4655 3 => Self::S(::fidl_next::FromWire::from_wire(unsafe {
4656 wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
4657 })),
4658
4659 4 => Self::VectorS3A1(::fidl_next::FromWire::from_wire(unsafe {
4660 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
4661 })),
4662
4663 5 => Self::VectorS3A2(::fidl_next::FromWire::from_wire(unsafe {
4664 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
4665 })),
4666
4667 6 => Self::Handles(::fidl_next::FromWire::from_wire(unsafe {
4668 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>>()
4669 })),
4670
4671 7 => Self::ArrayS3A1(::fidl_next::FromWire::from_wire(unsafe {
4672 wire.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
4673 })),
4674
4675 8 => Self::ArrayS3A2(::fidl_next::FromWire::from_wire(unsafe {
4676 wire.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
4677 })),
4678
4679 9 => Self::VectorUnion(::fidl_next::FromWire::from_wire(unsafe {
4680 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
4681 })),
4682
4683 _ => unsafe { ::core::hint::unreachable_unchecked() },
4684 }
4685 }
4686 }
4687
4688 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionWithVector<'de>>
4689 for UnionWithVector
4690 {
4691 #[inline]
4692 fn from_wire_option(
4693 wire: crate::wire_optional::UnionWithVector<'de>,
4694 ) -> ::core::option::Option<Self> {
4695 if let Some(inner) = wire.into_option() {
4696 Some(::fidl_next::FromWire::from_wire(inner))
4697 } else {
4698 None
4699 }
4700 }
4701 }
4702
4703 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionWithVector<'de>>
4704 for Box<UnionWithVector>
4705 {
4706 #[inline]
4707 fn from_wire_option(
4708 wire: crate::wire_optional::UnionWithVector<'de>,
4709 ) -> ::core::option::Option<Self> {
4710 <UnionWithVector as ::fidl_next::FromWireOption<
4711 crate::wire_optional::UnionWithVector<'de>,
4712 >>::from_wire_option(wire)
4713 .map(Box::new)
4714 }
4715 }
4716
4717 #[derive(Debug, PartialEq)]
4718 pub struct Sandwich6 {
4719 pub before: u32,
4720
4721 pub the_union: crate::natural::UnionWithVector,
4722
4723 pub after: u32,
4724 }
4725
4726 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E> for Sandwich6
4727 where
4728 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4729 ___E: ::fidl_next::Encoder,
4730 ___E: ::fidl_next::fuchsia::HandleEncoder,
4731 {
4732 #[inline]
4733 fn encode(
4734 self,
4735 encoder_: &mut ___E,
4736 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
4737 _: (),
4738 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4739 ::fidl_next::munge! {
4740 let crate::wire::Sandwich6 {
4741 before,
4742 the_union,
4743 after,
4744
4745 } = out_;
4746 }
4747
4748 ::fidl_next::Encode::encode(self.before, encoder_, before, ())?;
4749
4750 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(before.as_mut_ptr()) };
4751
4752 ::fidl_next::Encode::encode(self.the_union, encoder_, the_union, ())?;
4753
4754 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(the_union.as_mut_ptr()) };
4755
4756 ::fidl_next::Encode::encode(self.after, encoder_, after, ())?;
4757
4758 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(after.as_mut_ptr()) };
4759
4760 Ok(())
4761 }
4762 }
4763
4764 unsafe impl<___E>
4765 ::fidl_next::EncodeOption<
4766 ::fidl_next::wire::Box<'static, crate::wire::Sandwich6<'static>>,
4767 ___E,
4768 > for Sandwich6
4769 where
4770 ___E: ::fidl_next::Encoder + ?Sized,
4771 Sandwich6: ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>,
4772 {
4773 #[inline]
4774 fn encode_option(
4775 this: ::core::option::Option<Self>,
4776 encoder: &mut ___E,
4777 out: &mut ::core::mem::MaybeUninit<
4778 ::fidl_next::wire::Box<'static, crate::wire::Sandwich6<'static>>,
4779 >,
4780 _: (),
4781 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4782 if let Some(inner) = this {
4783 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4784 ::fidl_next::wire::Box::encode_present(out);
4785 } else {
4786 ::fidl_next::wire::Box::encode_absent(out);
4787 }
4788
4789 Ok(())
4790 }
4791 }
4792
4793 impl<'de> ::fidl_next::FromWire<crate::wire::Sandwich6<'de>> for Sandwich6 {
4794 #[inline]
4795 fn from_wire(wire: crate::wire::Sandwich6<'de>) -> Self {
4796 Self {
4797 before: ::fidl_next::FromWire::from_wire(wire.before),
4798
4799 the_union: ::fidl_next::FromWire::from_wire(wire.the_union),
4800
4801 after: ::fidl_next::FromWire::from_wire(wire.after),
4802 }
4803 }
4804 }
4805
4806 #[derive(Debug, PartialEq)]
4807 pub struct ShortStringThenHandle {
4808 pub s: ::std::string::String,
4809
4810 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
4811 }
4812
4813 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
4814 for ShortStringThenHandle
4815 where
4816 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4817 ___E: ::fidl_next::Encoder,
4818 ___E: ::fidl_next::fuchsia::HandleEncoder,
4819 {
4820 #[inline]
4821 fn encode(
4822 self,
4823 encoder_: &mut ___E,
4824 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
4825 _: (),
4826 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4827 ::fidl_next::munge! {
4828 let crate::wire::ShortStringThenHandle {
4829 s,
4830 h,
4831
4832 } = out_;
4833 }
4834
4835 ::fidl_next::Encode::encode(self.s, encoder_, s, 1)?;
4836
4837 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4838 ::fidl_next::Constrained::validate(_field, 1)?;
4839
4840 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
4841
4842 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
4843
4844 Ok(())
4845 }
4846 }
4847
4848 unsafe impl<___E>
4849 ::fidl_next::EncodeOption<
4850 ::fidl_next::wire::Box<'static, crate::wire::ShortStringThenHandle<'static>>,
4851 ___E,
4852 > for ShortStringThenHandle
4853 where
4854 ___E: ::fidl_next::Encoder + ?Sized,
4855 ShortStringThenHandle:
4856 ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>,
4857 {
4858 #[inline]
4859 fn encode_option(
4860 this: ::core::option::Option<Self>,
4861 encoder: &mut ___E,
4862 out: &mut ::core::mem::MaybeUninit<
4863 ::fidl_next::wire::Box<'static, crate::wire::ShortStringThenHandle<'static>>,
4864 >,
4865 _: (),
4866 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4867 if let Some(inner) = this {
4868 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4869 ::fidl_next::wire::Box::encode_present(out);
4870 } else {
4871 ::fidl_next::wire::Box::encode_absent(out);
4872 }
4873
4874 Ok(())
4875 }
4876 }
4877
4878 impl<'de> ::fidl_next::FromWire<crate::wire::ShortStringThenHandle<'de>> for ShortStringThenHandle {
4879 #[inline]
4880 fn from_wire(wire: crate::wire::ShortStringThenHandle<'de>) -> Self {
4881 Self {
4882 s: ::fidl_next::FromWire::from_wire(wire.s),
4883
4884 h: ::fidl_next::FromWire::from_wire(wire.h),
4885 }
4886 }
4887 }
4888
4889 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4890 pub struct SimpleResourceTable {
4891 pub x: ::core::option::Option<i64>,
4892
4893 pub y: ::core::option::Option<i64>,
4894 }
4895
4896 impl SimpleResourceTable {
4897 fn __max_ordinal(&self) -> usize {
4898 if self.y.is_some() {
4899 return 5;
4900 }
4901
4902 if self.x.is_some() {
4903 return 1;
4904 }
4905
4906 0
4907 }
4908 }
4909
4910 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>
4911 for SimpleResourceTable
4912 where
4913 ___E: ::fidl_next::Encoder + ?Sized,
4914 ___E: ::fidl_next::fuchsia::HandleEncoder,
4915 {
4916 #[inline]
4917 fn encode(
4918 mut self,
4919 encoder: &mut ___E,
4920 out: &mut ::core::mem::MaybeUninit<crate::wire::SimpleResourceTable<'static>>,
4921 _: (),
4922 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4923 ::fidl_next::munge!(let crate::wire::SimpleResourceTable { table } = out);
4924
4925 let max_ord = self.__max_ordinal();
4926
4927 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4928 ::fidl_next::Wire::zero_padding(&mut out);
4929
4930 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4931 ::fidl_next::wire::Envelope,
4932 >(encoder, max_ord);
4933
4934 for i in 1..=max_ord {
4935 match i {
4936 5 => {
4937 if let Some(value) = self.y.take() {
4938 ::fidl_next::wire::Envelope::encode_value::<
4939 ::fidl_next::wire::Int64,
4940 ___E,
4941 >(
4942 value, preallocated.encoder, &mut out, ()
4943 )?;
4944 } else {
4945 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4946 }
4947 }
4948
4949 1 => {
4950 if let Some(value) = self.x.take() {
4951 ::fidl_next::wire::Envelope::encode_value::<
4952 ::fidl_next::wire::Int64,
4953 ___E,
4954 >(
4955 value, preallocated.encoder, &mut out, ()
4956 )?;
4957 } else {
4958 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4959 }
4960 }
4961
4962 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4963 }
4964 unsafe {
4965 preallocated.write_next(out.assume_init_ref());
4966 }
4967 }
4968
4969 ::fidl_next::wire::Table::encode_len(table, max_ord);
4970
4971 Ok(())
4972 }
4973 }
4974
4975 impl<'de> ::fidl_next::FromWire<crate::wire::SimpleResourceTable<'de>> for SimpleResourceTable {
4976 #[inline]
4977 fn from_wire(wire_: crate::wire::SimpleResourceTable<'de>) -> Self {
4978 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4979
4980 let x = wire_.table.get(1);
4981
4982 let y = wire_.table.get(5);
4983
4984 Self {
4985 x: x.map(|envelope| {
4986 ::fidl_next::FromWire::from_wire(unsafe {
4987 envelope.read_unchecked::<::fidl_next::wire::Int64>()
4988 })
4989 }),
4990
4991 y: y.map(|envelope| {
4992 ::fidl_next::FromWire::from_wire(unsafe {
4993 envelope.read_unchecked::<::fidl_next::wire::Int64>()
4994 })
4995 }),
4996 }
4997 }
4998 }
4999
5000 #[derive(Debug, PartialEq)]
5001 #[repr(C)]
5002 pub struct SingleHandle {
5003 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
5004 }
5005
5006 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SingleHandle, ___E> for SingleHandle
5007 where
5008 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5009 ___E: ::fidl_next::fuchsia::HandleEncoder,
5010 {
5011 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::SingleHandle> = unsafe {
5012 ::fidl_next::CopyOptimization::enable_if(
5013 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
5014 ::fidl_next::wire::fuchsia::NullableHandle,
5015 ___E,
5016 >>::COPY_OPTIMIZATION
5017 .is_enabled(),
5018 )
5019 };
5020
5021 #[inline]
5022 fn encode(
5023 self,
5024 encoder_: &mut ___E,
5025 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
5026 _: (),
5027 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5028 ::fidl_next::munge! {
5029 let crate::wire::SingleHandle {
5030 h,
5031
5032 } = out_;
5033 }
5034
5035 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
5036
5037 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
5038
5039 Ok(())
5040 }
5041 }
5042
5043 unsafe impl<___E>
5044 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>
5045 for SingleHandle
5046 where
5047 ___E: ::fidl_next::Encoder + ?Sized,
5048 SingleHandle: ::fidl_next::Encode<crate::wire::SingleHandle, ___E>,
5049 {
5050 #[inline]
5051 fn encode_option(
5052 this: ::core::option::Option<Self>,
5053 encoder: &mut ___E,
5054 out: &mut ::core::mem::MaybeUninit<
5055 ::fidl_next::wire::Box<'static, crate::wire::SingleHandle>,
5056 >,
5057 _: (),
5058 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5059 if let Some(inner) = this {
5060 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5061 ::fidl_next::wire::Box::encode_present(out);
5062 } else {
5063 ::fidl_next::wire::Box::encode_absent(out);
5064 }
5065
5066 Ok(())
5067 }
5068 }
5069
5070 impl ::fidl_next::FromWire<crate::wire::SingleHandle> for SingleHandle {
5071 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::SingleHandle, Self> = unsafe {
5072 ::fidl_next::CopyOptimization::enable_if(
5073 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
5074 ::fidl_next::wire::fuchsia::NullableHandle,
5075 >>::COPY_OPTIMIZATION
5076 .is_enabled(),
5077 )
5078 };
5079
5080 #[inline]
5081 fn from_wire(wire: crate::wire::SingleHandle) -> Self {
5082 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
5083 }
5084 }
5085
5086 #[derive(Debug, PartialEq)]
5087 #[repr(C)]
5088 pub struct SingleOptionalHandle {
5089 pub h: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
5090 }
5091
5092 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
5093 for SingleOptionalHandle
5094 where
5095 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5096 ___E: ::fidl_next::fuchsia::HandleEncoder,
5097 {
5098 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5099 Self,
5100 crate::wire::SingleOptionalHandle,
5101 > = unsafe {
5102 ::fidl_next::CopyOptimization::enable_if(
5103 true
5104
5105 && <
5106 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
5107 >::COPY_OPTIMIZATION.is_enabled()
5108
5109 )
5110 };
5111
5112 #[inline]
5113 fn encode(
5114 self,
5115 encoder_: &mut ___E,
5116 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
5117 _: (),
5118 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5119 ::fidl_next::munge! {
5120 let crate::wire::SingleOptionalHandle {
5121 h,
5122
5123 } = out_;
5124 }
5125
5126 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
5127
5128 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
5129
5130 Ok(())
5131 }
5132 }
5133
5134 unsafe impl<___E>
5135 ::fidl_next::EncodeOption<
5136 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
5137 ___E,
5138 > for SingleOptionalHandle
5139 where
5140 ___E: ::fidl_next::Encoder + ?Sized,
5141 SingleOptionalHandle: ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>,
5142 {
5143 #[inline]
5144 fn encode_option(
5145 this: ::core::option::Option<Self>,
5146 encoder: &mut ___E,
5147 out: &mut ::core::mem::MaybeUninit<
5148 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
5149 >,
5150 _: (),
5151 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5152 if let Some(inner) = this {
5153 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5154 ::fidl_next::wire::Box::encode_present(out);
5155 } else {
5156 ::fidl_next::wire::Box::encode_absent(out);
5157 }
5158
5159 Ok(())
5160 }
5161 }
5162
5163 impl ::fidl_next::FromWire<crate::wire::SingleOptionalHandle> for SingleOptionalHandle {
5164 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5165 crate::wire::SingleOptionalHandle,
5166 Self,
5167 > = unsafe {
5168 ::fidl_next::CopyOptimization::enable_if(
5169 true
5170
5171 && <
5172 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
5173 >::COPY_OPTIMIZATION.is_enabled()
5174
5175 )
5176 };
5177
5178 #[inline]
5179 fn from_wire(wire: crate::wire::SingleOptionalHandle) -> Self {
5180 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
5181 }
5182 }
5183
5184 #[derive(Debug, PartialEq)]
5185 #[repr(C)]
5186 pub struct StructOfEndpoints {
5187 pub client_end: ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5188
5189 pub optional_client_end: ::core::option::Option<
5190 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5191 >,
5192
5193 pub server_end: ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5194
5195 pub optional_server_end: ::core::option::Option<
5196 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5197 >,
5198 }
5199
5200 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E> for StructOfEndpoints
5201 where
5202 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5203 ___E: ::fidl_next::fuchsia::HandleEncoder,
5204 {
5205 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5206 Self,
5207 crate::wire::StructOfEndpoints,
5208 > = unsafe {
5209 ::fidl_next::CopyOptimization::enable_if(
5210 true
5211
5212 && <
5213 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>, ___E>
5214 >::COPY_OPTIMIZATION.is_enabled()
5215
5216 && <
5217 ::core::option::Option<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>, ___E>
5218 >::COPY_OPTIMIZATION.is_enabled()
5219
5220 && <
5221 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>, ___E>
5222 >::COPY_OPTIMIZATION.is_enabled()
5223
5224 && <
5225 ::core::option::Option<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>, ___E>
5226 >::COPY_OPTIMIZATION.is_enabled()
5227
5228 )
5229 };
5230
5231 #[inline]
5232 fn encode(
5233 self,
5234 encoder_: &mut ___E,
5235 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
5236 _: (),
5237 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5238 ::fidl_next::munge! {
5239 let crate::wire::StructOfEndpoints {
5240 client_end,
5241 optional_client_end,
5242 server_end,
5243 optional_server_end,
5244
5245 } = out_;
5246 }
5247
5248 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
5249
5250 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_end.as_mut_ptr()) };
5251
5252 ::fidl_next::Encode::encode(
5253 self.optional_client_end,
5254 encoder_,
5255 optional_client_end,
5256 (),
5257 )?;
5258
5259 let mut _field =
5260 unsafe { ::fidl_next::Slot::new_unchecked(optional_client_end.as_mut_ptr()) };
5261
5262 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
5263
5264 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server_end.as_mut_ptr()) };
5265
5266 ::fidl_next::Encode::encode(
5267 self.optional_server_end,
5268 encoder_,
5269 optional_server_end,
5270 (),
5271 )?;
5272
5273 let mut _field =
5274 unsafe { ::fidl_next::Slot::new_unchecked(optional_server_end.as_mut_ptr()) };
5275
5276 Ok(())
5277 }
5278 }
5279
5280 unsafe impl<___E>
5281 ::fidl_next::EncodeOption<
5282 ::fidl_next::wire::Box<'static, crate::wire::StructOfEndpoints>,
5283 ___E,
5284 > for StructOfEndpoints
5285 where
5286 ___E: ::fidl_next::Encoder + ?Sized,
5287 StructOfEndpoints: ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>,
5288 {
5289 #[inline]
5290 fn encode_option(
5291 this: ::core::option::Option<Self>,
5292 encoder: &mut ___E,
5293 out: &mut ::core::mem::MaybeUninit<
5294 ::fidl_next::wire::Box<'static, crate::wire::StructOfEndpoints>,
5295 >,
5296 _: (),
5297 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5298 if let Some(inner) = this {
5299 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5300 ::fidl_next::wire::Box::encode_present(out);
5301 } else {
5302 ::fidl_next::wire::Box::encode_absent(out);
5303 }
5304
5305 Ok(())
5306 }
5307 }
5308
5309 impl ::fidl_next::FromWire<crate::wire::StructOfEndpoints> for StructOfEndpoints {
5310 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5311 crate::wire::StructOfEndpoints,
5312 Self,
5313 > = unsafe {
5314 ::fidl_next::CopyOptimization::enable_if(
5315 true
5316
5317 && <
5318 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>
5319 >::COPY_OPTIMIZATION.is_enabled()
5320
5321 && <
5322 ::core::option::Option<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>>
5323 >::COPY_OPTIMIZATION.is_enabled()
5324
5325 && <
5326 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>
5327 >::COPY_OPTIMIZATION.is_enabled()
5328
5329 && <
5330 ::core::option::Option<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>>
5331 >::COPY_OPTIMIZATION.is_enabled()
5332
5333 )
5334 };
5335
5336 #[inline]
5337 fn from_wire(wire: crate::wire::StructOfEndpoints) -> Self {
5338 Self {
5339 client_end: ::fidl_next::FromWire::from_wire(wire.client_end),
5340
5341 optional_client_end: ::fidl_next::FromWire::from_wire(wire.optional_client_end),
5342
5343 server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
5344
5345 optional_server_end: ::fidl_next::FromWire::from_wire(wire.optional_server_end),
5346 }
5347 }
5348 }
5349
5350 #[derive(Debug, PartialEq)]
5351 #[repr(C)]
5352 pub struct StructOfOptionalUnionOfHandle {
5353 pub u: ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>>,
5354 }
5355
5356 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
5357 for StructOfOptionalUnionOfHandle
5358 where
5359 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5360 ___E: ::fidl_next::fuchsia::HandleEncoder,
5361 {
5362 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5363 Self,
5364 crate::wire::StructOfOptionalUnionOfHandle,
5365 > = unsafe {
5366 ::fidl_next::CopyOptimization::enable_if(
5367 true
5368
5369 && <
5370 ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>> as ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>
5371 >::COPY_OPTIMIZATION.is_enabled()
5372
5373 )
5374 };
5375
5376 #[inline]
5377 fn encode(
5378 self,
5379 encoder_: &mut ___E,
5380 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
5381 _: (),
5382 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5383 ::fidl_next::munge! {
5384 let crate::wire::StructOfOptionalUnionOfHandle {
5385 u,
5386
5387 } = out_;
5388 }
5389
5390 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
5391
5392 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
5393
5394 Ok(())
5395 }
5396 }
5397
5398 unsafe impl<___E>
5399 ::fidl_next::EncodeOption<
5400 ::fidl_next::wire::Box<'static, crate::wire::StructOfOptionalUnionOfHandle>,
5401 ___E,
5402 > for StructOfOptionalUnionOfHandle
5403 where
5404 ___E: ::fidl_next::Encoder + ?Sized,
5405 StructOfOptionalUnionOfHandle:
5406 ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>,
5407 {
5408 #[inline]
5409 fn encode_option(
5410 this: ::core::option::Option<Self>,
5411 encoder: &mut ___E,
5412 out: &mut ::core::mem::MaybeUninit<
5413 ::fidl_next::wire::Box<'static, crate::wire::StructOfOptionalUnionOfHandle>,
5414 >,
5415 _: (),
5416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5417 if let Some(inner) = this {
5418 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5419 ::fidl_next::wire::Box::encode_present(out);
5420 } else {
5421 ::fidl_next::wire::Box::encode_absent(out);
5422 }
5423
5424 Ok(())
5425 }
5426 }
5427
5428 impl ::fidl_next::FromWire<crate::wire::StructOfOptionalUnionOfHandle>
5429 for StructOfOptionalUnionOfHandle
5430 {
5431 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5432 crate::wire::StructOfOptionalUnionOfHandle,
5433 Self,
5434 > = unsafe {
5435 ::fidl_next::CopyOptimization::enable_if(
5436 true
5437
5438 && <
5439 ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>> as ::fidl_next::FromWire<crate::wire_optional::UnionOfHandle>
5440 >::COPY_OPTIMIZATION.is_enabled()
5441
5442 )
5443 };
5444
5445 #[inline]
5446 fn from_wire(wire: crate::wire::StructOfOptionalUnionOfHandle) -> Self {
5447 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
5448 }
5449 }
5450
5451 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5452 pub struct StructOfSimpleResourceTable {
5453 pub table: crate::natural::SimpleResourceTable,
5454 }
5455
5456 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
5457 for StructOfSimpleResourceTable
5458 where
5459 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5460 ___E: ::fidl_next::Encoder,
5461 ___E: ::fidl_next::fuchsia::HandleEncoder,
5462 {
5463 #[inline]
5464 fn encode(
5465 self,
5466 encoder_: &mut ___E,
5467 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
5468 _: (),
5469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5470 ::fidl_next::munge! {
5471 let crate::wire::StructOfSimpleResourceTable {
5472 table,
5473
5474 } = out_;
5475 }
5476
5477 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
5478
5479 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
5480
5481 Ok(())
5482 }
5483 }
5484
5485 unsafe impl<___E>
5486 ::fidl_next::EncodeOption<
5487 ::fidl_next::wire::Box<'static, crate::wire::StructOfSimpleResourceTable<'static>>,
5488 ___E,
5489 > for StructOfSimpleResourceTable
5490 where
5491 ___E: ::fidl_next::Encoder + ?Sized,
5492 StructOfSimpleResourceTable:
5493 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>,
5494 {
5495 #[inline]
5496 fn encode_option(
5497 this: ::core::option::Option<Self>,
5498 encoder: &mut ___E,
5499 out: &mut ::core::mem::MaybeUninit<
5500 ::fidl_next::wire::Box<'static, crate::wire::StructOfSimpleResourceTable<'static>>,
5501 >,
5502 _: (),
5503 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5504 if let Some(inner) = this {
5505 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5506 ::fidl_next::wire::Box::encode_present(out);
5507 } else {
5508 ::fidl_next::wire::Box::encode_absent(out);
5509 }
5510
5511 Ok(())
5512 }
5513 }
5514
5515 impl<'de> ::fidl_next::FromWire<crate::wire::StructOfSimpleResourceTable<'de>>
5516 for StructOfSimpleResourceTable
5517 {
5518 #[inline]
5519 fn from_wire(wire: crate::wire::StructOfSimpleResourceTable<'de>) -> Self {
5520 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
5521 }
5522 }
5523
5524 #[derive(Debug, Default, PartialEq)]
5525 pub struct TableFieldInlinedHandle {
5526 pub f: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
5527 }
5528
5529 impl TableFieldInlinedHandle {
5530 fn __max_ordinal(&self) -> usize {
5531 if self.f.is_some() {
5532 return 1;
5533 }
5534
5535 0
5536 }
5537 }
5538
5539 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>
5540 for TableFieldInlinedHandle
5541 where
5542 ___E: ::fidl_next::Encoder + ?Sized,
5543 ___E: ::fidl_next::fuchsia::HandleEncoder,
5544 {
5545 #[inline]
5546 fn encode(
5547 mut self,
5548 encoder: &mut ___E,
5549 out: &mut ::core::mem::MaybeUninit<crate::wire::TableFieldInlinedHandle<'static>>,
5550 _: (),
5551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5552 ::fidl_next::munge!(let crate::wire::TableFieldInlinedHandle { table } = out);
5553
5554 let max_ord = self.__max_ordinal();
5555
5556 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5557 ::fidl_next::Wire::zero_padding(&mut out);
5558
5559 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5560 ::fidl_next::wire::Envelope,
5561 >(encoder, max_ord);
5562
5563 for i in 1..=max_ord {
5564 match i {
5565 1 => {
5566 if let Some(value) = self.f.take() {
5567 ::fidl_next::wire::Envelope::encode_value::<
5568 ::fidl_next::wire::fuchsia::Channel,
5569 ___E,
5570 >(
5571 value, preallocated.encoder, &mut out, ()
5572 )?;
5573 } else {
5574 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5575 }
5576 }
5577
5578 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5579 }
5580 unsafe {
5581 preallocated.write_next(out.assume_init_ref());
5582 }
5583 }
5584
5585 ::fidl_next::wire::Table::encode_len(table, max_ord);
5586
5587 Ok(())
5588 }
5589 }
5590
5591 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldInlinedHandle<'de>>
5592 for TableFieldInlinedHandle
5593 {
5594 #[inline]
5595 fn from_wire(wire_: crate::wire::TableFieldInlinedHandle<'de>) -> Self {
5596 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5597
5598 let f = wire_.table.get(1);
5599
5600 Self {
5601 f: f.map(|envelope| {
5602 ::fidl_next::FromWire::from_wire(unsafe {
5603 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
5604 })
5605 }),
5606 }
5607 }
5608 }
5609
5610 #[derive(Debug, PartialEq)]
5611 pub struct TableFieldInlinedHandleStruct {
5612 pub t: crate::natural::TableFieldInlinedHandle,
5613 }
5614
5615 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
5616 for TableFieldInlinedHandleStruct
5617 where
5618 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5619 ___E: ::fidl_next::Encoder,
5620 ___E: ::fidl_next::fuchsia::HandleEncoder,
5621 {
5622 #[inline]
5623 fn encode(
5624 self,
5625 encoder_: &mut ___E,
5626 out_: &mut ::core::mem::MaybeUninit<
5627 crate::wire::TableFieldInlinedHandleStruct<'static>,
5628 >,
5629 _: (),
5630 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5631 ::fidl_next::munge! {
5632 let crate::wire::TableFieldInlinedHandleStruct {
5633 t,
5634
5635 } = out_;
5636 }
5637
5638 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5639
5640 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5641
5642 Ok(())
5643 }
5644 }
5645
5646 unsafe impl<___E>
5647 ::fidl_next::EncodeOption<
5648 ::fidl_next::wire::Box<'static, crate::wire::TableFieldInlinedHandleStruct<'static>>,
5649 ___E,
5650 > for TableFieldInlinedHandleStruct
5651 where
5652 ___E: ::fidl_next::Encoder + ?Sized,
5653 TableFieldInlinedHandleStruct:
5654 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>,
5655 {
5656 #[inline]
5657 fn encode_option(
5658 this: ::core::option::Option<Self>,
5659 encoder: &mut ___E,
5660 out: &mut ::core::mem::MaybeUninit<
5661 ::fidl_next::wire::Box<
5662 'static,
5663 crate::wire::TableFieldInlinedHandleStruct<'static>,
5664 >,
5665 >,
5666 _: (),
5667 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5668 if let Some(inner) = this {
5669 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5670 ::fidl_next::wire::Box::encode_present(out);
5671 } else {
5672 ::fidl_next::wire::Box::encode_absent(out);
5673 }
5674
5675 Ok(())
5676 }
5677 }
5678
5679 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldInlinedHandleStruct<'de>>
5680 for TableFieldInlinedHandleStruct
5681 {
5682 #[inline]
5683 fn from_wire(wire: crate::wire::TableFieldInlinedHandleStruct<'de>) -> Self {
5684 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
5685 }
5686 }
5687
5688 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5689 pub struct TableFieldUnknownResource {}
5690
5691 impl TableFieldUnknownResource {
5692 fn __max_ordinal(&self) -> usize {
5693 0
5694 }
5695 }
5696
5697 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>
5698 for TableFieldUnknownResource
5699 where
5700 ___E: ::fidl_next::Encoder + ?Sized,
5701 ___E: ::fidl_next::fuchsia::HandleEncoder,
5702 {
5703 #[inline]
5704 fn encode(
5705 mut self,
5706 encoder: &mut ___E,
5707 out: &mut ::core::mem::MaybeUninit<crate::wire::TableFieldUnknownResource<'static>>,
5708 _: (),
5709 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5710 ::fidl_next::munge!(let crate::wire::TableFieldUnknownResource { table } = out);
5711
5712 let max_ord = self.__max_ordinal();
5713
5714 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5715 ::fidl_next::Wire::zero_padding(&mut out);
5716
5717 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5718 ::fidl_next::wire::Envelope,
5719 >(encoder, max_ord);
5720
5721 for i in 1..=max_ord {
5722 match i {
5723 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5724 }
5725 unsafe {
5726 preallocated.write_next(out.assume_init_ref());
5727 }
5728 }
5729
5730 ::fidl_next::wire::Table::encode_len(table, max_ord);
5731
5732 Ok(())
5733 }
5734 }
5735
5736 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldUnknownResource<'de>>
5737 for TableFieldUnknownResource
5738 {
5739 #[inline]
5740 fn from_wire(wire_: crate::wire::TableFieldUnknownResource<'de>) -> Self {
5741 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5742
5743 Self {}
5744 }
5745 }
5746
5747 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5748 pub struct TableFieldUnknownResourceStruct {
5749 pub t: crate::natural::TableFieldUnknownResource,
5750 }
5751
5752 unsafe impl<___E>
5753 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
5754 for TableFieldUnknownResourceStruct
5755 where
5756 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5757 ___E: ::fidl_next::Encoder,
5758 ___E: ::fidl_next::fuchsia::HandleEncoder,
5759 {
5760 #[inline]
5761 fn encode(
5762 self,
5763 encoder_: &mut ___E,
5764 out_: &mut ::core::mem::MaybeUninit<
5765 crate::wire::TableFieldUnknownResourceStruct<'static>,
5766 >,
5767 _: (),
5768 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5769 ::fidl_next::munge! {
5770 let crate::wire::TableFieldUnknownResourceStruct {
5771 t,
5772
5773 } = out_;
5774 }
5775
5776 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5777
5778 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5779
5780 Ok(())
5781 }
5782 }
5783
5784 unsafe impl<___E>
5785 ::fidl_next::EncodeOption<
5786 ::fidl_next::wire::Box<'static, crate::wire::TableFieldUnknownResourceStruct<'static>>,
5787 ___E,
5788 > for TableFieldUnknownResourceStruct
5789 where
5790 ___E: ::fidl_next::Encoder + ?Sized,
5791 TableFieldUnknownResourceStruct:
5792 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>,
5793 {
5794 #[inline]
5795 fn encode_option(
5796 this: ::core::option::Option<Self>,
5797 encoder: &mut ___E,
5798 out: &mut ::core::mem::MaybeUninit<
5799 ::fidl_next::wire::Box<
5800 'static,
5801 crate::wire::TableFieldUnknownResourceStruct<'static>,
5802 >,
5803 >,
5804 _: (),
5805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5806 if let Some(inner) = this {
5807 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5808 ::fidl_next::wire::Box::encode_present(out);
5809 } else {
5810 ::fidl_next::wire::Box::encode_absent(out);
5811 }
5812
5813 Ok(())
5814 }
5815 }
5816
5817 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldUnknownResourceStruct<'de>>
5818 for TableFieldUnknownResourceStruct
5819 {
5820 #[inline]
5821 fn from_wire(wire: crate::wire::TableFieldUnknownResourceStruct<'de>) -> Self {
5822 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
5823 }
5824 }
5825
5826 #[derive(Debug, Default, PartialEq)]
5827 pub struct TableOfEndpointsTable {
5828 pub client_end: ::core::option::Option<
5829 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5830 >,
5831
5832 pub server_end: ::core::option::Option<
5833 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5834 >,
5835 }
5836
5837 impl TableOfEndpointsTable {
5838 fn __max_ordinal(&self) -> usize {
5839 if self.server_end.is_some() {
5840 return 2;
5841 }
5842
5843 if self.client_end.is_some() {
5844 return 1;
5845 }
5846
5847 0
5848 }
5849 }
5850
5851 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>
5852 for TableOfEndpointsTable
5853 where
5854 ___E: ::fidl_next::Encoder + ?Sized,
5855 ___E: ::fidl_next::fuchsia::HandleEncoder,
5856 {
5857 #[inline]
5858 fn encode(
5859 mut self,
5860 encoder: &mut ___E,
5861 out: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpointsTable<'static>>,
5862 _: (),
5863 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5864 ::fidl_next::munge!(let crate::wire::TableOfEndpointsTable { table } = out);
5865
5866 let max_ord = self.__max_ordinal();
5867
5868 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5869 ::fidl_next::Wire::zero_padding(&mut out);
5870
5871 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5872 ::fidl_next::wire::Envelope,
5873 >(encoder, max_ord);
5874
5875 for i in 1..=max_ord {
5876 match i {
5877 2 => {
5878 if let Some(value) = self.server_end.take() {
5879 ::fidl_next::wire::Envelope::encode_value::<
5880 ::fidl_next::ServerEnd<
5881 crate::Protocol,
5882 ::fidl_next::wire::fuchsia::Channel,
5883 >,
5884 ___E,
5885 >(
5886 value, preallocated.encoder, &mut out, ()
5887 )?;
5888 } else {
5889 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5890 }
5891 }
5892
5893 1 => {
5894 if let Some(value) = self.client_end.take() {
5895 ::fidl_next::wire::Envelope::encode_value::<
5896 ::fidl_next::ClientEnd<
5897 crate::Protocol,
5898 ::fidl_next::wire::fuchsia::Channel,
5899 >,
5900 ___E,
5901 >(
5902 value, preallocated.encoder, &mut out, ()
5903 )?;
5904 } else {
5905 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5906 }
5907 }
5908
5909 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5910 }
5911 unsafe {
5912 preallocated.write_next(out.assume_init_ref());
5913 }
5914 }
5915
5916 ::fidl_next::wire::Table::encode_len(table, max_ord);
5917
5918 Ok(())
5919 }
5920 }
5921
5922 impl<'de> ::fidl_next::FromWire<crate::wire::TableOfEndpointsTable<'de>> for TableOfEndpointsTable {
5923 #[inline]
5924 fn from_wire(wire_: crate::wire::TableOfEndpointsTable<'de>) -> Self {
5925 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5926
5927 let client_end = wire_.table.get(1);
5928
5929 let server_end = wire_.table.get(2);
5930
5931 Self {
5932 client_end: client_end.map(|envelope| {
5933 ::fidl_next::FromWire::from_wire(unsafe {
5934 envelope.read_unchecked::<::fidl_next::ClientEnd<
5935 crate::Protocol,
5936 ::fidl_next::wire::fuchsia::Channel,
5937 >>()
5938 })
5939 }),
5940
5941 server_end: server_end.map(|envelope| {
5942 ::fidl_next::FromWire::from_wire(unsafe {
5943 envelope.read_unchecked::<::fidl_next::ServerEnd<
5944 crate::Protocol,
5945 ::fidl_next::wire::fuchsia::Channel,
5946 >>()
5947 })
5948 }),
5949 }
5950 }
5951 }
5952
5953 #[derive(Debug, PartialEq)]
5954 pub struct TableOfEndpoints {
5955 pub t: crate::natural::TableOfEndpointsTable,
5956 }
5957
5958 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
5959 for TableOfEndpoints
5960 where
5961 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5962 ___E: ::fidl_next::Encoder,
5963 ___E: ::fidl_next::fuchsia::HandleEncoder,
5964 {
5965 #[inline]
5966 fn encode(
5967 self,
5968 encoder_: &mut ___E,
5969 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
5970 _: (),
5971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5972 ::fidl_next::munge! {
5973 let crate::wire::TableOfEndpoints {
5974 t,
5975
5976 } = out_;
5977 }
5978
5979 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5980
5981 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5982
5983 Ok(())
5984 }
5985 }
5986
5987 unsafe impl<___E>
5988 ::fidl_next::EncodeOption<
5989 ::fidl_next::wire::Box<'static, crate::wire::TableOfEndpoints<'static>>,
5990 ___E,
5991 > for TableOfEndpoints
5992 where
5993 ___E: ::fidl_next::Encoder + ?Sized,
5994 TableOfEndpoints: ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>,
5995 {
5996 #[inline]
5997 fn encode_option(
5998 this: ::core::option::Option<Self>,
5999 encoder: &mut ___E,
6000 out: &mut ::core::mem::MaybeUninit<
6001 ::fidl_next::wire::Box<'static, crate::wire::TableOfEndpoints<'static>>,
6002 >,
6003 _: (),
6004 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6005 if let Some(inner) = this {
6006 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6007 ::fidl_next::wire::Box::encode_present(out);
6008 } else {
6009 ::fidl_next::wire::Box::encode_absent(out);
6010 }
6011
6012 Ok(())
6013 }
6014 }
6015
6016 impl<'de> ::fidl_next::FromWire<crate::wire::TableOfEndpoints<'de>> for TableOfEndpoints {
6017 #[inline]
6018 fn from_wire(wire: crate::wire::TableOfEndpoints<'de>) -> Self {
6019 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
6020 }
6021 }
6022
6023 #[derive(Debug, Default, PartialEq)]
6024 pub struct TableUnionWithVectorReservedSandwich {
6025 pub uv: ::core::option::Option<crate::natural::UnionWithVector>,
6026 }
6027
6028 impl TableUnionWithVectorReservedSandwich {
6029 fn __max_ordinal(&self) -> usize {
6030 if self.uv.is_some() {
6031 return 2;
6032 }
6033
6034 0
6035 }
6036 }
6037
6038 unsafe impl<___E>
6039 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>
6040 for TableUnionWithVectorReservedSandwich
6041 where
6042 ___E: ::fidl_next::Encoder + ?Sized,
6043 ___E: ::fidl_next::fuchsia::HandleEncoder,
6044 {
6045 #[inline]
6046 fn encode(
6047 mut self,
6048 encoder: &mut ___E,
6049 out: &mut ::core::mem::MaybeUninit<
6050 crate::wire::TableUnionWithVectorReservedSandwich<'static>,
6051 >,
6052 _: (),
6053 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6054 ::fidl_next::munge!(let crate::wire::TableUnionWithVectorReservedSandwich { table } = out);
6055
6056 let max_ord = self.__max_ordinal();
6057
6058 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6059 ::fidl_next::Wire::zero_padding(&mut out);
6060
6061 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6062 ::fidl_next::wire::Envelope,
6063 >(encoder, max_ord);
6064
6065 for i in 1..=max_ord {
6066 match i {
6067 2 => {
6068 if let Some(value) = self.uv.take() {
6069 ::fidl_next::wire::Envelope::encode_value::<
6070 crate::wire::UnionWithVector<'static>,
6071 ___E,
6072 >(
6073 value, preallocated.encoder, &mut out, ()
6074 )?;
6075 } else {
6076 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6077 }
6078 }
6079
6080 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6081 }
6082 unsafe {
6083 preallocated.write_next(out.assume_init_ref());
6084 }
6085 }
6086
6087 ::fidl_next::wire::Table::encode_len(table, max_ord);
6088
6089 Ok(())
6090 }
6091 }
6092
6093 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorReservedSandwich<'de>>
6094 for TableUnionWithVectorReservedSandwich
6095 {
6096 #[inline]
6097 fn from_wire(wire_: crate::wire::TableUnionWithVectorReservedSandwich<'de>) -> Self {
6098 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6099
6100 let uv = wire_.table.get(2);
6101
6102 Self {
6103 uv: uv.map(|envelope| {
6104 ::fidl_next::FromWire::from_wire(unsafe {
6105 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
6106 })
6107 }),
6108 }
6109 }
6110 }
6111
6112 #[derive(Debug, PartialEq)]
6113 pub struct TableUnionWithVectorReservedSandwichStruct {
6114 pub table: crate::natural::TableUnionWithVectorReservedSandwich,
6115 }
6116
6117 unsafe impl<___E>
6118 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
6119 for TableUnionWithVectorReservedSandwichStruct
6120 where
6121 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6122 ___E: ::fidl_next::Encoder,
6123 ___E: ::fidl_next::fuchsia::HandleEncoder,
6124 {
6125 #[inline]
6126 fn encode(
6127 self,
6128 encoder_: &mut ___E,
6129 out_: &mut ::core::mem::MaybeUninit<
6130 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6131 >,
6132 _: (),
6133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6134 ::fidl_next::munge! {
6135 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
6136 table,
6137
6138 } = out_;
6139 }
6140
6141 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
6142
6143 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
6144
6145 Ok(())
6146 }
6147 }
6148
6149 unsafe impl<___E>
6150 ::fidl_next::EncodeOption<
6151 ::fidl_next::wire::Box<
6152 'static,
6153 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6154 >,
6155 ___E,
6156 > for TableUnionWithVectorReservedSandwichStruct
6157 where
6158 ___E: ::fidl_next::Encoder + ?Sized,
6159 TableUnionWithVectorReservedSandwichStruct: ::fidl_next::Encode<
6160 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6161 ___E,
6162 >,
6163 {
6164 #[inline]
6165 fn encode_option(
6166 this: ::core::option::Option<Self>,
6167 encoder: &mut ___E,
6168 out: &mut ::core::mem::MaybeUninit<
6169 ::fidl_next::wire::Box<
6170 'static,
6171 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6172 >,
6173 >,
6174 _: (),
6175 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6176 if let Some(inner) = this {
6177 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6178 ::fidl_next::wire::Box::encode_present(out);
6179 } else {
6180 ::fidl_next::wire::Box::encode_absent(out);
6181 }
6182
6183 Ok(())
6184 }
6185 }
6186
6187 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorReservedSandwichStruct<'de>>
6188 for TableUnionWithVectorReservedSandwichStruct
6189 {
6190 #[inline]
6191 fn from_wire(wire: crate::wire::TableUnionWithVectorReservedSandwichStruct<'de>) -> Self {
6192 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
6193 }
6194 }
6195
6196 #[derive(Debug, Default, PartialEq)]
6197 pub struct TableUnionWithVectorStructSandwich {
6198 pub s1: ::core::option::Option<crate::natural::StructSize3Align1>,
6199
6200 pub uv: ::core::option::Option<crate::natural::UnionWithVector>,
6201
6202 pub s2: ::core::option::Option<crate::natural::StructSize3Align1>,
6203 }
6204
6205 impl TableUnionWithVectorStructSandwich {
6206 fn __max_ordinal(&self) -> usize {
6207 if self.s2.is_some() {
6208 return 3;
6209 }
6210
6211 if self.uv.is_some() {
6212 return 2;
6213 }
6214
6215 if self.s1.is_some() {
6216 return 1;
6217 }
6218
6219 0
6220 }
6221 }
6222
6223 unsafe impl<___E>
6224 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>
6225 for TableUnionWithVectorStructSandwich
6226 where
6227 ___E: ::fidl_next::Encoder + ?Sized,
6228 ___E: ::fidl_next::fuchsia::HandleEncoder,
6229 {
6230 #[inline]
6231 fn encode(
6232 mut self,
6233 encoder: &mut ___E,
6234 out: &mut ::core::mem::MaybeUninit<
6235 crate::wire::TableUnionWithVectorStructSandwich<'static>,
6236 >,
6237 _: (),
6238 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6239 ::fidl_next::munge!(let crate::wire::TableUnionWithVectorStructSandwich { table } = out);
6240
6241 let max_ord = self.__max_ordinal();
6242
6243 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6244 ::fidl_next::Wire::zero_padding(&mut out);
6245
6246 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6247 ::fidl_next::wire::Envelope,
6248 >(encoder, max_ord);
6249
6250 for i in 1..=max_ord {
6251 match i {
6252 3 => {
6253 if let Some(value) = self.s2.take() {
6254 ::fidl_next::wire::Envelope::encode_value::<
6255 crate::wire::StructSize3Align1,
6256 ___E,
6257 >(
6258 value, preallocated.encoder, &mut out, ()
6259 )?;
6260 } else {
6261 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6262 }
6263 }
6264
6265 2 => {
6266 if let Some(value) = self.uv.take() {
6267 ::fidl_next::wire::Envelope::encode_value::<
6268 crate::wire::UnionWithVector<'static>,
6269 ___E,
6270 >(
6271 value, preallocated.encoder, &mut out, ()
6272 )?;
6273 } else {
6274 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6275 }
6276 }
6277
6278 1 => {
6279 if let Some(value) = self.s1.take() {
6280 ::fidl_next::wire::Envelope::encode_value::<
6281 crate::wire::StructSize3Align1,
6282 ___E,
6283 >(
6284 value, preallocated.encoder, &mut out, ()
6285 )?;
6286 } else {
6287 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6288 }
6289 }
6290
6291 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6292 }
6293 unsafe {
6294 preallocated.write_next(out.assume_init_ref());
6295 }
6296 }
6297
6298 ::fidl_next::wire::Table::encode_len(table, max_ord);
6299
6300 Ok(())
6301 }
6302 }
6303
6304 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorStructSandwich<'de>>
6305 for TableUnionWithVectorStructSandwich
6306 {
6307 #[inline]
6308 fn from_wire(wire_: crate::wire::TableUnionWithVectorStructSandwich<'de>) -> Self {
6309 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6310
6311 let s1 = wire_.table.get(1);
6312
6313 let uv = wire_.table.get(2);
6314
6315 let s2 = wire_.table.get(3);
6316
6317 Self {
6318 s1: s1.map(|envelope| {
6319 ::fidl_next::FromWire::from_wire(unsafe {
6320 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
6321 })
6322 }),
6323
6324 uv: uv.map(|envelope| {
6325 ::fidl_next::FromWire::from_wire(unsafe {
6326 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
6327 })
6328 }),
6329
6330 s2: s2.map(|envelope| {
6331 ::fidl_next::FromWire::from_wire(unsafe {
6332 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
6333 })
6334 }),
6335 }
6336 }
6337 }
6338
6339 #[derive(Debug, PartialEq)]
6340 pub struct TableUnionWithVectorStructSandwichStruct {
6341 pub table: crate::natural::TableUnionWithVectorStructSandwich,
6342 }
6343
6344 unsafe impl<___E>
6345 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
6346 for TableUnionWithVectorStructSandwichStruct
6347 where
6348 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6349 ___E: ::fidl_next::Encoder,
6350 ___E: ::fidl_next::fuchsia::HandleEncoder,
6351 {
6352 #[inline]
6353 fn encode(
6354 self,
6355 encoder_: &mut ___E,
6356 out_: &mut ::core::mem::MaybeUninit<
6357 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6358 >,
6359 _: (),
6360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6361 ::fidl_next::munge! {
6362 let crate::wire::TableUnionWithVectorStructSandwichStruct {
6363 table,
6364
6365 } = out_;
6366 }
6367
6368 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
6369
6370 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
6371
6372 Ok(())
6373 }
6374 }
6375
6376 unsafe impl<___E>
6377 ::fidl_next::EncodeOption<
6378 ::fidl_next::wire::Box<
6379 'static,
6380 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6381 >,
6382 ___E,
6383 > for TableUnionWithVectorStructSandwichStruct
6384 where
6385 ___E: ::fidl_next::Encoder + ?Sized,
6386 TableUnionWithVectorStructSandwichStruct: ::fidl_next::Encode<
6387 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6388 ___E,
6389 >,
6390 {
6391 #[inline]
6392 fn encode_option(
6393 this: ::core::option::Option<Self>,
6394 encoder: &mut ___E,
6395 out: &mut ::core::mem::MaybeUninit<
6396 ::fidl_next::wire::Box<
6397 'static,
6398 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6399 >,
6400 >,
6401 _: (),
6402 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6403 if let Some(inner) = this {
6404 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6405 ::fidl_next::wire::Box::encode_present(out);
6406 } else {
6407 ::fidl_next::wire::Box::encode_absent(out);
6408 }
6409
6410 Ok(())
6411 }
6412 }
6413
6414 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorStructSandwichStruct<'de>>
6415 for TableUnionWithVectorStructSandwichStruct
6416 {
6417 #[inline]
6418 fn from_wire(wire: crate::wire::TableUnionWithVectorStructSandwichStruct<'de>) -> Self {
6419 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
6420 }
6421 }
6422
6423 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6424 pub struct TestFlexibleResourceXUnionInStruct {
6425 pub xu: crate::natural::SampleResourceXUnion,
6426 }
6427
6428 unsafe impl<___E>
6429 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
6430 for TestFlexibleResourceXUnionInStruct
6431 where
6432 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6433 ___E: ::fidl_next::Encoder,
6434 ___E: ::fidl_next::fuchsia::HandleEncoder,
6435 {
6436 #[inline]
6437 fn encode(
6438 self,
6439 encoder_: &mut ___E,
6440 out_: &mut ::core::mem::MaybeUninit<
6441 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6442 >,
6443 _: (),
6444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6445 ::fidl_next::munge! {
6446 let crate::wire::TestFlexibleResourceXUnionInStruct {
6447 xu,
6448
6449 } = out_;
6450 }
6451
6452 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6453
6454 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6455
6456 Ok(())
6457 }
6458 }
6459
6460 unsafe impl<___E>
6461 ::fidl_next::EncodeOption<
6462 ::fidl_next::wire::Box<
6463 'static,
6464 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6465 >,
6466 ___E,
6467 > for TestFlexibleResourceXUnionInStruct
6468 where
6469 ___E: ::fidl_next::Encoder + ?Sized,
6470 TestFlexibleResourceXUnionInStruct:
6471 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>,
6472 {
6473 #[inline]
6474 fn encode_option(
6475 this: ::core::option::Option<Self>,
6476 encoder: &mut ___E,
6477 out: &mut ::core::mem::MaybeUninit<
6478 ::fidl_next::wire::Box<
6479 'static,
6480 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6481 >,
6482 >,
6483 _: (),
6484 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6485 if let Some(inner) = this {
6486 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6487 ::fidl_next::wire::Box::encode_present(out);
6488 } else {
6489 ::fidl_next::wire::Box::encode_absent(out);
6490 }
6491
6492 Ok(())
6493 }
6494 }
6495
6496 impl<'de> ::fidl_next::FromWire<crate::wire::TestFlexibleResourceXUnionInStruct<'de>>
6497 for TestFlexibleResourceXUnionInStruct
6498 {
6499 #[inline]
6500 fn from_wire(wire: crate::wire::TestFlexibleResourceXUnionInStruct<'de>) -> Self {
6501 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6502 }
6503 }
6504
6505 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6506 pub struct TestOptionalFlexibleResourceXUnionInStruct {
6507 pub xu: ::core::option::Option<::std::boxed::Box<crate::natural::SampleResourceXUnion>>,
6508 }
6509
6510 unsafe impl<___E>
6511 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
6512 for TestOptionalFlexibleResourceXUnionInStruct
6513 where
6514 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6515 ___E: ::fidl_next::Encoder,
6516 ___E: ::fidl_next::fuchsia::HandleEncoder,
6517 {
6518 #[inline]
6519 fn encode(
6520 self,
6521 encoder_: &mut ___E,
6522 out_: &mut ::core::mem::MaybeUninit<
6523 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6524 >,
6525 _: (),
6526 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6527 ::fidl_next::munge! {
6528 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
6529 xu,
6530
6531 } = out_;
6532 }
6533
6534 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6535
6536 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6537
6538 Ok(())
6539 }
6540 }
6541
6542 unsafe impl<___E>
6543 ::fidl_next::EncodeOption<
6544 ::fidl_next::wire::Box<
6545 'static,
6546 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6547 >,
6548 ___E,
6549 > for TestOptionalFlexibleResourceXUnionInStruct
6550 where
6551 ___E: ::fidl_next::Encoder + ?Sized,
6552 TestOptionalFlexibleResourceXUnionInStruct: ::fidl_next::Encode<
6553 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6554 ___E,
6555 >,
6556 {
6557 #[inline]
6558 fn encode_option(
6559 this: ::core::option::Option<Self>,
6560 encoder: &mut ___E,
6561 out: &mut ::core::mem::MaybeUninit<
6562 ::fidl_next::wire::Box<
6563 'static,
6564 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6565 >,
6566 >,
6567 _: (),
6568 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6569 if let Some(inner) = this {
6570 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6571 ::fidl_next::wire::Box::encode_present(out);
6572 } else {
6573 ::fidl_next::wire::Box::encode_absent(out);
6574 }
6575
6576 Ok(())
6577 }
6578 }
6579
6580 impl<'de> ::fidl_next::FromWire<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'de>>
6581 for TestOptionalFlexibleResourceXUnionInStruct
6582 {
6583 #[inline]
6584 fn from_wire(wire: crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'de>) -> Self {
6585 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6586 }
6587 }
6588
6589 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6590 pub struct TestOptionalStrictResourceXUnionInStruct {
6591 pub xu:
6592 ::core::option::Option<::std::boxed::Box<crate::natural::SampleStrictResourceXUnion>>,
6593 }
6594
6595 unsafe impl<___E>
6596 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
6597 for TestOptionalStrictResourceXUnionInStruct
6598 where
6599 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6600 ___E: ::fidl_next::Encoder,
6601 ___E: ::fidl_next::fuchsia::HandleEncoder,
6602 {
6603 #[inline]
6604 fn encode(
6605 self,
6606 encoder_: &mut ___E,
6607 out_: &mut ::core::mem::MaybeUninit<
6608 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6609 >,
6610 _: (),
6611 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6612 ::fidl_next::munge! {
6613 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
6614 xu,
6615
6616 } = out_;
6617 }
6618
6619 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6620
6621 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6622
6623 Ok(())
6624 }
6625 }
6626
6627 unsafe impl<___E>
6628 ::fidl_next::EncodeOption<
6629 ::fidl_next::wire::Box<
6630 'static,
6631 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6632 >,
6633 ___E,
6634 > for TestOptionalStrictResourceXUnionInStruct
6635 where
6636 ___E: ::fidl_next::Encoder + ?Sized,
6637 TestOptionalStrictResourceXUnionInStruct: ::fidl_next::Encode<
6638 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6639 ___E,
6640 >,
6641 {
6642 #[inline]
6643 fn encode_option(
6644 this: ::core::option::Option<Self>,
6645 encoder: &mut ___E,
6646 out: &mut ::core::mem::MaybeUninit<
6647 ::fidl_next::wire::Box<
6648 'static,
6649 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6650 >,
6651 >,
6652 _: (),
6653 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6654 if let Some(inner) = this {
6655 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6656 ::fidl_next::wire::Box::encode_present(out);
6657 } else {
6658 ::fidl_next::wire::Box::encode_absent(out);
6659 }
6660
6661 Ok(())
6662 }
6663 }
6664
6665 impl<'de> ::fidl_next::FromWire<crate::wire::TestOptionalStrictResourceXUnionInStruct<'de>>
6666 for TestOptionalStrictResourceXUnionInStruct
6667 {
6668 #[inline]
6669 fn from_wire(wire: crate::wire::TestOptionalStrictResourceXUnionInStruct<'de>) -> Self {
6670 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6671 }
6672 }
6673
6674 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6675 pub struct TestPackageResolverResolveRequest {
6676 pub package_url: ::std::string::String,
6677
6678 pub selectors: ::std::vec::Vec<::std::string::String>,
6679
6680 pub update_policy: crate::natural::UpdatePolicy,
6681
6682 pub this_should_be_a_handle: u32,
6683 }
6684
6685 unsafe impl<___E>
6686 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
6687 for TestPackageResolverResolveRequest
6688 where
6689 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6690 ___E: ::fidl_next::Encoder,
6691 ___E: ::fidl_next::fuchsia::HandleEncoder,
6692 {
6693 #[inline]
6694 fn encode(
6695 self,
6696 encoder_: &mut ___E,
6697 out_: &mut ::core::mem::MaybeUninit<
6698 crate::wire::TestPackageResolverResolveRequest<'static>,
6699 >,
6700 _: (),
6701 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6702 ::fidl_next::munge! {
6703 let crate::wire::TestPackageResolverResolveRequest {
6704 package_url,
6705 selectors,
6706 update_policy,
6707 this_should_be_a_handle,
6708
6709 } = out_;
6710 }
6711
6712 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
6713
6714 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(package_url.as_mut_ptr()) };
6715 ::fidl_next::Constrained::validate(_field, 4294967295)?;
6716
6717 ::fidl_next::Encode::encode(
6718 self.selectors,
6719 encoder_,
6720 selectors,
6721 (4294967295, 4294967295),
6722 )?;
6723
6724 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(selectors.as_mut_ptr()) };
6725 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
6726
6727 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
6728
6729 let mut _field =
6730 unsafe { ::fidl_next::Slot::new_unchecked(update_policy.as_mut_ptr()) };
6731
6732 ::fidl_next::Encode::encode(
6733 self.this_should_be_a_handle,
6734 encoder_,
6735 this_should_be_a_handle,
6736 (),
6737 )?;
6738
6739 let mut _field =
6740 unsafe { ::fidl_next::Slot::new_unchecked(this_should_be_a_handle.as_mut_ptr()) };
6741
6742 Ok(())
6743 }
6744 }
6745
6746 unsafe impl<___E>
6747 ::fidl_next::EncodeOption<
6748 ::fidl_next::wire::Box<
6749 'static,
6750 crate::wire::TestPackageResolverResolveRequest<'static>,
6751 >,
6752 ___E,
6753 > for TestPackageResolverResolveRequest
6754 where
6755 ___E: ::fidl_next::Encoder + ?Sized,
6756 TestPackageResolverResolveRequest:
6757 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>,
6758 {
6759 #[inline]
6760 fn encode_option(
6761 this: ::core::option::Option<Self>,
6762 encoder: &mut ___E,
6763 out: &mut ::core::mem::MaybeUninit<
6764 ::fidl_next::wire::Box<
6765 'static,
6766 crate::wire::TestPackageResolverResolveRequest<'static>,
6767 >,
6768 >,
6769 _: (),
6770 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6771 if let Some(inner) = this {
6772 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6773 ::fidl_next::wire::Box::encode_present(out);
6774 } else {
6775 ::fidl_next::wire::Box::encode_absent(out);
6776 }
6777
6778 Ok(())
6779 }
6780 }
6781
6782 impl<'de> ::fidl_next::FromWire<crate::wire::TestPackageResolverResolveRequest<'de>>
6783 for TestPackageResolverResolveRequest
6784 {
6785 #[inline]
6786 fn from_wire(wire: crate::wire::TestPackageResolverResolveRequest<'de>) -> Self {
6787 Self {
6788 package_url: ::fidl_next::FromWire::from_wire(wire.package_url),
6789
6790 selectors: ::fidl_next::FromWire::from_wire(wire.selectors),
6791
6792 update_policy: ::fidl_next::FromWire::from_wire(wire.update_policy),
6793
6794 this_should_be_a_handle: ::fidl_next::FromWire::from_wire(
6795 wire.this_should_be_a_handle,
6796 ),
6797 }
6798 }
6799 }
6800
6801 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6802 pub struct TestStrictResourceXUnionInStruct {
6803 pub xu: crate::natural::SampleStrictResourceXUnion,
6804 }
6805
6806 unsafe impl<___E>
6807 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
6808 for TestStrictResourceXUnionInStruct
6809 where
6810 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6811 ___E: ::fidl_next::Encoder,
6812 ___E: ::fidl_next::fuchsia::HandleEncoder,
6813 {
6814 #[inline]
6815 fn encode(
6816 self,
6817 encoder_: &mut ___E,
6818 out_: &mut ::core::mem::MaybeUninit<
6819 crate::wire::TestStrictResourceXUnionInStruct<'static>,
6820 >,
6821 _: (),
6822 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6823 ::fidl_next::munge! {
6824 let crate::wire::TestStrictResourceXUnionInStruct {
6825 xu,
6826
6827 } = out_;
6828 }
6829
6830 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6831
6832 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6833
6834 Ok(())
6835 }
6836 }
6837
6838 unsafe impl<___E>
6839 ::fidl_next::EncodeOption<
6840 ::fidl_next::wire::Box<'static, crate::wire::TestStrictResourceXUnionInStruct<'static>>,
6841 ___E,
6842 > for TestStrictResourceXUnionInStruct
6843 where
6844 ___E: ::fidl_next::Encoder + ?Sized,
6845 TestStrictResourceXUnionInStruct:
6846 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>,
6847 {
6848 #[inline]
6849 fn encode_option(
6850 this: ::core::option::Option<Self>,
6851 encoder: &mut ___E,
6852 out: &mut ::core::mem::MaybeUninit<
6853 ::fidl_next::wire::Box<
6854 'static,
6855 crate::wire::TestStrictResourceXUnionInStruct<'static>,
6856 >,
6857 >,
6858 _: (),
6859 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6860 if let Some(inner) = this {
6861 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6862 ::fidl_next::wire::Box::encode_present(out);
6863 } else {
6864 ::fidl_next::wire::Box::encode_absent(out);
6865 }
6866
6867 Ok(())
6868 }
6869 }
6870
6871 impl<'de> ::fidl_next::FromWire<crate::wire::TestStrictResourceXUnionInStruct<'de>>
6872 for TestStrictResourceXUnionInStruct
6873 {
6874 #[inline]
6875 fn from_wire(wire: crate::wire::TestStrictResourceXUnionInStruct<'de>) -> Self {
6876 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6877 }
6878 }
6879
6880 #[derive(Debug, PartialEq)]
6881 pub struct UnboundedNonnullableVectorOfHandles {
6882 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
6883 }
6884
6885 unsafe impl<___E>
6886 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
6887 for UnboundedNonnullableVectorOfHandles
6888 where
6889 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6890 ___E: ::fidl_next::Encoder,
6891 ___E: ::fidl_next::fuchsia::HandleEncoder,
6892 {
6893 #[inline]
6894 fn encode(
6895 self,
6896 encoder_: &mut ___E,
6897 out_: &mut ::core::mem::MaybeUninit<
6898 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
6899 >,
6900 _: (),
6901 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6902 ::fidl_next::munge! {
6903 let crate::wire::UnboundedNonnullableVectorOfHandles {
6904 vh0,
6905
6906 } = out_;
6907 }
6908
6909 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
6910
6911 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
6912 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
6913
6914 Ok(())
6915 }
6916 }
6917
6918 unsafe impl<___E>
6919 ::fidl_next::EncodeOption<
6920 ::fidl_next::wire::Box<
6921 'static,
6922 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
6923 >,
6924 ___E,
6925 > for UnboundedNonnullableVectorOfHandles
6926 where
6927 ___E: ::fidl_next::Encoder + ?Sized,
6928 UnboundedNonnullableVectorOfHandles:
6929 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>,
6930 {
6931 #[inline]
6932 fn encode_option(
6933 this: ::core::option::Option<Self>,
6934 encoder: &mut ___E,
6935 out: &mut ::core::mem::MaybeUninit<
6936 ::fidl_next::wire::Box<
6937 'static,
6938 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
6939 >,
6940 >,
6941 _: (),
6942 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6943 if let Some(inner) = this {
6944 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6945 ::fidl_next::wire::Box::encode_present(out);
6946 } else {
6947 ::fidl_next::wire::Box::encode_absent(out);
6948 }
6949
6950 Ok(())
6951 }
6952 }
6953
6954 impl<'de> ::fidl_next::FromWire<crate::wire::UnboundedNonnullableVectorOfHandles<'de>>
6955 for UnboundedNonnullableVectorOfHandles
6956 {
6957 #[inline]
6958 fn from_wire(wire: crate::wire::UnboundedNonnullableVectorOfHandles<'de>) -> Self {
6959 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
6960 }
6961 }
6962
6963 #[derive(Debug, PartialEq)]
6964 pub struct UnboundedNullableVectorOfHandles {
6965 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
6966 }
6967
6968 unsafe impl<___E>
6969 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
6970 for UnboundedNullableVectorOfHandles
6971 where
6972 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6973 ___E: ::fidl_next::Encoder,
6974 ___E: ::fidl_next::fuchsia::HandleEncoder,
6975 {
6976 #[inline]
6977 fn encode(
6978 self,
6979 encoder_: &mut ___E,
6980 out_: &mut ::core::mem::MaybeUninit<
6981 crate::wire::UnboundedNullableVectorOfHandles<'static>,
6982 >,
6983 _: (),
6984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6985 ::fidl_next::munge! {
6986 let crate::wire::UnboundedNullableVectorOfHandles {
6987 vh0,
6988
6989 } = out_;
6990 }
6991
6992 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
6993
6994 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
6995 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
6996
6997 Ok(())
6998 }
6999 }
7000
7001 unsafe impl<___E>
7002 ::fidl_next::EncodeOption<
7003 ::fidl_next::wire::Box<'static, crate::wire::UnboundedNullableVectorOfHandles<'static>>,
7004 ___E,
7005 > for UnboundedNullableVectorOfHandles
7006 where
7007 ___E: ::fidl_next::Encoder + ?Sized,
7008 UnboundedNullableVectorOfHandles:
7009 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>,
7010 {
7011 #[inline]
7012 fn encode_option(
7013 this: ::core::option::Option<Self>,
7014 encoder: &mut ___E,
7015 out: &mut ::core::mem::MaybeUninit<
7016 ::fidl_next::wire::Box<
7017 'static,
7018 crate::wire::UnboundedNullableVectorOfHandles<'static>,
7019 >,
7020 >,
7021 _: (),
7022 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7023 if let Some(inner) = this {
7024 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7025 ::fidl_next::wire::Box::encode_present(out);
7026 } else {
7027 ::fidl_next::wire::Box::encode_absent(out);
7028 }
7029
7030 Ok(())
7031 }
7032 }
7033
7034 impl<'de> ::fidl_next::FromWire<crate::wire::UnboundedNullableVectorOfHandles<'de>>
7035 for UnboundedNullableVectorOfHandles
7036 {
7037 #[inline]
7038 fn from_wire(wire: crate::wire::UnboundedNullableVectorOfHandles<'de>) -> Self {
7039 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
7040 }
7041 }
7042
7043 #[derive(Debug, PartialEq)]
7044 pub enum UnionOfEndpointsUnion {
7045 ClientEnd(::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>),
7046
7047 ServerEnd(::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>),
7048
7049 UnknownOrdinal_(u64),
7050 }
7051
7052 impl UnionOfEndpointsUnion {
7053 pub fn is_unknown(&self) -> bool {
7054 #[allow(unreachable_patterns)]
7055 match self {
7056 Self::UnknownOrdinal_(_) => true,
7057 _ => false,
7058 }
7059 }
7060 }
7061
7062 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>
7063 for UnionOfEndpointsUnion
7064 where
7065 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7066 ___E: ::fidl_next::Encoder,
7067 ___E: ::fidl_next::fuchsia::HandleEncoder,
7068 {
7069 #[inline]
7070 fn encode(
7071 self,
7072 encoder: &mut ___E,
7073 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpointsUnion<'static>>,
7074 _: (),
7075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7076 ::fidl_next::munge!(let crate::wire::UnionOfEndpointsUnion { raw, _phantom: _ } = out);
7077
7078 match self {
7079 Self::ClientEnd(value) => ::fidl_next::wire::Union::encode_as::<
7080 ___E,
7081 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
7082 >(value, 1, encoder, raw, ())?,
7083
7084 Self::ServerEnd(value) => ::fidl_next::wire::Union::encode_as::<
7085 ___E,
7086 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
7087 >(value, 2, encoder, raw, ())?,
7088
7089 Self::UnknownOrdinal_(ordinal) => {
7090 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
7091 }
7092 }
7093
7094 Ok(())
7095 }
7096 }
7097
7098 unsafe impl<___E>
7099 ::fidl_next::EncodeOption<crate::wire_optional::UnionOfEndpointsUnion<'static>, ___E>
7100 for UnionOfEndpointsUnion
7101 where
7102 ___E: ?Sized,
7103 UnionOfEndpointsUnion:
7104 ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
7105 {
7106 #[inline]
7107 fn encode_option(
7108 this: ::core::option::Option<Self>,
7109 encoder: &mut ___E,
7110 out: &mut ::core::mem::MaybeUninit<
7111 crate::wire_optional::UnionOfEndpointsUnion<'static>,
7112 >,
7113 _: (),
7114 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7115 ::fidl_next::munge!(let crate::wire_optional::UnionOfEndpointsUnion { raw, _phantom: _ } = &mut *out);
7116
7117 if let Some(inner) = this {
7118 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7119 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7120 } else {
7121 ::fidl_next::wire::Union::encode_absent(raw);
7122 }
7123
7124 Ok(())
7125 }
7126 }
7127
7128 impl<'de> ::fidl_next::FromWire<crate::wire::UnionOfEndpointsUnion<'de>> for UnionOfEndpointsUnion {
7129 #[inline]
7130 fn from_wire(wire: crate::wire::UnionOfEndpointsUnion<'de>) -> Self {
7131 let wire = ::core::mem::ManuallyDrop::new(wire);
7132 match wire.raw.ordinal() {
7133 1 => Self::ClientEnd(::fidl_next::FromWire::from_wire(unsafe {
7134 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
7135 })),
7136
7137 2 => Self::ServerEnd(::fidl_next::FromWire::from_wire(unsafe {
7138 wire.raw.get().read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
7139 })),
7140
7141 ord => return Self::UnknownOrdinal_(ord as u64),
7142 }
7143 }
7144 }
7145
7146 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionOfEndpointsUnion<'de>>
7147 for UnionOfEndpointsUnion
7148 {
7149 #[inline]
7150 fn from_wire_option(
7151 wire: crate::wire_optional::UnionOfEndpointsUnion<'de>,
7152 ) -> ::core::option::Option<Self> {
7153 if let Some(inner) = wire.into_option() {
7154 Some(::fidl_next::FromWire::from_wire(inner))
7155 } else {
7156 None
7157 }
7158 }
7159 }
7160
7161 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionOfEndpointsUnion<'de>>
7162 for Box<UnionOfEndpointsUnion>
7163 {
7164 #[inline]
7165 fn from_wire_option(
7166 wire: crate::wire_optional::UnionOfEndpointsUnion<'de>,
7167 ) -> ::core::option::Option<Self> {
7168 <UnionOfEndpointsUnion as ::fidl_next::FromWireOption<
7169 crate::wire_optional::UnionOfEndpointsUnion<'de>,
7170 >>::from_wire_option(wire)
7171 .map(Box::new)
7172 }
7173 }
7174
7175 #[derive(Debug, PartialEq)]
7176 pub struct UnionOfEndpoints {
7177 pub u: crate::natural::UnionOfEndpointsUnion,
7178 }
7179
7180 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
7181 for UnionOfEndpoints
7182 where
7183 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7184 ___E: ::fidl_next::Encoder,
7185 ___E: ::fidl_next::fuchsia::HandleEncoder,
7186 {
7187 #[inline]
7188 fn encode(
7189 self,
7190 encoder_: &mut ___E,
7191 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
7192 _: (),
7193 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7194 ::fidl_next::munge! {
7195 let crate::wire::UnionOfEndpoints {
7196 u,
7197
7198 } = out_;
7199 }
7200
7201 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
7202
7203 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
7204
7205 Ok(())
7206 }
7207 }
7208
7209 unsafe impl<___E>
7210 ::fidl_next::EncodeOption<
7211 ::fidl_next::wire::Box<'static, crate::wire::UnionOfEndpoints<'static>>,
7212 ___E,
7213 > for UnionOfEndpoints
7214 where
7215 ___E: ::fidl_next::Encoder + ?Sized,
7216 UnionOfEndpoints: ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>,
7217 {
7218 #[inline]
7219 fn encode_option(
7220 this: ::core::option::Option<Self>,
7221 encoder: &mut ___E,
7222 out: &mut ::core::mem::MaybeUninit<
7223 ::fidl_next::wire::Box<'static, crate::wire::UnionOfEndpoints<'static>>,
7224 >,
7225 _: (),
7226 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7227 if let Some(inner) = this {
7228 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7229 ::fidl_next::wire::Box::encode_present(out);
7230 } else {
7231 ::fidl_next::wire::Box::encode_absent(out);
7232 }
7233
7234 Ok(())
7235 }
7236 }
7237
7238 impl<'de> ::fidl_next::FromWire<crate::wire::UnionOfEndpoints<'de>> for UnionOfEndpoints {
7239 #[inline]
7240 fn from_wire(wire: crate::wire::UnionOfEndpoints<'de>) -> Self {
7241 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
7242 }
7243 }
7244
7245 #[derive(Debug, PartialEq)]
7246 pub enum UnionOfHandle {
7247 H(::fidl_next::fuchsia::zx::NullableHandle),
7248 }
7249
7250 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfHandle, ___E> for UnionOfHandle
7251 where
7252 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7253 ___E: ::fidl_next::fuchsia::HandleEncoder,
7254 {
7255 #[inline]
7256 fn encode(
7257 self,
7258 encoder: &mut ___E,
7259 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfHandle>,
7260 _: (),
7261 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7262 ::fidl_next::munge!(let crate::wire::UnionOfHandle { raw, _phantom: _ } = out);
7263
7264 match self {
7265 Self::H(value) => ::fidl_next::wire::Union::encode_as_static::<
7266 ___E,
7267 ::fidl_next::wire::fuchsia::NullableHandle,
7268 >(value, 1, encoder, raw, ())?,
7269 }
7270
7271 Ok(())
7272 }
7273 }
7274
7275 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::UnionOfHandle, ___E>
7276 for UnionOfHandle
7277 where
7278 ___E: ?Sized,
7279 UnionOfHandle: ::fidl_next::Encode<crate::wire::UnionOfHandle, ___E>,
7280 {
7281 #[inline]
7282 fn encode_option(
7283 this: ::core::option::Option<Self>,
7284 encoder: &mut ___E,
7285 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::UnionOfHandle>,
7286 _: (),
7287 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7288 ::fidl_next::munge!(let crate::wire_optional::UnionOfHandle { raw, _phantom: _ } = &mut *out);
7289
7290 if let Some(inner) = this {
7291 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7292 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7293 } else {
7294 ::fidl_next::wire::Union::encode_absent(raw);
7295 }
7296
7297 Ok(())
7298 }
7299 }
7300
7301 impl ::fidl_next::FromWire<crate::wire::UnionOfHandle> for UnionOfHandle {
7302 #[inline]
7303 fn from_wire(wire: crate::wire::UnionOfHandle) -> Self {
7304 let wire = ::core::mem::ManuallyDrop::new(wire);
7305 match wire.raw.ordinal() {
7306 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
7307 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
7308 })),
7309
7310 _ => unsafe { ::core::hint::unreachable_unchecked() },
7311 }
7312 }
7313 }
7314
7315 impl ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle> for UnionOfHandle {
7316 #[inline]
7317 fn from_wire_option(
7318 wire: crate::wire_optional::UnionOfHandle,
7319 ) -> ::core::option::Option<Self> {
7320 if let Some(inner) = wire.into_option() {
7321 Some(::fidl_next::FromWire::from_wire(inner))
7322 } else {
7323 None
7324 }
7325 }
7326 }
7327
7328 impl ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle> for Box<UnionOfHandle> {
7329 #[inline]
7330 fn from_wire_option(
7331 wire: crate::wire_optional::UnionOfHandle,
7332 ) -> ::core::option::Option<Self> {
7333 <
7334 UnionOfHandle as ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle>
7335 >::from_wire_option(wire).map(Box::new)
7336 }
7337 }
7338
7339 #[derive(Debug, PartialEq)]
7340 pub struct VectorOfArrayOfEventInStructWithDefaultRights {
7341 pub h: ::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>,
7342 }
7343
7344 unsafe impl<___E>
7345 ::fidl_next::Encode<
7346 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7347 ___E,
7348 > for VectorOfArrayOfEventInStructWithDefaultRights
7349 where
7350 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7351 ___E: ::fidl_next::Encoder,
7352 ___E: ::fidl_next::fuchsia::HandleEncoder,
7353 {
7354 #[inline]
7355 fn encode(
7356 self,
7357 encoder_: &mut ___E,
7358 out_: &mut ::core::mem::MaybeUninit<
7359 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7360 >,
7361 _: (),
7362 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7363 ::fidl_next::munge! {
7364 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
7365 h,
7366
7367 } = out_;
7368 }
7369
7370 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
7371
7372 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
7373 ::fidl_next::Constrained::validate(_field, (1, ()))?;
7374
7375 Ok(())
7376 }
7377 }
7378
7379 unsafe impl<___E>
7380 ::fidl_next::EncodeOption<
7381 ::fidl_next::wire::Box<
7382 'static,
7383 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7384 >,
7385 ___E,
7386 > for VectorOfArrayOfEventInStructWithDefaultRights
7387 where
7388 ___E: ::fidl_next::Encoder + ?Sized,
7389 VectorOfArrayOfEventInStructWithDefaultRights: ::fidl_next::Encode<
7390 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7391 ___E,
7392 >,
7393 {
7394 #[inline]
7395 fn encode_option(
7396 this: ::core::option::Option<Self>,
7397 encoder: &mut ___E,
7398 out: &mut ::core::mem::MaybeUninit<
7399 ::fidl_next::wire::Box<
7400 'static,
7401 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7402 >,
7403 >,
7404 _: (),
7405 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7406 if let Some(inner) = this {
7407 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7408 ::fidl_next::wire::Box::encode_present(out);
7409 } else {
7410 ::fidl_next::wire::Box::encode_absent(out);
7411 }
7412
7413 Ok(())
7414 }
7415 }
7416
7417 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'de>>
7418 for VectorOfArrayOfEventInStructWithDefaultRights
7419 {
7420 #[inline]
7421 fn from_wire(
7422 wire: crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'de>,
7423 ) -> Self {
7424 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
7425 }
7426 }
7427
7428 #[derive(Debug, PartialEq)]
7429 pub struct VectorOfArrayOfEventInStructWithReducedRights {
7430 pub h: ::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>,
7431 }
7432
7433 unsafe impl<___E>
7434 ::fidl_next::Encode<
7435 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7436 ___E,
7437 > for VectorOfArrayOfEventInStructWithReducedRights
7438 where
7439 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7440 ___E: ::fidl_next::Encoder,
7441 ___E: ::fidl_next::fuchsia::HandleEncoder,
7442 {
7443 #[inline]
7444 fn encode(
7445 self,
7446 encoder_: &mut ___E,
7447 out_: &mut ::core::mem::MaybeUninit<
7448 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7449 >,
7450 _: (),
7451 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7452 ::fidl_next::munge! {
7453 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
7454 h,
7455
7456 } = out_;
7457 }
7458
7459 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
7460
7461 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
7462 ::fidl_next::Constrained::validate(_field, (1, ()))?;
7463
7464 Ok(())
7465 }
7466 }
7467
7468 unsafe impl<___E>
7469 ::fidl_next::EncodeOption<
7470 ::fidl_next::wire::Box<
7471 'static,
7472 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7473 >,
7474 ___E,
7475 > for VectorOfArrayOfEventInStructWithReducedRights
7476 where
7477 ___E: ::fidl_next::Encoder + ?Sized,
7478 VectorOfArrayOfEventInStructWithReducedRights: ::fidl_next::Encode<
7479 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7480 ___E,
7481 >,
7482 {
7483 #[inline]
7484 fn encode_option(
7485 this: ::core::option::Option<Self>,
7486 encoder: &mut ___E,
7487 out: &mut ::core::mem::MaybeUninit<
7488 ::fidl_next::wire::Box<
7489 'static,
7490 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7491 >,
7492 >,
7493 _: (),
7494 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7495 if let Some(inner) = this {
7496 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7497 ::fidl_next::wire::Box::encode_present(out);
7498 } else {
7499 ::fidl_next::wire::Box::encode_absent(out);
7500 }
7501
7502 Ok(())
7503 }
7504 }
7505
7506 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'de>>
7507 for VectorOfArrayOfEventInStructWithReducedRights
7508 {
7509 #[inline]
7510 fn from_wire(
7511 wire: crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'de>,
7512 ) -> Self {
7513 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
7514 }
7515 }
7516
7517 #[derive(Debug, Default, PartialEq)]
7518 pub struct VectorOfArrayOfEventInTableWithReducedRights {
7519 pub h: ::core::option::Option<::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>>,
7520 }
7521
7522 impl VectorOfArrayOfEventInTableWithReducedRights {
7523 fn __max_ordinal(&self) -> usize {
7524 if self.h.is_some() {
7525 return 1;
7526 }
7527
7528 0
7529 }
7530 }
7531
7532 unsafe impl<___E>
7533 ::fidl_next::Encode<
7534 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
7535 ___E,
7536 > for VectorOfArrayOfEventInTableWithReducedRights
7537 where
7538 ___E: ::fidl_next::Encoder + ?Sized,
7539 ___E: ::fidl_next::fuchsia::HandleEncoder,
7540 {
7541 #[inline]
7542 fn encode(
7543 mut self,
7544 encoder: &mut ___E,
7545 out: &mut ::core::mem::MaybeUninit<
7546 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
7547 >,
7548 _: (),
7549 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7550 ::fidl_next::munge!(let crate::wire::VectorOfArrayOfEventInTableWithReducedRights { table } = out);
7551
7552 let max_ord = self.__max_ordinal();
7553
7554 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7555 ::fidl_next::Wire::zero_padding(&mut out);
7556
7557 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7558 ::fidl_next::wire::Envelope,
7559 >(encoder, max_ord);
7560
7561 for i in 1..=max_ord {
7562 match i {
7563 1 => {
7564 if let Some(value) = self.h.take() {
7565 ::fidl_next::wire::Envelope::encode_value::<
7566 ::fidl_next::wire::Vector<
7567 'static,
7568 [::fidl_next::wire::fuchsia::Event; 1],
7569 >,
7570 ___E,
7571 >(
7572 value, preallocated.encoder, &mut out, (1, ())
7573 )?;
7574 } else {
7575 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7576 }
7577 }
7578
7579 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7580 }
7581 unsafe {
7582 preallocated.write_next(out.assume_init_ref());
7583 }
7584 }
7585
7586 ::fidl_next::wire::Table::encode_len(table, max_ord);
7587
7588 Ok(())
7589 }
7590 }
7591
7592 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>>
7593 for VectorOfArrayOfEventInTableWithReducedRights
7594 {
7595 #[inline]
7596 fn from_wire(
7597 wire_: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
7598 ) -> Self {
7599 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7600
7601 let h = wire_.table.get(1);
7602
7603 Self {
7604 h:
7605 h.map(|envelope| {
7606 ::fidl_next::FromWire::from_wire(unsafe {
7607 envelope.read_unchecked::<::fidl_next::wire::Vector<
7608 'de,
7609 [::fidl_next::wire::fuchsia::Event; 1],
7610 >>()
7611 })
7612 }),
7613 }
7614 }
7615 }
7616
7617 #[derive(Debug, PartialEq)]
7618 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct {
7619 pub t: crate::natural::VectorOfArrayOfEventInTableWithReducedRights,
7620 }
7621
7622 unsafe impl<___E>
7623 ::fidl_next::Encode<
7624 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7625 ___E,
7626 > for VectorOfArrayOfEventInTableWithReducedRightsStruct
7627 where
7628 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7629 ___E: ::fidl_next::Encoder,
7630 ___E: ::fidl_next::fuchsia::HandleEncoder,
7631 {
7632 #[inline]
7633 fn encode(
7634 self,
7635 encoder_: &mut ___E,
7636 out_: &mut ::core::mem::MaybeUninit<
7637 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7638 >,
7639 _: (),
7640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7641 ::fidl_next::munge! {
7642 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
7643 t,
7644
7645 } = out_;
7646 }
7647
7648 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
7649
7650 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
7651
7652 Ok(())
7653 }
7654 }
7655
7656 unsafe impl<___E>
7657 ::fidl_next::EncodeOption<
7658 ::fidl_next::wire::Box<
7659 'static,
7660 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7661 >,
7662 ___E,
7663 > for VectorOfArrayOfEventInTableWithReducedRightsStruct
7664 where
7665 ___E: ::fidl_next::Encoder + ?Sized,
7666 VectorOfArrayOfEventInTableWithReducedRightsStruct: ::fidl_next::Encode<
7667 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7668 ___E,
7669 >,
7670 {
7671 #[inline]
7672 fn encode_option(
7673 this: ::core::option::Option<Self>,
7674 encoder: &mut ___E,
7675 out: &mut ::core::mem::MaybeUninit<
7676 ::fidl_next::wire::Box<
7677 'static,
7678 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7679 >,
7680 >,
7681 _: (),
7682 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7683 if let Some(inner) = this {
7684 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7685 ::fidl_next::wire::Box::encode_present(out);
7686 } else {
7687 ::fidl_next::wire::Box::encode_absent(out);
7688 }
7689
7690 Ok(())
7691 }
7692 }
7693
7694 impl<'de>
7695 ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>>
7696 for VectorOfArrayOfEventInTableWithReducedRightsStruct
7697 {
7698 #[inline]
7699 fn from_wire(
7700 wire: crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>,
7701 ) -> Self {
7702 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
7703 }
7704 }
7705
7706 #[derive(Debug, PartialEq)]
7707 pub enum VectorOfArrayOfEventInUnionWithReducedRights {
7708 H(::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>),
7709 }
7710
7711 unsafe impl<___E>
7712 ::fidl_next::Encode<
7713 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7714 ___E,
7715 > for VectorOfArrayOfEventInUnionWithReducedRights
7716 where
7717 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7718 ___E: ::fidl_next::Encoder,
7719 ___E: ::fidl_next::fuchsia::HandleEncoder,
7720 {
7721 #[inline]
7722 fn encode(
7723 self,
7724 encoder: &mut ___E,
7725 out: &mut ::core::mem::MaybeUninit<
7726 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7727 >,
7728 _: (),
7729 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7730 ::fidl_next::munge!(let crate::wire::VectorOfArrayOfEventInUnionWithReducedRights { raw, _phantom: _ } = out);
7731
7732 match self {
7733 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
7734 ___E,
7735 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
7736 >(value, 1, encoder, raw, (1, ()))?,
7737 }
7738
7739 Ok(())
7740 }
7741 }
7742
7743 unsafe impl<___E>
7744 ::fidl_next::EncodeOption<
7745 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7746 ___E,
7747 > for VectorOfArrayOfEventInUnionWithReducedRights
7748 where
7749 ___E: ?Sized,
7750 VectorOfArrayOfEventInUnionWithReducedRights: ::fidl_next::Encode<
7751 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7752 ___E,
7753 >,
7754 {
7755 #[inline]
7756 fn encode_option(
7757 this: ::core::option::Option<Self>,
7758 encoder: &mut ___E,
7759 out: &mut ::core::mem::MaybeUninit<
7760 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
7761 >,
7762 _: (),
7763 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7764 ::fidl_next::munge!(let crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights { raw, _phantom: _ } = &mut *out);
7765
7766 if let Some(inner) = this {
7767 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7768 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7769 } else {
7770 ::fidl_next::wire::Union::encode_absent(raw);
7771 }
7772
7773 Ok(())
7774 }
7775 }
7776
7777 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
7778 for VectorOfArrayOfEventInUnionWithReducedRights
7779 {
7780 #[inline]
7781 fn from_wire(wire: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>) -> Self {
7782 let wire = ::core::mem::ManuallyDrop::new(wire);
7783 match wire.raw.ordinal() {
7784 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
7785 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
7786 })),
7787
7788 _ => unsafe { ::core::hint::unreachable_unchecked() },
7789 }
7790 }
7791 }
7792
7793 impl<'de>
7794 ::fidl_next::FromWireOption<
7795 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7796 > for VectorOfArrayOfEventInUnionWithReducedRights
7797 {
7798 #[inline]
7799 fn from_wire_option(
7800 wire: crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7801 ) -> ::core::option::Option<Self> {
7802 if let Some(inner) = wire.into_option() {
7803 Some(::fidl_next::FromWire::from_wire(inner))
7804 } else {
7805 None
7806 }
7807 }
7808 }
7809
7810 impl<'de>
7811 ::fidl_next::FromWireOption<
7812 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7813 > for Box<VectorOfArrayOfEventInUnionWithReducedRights>
7814 {
7815 #[inline]
7816 fn from_wire_option(
7817 wire: crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7818 ) -> ::core::option::Option<Self> {
7819 <VectorOfArrayOfEventInUnionWithReducedRights as ::fidl_next::FromWireOption<
7820 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
7821 >>::from_wire_option(wire)
7822 .map(Box::new)
7823 }
7824 }
7825
7826 #[derive(Debug, PartialEq)]
7827 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct {
7828 pub u: crate::natural::VectorOfArrayOfEventInUnionWithReducedRights,
7829 }
7830
7831 unsafe impl<___E>
7832 ::fidl_next::Encode<
7833 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7834 ___E,
7835 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct
7836 where
7837 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7838 ___E: ::fidl_next::Encoder,
7839 ___E: ::fidl_next::fuchsia::HandleEncoder,
7840 {
7841 #[inline]
7842 fn encode(
7843 self,
7844 encoder_: &mut ___E,
7845 out_: &mut ::core::mem::MaybeUninit<
7846 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7847 >,
7848 _: (),
7849 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7850 ::fidl_next::munge! {
7851 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
7852 u,
7853
7854 } = out_;
7855 }
7856
7857 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
7858
7859 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
7860
7861 Ok(())
7862 }
7863 }
7864
7865 unsafe impl<___E>
7866 ::fidl_next::EncodeOption<
7867 ::fidl_next::wire::Box<
7868 'static,
7869 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7870 >,
7871 ___E,
7872 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct
7873 where
7874 ___E: ::fidl_next::Encoder + ?Sized,
7875 VectorOfArrayOfEventInUnionWithReducedRightsStruct: ::fidl_next::Encode<
7876 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7877 ___E,
7878 >,
7879 {
7880 #[inline]
7881 fn encode_option(
7882 this: ::core::option::Option<Self>,
7883 encoder: &mut ___E,
7884 out: &mut ::core::mem::MaybeUninit<
7885 ::fidl_next::wire::Box<
7886 'static,
7887 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
7888 >,
7889 >,
7890 _: (),
7891 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7892 if let Some(inner) = this {
7893 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7894 ::fidl_next::wire::Box::encode_present(out);
7895 } else {
7896 ::fidl_next::wire::Box::encode_absent(out);
7897 }
7898
7899 Ok(())
7900 }
7901 }
7902
7903 impl<'de>
7904 ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>>
7905 for VectorOfArrayOfEventInUnionWithReducedRightsStruct
7906 {
7907 #[inline]
7908 fn from_wire(
7909 wire: crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>,
7910 ) -> Self {
7911 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
7912 }
7913 }
7914
7915 #[derive(Debug, PartialEq)]
7916 pub struct VectorOfHandles {
7917 pub v: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
7918 }
7919
7920 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
7921 for VectorOfHandles
7922 where
7923 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7924 ___E: ::fidl_next::Encoder,
7925 ___E: ::fidl_next::fuchsia::HandleEncoder,
7926 {
7927 #[inline]
7928 fn encode(
7929 self,
7930 encoder_: &mut ___E,
7931 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
7932 _: (),
7933 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7934 ::fidl_next::munge! {
7935 let crate::wire::VectorOfHandles {
7936 v,
7937
7938 } = out_;
7939 }
7940
7941 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
7942
7943 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
7944 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
7945
7946 Ok(())
7947 }
7948 }
7949
7950 unsafe impl<___E>
7951 ::fidl_next::EncodeOption<
7952 ::fidl_next::wire::Box<'static, crate::wire::VectorOfHandles<'static>>,
7953 ___E,
7954 > for VectorOfHandles
7955 where
7956 ___E: ::fidl_next::Encoder + ?Sized,
7957 VectorOfHandles: ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>,
7958 {
7959 #[inline]
7960 fn encode_option(
7961 this: ::core::option::Option<Self>,
7962 encoder: &mut ___E,
7963 out: &mut ::core::mem::MaybeUninit<
7964 ::fidl_next::wire::Box<'static, crate::wire::VectorOfHandles<'static>>,
7965 >,
7966 _: (),
7967 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7968 if let Some(inner) = this {
7969 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7970 ::fidl_next::wire::Box::encode_present(out);
7971 } else {
7972 ::fidl_next::wire::Box::encode_absent(out);
7973 }
7974
7975 Ok(())
7976 }
7977 }
7978
7979 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfHandles<'de>> for VectorOfHandles {
7980 #[inline]
7981 fn from_wire(wire: crate::wire::VectorOfHandles<'de>) -> Self {
7982 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
7983 }
7984 }
7985
7986 #[derive(Debug, PartialEq)]
7987 pub struct VectorOfOptionalHandles {
7988 pub v: ::std::vec::Vec<::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>>,
7989 }
7990
7991 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
7992 for VectorOfOptionalHandles
7993 where
7994 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7995 ___E: ::fidl_next::Encoder,
7996 ___E: ::fidl_next::fuchsia::HandleEncoder,
7997 {
7998 #[inline]
7999 fn encode(
8000 self,
8001 encoder_: &mut ___E,
8002 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
8003 _: (),
8004 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8005 ::fidl_next::munge! {
8006 let crate::wire::VectorOfOptionalHandles {
8007 v,
8008
8009 } = out_;
8010 }
8011
8012 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
8013
8014 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8015 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
8016
8017 Ok(())
8018 }
8019 }
8020
8021 unsafe impl<___E>
8022 ::fidl_next::EncodeOption<
8023 ::fidl_next::wire::Box<'static, crate::wire::VectorOfOptionalHandles<'static>>,
8024 ___E,
8025 > for VectorOfOptionalHandles
8026 where
8027 ___E: ::fidl_next::Encoder + ?Sized,
8028 VectorOfOptionalHandles:
8029 ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>,
8030 {
8031 #[inline]
8032 fn encode_option(
8033 this: ::core::option::Option<Self>,
8034 encoder: &mut ___E,
8035 out: &mut ::core::mem::MaybeUninit<
8036 ::fidl_next::wire::Box<'static, crate::wire::VectorOfOptionalHandles<'static>>,
8037 >,
8038 _: (),
8039 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8040 if let Some(inner) = this {
8041 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8042 ::fidl_next::wire::Box::encode_present(out);
8043 } else {
8044 ::fidl_next::wire::Box::encode_absent(out);
8045 }
8046
8047 Ok(())
8048 }
8049 }
8050
8051 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfOptionalHandles<'de>>
8052 for VectorOfOptionalHandles
8053 {
8054 #[inline]
8055 fn from_wire(wire: crate::wire::VectorOfOptionalHandles<'de>) -> Self {
8056 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8057 }
8058 }
8059
8060 #[derive(Debug, PartialEq)]
8061 pub struct VectorOfUpTo2Handles {
8062 pub v: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
8063 }
8064
8065 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
8066 for VectorOfUpTo2Handles
8067 where
8068 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8069 ___E: ::fidl_next::Encoder,
8070 ___E: ::fidl_next::fuchsia::HandleEncoder,
8071 {
8072 #[inline]
8073 fn encode(
8074 self,
8075 encoder_: &mut ___E,
8076 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
8077 _: (),
8078 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8079 ::fidl_next::munge! {
8080 let crate::wire::VectorOfUpTo2Handles {
8081 v,
8082
8083 } = out_;
8084 }
8085
8086 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
8087
8088 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8089 ::fidl_next::Constrained::validate(_field, (2, ()))?;
8090
8091 Ok(())
8092 }
8093 }
8094
8095 unsafe impl<___E>
8096 ::fidl_next::EncodeOption<
8097 ::fidl_next::wire::Box<'static, crate::wire::VectorOfUpTo2Handles<'static>>,
8098 ___E,
8099 > for VectorOfUpTo2Handles
8100 where
8101 ___E: ::fidl_next::Encoder + ?Sized,
8102 VectorOfUpTo2Handles: ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>,
8103 {
8104 #[inline]
8105 fn encode_option(
8106 this: ::core::option::Option<Self>,
8107 encoder: &mut ___E,
8108 out: &mut ::core::mem::MaybeUninit<
8109 ::fidl_next::wire::Box<'static, crate::wire::VectorOfUpTo2Handles<'static>>,
8110 >,
8111 _: (),
8112 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8113 if let Some(inner) = this {
8114 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8115 ::fidl_next::wire::Box::encode_present(out);
8116 } else {
8117 ::fidl_next::wire::Box::encode_absent(out);
8118 }
8119
8120 Ok(())
8121 }
8122 }
8123
8124 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfUpTo2Handles<'de>> for VectorOfUpTo2Handles {
8125 #[inline]
8126 fn from_wire(wire: crate::wire::VectorOfUpTo2Handles<'de>) -> Self {
8127 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8128 }
8129 }
8130}
8131
8132pub mod wire {
8133
8134 pub use fidl_next_common_test_conformance::wire::*;
8135
8136 #[derive(Debug)]
8138 #[repr(C)]
8139 pub struct AlternatingHandlesAndFailures<'de> {
8140 pub h1: ::fidl_next::wire::fuchsia::NullableHandle,
8141
8142 pub failure_trigger1: ::fidl_next::wire::String<'de>,
8143
8144 pub h2: ::fidl_next::wire::fuchsia::NullableHandle,
8145
8146 pub failure_trigger2: ::fidl_next::wire::String<'de>,
8147
8148 pub h3: ::fidl_next::wire::fuchsia::NullableHandle,
8149 }
8150
8151 static_assertions::const_assert_eq!(
8152 std::mem::size_of::<AlternatingHandlesAndFailures<'_>>(),
8153 56
8154 );
8155 static_assertions::const_assert_eq!(
8156 std::mem::align_of::<AlternatingHandlesAndFailures<'_>>(),
8157 8
8158 );
8159
8160 static_assertions::const_assert_eq!(
8161 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h1),
8162 0
8163 );
8164
8165 static_assertions::const_assert_eq!(
8166 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, failure_trigger1),
8167 8
8168 );
8169
8170 static_assertions::const_assert_eq!(
8171 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h2),
8172 24
8173 );
8174
8175 static_assertions::const_assert_eq!(
8176 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, failure_trigger2),
8177 32
8178 );
8179
8180 static_assertions::const_assert_eq!(
8181 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h3),
8182 48
8183 );
8184
8185 impl ::fidl_next::Constrained for AlternatingHandlesAndFailures<'_> {
8186 type Constraint = ();
8187
8188 fn validate(
8189 _: ::fidl_next::Slot<'_, Self>,
8190 _: Self::Constraint,
8191 ) -> Result<(), ::fidl_next::ValidationError> {
8192 Ok(())
8193 }
8194 }
8195
8196 unsafe impl ::fidl_next::Wire for AlternatingHandlesAndFailures<'static> {
8197 type Narrowed<'de> = AlternatingHandlesAndFailures<'de>;
8198
8199 #[inline]
8200 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8201 ::fidl_next::munge! {
8202 let Self {
8203 h1,
8204 failure_trigger1,
8205 h2,
8206 failure_trigger2,
8207 h3,
8208
8209 } = &mut *out_;
8210 }
8211
8212 ::fidl_next::Wire::zero_padding(h1);
8213
8214 ::fidl_next::Wire::zero_padding(failure_trigger1);
8215
8216 ::fidl_next::Wire::zero_padding(h2);
8217
8218 ::fidl_next::Wire::zero_padding(failure_trigger2);
8219
8220 ::fidl_next::Wire::zero_padding(h3);
8221
8222 unsafe {
8223 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
8224 }
8225
8226 unsafe {
8227 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
8228 }
8229
8230 unsafe {
8231 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
8232 }
8233 }
8234 }
8235
8236 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AlternatingHandlesAndFailures<'de>
8237 where
8238 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8239 ___D: ::fidl_next::Decoder<'de>,
8240 ___D: ::fidl_next::fuchsia::HandleDecoder,
8241 {
8242 fn decode(
8243 slot_: ::fidl_next::Slot<'_, Self>,
8244 decoder_: &mut ___D,
8245 _: (),
8246 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8247 if slot_.as_bytes()[52..56] != [0u8; 4] {
8248 return Err(::fidl_next::DecodeError::InvalidPadding);
8249 }
8250
8251 if slot_.as_bytes()[28..32] != [0u8; 4] {
8252 return Err(::fidl_next::DecodeError::InvalidPadding);
8253 }
8254
8255 if slot_.as_bytes()[4..8] != [0u8; 4] {
8256 return Err(::fidl_next::DecodeError::InvalidPadding);
8257 }
8258
8259 ::fidl_next::munge! {
8260 let Self {
8261 mut h1,
8262 mut failure_trigger1,
8263 mut h2,
8264 mut failure_trigger2,
8265 mut h3,
8266
8267 } = slot_;
8268 }
8269
8270 let _field = h1.as_mut();
8271
8272 ::fidl_next::Decode::decode(h1.as_mut(), decoder_, ())?;
8273
8274 let _field = failure_trigger1.as_mut();
8275 ::fidl_next::Constrained::validate(_field, 1)?;
8276 ::fidl_next::Decode::decode(failure_trigger1.as_mut(), decoder_, 1)?;
8277
8278 let failure_trigger1 = unsafe { failure_trigger1.deref_unchecked() };
8279
8280 if failure_trigger1.len() > 1 {
8281 return Err(::fidl_next::DecodeError::VectorTooLong {
8282 size: failure_trigger1.len() as u64,
8283 limit: 1,
8284 });
8285 }
8286
8287 let _field = h2.as_mut();
8288
8289 ::fidl_next::Decode::decode(h2.as_mut(), decoder_, ())?;
8290
8291 let _field = failure_trigger2.as_mut();
8292 ::fidl_next::Constrained::validate(_field, 1)?;
8293 ::fidl_next::Decode::decode(failure_trigger2.as_mut(), decoder_, 1)?;
8294
8295 let failure_trigger2 = unsafe { failure_trigger2.deref_unchecked() };
8296
8297 if failure_trigger2.len() > 1 {
8298 return Err(::fidl_next::DecodeError::VectorTooLong {
8299 size: failure_trigger2.len() as u64,
8300 limit: 1,
8301 });
8302 }
8303
8304 let _field = h3.as_mut();
8305
8306 ::fidl_next::Decode::decode(h3.as_mut(), decoder_, ())?;
8307
8308 Ok(())
8309 }
8310 }
8311
8312 impl<'de> ::fidl_next::IntoNatural for AlternatingHandlesAndFailures<'de> {
8313 type Natural = crate::natural::AlternatingHandlesAndFailures;
8314 }
8315
8316 #[derive(Debug)]
8318 #[repr(C)]
8319 pub struct ArrayOfArrayOfNonnullableHandles {
8320 pub handles: [[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4],
8321 }
8322
8323 static_assertions::const_assert_eq!(
8324 std::mem::size_of::<ArrayOfArrayOfNonnullableHandles>(),
8325 48
8326 );
8327 static_assertions::const_assert_eq!(
8328 std::mem::align_of::<ArrayOfArrayOfNonnullableHandles>(),
8329 4
8330 );
8331
8332 static_assertions::const_assert_eq!(
8333 std::mem::offset_of!(ArrayOfArrayOfNonnullableHandles, handles),
8334 0
8335 );
8336
8337 impl ::fidl_next::Constrained for ArrayOfArrayOfNonnullableHandles {
8338 type Constraint = ();
8339
8340 fn validate(
8341 _: ::fidl_next::Slot<'_, Self>,
8342 _: Self::Constraint,
8343 ) -> Result<(), ::fidl_next::ValidationError> {
8344 Ok(())
8345 }
8346 }
8347
8348 unsafe impl ::fidl_next::Wire for ArrayOfArrayOfNonnullableHandles {
8349 type Narrowed<'de> = ArrayOfArrayOfNonnullableHandles;
8350
8351 #[inline]
8352 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8353 ::fidl_next::munge! {
8354 let Self {
8355 handles,
8356
8357 } = &mut *out_;
8358 }
8359
8360 ::fidl_next::Wire::zero_padding(handles);
8361 }
8362 }
8363
8364 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfArrayOfNonnullableHandles
8365 where
8366 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8367 ___D: ::fidl_next::fuchsia::HandleDecoder,
8368 {
8369 fn decode(
8370 slot_: ::fidl_next::Slot<'_, Self>,
8371 decoder_: &mut ___D,
8372 _: (),
8373 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8374 ::fidl_next::munge! {
8375 let Self {
8376 mut handles,
8377
8378 } = slot_;
8379 }
8380
8381 let _field = handles.as_mut();
8382
8383 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8384
8385 Ok(())
8386 }
8387 }
8388
8389 impl ::fidl_next::IntoNatural for ArrayOfArrayOfNonnullableHandles {
8390 type Natural = crate::natural::ArrayOfArrayOfNonnullableHandles;
8391 }
8392
8393 #[derive(Debug)]
8395 #[repr(C)]
8396 pub struct ArrayOfHandles {
8397 pub a: [::fidl_next::wire::fuchsia::NullableHandle; 3],
8398 }
8399
8400 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfHandles>(), 12);
8401 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfHandles>(), 4);
8402
8403 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfHandles, a), 0);
8404
8405 impl ::fidl_next::Constrained for ArrayOfHandles {
8406 type Constraint = ();
8407
8408 fn validate(
8409 _: ::fidl_next::Slot<'_, Self>,
8410 _: Self::Constraint,
8411 ) -> Result<(), ::fidl_next::ValidationError> {
8412 Ok(())
8413 }
8414 }
8415
8416 unsafe impl ::fidl_next::Wire for ArrayOfHandles {
8417 type Narrowed<'de> = ArrayOfHandles;
8418
8419 #[inline]
8420 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8421 ::fidl_next::munge! {
8422 let Self {
8423 a,
8424
8425 } = &mut *out_;
8426 }
8427
8428 ::fidl_next::Wire::zero_padding(a);
8429 }
8430 }
8431
8432 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfHandles
8433 where
8434 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8435 ___D: ::fidl_next::fuchsia::HandleDecoder,
8436 {
8437 fn decode(
8438 slot_: ::fidl_next::Slot<'_, Self>,
8439 decoder_: &mut ___D,
8440 _: (),
8441 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8442 ::fidl_next::munge! {
8443 let Self {
8444 mut a,
8445
8446 } = slot_;
8447 }
8448
8449 let _field = a.as_mut();
8450
8451 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
8452
8453 Ok(())
8454 }
8455 }
8456
8457 impl ::fidl_next::IntoNatural for ArrayOfHandles {
8458 type Natural = crate::natural::ArrayOfHandles;
8459 }
8460
8461 #[derive(Debug)]
8463 #[repr(C)]
8464 pub struct ArrayOfNonnullableHandles {
8465 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
8466 }
8467
8468 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNonnullableHandles>(), 16);
8469 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNonnullableHandles>(), 4);
8470
8471 static_assertions::const_assert_eq!(
8472 std::mem::offset_of!(ArrayOfNonnullableHandles, handles),
8473 0
8474 );
8475
8476 impl ::fidl_next::Constrained for ArrayOfNonnullableHandles {
8477 type Constraint = ();
8478
8479 fn validate(
8480 _: ::fidl_next::Slot<'_, Self>,
8481 _: Self::Constraint,
8482 ) -> Result<(), ::fidl_next::ValidationError> {
8483 Ok(())
8484 }
8485 }
8486
8487 unsafe impl ::fidl_next::Wire for ArrayOfNonnullableHandles {
8488 type Narrowed<'de> = ArrayOfNonnullableHandles;
8489
8490 #[inline]
8491 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8492 ::fidl_next::munge! {
8493 let Self {
8494 handles,
8495
8496 } = &mut *out_;
8497 }
8498
8499 ::fidl_next::Wire::zero_padding(handles);
8500 }
8501 }
8502
8503 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNonnullableHandles
8504 where
8505 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8506 ___D: ::fidl_next::fuchsia::HandleDecoder,
8507 {
8508 fn decode(
8509 slot_: ::fidl_next::Slot<'_, Self>,
8510 decoder_: &mut ___D,
8511 _: (),
8512 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8513 ::fidl_next::munge! {
8514 let Self {
8515 mut handles,
8516
8517 } = slot_;
8518 }
8519
8520 let _field = handles.as_mut();
8521
8522 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8523
8524 Ok(())
8525 }
8526 }
8527
8528 impl ::fidl_next::IntoNatural for ArrayOfNonnullableHandles {
8529 type Natural = crate::natural::ArrayOfNonnullableHandles;
8530 }
8531
8532 #[derive(Debug)]
8534 #[repr(C)]
8535 pub struct ArrayOfNullableHandles {
8536 pub handles: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 5],
8537 }
8538
8539 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNullableHandles>(), 20);
8540 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNullableHandles>(), 4);
8541
8542 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfNullableHandles, handles), 0);
8543
8544 impl ::fidl_next::Constrained for ArrayOfNullableHandles {
8545 type Constraint = ();
8546
8547 fn validate(
8548 _: ::fidl_next::Slot<'_, Self>,
8549 _: Self::Constraint,
8550 ) -> Result<(), ::fidl_next::ValidationError> {
8551 Ok(())
8552 }
8553 }
8554
8555 unsafe impl ::fidl_next::Wire for ArrayOfNullableHandles {
8556 type Narrowed<'de> = ArrayOfNullableHandles;
8557
8558 #[inline]
8559 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8560 ::fidl_next::munge! {
8561 let Self {
8562 handles,
8563
8564 } = &mut *out_;
8565 }
8566
8567 ::fidl_next::Wire::zero_padding(handles);
8568 }
8569 }
8570
8571 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNullableHandles
8572 where
8573 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8574 ___D: ::fidl_next::fuchsia::HandleDecoder,
8575 {
8576 fn decode(
8577 slot_: ::fidl_next::Slot<'_, Self>,
8578 decoder_: &mut ___D,
8579 _: (),
8580 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8581 ::fidl_next::munge! {
8582 let Self {
8583 mut handles,
8584
8585 } = slot_;
8586 }
8587
8588 let _field = handles.as_mut();
8589
8590 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8591
8592 Ok(())
8593 }
8594 }
8595
8596 impl ::fidl_next::IntoNatural for ArrayOfNullableHandles {
8597 type Natural = crate::natural::ArrayOfNullableHandles;
8598 }
8599
8600 #[derive(Debug)]
8602 #[repr(C)]
8603 pub struct ArrayOfOptionalHandles {
8604 pub a: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 3],
8605 }
8606
8607 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfOptionalHandles>(), 12);
8608 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfOptionalHandles>(), 4);
8609
8610 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfOptionalHandles, a), 0);
8611
8612 impl ::fidl_next::Constrained for ArrayOfOptionalHandles {
8613 type Constraint = ();
8614
8615 fn validate(
8616 _: ::fidl_next::Slot<'_, Self>,
8617 _: Self::Constraint,
8618 ) -> Result<(), ::fidl_next::ValidationError> {
8619 Ok(())
8620 }
8621 }
8622
8623 unsafe impl ::fidl_next::Wire for ArrayOfOptionalHandles {
8624 type Narrowed<'de> = ArrayOfOptionalHandles;
8625
8626 #[inline]
8627 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8628 ::fidl_next::munge! {
8629 let Self {
8630 a,
8631
8632 } = &mut *out_;
8633 }
8634
8635 ::fidl_next::Wire::zero_padding(a);
8636 }
8637 }
8638
8639 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfOptionalHandles
8640 where
8641 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8642 ___D: ::fidl_next::fuchsia::HandleDecoder,
8643 {
8644 fn decode(
8645 slot_: ::fidl_next::Slot<'_, Self>,
8646 decoder_: &mut ___D,
8647 _: (),
8648 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8649 ::fidl_next::munge! {
8650 let Self {
8651 mut a,
8652
8653 } = slot_;
8654 }
8655
8656 let _field = a.as_mut();
8657
8658 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
8659
8660 Ok(())
8661 }
8662 }
8663
8664 impl ::fidl_next::IntoNatural for ArrayOfOptionalHandles {
8665 type Natural = crate::natural::ArrayOfOptionalHandles;
8666 }
8667
8668 #[derive(Debug)]
8670 #[repr(C)]
8671 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
8672 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8673 }
8674
8675 static_assertions::const_assert_eq!(
8676 std::mem::size_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
8677 16
8678 );
8679 static_assertions::const_assert_eq!(
8680 std::mem::align_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
8681 8
8682 );
8683
8684 static_assertions::const_assert_eq!(
8685 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithDefaultRights<'_>, h),
8686 0
8687 );
8688
8689 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithDefaultRights<'_> {
8690 type Constraint = ();
8691
8692 fn validate(
8693 _: ::fidl_next::Slot<'_, Self>,
8694 _: Self::Constraint,
8695 ) -> Result<(), ::fidl_next::ValidationError> {
8696 Ok(())
8697 }
8698 }
8699
8700 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithDefaultRights<'static> {
8701 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithDefaultRights<'de>;
8702
8703 #[inline]
8704 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8705 ::fidl_next::munge! {
8706 let Self {
8707 h,
8708
8709 } = &mut *out_;
8710 }
8711
8712 ::fidl_next::Wire::zero_padding(h);
8713 }
8714 }
8715
8716 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8717 for ArrayOfVectorOfEventInStructWithDefaultRights<'de>
8718 where
8719 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8720 ___D: ::fidl_next::Decoder<'de>,
8721 ___D: ::fidl_next::fuchsia::HandleDecoder,
8722 {
8723 fn decode(
8724 slot_: ::fidl_next::Slot<'_, Self>,
8725 decoder_: &mut ___D,
8726 _: (),
8727 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8728 ::fidl_next::munge! {
8729 let Self {
8730 mut h,
8731
8732 } = slot_;
8733 }
8734
8735 let _field = h.as_mut();
8736 ::fidl_next::Constrained::validate(_field, (1, ()))?;
8737 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
8738
8739 Ok(())
8740 }
8741 }
8742
8743 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
8744 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithDefaultRights;
8745 }
8746
8747 #[derive(Debug)]
8749 #[repr(C)]
8750 pub struct ArrayOfVectorOfEventInStructWithReducedRights<'de> {
8751 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8752 }
8753
8754 static_assertions::const_assert_eq!(
8755 std::mem::size_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
8756 16
8757 );
8758 static_assertions::const_assert_eq!(
8759 std::mem::align_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
8760 8
8761 );
8762
8763 static_assertions::const_assert_eq!(
8764 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithReducedRights<'_>, h),
8765 0
8766 );
8767
8768 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithReducedRights<'_> {
8769 type Constraint = ();
8770
8771 fn validate(
8772 _: ::fidl_next::Slot<'_, Self>,
8773 _: Self::Constraint,
8774 ) -> Result<(), ::fidl_next::ValidationError> {
8775 Ok(())
8776 }
8777 }
8778
8779 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithReducedRights<'static> {
8780 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithReducedRights<'de>;
8781
8782 #[inline]
8783 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8784 ::fidl_next::munge! {
8785 let Self {
8786 h,
8787
8788 } = &mut *out_;
8789 }
8790
8791 ::fidl_next::Wire::zero_padding(h);
8792 }
8793 }
8794
8795 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8796 for ArrayOfVectorOfEventInStructWithReducedRights<'de>
8797 where
8798 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8799 ___D: ::fidl_next::Decoder<'de>,
8800 ___D: ::fidl_next::fuchsia::HandleDecoder,
8801 {
8802 fn decode(
8803 slot_: ::fidl_next::Slot<'_, Self>,
8804 decoder_: &mut ___D,
8805 _: (),
8806 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8807 ::fidl_next::munge! {
8808 let Self {
8809 mut h,
8810
8811 } = slot_;
8812 }
8813
8814 let _field = h.as_mut();
8815 ::fidl_next::Constrained::validate(_field, (1, ()))?;
8816 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
8817
8818 Ok(())
8819 }
8820 }
8821
8822 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithReducedRights<'de> {
8823 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithReducedRights;
8824 }
8825
8826 #[repr(C)]
8828 pub struct ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8829 pub(crate) table: ::fidl_next::wire::Table<'de>,
8830 }
8831
8832 impl<'de> Drop for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8833 fn drop(&mut self) {
8834 let _ = self.table.get(1)
8835 .map(|envelope| unsafe {
8836 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
8837 });
8838 }
8839 }
8840
8841 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRights<'_> {
8842 type Constraint = ();
8843
8844 fn validate(
8845 _: ::fidl_next::Slot<'_, Self>,
8846 _: Self::Constraint,
8847 ) -> Result<(), ::fidl_next::ValidationError> {
8848 Ok(())
8849 }
8850 }
8851
8852 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRights<'static> {
8853 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRights<'de>;
8854
8855 #[inline]
8856 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8857 ::fidl_next::munge!(let Self { table } = out);
8858 ::fidl_next::wire::Table::zero_padding(table);
8859 }
8860 }
8861
8862 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8863 for ArrayOfVectorOfEventInTableWithDefaultRights<'de>
8864 where
8865 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8866 ___D: ::fidl_next::fuchsia::HandleDecoder,
8867 {
8868 fn decode(
8869 slot: ::fidl_next::Slot<'_, Self>,
8870 decoder: &mut ___D,
8871 _: (),
8872 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8873 ::fidl_next::munge!(let Self { table } = slot);
8874
8875 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8876 match ordinal {
8877 0 => unsafe { ::core::hint::unreachable_unchecked() },
8878
8879 1 => {
8880 ::fidl_next::wire::Envelope::decode_as::<
8881 ___D,
8882 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8883 >(slot.as_mut(), decoder, (1, ()))?;
8884
8885 Ok(())
8886 }
8887
8888 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8889 }
8890 })
8891 }
8892 }
8893
8894 impl<'de> ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8895 pub fn h(
8896 &self,
8897 ) -> ::core::option::Option<
8898 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
8899 > {
8900 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8901 }
8902 }
8903
8904 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8905 fn fmt(
8906 &self,
8907 f: &mut ::core::fmt::Formatter<'_>,
8908 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8909 f.debug_struct("ArrayOfVectorOfEventInTableWithDefaultRights")
8910 .field("h", &self.h())
8911 .finish()
8912 }
8913 }
8914
8915 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
8916 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRights;
8917 }
8918
8919 #[derive(Debug)]
8921 #[repr(C)]
8922 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
8923 pub t: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>,
8924 }
8925
8926 static_assertions::const_assert_eq!(
8927 std::mem::size_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
8928 16
8929 );
8930 static_assertions::const_assert_eq!(
8931 std::mem::align_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
8932 8
8933 );
8934
8935 static_assertions::const_assert_eq!(
8936 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>, t),
8937 0
8938 );
8939
8940 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_> {
8941 type Constraint = ();
8942
8943 fn validate(
8944 _: ::fidl_next::Slot<'_, Self>,
8945 _: Self::Constraint,
8946 ) -> Result<(), ::fidl_next::ValidationError> {
8947 Ok(())
8948 }
8949 }
8950
8951 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static> {
8952 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>;
8953
8954 #[inline]
8955 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8956 ::fidl_next::munge! {
8957 let Self {
8958 t,
8959
8960 } = &mut *out_;
8961 }
8962
8963 ::fidl_next::Wire::zero_padding(t);
8964 }
8965 }
8966
8967 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8968 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>
8969 where
8970 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8971 ___D: ::fidl_next::Decoder<'de>,
8972 ___D: ::fidl_next::fuchsia::HandleDecoder,
8973 {
8974 fn decode(
8975 slot_: ::fidl_next::Slot<'_, Self>,
8976 decoder_: &mut ___D,
8977 _: (),
8978 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8979 ::fidl_next::munge! {
8980 let Self {
8981 mut t,
8982
8983 } = slot_;
8984 }
8985
8986 let _field = t.as_mut();
8987
8988 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
8989
8990 Ok(())
8991 }
8992 }
8993
8994 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
8995 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRightsStruct;
8996 }
8997
8998 #[repr(C)]
9000 pub struct ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9001 pub(crate) table: ::fidl_next::wire::Table<'de>,
9002 }
9003
9004 impl<'de> Drop for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9005 fn drop(&mut self) {
9006 let _ = self.table.get(1)
9007 .map(|envelope| unsafe {
9008 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9009 });
9010 }
9011 }
9012
9013 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRights<'_> {
9014 type Constraint = ();
9015
9016 fn validate(
9017 _: ::fidl_next::Slot<'_, Self>,
9018 _: Self::Constraint,
9019 ) -> Result<(), ::fidl_next::ValidationError> {
9020 Ok(())
9021 }
9022 }
9023
9024 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRights<'static> {
9025 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRights<'de>;
9026
9027 #[inline]
9028 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9029 ::fidl_next::munge!(let Self { table } = out);
9030 ::fidl_next::wire::Table::zero_padding(table);
9031 }
9032 }
9033
9034 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9035 for ArrayOfVectorOfEventInTableWithReducedRights<'de>
9036 where
9037 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9038 ___D: ::fidl_next::fuchsia::HandleDecoder,
9039 {
9040 fn decode(
9041 slot: ::fidl_next::Slot<'_, Self>,
9042 decoder: &mut ___D,
9043 _: (),
9044 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9045 ::fidl_next::munge!(let Self { table } = slot);
9046
9047 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9048 match ordinal {
9049 0 => unsafe { ::core::hint::unreachable_unchecked() },
9050
9051 1 => {
9052 ::fidl_next::wire::Envelope::decode_as::<
9053 ___D,
9054 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9055 >(slot.as_mut(), decoder, (1, ()))?;
9056
9057 Ok(())
9058 }
9059
9060 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9061 }
9062 })
9063 }
9064 }
9065
9066 impl<'de> ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9067 pub fn h(
9068 &self,
9069 ) -> ::core::option::Option<
9070 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9071 > {
9072 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9073 }
9074 }
9075
9076 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9077 fn fmt(
9078 &self,
9079 f: &mut ::core::fmt::Formatter<'_>,
9080 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9081 f.debug_struct("ArrayOfVectorOfEventInTableWithReducedRights")
9082 .field("h", &self.h())
9083 .finish()
9084 }
9085 }
9086
9087 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9088 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRights;
9089 }
9090
9091 #[derive(Debug)]
9093 #[repr(C)]
9094 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9095 pub t: crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>,
9096 }
9097
9098 static_assertions::const_assert_eq!(
9099 std::mem::size_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9100 16
9101 );
9102 static_assertions::const_assert_eq!(
9103 std::mem::align_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9104 8
9105 );
9106
9107 static_assertions::const_assert_eq!(
9108 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>, t),
9109 0
9110 );
9111
9112 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_> {
9113 type Constraint = ();
9114
9115 fn validate(
9116 _: ::fidl_next::Slot<'_, Self>,
9117 _: Self::Constraint,
9118 ) -> Result<(), ::fidl_next::ValidationError> {
9119 Ok(())
9120 }
9121 }
9122
9123 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static> {
9124 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>;
9125
9126 #[inline]
9127 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9128 ::fidl_next::munge! {
9129 let Self {
9130 t,
9131
9132 } = &mut *out_;
9133 }
9134
9135 ::fidl_next::Wire::zero_padding(t);
9136 }
9137 }
9138
9139 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9140 for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>
9141 where
9142 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9143 ___D: ::fidl_next::Decoder<'de>,
9144 ___D: ::fidl_next::fuchsia::HandleDecoder,
9145 {
9146 fn decode(
9147 slot_: ::fidl_next::Slot<'_, Self>,
9148 decoder_: &mut ___D,
9149 _: (),
9150 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9151 ::fidl_next::munge! {
9152 let Self {
9153 mut t,
9154
9155 } = slot_;
9156 }
9157
9158 let _field = t.as_mut();
9159
9160 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
9161
9162 Ok(())
9163 }
9164 }
9165
9166 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9167 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRightsStruct;
9168 }
9169
9170 #[repr(transparent)]
9172 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9173 pub(crate) raw: ::fidl_next::wire::Union,
9174 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9175 }
9176
9177 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9178 fn drop(&mut self) {
9179 match self.raw.ordinal() {
9180 1 => {
9181 let _ = unsafe {
9182 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9183 };
9184 }
9185
9186 _ => unsafe { ::core::hint::unreachable_unchecked() },
9187 }
9188 }
9189 }
9190
9191 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
9192 type Constraint = ();
9193
9194 fn validate(
9195 _: ::fidl_next::Slot<'_, Self>,
9196 _: Self::Constraint,
9197 ) -> Result<(), ::fidl_next::ValidationError> {
9198 Ok(())
9199 }
9200 }
9201
9202 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
9203 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
9204
9205 #[inline]
9206 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9207 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9208 ::fidl_next::wire::Union::zero_padding(raw);
9209 }
9210 }
9211
9212 pub mod array_of_vector_of_event_in_union_with_default_rights {
9213 pub enum Ref<'de> {
9214 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9215 }
9216 }
9217
9218 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9219 pub fn as_ref(
9220 &self,
9221 ) -> crate::wire::array_of_vector_of_event_in_union_with_default_rights::Ref<'_> {
9222 match self.raw.ordinal() {
9223 1 => crate::wire::array_of_vector_of_event_in_union_with_default_rights::Ref::H(
9224 unsafe {
9225 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9226 },
9227 ),
9228
9229 _ => unsafe { ::core::hint::unreachable_unchecked() },
9230 }
9231 }
9232 }
9233
9234 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9235 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
9236 where
9237 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9238 ___D: ::fidl_next::Decoder<'de>,
9239 ___D: ::fidl_next::fuchsia::HandleDecoder,
9240 {
9241 fn decode(
9242 mut slot: ::fidl_next::Slot<'_, Self>,
9243 decoder: &mut ___D,
9244 _: (),
9245 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9246 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9247 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9248 1 => ::fidl_next::wire::Union::decode_as::<
9249 ___D,
9250 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9251 >(raw, decoder, (1, ()))?,
9252
9253 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9254 }
9255
9256 Ok(())
9257 }
9258 }
9259
9260 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9261 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9262 match self.raw.ordinal() {
9263 1 => unsafe {
9264 self.raw.get().deref_unchecked::<
9265 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9266 >().fmt(f)
9267 },
9268 _ => unsafe { ::core::hint::unreachable_unchecked() },
9269 }
9270 }
9271 }
9272
9273 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9274 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights;
9275 }
9276
9277 #[derive(Debug)]
9279 #[repr(C)]
9280 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9281 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
9282 }
9283
9284 static_assertions::const_assert_eq!(
9285 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9286 16
9287 );
9288 static_assertions::const_assert_eq!(
9289 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9290 8
9291 );
9292
9293 static_assertions::const_assert_eq!(
9294 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>, u),
9295 0
9296 );
9297
9298 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_> {
9299 type Constraint = ();
9300
9301 fn validate(
9302 _: ::fidl_next::Slot<'_, Self>,
9303 _: Self::Constraint,
9304 ) -> Result<(), ::fidl_next::ValidationError> {
9305 Ok(())
9306 }
9307 }
9308
9309 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static> {
9310 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>;
9311
9312 #[inline]
9313 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9314 ::fidl_next::munge! {
9315 let Self {
9316 u,
9317
9318 } = &mut *out_;
9319 }
9320
9321 ::fidl_next::Wire::zero_padding(u);
9322 }
9323 }
9324
9325 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9326 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>
9327 where
9328 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9329 ___D: ::fidl_next::Decoder<'de>,
9330 ___D: ::fidl_next::fuchsia::HandleDecoder,
9331 {
9332 fn decode(
9333 slot_: ::fidl_next::Slot<'_, Self>,
9334 decoder_: &mut ___D,
9335 _: (),
9336 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9337 ::fidl_next::munge! {
9338 let Self {
9339 mut u,
9340
9341 } = slot_;
9342 }
9343
9344 let _field = u.as_mut();
9345
9346 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9347
9348 Ok(())
9349 }
9350 }
9351
9352 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9353 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct;
9354 }
9355
9356 #[repr(transparent)]
9358 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9359 pub(crate) raw: ::fidl_next::wire::Union,
9360 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9361 }
9362
9363 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9364 fn drop(&mut self) {
9365 match self.raw.ordinal() {
9366 1 => {
9367 let _ = unsafe {
9368 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9369 };
9370 }
9371
9372 _ => unsafe { ::core::hint::unreachable_unchecked() },
9373 }
9374 }
9375 }
9376
9377 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
9378 type Constraint = ();
9379
9380 fn validate(
9381 _: ::fidl_next::Slot<'_, Self>,
9382 _: Self::Constraint,
9383 ) -> Result<(), ::fidl_next::ValidationError> {
9384 Ok(())
9385 }
9386 }
9387
9388 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
9389 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
9390
9391 #[inline]
9392 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9393 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9394 ::fidl_next::wire::Union::zero_padding(raw);
9395 }
9396 }
9397
9398 pub mod array_of_vector_of_event_in_union_with_reduced_rights {
9399 pub enum Ref<'de> {
9400 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9401 }
9402 }
9403
9404 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9405 pub fn as_ref(
9406 &self,
9407 ) -> crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref<'_> {
9408 match self.raw.ordinal() {
9409 1 => crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref::H(
9410 unsafe {
9411 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9412 },
9413 ),
9414
9415 _ => unsafe { ::core::hint::unreachable_unchecked() },
9416 }
9417 }
9418 }
9419
9420 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9421 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
9422 where
9423 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9424 ___D: ::fidl_next::Decoder<'de>,
9425 ___D: ::fidl_next::fuchsia::HandleDecoder,
9426 {
9427 fn decode(
9428 mut slot: ::fidl_next::Slot<'_, Self>,
9429 decoder: &mut ___D,
9430 _: (),
9431 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9432 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9433 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9434 1 => ::fidl_next::wire::Union::decode_as::<
9435 ___D,
9436 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9437 >(raw, decoder, (1, ()))?,
9438
9439 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9440 }
9441
9442 Ok(())
9443 }
9444 }
9445
9446 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9447 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9448 match self.raw.ordinal() {
9449 1 => unsafe {
9450 self.raw.get().deref_unchecked::<
9451 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9452 >().fmt(f)
9453 },
9454 _ => unsafe { ::core::hint::unreachable_unchecked() },
9455 }
9456 }
9457 }
9458
9459 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9460 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights;
9461 }
9462
9463 #[derive(Debug)]
9465 #[repr(C)]
9466 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9467 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
9468 }
9469
9470 static_assertions::const_assert_eq!(
9471 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9472 16
9473 );
9474 static_assertions::const_assert_eq!(
9475 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9476 8
9477 );
9478
9479 static_assertions::const_assert_eq!(
9480 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>, u),
9481 0
9482 );
9483
9484 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_> {
9485 type Constraint = ();
9486
9487 fn validate(
9488 _: ::fidl_next::Slot<'_, Self>,
9489 _: Self::Constraint,
9490 ) -> Result<(), ::fidl_next::ValidationError> {
9491 Ok(())
9492 }
9493 }
9494
9495 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static> {
9496 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>;
9497
9498 #[inline]
9499 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9500 ::fidl_next::munge! {
9501 let Self {
9502 u,
9503
9504 } = &mut *out_;
9505 }
9506
9507 ::fidl_next::Wire::zero_padding(u);
9508 }
9509 }
9510
9511 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9512 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>
9513 where
9514 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9515 ___D: ::fidl_next::Decoder<'de>,
9516 ___D: ::fidl_next::fuchsia::HandleDecoder,
9517 {
9518 fn decode(
9519 slot_: ::fidl_next::Slot<'_, Self>,
9520 decoder_: &mut ___D,
9521 _: (),
9522 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9523 ::fidl_next::munge! {
9524 let Self {
9525 mut u,
9526
9527 } = slot_;
9528 }
9529
9530 let _field = u.as_mut();
9531
9532 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9533
9534 Ok(())
9535 }
9536 }
9537
9538 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9539 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRightsStruct;
9540 }
9541
9542 #[derive(Debug)]
9544 #[repr(C)]
9545 pub struct Bounded32NonnullableVectorOfHandles<'de> {
9546 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
9547 }
9548
9549 static_assertions::const_assert_eq!(
9550 std::mem::size_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9551 16
9552 );
9553 static_assertions::const_assert_eq!(
9554 std::mem::align_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9555 8
9556 );
9557
9558 static_assertions::const_assert_eq!(
9559 std::mem::offset_of!(Bounded32NonnullableVectorOfHandles<'_>, vh0),
9560 0
9561 );
9562
9563 impl ::fidl_next::Constrained for Bounded32NonnullableVectorOfHandles<'_> {
9564 type Constraint = ();
9565
9566 fn validate(
9567 _: ::fidl_next::Slot<'_, Self>,
9568 _: Self::Constraint,
9569 ) -> Result<(), ::fidl_next::ValidationError> {
9570 Ok(())
9571 }
9572 }
9573
9574 unsafe impl ::fidl_next::Wire for Bounded32NonnullableVectorOfHandles<'static> {
9575 type Narrowed<'de> = Bounded32NonnullableVectorOfHandles<'de>;
9576
9577 #[inline]
9578 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9579 ::fidl_next::munge! {
9580 let Self {
9581 vh0,
9582
9583 } = &mut *out_;
9584 }
9585
9586 ::fidl_next::Wire::zero_padding(vh0);
9587 }
9588 }
9589
9590 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NonnullableVectorOfHandles<'de>
9591 where
9592 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9593 ___D: ::fidl_next::Decoder<'de>,
9594 ___D: ::fidl_next::fuchsia::HandleDecoder,
9595 {
9596 fn decode(
9597 slot_: ::fidl_next::Slot<'_, Self>,
9598 decoder_: &mut ___D,
9599 _: (),
9600 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9601 ::fidl_next::munge! {
9602 let Self {
9603 mut vh0,
9604
9605 } = slot_;
9606 }
9607
9608 let _field = vh0.as_mut();
9609 ::fidl_next::Constrained::validate(_field, (32, ()))?;
9610 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
9611
9612 let vh0 = unsafe { vh0.deref_unchecked() };
9613
9614 if vh0.len() > 32 {
9615 return Err(::fidl_next::DecodeError::VectorTooLong {
9616 size: vh0.len() as u64,
9617 limit: 32,
9618 });
9619 }
9620
9621 Ok(())
9622 }
9623 }
9624
9625 impl<'de> ::fidl_next::IntoNatural for Bounded32NonnullableVectorOfHandles<'de> {
9626 type Natural = crate::natural::Bounded32NonnullableVectorOfHandles;
9627 }
9628
9629 #[derive(Debug)]
9631 #[repr(C)]
9632 pub struct Bounded32NullableVectorOfHandles<'de> {
9633 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
9634 }
9635
9636 static_assertions::const_assert_eq!(
9637 std::mem::size_of::<Bounded32NullableVectorOfHandles<'_>>(),
9638 16
9639 );
9640 static_assertions::const_assert_eq!(
9641 std::mem::align_of::<Bounded32NullableVectorOfHandles<'_>>(),
9642 8
9643 );
9644
9645 static_assertions::const_assert_eq!(
9646 std::mem::offset_of!(Bounded32NullableVectorOfHandles<'_>, vh0),
9647 0
9648 );
9649
9650 impl ::fidl_next::Constrained for Bounded32NullableVectorOfHandles<'_> {
9651 type Constraint = ();
9652
9653 fn validate(
9654 _: ::fidl_next::Slot<'_, Self>,
9655 _: Self::Constraint,
9656 ) -> Result<(), ::fidl_next::ValidationError> {
9657 Ok(())
9658 }
9659 }
9660
9661 unsafe impl ::fidl_next::Wire for Bounded32NullableVectorOfHandles<'static> {
9662 type Narrowed<'de> = Bounded32NullableVectorOfHandles<'de>;
9663
9664 #[inline]
9665 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9666 ::fidl_next::munge! {
9667 let Self {
9668 vh0,
9669
9670 } = &mut *out_;
9671 }
9672
9673 ::fidl_next::Wire::zero_padding(vh0);
9674 }
9675 }
9676
9677 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NullableVectorOfHandles<'de>
9678 where
9679 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9680 ___D: ::fidl_next::Decoder<'de>,
9681 ___D: ::fidl_next::fuchsia::HandleDecoder,
9682 {
9683 fn decode(
9684 slot_: ::fidl_next::Slot<'_, Self>,
9685 decoder_: &mut ___D,
9686 _: (),
9687 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9688 ::fidl_next::munge! {
9689 let Self {
9690 mut vh0,
9691
9692 } = slot_;
9693 }
9694
9695 let _field = vh0.as_mut();
9696 ::fidl_next::Constrained::validate(_field, (32, ()))?;
9697 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
9698
9699 let vh0 = unsafe { vh0.deref_unchecked() };
9700
9701 if let Some(vh0) = vh0.as_ref() {
9702 if vh0.len() > 32 {
9703 return Err(::fidl_next::DecodeError::VectorTooLong {
9704 size: vh0.len() as u64,
9705 limit: 32,
9706 });
9707 }
9708 }
9709
9710 Ok(())
9711 }
9712 }
9713
9714 impl<'de> ::fidl_next::IntoNatural for Bounded32NullableVectorOfHandles<'de> {
9715 type Natural = crate::natural::Bounded32NullableVectorOfHandles;
9716 }
9717
9718 #[derive(Debug)]
9720 #[repr(C)]
9721 pub struct BoxOfSingleHandle<'de> {
9722 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleHandle>,
9723 }
9724
9725 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleHandle<'_>>(), 8);
9726 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleHandle<'_>>(), 8);
9727
9728 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleHandle<'_>, b), 0);
9729
9730 impl ::fidl_next::Constrained for BoxOfSingleHandle<'_> {
9731 type Constraint = ();
9732
9733 fn validate(
9734 _: ::fidl_next::Slot<'_, Self>,
9735 _: Self::Constraint,
9736 ) -> Result<(), ::fidl_next::ValidationError> {
9737 Ok(())
9738 }
9739 }
9740
9741 unsafe impl ::fidl_next::Wire for BoxOfSingleHandle<'static> {
9742 type Narrowed<'de> = BoxOfSingleHandle<'de>;
9743
9744 #[inline]
9745 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9746 ::fidl_next::munge! {
9747 let Self {
9748 b,
9749
9750 } = &mut *out_;
9751 }
9752
9753 ::fidl_next::Wire::zero_padding(b);
9754 }
9755 }
9756
9757 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleHandle<'de>
9758 where
9759 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9760 ___D: ::fidl_next::Decoder<'de>,
9761 ___D: ::fidl_next::fuchsia::HandleDecoder,
9762 {
9763 fn decode(
9764 slot_: ::fidl_next::Slot<'_, Self>,
9765 decoder_: &mut ___D,
9766 _: (),
9767 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9768 ::fidl_next::munge! {
9769 let Self {
9770 mut b,
9771
9772 } = slot_;
9773 }
9774
9775 let _field = b.as_mut();
9776
9777 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
9778
9779 Ok(())
9780 }
9781 }
9782
9783 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleHandle<'de> {
9784 type Natural = crate::natural::BoxOfSingleHandle;
9785 }
9786
9787 #[derive(Debug)]
9789 #[repr(C)]
9790 pub struct BoxOfSingleOptionalHandle<'de> {
9791 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleOptionalHandle>,
9792 }
9793
9794 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
9795 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
9796
9797 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleOptionalHandle<'_>, b), 0);
9798
9799 impl ::fidl_next::Constrained for BoxOfSingleOptionalHandle<'_> {
9800 type Constraint = ();
9801
9802 fn validate(
9803 _: ::fidl_next::Slot<'_, Self>,
9804 _: Self::Constraint,
9805 ) -> Result<(), ::fidl_next::ValidationError> {
9806 Ok(())
9807 }
9808 }
9809
9810 unsafe impl ::fidl_next::Wire for BoxOfSingleOptionalHandle<'static> {
9811 type Narrowed<'de> = BoxOfSingleOptionalHandle<'de>;
9812
9813 #[inline]
9814 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9815 ::fidl_next::munge! {
9816 let Self {
9817 b,
9818
9819 } = &mut *out_;
9820 }
9821
9822 ::fidl_next::Wire::zero_padding(b);
9823 }
9824 }
9825
9826 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleOptionalHandle<'de>
9827 where
9828 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9829 ___D: ::fidl_next::Decoder<'de>,
9830 ___D: ::fidl_next::fuchsia::HandleDecoder,
9831 {
9832 fn decode(
9833 slot_: ::fidl_next::Slot<'_, Self>,
9834 decoder_: &mut ___D,
9835 _: (),
9836 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9837 ::fidl_next::munge! {
9838 let Self {
9839 mut b,
9840
9841 } = slot_;
9842 }
9843
9844 let _field = b.as_mut();
9845
9846 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
9847
9848 Ok(())
9849 }
9850 }
9851
9852 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleOptionalHandle<'de> {
9853 type Natural = crate::natural::BoxOfSingleOptionalHandle;
9854 }
9855
9856 #[derive(Debug)]
9858 #[repr(C)]
9859 pub struct LaunchInfo<'de> {
9860 pub url: ::fidl_next::wire::String<'de>,
9861
9862 pub arguments: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::String<'de>>,
9863
9864 pub out: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9865
9866 pub err: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9867
9868 pub directory_request: ::fidl_next::wire::fuchsia::OptionalChannel,
9869
9870 pub flat_namespace: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9871
9872 pub additional_services: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
9873 }
9874
9875 static_assertions::const_assert_eq!(std::mem::size_of::<LaunchInfo<'_>>(), 72);
9876 static_assertions::const_assert_eq!(std::mem::align_of::<LaunchInfo<'_>>(), 8);
9877
9878 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, url), 0);
9879
9880 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, arguments), 16);
9881
9882 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, out), 32);
9883
9884 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, err), 40);
9885
9886 static_assertions::const_assert_eq!(
9887 std::mem::offset_of!(LaunchInfo<'_>, directory_request),
9888 48
9889 );
9890
9891 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, flat_namespace), 56);
9892
9893 static_assertions::const_assert_eq!(
9894 std::mem::offset_of!(LaunchInfo<'_>, additional_services),
9895 64
9896 );
9897
9898 impl ::fidl_next::Constrained for LaunchInfo<'_> {
9899 type Constraint = ();
9900
9901 fn validate(
9902 _: ::fidl_next::Slot<'_, Self>,
9903 _: Self::Constraint,
9904 ) -> Result<(), ::fidl_next::ValidationError> {
9905 Ok(())
9906 }
9907 }
9908
9909 unsafe impl ::fidl_next::Wire for LaunchInfo<'static> {
9910 type Narrowed<'de> = LaunchInfo<'de>;
9911
9912 #[inline]
9913 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9914 ::fidl_next::munge! {
9915 let Self {
9916 url,
9917 arguments,
9918 out,
9919 err,
9920 directory_request,
9921 flat_namespace,
9922 additional_services,
9923
9924 } = &mut *out_;
9925 }
9926
9927 ::fidl_next::Wire::zero_padding(url);
9928
9929 ::fidl_next::Wire::zero_padding(arguments);
9930
9931 ::fidl_next::Wire::zero_padding(out);
9932
9933 ::fidl_next::Wire::zero_padding(err);
9934
9935 ::fidl_next::Wire::zero_padding(directory_request);
9936
9937 ::fidl_next::Wire::zero_padding(flat_namespace);
9938
9939 ::fidl_next::Wire::zero_padding(additional_services);
9940
9941 unsafe {
9942 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
9943 }
9944 }
9945 }
9946
9947 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LaunchInfo<'de>
9948 where
9949 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9950 ___D: ::fidl_next::Decoder<'de>,
9951 ___D: ::fidl_next::fuchsia::HandleDecoder,
9952 {
9953 fn decode(
9954 slot_: ::fidl_next::Slot<'_, Self>,
9955 decoder_: &mut ___D,
9956 _: (),
9957 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9958 if slot_.as_bytes()[52..56] != [0u8; 4] {
9959 return Err(::fidl_next::DecodeError::InvalidPadding);
9960 }
9961
9962 ::fidl_next::munge! {
9963 let Self {
9964 mut url,
9965 mut arguments,
9966 mut out,
9967 mut err,
9968 mut directory_request,
9969 mut flat_namespace,
9970 mut additional_services,
9971
9972 } = slot_;
9973 }
9974
9975 let _field = url.as_mut();
9976 ::fidl_next::Constrained::validate(_field, 200)?;
9977 ::fidl_next::Decode::decode(url.as_mut(), decoder_, 200)?;
9978
9979 let url = unsafe { url.deref_unchecked() };
9980
9981 if url.len() > 200 {
9982 return Err(::fidl_next::DecodeError::VectorTooLong {
9983 size: url.len() as u64,
9984 limit: 200,
9985 });
9986 }
9987
9988 let _field = arguments.as_mut();
9989 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
9990 ::fidl_next::Decode::decode(arguments.as_mut(), decoder_, (4294967295, 4294967295))?;
9991
9992 let _field = out.as_mut();
9993
9994 ::fidl_next::Decode::decode(out.as_mut(), decoder_, ())?;
9995
9996 let _field = err.as_mut();
9997
9998 ::fidl_next::Decode::decode(err.as_mut(), decoder_, ())?;
9999
10000 let _field = directory_request.as_mut();
10001
10002 ::fidl_next::Decode::decode(directory_request.as_mut(), decoder_, ())?;
10003
10004 let _field = flat_namespace.as_mut();
10005
10006 ::fidl_next::Decode::decode(flat_namespace.as_mut(), decoder_, ())?;
10007
10008 let _field = additional_services.as_mut();
10009
10010 ::fidl_next::Decode::decode(additional_services.as_mut(), decoder_, ())?;
10011
10012 Ok(())
10013 }
10014 }
10015
10016 impl<'de> ::fidl_next::IntoNatural for LaunchInfo<'de> {
10017 type Natural = crate::natural::LaunchInfo;
10018 }
10019
10020 #[derive(Debug)]
10022 #[repr(C)]
10023 pub struct CreateComponentRequest<'de> {
10024 pub launch_info: crate::wire::LaunchInfo<'de>,
10025
10026 pub controller: ::fidl_next::ServerEnd<
10027 crate::ComponentController,
10028 ::fidl_next::wire::fuchsia::OptionalChannel,
10029 >,
10030 }
10031
10032 static_assertions::const_assert_eq!(std::mem::size_of::<CreateComponentRequest<'_>>(), 80);
10033 static_assertions::const_assert_eq!(std::mem::align_of::<CreateComponentRequest<'_>>(), 8);
10034
10035 static_assertions::const_assert_eq!(
10036 std::mem::offset_of!(CreateComponentRequest<'_>, launch_info),
10037 0
10038 );
10039
10040 static_assertions::const_assert_eq!(
10041 std::mem::offset_of!(CreateComponentRequest<'_>, controller),
10042 72
10043 );
10044
10045 impl ::fidl_next::Constrained for CreateComponentRequest<'_> {
10046 type Constraint = ();
10047
10048 fn validate(
10049 _: ::fidl_next::Slot<'_, Self>,
10050 _: Self::Constraint,
10051 ) -> Result<(), ::fidl_next::ValidationError> {
10052 Ok(())
10053 }
10054 }
10055
10056 unsafe impl ::fidl_next::Wire for CreateComponentRequest<'static> {
10057 type Narrowed<'de> = CreateComponentRequest<'de>;
10058
10059 #[inline]
10060 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10061 ::fidl_next::munge! {
10062 let Self {
10063 launch_info,
10064 controller,
10065
10066 } = &mut *out_;
10067 }
10068
10069 ::fidl_next::Wire::zero_padding(launch_info);
10070
10071 ::fidl_next::Wire::zero_padding(controller);
10072
10073 unsafe {
10074 out_.as_mut_ptr().cast::<u8>().add(76).write_bytes(0, 4);
10075 }
10076 }
10077 }
10078
10079 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CreateComponentRequest<'de>
10080 where
10081 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10082 ___D: ::fidl_next::Decoder<'de>,
10083 ___D: ::fidl_next::fuchsia::HandleDecoder,
10084 {
10085 fn decode(
10086 slot_: ::fidl_next::Slot<'_, Self>,
10087 decoder_: &mut ___D,
10088 _: (),
10089 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10090 if slot_.as_bytes()[76..80] != [0u8; 4] {
10091 return Err(::fidl_next::DecodeError::InvalidPadding);
10092 }
10093
10094 ::fidl_next::munge! {
10095 let Self {
10096 mut launch_info,
10097 mut controller,
10098
10099 } = slot_;
10100 }
10101
10102 let _field = launch_info.as_mut();
10103
10104 ::fidl_next::Decode::decode(launch_info.as_mut(), decoder_, ())?;
10105
10106 let _field = controller.as_mut();
10107
10108 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
10109
10110 Ok(())
10111 }
10112 }
10113
10114 impl<'de> ::fidl_next::IntoNatural for CreateComponentRequest<'de> {
10115 type Natural = crate::natural::CreateComponentRequest;
10116 }
10117
10118 #[repr(C)]
10120 pub struct EmptyResourceTable<'de> {
10121 pub(crate) table: ::fidl_next::wire::Table<'de>,
10122 }
10123
10124 impl<'de> Drop for EmptyResourceTable<'de> {
10125 fn drop(&mut self) {}
10126 }
10127
10128 impl ::fidl_next::Constrained for EmptyResourceTable<'_> {
10129 type Constraint = ();
10130
10131 fn validate(
10132 _: ::fidl_next::Slot<'_, Self>,
10133 _: Self::Constraint,
10134 ) -> Result<(), ::fidl_next::ValidationError> {
10135 Ok(())
10136 }
10137 }
10138
10139 unsafe impl ::fidl_next::Wire for EmptyResourceTable<'static> {
10140 type Narrowed<'de> = EmptyResourceTable<'de>;
10141
10142 #[inline]
10143 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10144 ::fidl_next::munge!(let Self { table } = out);
10145 ::fidl_next::wire::Table::zero_padding(table);
10146 }
10147 }
10148
10149 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTable<'de>
10150 where
10151 ___D: ::fidl_next::Decoder<'de> + ?Sized,
10152 ___D: ::fidl_next::fuchsia::HandleDecoder,
10153 {
10154 fn decode(
10155 slot: ::fidl_next::Slot<'_, Self>,
10156 decoder: &mut ___D,
10157 _: (),
10158 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10159 ::fidl_next::munge!(let Self { table } = slot);
10160
10161 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10162 match ordinal {
10163 0 => unsafe { ::core::hint::unreachable_unchecked() },
10164
10165 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10166 }
10167 })
10168 }
10169 }
10170
10171 impl<'de> EmptyResourceTable<'de> {}
10172
10173 impl<'de> ::core::fmt::Debug for EmptyResourceTable<'de> {
10174 fn fmt(
10175 &self,
10176 f: &mut ::core::fmt::Formatter<'_>,
10177 ) -> ::core::result::Result<(), ::core::fmt::Error> {
10178 f.debug_struct("EmptyResourceTable").finish()
10179 }
10180 }
10181
10182 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTable<'de> {
10183 type Natural = crate::natural::EmptyResourceTable;
10184 }
10185
10186 #[derive(Debug)]
10188 #[repr(C)]
10189 pub struct EmptyResourceTableStruct<'de> {
10190 pub table: crate::wire::EmptyResourceTable<'de>,
10191 }
10192
10193 static_assertions::const_assert_eq!(std::mem::size_of::<EmptyResourceTableStruct<'_>>(), 16);
10194 static_assertions::const_assert_eq!(std::mem::align_of::<EmptyResourceTableStruct<'_>>(), 8);
10195
10196 static_assertions::const_assert_eq!(
10197 std::mem::offset_of!(EmptyResourceTableStruct<'_>, table),
10198 0
10199 );
10200
10201 impl ::fidl_next::Constrained for EmptyResourceTableStruct<'_> {
10202 type Constraint = ();
10203
10204 fn validate(
10205 _: ::fidl_next::Slot<'_, Self>,
10206 _: Self::Constraint,
10207 ) -> Result<(), ::fidl_next::ValidationError> {
10208 Ok(())
10209 }
10210 }
10211
10212 unsafe impl ::fidl_next::Wire for EmptyResourceTableStruct<'static> {
10213 type Narrowed<'de> = EmptyResourceTableStruct<'de>;
10214
10215 #[inline]
10216 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10217 ::fidl_next::munge! {
10218 let Self {
10219 table,
10220
10221 } = &mut *out_;
10222 }
10223
10224 ::fidl_next::Wire::zero_padding(table);
10225 }
10226 }
10227
10228 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTableStruct<'de>
10229 where
10230 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10231 ___D: ::fidl_next::Decoder<'de>,
10232 ___D: ::fidl_next::fuchsia::HandleDecoder,
10233 {
10234 fn decode(
10235 slot_: ::fidl_next::Slot<'_, Self>,
10236 decoder_: &mut ___D,
10237 _: (),
10238 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10239 ::fidl_next::munge! {
10240 let Self {
10241 mut table,
10242
10243 } = slot_;
10244 }
10245
10246 let _field = table.as_mut();
10247
10248 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
10249
10250 Ok(())
10251 }
10252 }
10253
10254 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTableStruct<'de> {
10255 type Natural = crate::natural::EmptyResourceTableStruct;
10256 }
10257
10258 #[repr(transparent)]
10260 pub struct EnvelopeInliningTestUnion<'de> {
10261 pub(crate) raw: ::fidl_next::wire::Union,
10262 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
10263 }
10264
10265 impl<'de> Drop for EnvelopeInliningTestUnion<'de> {
10266 fn drop(&mut self) {
10267 match self.raw.ordinal() {
10268 1 => {
10269 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
10270 }
10271
10272 2 => {
10273 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint64>() };
10274 }
10275
10276 3 => {
10277 let _ = unsafe {
10278 self.raw
10279 .get()
10280 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10281 };
10282 }
10283
10284 _ => (),
10285 }
10286 }
10287 }
10288
10289 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
10290 type Constraint = ();
10291
10292 fn validate(
10293 _: ::fidl_next::Slot<'_, Self>,
10294 _: Self::Constraint,
10295 ) -> Result<(), ::fidl_next::ValidationError> {
10296 Ok(())
10297 }
10298 }
10299
10300 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
10301 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
10302
10303 #[inline]
10304 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10305 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
10306 ::fidl_next::wire::Union::zero_padding(raw);
10307 }
10308 }
10309
10310 pub mod envelope_inlining_test_union {
10311 pub enum Ref<'de> {
10312 Small(&'de ::fidl_next::wire::Uint32),
10313
10314 Large(&'de ::fidl_next::wire::Uint64),
10315
10316 Handle(&'de ::fidl_next::wire::fuchsia::NullableHandle),
10317
10318 UnknownOrdinal_(u64),
10319 }
10320 }
10321
10322 impl<'de> EnvelopeInliningTestUnion<'de> {
10323 pub fn as_ref(&self) -> crate::wire::envelope_inlining_test_union::Ref<'_> {
10324 match self.raw.ordinal() {
10325 1 => crate::wire::envelope_inlining_test_union::Ref::Small(unsafe {
10326 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
10327 }),
10328
10329 2 => crate::wire::envelope_inlining_test_union::Ref::Large(unsafe {
10330 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>()
10331 }),
10332
10333 3 => crate::wire::envelope_inlining_test_union::Ref::Handle(unsafe {
10334 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10335 }),
10336
10337 unknown => crate::wire::envelope_inlining_test_union::Ref::UnknownOrdinal_(unknown),
10338 }
10339 }
10340 }
10341
10342 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
10343 where
10344 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10345 ___D: ::fidl_next::Decoder<'de>,
10346 ___D: ::fidl_next::fuchsia::HandleDecoder,
10347 {
10348 fn decode(
10349 mut slot: ::fidl_next::Slot<'_, Self>,
10350 decoder: &mut ___D,
10351 _: (),
10352 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10353 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
10354 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
10355 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
10356 raw,
10357 decoder,
10358 (),
10359 )?,
10360
10361 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
10362 raw,
10363 decoder,
10364 (),
10365 )?,
10366
10367 3 => ::fidl_next::wire::Union::decode_as::<
10368 ___D,
10369 ::fidl_next::wire::fuchsia::NullableHandle,
10370 >(raw, decoder, ())?,
10371
10372 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
10373 }
10374
10375 Ok(())
10376 }
10377 }
10378
10379 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
10380 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10381 match self.raw.ordinal() {
10382 1 => unsafe {
10383 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
10384 },
10385 2 => unsafe {
10386 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>().fmt(f)
10387 },
10388 3 => unsafe {
10389 self.raw
10390 .get()
10391 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10392 .fmt(f)
10393 },
10394 _ => unsafe { ::core::hint::unreachable_unchecked() },
10395 }
10396 }
10397 }
10398
10399 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
10400 type Natural = crate::natural::EnvelopeInliningTestUnion;
10401 }
10402
10403 #[derive(Debug)]
10405 #[repr(C)]
10406 pub struct EnvelopeInliningTestUnionStruct<'de> {
10407 pub u: crate::wire::EnvelopeInliningTestUnion<'de>,
10408 }
10409
10410 static_assertions::const_assert_eq!(
10411 std::mem::size_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10412 16
10413 );
10414 static_assertions::const_assert_eq!(
10415 std::mem::align_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10416 8
10417 );
10418
10419 static_assertions::const_assert_eq!(
10420 std::mem::offset_of!(EnvelopeInliningTestUnionStruct<'_>, u),
10421 0
10422 );
10423
10424 impl ::fidl_next::Constrained for EnvelopeInliningTestUnionStruct<'_> {
10425 type Constraint = ();
10426
10427 fn validate(
10428 _: ::fidl_next::Slot<'_, Self>,
10429 _: Self::Constraint,
10430 ) -> Result<(), ::fidl_next::ValidationError> {
10431 Ok(())
10432 }
10433 }
10434
10435 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnionStruct<'static> {
10436 type Narrowed<'de> = EnvelopeInliningTestUnionStruct<'de>;
10437
10438 #[inline]
10439 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10440 ::fidl_next::munge! {
10441 let Self {
10442 u,
10443
10444 } = &mut *out_;
10445 }
10446
10447 ::fidl_next::Wire::zero_padding(u);
10448 }
10449 }
10450
10451 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnionStruct<'de>
10452 where
10453 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10454 ___D: ::fidl_next::Decoder<'de>,
10455 ___D: ::fidl_next::fuchsia::HandleDecoder,
10456 {
10457 fn decode(
10458 slot_: ::fidl_next::Slot<'_, Self>,
10459 decoder_: &mut ___D,
10460 _: (),
10461 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10462 ::fidl_next::munge! {
10463 let Self {
10464 mut u,
10465
10466 } = slot_;
10467 }
10468
10469 let _field = u.as_mut();
10470
10471 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
10472
10473 Ok(())
10474 }
10475 }
10476
10477 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnionStruct<'de> {
10478 type Natural = crate::natural::EnvelopeInliningTestUnionStruct;
10479 }
10480
10481 #[derive(Debug)]
10483 #[repr(C)]
10484 pub struct EventWithDefaultRights {
10485 pub h: ::fidl_next::wire::fuchsia::Event,
10486 }
10487
10488 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithDefaultRights>(), 4);
10489 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithDefaultRights>(), 4);
10490
10491 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithDefaultRights, h), 0);
10492
10493 impl ::fidl_next::Constrained for EventWithDefaultRights {
10494 type Constraint = ();
10495
10496 fn validate(
10497 _: ::fidl_next::Slot<'_, Self>,
10498 _: Self::Constraint,
10499 ) -> Result<(), ::fidl_next::ValidationError> {
10500 Ok(())
10501 }
10502 }
10503
10504 unsafe impl ::fidl_next::Wire for EventWithDefaultRights {
10505 type Narrowed<'de> = EventWithDefaultRights;
10506
10507 #[inline]
10508 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10509 ::fidl_next::munge! {
10510 let Self {
10511 h,
10512
10513 } = &mut *out_;
10514 }
10515
10516 ::fidl_next::Wire::zero_padding(h);
10517 }
10518 }
10519
10520 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithDefaultRights
10521 where
10522 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10523 ___D: ::fidl_next::fuchsia::HandleDecoder,
10524 {
10525 fn decode(
10526 slot_: ::fidl_next::Slot<'_, Self>,
10527 decoder_: &mut ___D,
10528 _: (),
10529 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10530 ::fidl_next::munge! {
10531 let Self {
10532 mut h,
10533
10534 } = slot_;
10535 }
10536
10537 let _field = h.as_mut();
10538
10539 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
10540
10541 Ok(())
10542 }
10543 }
10544
10545 impl ::fidl_next::IntoNatural for EventWithDefaultRights {
10546 type Natural = crate::natural::EventWithDefaultRights;
10547 }
10548
10549 #[derive(Debug)]
10551 #[repr(C)]
10552 pub struct EventWithReducedRights {
10553 pub h: ::fidl_next::wire::fuchsia::Event,
10554 }
10555
10556 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithReducedRights>(), 4);
10557 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithReducedRights>(), 4);
10558
10559 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithReducedRights, h), 0);
10560
10561 impl ::fidl_next::Constrained for EventWithReducedRights {
10562 type Constraint = ();
10563
10564 fn validate(
10565 _: ::fidl_next::Slot<'_, Self>,
10566 _: Self::Constraint,
10567 ) -> Result<(), ::fidl_next::ValidationError> {
10568 Ok(())
10569 }
10570 }
10571
10572 unsafe impl ::fidl_next::Wire for EventWithReducedRights {
10573 type Narrowed<'de> = EventWithReducedRights;
10574
10575 #[inline]
10576 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10577 ::fidl_next::munge! {
10578 let Self {
10579 h,
10580
10581 } = &mut *out_;
10582 }
10583
10584 ::fidl_next::Wire::zero_padding(h);
10585 }
10586 }
10587
10588 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithReducedRights
10589 where
10590 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10591 ___D: ::fidl_next::fuchsia::HandleDecoder,
10592 {
10593 fn decode(
10594 slot_: ::fidl_next::Slot<'_, Self>,
10595 decoder_: &mut ___D,
10596 _: (),
10597 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10598 ::fidl_next::munge! {
10599 let Self {
10600 mut h,
10601
10602 } = slot_;
10603 }
10604
10605 let _field = h.as_mut();
10606
10607 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
10608
10609 Ok(())
10610 }
10611 }
10612
10613 impl ::fidl_next::IntoNatural for EventWithReducedRights {
10614 type Natural = crate::natural::EventWithReducedRights;
10615 }
10616
10617 #[derive(Debug)]
10619 #[repr(C)]
10620 pub struct FidlvizDemo<'de> {
10621 pub f1: u8,
10622
10623 pub f2: i8,
10624
10625 pub f3: ::fidl_next::wire::Uint16,
10626
10627 pub f4: ::fidl_next::wire::Uint32,
10628
10629 pub f5: ::fidl_next::wire::Uint64,
10630
10631 pub f6: u8,
10632
10633 pub f7: u8,
10634
10635 pub f8: ::fidl_next::wire::Uint16,
10636
10637 pub f9: ::fidl_next::wire::Float32,
10638
10639 pub f10: ::fidl_next::wire::Float64,
10640
10641 pub f11: bool,
10642
10643 pub f12: bool,
10644
10645 pub f13: ::fidl_next::wire::String<'de>,
10646
10647 pub f14: ::fidl_next::wire::OptionalString<'de>,
10648
10649 pub f15: ::fidl_next::wire::String<'de>,
10650
10651 pub f16: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
10652
10653 pub f17: ::fidl_next::wire::fuchsia::NullableHandle,
10654
10655 pub f18: [u8; 3],
10656
10657 pub f19: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Float64>,
10658
10659 pub f20: ::fidl_next::wire::OptionalVector<'de, u8>,
10660
10661 pub f21: ::fidl_next::wire::Vector<'de, u8>,
10662
10663 pub f22: crate::wire::FidlvizBits,
10664
10665 pub f23: crate::wire::FidlvizEnum,
10666
10667 pub f24: crate::wire::FidlvizStruct1,
10668
10669 pub f25: crate::wire::FidlvizStruct2,
10670
10671 pub f26: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct1>,
10672
10673 pub f27: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct2>,
10674
10675 pub f28: crate::wire::FidlvizTable<'de>,
10676
10677 pub f29: crate::wire::FidlvizTable<'de>,
10678
10679 pub f30: crate::wire_optional::FidlvizUnion<'de>,
10680
10681 pub f31: crate::wire::FidlvizUnion<'de>,
10682 }
10683
10684 static_assertions::const_assert_eq!(std::mem::size_of::<FidlvizDemo<'_>>(), 248);
10685 static_assertions::const_assert_eq!(std::mem::align_of::<FidlvizDemo<'_>>(), 8);
10686
10687 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f1), 0);
10688
10689 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f2), 1);
10690
10691 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f3), 2);
10692
10693 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f4), 4);
10694
10695 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f5), 8);
10696
10697 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f6), 16);
10698
10699 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f7), 17);
10700
10701 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f8), 18);
10702
10703 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f9), 20);
10704
10705 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f10), 24);
10706
10707 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f11), 32);
10708
10709 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f12), 33);
10710
10711 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f13), 40);
10712
10713 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f14), 56);
10714
10715 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f15), 72);
10716
10717 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f16), 88);
10718
10719 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f17), 92);
10720
10721 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f18), 96);
10722
10723 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f19), 104);
10724
10725 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f20), 120);
10726
10727 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f21), 136);
10728
10729 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f22), 152);
10730
10731 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f23), 153);
10732
10733 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f24), 154);
10734
10735 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f25), 160);
10736
10737 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f26), 168);
10738
10739 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f27), 176);
10740
10741 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f28), 184);
10742
10743 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f29), 200);
10744
10745 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f30), 216);
10746
10747 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f31), 232);
10748
10749 impl ::fidl_next::Constrained for FidlvizDemo<'_> {
10750 type Constraint = ();
10751
10752 fn validate(
10753 _: ::fidl_next::Slot<'_, Self>,
10754 _: Self::Constraint,
10755 ) -> Result<(), ::fidl_next::ValidationError> {
10756 Ok(())
10757 }
10758 }
10759
10760 unsafe impl ::fidl_next::Wire for FidlvizDemo<'static> {
10761 type Narrowed<'de> = FidlvizDemo<'de>;
10762
10763 #[inline]
10764 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10765 ::fidl_next::munge! {
10766 let Self {
10767 f1,
10768 f2,
10769 f3,
10770 f4,
10771 f5,
10772 f6,
10773 f7,
10774 f8,
10775 f9,
10776 f10,
10777 f11,
10778 f12,
10779 f13,
10780 f14,
10781 f15,
10782 f16,
10783 f17,
10784 f18,
10785 f19,
10786 f20,
10787 f21,
10788 f22,
10789 f23,
10790 f24,
10791 f25,
10792 f26,
10793 f27,
10794 f28,
10795 f29,
10796 f30,
10797 f31,
10798
10799 } = &mut *out_;
10800 }
10801
10802 ::fidl_next::Wire::zero_padding(f1);
10803
10804 ::fidl_next::Wire::zero_padding(f2);
10805
10806 ::fidl_next::Wire::zero_padding(f3);
10807
10808 ::fidl_next::Wire::zero_padding(f4);
10809
10810 ::fidl_next::Wire::zero_padding(f5);
10811
10812 ::fidl_next::Wire::zero_padding(f6);
10813
10814 ::fidl_next::Wire::zero_padding(f7);
10815
10816 ::fidl_next::Wire::zero_padding(f8);
10817
10818 ::fidl_next::Wire::zero_padding(f9);
10819
10820 ::fidl_next::Wire::zero_padding(f10);
10821
10822 ::fidl_next::Wire::zero_padding(f11);
10823
10824 ::fidl_next::Wire::zero_padding(f12);
10825
10826 ::fidl_next::Wire::zero_padding(f13);
10827
10828 ::fidl_next::Wire::zero_padding(f14);
10829
10830 ::fidl_next::Wire::zero_padding(f15);
10831
10832 ::fidl_next::Wire::zero_padding(f16);
10833
10834 ::fidl_next::Wire::zero_padding(f17);
10835
10836 ::fidl_next::Wire::zero_padding(f18);
10837
10838 ::fidl_next::Wire::zero_padding(f19);
10839
10840 ::fidl_next::Wire::zero_padding(f20);
10841
10842 ::fidl_next::Wire::zero_padding(f21);
10843
10844 ::fidl_next::Wire::zero_padding(f22);
10845
10846 ::fidl_next::Wire::zero_padding(f23);
10847
10848 ::fidl_next::Wire::zero_padding(f24);
10849
10850 ::fidl_next::Wire::zero_padding(f25);
10851
10852 ::fidl_next::Wire::zero_padding(f26);
10853
10854 ::fidl_next::Wire::zero_padding(f27);
10855
10856 ::fidl_next::Wire::zero_padding(f28);
10857
10858 ::fidl_next::Wire::zero_padding(f29);
10859
10860 ::fidl_next::Wire::zero_padding(f30);
10861
10862 ::fidl_next::Wire::zero_padding(f31);
10863
10864 unsafe {
10865 out_.as_mut_ptr().cast::<u8>().add(155).write_bytes(0, 5);
10866 }
10867
10868 unsafe {
10869 out_.as_mut_ptr().cast::<u8>().add(99).write_bytes(0, 5);
10870 }
10871
10872 unsafe {
10873 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 6);
10874 }
10875 }
10876 }
10877
10878 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FidlvizDemo<'de>
10879 where
10880 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10881 ___D: ::fidl_next::Decoder<'de>,
10882 ___D: ::fidl_next::fuchsia::HandleDecoder,
10883 {
10884 fn decode(
10885 slot_: ::fidl_next::Slot<'_, Self>,
10886 decoder_: &mut ___D,
10887 _: (),
10888 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10889 if slot_.as_bytes()[155..160] != [0u8; 5] {
10890 return Err(::fidl_next::DecodeError::InvalidPadding);
10891 }
10892
10893 if slot_.as_bytes()[99..104] != [0u8; 5] {
10894 return Err(::fidl_next::DecodeError::InvalidPadding);
10895 }
10896
10897 if slot_.as_bytes()[34..40] != [0u8; 6] {
10898 return Err(::fidl_next::DecodeError::InvalidPadding);
10899 }
10900
10901 ::fidl_next::munge! {
10902 let Self {
10903 mut f1,
10904 mut f2,
10905 mut f3,
10906 mut f4,
10907 mut f5,
10908 mut f6,
10909 mut f7,
10910 mut f8,
10911 mut f9,
10912 mut f10,
10913 mut f11,
10914 mut f12,
10915 mut f13,
10916 mut f14,
10917 mut f15,
10918 mut f16,
10919 mut f17,
10920 mut f18,
10921 mut f19,
10922 mut f20,
10923 mut f21,
10924 mut f22,
10925 mut f23,
10926 mut f24,
10927 mut f25,
10928 mut f26,
10929 mut f27,
10930 mut f28,
10931 mut f29,
10932 mut f30,
10933 mut f31,
10934
10935 } = slot_;
10936 }
10937
10938 let _field = f1.as_mut();
10939
10940 ::fidl_next::Decode::decode(f1.as_mut(), decoder_, ())?;
10941
10942 let _field = f2.as_mut();
10943
10944 ::fidl_next::Decode::decode(f2.as_mut(), decoder_, ())?;
10945
10946 let _field = f3.as_mut();
10947
10948 ::fidl_next::Decode::decode(f3.as_mut(), decoder_, ())?;
10949
10950 let _field = f4.as_mut();
10951
10952 ::fidl_next::Decode::decode(f4.as_mut(), decoder_, ())?;
10953
10954 let _field = f5.as_mut();
10955
10956 ::fidl_next::Decode::decode(f5.as_mut(), decoder_, ())?;
10957
10958 let _field = f6.as_mut();
10959
10960 ::fidl_next::Decode::decode(f6.as_mut(), decoder_, ())?;
10961
10962 let _field = f7.as_mut();
10963
10964 ::fidl_next::Decode::decode(f7.as_mut(), decoder_, ())?;
10965
10966 let _field = f8.as_mut();
10967
10968 ::fidl_next::Decode::decode(f8.as_mut(), decoder_, ())?;
10969
10970 let _field = f9.as_mut();
10971
10972 ::fidl_next::Decode::decode(f9.as_mut(), decoder_, ())?;
10973
10974 let _field = f10.as_mut();
10975
10976 ::fidl_next::Decode::decode(f10.as_mut(), decoder_, ())?;
10977
10978 let _field = f11.as_mut();
10979
10980 ::fidl_next::Decode::decode(f11.as_mut(), decoder_, ())?;
10981
10982 let _field = f12.as_mut();
10983
10984 ::fidl_next::Decode::decode(f12.as_mut(), decoder_, ())?;
10985
10986 let _field = f13.as_mut();
10987 ::fidl_next::Constrained::validate(_field, 4294967295)?;
10988 ::fidl_next::Decode::decode(f13.as_mut(), decoder_, 4294967295)?;
10989
10990 let _field = f14.as_mut();
10991 ::fidl_next::Constrained::validate(_field, 4294967295)?;
10992 ::fidl_next::Decode::decode(f14.as_mut(), decoder_, 4294967295)?;
10993
10994 let _field = f15.as_mut();
10995 ::fidl_next::Constrained::validate(_field, 4294967295)?;
10996 ::fidl_next::Decode::decode(f15.as_mut(), decoder_, 4294967295)?;
10997
10998 let _field = f16.as_mut();
10999
11000 ::fidl_next::Decode::decode(f16.as_mut(), decoder_, ())?;
11001
11002 let _field = f17.as_mut();
11003
11004 ::fidl_next::Decode::decode(f17.as_mut(), decoder_, ())?;
11005
11006 let _field = f18.as_mut();
11007
11008 ::fidl_next::Decode::decode(f18.as_mut(), decoder_, ())?;
11009
11010 let _field = f19.as_mut();
11011 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11012 ::fidl_next::Decode::decode(f19.as_mut(), decoder_, (4294967295, ()))?;
11013
11014 let _field = f20.as_mut();
11015 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11016 ::fidl_next::Decode::decode(f20.as_mut(), decoder_, (4294967295, ()))?;
11017
11018 let _field = f21.as_mut();
11019 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11020 ::fidl_next::Decode::decode(f21.as_mut(), decoder_, (4294967295, ()))?;
11021
11022 let _field = f22.as_mut();
11023
11024 ::fidl_next::Decode::decode(f22.as_mut(), decoder_, ())?;
11025
11026 let _field = f23.as_mut();
11027
11028 ::fidl_next::Decode::decode(f23.as_mut(), decoder_, ())?;
11029
11030 let _field = f24.as_mut();
11031
11032 ::fidl_next::Decode::decode(f24.as_mut(), decoder_, ())?;
11033
11034 let _field = f25.as_mut();
11035
11036 ::fidl_next::Decode::decode(f25.as_mut(), decoder_, ())?;
11037
11038 let _field = f26.as_mut();
11039
11040 ::fidl_next::Decode::decode(f26.as_mut(), decoder_, ())?;
11041
11042 let _field = f27.as_mut();
11043
11044 ::fidl_next::Decode::decode(f27.as_mut(), decoder_, ())?;
11045
11046 let _field = f28.as_mut();
11047
11048 ::fidl_next::Decode::decode(f28.as_mut(), decoder_, ())?;
11049
11050 let _field = f29.as_mut();
11051
11052 ::fidl_next::Decode::decode(f29.as_mut(), decoder_, ())?;
11053
11054 let _field = f30.as_mut();
11055
11056 ::fidl_next::Decode::decode(f30.as_mut(), decoder_, ())?;
11057
11058 let _field = f31.as_mut();
11059
11060 ::fidl_next::Decode::decode(f31.as_mut(), decoder_, ())?;
11061
11062 Ok(())
11063 }
11064 }
11065
11066 impl<'de> ::fidl_next::IntoNatural for FidlvizDemo<'de> {
11067 type Natural = crate::natural::FidlvizDemo;
11068 }
11069
11070 #[derive(Debug)]
11072 #[repr(C)]
11073 pub struct GoldenHandleBasicRightsStruct {
11074 pub v: ::fidl_next::wire::fuchsia::Event,
11075 }
11076
11077 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenHandleBasicRightsStruct>(), 4);
11078 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenHandleBasicRightsStruct>(), 4);
11079
11080 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenHandleBasicRightsStruct, v), 0);
11081
11082 impl ::fidl_next::Constrained for GoldenHandleBasicRightsStruct {
11083 type Constraint = ();
11084
11085 fn validate(
11086 _: ::fidl_next::Slot<'_, Self>,
11087 _: Self::Constraint,
11088 ) -> Result<(), ::fidl_next::ValidationError> {
11089 Ok(())
11090 }
11091 }
11092
11093 unsafe impl ::fidl_next::Wire for GoldenHandleBasicRightsStruct {
11094 type Narrowed<'de> = GoldenHandleBasicRightsStruct;
11095
11096 #[inline]
11097 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11098 ::fidl_next::munge! {
11099 let Self {
11100 v,
11101
11102 } = &mut *out_;
11103 }
11104
11105 ::fidl_next::Wire::zero_padding(v);
11106 }
11107 }
11108
11109 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenHandleBasicRightsStruct
11110 where
11111 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11112 ___D: ::fidl_next::fuchsia::HandleDecoder,
11113 {
11114 fn decode(
11115 slot_: ::fidl_next::Slot<'_, Self>,
11116 decoder_: &mut ___D,
11117 _: (),
11118 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11119 ::fidl_next::munge! {
11120 let Self {
11121 mut v,
11122
11123 } = slot_;
11124 }
11125
11126 let _field = v.as_mut();
11127
11128 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11129
11130 Ok(())
11131 }
11132 }
11133
11134 impl ::fidl_next::IntoNatural for GoldenHandleBasicRightsStruct {
11135 type Natural = crate::natural::GoldenHandleBasicRightsStruct;
11136 }
11137
11138 #[derive(Debug)]
11140 #[repr(C)]
11141 pub struct GoldenNullableHandleStruct {
11142 pub v: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11143 }
11144
11145 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenNullableHandleStruct>(), 4);
11146 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenNullableHandleStruct>(), 4);
11147
11148 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenNullableHandleStruct, v), 0);
11149
11150 impl ::fidl_next::Constrained for GoldenNullableHandleStruct {
11151 type Constraint = ();
11152
11153 fn validate(
11154 _: ::fidl_next::Slot<'_, Self>,
11155 _: Self::Constraint,
11156 ) -> Result<(), ::fidl_next::ValidationError> {
11157 Ok(())
11158 }
11159 }
11160
11161 unsafe impl ::fidl_next::Wire for GoldenNullableHandleStruct {
11162 type Narrowed<'de> = GoldenNullableHandleStruct;
11163
11164 #[inline]
11165 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11166 ::fidl_next::munge! {
11167 let Self {
11168 v,
11169
11170 } = &mut *out_;
11171 }
11172
11173 ::fidl_next::Wire::zero_padding(v);
11174 }
11175 }
11176
11177 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenNullableHandleStruct
11178 where
11179 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11180 ___D: ::fidl_next::fuchsia::HandleDecoder,
11181 {
11182 fn decode(
11183 slot_: ::fidl_next::Slot<'_, Self>,
11184 decoder_: &mut ___D,
11185 _: (),
11186 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11187 ::fidl_next::munge! {
11188 let Self {
11189 mut v,
11190
11191 } = slot_;
11192 }
11193
11194 let _field = v.as_mut();
11195
11196 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11197
11198 Ok(())
11199 }
11200 }
11201
11202 impl ::fidl_next::IntoNatural for GoldenNullableHandleStruct {
11203 type Natural = crate::natural::GoldenNullableHandleStruct;
11204 }
11205
11206 #[derive(Debug)]
11208 #[repr(C)]
11209 pub struct MultipleBoundedNonnullableVectorsOfHandles<'de> {
11210 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11211
11212 pub vh1: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11213 }
11214
11215 static_assertions::const_assert_eq!(
11216 std::mem::size_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11217 32
11218 );
11219 static_assertions::const_assert_eq!(
11220 std::mem::align_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11221 8
11222 );
11223
11224 static_assertions::const_assert_eq!(
11225 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh0),
11226 0
11227 );
11228
11229 static_assertions::const_assert_eq!(
11230 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh1),
11231 16
11232 );
11233
11234 impl ::fidl_next::Constrained for MultipleBoundedNonnullableVectorsOfHandles<'_> {
11235 type Constraint = ();
11236
11237 fn validate(
11238 _: ::fidl_next::Slot<'_, Self>,
11239 _: Self::Constraint,
11240 ) -> Result<(), ::fidl_next::ValidationError> {
11241 Ok(())
11242 }
11243 }
11244
11245 unsafe impl ::fidl_next::Wire for MultipleBoundedNonnullableVectorsOfHandles<'static> {
11246 type Narrowed<'de> = MultipleBoundedNonnullableVectorsOfHandles<'de>;
11247
11248 #[inline]
11249 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11250 ::fidl_next::munge! {
11251 let Self {
11252 vh0,
11253 vh1,
11254
11255 } = &mut *out_;
11256 }
11257
11258 ::fidl_next::Wire::zero_padding(vh0);
11259
11260 ::fidl_next::Wire::zero_padding(vh1);
11261 }
11262 }
11263
11264 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNonnullableVectorsOfHandles<'de>
11265 where
11266 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11267 ___D: ::fidl_next::Decoder<'de>,
11268 ___D: ::fidl_next::fuchsia::HandleDecoder,
11269 {
11270 fn decode(
11271 slot_: ::fidl_next::Slot<'_, Self>,
11272 decoder_: &mut ___D,
11273 _: (),
11274 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11275 ::fidl_next::munge! {
11276 let Self {
11277 mut vh0,
11278 mut vh1,
11279
11280 } = slot_;
11281 }
11282
11283 let _field = vh0.as_mut();
11284 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11285 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11286
11287 let vh0 = unsafe { vh0.deref_unchecked() };
11288
11289 if vh0.len() > 2 {
11290 return Err(::fidl_next::DecodeError::VectorTooLong {
11291 size: vh0.len() as u64,
11292 limit: 2,
11293 });
11294 }
11295
11296 let _field = vh1.as_mut();
11297 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11298 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11299
11300 let vh1 = unsafe { vh1.deref_unchecked() };
11301
11302 if vh1.len() > 32 {
11303 return Err(::fidl_next::DecodeError::VectorTooLong {
11304 size: vh1.len() as u64,
11305 limit: 32,
11306 });
11307 }
11308
11309 Ok(())
11310 }
11311 }
11312
11313 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNonnullableVectorsOfHandles<'de> {
11314 type Natural = crate::natural::MultipleBoundedNonnullableVectorsOfHandles;
11315 }
11316
11317 #[derive(Debug)]
11319 #[repr(C)]
11320 pub struct MultipleBoundedNullableVectorsOfHandles<'de> {
11321 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11322
11323 pub vh1: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11324 }
11325
11326 static_assertions::const_assert_eq!(
11327 std::mem::size_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11328 32
11329 );
11330 static_assertions::const_assert_eq!(
11331 std::mem::align_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11332 8
11333 );
11334
11335 static_assertions::const_assert_eq!(
11336 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh0),
11337 0
11338 );
11339
11340 static_assertions::const_assert_eq!(
11341 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh1),
11342 16
11343 );
11344
11345 impl ::fidl_next::Constrained for MultipleBoundedNullableVectorsOfHandles<'_> {
11346 type Constraint = ();
11347
11348 fn validate(
11349 _: ::fidl_next::Slot<'_, Self>,
11350 _: Self::Constraint,
11351 ) -> Result<(), ::fidl_next::ValidationError> {
11352 Ok(())
11353 }
11354 }
11355
11356 unsafe impl ::fidl_next::Wire for MultipleBoundedNullableVectorsOfHandles<'static> {
11357 type Narrowed<'de> = MultipleBoundedNullableVectorsOfHandles<'de>;
11358
11359 #[inline]
11360 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11361 ::fidl_next::munge! {
11362 let Self {
11363 vh0,
11364 vh1,
11365
11366 } = &mut *out_;
11367 }
11368
11369 ::fidl_next::Wire::zero_padding(vh0);
11370
11371 ::fidl_next::Wire::zero_padding(vh1);
11372 }
11373 }
11374
11375 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNullableVectorsOfHandles<'de>
11376 where
11377 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11378 ___D: ::fidl_next::Decoder<'de>,
11379 ___D: ::fidl_next::fuchsia::HandleDecoder,
11380 {
11381 fn decode(
11382 slot_: ::fidl_next::Slot<'_, Self>,
11383 decoder_: &mut ___D,
11384 _: (),
11385 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11386 ::fidl_next::munge! {
11387 let Self {
11388 mut vh0,
11389 mut vh1,
11390
11391 } = slot_;
11392 }
11393
11394 let _field = vh0.as_mut();
11395 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11396 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11397
11398 let vh0 = unsafe { vh0.deref_unchecked() };
11399
11400 if let Some(vh0) = vh0.as_ref() {
11401 if vh0.len() > 2 {
11402 return Err(::fidl_next::DecodeError::VectorTooLong {
11403 size: vh0.len() as u64,
11404 limit: 2,
11405 });
11406 }
11407 }
11408
11409 let _field = vh1.as_mut();
11410 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11411 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11412
11413 let vh1 = unsafe { vh1.deref_unchecked() };
11414
11415 if let Some(vh1) = vh1.as_ref() {
11416 if vh1.len() > 32 {
11417 return Err(::fidl_next::DecodeError::VectorTooLong {
11418 size: vh1.len() as u64,
11419 limit: 32,
11420 });
11421 }
11422 }
11423
11424 Ok(())
11425 }
11426 }
11427
11428 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNullableVectorsOfHandles<'de> {
11429 type Natural = crate::natural::MultipleBoundedNullableVectorsOfHandles;
11430 }
11431
11432 #[derive(Debug)]
11434 #[repr(C)]
11435 pub struct MultipleHandleSubtypes {
11436 pub untyped: ::fidl_next::wire::fuchsia::NullableHandle,
11437
11438 pub event: ::fidl_next::wire::fuchsia::Event,
11439
11440 pub channel: ::fidl_next::wire::fuchsia::Channel,
11441 }
11442
11443 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleHandleSubtypes>(), 12);
11444 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleHandleSubtypes>(), 4);
11445
11446 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, untyped), 0);
11447
11448 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, event), 4);
11449
11450 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, channel), 8);
11451
11452 impl ::fidl_next::Constrained for MultipleHandleSubtypes {
11453 type Constraint = ();
11454
11455 fn validate(
11456 _: ::fidl_next::Slot<'_, Self>,
11457 _: Self::Constraint,
11458 ) -> Result<(), ::fidl_next::ValidationError> {
11459 Ok(())
11460 }
11461 }
11462
11463 unsafe impl ::fidl_next::Wire for MultipleHandleSubtypes {
11464 type Narrowed<'de> = MultipleHandleSubtypes;
11465
11466 #[inline]
11467 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11468 ::fidl_next::munge! {
11469 let Self {
11470 untyped,
11471 event,
11472 channel,
11473
11474 } = &mut *out_;
11475 }
11476
11477 ::fidl_next::Wire::zero_padding(untyped);
11478
11479 ::fidl_next::Wire::zero_padding(event);
11480
11481 ::fidl_next::Wire::zero_padding(channel);
11482 }
11483 }
11484
11485 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleHandleSubtypes
11486 where
11487 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11488 ___D: ::fidl_next::fuchsia::HandleDecoder,
11489 {
11490 fn decode(
11491 slot_: ::fidl_next::Slot<'_, Self>,
11492 decoder_: &mut ___D,
11493 _: (),
11494 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11495 ::fidl_next::munge! {
11496 let Self {
11497 mut untyped,
11498 mut event,
11499 mut channel,
11500
11501 } = slot_;
11502 }
11503
11504 let _field = untyped.as_mut();
11505
11506 ::fidl_next::Decode::decode(untyped.as_mut(), decoder_, ())?;
11507
11508 let _field = event.as_mut();
11509
11510 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
11511
11512 let _field = channel.as_mut();
11513
11514 ::fidl_next::Decode::decode(channel.as_mut(), decoder_, ())?;
11515
11516 Ok(())
11517 }
11518 }
11519
11520 impl ::fidl_next::IntoNatural for MultipleHandleSubtypes {
11521 type Natural = crate::natural::MultipleHandleSubtypes;
11522 }
11523
11524 #[derive(Debug)]
11526 #[repr(C)]
11527 pub struct MultipleNonnullableHandles {
11528 pub data0: ::fidl_next::wire::Uint32,
11529
11530 pub handle0: ::fidl_next::wire::fuchsia::NullableHandle,
11531
11532 pub data1: ::fidl_next::wire::Uint64,
11533
11534 pub handle1: ::fidl_next::wire::fuchsia::Channel,
11535
11536 pub handle2: ::fidl_next::wire::fuchsia::Event,
11537
11538 pub data2: ::fidl_next::wire::Uint64,
11539 }
11540
11541 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNonnullableHandles>(), 32);
11542 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNonnullableHandles>(), 8);
11543
11544 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data0), 0);
11545
11546 static_assertions::const_assert_eq!(
11547 std::mem::offset_of!(MultipleNonnullableHandles, handle0),
11548 4
11549 );
11550
11551 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data1), 8);
11552
11553 static_assertions::const_assert_eq!(
11554 std::mem::offset_of!(MultipleNonnullableHandles, handle1),
11555 16
11556 );
11557
11558 static_assertions::const_assert_eq!(
11559 std::mem::offset_of!(MultipleNonnullableHandles, handle2),
11560 20
11561 );
11562
11563 static_assertions::const_assert_eq!(
11564 std::mem::offset_of!(MultipleNonnullableHandles, data2),
11565 24
11566 );
11567
11568 impl ::fidl_next::Constrained for MultipleNonnullableHandles {
11569 type Constraint = ();
11570
11571 fn validate(
11572 _: ::fidl_next::Slot<'_, Self>,
11573 _: Self::Constraint,
11574 ) -> Result<(), ::fidl_next::ValidationError> {
11575 Ok(())
11576 }
11577 }
11578
11579 unsafe impl ::fidl_next::Wire for MultipleNonnullableHandles {
11580 type Narrowed<'de> = MultipleNonnullableHandles;
11581
11582 #[inline]
11583 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11584 ::fidl_next::munge! {
11585 let Self {
11586 data0,
11587 handle0,
11588 data1,
11589 handle1,
11590 handle2,
11591 data2,
11592
11593 } = &mut *out_;
11594 }
11595
11596 ::fidl_next::Wire::zero_padding(data0);
11597
11598 ::fidl_next::Wire::zero_padding(handle0);
11599
11600 ::fidl_next::Wire::zero_padding(data1);
11601
11602 ::fidl_next::Wire::zero_padding(handle1);
11603
11604 ::fidl_next::Wire::zero_padding(handle2);
11605
11606 ::fidl_next::Wire::zero_padding(data2);
11607 }
11608 }
11609
11610 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNonnullableHandles
11611 where
11612 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11613 ___D: ::fidl_next::fuchsia::HandleDecoder,
11614 {
11615 fn decode(
11616 slot_: ::fidl_next::Slot<'_, Self>,
11617 decoder_: &mut ___D,
11618 _: (),
11619 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11620 ::fidl_next::munge! {
11621 let Self {
11622 mut data0,
11623 mut handle0,
11624 mut data1,
11625 mut handle1,
11626 mut handle2,
11627 mut data2,
11628
11629 } = slot_;
11630 }
11631
11632 let _field = data0.as_mut();
11633
11634 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
11635
11636 let _field = handle0.as_mut();
11637
11638 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
11639
11640 let _field = data1.as_mut();
11641
11642 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
11643
11644 let _field = handle1.as_mut();
11645
11646 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
11647
11648 let _field = handle2.as_mut();
11649
11650 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
11651
11652 let _field = data2.as_mut();
11653
11654 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
11655
11656 Ok(())
11657 }
11658 }
11659
11660 impl ::fidl_next::IntoNatural for MultipleNonnullableHandles {
11661 type Natural = crate::natural::MultipleNonnullableHandles;
11662 }
11663
11664 #[derive(Debug)]
11666 #[repr(C)]
11667 pub struct MultipleNullableHandles {
11668 pub data0: ::fidl_next::wire::Uint32,
11669
11670 pub handle0: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11671
11672 pub data1: ::fidl_next::wire::Uint64,
11673
11674 pub handle1: ::fidl_next::wire::fuchsia::OptionalChannel,
11675
11676 pub handle2: ::fidl_next::wire::fuchsia::OptionalEvent,
11677
11678 pub data2: ::fidl_next::wire::Uint64,
11679 }
11680
11681 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNullableHandles>(), 32);
11682 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNullableHandles>(), 8);
11683
11684 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data0), 0);
11685
11686 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle0), 4);
11687
11688 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data1), 8);
11689
11690 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle1), 16);
11691
11692 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle2), 20);
11693
11694 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data2), 24);
11695
11696 impl ::fidl_next::Constrained for MultipleNullableHandles {
11697 type Constraint = ();
11698
11699 fn validate(
11700 _: ::fidl_next::Slot<'_, Self>,
11701 _: Self::Constraint,
11702 ) -> Result<(), ::fidl_next::ValidationError> {
11703 Ok(())
11704 }
11705 }
11706
11707 unsafe impl ::fidl_next::Wire for MultipleNullableHandles {
11708 type Narrowed<'de> = MultipleNullableHandles;
11709
11710 #[inline]
11711 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11712 ::fidl_next::munge! {
11713 let Self {
11714 data0,
11715 handle0,
11716 data1,
11717 handle1,
11718 handle2,
11719 data2,
11720
11721 } = &mut *out_;
11722 }
11723
11724 ::fidl_next::Wire::zero_padding(data0);
11725
11726 ::fidl_next::Wire::zero_padding(handle0);
11727
11728 ::fidl_next::Wire::zero_padding(data1);
11729
11730 ::fidl_next::Wire::zero_padding(handle1);
11731
11732 ::fidl_next::Wire::zero_padding(handle2);
11733
11734 ::fidl_next::Wire::zero_padding(data2);
11735 }
11736 }
11737
11738 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNullableHandles
11739 where
11740 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11741 ___D: ::fidl_next::fuchsia::HandleDecoder,
11742 {
11743 fn decode(
11744 slot_: ::fidl_next::Slot<'_, Self>,
11745 decoder_: &mut ___D,
11746 _: (),
11747 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11748 ::fidl_next::munge! {
11749 let Self {
11750 mut data0,
11751 mut handle0,
11752 mut data1,
11753 mut handle1,
11754 mut handle2,
11755 mut data2,
11756
11757 } = slot_;
11758 }
11759
11760 let _field = data0.as_mut();
11761
11762 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
11763
11764 let _field = handle0.as_mut();
11765
11766 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
11767
11768 let _field = data1.as_mut();
11769
11770 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
11771
11772 let _field = handle1.as_mut();
11773
11774 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
11775
11776 let _field = handle2.as_mut();
11777
11778 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
11779
11780 let _field = data2.as_mut();
11781
11782 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
11783
11784 Ok(())
11785 }
11786 }
11787
11788 impl ::fidl_next::IntoNatural for MultipleNullableHandles {
11789 type Natural = crate::natural::MultipleNullableHandles;
11790 }
11791
11792 #[derive(Debug)]
11794 #[repr(C)]
11795 pub struct NonnullableHandle {
11796 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
11797 }
11798
11799 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandle>(), 4);
11800 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandle>(), 4);
11801
11802 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandle, h), 0);
11803
11804 impl ::fidl_next::Constrained for NonnullableHandle {
11805 type Constraint = ();
11806
11807 fn validate(
11808 _: ::fidl_next::Slot<'_, Self>,
11809 _: Self::Constraint,
11810 ) -> Result<(), ::fidl_next::ValidationError> {
11811 Ok(())
11812 }
11813 }
11814
11815 unsafe impl ::fidl_next::Wire for NonnullableHandle {
11816 type Narrowed<'de> = NonnullableHandle;
11817
11818 #[inline]
11819 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11820 ::fidl_next::munge! {
11821 let Self {
11822 h,
11823
11824 } = &mut *out_;
11825 }
11826
11827 ::fidl_next::Wire::zero_padding(h);
11828 }
11829 }
11830
11831 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandle
11832 where
11833 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11834 ___D: ::fidl_next::fuchsia::HandleDecoder,
11835 {
11836 fn decode(
11837 slot_: ::fidl_next::Slot<'_, Self>,
11838 decoder_: &mut ___D,
11839 _: (),
11840 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11841 ::fidl_next::munge! {
11842 let Self {
11843 mut h,
11844
11845 } = slot_;
11846 }
11847
11848 let _field = h.as_mut();
11849
11850 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
11851
11852 Ok(())
11853 }
11854 }
11855
11856 impl ::fidl_next::IntoNatural for NonnullableHandle {
11857 type Natural = crate::natural::NonnullableHandle;
11858 }
11859
11860 #[derive(Debug)]
11862 #[repr(C)]
11863 pub struct NonnullableHandleArray {
11864 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
11865 }
11866
11867 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandleArray>(), 16);
11868 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandleArray>(), 4);
11869
11870 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandleArray, handles), 0);
11871
11872 impl ::fidl_next::Constrained for NonnullableHandleArray {
11873 type Constraint = ();
11874
11875 fn validate(
11876 _: ::fidl_next::Slot<'_, Self>,
11877 _: Self::Constraint,
11878 ) -> Result<(), ::fidl_next::ValidationError> {
11879 Ok(())
11880 }
11881 }
11882
11883 unsafe impl ::fidl_next::Wire for NonnullableHandleArray {
11884 type Narrowed<'de> = NonnullableHandleArray;
11885
11886 #[inline]
11887 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11888 ::fidl_next::munge! {
11889 let Self {
11890 handles,
11891
11892 } = &mut *out_;
11893 }
11894
11895 ::fidl_next::Wire::zero_padding(handles);
11896 }
11897 }
11898
11899 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandleArray
11900 where
11901 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11902 ___D: ::fidl_next::fuchsia::HandleDecoder,
11903 {
11904 fn decode(
11905 slot_: ::fidl_next::Slot<'_, Self>,
11906 decoder_: &mut ___D,
11907 _: (),
11908 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11909 ::fidl_next::munge! {
11910 let Self {
11911 mut handles,
11912
11913 } = slot_;
11914 }
11915
11916 let _field = handles.as_mut();
11917
11918 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
11919
11920 Ok(())
11921 }
11922 }
11923
11924 impl ::fidl_next::IntoNatural for NonnullableHandleArray {
11925 type Natural = crate::natural::NonnullableHandleArray;
11926 }
11927
11928 #[derive(Debug)]
11930 #[repr(C)]
11931 pub struct NullableHandle {
11932 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11933 }
11934
11935 static_assertions::const_assert_eq!(std::mem::size_of::<NullableHandle>(), 4);
11936 static_assertions::const_assert_eq!(std::mem::align_of::<NullableHandle>(), 4);
11937
11938 static_assertions::const_assert_eq!(std::mem::offset_of!(NullableHandle, h), 0);
11939
11940 impl ::fidl_next::Constrained for NullableHandle {
11941 type Constraint = ();
11942
11943 fn validate(
11944 _: ::fidl_next::Slot<'_, Self>,
11945 _: Self::Constraint,
11946 ) -> Result<(), ::fidl_next::ValidationError> {
11947 Ok(())
11948 }
11949 }
11950
11951 unsafe impl ::fidl_next::Wire for NullableHandle {
11952 type Narrowed<'de> = NullableHandle;
11953
11954 #[inline]
11955 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11956 ::fidl_next::munge! {
11957 let Self {
11958 h,
11959
11960 } = &mut *out_;
11961 }
11962
11963 ::fidl_next::Wire::zero_padding(h);
11964 }
11965 }
11966
11967 unsafe impl<___D> ::fidl_next::Decode<___D> for NullableHandle
11968 where
11969 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11970 ___D: ::fidl_next::fuchsia::HandleDecoder,
11971 {
11972 fn decode(
11973 slot_: ::fidl_next::Slot<'_, Self>,
11974 decoder_: &mut ___D,
11975 _: (),
11976 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11977 ::fidl_next::munge! {
11978 let Self {
11979 mut h,
11980
11981 } = slot_;
11982 }
11983
11984 let _field = h.as_mut();
11985
11986 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
11987
11988 Ok(())
11989 }
11990 }
11991
11992 impl ::fidl_next::IntoNatural for NullableHandle {
11993 type Natural = crate::natural::NullableHandle;
11994 }
11995
11996 #[derive(Debug)]
11998 #[repr(C)]
11999 pub struct OutOfLineArrayOfNonnullableHandles<'de> {
12000 pub handles: ::fidl_next::wire::Box<'de, crate::wire::NonnullableHandleArray>,
12001 }
12002
12003 static_assertions::const_assert_eq!(
12004 std::mem::size_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12005 8
12006 );
12007 static_assertions::const_assert_eq!(
12008 std::mem::align_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12009 8
12010 );
12011
12012 static_assertions::const_assert_eq!(
12013 std::mem::offset_of!(OutOfLineArrayOfNonnullableHandles<'_>, handles),
12014 0
12015 );
12016
12017 impl ::fidl_next::Constrained for OutOfLineArrayOfNonnullableHandles<'_> {
12018 type Constraint = ();
12019
12020 fn validate(
12021 _: ::fidl_next::Slot<'_, Self>,
12022 _: Self::Constraint,
12023 ) -> Result<(), ::fidl_next::ValidationError> {
12024 Ok(())
12025 }
12026 }
12027
12028 unsafe impl ::fidl_next::Wire for OutOfLineArrayOfNonnullableHandles<'static> {
12029 type Narrowed<'de> = OutOfLineArrayOfNonnullableHandles<'de>;
12030
12031 #[inline]
12032 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12033 ::fidl_next::munge! {
12034 let Self {
12035 handles,
12036
12037 } = &mut *out_;
12038 }
12039
12040 ::fidl_next::Wire::zero_padding(handles);
12041 }
12042 }
12043
12044 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OutOfLineArrayOfNonnullableHandles<'de>
12045 where
12046 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12047 ___D: ::fidl_next::Decoder<'de>,
12048 ___D: ::fidl_next::fuchsia::HandleDecoder,
12049 {
12050 fn decode(
12051 slot_: ::fidl_next::Slot<'_, Self>,
12052 decoder_: &mut ___D,
12053 _: (),
12054 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12055 ::fidl_next::munge! {
12056 let Self {
12057 mut handles,
12058
12059 } = slot_;
12060 }
12061
12062 let _field = handles.as_mut();
12063
12064 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
12065
12066 Ok(())
12067 }
12068 }
12069
12070 impl<'de> ::fidl_next::IntoNatural for OutOfLineArrayOfNonnullableHandles<'de> {
12071 type Natural = crate::natural::OutOfLineArrayOfNonnullableHandles;
12072 }
12073
12074 #[repr(transparent)]
12076 pub struct SampleResourceXUnion<'de> {
12077 pub(crate) raw: ::fidl_next::wire::Union,
12078 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12079 }
12080
12081 impl<'de> Drop for SampleResourceXUnion<'de> {
12082 fn drop(&mut self) {
12083 match self.raw.ordinal() {
12084 1 => {
12085 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12086 }
12087
12088 2 => {
12089 let _ =
12090 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12091 }
12092
12093 3 => {
12094 let _ =
12095 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12096 }
12097
12098 _ => (),
12099 }
12100 }
12101 }
12102
12103 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
12104 type Constraint = ();
12105
12106 fn validate(
12107 _: ::fidl_next::Slot<'_, Self>,
12108 _: Self::Constraint,
12109 ) -> Result<(), ::fidl_next::ValidationError> {
12110 Ok(())
12111 }
12112 }
12113
12114 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
12115 type Narrowed<'de> = SampleResourceXUnion<'de>;
12116
12117 #[inline]
12118 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12119 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12120 ::fidl_next::wire::Union::zero_padding(raw);
12121 }
12122 }
12123
12124 pub mod sample_resource_x_union {
12125 pub enum Ref<'de> {
12126 U(&'de ::fidl_next::wire::Uint32),
12127
12128 Su(&'de crate::wire::SimpleUnion<'de>),
12129
12130 St(&'de crate::wire::SimpleTable<'de>),
12131
12132 UnknownOrdinal_(u64),
12133 }
12134 }
12135
12136 impl<'de> SampleResourceXUnion<'de> {
12137 pub fn as_ref(&self) -> crate::wire::sample_resource_x_union::Ref<'_> {
12138 match self.raw.ordinal() {
12139 1 => crate::wire::sample_resource_x_union::Ref::U(unsafe {
12140 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12141 }),
12142
12143 2 => crate::wire::sample_resource_x_union::Ref::Su(unsafe {
12144 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12145 }),
12146
12147 3 => crate::wire::sample_resource_x_union::Ref::St(unsafe {
12148 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12149 }),
12150
12151 unknown => crate::wire::sample_resource_x_union::Ref::UnknownOrdinal_(unknown),
12152 }
12153 }
12154 }
12155
12156 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
12157 where
12158 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12159 ___D: ::fidl_next::Decoder<'de>,
12160 ___D: ::fidl_next::fuchsia::HandleDecoder,
12161 {
12162 fn decode(
12163 mut slot: ::fidl_next::Slot<'_, Self>,
12164 decoder: &mut ___D,
12165 _: (),
12166 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12167 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12168 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12169 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12170 raw,
12171 decoder,
12172 (),
12173 )?,
12174
12175 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12176 raw,
12177 decoder,
12178 (),
12179 )?,
12180
12181 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12182 raw,
12183 decoder,
12184 (),
12185 )?,
12186
12187 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
12188 }
12189
12190 Ok(())
12191 }
12192 }
12193
12194 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
12195 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12196 match self.raw.ordinal() {
12197 1 => unsafe {
12198 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12199 },
12200 2 => unsafe {
12201 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12202 },
12203 3 => unsafe {
12204 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12205 },
12206 _ => unsafe { ::core::hint::unreachable_unchecked() },
12207 }
12208 }
12209 }
12210
12211 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
12212 type Natural = crate::natural::SampleResourceXUnion;
12213 }
12214
12215 #[repr(transparent)]
12217 pub struct SampleStrictResourceXUnion<'de> {
12218 pub(crate) raw: ::fidl_next::wire::Union,
12219 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12220 }
12221
12222 impl<'de> Drop for SampleStrictResourceXUnion<'de> {
12223 fn drop(&mut self) {
12224 match self.raw.ordinal() {
12225 1 => {
12226 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12227 }
12228
12229 2 => {
12230 let _ =
12231 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12232 }
12233
12234 3 => {
12235 let _ =
12236 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12237 }
12238
12239 _ => unsafe { ::core::hint::unreachable_unchecked() },
12240 }
12241 }
12242 }
12243
12244 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
12245 type Constraint = ();
12246
12247 fn validate(
12248 _: ::fidl_next::Slot<'_, Self>,
12249 _: Self::Constraint,
12250 ) -> Result<(), ::fidl_next::ValidationError> {
12251 Ok(())
12252 }
12253 }
12254
12255 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
12256 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
12257
12258 #[inline]
12259 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12260 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12261 ::fidl_next::wire::Union::zero_padding(raw);
12262 }
12263 }
12264
12265 pub mod sample_strict_resource_x_union {
12266 pub enum Ref<'de> {
12267 U(&'de ::fidl_next::wire::Uint32),
12268
12269 Su(&'de crate::wire::SimpleUnion<'de>),
12270
12271 St(&'de crate::wire::SimpleTable<'de>),
12272 }
12273 }
12274
12275 impl<'de> SampleStrictResourceXUnion<'de> {
12276 pub fn as_ref(&self) -> crate::wire::sample_strict_resource_x_union::Ref<'_> {
12277 match self.raw.ordinal() {
12278 1 => crate::wire::sample_strict_resource_x_union::Ref::U(unsafe {
12279 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12280 }),
12281
12282 2 => crate::wire::sample_strict_resource_x_union::Ref::Su(unsafe {
12283 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12284 }),
12285
12286 3 => crate::wire::sample_strict_resource_x_union::Ref::St(unsafe {
12287 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12288 }),
12289
12290 _ => unsafe { ::core::hint::unreachable_unchecked() },
12291 }
12292 }
12293 }
12294
12295 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
12296 where
12297 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12298 ___D: ::fidl_next::Decoder<'de>,
12299 ___D: ::fidl_next::fuchsia::HandleDecoder,
12300 {
12301 fn decode(
12302 mut slot: ::fidl_next::Slot<'_, Self>,
12303 decoder: &mut ___D,
12304 _: (),
12305 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12306 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12307 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12308 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12309 raw,
12310 decoder,
12311 (),
12312 )?,
12313
12314 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12315 raw,
12316 decoder,
12317 (),
12318 )?,
12319
12320 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12321 raw,
12322 decoder,
12323 (),
12324 )?,
12325
12326 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12327 }
12328
12329 Ok(())
12330 }
12331 }
12332
12333 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
12334 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12335 match self.raw.ordinal() {
12336 1 => unsafe {
12337 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12338 },
12339 2 => unsafe {
12340 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12341 },
12342 3 => unsafe {
12343 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12344 },
12345 _ => unsafe { ::core::hint::unreachable_unchecked() },
12346 }
12347 }
12348 }
12349
12350 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
12351 type Natural = crate::natural::SampleStrictResourceXUnion;
12352 }
12353
12354 #[repr(transparent)]
12356 pub struct UnionWithVector<'de> {
12357 pub(crate) raw: ::fidl_next::wire::Union,
12358 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12359 }
12360
12361 impl<'de> Drop for UnionWithVector<'de> {
12362 fn drop(&mut self) {
12363 match self.raw.ordinal() {
12364 1 => {
12365 let _ = unsafe { self.raw.get().read_unchecked::<u8>() };
12366 }
12367
12368 2 => {
12369 let _ = unsafe {
12370 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12371 };
12372 }
12373
12374 3 => {
12375 let _ = unsafe {
12376 self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
12377 };
12378 }
12379
12380 4 => {
12381 let _ = unsafe {
12382 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
12383 };
12384 }
12385
12386 5 => {
12387 let _ = unsafe {
12388 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
12389 };
12390 }
12391
12392 6 => {
12393 let _ = unsafe {
12394 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<
12395 'de,
12396 ::fidl_next::wire::fuchsia::NullableHandle,
12397 >>()
12398 };
12399 }
12400
12401 7 => {
12402 let _ = unsafe {
12403 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12404 };
12405 }
12406
12407 8 => {
12408 let _ = unsafe {
12409 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12410 };
12411 }
12412
12413 9 => {
12414 let _ = unsafe {
12415 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
12416 };
12417 }
12418
12419 _ => unsafe { ::core::hint::unreachable_unchecked() },
12420 }
12421 }
12422 }
12423
12424 impl ::fidl_next::Constrained for UnionWithVector<'_> {
12425 type Constraint = ();
12426
12427 fn validate(
12428 _: ::fidl_next::Slot<'_, Self>,
12429 _: Self::Constraint,
12430 ) -> Result<(), ::fidl_next::ValidationError> {
12431 Ok(())
12432 }
12433 }
12434
12435 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
12436 type Narrowed<'de> = UnionWithVector<'de>;
12437
12438 #[inline]
12439 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12440 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12441 ::fidl_next::wire::Union::zero_padding(raw);
12442 }
12443 }
12444
12445 pub mod union_with_vector {
12446 pub enum Ref<'de> {
12447 Unused(&'de u8),
12448
12449 VectorOfUint8(&'de ::fidl_next::wire::Vector<'de, u8>),
12450
12451 S(&'de ::fidl_next::wire::String<'de>),
12452
12453 VectorS3A1(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>),
12454
12455 VectorS3A2(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>),
12456
12457 Handles(
12458 &'de ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
12459 ),
12460
12461 ArrayS3A1(&'de [crate::wire::StructSize3Align1; 2]),
12462
12463 ArrayS3A2(&'de [crate::wire::StructSize3Align2; 2]),
12464
12465 VectorUnion(&'de ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>),
12466 }
12467 }
12468
12469 impl<'de> UnionWithVector<'de> {
12470 pub fn as_ref(&self) -> crate::wire::union_with_vector::Ref<'_> {
12471 match self.raw.ordinal() {
12472 1 => crate::wire::union_with_vector::Ref::Unused(unsafe {
12473 self.raw.get().deref_unchecked::<u8>()
12474 }),
12475
12476 2 => crate::wire::union_with_vector::Ref::VectorOfUint8(unsafe {
12477 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
12478 }),
12479
12480 3 => crate::wire::union_with_vector::Ref::S(unsafe {
12481 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
12482 }),
12483
12484 4 => crate::wire::union_with_vector::Ref::VectorS3A1(unsafe {
12485 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>>()
12486 }),
12487
12488 5 => crate::wire::union_with_vector::Ref::VectorS3A2(unsafe {
12489 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>>()
12490 }),
12491
12492 6 => crate::wire::union_with_vector::Ref::Handles(unsafe {
12493 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>>()
12494 }),
12495
12496 7 => crate::wire::union_with_vector::Ref::ArrayS3A1(unsafe {
12497 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12498 }),
12499
12500 8 => crate::wire::union_with_vector::Ref::ArrayS3A2(unsafe {
12501 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12502 }),
12503
12504 9 => crate::wire::union_with_vector::Ref::VectorUnion(unsafe {
12505 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>>()
12506 }),
12507
12508 _ => unsafe { ::core::hint::unreachable_unchecked() },
12509 }
12510 }
12511 }
12512
12513 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
12514 where
12515 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12516 ___D: ::fidl_next::Decoder<'de>,
12517 ___D: ::fidl_next::fuchsia::HandleDecoder,
12518 {
12519 fn decode(
12520 mut slot: ::fidl_next::Slot<'_, Self>,
12521 decoder: &mut ___D,
12522 _: (),
12523 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12524 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12525 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12526 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
12527
12528 2 => {
12529 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
12530 raw,
12531 decoder,
12532 (4294967295, ()),
12533 )?
12534 }
12535
12536 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
12537 raw, decoder, 4294967295,
12538 )?,
12539
12540 4 => ::fidl_next::wire::Union::decode_as::<
12541 ___D,
12542 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
12543 >(raw, decoder, (4294967295, ()))?,
12544
12545 5 => ::fidl_next::wire::Union::decode_as::<
12546 ___D,
12547 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
12548 >(raw, decoder, (4294967295, ()))?,
12549
12550 6 => ::fidl_next::wire::Union::decode_as::<
12551 ___D,
12552 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
12553 >(raw, decoder, (4294967295, ()))?,
12554
12555 7 => ::fidl_next::wire::Union::decode_as::<
12556 ___D,
12557 [crate::wire::StructSize3Align1; 2],
12558 >(raw, decoder, ())?,
12559
12560 8 => ::fidl_next::wire::Union::decode_as::<
12561 ___D,
12562 [crate::wire::StructSize3Align2; 2],
12563 >(raw, decoder, ())?,
12564
12565 9 => ::fidl_next::wire::Union::decode_as::<
12566 ___D,
12567 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
12568 >(raw, decoder, (4294967295, ()))?,
12569
12570 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12571 }
12572
12573 Ok(())
12574 }
12575 }
12576
12577 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
12578 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12579 match self.raw.ordinal() {
12580 1 => unsafe { self.raw.get().deref_unchecked::<u8>().fmt(f) },
12581 2 => unsafe {
12582 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
12583 },
12584 3 => unsafe {
12585 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
12586 },
12587 4 => unsafe {
12588 self.raw.get().deref_unchecked::<
12589 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>
12590 >().fmt(f)
12591 },
12592 5 => unsafe {
12593 self.raw.get().deref_unchecked::<
12594 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>
12595 >().fmt(f)
12596 },
12597 6 => unsafe {
12598 self.raw.get().deref_unchecked::<
12599 ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>
12600 >().fmt(f)
12601 },
12602 7 => unsafe {
12603 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>().fmt(f)
12604 },
12605 8 => unsafe {
12606 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>().fmt(f)
12607 },
12608 9 => unsafe {
12609 self.raw.get().deref_unchecked::<
12610 ::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>
12611 >().fmt(f)
12612 },
12613 _ => unsafe { ::core::hint::unreachable_unchecked() },
12614 }
12615 }
12616 }
12617
12618 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
12619 type Natural = crate::natural::UnionWithVector;
12620 }
12621
12622 #[derive(Debug)]
12624 #[repr(C)]
12625 pub struct Sandwich6<'de> {
12626 pub before: ::fidl_next::wire::Uint32,
12627
12628 pub the_union: crate::wire::UnionWithVector<'de>,
12629
12630 pub after: ::fidl_next::wire::Uint32,
12631 }
12632
12633 static_assertions::const_assert_eq!(std::mem::size_of::<Sandwich6<'_>>(), 32);
12634 static_assertions::const_assert_eq!(std::mem::align_of::<Sandwich6<'_>>(), 8);
12635
12636 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, before), 0);
12637
12638 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, the_union), 8);
12639
12640 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, after), 24);
12641
12642 impl ::fidl_next::Constrained for Sandwich6<'_> {
12643 type Constraint = ();
12644
12645 fn validate(
12646 _: ::fidl_next::Slot<'_, Self>,
12647 _: Self::Constraint,
12648 ) -> Result<(), ::fidl_next::ValidationError> {
12649 Ok(())
12650 }
12651 }
12652
12653 unsafe impl ::fidl_next::Wire for Sandwich6<'static> {
12654 type Narrowed<'de> = Sandwich6<'de>;
12655
12656 #[inline]
12657 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12658 ::fidl_next::munge! {
12659 let Self {
12660 before,
12661 the_union,
12662 after,
12663
12664 } = &mut *out_;
12665 }
12666
12667 ::fidl_next::Wire::zero_padding(before);
12668
12669 ::fidl_next::Wire::zero_padding(the_union);
12670
12671 ::fidl_next::Wire::zero_padding(after);
12672
12673 unsafe {
12674 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
12675 }
12676
12677 unsafe {
12678 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12679 }
12680 }
12681 }
12682
12683 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Sandwich6<'de>
12684 where
12685 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12686 ___D: ::fidl_next::Decoder<'de>,
12687 ___D: ::fidl_next::fuchsia::HandleDecoder,
12688 {
12689 fn decode(
12690 slot_: ::fidl_next::Slot<'_, Self>,
12691 decoder_: &mut ___D,
12692 _: (),
12693 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12694 if slot_.as_bytes()[28..32] != [0u8; 4] {
12695 return Err(::fidl_next::DecodeError::InvalidPadding);
12696 }
12697
12698 if slot_.as_bytes()[4..8] != [0u8; 4] {
12699 return Err(::fidl_next::DecodeError::InvalidPadding);
12700 }
12701
12702 ::fidl_next::munge! {
12703 let Self {
12704 mut before,
12705 mut the_union,
12706 mut after,
12707
12708 } = slot_;
12709 }
12710
12711 let _field = before.as_mut();
12712
12713 ::fidl_next::Decode::decode(before.as_mut(), decoder_, ())?;
12714
12715 let _field = the_union.as_mut();
12716
12717 ::fidl_next::Decode::decode(the_union.as_mut(), decoder_, ())?;
12718
12719 let _field = after.as_mut();
12720
12721 ::fidl_next::Decode::decode(after.as_mut(), decoder_, ())?;
12722
12723 Ok(())
12724 }
12725 }
12726
12727 impl<'de> ::fidl_next::IntoNatural for Sandwich6<'de> {
12728 type Natural = crate::natural::Sandwich6;
12729 }
12730
12731 #[derive(Debug)]
12733 #[repr(C)]
12734 pub struct ShortStringThenHandle<'de> {
12735 pub s: ::fidl_next::wire::String<'de>,
12736
12737 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
12738 }
12739
12740 static_assertions::const_assert_eq!(std::mem::size_of::<ShortStringThenHandle<'_>>(), 24);
12741 static_assertions::const_assert_eq!(std::mem::align_of::<ShortStringThenHandle<'_>>(), 8);
12742
12743 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, s), 0);
12744
12745 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, h), 16);
12746
12747 impl ::fidl_next::Constrained for ShortStringThenHandle<'_> {
12748 type Constraint = ();
12749
12750 fn validate(
12751 _: ::fidl_next::Slot<'_, Self>,
12752 _: Self::Constraint,
12753 ) -> Result<(), ::fidl_next::ValidationError> {
12754 Ok(())
12755 }
12756 }
12757
12758 unsafe impl ::fidl_next::Wire for ShortStringThenHandle<'static> {
12759 type Narrowed<'de> = ShortStringThenHandle<'de>;
12760
12761 #[inline]
12762 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12763 ::fidl_next::munge! {
12764 let Self {
12765 s,
12766 h,
12767
12768 } = &mut *out_;
12769 }
12770
12771 ::fidl_next::Wire::zero_padding(s);
12772
12773 ::fidl_next::Wire::zero_padding(h);
12774
12775 unsafe {
12776 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
12777 }
12778 }
12779 }
12780
12781 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ShortStringThenHandle<'de>
12782 where
12783 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12784 ___D: ::fidl_next::Decoder<'de>,
12785 ___D: ::fidl_next::fuchsia::HandleDecoder,
12786 {
12787 fn decode(
12788 slot_: ::fidl_next::Slot<'_, Self>,
12789 decoder_: &mut ___D,
12790 _: (),
12791 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12792 if slot_.as_bytes()[20..24] != [0u8; 4] {
12793 return Err(::fidl_next::DecodeError::InvalidPadding);
12794 }
12795
12796 ::fidl_next::munge! {
12797 let Self {
12798 mut s,
12799 mut h,
12800
12801 } = slot_;
12802 }
12803
12804 let _field = s.as_mut();
12805 ::fidl_next::Constrained::validate(_field, 1)?;
12806 ::fidl_next::Decode::decode(s.as_mut(), decoder_, 1)?;
12807
12808 let s = unsafe { s.deref_unchecked() };
12809
12810 if s.len() > 1 {
12811 return Err(::fidl_next::DecodeError::VectorTooLong {
12812 size: s.len() as u64,
12813 limit: 1,
12814 });
12815 }
12816
12817 let _field = h.as_mut();
12818
12819 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12820
12821 Ok(())
12822 }
12823 }
12824
12825 impl<'de> ::fidl_next::IntoNatural for ShortStringThenHandle<'de> {
12826 type Natural = crate::natural::ShortStringThenHandle;
12827 }
12828
12829 #[repr(C)]
12831 pub struct SimpleResourceTable<'de> {
12832 pub(crate) table: ::fidl_next::wire::Table<'de>,
12833 }
12834
12835 impl<'de> Drop for SimpleResourceTable<'de> {
12836 fn drop(&mut self) {
12837 let _ = self
12838 .table
12839 .get(1)
12840 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
12841
12842 let _ = self
12843 .table
12844 .get(5)
12845 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
12846 }
12847 }
12848
12849 impl ::fidl_next::Constrained for SimpleResourceTable<'_> {
12850 type Constraint = ();
12851
12852 fn validate(
12853 _: ::fidl_next::Slot<'_, Self>,
12854 _: Self::Constraint,
12855 ) -> Result<(), ::fidl_next::ValidationError> {
12856 Ok(())
12857 }
12858 }
12859
12860 unsafe impl ::fidl_next::Wire for SimpleResourceTable<'static> {
12861 type Narrowed<'de> = SimpleResourceTable<'de>;
12862
12863 #[inline]
12864 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12865 ::fidl_next::munge!(let Self { table } = out);
12866 ::fidl_next::wire::Table::zero_padding(table);
12867 }
12868 }
12869
12870 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SimpleResourceTable<'de>
12871 where
12872 ___D: ::fidl_next::Decoder<'de> + ?Sized,
12873 ___D: ::fidl_next::fuchsia::HandleDecoder,
12874 {
12875 fn decode(
12876 slot: ::fidl_next::Slot<'_, Self>,
12877 decoder: &mut ___D,
12878 _: (),
12879 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12880 ::fidl_next::munge!(let Self { table } = slot);
12881
12882 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12883 match ordinal {
12884 0 => unsafe { ::core::hint::unreachable_unchecked() },
12885
12886 1 => {
12887 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
12888 slot.as_mut(),
12889 decoder,
12890 (),
12891 )?;
12892
12893 Ok(())
12894 }
12895
12896 5 => {
12897 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
12898 slot.as_mut(),
12899 decoder,
12900 (),
12901 )?;
12902
12903 Ok(())
12904 }
12905
12906 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12907 }
12908 })
12909 }
12910 }
12911
12912 impl<'de> SimpleResourceTable<'de> {
12913 pub fn x(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
12914 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12915 }
12916
12917 pub fn y(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
12918 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
12919 }
12920 }
12921
12922 impl<'de> ::core::fmt::Debug for SimpleResourceTable<'de> {
12923 fn fmt(
12924 &self,
12925 f: &mut ::core::fmt::Formatter<'_>,
12926 ) -> ::core::result::Result<(), ::core::fmt::Error> {
12927 f.debug_struct("SimpleResourceTable")
12928 .field("x", &self.x())
12929 .field("y", &self.y())
12930 .finish()
12931 }
12932 }
12933
12934 impl<'de> ::fidl_next::IntoNatural for SimpleResourceTable<'de> {
12935 type Natural = crate::natural::SimpleResourceTable;
12936 }
12937
12938 #[derive(Debug)]
12940 #[repr(C)]
12941 pub struct SingleHandle {
12942 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
12943 }
12944
12945 static_assertions::const_assert_eq!(std::mem::size_of::<SingleHandle>(), 4);
12946 static_assertions::const_assert_eq!(std::mem::align_of::<SingleHandle>(), 4);
12947
12948 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleHandle, h), 0);
12949
12950 impl ::fidl_next::Constrained for SingleHandle {
12951 type Constraint = ();
12952
12953 fn validate(
12954 _: ::fidl_next::Slot<'_, Self>,
12955 _: Self::Constraint,
12956 ) -> Result<(), ::fidl_next::ValidationError> {
12957 Ok(())
12958 }
12959 }
12960
12961 unsafe impl ::fidl_next::Wire for SingleHandle {
12962 type Narrowed<'de> = SingleHandle;
12963
12964 #[inline]
12965 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12966 ::fidl_next::munge! {
12967 let Self {
12968 h,
12969
12970 } = &mut *out_;
12971 }
12972
12973 ::fidl_next::Wire::zero_padding(h);
12974 }
12975 }
12976
12977 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleHandle
12978 where
12979 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12980 ___D: ::fidl_next::fuchsia::HandleDecoder,
12981 {
12982 fn decode(
12983 slot_: ::fidl_next::Slot<'_, Self>,
12984 decoder_: &mut ___D,
12985 _: (),
12986 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12987 ::fidl_next::munge! {
12988 let Self {
12989 mut h,
12990
12991 } = slot_;
12992 }
12993
12994 let _field = h.as_mut();
12995
12996 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12997
12998 Ok(())
12999 }
13000 }
13001
13002 impl ::fidl_next::IntoNatural for SingleHandle {
13003 type Natural = crate::natural::SingleHandle;
13004 }
13005
13006 #[derive(Debug)]
13008 #[repr(C)]
13009 pub struct SingleOptionalHandle {
13010 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
13011 }
13012
13013 static_assertions::const_assert_eq!(std::mem::size_of::<SingleOptionalHandle>(), 4);
13014 static_assertions::const_assert_eq!(std::mem::align_of::<SingleOptionalHandle>(), 4);
13015
13016 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleOptionalHandle, h), 0);
13017
13018 impl ::fidl_next::Constrained for SingleOptionalHandle {
13019 type Constraint = ();
13020
13021 fn validate(
13022 _: ::fidl_next::Slot<'_, Self>,
13023 _: Self::Constraint,
13024 ) -> Result<(), ::fidl_next::ValidationError> {
13025 Ok(())
13026 }
13027 }
13028
13029 unsafe impl ::fidl_next::Wire for SingleOptionalHandle {
13030 type Narrowed<'de> = SingleOptionalHandle;
13031
13032 #[inline]
13033 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13034 ::fidl_next::munge! {
13035 let Self {
13036 h,
13037
13038 } = &mut *out_;
13039 }
13040
13041 ::fidl_next::Wire::zero_padding(h);
13042 }
13043 }
13044
13045 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleOptionalHandle
13046 where
13047 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13048 ___D: ::fidl_next::fuchsia::HandleDecoder,
13049 {
13050 fn decode(
13051 slot_: ::fidl_next::Slot<'_, Self>,
13052 decoder_: &mut ___D,
13053 _: (),
13054 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13055 ::fidl_next::munge! {
13056 let Self {
13057 mut h,
13058
13059 } = slot_;
13060 }
13061
13062 let _field = h.as_mut();
13063
13064 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13065
13066 Ok(())
13067 }
13068 }
13069
13070 impl ::fidl_next::IntoNatural for SingleOptionalHandle {
13071 type Natural = crate::natural::SingleOptionalHandle;
13072 }
13073
13074 #[derive(Debug)]
13076 #[repr(C)]
13077 pub struct StructOfEndpoints {
13078 pub client_end:
13079 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13080
13081 pub optional_client_end:
13082 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13083
13084 pub server_end:
13085 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13086
13087 pub optional_server_end:
13088 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13089 }
13090
13091 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfEndpoints>(), 16);
13092 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfEndpoints>(), 4);
13093
13094 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, client_end), 0);
13095
13096 static_assertions::const_assert_eq!(
13097 std::mem::offset_of!(StructOfEndpoints, optional_client_end),
13098 4
13099 );
13100
13101 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, server_end), 8);
13102
13103 static_assertions::const_assert_eq!(
13104 std::mem::offset_of!(StructOfEndpoints, optional_server_end),
13105 12
13106 );
13107
13108 impl ::fidl_next::Constrained for StructOfEndpoints {
13109 type Constraint = ();
13110
13111 fn validate(
13112 _: ::fidl_next::Slot<'_, Self>,
13113 _: Self::Constraint,
13114 ) -> Result<(), ::fidl_next::ValidationError> {
13115 Ok(())
13116 }
13117 }
13118
13119 unsafe impl ::fidl_next::Wire for StructOfEndpoints {
13120 type Narrowed<'de> = StructOfEndpoints;
13121
13122 #[inline]
13123 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13124 ::fidl_next::munge! {
13125 let Self {
13126 client_end,
13127 optional_client_end,
13128 server_end,
13129 optional_server_end,
13130
13131 } = &mut *out_;
13132 }
13133
13134 ::fidl_next::Wire::zero_padding(client_end);
13135
13136 ::fidl_next::Wire::zero_padding(optional_client_end);
13137
13138 ::fidl_next::Wire::zero_padding(server_end);
13139
13140 ::fidl_next::Wire::zero_padding(optional_server_end);
13141 }
13142 }
13143
13144 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfEndpoints
13145 where
13146 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13147 ___D: ::fidl_next::fuchsia::HandleDecoder,
13148 {
13149 fn decode(
13150 slot_: ::fidl_next::Slot<'_, Self>,
13151 decoder_: &mut ___D,
13152 _: (),
13153 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13154 ::fidl_next::munge! {
13155 let Self {
13156 mut client_end,
13157 mut optional_client_end,
13158 mut server_end,
13159 mut optional_server_end,
13160
13161 } = slot_;
13162 }
13163
13164 let _field = client_end.as_mut();
13165
13166 ::fidl_next::Decode::decode(client_end.as_mut(), decoder_, ())?;
13167
13168 let _field = optional_client_end.as_mut();
13169
13170 ::fidl_next::Decode::decode(optional_client_end.as_mut(), decoder_, ())?;
13171
13172 let _field = server_end.as_mut();
13173
13174 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
13175
13176 let _field = optional_server_end.as_mut();
13177
13178 ::fidl_next::Decode::decode(optional_server_end.as_mut(), decoder_, ())?;
13179
13180 Ok(())
13181 }
13182 }
13183
13184 impl ::fidl_next::IntoNatural for StructOfEndpoints {
13185 type Natural = crate::natural::StructOfEndpoints;
13186 }
13187
13188 #[derive(Debug)]
13190 #[repr(C)]
13191 pub struct StructOfOptionalUnionOfHandle {
13192 pub u: crate::wire_optional::UnionOfHandle,
13193 }
13194
13195 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfOptionalUnionOfHandle>(), 16);
13196 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfOptionalUnionOfHandle>(), 8);
13197
13198 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfOptionalUnionOfHandle, u), 0);
13199
13200 impl ::fidl_next::Constrained for StructOfOptionalUnionOfHandle {
13201 type Constraint = ();
13202
13203 fn validate(
13204 _: ::fidl_next::Slot<'_, Self>,
13205 _: Self::Constraint,
13206 ) -> Result<(), ::fidl_next::ValidationError> {
13207 Ok(())
13208 }
13209 }
13210
13211 unsafe impl ::fidl_next::Wire for StructOfOptionalUnionOfHandle {
13212 type Narrowed<'de> = StructOfOptionalUnionOfHandle;
13213
13214 #[inline]
13215 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13216 ::fidl_next::munge! {
13217 let Self {
13218 u,
13219
13220 } = &mut *out_;
13221 }
13222
13223 ::fidl_next::Wire::zero_padding(u);
13224 }
13225 }
13226
13227 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfOptionalUnionOfHandle
13228 where
13229 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13230 ___D: ::fidl_next::fuchsia::HandleDecoder,
13231 {
13232 fn decode(
13233 slot_: ::fidl_next::Slot<'_, Self>,
13234 decoder_: &mut ___D,
13235 _: (),
13236 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13237 ::fidl_next::munge! {
13238 let Self {
13239 mut u,
13240
13241 } = slot_;
13242 }
13243
13244 let _field = u.as_mut();
13245
13246 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
13247
13248 Ok(())
13249 }
13250 }
13251
13252 impl ::fidl_next::IntoNatural for StructOfOptionalUnionOfHandle {
13253 type Natural = crate::natural::StructOfOptionalUnionOfHandle;
13254 }
13255
13256 #[derive(Debug)]
13258 #[repr(C)]
13259 pub struct StructOfSimpleResourceTable<'de> {
13260 pub table: crate::wire::SimpleResourceTable<'de>,
13261 }
13262
13263 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfSimpleResourceTable<'_>>(), 16);
13264 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfSimpleResourceTable<'_>>(), 8);
13265
13266 static_assertions::const_assert_eq!(
13267 std::mem::offset_of!(StructOfSimpleResourceTable<'_>, table),
13268 0
13269 );
13270
13271 impl ::fidl_next::Constrained for StructOfSimpleResourceTable<'_> {
13272 type Constraint = ();
13273
13274 fn validate(
13275 _: ::fidl_next::Slot<'_, Self>,
13276 _: Self::Constraint,
13277 ) -> Result<(), ::fidl_next::ValidationError> {
13278 Ok(())
13279 }
13280 }
13281
13282 unsafe impl ::fidl_next::Wire for StructOfSimpleResourceTable<'static> {
13283 type Narrowed<'de> = StructOfSimpleResourceTable<'de>;
13284
13285 #[inline]
13286 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13287 ::fidl_next::munge! {
13288 let Self {
13289 table,
13290
13291 } = &mut *out_;
13292 }
13293
13294 ::fidl_next::Wire::zero_padding(table);
13295 }
13296 }
13297
13298 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StructOfSimpleResourceTable<'de>
13299 where
13300 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13301 ___D: ::fidl_next::Decoder<'de>,
13302 ___D: ::fidl_next::fuchsia::HandleDecoder,
13303 {
13304 fn decode(
13305 slot_: ::fidl_next::Slot<'_, Self>,
13306 decoder_: &mut ___D,
13307 _: (),
13308 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13309 ::fidl_next::munge! {
13310 let Self {
13311 mut table,
13312
13313 } = slot_;
13314 }
13315
13316 let _field = table.as_mut();
13317
13318 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
13319
13320 Ok(())
13321 }
13322 }
13323
13324 impl<'de> ::fidl_next::IntoNatural for StructOfSimpleResourceTable<'de> {
13325 type Natural = crate::natural::StructOfSimpleResourceTable;
13326 }
13327
13328 #[repr(C)]
13330 pub struct TableFieldInlinedHandle<'de> {
13331 pub(crate) table: ::fidl_next::wire::Table<'de>,
13332 }
13333
13334 impl<'de> Drop for TableFieldInlinedHandle<'de> {
13335 fn drop(&mut self) {
13336 let _ = self.table.get(1).map(|envelope| unsafe {
13337 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
13338 });
13339 }
13340 }
13341
13342 impl ::fidl_next::Constrained for TableFieldInlinedHandle<'_> {
13343 type Constraint = ();
13344
13345 fn validate(
13346 _: ::fidl_next::Slot<'_, Self>,
13347 _: Self::Constraint,
13348 ) -> Result<(), ::fidl_next::ValidationError> {
13349 Ok(())
13350 }
13351 }
13352
13353 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandle<'static> {
13354 type Narrowed<'de> = TableFieldInlinedHandle<'de>;
13355
13356 #[inline]
13357 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13358 ::fidl_next::munge!(let Self { table } = out);
13359 ::fidl_next::wire::Table::zero_padding(table);
13360 }
13361 }
13362
13363 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandle<'de>
13364 where
13365 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13366 ___D: ::fidl_next::fuchsia::HandleDecoder,
13367 {
13368 fn decode(
13369 slot: ::fidl_next::Slot<'_, Self>,
13370 decoder: &mut ___D,
13371 _: (),
13372 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13373 ::fidl_next::munge!(let Self { table } = slot);
13374
13375 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13376 match ordinal {
13377 0 => unsafe { ::core::hint::unreachable_unchecked() },
13378
13379 1 => {
13380 ::fidl_next::wire::Envelope::decode_as::<
13381 ___D,
13382 ::fidl_next::wire::fuchsia::Channel,
13383 >(slot.as_mut(), decoder, ())?;
13384
13385 Ok(())
13386 }
13387
13388 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13389 }
13390 })
13391 }
13392 }
13393
13394 impl<'de> TableFieldInlinedHandle<'de> {
13395 pub fn f(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
13396 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13397 }
13398 }
13399
13400 impl<'de> ::core::fmt::Debug for TableFieldInlinedHandle<'de> {
13401 fn fmt(
13402 &self,
13403 f: &mut ::core::fmt::Formatter<'_>,
13404 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13405 f.debug_struct("TableFieldInlinedHandle").field("f", &self.f()).finish()
13406 }
13407 }
13408
13409 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandle<'de> {
13410 type Natural = crate::natural::TableFieldInlinedHandle;
13411 }
13412
13413 #[derive(Debug)]
13415 #[repr(C)]
13416 pub struct TableFieldInlinedHandleStruct<'de> {
13417 pub t: crate::wire::TableFieldInlinedHandle<'de>,
13418 }
13419
13420 static_assertions::const_assert_eq!(
13421 std::mem::size_of::<TableFieldInlinedHandleStruct<'_>>(),
13422 16
13423 );
13424 static_assertions::const_assert_eq!(
13425 std::mem::align_of::<TableFieldInlinedHandleStruct<'_>>(),
13426 8
13427 );
13428
13429 static_assertions::const_assert_eq!(
13430 std::mem::offset_of!(TableFieldInlinedHandleStruct<'_>, t),
13431 0
13432 );
13433
13434 impl ::fidl_next::Constrained for TableFieldInlinedHandleStruct<'_> {
13435 type Constraint = ();
13436
13437 fn validate(
13438 _: ::fidl_next::Slot<'_, Self>,
13439 _: Self::Constraint,
13440 ) -> Result<(), ::fidl_next::ValidationError> {
13441 Ok(())
13442 }
13443 }
13444
13445 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandleStruct<'static> {
13446 type Narrowed<'de> = TableFieldInlinedHandleStruct<'de>;
13447
13448 #[inline]
13449 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13450 ::fidl_next::munge! {
13451 let Self {
13452 t,
13453
13454 } = &mut *out_;
13455 }
13456
13457 ::fidl_next::Wire::zero_padding(t);
13458 }
13459 }
13460
13461 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandleStruct<'de>
13462 where
13463 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13464 ___D: ::fidl_next::Decoder<'de>,
13465 ___D: ::fidl_next::fuchsia::HandleDecoder,
13466 {
13467 fn decode(
13468 slot_: ::fidl_next::Slot<'_, Self>,
13469 decoder_: &mut ___D,
13470 _: (),
13471 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13472 ::fidl_next::munge! {
13473 let Self {
13474 mut t,
13475
13476 } = slot_;
13477 }
13478
13479 let _field = t.as_mut();
13480
13481 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
13482
13483 Ok(())
13484 }
13485 }
13486
13487 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandleStruct<'de> {
13488 type Natural = crate::natural::TableFieldInlinedHandleStruct;
13489 }
13490
13491 #[repr(C)]
13493 pub struct TableFieldUnknownResource<'de> {
13494 pub(crate) table: ::fidl_next::wire::Table<'de>,
13495 }
13496
13497 impl<'de> Drop for TableFieldUnknownResource<'de> {
13498 fn drop(&mut self) {}
13499 }
13500
13501 impl ::fidl_next::Constrained for TableFieldUnknownResource<'_> {
13502 type Constraint = ();
13503
13504 fn validate(
13505 _: ::fidl_next::Slot<'_, Self>,
13506 _: Self::Constraint,
13507 ) -> Result<(), ::fidl_next::ValidationError> {
13508 Ok(())
13509 }
13510 }
13511
13512 unsafe impl ::fidl_next::Wire for TableFieldUnknownResource<'static> {
13513 type Narrowed<'de> = TableFieldUnknownResource<'de>;
13514
13515 #[inline]
13516 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13517 ::fidl_next::munge!(let Self { table } = out);
13518 ::fidl_next::wire::Table::zero_padding(table);
13519 }
13520 }
13521
13522 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResource<'de>
13523 where
13524 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13525 ___D: ::fidl_next::fuchsia::HandleDecoder,
13526 {
13527 fn decode(
13528 slot: ::fidl_next::Slot<'_, Self>,
13529 decoder: &mut ___D,
13530 _: (),
13531 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13532 ::fidl_next::munge!(let Self { table } = slot);
13533
13534 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13535 match ordinal {
13536 0 => unsafe { ::core::hint::unreachable_unchecked() },
13537
13538 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13539 }
13540 })
13541 }
13542 }
13543
13544 impl<'de> TableFieldUnknownResource<'de> {}
13545
13546 impl<'de> ::core::fmt::Debug for TableFieldUnknownResource<'de> {
13547 fn fmt(
13548 &self,
13549 f: &mut ::core::fmt::Formatter<'_>,
13550 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13551 f.debug_struct("TableFieldUnknownResource").finish()
13552 }
13553 }
13554
13555 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResource<'de> {
13556 type Natural = crate::natural::TableFieldUnknownResource;
13557 }
13558
13559 #[derive(Debug)]
13561 #[repr(C)]
13562 pub struct TableFieldUnknownResourceStruct<'de> {
13563 pub t: crate::wire::TableFieldUnknownResource<'de>,
13564 }
13565
13566 static_assertions::const_assert_eq!(
13567 std::mem::size_of::<TableFieldUnknownResourceStruct<'_>>(),
13568 16
13569 );
13570 static_assertions::const_assert_eq!(
13571 std::mem::align_of::<TableFieldUnknownResourceStruct<'_>>(),
13572 8
13573 );
13574
13575 static_assertions::const_assert_eq!(
13576 std::mem::offset_of!(TableFieldUnknownResourceStruct<'_>, t),
13577 0
13578 );
13579
13580 impl ::fidl_next::Constrained for TableFieldUnknownResourceStruct<'_> {
13581 type Constraint = ();
13582
13583 fn validate(
13584 _: ::fidl_next::Slot<'_, Self>,
13585 _: Self::Constraint,
13586 ) -> Result<(), ::fidl_next::ValidationError> {
13587 Ok(())
13588 }
13589 }
13590
13591 unsafe impl ::fidl_next::Wire for TableFieldUnknownResourceStruct<'static> {
13592 type Narrowed<'de> = TableFieldUnknownResourceStruct<'de>;
13593
13594 #[inline]
13595 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13596 ::fidl_next::munge! {
13597 let Self {
13598 t,
13599
13600 } = &mut *out_;
13601 }
13602
13603 ::fidl_next::Wire::zero_padding(t);
13604 }
13605 }
13606
13607 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResourceStruct<'de>
13608 where
13609 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13610 ___D: ::fidl_next::Decoder<'de>,
13611 ___D: ::fidl_next::fuchsia::HandleDecoder,
13612 {
13613 fn decode(
13614 slot_: ::fidl_next::Slot<'_, Self>,
13615 decoder_: &mut ___D,
13616 _: (),
13617 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13618 ::fidl_next::munge! {
13619 let Self {
13620 mut t,
13621
13622 } = slot_;
13623 }
13624
13625 let _field = t.as_mut();
13626
13627 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
13628
13629 Ok(())
13630 }
13631 }
13632
13633 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResourceStruct<'de> {
13634 type Natural = crate::natural::TableFieldUnknownResourceStruct;
13635 }
13636
13637 #[repr(C)]
13639 pub struct TableOfEndpointsTable<'de> {
13640 pub(crate) table: ::fidl_next::wire::Table<'de>,
13641 }
13642
13643 impl<'de> Drop for TableOfEndpointsTable<'de> {
13644 fn drop(&mut self) {
13645 let _ = self.table.get(1)
13646 .map(|envelope| unsafe {
13647 envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
13648 });
13649
13650 let _ = self.table.get(2)
13651 .map(|envelope| unsafe {
13652 envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
13653 });
13654 }
13655 }
13656
13657 impl ::fidl_next::Constrained for TableOfEndpointsTable<'_> {
13658 type Constraint = ();
13659
13660 fn validate(
13661 _: ::fidl_next::Slot<'_, Self>,
13662 _: Self::Constraint,
13663 ) -> Result<(), ::fidl_next::ValidationError> {
13664 Ok(())
13665 }
13666 }
13667
13668 unsafe impl ::fidl_next::Wire for TableOfEndpointsTable<'static> {
13669 type Narrowed<'de> = TableOfEndpointsTable<'de>;
13670
13671 #[inline]
13672 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13673 ::fidl_next::munge!(let Self { table } = out);
13674 ::fidl_next::wire::Table::zero_padding(table);
13675 }
13676 }
13677
13678 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpointsTable<'de>
13679 where
13680 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13681 ___D: ::fidl_next::fuchsia::HandleDecoder,
13682 {
13683 fn decode(
13684 slot: ::fidl_next::Slot<'_, Self>,
13685 decoder: &mut ___D,
13686 _: (),
13687 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13688 ::fidl_next::munge!(let Self { table } = slot);
13689
13690 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13691 match ordinal {
13692 0 => unsafe { ::core::hint::unreachable_unchecked() },
13693
13694 1 => {
13695 ::fidl_next::wire::Envelope::decode_as::<
13696 ___D,
13697 ::fidl_next::ClientEnd<
13698 crate::Protocol,
13699 ::fidl_next::wire::fuchsia::Channel,
13700 >,
13701 >(slot.as_mut(), decoder, ())?;
13702
13703 Ok(())
13704 }
13705
13706 2 => {
13707 ::fidl_next::wire::Envelope::decode_as::<
13708 ___D,
13709 ::fidl_next::ServerEnd<
13710 crate::Protocol,
13711 ::fidl_next::wire::fuchsia::Channel,
13712 >,
13713 >(slot.as_mut(), decoder, ())?;
13714
13715 Ok(())
13716 }
13717
13718 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13719 }
13720 })
13721 }
13722 }
13723
13724 impl<'de> TableOfEndpointsTable<'de> {
13725 pub fn client_end(
13726 &self,
13727 ) -> ::core::option::Option<
13728 &::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13729 > {
13730 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13731 }
13732
13733 pub fn server_end(
13734 &self,
13735 ) -> ::core::option::Option<
13736 &::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13737 > {
13738 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13739 }
13740 }
13741
13742 impl<'de> ::core::fmt::Debug for TableOfEndpointsTable<'de> {
13743 fn fmt(
13744 &self,
13745 f: &mut ::core::fmt::Formatter<'_>,
13746 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13747 f.debug_struct("TableOfEndpointsTable")
13748 .field("client_end", &self.client_end())
13749 .field("server_end", &self.server_end())
13750 .finish()
13751 }
13752 }
13753
13754 impl<'de> ::fidl_next::IntoNatural for TableOfEndpointsTable<'de> {
13755 type Natural = crate::natural::TableOfEndpointsTable;
13756 }
13757
13758 #[derive(Debug)]
13760 #[repr(C)]
13761 pub struct TableOfEndpoints<'de> {
13762 pub t: crate::wire::TableOfEndpointsTable<'de>,
13763 }
13764
13765 static_assertions::const_assert_eq!(std::mem::size_of::<TableOfEndpoints<'_>>(), 16);
13766 static_assertions::const_assert_eq!(std::mem::align_of::<TableOfEndpoints<'_>>(), 8);
13767
13768 static_assertions::const_assert_eq!(std::mem::offset_of!(TableOfEndpoints<'_>, t), 0);
13769
13770 impl ::fidl_next::Constrained for TableOfEndpoints<'_> {
13771 type Constraint = ();
13772
13773 fn validate(
13774 _: ::fidl_next::Slot<'_, Self>,
13775 _: Self::Constraint,
13776 ) -> Result<(), ::fidl_next::ValidationError> {
13777 Ok(())
13778 }
13779 }
13780
13781 unsafe impl ::fidl_next::Wire for TableOfEndpoints<'static> {
13782 type Narrowed<'de> = TableOfEndpoints<'de>;
13783
13784 #[inline]
13785 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13786 ::fidl_next::munge! {
13787 let Self {
13788 t,
13789
13790 } = &mut *out_;
13791 }
13792
13793 ::fidl_next::Wire::zero_padding(t);
13794 }
13795 }
13796
13797 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpoints<'de>
13798 where
13799 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13800 ___D: ::fidl_next::Decoder<'de>,
13801 ___D: ::fidl_next::fuchsia::HandleDecoder,
13802 {
13803 fn decode(
13804 slot_: ::fidl_next::Slot<'_, Self>,
13805 decoder_: &mut ___D,
13806 _: (),
13807 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13808 ::fidl_next::munge! {
13809 let Self {
13810 mut t,
13811
13812 } = slot_;
13813 }
13814
13815 let _field = t.as_mut();
13816
13817 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
13818
13819 Ok(())
13820 }
13821 }
13822
13823 impl<'de> ::fidl_next::IntoNatural for TableOfEndpoints<'de> {
13824 type Natural = crate::natural::TableOfEndpoints;
13825 }
13826
13827 #[repr(C)]
13829 pub struct TableUnionWithVectorReservedSandwich<'de> {
13830 pub(crate) table: ::fidl_next::wire::Table<'de>,
13831 }
13832
13833 impl<'de> Drop for TableUnionWithVectorReservedSandwich<'de> {
13834 fn drop(&mut self) {
13835 let _ = self.table.get(2).map(|envelope| unsafe {
13836 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
13837 });
13838 }
13839 }
13840
13841 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwich<'_> {
13842 type Constraint = ();
13843
13844 fn validate(
13845 _: ::fidl_next::Slot<'_, Self>,
13846 _: Self::Constraint,
13847 ) -> Result<(), ::fidl_next::ValidationError> {
13848 Ok(())
13849 }
13850 }
13851
13852 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwich<'static> {
13853 type Narrowed<'de> = TableUnionWithVectorReservedSandwich<'de>;
13854
13855 #[inline]
13856 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13857 ::fidl_next::munge!(let Self { table } = out);
13858 ::fidl_next::wire::Table::zero_padding(table);
13859 }
13860 }
13861
13862 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwich<'de>
13863 where
13864 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13865 ___D: ::fidl_next::fuchsia::HandleDecoder,
13866 {
13867 fn decode(
13868 slot: ::fidl_next::Slot<'_, Self>,
13869 decoder: &mut ___D,
13870 _: (),
13871 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13872 ::fidl_next::munge!(let Self { table } = slot);
13873
13874 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13875 match ordinal {
13876 0 => unsafe { ::core::hint::unreachable_unchecked() },
13877
13878 2 => {
13879 ::fidl_next::wire::Envelope::decode_as::<
13880 ___D,
13881 crate::wire::UnionWithVector<'de>,
13882 >(slot.as_mut(), decoder, ())?;
13883
13884 Ok(())
13885 }
13886
13887 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13888 }
13889 })
13890 }
13891 }
13892
13893 impl<'de> TableUnionWithVectorReservedSandwich<'de> {
13894 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
13895 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13896 }
13897 }
13898
13899 impl<'de> ::core::fmt::Debug for TableUnionWithVectorReservedSandwich<'de> {
13900 fn fmt(
13901 &self,
13902 f: &mut ::core::fmt::Formatter<'_>,
13903 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13904 f.debug_struct("TableUnionWithVectorReservedSandwich").field("uv", &self.uv()).finish()
13905 }
13906 }
13907
13908 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwich<'de> {
13909 type Natural = crate::natural::TableUnionWithVectorReservedSandwich;
13910 }
13911
13912 #[derive(Debug)]
13914 #[repr(C)]
13915 pub struct TableUnionWithVectorReservedSandwichStruct<'de> {
13916 pub table: crate::wire::TableUnionWithVectorReservedSandwich<'de>,
13917 }
13918
13919 static_assertions::const_assert_eq!(
13920 std::mem::size_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
13921 16
13922 );
13923 static_assertions::const_assert_eq!(
13924 std::mem::align_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
13925 8
13926 );
13927
13928 static_assertions::const_assert_eq!(
13929 std::mem::offset_of!(TableUnionWithVectorReservedSandwichStruct<'_>, table),
13930 0
13931 );
13932
13933 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwichStruct<'_> {
13934 type Constraint = ();
13935
13936 fn validate(
13937 _: ::fidl_next::Slot<'_, Self>,
13938 _: Self::Constraint,
13939 ) -> Result<(), ::fidl_next::ValidationError> {
13940 Ok(())
13941 }
13942 }
13943
13944 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwichStruct<'static> {
13945 type Narrowed<'de> = TableUnionWithVectorReservedSandwichStruct<'de>;
13946
13947 #[inline]
13948 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13949 ::fidl_next::munge! {
13950 let Self {
13951 table,
13952
13953 } = &mut *out_;
13954 }
13955
13956 ::fidl_next::Wire::zero_padding(table);
13957 }
13958 }
13959
13960 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwichStruct<'de>
13961 where
13962 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13963 ___D: ::fidl_next::Decoder<'de>,
13964 ___D: ::fidl_next::fuchsia::HandleDecoder,
13965 {
13966 fn decode(
13967 slot_: ::fidl_next::Slot<'_, Self>,
13968 decoder_: &mut ___D,
13969 _: (),
13970 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13971 ::fidl_next::munge! {
13972 let Self {
13973 mut table,
13974
13975 } = slot_;
13976 }
13977
13978 let _field = table.as_mut();
13979
13980 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
13981
13982 Ok(())
13983 }
13984 }
13985
13986 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwichStruct<'de> {
13987 type Natural = crate::natural::TableUnionWithVectorReservedSandwichStruct;
13988 }
13989
13990 #[repr(C)]
13992 pub struct TableUnionWithVectorStructSandwich<'de> {
13993 pub(crate) table: ::fidl_next::wire::Table<'de>,
13994 }
13995
13996 impl<'de> Drop for TableUnionWithVectorStructSandwich<'de> {
13997 fn drop(&mut self) {
13998 let _ = self.table.get(1).map(|envelope| unsafe {
13999 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14000 });
14001
14002 let _ = self.table.get(2).map(|envelope| unsafe {
14003 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
14004 });
14005
14006 let _ = self.table.get(3).map(|envelope| unsafe {
14007 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14008 });
14009 }
14010 }
14011
14012 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwich<'_> {
14013 type Constraint = ();
14014
14015 fn validate(
14016 _: ::fidl_next::Slot<'_, Self>,
14017 _: Self::Constraint,
14018 ) -> Result<(), ::fidl_next::ValidationError> {
14019 Ok(())
14020 }
14021 }
14022
14023 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwich<'static> {
14024 type Narrowed<'de> = TableUnionWithVectorStructSandwich<'de>;
14025
14026 #[inline]
14027 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14028 ::fidl_next::munge!(let Self { table } = out);
14029 ::fidl_next::wire::Table::zero_padding(table);
14030 }
14031 }
14032
14033 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwich<'de>
14034 where
14035 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14036 ___D: ::fidl_next::fuchsia::HandleDecoder,
14037 {
14038 fn decode(
14039 slot: ::fidl_next::Slot<'_, Self>,
14040 decoder: &mut ___D,
14041 _: (),
14042 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14043 ::fidl_next::munge!(let Self { table } = slot);
14044
14045 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14046 match ordinal {
14047 0 => unsafe { ::core::hint::unreachable_unchecked() },
14048
14049 1 => {
14050 ::fidl_next::wire::Envelope::decode_as::<
14051 ___D,
14052 crate::wire::StructSize3Align1,
14053 >(slot.as_mut(), decoder, ())?;
14054
14055 Ok(())
14056 }
14057
14058 2 => {
14059 ::fidl_next::wire::Envelope::decode_as::<
14060 ___D,
14061 crate::wire::UnionWithVector<'de>,
14062 >(slot.as_mut(), decoder, ())?;
14063
14064 Ok(())
14065 }
14066
14067 3 => {
14068 ::fidl_next::wire::Envelope::decode_as::<
14069 ___D,
14070 crate::wire::StructSize3Align1,
14071 >(slot.as_mut(), decoder, ())?;
14072
14073 Ok(())
14074 }
14075
14076 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14077 }
14078 })
14079 }
14080 }
14081
14082 impl<'de> TableUnionWithVectorStructSandwich<'de> {
14083 pub fn s1(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14084 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14085 }
14086
14087 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
14088 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14089 }
14090
14091 pub fn s2(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14092 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
14093 }
14094 }
14095
14096 impl<'de> ::core::fmt::Debug for TableUnionWithVectorStructSandwich<'de> {
14097 fn fmt(
14098 &self,
14099 f: &mut ::core::fmt::Formatter<'_>,
14100 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14101 f.debug_struct("TableUnionWithVectorStructSandwich")
14102 .field("s1", &self.s1())
14103 .field("uv", &self.uv())
14104 .field("s2", &self.s2())
14105 .finish()
14106 }
14107 }
14108
14109 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwich<'de> {
14110 type Natural = crate::natural::TableUnionWithVectorStructSandwich;
14111 }
14112
14113 #[derive(Debug)]
14115 #[repr(C)]
14116 pub struct TableUnionWithVectorStructSandwichStruct<'de> {
14117 pub table: crate::wire::TableUnionWithVectorStructSandwich<'de>,
14118 }
14119
14120 static_assertions::const_assert_eq!(
14121 std::mem::size_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14122 16
14123 );
14124 static_assertions::const_assert_eq!(
14125 std::mem::align_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14126 8
14127 );
14128
14129 static_assertions::const_assert_eq!(
14130 std::mem::offset_of!(TableUnionWithVectorStructSandwichStruct<'_>, table),
14131 0
14132 );
14133
14134 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwichStruct<'_> {
14135 type Constraint = ();
14136
14137 fn validate(
14138 _: ::fidl_next::Slot<'_, Self>,
14139 _: Self::Constraint,
14140 ) -> Result<(), ::fidl_next::ValidationError> {
14141 Ok(())
14142 }
14143 }
14144
14145 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwichStruct<'static> {
14146 type Narrowed<'de> = TableUnionWithVectorStructSandwichStruct<'de>;
14147
14148 #[inline]
14149 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14150 ::fidl_next::munge! {
14151 let Self {
14152 table,
14153
14154 } = &mut *out_;
14155 }
14156
14157 ::fidl_next::Wire::zero_padding(table);
14158 }
14159 }
14160
14161 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwichStruct<'de>
14162 where
14163 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14164 ___D: ::fidl_next::Decoder<'de>,
14165 ___D: ::fidl_next::fuchsia::HandleDecoder,
14166 {
14167 fn decode(
14168 slot_: ::fidl_next::Slot<'_, Self>,
14169 decoder_: &mut ___D,
14170 _: (),
14171 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14172 ::fidl_next::munge! {
14173 let Self {
14174 mut table,
14175
14176 } = slot_;
14177 }
14178
14179 let _field = table.as_mut();
14180
14181 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14182
14183 Ok(())
14184 }
14185 }
14186
14187 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwichStruct<'de> {
14188 type Natural = crate::natural::TableUnionWithVectorStructSandwichStruct;
14189 }
14190
14191 #[derive(Debug)]
14193 #[repr(C)]
14194 pub struct TestFlexibleResourceXUnionInStruct<'de> {
14195 pub xu: crate::wire::SampleResourceXUnion<'de>,
14196 }
14197
14198 static_assertions::const_assert_eq!(
14199 std::mem::size_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
14200 16
14201 );
14202 static_assertions::const_assert_eq!(
14203 std::mem::align_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
14204 8
14205 );
14206
14207 static_assertions::const_assert_eq!(
14208 std::mem::offset_of!(TestFlexibleResourceXUnionInStruct<'_>, xu),
14209 0
14210 );
14211
14212 impl ::fidl_next::Constrained for TestFlexibleResourceXUnionInStruct<'_> {
14213 type Constraint = ();
14214
14215 fn validate(
14216 _: ::fidl_next::Slot<'_, Self>,
14217 _: Self::Constraint,
14218 ) -> Result<(), ::fidl_next::ValidationError> {
14219 Ok(())
14220 }
14221 }
14222
14223 unsafe impl ::fidl_next::Wire for TestFlexibleResourceXUnionInStruct<'static> {
14224 type Narrowed<'de> = TestFlexibleResourceXUnionInStruct<'de>;
14225
14226 #[inline]
14227 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14228 ::fidl_next::munge! {
14229 let Self {
14230 xu,
14231
14232 } = &mut *out_;
14233 }
14234
14235 ::fidl_next::Wire::zero_padding(xu);
14236 }
14237 }
14238
14239 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestFlexibleResourceXUnionInStruct<'de>
14240 where
14241 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14242 ___D: ::fidl_next::Decoder<'de>,
14243 ___D: ::fidl_next::fuchsia::HandleDecoder,
14244 {
14245 fn decode(
14246 slot_: ::fidl_next::Slot<'_, Self>,
14247 decoder_: &mut ___D,
14248 _: (),
14249 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14250 ::fidl_next::munge! {
14251 let Self {
14252 mut xu,
14253
14254 } = slot_;
14255 }
14256
14257 let _field = xu.as_mut();
14258
14259 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14260
14261 Ok(())
14262 }
14263 }
14264
14265 impl<'de> ::fidl_next::IntoNatural for TestFlexibleResourceXUnionInStruct<'de> {
14266 type Natural = crate::natural::TestFlexibleResourceXUnionInStruct;
14267 }
14268
14269 #[derive(Debug)]
14271 #[repr(C)]
14272 pub struct TestOptionalFlexibleResourceXUnionInStruct<'de> {
14273 pub xu: crate::wire_optional::SampleResourceXUnion<'de>,
14274 }
14275
14276 static_assertions::const_assert_eq!(
14277 std::mem::size_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
14278 16
14279 );
14280 static_assertions::const_assert_eq!(
14281 std::mem::align_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
14282 8
14283 );
14284
14285 static_assertions::const_assert_eq!(
14286 std::mem::offset_of!(TestOptionalFlexibleResourceXUnionInStruct<'_>, xu),
14287 0
14288 );
14289
14290 impl ::fidl_next::Constrained for TestOptionalFlexibleResourceXUnionInStruct<'_> {
14291 type Constraint = ();
14292
14293 fn validate(
14294 _: ::fidl_next::Slot<'_, Self>,
14295 _: Self::Constraint,
14296 ) -> Result<(), ::fidl_next::ValidationError> {
14297 Ok(())
14298 }
14299 }
14300
14301 unsafe impl ::fidl_next::Wire for TestOptionalFlexibleResourceXUnionInStruct<'static> {
14302 type Narrowed<'de> = TestOptionalFlexibleResourceXUnionInStruct<'de>;
14303
14304 #[inline]
14305 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14306 ::fidl_next::munge! {
14307 let Self {
14308 xu,
14309
14310 } = &mut *out_;
14311 }
14312
14313 ::fidl_next::Wire::zero_padding(xu);
14314 }
14315 }
14316
14317 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalFlexibleResourceXUnionInStruct<'de>
14318 where
14319 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14320 ___D: ::fidl_next::Decoder<'de>,
14321 ___D: ::fidl_next::fuchsia::HandleDecoder,
14322 {
14323 fn decode(
14324 slot_: ::fidl_next::Slot<'_, Self>,
14325 decoder_: &mut ___D,
14326 _: (),
14327 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14328 ::fidl_next::munge! {
14329 let Self {
14330 mut xu,
14331
14332 } = slot_;
14333 }
14334
14335 let _field = xu.as_mut();
14336
14337 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14338
14339 Ok(())
14340 }
14341 }
14342
14343 impl<'de> ::fidl_next::IntoNatural for TestOptionalFlexibleResourceXUnionInStruct<'de> {
14344 type Natural = crate::natural::TestOptionalFlexibleResourceXUnionInStruct;
14345 }
14346
14347 #[derive(Debug)]
14349 #[repr(C)]
14350 pub struct TestOptionalStrictResourceXUnionInStruct<'de> {
14351 pub xu: crate::wire_optional::SampleStrictResourceXUnion<'de>,
14352 }
14353
14354 static_assertions::const_assert_eq!(
14355 std::mem::size_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
14356 16
14357 );
14358 static_assertions::const_assert_eq!(
14359 std::mem::align_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
14360 8
14361 );
14362
14363 static_assertions::const_assert_eq!(
14364 std::mem::offset_of!(TestOptionalStrictResourceXUnionInStruct<'_>, xu),
14365 0
14366 );
14367
14368 impl ::fidl_next::Constrained for TestOptionalStrictResourceXUnionInStruct<'_> {
14369 type Constraint = ();
14370
14371 fn validate(
14372 _: ::fidl_next::Slot<'_, Self>,
14373 _: Self::Constraint,
14374 ) -> Result<(), ::fidl_next::ValidationError> {
14375 Ok(())
14376 }
14377 }
14378
14379 unsafe impl ::fidl_next::Wire for TestOptionalStrictResourceXUnionInStruct<'static> {
14380 type Narrowed<'de> = TestOptionalStrictResourceXUnionInStruct<'de>;
14381
14382 #[inline]
14383 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14384 ::fidl_next::munge! {
14385 let Self {
14386 xu,
14387
14388 } = &mut *out_;
14389 }
14390
14391 ::fidl_next::Wire::zero_padding(xu);
14392 }
14393 }
14394
14395 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalStrictResourceXUnionInStruct<'de>
14396 where
14397 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14398 ___D: ::fidl_next::Decoder<'de>,
14399 ___D: ::fidl_next::fuchsia::HandleDecoder,
14400 {
14401 fn decode(
14402 slot_: ::fidl_next::Slot<'_, Self>,
14403 decoder_: &mut ___D,
14404 _: (),
14405 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14406 ::fidl_next::munge! {
14407 let Self {
14408 mut xu,
14409
14410 } = slot_;
14411 }
14412
14413 let _field = xu.as_mut();
14414
14415 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14416
14417 Ok(())
14418 }
14419 }
14420
14421 impl<'de> ::fidl_next::IntoNatural for TestOptionalStrictResourceXUnionInStruct<'de> {
14422 type Natural = crate::natural::TestOptionalStrictResourceXUnionInStruct;
14423 }
14424
14425 #[derive(Debug)]
14427 #[repr(C)]
14428 pub struct TestPackageResolverResolveRequest<'de> {
14429 pub package_url: ::fidl_next::wire::String<'de>,
14430
14431 pub selectors: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
14432
14433 pub update_policy: crate::wire::UpdatePolicy,
14434
14435 pub this_should_be_a_handle: ::fidl_next::wire::Uint32,
14436 }
14437
14438 static_assertions::const_assert_eq!(
14439 std::mem::size_of::<TestPackageResolverResolveRequest<'_>>(),
14440 40
14441 );
14442 static_assertions::const_assert_eq!(
14443 std::mem::align_of::<TestPackageResolverResolveRequest<'_>>(),
14444 8
14445 );
14446
14447 static_assertions::const_assert_eq!(
14448 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, package_url),
14449 0
14450 );
14451
14452 static_assertions::const_assert_eq!(
14453 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, selectors),
14454 16
14455 );
14456
14457 static_assertions::const_assert_eq!(
14458 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, update_policy),
14459 32
14460 );
14461
14462 static_assertions::const_assert_eq!(
14463 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, this_should_be_a_handle),
14464 36
14465 );
14466
14467 impl ::fidl_next::Constrained for TestPackageResolverResolveRequest<'_> {
14468 type Constraint = ();
14469
14470 fn validate(
14471 _: ::fidl_next::Slot<'_, Self>,
14472 _: Self::Constraint,
14473 ) -> Result<(), ::fidl_next::ValidationError> {
14474 Ok(())
14475 }
14476 }
14477
14478 unsafe impl ::fidl_next::Wire for TestPackageResolverResolveRequest<'static> {
14479 type Narrowed<'de> = TestPackageResolverResolveRequest<'de>;
14480
14481 #[inline]
14482 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14483 ::fidl_next::munge! {
14484 let Self {
14485 package_url,
14486 selectors,
14487 update_policy,
14488 this_should_be_a_handle,
14489
14490 } = &mut *out_;
14491 }
14492
14493 ::fidl_next::Wire::zero_padding(package_url);
14494
14495 ::fidl_next::Wire::zero_padding(selectors);
14496
14497 ::fidl_next::Wire::zero_padding(update_policy);
14498
14499 ::fidl_next::Wire::zero_padding(this_should_be_a_handle);
14500
14501 unsafe {
14502 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 2);
14503 }
14504 }
14505 }
14506
14507 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestPackageResolverResolveRequest<'de>
14508 where
14509 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14510 ___D: ::fidl_next::Decoder<'de>,
14511 ___D: ::fidl_next::fuchsia::HandleDecoder,
14512 {
14513 fn decode(
14514 slot_: ::fidl_next::Slot<'_, Self>,
14515 decoder_: &mut ___D,
14516 _: (),
14517 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14518 if slot_.as_bytes()[34..36] != [0u8; 2] {
14519 return Err(::fidl_next::DecodeError::InvalidPadding);
14520 }
14521
14522 ::fidl_next::munge! {
14523 let Self {
14524 mut package_url,
14525 mut selectors,
14526 mut update_policy,
14527 mut this_should_be_a_handle,
14528
14529 } = slot_;
14530 }
14531
14532 let _field = package_url.as_mut();
14533 ::fidl_next::Constrained::validate(_field, 4294967295)?;
14534 ::fidl_next::Decode::decode(package_url.as_mut(), decoder_, 4294967295)?;
14535
14536 let _field = selectors.as_mut();
14537 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
14538 ::fidl_next::Decode::decode(selectors.as_mut(), decoder_, (4294967295, 4294967295))?;
14539
14540 let _field = update_policy.as_mut();
14541
14542 ::fidl_next::Decode::decode(update_policy.as_mut(), decoder_, ())?;
14543
14544 let _field = this_should_be_a_handle.as_mut();
14545
14546 ::fidl_next::Decode::decode(this_should_be_a_handle.as_mut(), decoder_, ())?;
14547
14548 Ok(())
14549 }
14550 }
14551
14552 impl<'de> ::fidl_next::IntoNatural for TestPackageResolverResolveRequest<'de> {
14553 type Natural = crate::natural::TestPackageResolverResolveRequest;
14554 }
14555
14556 #[derive(Debug)]
14558 #[repr(C)]
14559 pub struct TestStrictResourceXUnionInStruct<'de> {
14560 pub xu: crate::wire::SampleStrictResourceXUnion<'de>,
14561 }
14562
14563 static_assertions::const_assert_eq!(
14564 std::mem::size_of::<TestStrictResourceXUnionInStruct<'_>>(),
14565 16
14566 );
14567 static_assertions::const_assert_eq!(
14568 std::mem::align_of::<TestStrictResourceXUnionInStruct<'_>>(),
14569 8
14570 );
14571
14572 static_assertions::const_assert_eq!(
14573 std::mem::offset_of!(TestStrictResourceXUnionInStruct<'_>, xu),
14574 0
14575 );
14576
14577 impl ::fidl_next::Constrained for TestStrictResourceXUnionInStruct<'_> {
14578 type Constraint = ();
14579
14580 fn validate(
14581 _: ::fidl_next::Slot<'_, Self>,
14582 _: Self::Constraint,
14583 ) -> Result<(), ::fidl_next::ValidationError> {
14584 Ok(())
14585 }
14586 }
14587
14588 unsafe impl ::fidl_next::Wire for TestStrictResourceXUnionInStruct<'static> {
14589 type Narrowed<'de> = TestStrictResourceXUnionInStruct<'de>;
14590
14591 #[inline]
14592 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14593 ::fidl_next::munge! {
14594 let Self {
14595 xu,
14596
14597 } = &mut *out_;
14598 }
14599
14600 ::fidl_next::Wire::zero_padding(xu);
14601 }
14602 }
14603
14604 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestStrictResourceXUnionInStruct<'de>
14605 where
14606 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14607 ___D: ::fidl_next::Decoder<'de>,
14608 ___D: ::fidl_next::fuchsia::HandleDecoder,
14609 {
14610 fn decode(
14611 slot_: ::fidl_next::Slot<'_, Self>,
14612 decoder_: &mut ___D,
14613 _: (),
14614 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14615 ::fidl_next::munge! {
14616 let Self {
14617 mut xu,
14618
14619 } = slot_;
14620 }
14621
14622 let _field = xu.as_mut();
14623
14624 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
14625
14626 Ok(())
14627 }
14628 }
14629
14630 impl<'de> ::fidl_next::IntoNatural for TestStrictResourceXUnionInStruct<'de> {
14631 type Natural = crate::natural::TestStrictResourceXUnionInStruct;
14632 }
14633
14634 #[derive(Debug)]
14636 #[repr(C)]
14637 pub struct UnboundedNonnullableVectorOfHandles<'de> {
14638 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
14639 }
14640
14641 static_assertions::const_assert_eq!(
14642 std::mem::size_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
14643 16
14644 );
14645 static_assertions::const_assert_eq!(
14646 std::mem::align_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
14647 8
14648 );
14649
14650 static_assertions::const_assert_eq!(
14651 std::mem::offset_of!(UnboundedNonnullableVectorOfHandles<'_>, vh0),
14652 0
14653 );
14654
14655 impl ::fidl_next::Constrained for UnboundedNonnullableVectorOfHandles<'_> {
14656 type Constraint = ();
14657
14658 fn validate(
14659 _: ::fidl_next::Slot<'_, Self>,
14660 _: Self::Constraint,
14661 ) -> Result<(), ::fidl_next::ValidationError> {
14662 Ok(())
14663 }
14664 }
14665
14666 unsafe impl ::fidl_next::Wire for UnboundedNonnullableVectorOfHandles<'static> {
14667 type Narrowed<'de> = UnboundedNonnullableVectorOfHandles<'de>;
14668
14669 #[inline]
14670 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14671 ::fidl_next::munge! {
14672 let Self {
14673 vh0,
14674
14675 } = &mut *out_;
14676 }
14677
14678 ::fidl_next::Wire::zero_padding(vh0);
14679 }
14680 }
14681
14682 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNonnullableVectorOfHandles<'de>
14683 where
14684 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14685 ___D: ::fidl_next::Decoder<'de>,
14686 ___D: ::fidl_next::fuchsia::HandleDecoder,
14687 {
14688 fn decode(
14689 slot_: ::fidl_next::Slot<'_, Self>,
14690 decoder_: &mut ___D,
14691 _: (),
14692 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14693 ::fidl_next::munge! {
14694 let Self {
14695 mut vh0,
14696
14697 } = slot_;
14698 }
14699
14700 let _field = vh0.as_mut();
14701 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
14702 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
14703
14704 Ok(())
14705 }
14706 }
14707
14708 impl<'de> ::fidl_next::IntoNatural for UnboundedNonnullableVectorOfHandles<'de> {
14709 type Natural = crate::natural::UnboundedNonnullableVectorOfHandles;
14710 }
14711
14712 #[derive(Debug)]
14714 #[repr(C)]
14715 pub struct UnboundedNullableVectorOfHandles<'de> {
14716 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
14717 }
14718
14719 static_assertions::const_assert_eq!(
14720 std::mem::size_of::<UnboundedNullableVectorOfHandles<'_>>(),
14721 16
14722 );
14723 static_assertions::const_assert_eq!(
14724 std::mem::align_of::<UnboundedNullableVectorOfHandles<'_>>(),
14725 8
14726 );
14727
14728 static_assertions::const_assert_eq!(
14729 std::mem::offset_of!(UnboundedNullableVectorOfHandles<'_>, vh0),
14730 0
14731 );
14732
14733 impl ::fidl_next::Constrained for UnboundedNullableVectorOfHandles<'_> {
14734 type Constraint = ();
14735
14736 fn validate(
14737 _: ::fidl_next::Slot<'_, Self>,
14738 _: Self::Constraint,
14739 ) -> Result<(), ::fidl_next::ValidationError> {
14740 Ok(())
14741 }
14742 }
14743
14744 unsafe impl ::fidl_next::Wire for UnboundedNullableVectorOfHandles<'static> {
14745 type Narrowed<'de> = UnboundedNullableVectorOfHandles<'de>;
14746
14747 #[inline]
14748 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14749 ::fidl_next::munge! {
14750 let Self {
14751 vh0,
14752
14753 } = &mut *out_;
14754 }
14755
14756 ::fidl_next::Wire::zero_padding(vh0);
14757 }
14758 }
14759
14760 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNullableVectorOfHandles<'de>
14761 where
14762 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14763 ___D: ::fidl_next::Decoder<'de>,
14764 ___D: ::fidl_next::fuchsia::HandleDecoder,
14765 {
14766 fn decode(
14767 slot_: ::fidl_next::Slot<'_, Self>,
14768 decoder_: &mut ___D,
14769 _: (),
14770 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14771 ::fidl_next::munge! {
14772 let Self {
14773 mut vh0,
14774
14775 } = slot_;
14776 }
14777
14778 let _field = vh0.as_mut();
14779 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
14780 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
14781
14782 Ok(())
14783 }
14784 }
14785
14786 impl<'de> ::fidl_next::IntoNatural for UnboundedNullableVectorOfHandles<'de> {
14787 type Natural = crate::natural::UnboundedNullableVectorOfHandles;
14788 }
14789
14790 #[repr(transparent)]
14792 pub struct UnionOfEndpointsUnion<'de> {
14793 pub(crate) raw: ::fidl_next::wire::Union,
14794 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
14795 }
14796
14797 impl<'de> Drop for UnionOfEndpointsUnion<'de> {
14798 fn drop(&mut self) {
14799 match self.raw.ordinal() {
14800 1 => {
14801 let _ = unsafe {
14802 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
14803 crate::Protocol,
14804 ::fidl_next::wire::fuchsia::Channel,
14805 >>()
14806 };
14807 }
14808
14809 2 => {
14810 let _ = unsafe {
14811 self.raw.get().read_unchecked::<::fidl_next::ServerEnd<
14812 crate::Protocol,
14813 ::fidl_next::wire::fuchsia::Channel,
14814 >>()
14815 };
14816 }
14817
14818 _ => (),
14819 }
14820 }
14821 }
14822
14823 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
14824 type Constraint = ();
14825
14826 fn validate(
14827 _: ::fidl_next::Slot<'_, Self>,
14828 _: Self::Constraint,
14829 ) -> Result<(), ::fidl_next::ValidationError> {
14830 Ok(())
14831 }
14832 }
14833
14834 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
14835 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
14836
14837 #[inline]
14838 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14839 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
14840 ::fidl_next::wire::Union::zero_padding(raw);
14841 }
14842 }
14843
14844 pub mod union_of_endpoints_union {
14845 pub enum Ref<'de> {
14846 ClientEnd(
14847 &'de ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14848 ),
14849
14850 ServerEnd(
14851 &'de ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14852 ),
14853
14854 UnknownOrdinal_(u64),
14855 }
14856 }
14857
14858 impl<'de> UnionOfEndpointsUnion<'de> {
14859 pub fn as_ref(&self) -> crate::wire::union_of_endpoints_union::Ref<'_> {
14860 match self.raw.ordinal() {
14861 1 => crate::wire::union_of_endpoints_union::Ref::ClientEnd(unsafe {
14862 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
14863 }),
14864
14865 2 => crate::wire::union_of_endpoints_union::Ref::ServerEnd(unsafe {
14866 self.raw.get().deref_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
14867 }),
14868
14869 unknown => crate::wire::union_of_endpoints_union::Ref::UnknownOrdinal_(unknown),
14870 }
14871 }
14872 }
14873
14874 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
14875 where
14876 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14877 ___D: ::fidl_next::Decoder<'de>,
14878 ___D: ::fidl_next::fuchsia::HandleDecoder,
14879 {
14880 fn decode(
14881 mut slot: ::fidl_next::Slot<'_, Self>,
14882 decoder: &mut ___D,
14883 _: (),
14884 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14885 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
14886 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
14887 1 => ::fidl_next::wire::Union::decode_as::<
14888 ___D,
14889 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14890 >(raw, decoder, ())?,
14891
14892 2 => ::fidl_next::wire::Union::decode_as::<
14893 ___D,
14894 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14895 >(raw, decoder, ())?,
14896
14897 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
14898 }
14899
14900 Ok(())
14901 }
14902 }
14903
14904 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
14905 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
14906 match self.raw.ordinal() {
14907 1 => unsafe {
14908 self.raw.get().deref_unchecked::<
14909 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
14910 >().fmt(f)
14911 },
14912 2 => unsafe {
14913 self.raw.get().deref_unchecked::<
14914 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
14915 >().fmt(f)
14916 },
14917 _ => unsafe { ::core::hint::unreachable_unchecked() },
14918 }
14919 }
14920 }
14921
14922 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
14923 type Natural = crate::natural::UnionOfEndpointsUnion;
14924 }
14925
14926 #[derive(Debug)]
14928 #[repr(C)]
14929 pub struct UnionOfEndpoints<'de> {
14930 pub u: crate::wire::UnionOfEndpointsUnion<'de>,
14931 }
14932
14933 static_assertions::const_assert_eq!(std::mem::size_of::<UnionOfEndpoints<'_>>(), 16);
14934 static_assertions::const_assert_eq!(std::mem::align_of::<UnionOfEndpoints<'_>>(), 8);
14935
14936 static_assertions::const_assert_eq!(std::mem::offset_of!(UnionOfEndpoints<'_>, u), 0);
14937
14938 impl ::fidl_next::Constrained for UnionOfEndpoints<'_> {
14939 type Constraint = ();
14940
14941 fn validate(
14942 _: ::fidl_next::Slot<'_, Self>,
14943 _: Self::Constraint,
14944 ) -> Result<(), ::fidl_next::ValidationError> {
14945 Ok(())
14946 }
14947 }
14948
14949 unsafe impl ::fidl_next::Wire for UnionOfEndpoints<'static> {
14950 type Narrowed<'de> = UnionOfEndpoints<'de>;
14951
14952 #[inline]
14953 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14954 ::fidl_next::munge! {
14955 let Self {
14956 u,
14957
14958 } = &mut *out_;
14959 }
14960
14961 ::fidl_next::Wire::zero_padding(u);
14962 }
14963 }
14964
14965 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpoints<'de>
14966 where
14967 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14968 ___D: ::fidl_next::Decoder<'de>,
14969 ___D: ::fidl_next::fuchsia::HandleDecoder,
14970 {
14971 fn decode(
14972 slot_: ::fidl_next::Slot<'_, Self>,
14973 decoder_: &mut ___D,
14974 _: (),
14975 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14976 ::fidl_next::munge! {
14977 let Self {
14978 mut u,
14979
14980 } = slot_;
14981 }
14982
14983 let _field = u.as_mut();
14984
14985 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
14986
14987 Ok(())
14988 }
14989 }
14990
14991 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpoints<'de> {
14992 type Natural = crate::natural::UnionOfEndpoints;
14993 }
14994
14995 #[repr(transparent)]
14997 pub struct UnionOfHandle {
14998 pub(crate) raw: ::fidl_next::wire::Union,
14999 pub(crate) _phantom: ::core::marker::PhantomData<()>,
15000 }
15001
15002 impl Drop for UnionOfHandle {
15003 fn drop(&mut self) {
15004 match self.raw.ordinal() {
15005 1 => {
15006 let _ = unsafe {
15007 self.raw
15008 .get()
15009 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15010 };
15011 }
15012
15013 _ => unsafe { ::core::hint::unreachable_unchecked() },
15014 }
15015 }
15016 }
15017
15018 impl ::fidl_next::Constrained for UnionOfHandle {
15019 type Constraint = ();
15020
15021 fn validate(
15022 _: ::fidl_next::Slot<'_, Self>,
15023 _: Self::Constraint,
15024 ) -> Result<(), ::fidl_next::ValidationError> {
15025 Ok(())
15026 }
15027 }
15028
15029 unsafe impl ::fidl_next::Wire for UnionOfHandle {
15030 type Narrowed<'de> = UnionOfHandle;
15031
15032 #[inline]
15033 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15034 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15035 ::fidl_next::wire::Union::zero_padding(raw);
15036 }
15037 }
15038
15039 pub mod union_of_handle {
15040 pub enum Ref<'de> {
15041 H(&'de ::fidl_next::wire::fuchsia::NullableHandle),
15042 }
15043 }
15044
15045 impl UnionOfHandle {
15046 pub fn as_ref(&self) -> crate::wire::union_of_handle::Ref<'_> {
15047 match self.raw.ordinal() {
15048 1 => crate::wire::union_of_handle::Ref::H(unsafe {
15049 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15050 }),
15051
15052 _ => unsafe { ::core::hint::unreachable_unchecked() },
15053 }
15054 }
15055 }
15056
15057 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
15058 where
15059 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15060 ___D: ::fidl_next::fuchsia::HandleDecoder,
15061 {
15062 fn decode(
15063 mut slot: ::fidl_next::Slot<'_, Self>,
15064 decoder: &mut ___D,
15065 _: (),
15066 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15067 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15068 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15069 1 => ::fidl_next::wire::Union::decode_as_static::<
15070 ___D,
15071 ::fidl_next::wire::fuchsia::NullableHandle,
15072 >(raw, decoder, ())?,
15073
15074 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
15075 }
15076
15077 Ok(())
15078 }
15079 }
15080
15081 impl ::core::fmt::Debug for UnionOfHandle {
15082 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15083 match self.raw.ordinal() {
15084 1 => unsafe {
15085 self.raw
15086 .get()
15087 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15088 .fmt(f)
15089 },
15090 _ => unsafe { ::core::hint::unreachable_unchecked() },
15091 }
15092 }
15093 }
15094
15095 impl ::fidl_next::IntoNatural for UnionOfHandle {
15096 type Natural = crate::natural::UnionOfHandle;
15097 }
15098
15099 #[derive(Debug)]
15101 #[repr(C)]
15102 pub struct VectorOfArrayOfEventInStructWithDefaultRights<'de> {
15103 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15104 }
15105
15106 static_assertions::const_assert_eq!(
15107 std::mem::size_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
15108 16
15109 );
15110 static_assertions::const_assert_eq!(
15111 std::mem::align_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
15112 8
15113 );
15114
15115 static_assertions::const_assert_eq!(
15116 std::mem::offset_of!(VectorOfArrayOfEventInStructWithDefaultRights<'_>, h),
15117 0
15118 );
15119
15120 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithDefaultRights<'_> {
15121 type Constraint = ();
15122
15123 fn validate(
15124 _: ::fidl_next::Slot<'_, Self>,
15125 _: Self::Constraint,
15126 ) -> Result<(), ::fidl_next::ValidationError> {
15127 Ok(())
15128 }
15129 }
15130
15131 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithDefaultRights<'static> {
15132 type Narrowed<'de> = VectorOfArrayOfEventInStructWithDefaultRights<'de>;
15133
15134 #[inline]
15135 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15136 ::fidl_next::munge! {
15137 let Self {
15138 h,
15139
15140 } = &mut *out_;
15141 }
15142
15143 ::fidl_next::Wire::zero_padding(h);
15144 }
15145 }
15146
15147 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15148 for VectorOfArrayOfEventInStructWithDefaultRights<'de>
15149 where
15150 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15151 ___D: ::fidl_next::Decoder<'de>,
15152 ___D: ::fidl_next::fuchsia::HandleDecoder,
15153 {
15154 fn decode(
15155 slot_: ::fidl_next::Slot<'_, Self>,
15156 decoder_: &mut ___D,
15157 _: (),
15158 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15159 ::fidl_next::munge! {
15160 let Self {
15161 mut h,
15162
15163 } = slot_;
15164 }
15165
15166 let _field = h.as_mut();
15167 ::fidl_next::Constrained::validate(_field, (1, ()))?;
15168 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
15169
15170 let h = unsafe { h.deref_unchecked() };
15171
15172 if h.len() > 1 {
15173 return Err(::fidl_next::DecodeError::VectorTooLong {
15174 size: h.len() as u64,
15175 limit: 1,
15176 });
15177 }
15178
15179 Ok(())
15180 }
15181 }
15182
15183 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithDefaultRights<'de> {
15184 type Natural = crate::natural::VectorOfArrayOfEventInStructWithDefaultRights;
15185 }
15186
15187 #[derive(Debug)]
15189 #[repr(C)]
15190 pub struct VectorOfArrayOfEventInStructWithReducedRights<'de> {
15191 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15192 }
15193
15194 static_assertions::const_assert_eq!(
15195 std::mem::size_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
15196 16
15197 );
15198 static_assertions::const_assert_eq!(
15199 std::mem::align_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
15200 8
15201 );
15202
15203 static_assertions::const_assert_eq!(
15204 std::mem::offset_of!(VectorOfArrayOfEventInStructWithReducedRights<'_>, h),
15205 0
15206 );
15207
15208 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithReducedRights<'_> {
15209 type Constraint = ();
15210
15211 fn validate(
15212 _: ::fidl_next::Slot<'_, Self>,
15213 _: Self::Constraint,
15214 ) -> Result<(), ::fidl_next::ValidationError> {
15215 Ok(())
15216 }
15217 }
15218
15219 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithReducedRights<'static> {
15220 type Narrowed<'de> = VectorOfArrayOfEventInStructWithReducedRights<'de>;
15221
15222 #[inline]
15223 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15224 ::fidl_next::munge! {
15225 let Self {
15226 h,
15227
15228 } = &mut *out_;
15229 }
15230
15231 ::fidl_next::Wire::zero_padding(h);
15232 }
15233 }
15234
15235 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15236 for VectorOfArrayOfEventInStructWithReducedRights<'de>
15237 where
15238 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15239 ___D: ::fidl_next::Decoder<'de>,
15240 ___D: ::fidl_next::fuchsia::HandleDecoder,
15241 {
15242 fn decode(
15243 slot_: ::fidl_next::Slot<'_, Self>,
15244 decoder_: &mut ___D,
15245 _: (),
15246 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15247 ::fidl_next::munge! {
15248 let Self {
15249 mut h,
15250
15251 } = slot_;
15252 }
15253
15254 let _field = h.as_mut();
15255 ::fidl_next::Constrained::validate(_field, (1, ()))?;
15256 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
15257
15258 let h = unsafe { h.deref_unchecked() };
15259
15260 if h.len() > 1 {
15261 return Err(::fidl_next::DecodeError::VectorTooLong {
15262 size: h.len() as u64,
15263 limit: 1,
15264 });
15265 }
15266
15267 Ok(())
15268 }
15269 }
15270
15271 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithReducedRights<'de> {
15272 type Natural = crate::natural::VectorOfArrayOfEventInStructWithReducedRights;
15273 }
15274
15275 #[repr(C)]
15277 pub struct VectorOfArrayOfEventInTableWithReducedRights<'de> {
15278 pub(crate) table: ::fidl_next::wire::Table<'de>,
15279 }
15280
15281 impl<'de> Drop for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15282 fn drop(&mut self) {
15283 let _ = self.table.get(1)
15284 .map(|envelope| unsafe {
15285 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
15286 });
15287 }
15288 }
15289
15290 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRights<'_> {
15291 type Constraint = ();
15292
15293 fn validate(
15294 _: ::fidl_next::Slot<'_, Self>,
15295 _: Self::Constraint,
15296 ) -> Result<(), ::fidl_next::ValidationError> {
15297 Ok(())
15298 }
15299 }
15300
15301 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRights<'static> {
15302 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRights<'de>;
15303
15304 #[inline]
15305 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15306 ::fidl_next::munge!(let Self { table } = out);
15307 ::fidl_next::wire::Table::zero_padding(table);
15308 }
15309 }
15310
15311 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15312 for VectorOfArrayOfEventInTableWithReducedRights<'de>
15313 where
15314 ___D: ::fidl_next::Decoder<'de> + ?Sized,
15315 ___D: ::fidl_next::fuchsia::HandleDecoder,
15316 {
15317 fn decode(
15318 slot: ::fidl_next::Slot<'_, Self>,
15319 decoder: &mut ___D,
15320 _: (),
15321 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15322 ::fidl_next::munge!(let Self { table } = slot);
15323
15324 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15325 match ordinal {
15326 0 => unsafe { ::core::hint::unreachable_unchecked() },
15327
15328 1 => {
15329 ::fidl_next::wire::Envelope::decode_as::<
15330 ___D,
15331 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15332 >(slot.as_mut(), decoder, (1, ()))?;
15333
15334 let value = unsafe {
15335 slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
15336 '_,
15337 [::fidl_next::wire::fuchsia::Event; 1],
15338 >>()
15339 };
15340
15341 if value.len() > 1 {
15342 return Err(::fidl_next::DecodeError::VectorTooLong {
15343 size: value.len() as u64,
15344 limit: 1,
15345 });
15346 }
15347
15348 Ok(())
15349 }
15350
15351 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15352 }
15353 })
15354 }
15355 }
15356
15357 impl<'de> VectorOfArrayOfEventInTableWithReducedRights<'de> {
15358 pub fn h(
15359 &self,
15360 ) -> ::core::option::Option<
15361 &::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15362 > {
15363 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15364 }
15365 }
15366
15367 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15368 fn fmt(
15369 &self,
15370 f: &mut ::core::fmt::Formatter<'_>,
15371 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15372 f.debug_struct("VectorOfArrayOfEventInTableWithReducedRights")
15373 .field("h", &self.h())
15374 .finish()
15375 }
15376 }
15377
15378 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRights<'de> {
15379 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRights;
15380 }
15381
15382 #[derive(Debug)]
15384 #[repr(C)]
15385 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
15386 pub t: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
15387 }
15388
15389 static_assertions::const_assert_eq!(
15390 std::mem::size_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
15391 16
15392 );
15393 static_assertions::const_assert_eq!(
15394 std::mem::align_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
15395 8
15396 );
15397
15398 static_assertions::const_assert_eq!(
15399 std::mem::offset_of!(VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>, t),
15400 0
15401 );
15402
15403 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRightsStruct<'_> {
15404 type Constraint = ();
15405
15406 fn validate(
15407 _: ::fidl_next::Slot<'_, Self>,
15408 _: Self::Constraint,
15409 ) -> Result<(), ::fidl_next::ValidationError> {
15410 Ok(())
15411 }
15412 }
15413
15414 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRightsStruct<'static> {
15415 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>;
15416
15417 #[inline]
15418 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15419 ::fidl_next::munge! {
15420 let Self {
15421 t,
15422
15423 } = &mut *out_;
15424 }
15425
15426 ::fidl_next::Wire::zero_padding(t);
15427 }
15428 }
15429
15430 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15431 for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>
15432 where
15433 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15434 ___D: ::fidl_next::Decoder<'de>,
15435 ___D: ::fidl_next::fuchsia::HandleDecoder,
15436 {
15437 fn decode(
15438 slot_: ::fidl_next::Slot<'_, Self>,
15439 decoder_: &mut ___D,
15440 _: (),
15441 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15442 ::fidl_next::munge! {
15443 let Self {
15444 mut t,
15445
15446 } = slot_;
15447 }
15448
15449 let _field = t.as_mut();
15450
15451 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
15452
15453 Ok(())
15454 }
15455 }
15456
15457 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
15458 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRightsStruct;
15459 }
15460
15461 #[repr(transparent)]
15463 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15464 pub(crate) raw: ::fidl_next::wire::Union,
15465 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15466 }
15467
15468 impl<'de> Drop for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15469 fn drop(&mut self) {
15470 match self.raw.ordinal() {
15471 1 => {
15472 let _ = unsafe {
15473 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
15474 };
15475 }
15476
15477 _ => unsafe { ::core::hint::unreachable_unchecked() },
15478 }
15479 }
15480 }
15481
15482 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
15483 type Constraint = ();
15484
15485 fn validate(
15486 _: ::fidl_next::Slot<'_, Self>,
15487 _: Self::Constraint,
15488 ) -> Result<(), ::fidl_next::ValidationError> {
15489 Ok(())
15490 }
15491 }
15492
15493 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
15494 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
15495
15496 #[inline]
15497 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15498 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15499 ::fidl_next::wire::Union::zero_padding(raw);
15500 }
15501 }
15502
15503 pub mod vector_of_array_of_event_in_union_with_reduced_rights {
15504 pub enum Ref<'de> {
15505 H(&'de ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>),
15506 }
15507 }
15508
15509 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15510 pub fn as_ref(
15511 &self,
15512 ) -> crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref<'_> {
15513 match self.raw.ordinal() {
15514 1 => crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref::H(
15515 unsafe {
15516 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>>()
15517 },
15518 ),
15519
15520 _ => unsafe { ::core::hint::unreachable_unchecked() },
15521 }
15522 }
15523 }
15524
15525 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15526 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
15527 where
15528 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15529 ___D: ::fidl_next::Decoder<'de>,
15530 ___D: ::fidl_next::fuchsia::HandleDecoder,
15531 {
15532 fn decode(
15533 mut slot: ::fidl_next::Slot<'_, Self>,
15534 decoder: &mut ___D,
15535 _: (),
15536 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15537 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15538 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15539 1 => ::fidl_next::wire::Union::decode_as::<
15540 ___D,
15541 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
15542 >(raw, decoder, (1, ()))?,
15543
15544 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
15545 }
15546
15547 Ok(())
15548 }
15549 }
15550
15551 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15552 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15553 match self.raw.ordinal() {
15554 1 => unsafe {
15555 self.raw.get().deref_unchecked::<
15556 ::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>
15557 >().fmt(f)
15558 },
15559 _ => unsafe { ::core::hint::unreachable_unchecked() },
15560 }
15561 }
15562 }
15563
15564 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
15565 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRights;
15566 }
15567
15568 #[derive(Debug)]
15570 #[repr(C)]
15571 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
15572 pub u: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
15573 }
15574
15575 static_assertions::const_assert_eq!(
15576 std::mem::size_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
15577 16
15578 );
15579 static_assertions::const_assert_eq!(
15580 std::mem::align_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
15581 8
15582 );
15583
15584 static_assertions::const_assert_eq!(
15585 std::mem::offset_of!(VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>, u),
15586 0
15587 );
15588
15589 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_> {
15590 type Constraint = ();
15591
15592 fn validate(
15593 _: ::fidl_next::Slot<'_, Self>,
15594 _: Self::Constraint,
15595 ) -> Result<(), ::fidl_next::ValidationError> {
15596 Ok(())
15597 }
15598 }
15599
15600 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static> {
15601 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>;
15602
15603 #[inline]
15604 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15605 ::fidl_next::munge! {
15606 let Self {
15607 u,
15608
15609 } = &mut *out_;
15610 }
15611
15612 ::fidl_next::Wire::zero_padding(u);
15613 }
15614 }
15615
15616 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15617 for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>
15618 where
15619 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15620 ___D: ::fidl_next::Decoder<'de>,
15621 ___D: ::fidl_next::fuchsia::HandleDecoder,
15622 {
15623 fn decode(
15624 slot_: ::fidl_next::Slot<'_, Self>,
15625 decoder_: &mut ___D,
15626 _: (),
15627 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15628 ::fidl_next::munge! {
15629 let Self {
15630 mut u,
15631
15632 } = slot_;
15633 }
15634
15635 let _field = u.as_mut();
15636
15637 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
15638
15639 Ok(())
15640 }
15641 }
15642
15643 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
15644 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRightsStruct;
15645 }
15646
15647 #[derive(Debug)]
15649 #[repr(C)]
15650 pub struct VectorOfHandles<'de> {
15651 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15652 }
15653
15654 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfHandles<'_>>(), 16);
15655 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfHandles<'_>>(), 8);
15656
15657 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfHandles<'_>, v), 0);
15658
15659 impl ::fidl_next::Constrained for VectorOfHandles<'_> {
15660 type Constraint = ();
15661
15662 fn validate(
15663 _: ::fidl_next::Slot<'_, Self>,
15664 _: Self::Constraint,
15665 ) -> Result<(), ::fidl_next::ValidationError> {
15666 Ok(())
15667 }
15668 }
15669
15670 unsafe impl ::fidl_next::Wire for VectorOfHandles<'static> {
15671 type Narrowed<'de> = VectorOfHandles<'de>;
15672
15673 #[inline]
15674 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15675 ::fidl_next::munge! {
15676 let Self {
15677 v,
15678
15679 } = &mut *out_;
15680 }
15681
15682 ::fidl_next::Wire::zero_padding(v);
15683 }
15684 }
15685
15686 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfHandles<'de>
15687 where
15688 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15689 ___D: ::fidl_next::Decoder<'de>,
15690 ___D: ::fidl_next::fuchsia::HandleDecoder,
15691 {
15692 fn decode(
15693 slot_: ::fidl_next::Slot<'_, Self>,
15694 decoder_: &mut ___D,
15695 _: (),
15696 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15697 ::fidl_next::munge! {
15698 let Self {
15699 mut v,
15700
15701 } = slot_;
15702 }
15703
15704 let _field = v.as_mut();
15705 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15706 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
15707
15708 Ok(())
15709 }
15710 }
15711
15712 impl<'de> ::fidl_next::IntoNatural for VectorOfHandles<'de> {
15713 type Natural = crate::natural::VectorOfHandles;
15714 }
15715
15716 #[derive(Debug)]
15718 #[repr(C)]
15719 pub struct VectorOfOptionalHandles<'de> {
15720 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::OptionalNullableHandle>,
15721 }
15722
15723 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfOptionalHandles<'_>>(), 16);
15724 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfOptionalHandles<'_>>(), 8);
15725
15726 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfOptionalHandles<'_>, v), 0);
15727
15728 impl ::fidl_next::Constrained for VectorOfOptionalHandles<'_> {
15729 type Constraint = ();
15730
15731 fn validate(
15732 _: ::fidl_next::Slot<'_, Self>,
15733 _: Self::Constraint,
15734 ) -> Result<(), ::fidl_next::ValidationError> {
15735 Ok(())
15736 }
15737 }
15738
15739 unsafe impl ::fidl_next::Wire for VectorOfOptionalHandles<'static> {
15740 type Narrowed<'de> = VectorOfOptionalHandles<'de>;
15741
15742 #[inline]
15743 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15744 ::fidl_next::munge! {
15745 let Self {
15746 v,
15747
15748 } = &mut *out_;
15749 }
15750
15751 ::fidl_next::Wire::zero_padding(v);
15752 }
15753 }
15754
15755 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfOptionalHandles<'de>
15756 where
15757 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15758 ___D: ::fidl_next::Decoder<'de>,
15759 ___D: ::fidl_next::fuchsia::HandleDecoder,
15760 {
15761 fn decode(
15762 slot_: ::fidl_next::Slot<'_, Self>,
15763 decoder_: &mut ___D,
15764 _: (),
15765 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15766 ::fidl_next::munge! {
15767 let Self {
15768 mut v,
15769
15770 } = slot_;
15771 }
15772
15773 let _field = v.as_mut();
15774 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15775 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
15776
15777 Ok(())
15778 }
15779 }
15780
15781 impl<'de> ::fidl_next::IntoNatural for VectorOfOptionalHandles<'de> {
15782 type Natural = crate::natural::VectorOfOptionalHandles;
15783 }
15784
15785 #[derive(Debug)]
15787 #[repr(C)]
15788 pub struct VectorOfUpTo2Handles<'de> {
15789 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15790 }
15791
15792 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfUpTo2Handles<'_>>(), 16);
15793 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfUpTo2Handles<'_>>(), 8);
15794
15795 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfUpTo2Handles<'_>, v), 0);
15796
15797 impl ::fidl_next::Constrained for VectorOfUpTo2Handles<'_> {
15798 type Constraint = ();
15799
15800 fn validate(
15801 _: ::fidl_next::Slot<'_, Self>,
15802 _: Self::Constraint,
15803 ) -> Result<(), ::fidl_next::ValidationError> {
15804 Ok(())
15805 }
15806 }
15807
15808 unsafe impl ::fidl_next::Wire for VectorOfUpTo2Handles<'static> {
15809 type Narrowed<'de> = VectorOfUpTo2Handles<'de>;
15810
15811 #[inline]
15812 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15813 ::fidl_next::munge! {
15814 let Self {
15815 v,
15816
15817 } = &mut *out_;
15818 }
15819
15820 ::fidl_next::Wire::zero_padding(v);
15821 }
15822 }
15823
15824 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfUpTo2Handles<'de>
15825 where
15826 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15827 ___D: ::fidl_next::Decoder<'de>,
15828 ___D: ::fidl_next::fuchsia::HandleDecoder,
15829 {
15830 fn decode(
15831 slot_: ::fidl_next::Slot<'_, Self>,
15832 decoder_: &mut ___D,
15833 _: (),
15834 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15835 ::fidl_next::munge! {
15836 let Self {
15837 mut v,
15838
15839 } = slot_;
15840 }
15841
15842 let _field = v.as_mut();
15843 ::fidl_next::Constrained::validate(_field, (2, ()))?;
15844 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (2, ()))?;
15845
15846 let v = unsafe { v.deref_unchecked() };
15847
15848 if v.len() > 2 {
15849 return Err(::fidl_next::DecodeError::VectorTooLong {
15850 size: v.len() as u64,
15851 limit: 2,
15852 });
15853 }
15854
15855 Ok(())
15856 }
15857 }
15858
15859 impl<'de> ::fidl_next::IntoNatural for VectorOfUpTo2Handles<'de> {
15860 type Natural = crate::natural::VectorOfUpTo2Handles;
15861 }
15862}
15863
15864pub mod wire_optional {
15865
15866 pub use fidl_next_common_test_conformance::wire_optional::*;
15867
15868 #[repr(transparent)]
15869 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
15870 pub(crate) raw: ::fidl_next::wire::Union,
15871 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15872 }
15873
15874 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
15875 type Constraint = ();
15876
15877 fn validate(
15878 _: ::fidl_next::Slot<'_, Self>,
15879 _: Self::Constraint,
15880 ) -> Result<(), ::fidl_next::ValidationError> {
15881 Ok(())
15882 }
15883 }
15884
15885 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
15886 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
15887
15888 #[inline]
15889 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15890 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15891 ::fidl_next::wire::Union::zero_padding(raw);
15892 }
15893 }
15894
15895 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
15896 pub fn is_some(&self) -> bool {
15897 self.raw.is_some()
15898 }
15899
15900 pub fn is_none(&self) -> bool {
15901 self.raw.is_none()
15902 }
15903
15904 pub fn as_ref(
15905 &self,
15906 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
15907 {
15908 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
15909 }
15910
15911 pub fn into_option(
15912 self,
15913 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
15914 {
15915 if self.is_some() {
15916 Some(crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights {
15917 raw: self.raw,
15918 _phantom: ::core::marker::PhantomData,
15919 })
15920 } else {
15921 None
15922 }
15923 }
15924 }
15925
15926 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15927 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
15928 where
15929 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15930 ___D: ::fidl_next::Decoder<'de>,
15931 ___D: ::fidl_next::fuchsia::HandleDecoder,
15932 {
15933 fn decode(
15934 mut slot: ::fidl_next::Slot<'_, Self>,
15935 decoder: &mut ___D,
15936 _: (),
15937 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15938 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15939 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15940 1 => ::fidl_next::wire::Union::decode_as::<
15941 ___D,
15942 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
15943 >(raw, decoder, (1, ()))?,
15944
15945 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
15946 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
15947 }
15948
15949 Ok(())
15950 }
15951 }
15952
15953 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
15954 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15955 self.as_ref().fmt(f)
15956 }
15957 }
15958
15959 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
15960 type Natural =
15961 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights>;
15962 }
15963
15964 #[repr(transparent)]
15965 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
15966 pub(crate) raw: ::fidl_next::wire::Union,
15967 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15968 }
15969
15970 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
15971 type Constraint = ();
15972
15973 fn validate(
15974 _: ::fidl_next::Slot<'_, Self>,
15975 _: Self::Constraint,
15976 ) -> Result<(), ::fidl_next::ValidationError> {
15977 Ok(())
15978 }
15979 }
15980
15981 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
15982 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
15983
15984 #[inline]
15985 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15986 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15987 ::fidl_next::wire::Union::zero_padding(raw);
15988 }
15989 }
15990
15991 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
15992 pub fn is_some(&self) -> bool {
15993 self.raw.is_some()
15994 }
15995
15996 pub fn is_none(&self) -> bool {
15997 self.raw.is_none()
15998 }
15999
16000 pub fn as_ref(
16001 &self,
16002 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
16003 {
16004 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16005 }
16006
16007 pub fn into_option(
16008 self,
16009 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
16010 {
16011 if self.is_some() {
16012 Some(crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights {
16013 raw: self.raw,
16014 _phantom: ::core::marker::PhantomData,
16015 })
16016 } else {
16017 None
16018 }
16019 }
16020 }
16021
16022 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16023 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
16024 where
16025 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16026 ___D: ::fidl_next::Decoder<'de>,
16027 ___D: ::fidl_next::fuchsia::HandleDecoder,
16028 {
16029 fn decode(
16030 mut slot: ::fidl_next::Slot<'_, Self>,
16031 decoder: &mut ___D,
16032 _: (),
16033 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16034 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16035 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16036 1 => ::fidl_next::wire::Union::decode_as::<
16037 ___D,
16038 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
16039 >(raw, decoder, (1, ()))?,
16040
16041 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16042 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16043 }
16044
16045 Ok(())
16046 }
16047 }
16048
16049 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16050 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16051 self.as_ref().fmt(f)
16052 }
16053 }
16054
16055 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16056 type Natural =
16057 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights>;
16058 }
16059
16060 #[repr(transparent)]
16061 pub struct EnvelopeInliningTestUnion<'de> {
16062 pub(crate) raw: ::fidl_next::wire::Union,
16063 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16064 }
16065
16066 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
16067 type Constraint = ();
16068
16069 fn validate(
16070 _: ::fidl_next::Slot<'_, Self>,
16071 _: Self::Constraint,
16072 ) -> Result<(), ::fidl_next::ValidationError> {
16073 Ok(())
16074 }
16075 }
16076
16077 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
16078 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
16079
16080 #[inline]
16081 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16082 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16083 ::fidl_next::wire::Union::zero_padding(raw);
16084 }
16085 }
16086
16087 impl<'de> EnvelopeInliningTestUnion<'de> {
16088 pub fn is_some(&self) -> bool {
16089 self.raw.is_some()
16090 }
16091
16092 pub fn is_none(&self) -> bool {
16093 self.raw.is_none()
16094 }
16095
16096 pub fn as_ref(
16097 &self,
16098 ) -> ::core::option::Option<&crate::wire::EnvelopeInliningTestUnion<'de>> {
16099 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16100 }
16101
16102 pub fn into_option(
16103 self,
16104 ) -> ::core::option::Option<crate::wire::EnvelopeInliningTestUnion<'de>> {
16105 if self.is_some() {
16106 Some(crate::wire::EnvelopeInliningTestUnion {
16107 raw: self.raw,
16108 _phantom: ::core::marker::PhantomData,
16109 })
16110 } else {
16111 None
16112 }
16113 }
16114 }
16115
16116 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
16117 where
16118 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16119 ___D: ::fidl_next::Decoder<'de>,
16120 ___D: ::fidl_next::fuchsia::HandleDecoder,
16121 {
16122 fn decode(
16123 mut slot: ::fidl_next::Slot<'_, Self>,
16124 decoder: &mut ___D,
16125 _: (),
16126 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16127 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16128 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16129 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16130 raw,
16131 decoder,
16132 (),
16133 )?,
16134
16135 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
16136 raw,
16137 decoder,
16138 (),
16139 )?,
16140
16141 3 => ::fidl_next::wire::Union::decode_as::<
16142 ___D,
16143 ::fidl_next::wire::fuchsia::NullableHandle,
16144 >(raw, decoder, ())?,
16145
16146 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16147 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16148 }
16149
16150 Ok(())
16151 }
16152 }
16153
16154 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
16155 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16156 self.as_ref().fmt(f)
16157 }
16158 }
16159
16160 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
16161 type Natural = ::core::option::Option<crate::natural::EnvelopeInliningTestUnion>;
16162 }
16163
16164 #[repr(transparent)]
16165 pub struct SampleResourceXUnion<'de> {
16166 pub(crate) raw: ::fidl_next::wire::Union,
16167 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16168 }
16169
16170 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
16171 type Constraint = ();
16172
16173 fn validate(
16174 _: ::fidl_next::Slot<'_, Self>,
16175 _: Self::Constraint,
16176 ) -> Result<(), ::fidl_next::ValidationError> {
16177 Ok(())
16178 }
16179 }
16180
16181 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
16182 type Narrowed<'de> = SampleResourceXUnion<'de>;
16183
16184 #[inline]
16185 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16186 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16187 ::fidl_next::wire::Union::zero_padding(raw);
16188 }
16189 }
16190
16191 impl<'de> SampleResourceXUnion<'de> {
16192 pub fn is_some(&self) -> bool {
16193 self.raw.is_some()
16194 }
16195
16196 pub fn is_none(&self) -> bool {
16197 self.raw.is_none()
16198 }
16199
16200 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SampleResourceXUnion<'de>> {
16201 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16202 }
16203
16204 pub fn into_option(self) -> ::core::option::Option<crate::wire::SampleResourceXUnion<'de>> {
16205 if self.is_some() {
16206 Some(crate::wire::SampleResourceXUnion {
16207 raw: self.raw,
16208 _phantom: ::core::marker::PhantomData,
16209 })
16210 } else {
16211 None
16212 }
16213 }
16214 }
16215
16216 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
16217 where
16218 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16219 ___D: ::fidl_next::Decoder<'de>,
16220 ___D: ::fidl_next::fuchsia::HandleDecoder,
16221 {
16222 fn decode(
16223 mut slot: ::fidl_next::Slot<'_, Self>,
16224 decoder: &mut ___D,
16225 _: (),
16226 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16227 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16228 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16229 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16230 raw,
16231 decoder,
16232 (),
16233 )?,
16234
16235 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
16236 raw,
16237 decoder,
16238 (),
16239 )?,
16240
16241 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
16242 raw,
16243 decoder,
16244 (),
16245 )?,
16246
16247 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16248 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16249 }
16250
16251 Ok(())
16252 }
16253 }
16254
16255 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
16256 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16257 self.as_ref().fmt(f)
16258 }
16259 }
16260
16261 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
16262 type Natural = ::core::option::Option<crate::natural::SampleResourceXUnion>;
16263 }
16264
16265 #[repr(transparent)]
16266 pub struct SampleStrictResourceXUnion<'de> {
16267 pub(crate) raw: ::fidl_next::wire::Union,
16268 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16269 }
16270
16271 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
16272 type Constraint = ();
16273
16274 fn validate(
16275 _: ::fidl_next::Slot<'_, Self>,
16276 _: Self::Constraint,
16277 ) -> Result<(), ::fidl_next::ValidationError> {
16278 Ok(())
16279 }
16280 }
16281
16282 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
16283 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
16284
16285 #[inline]
16286 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16287 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16288 ::fidl_next::wire::Union::zero_padding(raw);
16289 }
16290 }
16291
16292 impl<'de> SampleStrictResourceXUnion<'de> {
16293 pub fn is_some(&self) -> bool {
16294 self.raw.is_some()
16295 }
16296
16297 pub fn is_none(&self) -> bool {
16298 self.raw.is_none()
16299 }
16300
16301 pub fn as_ref(
16302 &self,
16303 ) -> ::core::option::Option<&crate::wire::SampleStrictResourceXUnion<'de>> {
16304 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16305 }
16306
16307 pub fn into_option(
16308 self,
16309 ) -> ::core::option::Option<crate::wire::SampleStrictResourceXUnion<'de>> {
16310 if self.is_some() {
16311 Some(crate::wire::SampleStrictResourceXUnion {
16312 raw: self.raw,
16313 _phantom: ::core::marker::PhantomData,
16314 })
16315 } else {
16316 None
16317 }
16318 }
16319 }
16320
16321 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
16322 where
16323 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16324 ___D: ::fidl_next::Decoder<'de>,
16325 ___D: ::fidl_next::fuchsia::HandleDecoder,
16326 {
16327 fn decode(
16328 mut slot: ::fidl_next::Slot<'_, Self>,
16329 decoder: &mut ___D,
16330 _: (),
16331 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16332 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16333 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16334 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
16335 raw,
16336 decoder,
16337 (),
16338 )?,
16339
16340 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
16341 raw,
16342 decoder,
16343 (),
16344 )?,
16345
16346 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
16347 raw,
16348 decoder,
16349 (),
16350 )?,
16351
16352 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16353 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16354 }
16355
16356 Ok(())
16357 }
16358 }
16359
16360 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
16361 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16362 self.as_ref().fmt(f)
16363 }
16364 }
16365
16366 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
16367 type Natural = ::core::option::Option<crate::natural::SampleStrictResourceXUnion>;
16368 }
16369
16370 #[repr(transparent)]
16371 pub struct UnionWithVector<'de> {
16372 pub(crate) raw: ::fidl_next::wire::Union,
16373 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16374 }
16375
16376 impl ::fidl_next::Constrained for UnionWithVector<'_> {
16377 type Constraint = ();
16378
16379 fn validate(
16380 _: ::fidl_next::Slot<'_, Self>,
16381 _: Self::Constraint,
16382 ) -> Result<(), ::fidl_next::ValidationError> {
16383 Ok(())
16384 }
16385 }
16386
16387 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
16388 type Narrowed<'de> = UnionWithVector<'de>;
16389
16390 #[inline]
16391 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16392 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16393 ::fidl_next::wire::Union::zero_padding(raw);
16394 }
16395 }
16396
16397 impl<'de> UnionWithVector<'de> {
16398 pub fn is_some(&self) -> bool {
16399 self.raw.is_some()
16400 }
16401
16402 pub fn is_none(&self) -> bool {
16403 self.raw.is_none()
16404 }
16405
16406 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
16407 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16408 }
16409
16410 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
16411 if self.is_some() {
16412 Some(crate::wire::UnionWithVector {
16413 raw: self.raw,
16414 _phantom: ::core::marker::PhantomData,
16415 })
16416 } else {
16417 None
16418 }
16419 }
16420 }
16421
16422 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
16423 where
16424 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16425 ___D: ::fidl_next::Decoder<'de>,
16426 ___D: ::fidl_next::fuchsia::HandleDecoder,
16427 {
16428 fn decode(
16429 mut slot: ::fidl_next::Slot<'_, Self>,
16430 decoder: &mut ___D,
16431 _: (),
16432 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16433 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16434 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16435 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
16436
16437 2 => {
16438 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
16439 raw,
16440 decoder,
16441 (4294967295, ()),
16442 )?
16443 }
16444
16445 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
16446 raw, decoder, 4294967295,
16447 )?,
16448
16449 4 => ::fidl_next::wire::Union::decode_as::<
16450 ___D,
16451 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
16452 >(raw, decoder, (4294967295, ()))?,
16453
16454 5 => ::fidl_next::wire::Union::decode_as::<
16455 ___D,
16456 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
16457 >(raw, decoder, (4294967295, ()))?,
16458
16459 6 => ::fidl_next::wire::Union::decode_as::<
16460 ___D,
16461 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
16462 >(raw, decoder, (4294967295, ()))?,
16463
16464 7 => ::fidl_next::wire::Union::decode_as::<
16465 ___D,
16466 [crate::wire::StructSize3Align1; 2],
16467 >(raw, decoder, ())?,
16468
16469 8 => ::fidl_next::wire::Union::decode_as::<
16470 ___D,
16471 [crate::wire::StructSize3Align2; 2],
16472 >(raw, decoder, ())?,
16473
16474 9 => ::fidl_next::wire::Union::decode_as::<
16475 ___D,
16476 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
16477 >(raw, decoder, (4294967295, ()))?,
16478
16479 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16480 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16481 }
16482
16483 Ok(())
16484 }
16485 }
16486
16487 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
16488 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16489 self.as_ref().fmt(f)
16490 }
16491 }
16492
16493 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
16494 type Natural = ::core::option::Option<crate::natural::UnionWithVector>;
16495 }
16496
16497 #[repr(transparent)]
16498 pub struct UnionOfEndpointsUnion<'de> {
16499 pub(crate) raw: ::fidl_next::wire::Union,
16500 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16501 }
16502
16503 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
16504 type Constraint = ();
16505
16506 fn validate(
16507 _: ::fidl_next::Slot<'_, Self>,
16508 _: Self::Constraint,
16509 ) -> Result<(), ::fidl_next::ValidationError> {
16510 Ok(())
16511 }
16512 }
16513
16514 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
16515 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
16516
16517 #[inline]
16518 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16519 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16520 ::fidl_next::wire::Union::zero_padding(raw);
16521 }
16522 }
16523
16524 impl<'de> UnionOfEndpointsUnion<'de> {
16525 pub fn is_some(&self) -> bool {
16526 self.raw.is_some()
16527 }
16528
16529 pub fn is_none(&self) -> bool {
16530 self.raw.is_none()
16531 }
16532
16533 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfEndpointsUnion<'de>> {
16534 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16535 }
16536
16537 pub fn into_option(
16538 self,
16539 ) -> ::core::option::Option<crate::wire::UnionOfEndpointsUnion<'de>> {
16540 if self.is_some() {
16541 Some(crate::wire::UnionOfEndpointsUnion {
16542 raw: self.raw,
16543 _phantom: ::core::marker::PhantomData,
16544 })
16545 } else {
16546 None
16547 }
16548 }
16549 }
16550
16551 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
16552 where
16553 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16554 ___D: ::fidl_next::Decoder<'de>,
16555 ___D: ::fidl_next::fuchsia::HandleDecoder,
16556 {
16557 fn decode(
16558 mut slot: ::fidl_next::Slot<'_, Self>,
16559 decoder: &mut ___D,
16560 _: (),
16561 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16562 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16563 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16564 1 => ::fidl_next::wire::Union::decode_as::<
16565 ___D,
16566 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
16567 >(raw, decoder, ())?,
16568
16569 2 => ::fidl_next::wire::Union::decode_as::<
16570 ___D,
16571 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
16572 >(raw, decoder, ())?,
16573
16574 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16575 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16576 }
16577
16578 Ok(())
16579 }
16580 }
16581
16582 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
16583 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16584 self.as_ref().fmt(f)
16585 }
16586 }
16587
16588 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
16589 type Natural = ::core::option::Option<crate::natural::UnionOfEndpointsUnion>;
16590 }
16591
16592 #[repr(transparent)]
16593 pub struct UnionOfHandle {
16594 pub(crate) raw: ::fidl_next::wire::Union,
16595 pub(crate) _phantom: ::core::marker::PhantomData<()>,
16596 }
16597
16598 impl ::fidl_next::Constrained for UnionOfHandle {
16599 type Constraint = ();
16600
16601 fn validate(
16602 _: ::fidl_next::Slot<'_, Self>,
16603 _: Self::Constraint,
16604 ) -> Result<(), ::fidl_next::ValidationError> {
16605 Ok(())
16606 }
16607 }
16608
16609 unsafe impl ::fidl_next::Wire for UnionOfHandle {
16610 type Narrowed<'de> = UnionOfHandle;
16611
16612 #[inline]
16613 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16614 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16615 ::fidl_next::wire::Union::zero_padding(raw);
16616 }
16617 }
16618
16619 impl UnionOfHandle {
16620 pub fn is_some(&self) -> bool {
16621 self.raw.is_some()
16622 }
16623
16624 pub fn is_none(&self) -> bool {
16625 self.raw.is_none()
16626 }
16627
16628 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfHandle> {
16629 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16630 }
16631
16632 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionOfHandle> {
16633 if self.is_some() {
16634 Some(crate::wire::UnionOfHandle {
16635 raw: self.raw,
16636 _phantom: ::core::marker::PhantomData,
16637 })
16638 } else {
16639 None
16640 }
16641 }
16642 }
16643
16644 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
16645 where
16646 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16647 ___D: ::fidl_next::fuchsia::HandleDecoder,
16648 {
16649 fn decode(
16650 mut slot: ::fidl_next::Slot<'_, Self>,
16651 decoder: &mut ___D,
16652 _: (),
16653 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16654 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16655 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16656 1 => ::fidl_next::wire::Union::decode_as_static::<
16657 ___D,
16658 ::fidl_next::wire::fuchsia::NullableHandle,
16659 >(raw, decoder, ())?,
16660
16661 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16662 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
16663 }
16664
16665 Ok(())
16666 }
16667 }
16668
16669 impl ::core::fmt::Debug for UnionOfHandle {
16670 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16671 self.as_ref().fmt(f)
16672 }
16673 }
16674
16675 impl ::fidl_next::IntoNatural for UnionOfHandle {
16676 type Natural = ::core::option::Option<crate::natural::UnionOfHandle>;
16677 }
16678
16679 #[repr(transparent)]
16680 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16681 pub(crate) raw: ::fidl_next::wire::Union,
16682 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16683 }
16684
16685 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
16686 type Constraint = ();
16687
16688 fn validate(
16689 _: ::fidl_next::Slot<'_, Self>,
16690 _: Self::Constraint,
16691 ) -> Result<(), ::fidl_next::ValidationError> {
16692 Ok(())
16693 }
16694 }
16695
16696 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
16697 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
16698
16699 #[inline]
16700 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16701 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16702 ::fidl_next::wire::Union::zero_padding(raw);
16703 }
16704 }
16705
16706 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16707 pub fn is_some(&self) -> bool {
16708 self.raw.is_some()
16709 }
16710
16711 pub fn is_none(&self) -> bool {
16712 self.raw.is_none()
16713 }
16714
16715 pub fn as_ref(
16716 &self,
16717 ) -> ::core::option::Option<&crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
16718 {
16719 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16720 }
16721
16722 pub fn into_option(
16723 self,
16724 ) -> ::core::option::Option<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
16725 {
16726 if self.is_some() {
16727 Some(crate::wire::VectorOfArrayOfEventInUnionWithReducedRights {
16728 raw: self.raw,
16729 _phantom: ::core::marker::PhantomData,
16730 })
16731 } else {
16732 None
16733 }
16734 }
16735 }
16736
16737 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16738 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
16739 where
16740 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16741 ___D: ::fidl_next::Decoder<'de>,
16742 ___D: ::fidl_next::fuchsia::HandleDecoder,
16743 {
16744 fn decode(
16745 mut slot: ::fidl_next::Slot<'_, Self>,
16746 decoder: &mut ___D,
16747 _: (),
16748 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16749 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16750 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16751 1 => ::fidl_next::wire::Union::decode_as::<
16752 ___D,
16753 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16754 >(raw, decoder, (1, ()))?,
16755
16756 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16757 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16758 }
16759
16760 Ok(())
16761 }
16762 }
16763
16764 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16765 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16766 self.as_ref().fmt(f)
16767 }
16768 }
16769
16770 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16771 type Natural =
16772 ::core::option::Option<crate::natural::VectorOfArrayOfEventInUnionWithReducedRights>;
16773 }
16774}
16775
16776pub mod generic {
16777
16778 pub use fidl_next_common_test_conformance::generic::*;
16779
16780 pub struct AlternatingHandlesAndFailures<T0, T1, T2, T3, T4> {
16782 pub h1: T0,
16783
16784 pub failure_trigger1: T1,
16785
16786 pub h2: T2,
16787
16788 pub failure_trigger2: T3,
16789
16790 pub h3: T4,
16791 }
16792
16793 unsafe impl<___E, T0, T1, T2, T3, T4>
16794 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
16795 for AlternatingHandlesAndFailures<T0, T1, T2, T3, T4>
16796 where
16797 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16798 ___E: ::fidl_next::Encoder,
16799 ___E: ::fidl_next::fuchsia::HandleEncoder,
16800 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
16801 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
16802 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
16803 T3: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
16804 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
16805 {
16806 #[inline]
16807 fn encode(
16808 self,
16809 encoder_: &mut ___E,
16810 out_: &mut ::core::mem::MaybeUninit<
16811 crate::wire::AlternatingHandlesAndFailures<'static>,
16812 >,
16813 _: (),
16814 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16815 ::fidl_next::munge! {
16816 let crate::wire::AlternatingHandlesAndFailures {
16817 h1,
16818 failure_trigger1,
16819 h2,
16820 failure_trigger2,
16821 h3,
16822
16823 } = out_;
16824 }
16825
16826 ::fidl_next::Encode::encode(self.h1, encoder_, h1, ())?;
16827
16828 ::fidl_next::Encode::encode(self.failure_trigger1, encoder_, failure_trigger1, 1)?;
16829
16830 ::fidl_next::Encode::encode(self.h2, encoder_, h2, ())?;
16831
16832 ::fidl_next::Encode::encode(self.failure_trigger2, encoder_, failure_trigger2, 1)?;
16833
16834 ::fidl_next::Encode::encode(self.h3, encoder_, h3, ())?;
16835
16836 Ok(())
16837 }
16838 }
16839
16840 pub struct ArrayOfArrayOfNonnullableHandles<T0> {
16842 pub handles: T0,
16843 }
16844
16845 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
16846 for ArrayOfArrayOfNonnullableHandles<T0>
16847 where
16848 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16849 ___E: ::fidl_next::fuchsia::HandleEncoder,
16850 T0: ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>,
16851 {
16852 #[inline]
16853 fn encode(
16854 self,
16855 encoder_: &mut ___E,
16856 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
16857 _: (),
16858 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16859 ::fidl_next::munge! {
16860 let crate::wire::ArrayOfArrayOfNonnullableHandles {
16861 handles,
16862
16863 } = out_;
16864 }
16865
16866 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
16867
16868 Ok(())
16869 }
16870 }
16871
16872 pub struct ArrayOfHandles<T0> {
16874 pub a: T0,
16875 }
16876
16877 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E> for ArrayOfHandles<T0>
16878 where
16879 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16880 ___E: ::fidl_next::fuchsia::HandleEncoder,
16881 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 3], ___E>,
16882 {
16883 #[inline]
16884 fn encode(
16885 self,
16886 encoder_: &mut ___E,
16887 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
16888 _: (),
16889 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16890 ::fidl_next::munge! {
16891 let crate::wire::ArrayOfHandles {
16892 a,
16893
16894 } = out_;
16895 }
16896
16897 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
16898
16899 Ok(())
16900 }
16901 }
16902
16903 pub struct ArrayOfNonnullableHandles<T0> {
16905 pub handles: T0,
16906 }
16907
16908 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
16909 for ArrayOfNonnullableHandles<T0>
16910 where
16911 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16912 ___E: ::fidl_next::fuchsia::HandleEncoder,
16913 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
16914 {
16915 #[inline]
16916 fn encode(
16917 self,
16918 encoder_: &mut ___E,
16919 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
16920 _: (),
16921 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16922 ::fidl_next::munge! {
16923 let crate::wire::ArrayOfNonnullableHandles {
16924 handles,
16925
16926 } = out_;
16927 }
16928
16929 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
16930
16931 Ok(())
16932 }
16933 }
16934
16935 pub struct ArrayOfNullableHandles<T0> {
16937 pub handles: T0,
16938 }
16939
16940 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
16941 for ArrayOfNullableHandles<T0>
16942 where
16943 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16944 ___E: ::fidl_next::fuchsia::HandleEncoder,
16945 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>,
16946 {
16947 #[inline]
16948 fn encode(
16949 self,
16950 encoder_: &mut ___E,
16951 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
16952 _: (),
16953 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16954 ::fidl_next::munge! {
16955 let crate::wire::ArrayOfNullableHandles {
16956 handles,
16957
16958 } = out_;
16959 }
16960
16961 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
16962
16963 Ok(())
16964 }
16965 }
16966
16967 pub struct ArrayOfOptionalHandles<T0> {
16969 pub a: T0,
16970 }
16971
16972 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
16973 for ArrayOfOptionalHandles<T0>
16974 where
16975 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16976 ___E: ::fidl_next::fuchsia::HandleEncoder,
16977 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>,
16978 {
16979 #[inline]
16980 fn encode(
16981 self,
16982 encoder_: &mut ___E,
16983 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
16984 _: (),
16985 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16986 ::fidl_next::munge! {
16987 let crate::wire::ArrayOfOptionalHandles {
16988 a,
16989
16990 } = out_;
16991 }
16992
16993 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
16994
16995 Ok(())
16996 }
16997 }
16998
16999 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<T0> {
17001 pub h: T0,
17002 }
17003
17004 unsafe impl<___E, T0>
17005 ::fidl_next::Encode<
17006 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
17007 ___E,
17008 > for ArrayOfVectorOfEventInStructWithDefaultRights<T0>
17009 where
17010 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17011 ___E: ::fidl_next::Encoder,
17012 ___E: ::fidl_next::fuchsia::HandleEncoder,
17013 T0: ::fidl_next::Encode<
17014 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
17015 ___E,
17016 >,
17017 {
17018 #[inline]
17019 fn encode(
17020 self,
17021 encoder_: &mut ___E,
17022 out_: &mut ::core::mem::MaybeUninit<
17023 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
17024 >,
17025 _: (),
17026 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17027 ::fidl_next::munge! {
17028 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
17029 h,
17030
17031 } = out_;
17032 }
17033
17034 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
17035
17036 Ok(())
17037 }
17038 }
17039
17040 pub struct ArrayOfVectorOfEventInStructWithReducedRights<T0> {
17042 pub h: T0,
17043 }
17044
17045 unsafe impl<___E, T0>
17046 ::fidl_next::Encode<
17047 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
17048 ___E,
17049 > for ArrayOfVectorOfEventInStructWithReducedRights<T0>
17050 where
17051 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17052 ___E: ::fidl_next::Encoder,
17053 ___E: ::fidl_next::fuchsia::HandleEncoder,
17054 T0: ::fidl_next::Encode<
17055 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
17056 ___E,
17057 >,
17058 {
17059 #[inline]
17060 fn encode(
17061 self,
17062 encoder_: &mut ___E,
17063 out_: &mut ::core::mem::MaybeUninit<
17064 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
17065 >,
17066 _: (),
17067 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17068 ::fidl_next::munge! {
17069 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
17070 h,
17071
17072 } = out_;
17073 }
17074
17075 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
17076
17077 Ok(())
17078 }
17079 }
17080
17081 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0> {
17083 pub t: T0,
17084 }
17085
17086 unsafe impl<___E, T0>
17087 ::fidl_next::Encode<
17088 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
17089 ___E,
17090 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0>
17091 where
17092 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17093 ___E: ::fidl_next::Encoder,
17094 ___E: ::fidl_next::fuchsia::HandleEncoder,
17095 T0: ::fidl_next::Encode<
17096 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
17097 ___E,
17098 >,
17099 {
17100 #[inline]
17101 fn encode(
17102 self,
17103 encoder_: &mut ___E,
17104 out_: &mut ::core::mem::MaybeUninit<
17105 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
17106 >,
17107 _: (),
17108 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17109 ::fidl_next::munge! {
17110 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
17111 t,
17112
17113 } = out_;
17114 }
17115
17116 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
17117
17118 Ok(())
17119 }
17120 }
17121
17122 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0> {
17124 pub t: T0,
17125 }
17126
17127 unsafe impl<___E, T0>
17128 ::fidl_next::Encode<
17129 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
17130 ___E,
17131 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0>
17132 where
17133 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17134 ___E: ::fidl_next::Encoder,
17135 ___E: ::fidl_next::fuchsia::HandleEncoder,
17136 T0: ::fidl_next::Encode<
17137 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
17138 ___E,
17139 >,
17140 {
17141 #[inline]
17142 fn encode(
17143 self,
17144 encoder_: &mut ___E,
17145 out_: &mut ::core::mem::MaybeUninit<
17146 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
17147 >,
17148 _: (),
17149 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17150 ::fidl_next::munge! {
17151 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
17152 t,
17153
17154 } = out_;
17155 }
17156
17157 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
17158
17159 Ok(())
17160 }
17161 }
17162
17163 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0> {
17165 pub u: T0,
17166 }
17167
17168 unsafe impl<___E, T0>
17169 ::fidl_next::Encode<
17170 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
17171 ___E,
17172 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0>
17173 where
17174 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17175 ___E: ::fidl_next::Encoder,
17176 ___E: ::fidl_next::fuchsia::HandleEncoder,
17177 T0: ::fidl_next::Encode<
17178 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
17179 ___E,
17180 >,
17181 {
17182 #[inline]
17183 fn encode(
17184 self,
17185 encoder_: &mut ___E,
17186 out_: &mut ::core::mem::MaybeUninit<
17187 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
17188 >,
17189 _: (),
17190 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17191 ::fidl_next::munge! {
17192 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
17193 u,
17194
17195 } = out_;
17196 }
17197
17198 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17199
17200 Ok(())
17201 }
17202 }
17203
17204 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0> {
17206 pub u: T0,
17207 }
17208
17209 unsafe impl<___E, T0>
17210 ::fidl_next::Encode<
17211 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
17212 ___E,
17213 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0>
17214 where
17215 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17216 ___E: ::fidl_next::Encoder,
17217 ___E: ::fidl_next::fuchsia::HandleEncoder,
17218 T0: ::fidl_next::Encode<
17219 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
17220 ___E,
17221 >,
17222 {
17223 #[inline]
17224 fn encode(
17225 self,
17226 encoder_: &mut ___E,
17227 out_: &mut ::core::mem::MaybeUninit<
17228 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
17229 >,
17230 _: (),
17231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17232 ::fidl_next::munge! {
17233 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
17234 u,
17235
17236 } = out_;
17237 }
17238
17239 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17240
17241 Ok(())
17242 }
17243 }
17244
17245 pub struct Bounded32NonnullableVectorOfHandles<T0> {
17247 pub vh0: T0,
17248 }
17249
17250 unsafe impl<___E, T0>
17251 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
17252 for Bounded32NonnullableVectorOfHandles<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 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
17259 ___E,
17260 >,
17261 {
17262 #[inline]
17263 fn encode(
17264 self,
17265 encoder_: &mut ___E,
17266 out_: &mut ::core::mem::MaybeUninit<
17267 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
17268 >,
17269 _: (),
17270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17271 ::fidl_next::munge! {
17272 let crate::wire::Bounded32NonnullableVectorOfHandles {
17273 vh0,
17274
17275 } = out_;
17276 }
17277
17278 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
17279
17280 Ok(())
17281 }
17282 }
17283
17284 pub struct Bounded32NullableVectorOfHandles<T0> {
17286 pub vh0: T0,
17287 }
17288
17289 unsafe impl<___E, T0>
17290 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
17291 for Bounded32NullableVectorOfHandles<T0>
17292 where
17293 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17294 ___E: ::fidl_next::Encoder,
17295 ___E: ::fidl_next::fuchsia::HandleEncoder,
17296 T0: ::fidl_next::Encode<
17297 ::fidl_next::wire::OptionalVector<
17298 'static,
17299 ::fidl_next::wire::fuchsia::NullableHandle,
17300 >,
17301 ___E,
17302 >,
17303 {
17304 #[inline]
17305 fn encode(
17306 self,
17307 encoder_: &mut ___E,
17308 out_: &mut ::core::mem::MaybeUninit<
17309 crate::wire::Bounded32NullableVectorOfHandles<'static>,
17310 >,
17311 _: (),
17312 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17313 ::fidl_next::munge! {
17314 let crate::wire::Bounded32NullableVectorOfHandles {
17315 vh0,
17316
17317 } = out_;
17318 }
17319
17320 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
17321
17322 Ok(())
17323 }
17324 }
17325
17326 pub struct BoxOfSingleHandle<T0> {
17328 pub b: T0,
17329 }
17330
17331 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
17332 for BoxOfSingleHandle<T0>
17333 where
17334 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17335 ___E: ::fidl_next::Encoder,
17336 ___E: ::fidl_next::fuchsia::HandleEncoder,
17337 T0: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>,
17338 {
17339 #[inline]
17340 fn encode(
17341 self,
17342 encoder_: &mut ___E,
17343 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
17344 _: (),
17345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17346 ::fidl_next::munge! {
17347 let crate::wire::BoxOfSingleHandle {
17348 b,
17349
17350 } = out_;
17351 }
17352
17353 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
17354
17355 Ok(())
17356 }
17357 }
17358
17359 pub struct BoxOfSingleOptionalHandle<T0> {
17361 pub b: T0,
17362 }
17363
17364 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
17365 for BoxOfSingleOptionalHandle<T0>
17366 where
17367 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17368 ___E: ::fidl_next::Encoder,
17369 ___E: ::fidl_next::fuchsia::HandleEncoder,
17370 T0: ::fidl_next::Encode<
17371 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
17372 ___E,
17373 >,
17374 {
17375 #[inline]
17376 fn encode(
17377 self,
17378 encoder_: &mut ___E,
17379 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
17380 _: (),
17381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17382 ::fidl_next::munge! {
17383 let crate::wire::BoxOfSingleOptionalHandle {
17384 b,
17385
17386 } = out_;
17387 }
17388
17389 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
17390
17391 Ok(())
17392 }
17393 }
17394
17395 pub struct LaunchInfo<T0, T1, T2, T3, T4, T5, T6> {
17397 pub url: T0,
17398
17399 pub arguments: T1,
17400
17401 pub out: T2,
17402
17403 pub err: T3,
17404
17405 pub directory_request: T4,
17406
17407 pub flat_namespace: T5,
17408
17409 pub additional_services: T6,
17410 }
17411
17412 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
17413 ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>
17414 for LaunchInfo<T0, T1, T2, T3, T4, T5, T6>
17415 where
17416 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17417 ___E: ::fidl_next::Encoder,
17418 ___E: ::fidl_next::fuchsia::HandleEncoder,
17419 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17420 T1: ::fidl_next::Encode<
17421 ::fidl_next::wire::OptionalVector<'static, ::fidl_next::wire::String<'static>>,
17422 ___E,
17423 >,
17424 T2: ::fidl_next::Encode<
17425 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17426 ___E,
17427 >,
17428 T3: ::fidl_next::Encode<
17429 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17430 ___E,
17431 >,
17432 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
17433 T5: ::fidl_next::Encode<
17434 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17435 ___E,
17436 >,
17437 T6: ::fidl_next::Encode<
17438 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
17439 ___E,
17440 >,
17441 {
17442 #[inline]
17443 fn encode(
17444 self,
17445 encoder_: &mut ___E,
17446 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
17447 _: (),
17448 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17449 ::fidl_next::munge! {
17450 let crate::wire::LaunchInfo {
17451 url,
17452 arguments,
17453 out,
17454 err,
17455 directory_request,
17456 flat_namespace,
17457 additional_services,
17458
17459 } = out_;
17460 }
17461
17462 ::fidl_next::Encode::encode(self.url, encoder_, url, 200)?;
17463
17464 ::fidl_next::Encode::encode(
17465 self.arguments,
17466 encoder_,
17467 arguments,
17468 (4294967295, 4294967295),
17469 )?;
17470
17471 ::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
17472
17473 ::fidl_next::Encode::encode(self.err, encoder_, err, ())?;
17474
17475 ::fidl_next::Encode::encode(self.directory_request, encoder_, directory_request, ())?;
17476
17477 ::fidl_next::Encode::encode(self.flat_namespace, encoder_, flat_namespace, ())?;
17478
17479 ::fidl_next::Encode::encode(
17480 self.additional_services,
17481 encoder_,
17482 additional_services,
17483 (),
17484 )?;
17485
17486 Ok(())
17487 }
17488 }
17489
17490 pub struct CreateComponentRequest<T0, T1> {
17492 pub launch_info: T0,
17493
17494 pub controller: T1,
17495 }
17496
17497 unsafe impl<___E, T0, T1>
17498 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
17499 for CreateComponentRequest<T0, T1>
17500 where
17501 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17502 ___E: ::fidl_next::Encoder,
17503 ___E: ::fidl_next::fuchsia::HandleEncoder,
17504 T0: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
17505 T1: ::fidl_next::Encode<
17506 ::fidl_next::ServerEnd<
17507 crate::ComponentController,
17508 ::fidl_next::wire::fuchsia::OptionalChannel,
17509 >,
17510 ___E,
17511 >,
17512 {
17513 #[inline]
17514 fn encode(
17515 self,
17516 encoder_: &mut ___E,
17517 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
17518 _: (),
17519 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17520 ::fidl_next::munge! {
17521 let crate::wire::CreateComponentRequest {
17522 launch_info,
17523 controller,
17524
17525 } = out_;
17526 }
17527
17528 ::fidl_next::Encode::encode(self.launch_info, encoder_, launch_info, ())?;
17529
17530 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
17531
17532 Ok(())
17533 }
17534 }
17535
17536 pub struct EmptyResourceTableStruct<T0> {
17538 pub table: T0,
17539 }
17540
17541 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
17542 for EmptyResourceTableStruct<T0>
17543 where
17544 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17545 ___E: ::fidl_next::Encoder,
17546 ___E: ::fidl_next::fuchsia::HandleEncoder,
17547 T0: ::fidl_next::Encode<crate::wire::EmptyResourceTable<'static>, ___E>,
17548 {
17549 #[inline]
17550 fn encode(
17551 self,
17552 encoder_: &mut ___E,
17553 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
17554 _: (),
17555 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17556 ::fidl_next::munge! {
17557 let crate::wire::EmptyResourceTableStruct {
17558 table,
17559
17560 } = out_;
17561 }
17562
17563 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
17564
17565 Ok(())
17566 }
17567 }
17568
17569 pub struct EnvelopeInliningTestUnionStruct<T0> {
17571 pub u: T0,
17572 }
17573
17574 unsafe impl<___E, T0>
17575 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
17576 for EnvelopeInliningTestUnionStruct<T0>
17577 where
17578 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17579 ___E: ::fidl_next::Encoder,
17580 ___E: ::fidl_next::fuchsia::HandleEncoder,
17581 T0: ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
17582 {
17583 #[inline]
17584 fn encode(
17585 self,
17586 encoder_: &mut ___E,
17587 out_: &mut ::core::mem::MaybeUninit<
17588 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
17589 >,
17590 _: (),
17591 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17592 ::fidl_next::munge! {
17593 let crate::wire::EnvelopeInliningTestUnionStruct {
17594 u,
17595
17596 } = out_;
17597 }
17598
17599 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
17600
17601 Ok(())
17602 }
17603 }
17604
17605 pub struct EventWithDefaultRights<T0> {
17607 pub h: T0,
17608 }
17609
17610 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
17611 for EventWithDefaultRights<T0>
17612 where
17613 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17614 ___E: ::fidl_next::fuchsia::HandleEncoder,
17615 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
17616 {
17617 #[inline]
17618 fn encode(
17619 self,
17620 encoder_: &mut ___E,
17621 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
17622 _: (),
17623 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17624 ::fidl_next::munge! {
17625 let crate::wire::EventWithDefaultRights {
17626 h,
17627
17628 } = out_;
17629 }
17630
17631 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
17632
17633 Ok(())
17634 }
17635 }
17636
17637 pub struct EventWithReducedRights<T0> {
17639 pub h: T0,
17640 }
17641
17642 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
17643 for EventWithReducedRights<T0>
17644 where
17645 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17646 ___E: ::fidl_next::fuchsia::HandleEncoder,
17647 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
17648 {
17649 #[inline]
17650 fn encode(
17651 self,
17652 encoder_: &mut ___E,
17653 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
17654 _: (),
17655 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17656 ::fidl_next::munge! {
17657 let crate::wire::EventWithReducedRights {
17658 h,
17659
17660 } = out_;
17661 }
17662
17663 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
17664
17665 Ok(())
17666 }
17667 }
17668
17669 pub struct FidlvizDemo<
17671 T0,
17672 T1,
17673 T2,
17674 T3,
17675 T4,
17676 T5,
17677 T6,
17678 T7,
17679 T8,
17680 T9,
17681 T10,
17682 T11,
17683 T12,
17684 T13,
17685 T14,
17686 T15,
17687 T16,
17688 T17,
17689 T18,
17690 T19,
17691 T20,
17692 T21,
17693 T22,
17694 T23,
17695 T24,
17696 T25,
17697 T26,
17698 T27,
17699 T28,
17700 T29,
17701 T30,
17702 > {
17703 pub f1: T0,
17704
17705 pub f2: T1,
17706
17707 pub f3: T2,
17708
17709 pub f4: T3,
17710
17711 pub f5: T4,
17712
17713 pub f6: T5,
17714
17715 pub f7: T6,
17716
17717 pub f8: T7,
17718
17719 pub f9: T8,
17720
17721 pub f10: T9,
17722
17723 pub f11: T10,
17724
17725 pub f12: T11,
17726
17727 pub f13: T12,
17728
17729 pub f14: T13,
17730
17731 pub f15: T14,
17732
17733 pub f16: T15,
17734
17735 pub f17: T16,
17736
17737 pub f18: T17,
17738
17739 pub f19: T18,
17740
17741 pub f20: T19,
17742
17743 pub f21: T20,
17744
17745 pub f22: T21,
17746
17747 pub f23: T22,
17748
17749 pub f24: T23,
17750
17751 pub f25: T24,
17752
17753 pub f26: T25,
17754
17755 pub f27: T26,
17756
17757 pub f28: T27,
17758
17759 pub f29: T28,
17760
17761 pub f30: T29,
17762
17763 pub f31: T30,
17764 }
17765
17766 unsafe impl<
17767 ___E,
17768 T0,
17769 T1,
17770 T2,
17771 T3,
17772 T4,
17773 T5,
17774 T6,
17775 T7,
17776 T8,
17777 T9,
17778 T10,
17779 T11,
17780 T12,
17781 T13,
17782 T14,
17783 T15,
17784 T16,
17785 T17,
17786 T18,
17787 T19,
17788 T20,
17789 T21,
17790 T22,
17791 T23,
17792 T24,
17793 T25,
17794 T26,
17795 T27,
17796 T28,
17797 T29,
17798 T30,
17799 > ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>
17800 for FidlvizDemo<
17801 T0,
17802 T1,
17803 T2,
17804 T3,
17805 T4,
17806 T5,
17807 T6,
17808 T7,
17809 T8,
17810 T9,
17811 T10,
17812 T11,
17813 T12,
17814 T13,
17815 T14,
17816 T15,
17817 T16,
17818 T17,
17819 T18,
17820 T19,
17821 T20,
17822 T21,
17823 T22,
17824 T23,
17825 T24,
17826 T25,
17827 T26,
17828 T27,
17829 T28,
17830 T29,
17831 T30,
17832 >
17833 where
17834 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17835 ___E: ::fidl_next::Encoder,
17836 ___E: ::fidl_next::fuchsia::HandleEncoder,
17837 T0: ::fidl_next::Encode<u8, ___E>,
17838 T1: ::fidl_next::Encode<i8, ___E>,
17839 T2: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
17840 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17841 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17842 T5: ::fidl_next::Encode<u8, ___E>,
17843 T6: ::fidl_next::Encode<u8, ___E>,
17844 T7: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
17845 T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
17846 T9: ::fidl_next::Encode<::fidl_next::wire::Float64, ___E>,
17847 T10: ::fidl_next::Encode<bool, ___E>,
17848 T11: ::fidl_next::Encode<bool, ___E>,
17849 T12: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17850 T13: ::fidl_next::Encode<::fidl_next::wire::OptionalString<'static>, ___E>,
17851 T14: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17852 T15: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
17853 T16: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17854 T17: ::fidl_next::Encode<[u8; 3], ___E>,
17855 T18: ::fidl_next::Encode<
17856 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Float64>,
17857 ___E,
17858 >,
17859 T19: ::fidl_next::Encode<::fidl_next::wire::OptionalVector<'static, u8>, ___E>,
17860 T20: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17861 T21: ::fidl_next::Encode<crate::wire::FidlvizBits, ___E>,
17862 T22: ::fidl_next::Encode<crate::wire::FidlvizEnum, ___E>,
17863 T23: ::fidl_next::Encode<crate::wire::FidlvizStruct1, ___E>,
17864 T24: ::fidl_next::Encode<crate::wire::FidlvizStruct2, ___E>,
17865 T25:
17866 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct1>, ___E>,
17867 T26:
17868 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct2>, ___E>,
17869 T27: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
17870 T28: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
17871 T29: ::fidl_next::Encode<crate::wire_optional::FidlvizUnion<'static>, ___E>,
17872 T30: ::fidl_next::Encode<crate::wire::FidlvizUnion<'static>, ___E>,
17873 {
17874 #[inline]
17875 fn encode(
17876 self,
17877 encoder_: &mut ___E,
17878 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
17879 _: (),
17880 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17881 ::fidl_next::munge! {
17882 let crate::wire::FidlvizDemo {
17883 f1,
17884 f2,
17885 f3,
17886 f4,
17887 f5,
17888 f6,
17889 f7,
17890 f8,
17891 f9,
17892 f10,
17893 f11,
17894 f12,
17895 f13,
17896 f14,
17897 f15,
17898 f16,
17899 f17,
17900 f18,
17901 f19,
17902 f20,
17903 f21,
17904 f22,
17905 f23,
17906 f24,
17907 f25,
17908 f26,
17909 f27,
17910 f28,
17911 f29,
17912 f30,
17913 f31,
17914
17915 } = out_;
17916 }
17917
17918 ::fidl_next::Encode::encode(self.f1, encoder_, f1, ())?;
17919
17920 ::fidl_next::Encode::encode(self.f2, encoder_, f2, ())?;
17921
17922 ::fidl_next::Encode::encode(self.f3, encoder_, f3, ())?;
17923
17924 ::fidl_next::Encode::encode(self.f4, encoder_, f4, ())?;
17925
17926 ::fidl_next::Encode::encode(self.f5, encoder_, f5, ())?;
17927
17928 ::fidl_next::Encode::encode(self.f6, encoder_, f6, ())?;
17929
17930 ::fidl_next::Encode::encode(self.f7, encoder_, f7, ())?;
17931
17932 ::fidl_next::Encode::encode(self.f8, encoder_, f8, ())?;
17933
17934 ::fidl_next::Encode::encode(self.f9, encoder_, f9, ())?;
17935
17936 ::fidl_next::Encode::encode(self.f10, encoder_, f10, ())?;
17937
17938 ::fidl_next::Encode::encode(self.f11, encoder_, f11, ())?;
17939
17940 ::fidl_next::Encode::encode(self.f12, encoder_, f12, ())?;
17941
17942 ::fidl_next::Encode::encode(self.f13, encoder_, f13, 4294967295)?;
17943
17944 ::fidl_next::Encode::encode(self.f14, encoder_, f14, 4294967295)?;
17945
17946 ::fidl_next::Encode::encode(self.f15, encoder_, f15, 4294967295)?;
17947
17948 ::fidl_next::Encode::encode(self.f16, encoder_, f16, ())?;
17949
17950 ::fidl_next::Encode::encode(self.f17, encoder_, f17, ())?;
17951
17952 ::fidl_next::Encode::encode(self.f18, encoder_, f18, ())?;
17953
17954 ::fidl_next::Encode::encode(self.f19, encoder_, f19, (4294967295, ()))?;
17955
17956 ::fidl_next::Encode::encode(self.f20, encoder_, f20, (4294967295, ()))?;
17957
17958 ::fidl_next::Encode::encode(self.f21, encoder_, f21, (4294967295, ()))?;
17959
17960 ::fidl_next::Encode::encode(self.f22, encoder_, f22, ())?;
17961
17962 ::fidl_next::Encode::encode(self.f23, encoder_, f23, ())?;
17963
17964 ::fidl_next::Encode::encode(self.f24, encoder_, f24, ())?;
17965
17966 ::fidl_next::Encode::encode(self.f25, encoder_, f25, ())?;
17967
17968 ::fidl_next::Encode::encode(self.f26, encoder_, f26, ())?;
17969
17970 ::fidl_next::Encode::encode(self.f27, encoder_, f27, ())?;
17971
17972 ::fidl_next::Encode::encode(self.f28, encoder_, f28, ())?;
17973
17974 ::fidl_next::Encode::encode(self.f29, encoder_, f29, ())?;
17975
17976 ::fidl_next::Encode::encode(self.f30, encoder_, f30, ())?;
17977
17978 ::fidl_next::Encode::encode(self.f31, encoder_, f31, ())?;
17979
17980 Ok(())
17981 }
17982 }
17983
17984 pub struct GoldenHandleBasicRightsStruct<T0> {
17986 pub v: T0,
17987 }
17988
17989 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
17990 for GoldenHandleBasicRightsStruct<T0>
17991 where
17992 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17993 ___E: ::fidl_next::fuchsia::HandleEncoder,
17994 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
17995 {
17996 #[inline]
17997 fn encode(
17998 self,
17999 encoder_: &mut ___E,
18000 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
18001 _: (),
18002 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18003 ::fidl_next::munge! {
18004 let crate::wire::GoldenHandleBasicRightsStruct {
18005 v,
18006
18007 } = out_;
18008 }
18009
18010 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
18011
18012 Ok(())
18013 }
18014 }
18015
18016 pub struct GoldenNullableHandleStruct<T0> {
18018 pub v: T0,
18019 }
18020
18021 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
18022 for GoldenNullableHandleStruct<T0>
18023 where
18024 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18025 ___E: ::fidl_next::fuchsia::HandleEncoder,
18026 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18027 {
18028 #[inline]
18029 fn encode(
18030 self,
18031 encoder_: &mut ___E,
18032 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
18033 _: (),
18034 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18035 ::fidl_next::munge! {
18036 let crate::wire::GoldenNullableHandleStruct {
18037 v,
18038
18039 } = out_;
18040 }
18041
18042 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
18043
18044 Ok(())
18045 }
18046 }
18047
18048 pub struct MultipleBoundedNonnullableVectorsOfHandles<T0, T1> {
18050 pub vh0: T0,
18051
18052 pub vh1: T1,
18053 }
18054
18055 unsafe impl<___E, T0, T1>
18056 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
18057 for MultipleBoundedNonnullableVectorsOfHandles<T0, T1>
18058 where
18059 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18060 ___E: ::fidl_next::Encoder,
18061 ___E: ::fidl_next::fuchsia::HandleEncoder,
18062 T0: ::fidl_next::Encode<
18063 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18064 ___E,
18065 >,
18066 T1: ::fidl_next::Encode<
18067 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18068 ___E,
18069 >,
18070 {
18071 #[inline]
18072 fn encode(
18073 self,
18074 encoder_: &mut ___E,
18075 out_: &mut ::core::mem::MaybeUninit<
18076 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
18077 >,
18078 _: (),
18079 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18080 ::fidl_next::munge! {
18081 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
18082 vh0,
18083 vh1,
18084
18085 } = out_;
18086 }
18087
18088 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
18089
18090 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
18091
18092 Ok(())
18093 }
18094 }
18095
18096 pub struct MultipleBoundedNullableVectorsOfHandles<T0, T1> {
18098 pub vh0: T0,
18099
18100 pub vh1: T1,
18101 }
18102
18103 unsafe impl<___E, T0, T1>
18104 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
18105 for MultipleBoundedNullableVectorsOfHandles<T0, T1>
18106 where
18107 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18108 ___E: ::fidl_next::Encoder,
18109 ___E: ::fidl_next::fuchsia::HandleEncoder,
18110 T0: ::fidl_next::Encode<
18111 ::fidl_next::wire::OptionalVector<
18112 'static,
18113 ::fidl_next::wire::fuchsia::NullableHandle,
18114 >,
18115 ___E,
18116 >,
18117 T1: ::fidl_next::Encode<
18118 ::fidl_next::wire::OptionalVector<
18119 'static,
18120 ::fidl_next::wire::fuchsia::NullableHandle,
18121 >,
18122 ___E,
18123 >,
18124 {
18125 #[inline]
18126 fn encode(
18127 self,
18128 encoder_: &mut ___E,
18129 out_: &mut ::core::mem::MaybeUninit<
18130 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
18131 >,
18132 _: (),
18133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18134 ::fidl_next::munge! {
18135 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
18136 vh0,
18137 vh1,
18138
18139 } = out_;
18140 }
18141
18142 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
18143
18144 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
18145
18146 Ok(())
18147 }
18148 }
18149
18150 pub struct MultipleHandleSubtypes<T0, T1, T2> {
18152 pub untyped: T0,
18153
18154 pub event: T1,
18155
18156 pub channel: T2,
18157 }
18158
18159 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
18160 for MultipleHandleSubtypes<T0, T1, T2>
18161 where
18162 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18163 ___E: ::fidl_next::fuchsia::HandleEncoder,
18164 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18165 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18166 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
18167 {
18168 #[inline]
18169 fn encode(
18170 self,
18171 encoder_: &mut ___E,
18172 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
18173 _: (),
18174 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18175 ::fidl_next::munge! {
18176 let crate::wire::MultipleHandleSubtypes {
18177 untyped,
18178 event,
18179 channel,
18180
18181 } = out_;
18182 }
18183
18184 ::fidl_next::Encode::encode(self.untyped, encoder_, untyped, ())?;
18185
18186 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
18187
18188 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
18189
18190 Ok(())
18191 }
18192 }
18193
18194 pub struct MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5> {
18196 pub data0: T0,
18197
18198 pub handle0: T1,
18199
18200 pub data1: T2,
18201
18202 pub handle1: T3,
18203
18204 pub handle2: T4,
18205
18206 pub data2: T5,
18207 }
18208
18209 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
18210 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
18211 for MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5>
18212 where
18213 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18214 ___E: ::fidl_next::fuchsia::HandleEncoder,
18215 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18216 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18217 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18218 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
18219 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
18220 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18221 {
18222 #[inline]
18223 fn encode(
18224 self,
18225 encoder_: &mut ___E,
18226 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
18227 _: (),
18228 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18229 ::fidl_next::munge! {
18230 let crate::wire::MultipleNonnullableHandles {
18231 data0,
18232 handle0,
18233 data1,
18234 handle1,
18235 handle2,
18236 data2,
18237
18238 } = out_;
18239 }
18240
18241 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
18242
18243 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
18244
18245 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
18246
18247 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
18248
18249 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
18250
18251 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
18252
18253 Ok(())
18254 }
18255 }
18256
18257 pub struct MultipleNullableHandles<T0, T1, T2, T3, T4, T5> {
18259 pub data0: T0,
18260
18261 pub handle0: T1,
18262
18263 pub data1: T2,
18264
18265 pub handle1: T3,
18266
18267 pub handle2: T4,
18268
18269 pub data2: T5,
18270 }
18271
18272 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
18273 ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
18274 for MultipleNullableHandles<T0, T1, T2, T3, T4, T5>
18275 where
18276 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18277 ___E: ::fidl_next::fuchsia::HandleEncoder,
18278 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18279 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18280 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18281 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
18282 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
18283 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
18284 {
18285 #[inline]
18286 fn encode(
18287 self,
18288 encoder_: &mut ___E,
18289 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
18290 _: (),
18291 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18292 ::fidl_next::munge! {
18293 let crate::wire::MultipleNullableHandles {
18294 data0,
18295 handle0,
18296 data1,
18297 handle1,
18298 handle2,
18299 data2,
18300
18301 } = out_;
18302 }
18303
18304 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
18305
18306 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
18307
18308 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
18309
18310 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
18311
18312 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
18313
18314 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
18315
18316 Ok(())
18317 }
18318 }
18319
18320 pub struct NonnullableHandle<T0> {
18322 pub h: T0,
18323 }
18324
18325 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>
18326 for NonnullableHandle<T0>
18327 where
18328 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18329 ___E: ::fidl_next::fuchsia::HandleEncoder,
18330 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18331 {
18332 #[inline]
18333 fn encode(
18334 self,
18335 encoder_: &mut ___E,
18336 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
18337 _: (),
18338 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18339 ::fidl_next::munge! {
18340 let crate::wire::NonnullableHandle {
18341 h,
18342
18343 } = out_;
18344 }
18345
18346 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18347
18348 Ok(())
18349 }
18350 }
18351
18352 pub struct NonnullableHandleArray<T0> {
18354 pub handles: T0,
18355 }
18356
18357 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
18358 for NonnullableHandleArray<T0>
18359 where
18360 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18361 ___E: ::fidl_next::fuchsia::HandleEncoder,
18362 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
18363 {
18364 #[inline]
18365 fn encode(
18366 self,
18367 encoder_: &mut ___E,
18368 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
18369 _: (),
18370 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18371 ::fidl_next::munge! {
18372 let crate::wire::NonnullableHandleArray {
18373 handles,
18374
18375 } = out_;
18376 }
18377
18378 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
18379
18380 Ok(())
18381 }
18382 }
18383
18384 pub struct NullableHandle<T0> {
18386 pub h: T0,
18387 }
18388
18389 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NullableHandle, ___E> for NullableHandle<T0>
18390 where
18391 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18392 ___E: ::fidl_next::fuchsia::HandleEncoder,
18393 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18394 {
18395 #[inline]
18396 fn encode(
18397 self,
18398 encoder_: &mut ___E,
18399 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
18400 _: (),
18401 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18402 ::fidl_next::munge! {
18403 let crate::wire::NullableHandle {
18404 h,
18405
18406 } = out_;
18407 }
18408
18409 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18410
18411 Ok(())
18412 }
18413 }
18414
18415 pub struct OutOfLineArrayOfNonnullableHandles<T0> {
18417 pub handles: T0,
18418 }
18419
18420 unsafe impl<___E, T0>
18421 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
18422 for OutOfLineArrayOfNonnullableHandles<T0>
18423 where
18424 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18425 ___E: ::fidl_next::Encoder,
18426 ___E: ::fidl_next::fuchsia::HandleEncoder,
18427 T0: ::fidl_next::Encode<
18428 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
18429 ___E,
18430 >,
18431 {
18432 #[inline]
18433 fn encode(
18434 self,
18435 encoder_: &mut ___E,
18436 out_: &mut ::core::mem::MaybeUninit<
18437 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
18438 >,
18439 _: (),
18440 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18441 ::fidl_next::munge! {
18442 let crate::wire::OutOfLineArrayOfNonnullableHandles {
18443 handles,
18444
18445 } = out_;
18446 }
18447
18448 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
18449
18450 Ok(())
18451 }
18452 }
18453
18454 pub struct Sandwich6<T0, T1, T2> {
18456 pub before: T0,
18457
18458 pub the_union: T1,
18459
18460 pub after: T2,
18461 }
18462
18463 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>
18464 for Sandwich6<T0, T1, T2>
18465 where
18466 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18467 ___E: ::fidl_next::Encoder,
18468 ___E: ::fidl_next::fuchsia::HandleEncoder,
18469 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18470 T1: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
18471 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
18472 {
18473 #[inline]
18474 fn encode(
18475 self,
18476 encoder_: &mut ___E,
18477 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
18478 _: (),
18479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18480 ::fidl_next::munge! {
18481 let crate::wire::Sandwich6 {
18482 before,
18483 the_union,
18484 after,
18485
18486 } = out_;
18487 }
18488
18489 ::fidl_next::Encode::encode(self.before, encoder_, before, ())?;
18490
18491 ::fidl_next::Encode::encode(self.the_union, encoder_, the_union, ())?;
18492
18493 ::fidl_next::Encode::encode(self.after, encoder_, after, ())?;
18494
18495 Ok(())
18496 }
18497 }
18498
18499 pub struct ShortStringThenHandle<T0, T1> {
18501 pub s: T0,
18502
18503 pub h: T1,
18504 }
18505
18506 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
18507 for ShortStringThenHandle<T0, T1>
18508 where
18509 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18510 ___E: ::fidl_next::Encoder,
18511 ___E: ::fidl_next::fuchsia::HandleEncoder,
18512 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18513 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18514 {
18515 #[inline]
18516 fn encode(
18517 self,
18518 encoder_: &mut ___E,
18519 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
18520 _: (),
18521 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18522 ::fidl_next::munge! {
18523 let crate::wire::ShortStringThenHandle {
18524 s,
18525 h,
18526
18527 } = out_;
18528 }
18529
18530 ::fidl_next::Encode::encode(self.s, encoder_, s, 1)?;
18531
18532 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18533
18534 Ok(())
18535 }
18536 }
18537
18538 pub struct SingleHandle<T0> {
18540 pub h: T0,
18541 }
18542
18543 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleHandle, ___E> for SingleHandle<T0>
18544 where
18545 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18546 ___E: ::fidl_next::fuchsia::HandleEncoder,
18547 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
18548 {
18549 #[inline]
18550 fn encode(
18551 self,
18552 encoder_: &mut ___E,
18553 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
18554 _: (),
18555 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18556 ::fidl_next::munge! {
18557 let crate::wire::SingleHandle {
18558 h,
18559
18560 } = out_;
18561 }
18562
18563 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18564
18565 Ok(())
18566 }
18567 }
18568
18569 pub struct SingleOptionalHandle<T0> {
18571 pub h: T0,
18572 }
18573
18574 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
18575 for SingleOptionalHandle<T0>
18576 where
18577 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18578 ___E: ::fidl_next::fuchsia::HandleEncoder,
18579 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
18580 {
18581 #[inline]
18582 fn encode(
18583 self,
18584 encoder_: &mut ___E,
18585 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
18586 _: (),
18587 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18588 ::fidl_next::munge! {
18589 let crate::wire::SingleOptionalHandle {
18590 h,
18591
18592 } = out_;
18593 }
18594
18595 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
18596
18597 Ok(())
18598 }
18599 }
18600
18601 pub struct StructOfEndpoints<T0, T1, T2, T3> {
18603 pub client_end: T0,
18604
18605 pub optional_client_end: T1,
18606
18607 pub server_end: T2,
18608
18609 pub optional_server_end: T3,
18610 }
18611
18612 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>
18613 for StructOfEndpoints<T0, T1, T2, T3>
18614 where
18615 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18616 ___E: ::fidl_next::fuchsia::HandleEncoder,
18617 T0: ::fidl_next::Encode<
18618 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
18619 ___E,
18620 >,
18621 T1: ::fidl_next::Encode<
18622 ::fidl_next::ClientEnd<
18623 crate::Protocol,
18624 ::fidl_next::wire::fuchsia::OptionalChannel,
18625 >,
18626 ___E,
18627 >,
18628 T2: ::fidl_next::Encode<
18629 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
18630 ___E,
18631 >,
18632 T3: ::fidl_next::Encode<
18633 ::fidl_next::ServerEnd<
18634 crate::Protocol,
18635 ::fidl_next::wire::fuchsia::OptionalChannel,
18636 >,
18637 ___E,
18638 >,
18639 {
18640 #[inline]
18641 fn encode(
18642 self,
18643 encoder_: &mut ___E,
18644 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
18645 _: (),
18646 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18647 ::fidl_next::munge! {
18648 let crate::wire::StructOfEndpoints {
18649 client_end,
18650 optional_client_end,
18651 server_end,
18652 optional_server_end,
18653
18654 } = out_;
18655 }
18656
18657 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
18658
18659 ::fidl_next::Encode::encode(
18660 self.optional_client_end,
18661 encoder_,
18662 optional_client_end,
18663 (),
18664 )?;
18665
18666 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
18667
18668 ::fidl_next::Encode::encode(
18669 self.optional_server_end,
18670 encoder_,
18671 optional_server_end,
18672 (),
18673 )?;
18674
18675 Ok(())
18676 }
18677 }
18678
18679 pub struct StructOfOptionalUnionOfHandle<T0> {
18681 pub u: T0,
18682 }
18683
18684 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
18685 for StructOfOptionalUnionOfHandle<T0>
18686 where
18687 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18688 ___E: ::fidl_next::fuchsia::HandleEncoder,
18689 T0: ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>,
18690 {
18691 #[inline]
18692 fn encode(
18693 self,
18694 encoder_: &mut ___E,
18695 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
18696 _: (),
18697 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18698 ::fidl_next::munge! {
18699 let crate::wire::StructOfOptionalUnionOfHandle {
18700 u,
18701
18702 } = out_;
18703 }
18704
18705 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
18706
18707 Ok(())
18708 }
18709 }
18710
18711 pub struct StructOfSimpleResourceTable<T0> {
18713 pub table: T0,
18714 }
18715
18716 unsafe impl<___E, T0>
18717 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
18718 for StructOfSimpleResourceTable<T0>
18719 where
18720 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18721 ___E: ::fidl_next::Encoder,
18722 ___E: ::fidl_next::fuchsia::HandleEncoder,
18723 T0: ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>,
18724 {
18725 #[inline]
18726 fn encode(
18727 self,
18728 encoder_: &mut ___E,
18729 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
18730 _: (),
18731 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18732 ::fidl_next::munge! {
18733 let crate::wire::StructOfSimpleResourceTable {
18734 table,
18735
18736 } = out_;
18737 }
18738
18739 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
18740
18741 Ok(())
18742 }
18743 }
18744
18745 pub struct TableFieldInlinedHandleStruct<T0> {
18747 pub t: T0,
18748 }
18749
18750 unsafe impl<___E, T0>
18751 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
18752 for TableFieldInlinedHandleStruct<T0>
18753 where
18754 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18755 ___E: ::fidl_next::Encoder,
18756 ___E: ::fidl_next::fuchsia::HandleEncoder,
18757 T0: ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>,
18758 {
18759 #[inline]
18760 fn encode(
18761 self,
18762 encoder_: &mut ___E,
18763 out_: &mut ::core::mem::MaybeUninit<
18764 crate::wire::TableFieldInlinedHandleStruct<'static>,
18765 >,
18766 _: (),
18767 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18768 ::fidl_next::munge! {
18769 let crate::wire::TableFieldInlinedHandleStruct {
18770 t,
18771
18772 } = out_;
18773 }
18774
18775 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18776
18777 Ok(())
18778 }
18779 }
18780
18781 pub struct TableFieldUnknownResourceStruct<T0> {
18783 pub t: T0,
18784 }
18785
18786 unsafe impl<___E, T0>
18787 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
18788 for TableFieldUnknownResourceStruct<T0>
18789 where
18790 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18791 ___E: ::fidl_next::Encoder,
18792 ___E: ::fidl_next::fuchsia::HandleEncoder,
18793 T0: ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>,
18794 {
18795 #[inline]
18796 fn encode(
18797 self,
18798 encoder_: &mut ___E,
18799 out_: &mut ::core::mem::MaybeUninit<
18800 crate::wire::TableFieldUnknownResourceStruct<'static>,
18801 >,
18802 _: (),
18803 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18804 ::fidl_next::munge! {
18805 let crate::wire::TableFieldUnknownResourceStruct {
18806 t,
18807
18808 } = out_;
18809 }
18810
18811 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18812
18813 Ok(())
18814 }
18815 }
18816
18817 pub struct TableOfEndpoints<T0> {
18819 pub t: T0,
18820 }
18821
18822 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
18823 for TableOfEndpoints<T0>
18824 where
18825 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18826 ___E: ::fidl_next::Encoder,
18827 ___E: ::fidl_next::fuchsia::HandleEncoder,
18828 T0: ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>,
18829 {
18830 #[inline]
18831 fn encode(
18832 self,
18833 encoder_: &mut ___E,
18834 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
18835 _: (),
18836 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18837 ::fidl_next::munge! {
18838 let crate::wire::TableOfEndpoints {
18839 t,
18840
18841 } = out_;
18842 }
18843
18844 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18845
18846 Ok(())
18847 }
18848 }
18849
18850 pub struct TableUnionWithVectorReservedSandwichStruct<T0> {
18852 pub table: T0,
18853 }
18854
18855 unsafe impl<___E, T0>
18856 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
18857 for TableUnionWithVectorReservedSandwichStruct<T0>
18858 where
18859 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18860 ___E: ::fidl_next::Encoder,
18861 ___E: ::fidl_next::fuchsia::HandleEncoder,
18862 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>,
18863 {
18864 #[inline]
18865 fn encode(
18866 self,
18867 encoder_: &mut ___E,
18868 out_: &mut ::core::mem::MaybeUninit<
18869 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
18870 >,
18871 _: (),
18872 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18873 ::fidl_next::munge! {
18874 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
18875 table,
18876
18877 } = out_;
18878 }
18879
18880 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
18881
18882 Ok(())
18883 }
18884 }
18885
18886 pub struct TableUnionWithVectorStructSandwichStruct<T0> {
18888 pub table: T0,
18889 }
18890
18891 unsafe impl<___E, T0>
18892 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
18893 for TableUnionWithVectorStructSandwichStruct<T0>
18894 where
18895 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18896 ___E: ::fidl_next::Encoder,
18897 ___E: ::fidl_next::fuchsia::HandleEncoder,
18898 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>,
18899 {
18900 #[inline]
18901 fn encode(
18902 self,
18903 encoder_: &mut ___E,
18904 out_: &mut ::core::mem::MaybeUninit<
18905 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
18906 >,
18907 _: (),
18908 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18909 ::fidl_next::munge! {
18910 let crate::wire::TableUnionWithVectorStructSandwichStruct {
18911 table,
18912
18913 } = out_;
18914 }
18915
18916 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
18917
18918 Ok(())
18919 }
18920 }
18921
18922 pub struct TestFlexibleResourceXUnionInStruct<T0> {
18924 pub xu: T0,
18925 }
18926
18927 unsafe impl<___E, T0>
18928 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
18929 for TestFlexibleResourceXUnionInStruct<T0>
18930 where
18931 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18932 ___E: ::fidl_next::Encoder,
18933 ___E: ::fidl_next::fuchsia::HandleEncoder,
18934 T0: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
18935 {
18936 #[inline]
18937 fn encode(
18938 self,
18939 encoder_: &mut ___E,
18940 out_: &mut ::core::mem::MaybeUninit<
18941 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
18942 >,
18943 _: (),
18944 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18945 ::fidl_next::munge! {
18946 let crate::wire::TestFlexibleResourceXUnionInStruct {
18947 xu,
18948
18949 } = out_;
18950 }
18951
18952 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
18953
18954 Ok(())
18955 }
18956 }
18957
18958 pub struct TestOptionalFlexibleResourceXUnionInStruct<T0> {
18960 pub xu: T0,
18961 }
18962
18963 unsafe impl<___E, T0>
18964 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
18965 for TestOptionalFlexibleResourceXUnionInStruct<T0>
18966 where
18967 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18968 ___E: ::fidl_next::Encoder,
18969 ___E: ::fidl_next::fuchsia::HandleEncoder,
18970 T0: ::fidl_next::Encode<crate::wire_optional::SampleResourceXUnion<'static>, ___E>,
18971 {
18972 #[inline]
18973 fn encode(
18974 self,
18975 encoder_: &mut ___E,
18976 out_: &mut ::core::mem::MaybeUninit<
18977 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
18978 >,
18979 _: (),
18980 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18981 ::fidl_next::munge! {
18982 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
18983 xu,
18984
18985 } = out_;
18986 }
18987
18988 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
18989
18990 Ok(())
18991 }
18992 }
18993
18994 pub struct TestOptionalStrictResourceXUnionInStruct<T0> {
18996 pub xu: T0,
18997 }
18998
18999 unsafe impl<___E, T0>
19000 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
19001 for TestOptionalStrictResourceXUnionInStruct<T0>
19002 where
19003 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19004 ___E: ::fidl_next::Encoder,
19005 ___E: ::fidl_next::fuchsia::HandleEncoder,
19006 T0: ::fidl_next::Encode<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>,
19007 {
19008 #[inline]
19009 fn encode(
19010 self,
19011 encoder_: &mut ___E,
19012 out_: &mut ::core::mem::MaybeUninit<
19013 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
19014 >,
19015 _: (),
19016 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19017 ::fidl_next::munge! {
19018 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
19019 xu,
19020
19021 } = out_;
19022 }
19023
19024 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19025
19026 Ok(())
19027 }
19028 }
19029
19030 pub struct TestPackageResolverResolveRequest<T0, T1, T2, T3> {
19032 pub package_url: T0,
19033
19034 pub selectors: T1,
19035
19036 pub update_policy: T2,
19037
19038 pub this_should_be_a_handle: T3,
19039 }
19040
19041 unsafe impl<___E, T0, T1, T2, T3>
19042 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
19043 for TestPackageResolverResolveRequest<T0, T1, T2, T3>
19044 where
19045 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19046 ___E: ::fidl_next::Encoder,
19047 ___E: ::fidl_next::fuchsia::HandleEncoder,
19048 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19049 T1: ::fidl_next::Encode<
19050 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
19051 ___E,
19052 >,
19053 T2: ::fidl_next::Encode<crate::wire::UpdatePolicy, ___E>,
19054 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19055 {
19056 #[inline]
19057 fn encode(
19058 self,
19059 encoder_: &mut ___E,
19060 out_: &mut ::core::mem::MaybeUninit<
19061 crate::wire::TestPackageResolverResolveRequest<'static>,
19062 >,
19063 _: (),
19064 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19065 ::fidl_next::munge! {
19066 let crate::wire::TestPackageResolverResolveRequest {
19067 package_url,
19068 selectors,
19069 update_policy,
19070 this_should_be_a_handle,
19071
19072 } = out_;
19073 }
19074
19075 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
19076
19077 ::fidl_next::Encode::encode(
19078 self.selectors,
19079 encoder_,
19080 selectors,
19081 (4294967295, 4294967295),
19082 )?;
19083
19084 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
19085
19086 ::fidl_next::Encode::encode(
19087 self.this_should_be_a_handle,
19088 encoder_,
19089 this_should_be_a_handle,
19090 (),
19091 )?;
19092
19093 Ok(())
19094 }
19095 }
19096
19097 pub struct TestStrictResourceXUnionInStruct<T0> {
19099 pub xu: T0,
19100 }
19101
19102 unsafe impl<___E, T0>
19103 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
19104 for TestStrictResourceXUnionInStruct<T0>
19105 where
19106 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19107 ___E: ::fidl_next::Encoder,
19108 ___E: ::fidl_next::fuchsia::HandleEncoder,
19109 T0: ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
19110 {
19111 #[inline]
19112 fn encode(
19113 self,
19114 encoder_: &mut ___E,
19115 out_: &mut ::core::mem::MaybeUninit<
19116 crate::wire::TestStrictResourceXUnionInStruct<'static>,
19117 >,
19118 _: (),
19119 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19120 ::fidl_next::munge! {
19121 let crate::wire::TestStrictResourceXUnionInStruct {
19122 xu,
19123
19124 } = out_;
19125 }
19126
19127 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
19128
19129 Ok(())
19130 }
19131 }
19132
19133 pub struct UnboundedNonnullableVectorOfHandles<T0> {
19135 pub vh0: T0,
19136 }
19137
19138 unsafe impl<___E, T0>
19139 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
19140 for UnboundedNonnullableVectorOfHandles<T0>
19141 where
19142 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19143 ___E: ::fidl_next::Encoder,
19144 ___E: ::fidl_next::fuchsia::HandleEncoder,
19145 T0: ::fidl_next::Encode<
19146 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19147 ___E,
19148 >,
19149 {
19150 #[inline]
19151 fn encode(
19152 self,
19153 encoder_: &mut ___E,
19154 out_: &mut ::core::mem::MaybeUninit<
19155 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
19156 >,
19157 _: (),
19158 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19159 ::fidl_next::munge! {
19160 let crate::wire::UnboundedNonnullableVectorOfHandles {
19161 vh0,
19162
19163 } = out_;
19164 }
19165
19166 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
19167
19168 Ok(())
19169 }
19170 }
19171
19172 pub struct UnboundedNullableVectorOfHandles<T0> {
19174 pub vh0: T0,
19175 }
19176
19177 unsafe impl<___E, T0>
19178 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
19179 for UnboundedNullableVectorOfHandles<T0>
19180 where
19181 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19182 ___E: ::fidl_next::Encoder,
19183 ___E: ::fidl_next::fuchsia::HandleEncoder,
19184 T0: ::fidl_next::Encode<
19185 ::fidl_next::wire::OptionalVector<
19186 'static,
19187 ::fidl_next::wire::fuchsia::NullableHandle,
19188 >,
19189 ___E,
19190 >,
19191 {
19192 #[inline]
19193 fn encode(
19194 self,
19195 encoder_: &mut ___E,
19196 out_: &mut ::core::mem::MaybeUninit<
19197 crate::wire::UnboundedNullableVectorOfHandles<'static>,
19198 >,
19199 _: (),
19200 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19201 ::fidl_next::munge! {
19202 let crate::wire::UnboundedNullableVectorOfHandles {
19203 vh0,
19204
19205 } = out_;
19206 }
19207
19208 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
19209
19210 Ok(())
19211 }
19212 }
19213
19214 pub struct UnionOfEndpoints<T0> {
19216 pub u: T0,
19217 }
19218
19219 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
19220 for UnionOfEndpoints<T0>
19221 where
19222 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19223 ___E: ::fidl_next::Encoder,
19224 ___E: ::fidl_next::fuchsia::HandleEncoder,
19225 T0: ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
19226 {
19227 #[inline]
19228 fn encode(
19229 self,
19230 encoder_: &mut ___E,
19231 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
19232 _: (),
19233 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19234 ::fidl_next::munge! {
19235 let crate::wire::UnionOfEndpoints {
19236 u,
19237
19238 } = out_;
19239 }
19240
19241 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19242
19243 Ok(())
19244 }
19245 }
19246
19247 pub struct VectorOfArrayOfEventInStructWithDefaultRights<T0> {
19249 pub h: T0,
19250 }
19251
19252 unsafe impl<___E, T0>
19253 ::fidl_next::Encode<
19254 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
19255 ___E,
19256 > for VectorOfArrayOfEventInStructWithDefaultRights<T0>
19257 where
19258 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19259 ___E: ::fidl_next::Encoder,
19260 ___E: ::fidl_next::fuchsia::HandleEncoder,
19261 T0: ::fidl_next::Encode<
19262 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
19263 ___E,
19264 >,
19265 {
19266 #[inline]
19267 fn encode(
19268 self,
19269 encoder_: &mut ___E,
19270 out_: &mut ::core::mem::MaybeUninit<
19271 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
19272 >,
19273 _: (),
19274 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19275 ::fidl_next::munge! {
19276 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
19277 h,
19278
19279 } = out_;
19280 }
19281
19282 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
19283
19284 Ok(())
19285 }
19286 }
19287
19288 pub struct VectorOfArrayOfEventInStructWithReducedRights<T0> {
19290 pub h: T0,
19291 }
19292
19293 unsafe impl<___E, T0>
19294 ::fidl_next::Encode<
19295 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
19296 ___E,
19297 > for VectorOfArrayOfEventInStructWithReducedRights<T0>
19298 where
19299 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19300 ___E: ::fidl_next::Encoder,
19301 ___E: ::fidl_next::fuchsia::HandleEncoder,
19302 T0: ::fidl_next::Encode<
19303 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
19304 ___E,
19305 >,
19306 {
19307 #[inline]
19308 fn encode(
19309 self,
19310 encoder_: &mut ___E,
19311 out_: &mut ::core::mem::MaybeUninit<
19312 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
19313 >,
19314 _: (),
19315 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19316 ::fidl_next::munge! {
19317 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
19318 h,
19319
19320 } = out_;
19321 }
19322
19323 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
19324
19325 Ok(())
19326 }
19327 }
19328
19329 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<T0> {
19331 pub t: T0,
19332 }
19333
19334 unsafe impl<___E, T0>
19335 ::fidl_next::Encode<
19336 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
19337 ___E,
19338 > for VectorOfArrayOfEventInTableWithReducedRightsStruct<T0>
19339 where
19340 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19341 ___E: ::fidl_next::Encoder,
19342 ___E: ::fidl_next::fuchsia::HandleEncoder,
19343 T0: ::fidl_next::Encode<
19344 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
19345 ___E,
19346 >,
19347 {
19348 #[inline]
19349 fn encode(
19350 self,
19351 encoder_: &mut ___E,
19352 out_: &mut ::core::mem::MaybeUninit<
19353 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
19354 >,
19355 _: (),
19356 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19357 ::fidl_next::munge! {
19358 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
19359 t,
19360
19361 } = out_;
19362 }
19363
19364 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
19365
19366 Ok(())
19367 }
19368 }
19369
19370 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0> {
19372 pub u: T0,
19373 }
19374
19375 unsafe impl<___E, T0>
19376 ::fidl_next::Encode<
19377 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
19378 ___E,
19379 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0>
19380 where
19381 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19382 ___E: ::fidl_next::Encoder,
19383 ___E: ::fidl_next::fuchsia::HandleEncoder,
19384 T0: ::fidl_next::Encode<
19385 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
19386 ___E,
19387 >,
19388 {
19389 #[inline]
19390 fn encode(
19391 self,
19392 encoder_: &mut ___E,
19393 out_: &mut ::core::mem::MaybeUninit<
19394 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
19395 >,
19396 _: (),
19397 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19398 ::fidl_next::munge! {
19399 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
19400 u,
19401
19402 } = out_;
19403 }
19404
19405 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19406
19407 Ok(())
19408 }
19409 }
19410
19411 pub struct VectorOfHandles<T0> {
19413 pub v: T0,
19414 }
19415
19416 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
19417 for VectorOfHandles<T0>
19418 where
19419 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19420 ___E: ::fidl_next::Encoder,
19421 ___E: ::fidl_next::fuchsia::HandleEncoder,
19422 T0: ::fidl_next::Encode<
19423 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19424 ___E,
19425 >,
19426 {
19427 #[inline]
19428 fn encode(
19429 self,
19430 encoder_: &mut ___E,
19431 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
19432 _: (),
19433 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19434 ::fidl_next::munge! {
19435 let crate::wire::VectorOfHandles {
19436 v,
19437
19438 } = out_;
19439 }
19440
19441 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
19442
19443 Ok(())
19444 }
19445 }
19446
19447 pub struct VectorOfOptionalHandles<T0> {
19449 pub v: T0,
19450 }
19451
19452 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
19453 for VectorOfOptionalHandles<T0>
19454 where
19455 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19456 ___E: ::fidl_next::Encoder,
19457 ___E: ::fidl_next::fuchsia::HandleEncoder,
19458 T0: ::fidl_next::Encode<
19459 ::fidl_next::wire::Vector<
19460 'static,
19461 ::fidl_next::wire::fuchsia::OptionalNullableHandle,
19462 >,
19463 ___E,
19464 >,
19465 {
19466 #[inline]
19467 fn encode(
19468 self,
19469 encoder_: &mut ___E,
19470 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
19471 _: (),
19472 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19473 ::fidl_next::munge! {
19474 let crate::wire::VectorOfOptionalHandles {
19475 v,
19476
19477 } = out_;
19478 }
19479
19480 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
19481
19482 Ok(())
19483 }
19484 }
19485
19486 pub struct VectorOfUpTo2Handles<T0> {
19488 pub v: T0,
19489 }
19490
19491 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
19492 for VectorOfUpTo2Handles<T0>
19493 where
19494 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19495 ___E: ::fidl_next::Encoder,
19496 ___E: ::fidl_next::fuchsia::HandleEncoder,
19497 T0: ::fidl_next::Encode<
19498 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
19499 ___E,
19500 >,
19501 {
19502 #[inline]
19503 fn encode(
19504 self,
19505 encoder_: &mut ___E,
19506 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
19507 _: (),
19508 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19509 ::fidl_next::munge! {
19510 let crate::wire::VectorOfUpTo2Handles {
19511 v,
19512
19513 } = out_;
19514 }
19515
19516 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
19517
19518 Ok(())
19519 }
19520 }
19521}
19522
19523pub use self::natural::*;
19524
19525pub use fidl_next_common_test_conformance::*;