1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_test_conformance::natural::*;
8
9 #[derive(Debug, PartialEq)]
10 pub struct AlternatingHandlesAndFailures {
11 pub h1: ::fidl_next::fuchsia::zx::NullableHandle,
12
13 pub failure_trigger1: ::std::string::String,
14
15 pub h2: ::fidl_next::fuchsia::zx::NullableHandle,
16
17 pub failure_trigger2: ::std::string::String,
18
19 pub h3: ::fidl_next::fuchsia::zx::NullableHandle,
20 }
21
22 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
23 for AlternatingHandlesAndFailures
24 where
25 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
26 ___E: ::fidl_next::Encoder,
27 ___E: ::fidl_next::fuchsia::HandleEncoder,
28 {
29 #[inline]
30 fn encode(
31 self,
32 encoder_: &mut ___E,
33 out_: &mut ::core::mem::MaybeUninit<
34 crate::wire::AlternatingHandlesAndFailures<'static>,
35 >,
36 _: (),
37 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
38 ::fidl_next::munge! {
39 let crate::wire::AlternatingHandlesAndFailures {
40 h1,
41 failure_trigger1,
42 h2,
43 failure_trigger2,
44 h3,
45
46 } = out_;
47 }
48
49 ::fidl_next::Encode::encode(self.h1, encoder_, h1, ())?;
50
51 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h1.as_mut_ptr()) };
52
53 ::fidl_next::Encode::encode(self.failure_trigger1, encoder_, failure_trigger1, 1)?;
54
55 let mut _field =
56 unsafe { ::fidl_next::Slot::new_unchecked(failure_trigger1.as_mut_ptr()) };
57 ::fidl_next::Constrained::validate(_field, 1)?;
58
59 ::fidl_next::Encode::encode(self.h2, encoder_, h2, ())?;
60
61 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h2.as_mut_ptr()) };
62
63 ::fidl_next::Encode::encode(self.failure_trigger2, encoder_, failure_trigger2, 1)?;
64
65 let mut _field =
66 unsafe { ::fidl_next::Slot::new_unchecked(failure_trigger2.as_mut_ptr()) };
67 ::fidl_next::Constrained::validate(_field, 1)?;
68
69 ::fidl_next::Encode::encode(self.h3, encoder_, h3, ())?;
70
71 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h3.as_mut_ptr()) };
72
73 Ok(())
74 }
75 }
76
77 unsafe impl<___E>
78 ::fidl_next::EncodeOption<
79 ::fidl_next::wire::Box<'static, crate::wire::AlternatingHandlesAndFailures<'static>>,
80 ___E,
81 > for AlternatingHandlesAndFailures
82 where
83 ___E: ::fidl_next::Encoder + ?Sized,
84 AlternatingHandlesAndFailures:
85 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>,
86 {
87 #[inline]
88 fn encode_option(
89 this: ::core::option::Option<Self>,
90 encoder: &mut ___E,
91 out: &mut ::core::mem::MaybeUninit<
92 ::fidl_next::wire::Box<
93 'static,
94 crate::wire::AlternatingHandlesAndFailures<'static>,
95 >,
96 >,
97 _: (),
98 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
99 if let Some(inner) = this {
100 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
101 ::fidl_next::wire::Box::encode_present(out);
102 } else {
103 ::fidl_next::wire::Box::encode_absent(out);
104 }
105
106 Ok(())
107 }
108 }
109
110 impl<'de> ::fidl_next::FromWire<crate::wire::AlternatingHandlesAndFailures<'de>>
111 for AlternatingHandlesAndFailures
112 {
113 #[inline]
114 fn from_wire(wire: crate::wire::AlternatingHandlesAndFailures<'de>) -> Self {
115 Self {
116 h1: ::fidl_next::FromWire::from_wire(wire.h1),
117
118 failure_trigger1: ::fidl_next::FromWire::from_wire(wire.failure_trigger1),
119
120 h2: ::fidl_next::FromWire::from_wire(wire.h2),
121
122 failure_trigger2: ::fidl_next::FromWire::from_wire(wire.failure_trigger2),
123
124 h3: ::fidl_next::FromWire::from_wire(wire.h3),
125 }
126 }
127 }
128
129 #[derive(Debug, PartialEq)]
130 #[repr(C)]
131 pub struct ArrayOfArrayOfNonnullableHandles {
132 pub handles: [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4],
133 }
134
135 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
136 for ArrayOfArrayOfNonnullableHandles
137 where
138 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
139 ___E: ::fidl_next::fuchsia::HandleEncoder,
140 {
141 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
142 Self,
143 crate::wire::ArrayOfArrayOfNonnullableHandles,
144 > = unsafe {
145 ::fidl_next::CopyOptimization::enable_if(
146 true
147
148 && <
149 [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4] as ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>
150 >::COPY_OPTIMIZATION.is_enabled()
151
152 )
153 };
154
155 #[inline]
156 fn encode(
157 self,
158 encoder_: &mut ___E,
159 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
160 _: (),
161 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
162 ::fidl_next::munge! {
163 let crate::wire::ArrayOfArrayOfNonnullableHandles {
164 handles,
165
166 } = out_;
167 }
168
169 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
170
171 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
172
173 Ok(())
174 }
175 }
176
177 unsafe impl<___E>
178 ::fidl_next::EncodeOption<
179 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfArrayOfNonnullableHandles>,
180 ___E,
181 > for ArrayOfArrayOfNonnullableHandles
182 where
183 ___E: ::fidl_next::Encoder + ?Sized,
184 ArrayOfArrayOfNonnullableHandles:
185 ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>,
186 {
187 #[inline]
188 fn encode_option(
189 this: ::core::option::Option<Self>,
190 encoder: &mut ___E,
191 out: &mut ::core::mem::MaybeUninit<
192 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfArrayOfNonnullableHandles>,
193 >,
194 _: (),
195 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
196 if let Some(inner) = this {
197 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
198 ::fidl_next::wire::Box::encode_present(out);
199 } else {
200 ::fidl_next::wire::Box::encode_absent(out);
201 }
202
203 Ok(())
204 }
205 }
206
207 impl ::fidl_next::FromWire<crate::wire::ArrayOfArrayOfNonnullableHandles>
208 for ArrayOfArrayOfNonnullableHandles
209 {
210 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
211 crate::wire::ArrayOfArrayOfNonnullableHandles,
212 Self,
213 > = unsafe {
214 ::fidl_next::CopyOptimization::enable_if(
215 true
216
217 && <
218 [[::fidl_next::fuchsia::zx::NullableHandle; 3]; 4] as ::fidl_next::FromWire<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4]>
219 >::COPY_OPTIMIZATION.is_enabled()
220
221 )
222 };
223
224 #[inline]
225 fn from_wire(wire: crate::wire::ArrayOfArrayOfNonnullableHandles) -> Self {
226 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
227 }
228 }
229
230 #[derive(Debug, PartialEq)]
231 #[repr(C)]
232 pub struct ArrayOfHandles {
233 pub a: [::fidl_next::fuchsia::zx::NullableHandle; 3],
234 }
235
236 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E> for ArrayOfHandles
237 where
238 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
239 ___E: ::fidl_next::fuchsia::HandleEncoder,
240 {
241 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ArrayOfHandles> = unsafe {
242 ::fidl_next::CopyOptimization::enable_if(
243 true && <[::fidl_next::fuchsia::zx::NullableHandle; 3] as ::fidl_next::Encode<
244 [::fidl_next::wire::fuchsia::NullableHandle; 3],
245 ___E,
246 >>::COPY_OPTIMIZATION
247 .is_enabled(),
248 )
249 };
250
251 #[inline]
252 fn encode(
253 self,
254 encoder_: &mut ___E,
255 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
256 _: (),
257 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
258 ::fidl_next::munge! {
259 let crate::wire::ArrayOfHandles {
260 a,
261
262 } = out_;
263 }
264
265 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
266
267 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) };
268
269 Ok(())
270 }
271 }
272
273 unsafe impl<___E>
274 ::fidl_next::EncodeOption<
275 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfHandles>,
276 ___E,
277 > for ArrayOfHandles
278 where
279 ___E: ::fidl_next::Encoder + ?Sized,
280 ArrayOfHandles: ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E>,
281 {
282 #[inline]
283 fn encode_option(
284 this: ::core::option::Option<Self>,
285 encoder: &mut ___E,
286 out: &mut ::core::mem::MaybeUninit<
287 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfHandles>,
288 >,
289 _: (),
290 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
291 if let Some(inner) = this {
292 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
293 ::fidl_next::wire::Box::encode_present(out);
294 } else {
295 ::fidl_next::wire::Box::encode_absent(out);
296 }
297
298 Ok(())
299 }
300 }
301
302 impl ::fidl_next::FromWire<crate::wire::ArrayOfHandles> for ArrayOfHandles {
303 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ArrayOfHandles, Self> = unsafe {
304 ::fidl_next::CopyOptimization::enable_if(
305 true && <[::fidl_next::fuchsia::zx::NullableHandle; 3] as ::fidl_next::FromWire<
306 [::fidl_next::wire::fuchsia::NullableHandle; 3],
307 >>::COPY_OPTIMIZATION
308 .is_enabled(),
309 )
310 };
311
312 #[inline]
313 fn from_wire(wire: crate::wire::ArrayOfHandles) -> Self {
314 Self { a: ::fidl_next::FromWire::from_wire(wire.a) }
315 }
316 }
317
318 #[derive(Debug, PartialEq)]
319 #[repr(C)]
320 pub struct ArrayOfNonnullableHandles {
321 pub handles: [::fidl_next::fuchsia::zx::NullableHandle; 4],
322 }
323
324 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
325 for ArrayOfNonnullableHandles
326 where
327 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
328 ___E: ::fidl_next::fuchsia::HandleEncoder,
329 {
330 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
331 Self,
332 crate::wire::ArrayOfNonnullableHandles,
333 > = unsafe {
334 ::fidl_next::CopyOptimization::enable_if(
335 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::Encode<
336 [::fidl_next::wire::fuchsia::NullableHandle; 4],
337 ___E,
338 >>::COPY_OPTIMIZATION
339 .is_enabled(),
340 )
341 };
342
343 #[inline]
344 fn encode(
345 self,
346 encoder_: &mut ___E,
347 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
348 _: (),
349 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
350 ::fidl_next::munge! {
351 let crate::wire::ArrayOfNonnullableHandles {
352 handles,
353
354 } = out_;
355 }
356
357 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
358
359 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
360
361 Ok(())
362 }
363 }
364
365 unsafe impl<___E>
366 ::fidl_next::EncodeOption<
367 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNonnullableHandles>,
368 ___E,
369 > for ArrayOfNonnullableHandles
370 where
371 ___E: ::fidl_next::Encoder + ?Sized,
372 ArrayOfNonnullableHandles:
373 ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>,
374 {
375 #[inline]
376 fn encode_option(
377 this: ::core::option::Option<Self>,
378 encoder: &mut ___E,
379 out: &mut ::core::mem::MaybeUninit<
380 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNonnullableHandles>,
381 >,
382 _: (),
383 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
384 if let Some(inner) = this {
385 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
386 ::fidl_next::wire::Box::encode_present(out);
387 } else {
388 ::fidl_next::wire::Box::encode_absent(out);
389 }
390
391 Ok(())
392 }
393 }
394
395 impl ::fidl_next::FromWire<crate::wire::ArrayOfNonnullableHandles> for ArrayOfNonnullableHandles {
396 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
397 crate::wire::ArrayOfNonnullableHandles,
398 Self,
399 > = unsafe {
400 ::fidl_next::CopyOptimization::enable_if(
401 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::FromWire<
402 [::fidl_next::wire::fuchsia::NullableHandle; 4],
403 >>::COPY_OPTIMIZATION
404 .is_enabled(),
405 )
406 };
407
408 #[inline]
409 fn from_wire(wire: crate::wire::ArrayOfNonnullableHandles) -> Self {
410 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
411 }
412 }
413
414 #[derive(Debug, PartialEq)]
415 #[repr(C)]
416 pub struct ArrayOfNullableHandles {
417 pub handles: [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5],
418 }
419
420 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
421 for ArrayOfNullableHandles
422 where
423 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
424 ___E: ::fidl_next::fuchsia::HandleEncoder,
425 {
426 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
427 Self,
428 crate::wire::ArrayOfNullableHandles,
429 > = unsafe {
430 ::fidl_next::CopyOptimization::enable_if(
431 true
432
433 && <
434 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5] as ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>
435 >::COPY_OPTIMIZATION.is_enabled()
436
437 )
438 };
439
440 #[inline]
441 fn encode(
442 self,
443 encoder_: &mut ___E,
444 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
445 _: (),
446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
447 ::fidl_next::munge! {
448 let crate::wire::ArrayOfNullableHandles {
449 handles,
450
451 } = out_;
452 }
453
454 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
455
456 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
457
458 Ok(())
459 }
460 }
461
462 unsafe impl<___E>
463 ::fidl_next::EncodeOption<
464 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNullableHandles>,
465 ___E,
466 > for ArrayOfNullableHandles
467 where
468 ___E: ::fidl_next::Encoder + ?Sized,
469 ArrayOfNullableHandles: ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>,
470 {
471 #[inline]
472 fn encode_option(
473 this: ::core::option::Option<Self>,
474 encoder: &mut ___E,
475 out: &mut ::core::mem::MaybeUninit<
476 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfNullableHandles>,
477 >,
478 _: (),
479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
480 if let Some(inner) = this {
481 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
482 ::fidl_next::wire::Box::encode_present(out);
483 } else {
484 ::fidl_next::wire::Box::encode_absent(out);
485 }
486
487 Ok(())
488 }
489 }
490
491 impl ::fidl_next::FromWire<crate::wire::ArrayOfNullableHandles> for ArrayOfNullableHandles {
492 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
493 crate::wire::ArrayOfNullableHandles,
494 Self,
495 > = unsafe {
496 ::fidl_next::CopyOptimization::enable_if(
497 true
498
499 && <
500 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 5] as ::fidl_next::FromWire<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5]>
501 >::COPY_OPTIMIZATION.is_enabled()
502
503 )
504 };
505
506 #[inline]
507 fn from_wire(wire: crate::wire::ArrayOfNullableHandles) -> Self {
508 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
509 }
510 }
511
512 #[derive(Debug, PartialEq)]
513 #[repr(C)]
514 pub struct ArrayOfOptionalHandles {
515 pub a: [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3],
516 }
517
518 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
519 for ArrayOfOptionalHandles
520 where
521 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
522 ___E: ::fidl_next::fuchsia::HandleEncoder,
523 {
524 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
525 Self,
526 crate::wire::ArrayOfOptionalHandles,
527 > = unsafe {
528 ::fidl_next::CopyOptimization::enable_if(
529 true
530
531 && <
532 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3] as ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>
533 >::COPY_OPTIMIZATION.is_enabled()
534
535 )
536 };
537
538 #[inline]
539 fn encode(
540 self,
541 encoder_: &mut ___E,
542 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
543 _: (),
544 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
545 ::fidl_next::munge! {
546 let crate::wire::ArrayOfOptionalHandles {
547 a,
548
549 } = out_;
550 }
551
552 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
553
554 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(a.as_mut_ptr()) };
555
556 Ok(())
557 }
558 }
559
560 unsafe impl<___E>
561 ::fidl_next::EncodeOption<
562 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfOptionalHandles>,
563 ___E,
564 > for ArrayOfOptionalHandles
565 where
566 ___E: ::fidl_next::Encoder + ?Sized,
567 ArrayOfOptionalHandles: ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>,
568 {
569 #[inline]
570 fn encode_option(
571 this: ::core::option::Option<Self>,
572 encoder: &mut ___E,
573 out: &mut ::core::mem::MaybeUninit<
574 ::fidl_next::wire::Box<'static, crate::wire::ArrayOfOptionalHandles>,
575 >,
576 _: (),
577 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
578 if let Some(inner) = this {
579 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
580 ::fidl_next::wire::Box::encode_present(out);
581 } else {
582 ::fidl_next::wire::Box::encode_absent(out);
583 }
584
585 Ok(())
586 }
587 }
588
589 impl ::fidl_next::FromWire<crate::wire::ArrayOfOptionalHandles> for ArrayOfOptionalHandles {
590 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
591 crate::wire::ArrayOfOptionalHandles,
592 Self,
593 > = unsafe {
594 ::fidl_next::CopyOptimization::enable_if(
595 true
596
597 && <
598 [::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>; 3] as ::fidl_next::FromWire<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3]>
599 >::COPY_OPTIMIZATION.is_enabled()
600
601 )
602 };
603
604 #[inline]
605 fn from_wire(wire: crate::wire::ArrayOfOptionalHandles) -> Self {
606 Self { a: ::fidl_next::FromWire::from_wire(wire.a) }
607 }
608 }
609
610 #[derive(Debug, PartialEq)]
611 pub struct ArrayOfVectorOfEventInStructWithDefaultRights {
612 pub h: [::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1],
613 }
614
615 unsafe impl<___E>
616 ::fidl_next::Encode<
617 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
618 ___E,
619 > for ArrayOfVectorOfEventInStructWithDefaultRights
620 where
621 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
622 ___E: ::fidl_next::Encoder,
623 ___E: ::fidl_next::fuchsia::HandleEncoder,
624 {
625 #[inline]
626 fn encode(
627 self,
628 encoder_: &mut ___E,
629 out_: &mut ::core::mem::MaybeUninit<
630 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
631 >,
632 _: (),
633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
634 ::fidl_next::munge! {
635 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
636 h,
637
638 } = out_;
639 }
640
641 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
642
643 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
644 ::fidl_next::Constrained::validate(_field, (1, ()))?;
645
646 Ok(())
647 }
648 }
649
650 unsafe impl<___E>
651 ::fidl_next::EncodeOption<
652 ::fidl_next::wire::Box<
653 'static,
654 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
655 >,
656 ___E,
657 > for ArrayOfVectorOfEventInStructWithDefaultRights
658 where
659 ___E: ::fidl_next::Encoder + ?Sized,
660 ArrayOfVectorOfEventInStructWithDefaultRights: ::fidl_next::Encode<
661 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
662 ___E,
663 >,
664 {
665 #[inline]
666 fn encode_option(
667 this: ::core::option::Option<Self>,
668 encoder: &mut ___E,
669 out: &mut ::core::mem::MaybeUninit<
670 ::fidl_next::wire::Box<
671 'static,
672 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
673 >,
674 >,
675 _: (),
676 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
677 if let Some(inner) = this {
678 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
679 ::fidl_next::wire::Box::encode_present(out);
680 } else {
681 ::fidl_next::wire::Box::encode_absent(out);
682 }
683
684 Ok(())
685 }
686 }
687
688 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'de>>
689 for ArrayOfVectorOfEventInStructWithDefaultRights
690 {
691 #[inline]
692 fn from_wire(
693 wire: crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'de>,
694 ) -> Self {
695 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
696 }
697 }
698
699 #[derive(Debug, PartialEq)]
700 pub struct ArrayOfVectorOfEventInStructWithReducedRights {
701 pub h: [::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1],
702 }
703
704 unsafe impl<___E>
705 ::fidl_next::Encode<
706 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
707 ___E,
708 > for ArrayOfVectorOfEventInStructWithReducedRights
709 where
710 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
711 ___E: ::fidl_next::Encoder,
712 ___E: ::fidl_next::fuchsia::HandleEncoder,
713 {
714 #[inline]
715 fn encode(
716 self,
717 encoder_: &mut ___E,
718 out_: &mut ::core::mem::MaybeUninit<
719 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
720 >,
721 _: (),
722 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
723 ::fidl_next::munge! {
724 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
725 h,
726
727 } = out_;
728 }
729
730 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
731
732 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
733 ::fidl_next::Constrained::validate(_field, (1, ()))?;
734
735 Ok(())
736 }
737 }
738
739 unsafe impl<___E>
740 ::fidl_next::EncodeOption<
741 ::fidl_next::wire::Box<
742 'static,
743 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
744 >,
745 ___E,
746 > for ArrayOfVectorOfEventInStructWithReducedRights
747 where
748 ___E: ::fidl_next::Encoder + ?Sized,
749 ArrayOfVectorOfEventInStructWithReducedRights: ::fidl_next::Encode<
750 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
751 ___E,
752 >,
753 {
754 #[inline]
755 fn encode_option(
756 this: ::core::option::Option<Self>,
757 encoder: &mut ___E,
758 out: &mut ::core::mem::MaybeUninit<
759 ::fidl_next::wire::Box<
760 'static,
761 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
762 >,
763 >,
764 _: (),
765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
766 if let Some(inner) = this {
767 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
768 ::fidl_next::wire::Box::encode_present(out);
769 } else {
770 ::fidl_next::wire::Box::encode_absent(out);
771 }
772
773 Ok(())
774 }
775 }
776
777 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'de>>
778 for ArrayOfVectorOfEventInStructWithReducedRights
779 {
780 #[inline]
781 fn from_wire(
782 wire: crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'de>,
783 ) -> Self {
784 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
785 }
786 }
787
788 #[derive(Debug, Default, PartialEq)]
789 pub struct ArrayOfVectorOfEventInTableWithDefaultRights {
790 pub h: ::core::option::Option<[::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]>,
791 }
792
793 impl ArrayOfVectorOfEventInTableWithDefaultRights {
794 fn __max_ordinal(&self) -> usize {
795 if self.h.is_some() {
796 return 1;
797 }
798
799 0
800 }
801 }
802
803 unsafe impl<___E>
804 ::fidl_next::Encode<
805 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
806 ___E,
807 > for ArrayOfVectorOfEventInTableWithDefaultRights
808 where
809 ___E: ::fidl_next::Encoder + ?Sized,
810 ___E: ::fidl_next::fuchsia::HandleEncoder,
811 {
812 #[inline]
813 fn encode(
814 mut self,
815 encoder: &mut ___E,
816 out: &mut ::core::mem::MaybeUninit<
817 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
818 >,
819 _: (),
820 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
821 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights { table } = out);
822
823 let max_ord = self.__max_ordinal();
824
825 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
826 ::fidl_next::Wire::zero_padding(&mut out);
827
828 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
829 ::fidl_next::wire::Envelope,
830 >(encoder, max_ord);
831
832 for i in 1..=max_ord {
833 match i {
834 1 => {
835 if let Some(value) = self.h.take() {
836 ::fidl_next::wire::Envelope::encode_value::<
837 [::fidl_next::wire::Vector<
838 'static,
839 ::fidl_next::wire::fuchsia::Event,
840 >; 1],
841 ___E,
842 >(
843 value, preallocated.encoder, &mut out, (1, ())
844 )?;
845 } else {
846 ::fidl_next::wire::Envelope::encode_zero(&mut out)
847 }
848 }
849
850 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
851 }
852 unsafe {
853 preallocated.write_next(out.assume_init_ref());
854 }
855 }
856
857 ::fidl_next::wire::Table::encode_len(table, max_ord);
858
859 Ok(())
860 }
861 }
862
863 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>>
864 for ArrayOfVectorOfEventInTableWithDefaultRights
865 {
866 #[inline]
867 fn from_wire(
868 wire_: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>,
869 ) -> Self {
870 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
871
872 let h = wire_.table.get(1);
873
874 Self {
875
876
877 h: h.map(|envelope| ::fidl_next::FromWire::from_wire(
878 unsafe { envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>() }
879 )),
880
881 }
882 }
883 }
884
885 #[derive(Debug, PartialEq)]
886 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
887 pub t: crate::natural::ArrayOfVectorOfEventInTableWithDefaultRights,
888 }
889
890 unsafe impl<___E>
891 ::fidl_next::Encode<
892 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
893 ___E,
894 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
895 where
896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
897 ___E: ::fidl_next::Encoder,
898 ___E: ::fidl_next::fuchsia::HandleEncoder,
899 {
900 #[inline]
901 fn encode(
902 self,
903 encoder_: &mut ___E,
904 out_: &mut ::core::mem::MaybeUninit<
905 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
906 >,
907 _: (),
908 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
909 ::fidl_next::munge! {
910 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
911 t,
912
913 } = out_;
914 }
915
916 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
917
918 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
919
920 Ok(())
921 }
922 }
923
924 unsafe impl<___E>
925 ::fidl_next::EncodeOption<
926 ::fidl_next::wire::Box<
927 'static,
928 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
929 >,
930 ___E,
931 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
932 where
933 ___E: ::fidl_next::Encoder + ?Sized,
934 ArrayOfVectorOfEventInTableWithDefaultRightsStruct: ::fidl_next::Encode<
935 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
936 ___E,
937 >,
938 {
939 #[inline]
940 fn encode_option(
941 this: ::core::option::Option<Self>,
942 encoder: &mut ___E,
943 out: &mut ::core::mem::MaybeUninit<
944 ::fidl_next::wire::Box<
945 'static,
946 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
947 >,
948 >,
949 _: (),
950 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
951 if let Some(inner) = this {
952 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
953 ::fidl_next::wire::Box::encode_present(out);
954 } else {
955 ::fidl_next::wire::Box::encode_absent(out);
956 }
957
958 Ok(())
959 }
960 }
961
962 impl<'de>
963 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>>
964 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct
965 {
966 #[inline]
967 fn from_wire(
968 wire: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>,
969 ) -> Self {
970 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
971 }
972 }
973
974 #[derive(Debug, Default, PartialEq)]
975 pub struct ArrayOfVectorOfEventInTableWithReducedRights {
976 pub h: ::core::option::Option<[::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]>,
977 }
978
979 impl ArrayOfVectorOfEventInTableWithReducedRights {
980 fn __max_ordinal(&self) -> usize {
981 if self.h.is_some() {
982 return 1;
983 }
984
985 0
986 }
987 }
988
989 unsafe impl<___E>
990 ::fidl_next::Encode<
991 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
992 ___E,
993 > for ArrayOfVectorOfEventInTableWithReducedRights
994 where
995 ___E: ::fidl_next::Encoder + ?Sized,
996 ___E: ::fidl_next::fuchsia::HandleEncoder,
997 {
998 #[inline]
999 fn encode(
1000 mut self,
1001 encoder: &mut ___E,
1002 out: &mut ::core::mem::MaybeUninit<
1003 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
1004 >,
1005 _: (),
1006 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1007 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInTableWithReducedRights { table } = out);
1008
1009 let max_ord = self.__max_ordinal();
1010
1011 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1012 ::fidl_next::Wire::zero_padding(&mut out);
1013
1014 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1015 ::fidl_next::wire::Envelope,
1016 >(encoder, max_ord);
1017
1018 for i in 1..=max_ord {
1019 match i {
1020 1 => {
1021 if let Some(value) = self.h.take() {
1022 ::fidl_next::wire::Envelope::encode_value::<
1023 [::fidl_next::wire::Vector<
1024 'static,
1025 ::fidl_next::wire::fuchsia::Event,
1026 >; 1],
1027 ___E,
1028 >(
1029 value, preallocated.encoder, &mut out, (1, ())
1030 )?;
1031 } else {
1032 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1033 }
1034 }
1035
1036 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1037 }
1038 unsafe {
1039 preallocated.write_next(out.assume_init_ref());
1040 }
1041 }
1042
1043 ::fidl_next::wire::Table::encode_len(table, max_ord);
1044
1045 Ok(())
1046 }
1047 }
1048
1049 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>>
1050 for ArrayOfVectorOfEventInTableWithReducedRights
1051 {
1052 #[inline]
1053 fn from_wire(
1054 wire_: crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>,
1055 ) -> Self {
1056 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1057
1058 let h = wire_.table.get(1);
1059
1060 Self {
1061
1062
1063 h: h.map(|envelope| ::fidl_next::FromWire::from_wire(
1064 unsafe { envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>() }
1065 )),
1066
1067 }
1068 }
1069 }
1070
1071 #[derive(Debug, PartialEq)]
1072 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct {
1073 pub t: crate::natural::ArrayOfVectorOfEventInTableWithReducedRights,
1074 }
1075
1076 unsafe impl<___E>
1077 ::fidl_next::Encode<
1078 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1079 ___E,
1080 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1081 where
1082 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1083 ___E: ::fidl_next::Encoder,
1084 ___E: ::fidl_next::fuchsia::HandleEncoder,
1085 {
1086 #[inline]
1087 fn encode(
1088 self,
1089 encoder_: &mut ___E,
1090 out_: &mut ::core::mem::MaybeUninit<
1091 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1092 >,
1093 _: (),
1094 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1095 ::fidl_next::munge! {
1096 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
1097 t,
1098
1099 } = out_;
1100 }
1101
1102 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
1103
1104 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
1105
1106 Ok(())
1107 }
1108 }
1109
1110 unsafe impl<___E>
1111 ::fidl_next::EncodeOption<
1112 ::fidl_next::wire::Box<
1113 'static,
1114 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1115 >,
1116 ___E,
1117 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1118 where
1119 ___E: ::fidl_next::Encoder + ?Sized,
1120 ArrayOfVectorOfEventInTableWithReducedRightsStruct: ::fidl_next::Encode<
1121 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1122 ___E,
1123 >,
1124 {
1125 #[inline]
1126 fn encode_option(
1127 this: ::core::option::Option<Self>,
1128 encoder: &mut ___E,
1129 out: &mut ::core::mem::MaybeUninit<
1130 ::fidl_next::wire::Box<
1131 'static,
1132 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
1133 >,
1134 >,
1135 _: (),
1136 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1137 if let Some(inner) = this {
1138 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1139 ::fidl_next::wire::Box::encode_present(out);
1140 } else {
1141 ::fidl_next::wire::Box::encode_absent(out);
1142 }
1143
1144 Ok(())
1145 }
1146 }
1147
1148 impl<'de>
1149 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>>
1150 for ArrayOfVectorOfEventInTableWithReducedRightsStruct
1151 {
1152 #[inline]
1153 fn from_wire(
1154 wire: crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>,
1155 ) -> Self {
1156 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
1157 }
1158 }
1159
1160 #[derive(Debug, PartialEq)]
1161 pub enum ArrayOfVectorOfEventInUnionWithDefaultRights {
1162 H([::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]),
1163 }
1164
1165 unsafe impl<___E>
1166 ::fidl_next::Encode<
1167 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1168 ___E,
1169 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1170 where
1171 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1172 ___E: ::fidl_next::Encoder,
1173 ___E: ::fidl_next::fuchsia::HandleEncoder,
1174 {
1175 #[inline]
1176 fn encode(
1177 self,
1178 encoder: &mut ___E,
1179 out: &mut ::core::mem::MaybeUninit<
1180 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1181 >,
1182 _: (),
1183 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1184 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights { raw, _phantom: _ } = out);
1185
1186 match self {
1187 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
1188 ___E,
1189 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
1190 >(value, 1, encoder, raw, (1, ()))?,
1191 }
1192
1193 Ok(())
1194 }
1195 }
1196
1197 unsafe impl<___E>
1198 ::fidl_next::EncodeOption<
1199 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1200 ___E,
1201 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1202 where
1203 ___E: ?Sized,
1204 ArrayOfVectorOfEventInUnionWithDefaultRights: ::fidl_next::Encode<
1205 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1206 ___E,
1207 >,
1208 {
1209 #[inline]
1210 fn encode_option(
1211 this: ::core::option::Option<Self>,
1212 encoder: &mut ___E,
1213 out: &mut ::core::mem::MaybeUninit<
1214 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
1215 >,
1216 _: (),
1217 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1218 ::fidl_next::munge!(let crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights { raw, _phantom: _ } = &mut *out);
1219
1220 if let Some(inner) = this {
1221 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1222 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1223 } else {
1224 ::fidl_next::wire::Union::encode_absent(raw);
1225 }
1226
1227 Ok(())
1228 }
1229 }
1230
1231 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
1232 for ArrayOfVectorOfEventInUnionWithDefaultRights
1233 {
1234 #[inline]
1235 fn from_wire(wire: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>) -> Self {
1236 let wire = ::core::mem::ManuallyDrop::new(wire);
1237 match wire.raw.ordinal() {
1238 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
1239 wire.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
1240 })),
1241
1242 _ => unsafe { ::core::hint::unreachable_unchecked() },
1243 }
1244 }
1245 }
1246
1247 impl<'de>
1248 ::fidl_next::FromWireOption<
1249 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1250 > for ArrayOfVectorOfEventInUnionWithDefaultRights
1251 {
1252 #[inline]
1253 fn from_wire_option(
1254 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1255 ) -> ::core::option::Option<Self> {
1256 if let Some(inner) = wire.into_option() {
1257 Some(::fidl_next::FromWire::from_wire(inner))
1258 } else {
1259 None
1260 }
1261 }
1262 }
1263
1264 impl<'de>
1265 ::fidl_next::FromWireOption<
1266 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1267 > for Box<ArrayOfVectorOfEventInUnionWithDefaultRights>
1268 {
1269 #[inline]
1270 fn from_wire_option(
1271 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1272 ) -> ::core::option::Option<Self> {
1273 <ArrayOfVectorOfEventInUnionWithDefaultRights as ::fidl_next::FromWireOption<
1274 crate::wire_optional::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
1275 >>::from_wire_option(wire)
1276 .map(Box::new)
1277 }
1278 }
1279
1280 #[derive(Debug, PartialEq)]
1281 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
1282 pub u: crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights,
1283 }
1284
1285 unsafe impl<___E>
1286 ::fidl_next::Encode<
1287 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1288 ___E,
1289 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1290 where
1291 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1292 ___E: ::fidl_next::Encoder,
1293 ___E: ::fidl_next::fuchsia::HandleEncoder,
1294 {
1295 #[inline]
1296 fn encode(
1297 self,
1298 encoder_: &mut ___E,
1299 out_: &mut ::core::mem::MaybeUninit<
1300 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1301 >,
1302 _: (),
1303 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1304 ::fidl_next::munge! {
1305 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
1306 u,
1307
1308 } = out_;
1309 }
1310
1311 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
1312
1313 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
1314
1315 Ok(())
1316 }
1317 }
1318
1319 unsafe impl<___E>
1320 ::fidl_next::EncodeOption<
1321 ::fidl_next::wire::Box<
1322 'static,
1323 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1324 >,
1325 ___E,
1326 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1327 where
1328 ___E: ::fidl_next::Encoder + ?Sized,
1329 ArrayOfVectorOfEventInUnionWithDefaultRightsStruct: ::fidl_next::Encode<
1330 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1331 ___E,
1332 >,
1333 {
1334 #[inline]
1335 fn encode_option(
1336 this: ::core::option::Option<Self>,
1337 encoder: &mut ___E,
1338 out: &mut ::core::mem::MaybeUninit<
1339 ::fidl_next::wire::Box<
1340 'static,
1341 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
1342 >,
1343 >,
1344 _: (),
1345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1346 if let Some(inner) = this {
1347 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1348 ::fidl_next::wire::Box::encode_present(out);
1349 } else {
1350 ::fidl_next::wire::Box::encode_absent(out);
1351 }
1352
1353 Ok(())
1354 }
1355 }
1356
1357 impl<'de>
1358 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>>
1359 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct
1360 {
1361 #[inline]
1362 fn from_wire(
1363 wire: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>,
1364 ) -> Self {
1365 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
1366 }
1367 }
1368
1369 #[derive(Debug, PartialEq)]
1370 pub enum ArrayOfVectorOfEventInUnionWithReducedRights {
1371 H([::std::vec::Vec<::fidl_next::fuchsia::zx::Event>; 1]),
1372 }
1373
1374 unsafe impl<___E>
1375 ::fidl_next::Encode<
1376 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1377 ___E,
1378 > for ArrayOfVectorOfEventInUnionWithReducedRights
1379 where
1380 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1381 ___E: ::fidl_next::Encoder,
1382 ___E: ::fidl_next::fuchsia::HandleEncoder,
1383 {
1384 #[inline]
1385 fn encode(
1386 self,
1387 encoder: &mut ___E,
1388 out: &mut ::core::mem::MaybeUninit<
1389 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1390 >,
1391 _: (),
1392 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1393 ::fidl_next::munge!(let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights { raw, _phantom: _ } = out);
1394
1395 match self {
1396 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
1397 ___E,
1398 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
1399 >(value, 1, encoder, raw, (1, ()))?,
1400 }
1401
1402 Ok(())
1403 }
1404 }
1405
1406 unsafe impl<___E>
1407 ::fidl_next::EncodeOption<
1408 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1409 ___E,
1410 > for ArrayOfVectorOfEventInUnionWithReducedRights
1411 where
1412 ___E: ?Sized,
1413 ArrayOfVectorOfEventInUnionWithReducedRights: ::fidl_next::Encode<
1414 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1415 ___E,
1416 >,
1417 {
1418 #[inline]
1419 fn encode_option(
1420 this: ::core::option::Option<Self>,
1421 encoder: &mut ___E,
1422 out: &mut ::core::mem::MaybeUninit<
1423 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
1424 >,
1425 _: (),
1426 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1427 ::fidl_next::munge!(let crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights { raw, _phantom: _ } = &mut *out);
1428
1429 if let Some(inner) = this {
1430 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1431 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1432 } else {
1433 ::fidl_next::wire::Union::encode_absent(raw);
1434 }
1435
1436 Ok(())
1437 }
1438 }
1439
1440 impl<'de> ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
1441 for ArrayOfVectorOfEventInUnionWithReducedRights
1442 {
1443 #[inline]
1444 fn from_wire(wire: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>) -> Self {
1445 let wire = ::core::mem::ManuallyDrop::new(wire);
1446 match wire.raw.ordinal() {
1447 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
1448 wire.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
1449 })),
1450
1451 _ => unsafe { ::core::hint::unreachable_unchecked() },
1452 }
1453 }
1454 }
1455
1456 impl<'de>
1457 ::fidl_next::FromWireOption<
1458 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1459 > for ArrayOfVectorOfEventInUnionWithReducedRights
1460 {
1461 #[inline]
1462 fn from_wire_option(
1463 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1464 ) -> ::core::option::Option<Self> {
1465 if let Some(inner) = wire.into_option() {
1466 Some(::fidl_next::FromWire::from_wire(inner))
1467 } else {
1468 None
1469 }
1470 }
1471 }
1472
1473 impl<'de>
1474 ::fidl_next::FromWireOption<
1475 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1476 > for Box<ArrayOfVectorOfEventInUnionWithReducedRights>
1477 {
1478 #[inline]
1479 fn from_wire_option(
1480 wire: crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1481 ) -> ::core::option::Option<Self> {
1482 <ArrayOfVectorOfEventInUnionWithReducedRights as ::fidl_next::FromWireOption<
1483 crate::wire_optional::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
1484 >>::from_wire_option(wire)
1485 .map(Box::new)
1486 }
1487 }
1488
1489 #[derive(Debug, PartialEq)]
1490 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
1491 pub u: crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights,
1492 }
1493
1494 unsafe impl<___E>
1495 ::fidl_next::Encode<
1496 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1497 ___E,
1498 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1499 where
1500 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1501 ___E: ::fidl_next::Encoder,
1502 ___E: ::fidl_next::fuchsia::HandleEncoder,
1503 {
1504 #[inline]
1505 fn encode(
1506 self,
1507 encoder_: &mut ___E,
1508 out_: &mut ::core::mem::MaybeUninit<
1509 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1510 >,
1511 _: (),
1512 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1513 ::fidl_next::munge! {
1514 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
1515 u,
1516
1517 } = out_;
1518 }
1519
1520 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
1521
1522 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
1523
1524 Ok(())
1525 }
1526 }
1527
1528 unsafe impl<___E>
1529 ::fidl_next::EncodeOption<
1530 ::fidl_next::wire::Box<
1531 'static,
1532 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1533 >,
1534 ___E,
1535 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1536 where
1537 ___E: ::fidl_next::Encoder + ?Sized,
1538 ArrayOfVectorOfEventInUnionWithReducedRightsStruct: ::fidl_next::Encode<
1539 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1540 ___E,
1541 >,
1542 {
1543 #[inline]
1544 fn encode_option(
1545 this: ::core::option::Option<Self>,
1546 encoder: &mut ___E,
1547 out: &mut ::core::mem::MaybeUninit<
1548 ::fidl_next::wire::Box<
1549 'static,
1550 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
1551 >,
1552 >,
1553 _: (),
1554 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1555 if let Some(inner) = this {
1556 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1557 ::fidl_next::wire::Box::encode_present(out);
1558 } else {
1559 ::fidl_next::wire::Box::encode_absent(out);
1560 }
1561
1562 Ok(())
1563 }
1564 }
1565
1566 impl<'de>
1567 ::fidl_next::FromWire<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>>
1568 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct
1569 {
1570 #[inline]
1571 fn from_wire(
1572 wire: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>,
1573 ) -> Self {
1574 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
1575 }
1576 }
1577
1578 #[derive(Debug, PartialEq)]
1579 pub struct Bounded32NonnullableVectorOfHandles {
1580 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
1581 }
1582
1583 unsafe impl<___E>
1584 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
1585 for Bounded32NonnullableVectorOfHandles
1586 where
1587 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1588 ___E: ::fidl_next::Encoder,
1589 ___E: ::fidl_next::fuchsia::HandleEncoder,
1590 {
1591 #[inline]
1592 fn encode(
1593 self,
1594 encoder_: &mut ___E,
1595 out_: &mut ::core::mem::MaybeUninit<
1596 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1597 >,
1598 _: (),
1599 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1600 ::fidl_next::munge! {
1601 let crate::wire::Bounded32NonnullableVectorOfHandles {
1602 vh0,
1603
1604 } = out_;
1605 }
1606
1607 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
1608
1609 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
1610 ::fidl_next::Constrained::validate(_field, (32, ()))?;
1611
1612 Ok(())
1613 }
1614 }
1615
1616 unsafe impl<___E>
1617 ::fidl_next::EncodeOption<
1618 ::fidl_next::wire::Box<
1619 'static,
1620 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1621 >,
1622 ___E,
1623 > for Bounded32NonnullableVectorOfHandles
1624 where
1625 ___E: ::fidl_next::Encoder + ?Sized,
1626 Bounded32NonnullableVectorOfHandles:
1627 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>,
1628 {
1629 #[inline]
1630 fn encode_option(
1631 this: ::core::option::Option<Self>,
1632 encoder: &mut ___E,
1633 out: &mut ::core::mem::MaybeUninit<
1634 ::fidl_next::wire::Box<
1635 'static,
1636 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
1637 >,
1638 >,
1639 _: (),
1640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1641 if let Some(inner) = this {
1642 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1643 ::fidl_next::wire::Box::encode_present(out);
1644 } else {
1645 ::fidl_next::wire::Box::encode_absent(out);
1646 }
1647
1648 Ok(())
1649 }
1650 }
1651
1652 impl<'de> ::fidl_next::FromWire<crate::wire::Bounded32NonnullableVectorOfHandles<'de>>
1653 for Bounded32NonnullableVectorOfHandles
1654 {
1655 #[inline]
1656 fn from_wire(wire: crate::wire::Bounded32NonnullableVectorOfHandles<'de>) -> Self {
1657 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
1658 }
1659 }
1660
1661 #[derive(Debug, PartialEq)]
1662 pub struct Bounded32NullableVectorOfHandles {
1663 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
1664 }
1665
1666 unsafe impl<___E>
1667 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
1668 for Bounded32NullableVectorOfHandles
1669 where
1670 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1671 ___E: ::fidl_next::Encoder,
1672 ___E: ::fidl_next::fuchsia::HandleEncoder,
1673 {
1674 #[inline]
1675 fn encode(
1676 self,
1677 encoder_: &mut ___E,
1678 out_: &mut ::core::mem::MaybeUninit<
1679 crate::wire::Bounded32NullableVectorOfHandles<'static>,
1680 >,
1681 _: (),
1682 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1683 ::fidl_next::munge! {
1684 let crate::wire::Bounded32NullableVectorOfHandles {
1685 vh0,
1686
1687 } = out_;
1688 }
1689
1690 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
1691
1692 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
1693 ::fidl_next::Constrained::validate(_field, (32, ()))?;
1694
1695 Ok(())
1696 }
1697 }
1698
1699 unsafe impl<___E>
1700 ::fidl_next::EncodeOption<
1701 ::fidl_next::wire::Box<'static, crate::wire::Bounded32NullableVectorOfHandles<'static>>,
1702 ___E,
1703 > for Bounded32NullableVectorOfHandles
1704 where
1705 ___E: ::fidl_next::Encoder + ?Sized,
1706 Bounded32NullableVectorOfHandles:
1707 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>,
1708 {
1709 #[inline]
1710 fn encode_option(
1711 this: ::core::option::Option<Self>,
1712 encoder: &mut ___E,
1713 out: &mut ::core::mem::MaybeUninit<
1714 ::fidl_next::wire::Box<
1715 'static,
1716 crate::wire::Bounded32NullableVectorOfHandles<'static>,
1717 >,
1718 >,
1719 _: (),
1720 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1721 if let Some(inner) = this {
1722 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1723 ::fidl_next::wire::Box::encode_present(out);
1724 } else {
1725 ::fidl_next::wire::Box::encode_absent(out);
1726 }
1727
1728 Ok(())
1729 }
1730 }
1731
1732 impl<'de> ::fidl_next::FromWire<crate::wire::Bounded32NullableVectorOfHandles<'de>>
1733 for Bounded32NullableVectorOfHandles
1734 {
1735 #[inline]
1736 fn from_wire(wire: crate::wire::Bounded32NullableVectorOfHandles<'de>) -> Self {
1737 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
1738 }
1739 }
1740
1741 #[derive(Debug, PartialEq)]
1742 pub struct BoxOfSingleHandle {
1743 pub b: ::core::option::Option<::std::boxed::Box<crate::natural::SingleHandle>>,
1744 }
1745
1746 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
1747 for BoxOfSingleHandle
1748 where
1749 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1750 ___E: ::fidl_next::Encoder,
1751 ___E: ::fidl_next::fuchsia::HandleEncoder,
1752 {
1753 #[inline]
1754 fn encode(
1755 self,
1756 encoder_: &mut ___E,
1757 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
1758 _: (),
1759 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1760 ::fidl_next::munge! {
1761 let crate::wire::BoxOfSingleHandle {
1762 b,
1763
1764 } = out_;
1765 }
1766
1767 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
1768
1769 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) };
1770
1771 Ok(())
1772 }
1773 }
1774
1775 unsafe impl<___E>
1776 ::fidl_next::EncodeOption<
1777 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleHandle<'static>>,
1778 ___E,
1779 > for BoxOfSingleHandle
1780 where
1781 ___E: ::fidl_next::Encoder + ?Sized,
1782 BoxOfSingleHandle: ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>,
1783 {
1784 #[inline]
1785 fn encode_option(
1786 this: ::core::option::Option<Self>,
1787 encoder: &mut ___E,
1788 out: &mut ::core::mem::MaybeUninit<
1789 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleHandle<'static>>,
1790 >,
1791 _: (),
1792 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1793 if let Some(inner) = this {
1794 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1795 ::fidl_next::wire::Box::encode_present(out);
1796 } else {
1797 ::fidl_next::wire::Box::encode_absent(out);
1798 }
1799
1800 Ok(())
1801 }
1802 }
1803
1804 impl<'de> ::fidl_next::FromWire<crate::wire::BoxOfSingleHandle<'de>> for BoxOfSingleHandle {
1805 #[inline]
1806 fn from_wire(wire: crate::wire::BoxOfSingleHandle<'de>) -> Self {
1807 Self { b: ::fidl_next::FromWire::from_wire(wire.b) }
1808 }
1809 }
1810
1811 #[derive(Debug, PartialEq)]
1812 pub struct BoxOfSingleOptionalHandle {
1813 pub b: ::core::option::Option<::std::boxed::Box<crate::natural::SingleOptionalHandle>>,
1814 }
1815
1816 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
1817 for BoxOfSingleOptionalHandle
1818 where
1819 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1820 ___E: ::fidl_next::Encoder,
1821 ___E: ::fidl_next::fuchsia::HandleEncoder,
1822 {
1823 #[inline]
1824 fn encode(
1825 self,
1826 encoder_: &mut ___E,
1827 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
1828 _: (),
1829 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1830 ::fidl_next::munge! {
1831 let crate::wire::BoxOfSingleOptionalHandle {
1832 b,
1833
1834 } = out_;
1835 }
1836
1837 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
1838
1839 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(b.as_mut_ptr()) };
1840
1841 Ok(())
1842 }
1843 }
1844
1845 unsafe impl<___E>
1846 ::fidl_next::EncodeOption<
1847 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleOptionalHandle<'static>>,
1848 ___E,
1849 > for BoxOfSingleOptionalHandle
1850 where
1851 ___E: ::fidl_next::Encoder + ?Sized,
1852 BoxOfSingleOptionalHandle:
1853 ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>,
1854 {
1855 #[inline]
1856 fn encode_option(
1857 this: ::core::option::Option<Self>,
1858 encoder: &mut ___E,
1859 out: &mut ::core::mem::MaybeUninit<
1860 ::fidl_next::wire::Box<'static, crate::wire::BoxOfSingleOptionalHandle<'static>>,
1861 >,
1862 _: (),
1863 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1864 if let Some(inner) = this {
1865 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1866 ::fidl_next::wire::Box::encode_present(out);
1867 } else {
1868 ::fidl_next::wire::Box::encode_absent(out);
1869 }
1870
1871 Ok(())
1872 }
1873 }
1874
1875 impl<'de> ::fidl_next::FromWire<crate::wire::BoxOfSingleOptionalHandle<'de>>
1876 for BoxOfSingleOptionalHandle
1877 {
1878 #[inline]
1879 fn from_wire(wire: crate::wire::BoxOfSingleOptionalHandle<'de>) -> Self {
1880 Self { b: ::fidl_next::FromWire::from_wire(wire.b) }
1881 }
1882 }
1883
1884 #[derive(Debug, PartialEq)]
1885 pub struct LaunchInfo {
1886 pub url: ::std::string::String,
1887
1888 pub arguments: ::core::option::Option<::std::vec::Vec<::std::string::String>>,
1889
1890 pub out: ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1891
1892 pub err: ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1893
1894 pub directory_request: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
1895
1896 pub flat_namespace:
1897 ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1898
1899 pub additional_services:
1900 ::core::option::Option<::std::boxed::Box<crate::natural::TransformerEmptyStruct>>,
1901 }
1902
1903 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E> for LaunchInfo
1904 where
1905 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1906 ___E: ::fidl_next::Encoder,
1907 ___E: ::fidl_next::fuchsia::HandleEncoder,
1908 {
1909 #[inline]
1910 fn encode(
1911 self,
1912 encoder_: &mut ___E,
1913 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
1914 _: (),
1915 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1916 ::fidl_next::munge! {
1917 let crate::wire::LaunchInfo {
1918 url,
1919 arguments,
1920 out,
1921 err,
1922 directory_request,
1923 flat_namespace,
1924 additional_services,
1925
1926 } = out_;
1927 }
1928
1929 ::fidl_next::Encode::encode(self.url, encoder_, url, 200)?;
1930
1931 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(url.as_mut_ptr()) };
1932 ::fidl_next::Constrained::validate(_field, 200)?;
1933
1934 ::fidl_next::Encode::encode(
1935 self.arguments,
1936 encoder_,
1937 arguments,
1938 (4294967295, 4294967295),
1939 )?;
1940
1941 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arguments.as_mut_ptr()) };
1942 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
1943
1944 ::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
1945
1946 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(out.as_mut_ptr()) };
1947
1948 ::fidl_next::Encode::encode(self.err, encoder_, err, ())?;
1949
1950 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(err.as_mut_ptr()) };
1951
1952 ::fidl_next::Encode::encode(self.directory_request, encoder_, directory_request, ())?;
1953
1954 let mut _field =
1955 unsafe { ::fidl_next::Slot::new_unchecked(directory_request.as_mut_ptr()) };
1956
1957 ::fidl_next::Encode::encode(self.flat_namespace, encoder_, flat_namespace, ())?;
1958
1959 let mut _field =
1960 unsafe { ::fidl_next::Slot::new_unchecked(flat_namespace.as_mut_ptr()) };
1961
1962 ::fidl_next::Encode::encode(
1963 self.additional_services,
1964 encoder_,
1965 additional_services,
1966 (),
1967 )?;
1968
1969 let mut _field =
1970 unsafe { ::fidl_next::Slot::new_unchecked(additional_services.as_mut_ptr()) };
1971
1972 Ok(())
1973 }
1974 }
1975
1976 unsafe impl<___E>
1977 ::fidl_next::EncodeOption<
1978 ::fidl_next::wire::Box<'static, crate::wire::LaunchInfo<'static>>,
1979 ___E,
1980 > for LaunchInfo
1981 where
1982 ___E: ::fidl_next::Encoder + ?Sized,
1983 LaunchInfo: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
1984 {
1985 #[inline]
1986 fn encode_option(
1987 this: ::core::option::Option<Self>,
1988 encoder: &mut ___E,
1989 out: &mut ::core::mem::MaybeUninit<
1990 ::fidl_next::wire::Box<'static, crate::wire::LaunchInfo<'static>>,
1991 >,
1992 _: (),
1993 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1994 if let Some(inner) = this {
1995 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1996 ::fidl_next::wire::Box::encode_present(out);
1997 } else {
1998 ::fidl_next::wire::Box::encode_absent(out);
1999 }
2000
2001 Ok(())
2002 }
2003 }
2004
2005 impl<'de> ::fidl_next::FromWire<crate::wire::LaunchInfo<'de>> for LaunchInfo {
2006 #[inline]
2007 fn from_wire(wire: crate::wire::LaunchInfo<'de>) -> Self {
2008 Self {
2009 url: ::fidl_next::FromWire::from_wire(wire.url),
2010
2011 arguments: ::fidl_next::FromWire::from_wire(wire.arguments),
2012
2013 out: ::fidl_next::FromWire::from_wire(wire.out),
2014
2015 err: ::fidl_next::FromWire::from_wire(wire.err),
2016
2017 directory_request: ::fidl_next::FromWire::from_wire(wire.directory_request),
2018
2019 flat_namespace: ::fidl_next::FromWire::from_wire(wire.flat_namespace),
2020
2021 additional_services: ::fidl_next::FromWire::from_wire(wire.additional_services),
2022 }
2023 }
2024 }
2025
2026 #[derive(Debug, PartialEq)]
2027 pub struct CreateComponentRequest {
2028 pub launch_info: crate::natural::LaunchInfo,
2029
2030 pub controller: ::core::option::Option<
2031 ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::fuchsia::zx::Channel>,
2032 >,
2033 }
2034
2035 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
2036 for CreateComponentRequest
2037 where
2038 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2039 ___E: ::fidl_next::Encoder,
2040 ___E: ::fidl_next::fuchsia::HandleEncoder,
2041 {
2042 #[inline]
2043 fn encode(
2044 self,
2045 encoder_: &mut ___E,
2046 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
2047 _: (),
2048 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2049 ::fidl_next::munge! {
2050 let crate::wire::CreateComponentRequest {
2051 launch_info,
2052 controller,
2053
2054 } = out_;
2055 }
2056
2057 ::fidl_next::Encode::encode(self.launch_info, encoder_, launch_info, ())?;
2058
2059 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(launch_info.as_mut_ptr()) };
2060
2061 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
2062
2063 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
2064
2065 Ok(())
2066 }
2067 }
2068
2069 unsafe impl<___E>
2070 ::fidl_next::EncodeOption<
2071 ::fidl_next::wire::Box<'static, crate::wire::CreateComponentRequest<'static>>,
2072 ___E,
2073 > for CreateComponentRequest
2074 where
2075 ___E: ::fidl_next::Encoder + ?Sized,
2076 CreateComponentRequest:
2077 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>,
2078 {
2079 #[inline]
2080 fn encode_option(
2081 this: ::core::option::Option<Self>,
2082 encoder: &mut ___E,
2083 out: &mut ::core::mem::MaybeUninit<
2084 ::fidl_next::wire::Box<'static, crate::wire::CreateComponentRequest<'static>>,
2085 >,
2086 _: (),
2087 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2088 if let Some(inner) = this {
2089 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2090 ::fidl_next::wire::Box::encode_present(out);
2091 } else {
2092 ::fidl_next::wire::Box::encode_absent(out);
2093 }
2094
2095 Ok(())
2096 }
2097 }
2098
2099 impl<'de> ::fidl_next::FromWire<crate::wire::CreateComponentRequest<'de>>
2100 for CreateComponentRequest
2101 {
2102 #[inline]
2103 fn from_wire(wire: crate::wire::CreateComponentRequest<'de>) -> Self {
2104 Self {
2105 launch_info: ::fidl_next::FromWire::from_wire(wire.launch_info),
2106
2107 controller: ::fidl_next::FromWire::from_wire(wire.controller),
2108 }
2109 }
2110 }
2111
2112 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2113 pub struct EmptyResourceTable {}
2114
2115 impl EmptyResourceTable {
2116 fn __max_ordinal(&self) -> usize {
2117 0
2118 }
2119 }
2120
2121 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyResourceTable<'static>, ___E>
2122 for EmptyResourceTable
2123 where
2124 ___E: ::fidl_next::Encoder + ?Sized,
2125 ___E: ::fidl_next::fuchsia::HandleEncoder,
2126 {
2127 #[inline]
2128 fn encode(
2129 mut self,
2130 encoder: &mut ___E,
2131 out: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTable<'static>>,
2132 _: (),
2133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2134 ::fidl_next::munge!(let crate::wire::EmptyResourceTable { table } = out);
2135
2136 let max_ord = self.__max_ordinal();
2137
2138 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2139 ::fidl_next::Wire::zero_padding(&mut out);
2140
2141 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2142 ::fidl_next::wire::Envelope,
2143 >(encoder, max_ord);
2144
2145 for i in 1..=max_ord {
2146 match i {
2147 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2148 }
2149 unsafe {
2150 preallocated.write_next(out.assume_init_ref());
2151 }
2152 }
2153
2154 ::fidl_next::wire::Table::encode_len(table, max_ord);
2155
2156 Ok(())
2157 }
2158 }
2159
2160 impl<'de> ::fidl_next::FromWire<crate::wire::EmptyResourceTable<'de>> for EmptyResourceTable {
2161 #[inline]
2162 fn from_wire(wire_: crate::wire::EmptyResourceTable<'de>) -> Self {
2163 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2164
2165 Self {}
2166 }
2167 }
2168
2169 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2170 pub struct EmptyResourceTableStruct {
2171 pub table: crate::natural::EmptyResourceTable,
2172 }
2173
2174 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
2175 for EmptyResourceTableStruct
2176 where
2177 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2178 ___E: ::fidl_next::Encoder,
2179 ___E: ::fidl_next::fuchsia::HandleEncoder,
2180 {
2181 #[inline]
2182 fn encode(
2183 self,
2184 encoder_: &mut ___E,
2185 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
2186 _: (),
2187 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2188 ::fidl_next::munge! {
2189 let crate::wire::EmptyResourceTableStruct {
2190 table,
2191
2192 } = out_;
2193 }
2194
2195 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
2196
2197 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
2198
2199 Ok(())
2200 }
2201 }
2202
2203 unsafe impl<___E>
2204 ::fidl_next::EncodeOption<
2205 ::fidl_next::wire::Box<'static, crate::wire::EmptyResourceTableStruct<'static>>,
2206 ___E,
2207 > for EmptyResourceTableStruct
2208 where
2209 ___E: ::fidl_next::Encoder + ?Sized,
2210 EmptyResourceTableStruct:
2211 ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>,
2212 {
2213 #[inline]
2214 fn encode_option(
2215 this: ::core::option::Option<Self>,
2216 encoder: &mut ___E,
2217 out: &mut ::core::mem::MaybeUninit<
2218 ::fidl_next::wire::Box<'static, crate::wire::EmptyResourceTableStruct<'static>>,
2219 >,
2220 _: (),
2221 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2222 if let Some(inner) = this {
2223 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2224 ::fidl_next::wire::Box::encode_present(out);
2225 } else {
2226 ::fidl_next::wire::Box::encode_absent(out);
2227 }
2228
2229 Ok(())
2230 }
2231 }
2232
2233 impl<'de> ::fidl_next::FromWire<crate::wire::EmptyResourceTableStruct<'de>>
2234 for EmptyResourceTableStruct
2235 {
2236 #[inline]
2237 fn from_wire(wire: crate::wire::EmptyResourceTableStruct<'de>) -> Self {
2238 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
2239 }
2240 }
2241
2242 #[derive(Debug, PartialEq)]
2243 pub enum EnvelopeInliningTestUnion {
2244 Small(u32),
2245
2246 Large(u64),
2247
2248 Handle(::fidl_next::fuchsia::zx::NullableHandle),
2249
2250 UnknownOrdinal_(u64),
2251 }
2252
2253 impl EnvelopeInliningTestUnion {
2254 pub fn is_unknown(&self) -> bool {
2255 #[allow(unreachable_patterns)]
2256 match self {
2257 Self::UnknownOrdinal_(_) => true,
2258 _ => false,
2259 }
2260 }
2261 }
2262
2263 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>
2264 for EnvelopeInliningTestUnion
2265 where
2266 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2267 ___E: ::fidl_next::Encoder,
2268 ___E: ::fidl_next::fuchsia::HandleEncoder,
2269 {
2270 #[inline]
2271 fn encode(
2272 self,
2273 encoder: &mut ___E,
2274 out: &mut ::core::mem::MaybeUninit<crate::wire::EnvelopeInliningTestUnion<'static>>,
2275 _: (),
2276 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2277 ::fidl_next::munge!(let crate::wire::EnvelopeInliningTestUnion { raw, _phantom: _ } = out);
2278
2279 match self {
2280 Self::Small(value) => ::fidl_next::wire::Union::encode_as::<
2281 ___E,
2282 ::fidl_next::wire::Uint32,
2283 >(value, 1, encoder, raw, ())?,
2284
2285 Self::Large(value) => ::fidl_next::wire::Union::encode_as::<
2286 ___E,
2287 ::fidl_next::wire::Uint64,
2288 >(value, 2, encoder, raw, ())?,
2289
2290 Self::Handle(value) => ::fidl_next::wire::Union::encode_as::<
2291 ___E,
2292 ::fidl_next::wire::fuchsia::NullableHandle,
2293 >(value, 3, encoder, raw, ())?,
2294
2295 Self::UnknownOrdinal_(ordinal) => {
2296 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
2297 }
2298 }
2299
2300 Ok(())
2301 }
2302 }
2303
2304 unsafe impl<___E>
2305 ::fidl_next::EncodeOption<crate::wire_optional::EnvelopeInliningTestUnion<'static>, ___E>
2306 for EnvelopeInliningTestUnion
2307 where
2308 ___E: ?Sized,
2309 EnvelopeInliningTestUnion:
2310 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
2311 {
2312 #[inline]
2313 fn encode_option(
2314 this: ::core::option::Option<Self>,
2315 encoder: &mut ___E,
2316 out: &mut ::core::mem::MaybeUninit<
2317 crate::wire_optional::EnvelopeInliningTestUnion<'static>,
2318 >,
2319 _: (),
2320 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2321 ::fidl_next::munge!(let crate::wire_optional::EnvelopeInliningTestUnion { raw, _phantom: _ } = &mut *out);
2322
2323 if let Some(inner) = this {
2324 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2325 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2326 } else {
2327 ::fidl_next::wire::Union::encode_absent(raw);
2328 }
2329
2330 Ok(())
2331 }
2332 }
2333
2334 impl<'de> ::fidl_next::FromWire<crate::wire::EnvelopeInliningTestUnion<'de>>
2335 for EnvelopeInliningTestUnion
2336 {
2337 #[inline]
2338 fn from_wire(wire: crate::wire::EnvelopeInliningTestUnion<'de>) -> Self {
2339 let wire = ::core::mem::ManuallyDrop::new(wire);
2340 match wire.raw.ordinal() {
2341 1 => Self::Small(::fidl_next::FromWire::from_wire(unsafe {
2342 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
2343 })),
2344
2345 2 => Self::Large(::fidl_next::FromWire::from_wire(unsafe {
2346 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint64>()
2347 })),
2348
2349 3 => Self::Handle(::fidl_next::FromWire::from_wire(unsafe {
2350 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
2351 })),
2352
2353 ord => return Self::UnknownOrdinal_(ord as u64),
2354 }
2355 }
2356 }
2357
2358 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EnvelopeInliningTestUnion<'de>>
2359 for EnvelopeInliningTestUnion
2360 {
2361 #[inline]
2362 fn from_wire_option(
2363 wire: crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2364 ) -> ::core::option::Option<Self> {
2365 if let Some(inner) = wire.into_option() {
2366 Some(::fidl_next::FromWire::from_wire(inner))
2367 } else {
2368 None
2369 }
2370 }
2371 }
2372
2373 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EnvelopeInliningTestUnion<'de>>
2374 for Box<EnvelopeInliningTestUnion>
2375 {
2376 #[inline]
2377 fn from_wire_option(
2378 wire: crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2379 ) -> ::core::option::Option<Self> {
2380 <EnvelopeInliningTestUnion as ::fidl_next::FromWireOption<
2381 crate::wire_optional::EnvelopeInliningTestUnion<'de>,
2382 >>::from_wire_option(wire)
2383 .map(Box::new)
2384 }
2385 }
2386
2387 #[derive(Debug, PartialEq)]
2388 pub struct EnvelopeInliningTestUnionStruct {
2389 pub u: crate::natural::EnvelopeInliningTestUnion,
2390 }
2391
2392 unsafe impl<___E>
2393 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
2394 for EnvelopeInliningTestUnionStruct
2395 where
2396 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2397 ___E: ::fidl_next::Encoder,
2398 ___E: ::fidl_next::fuchsia::HandleEncoder,
2399 {
2400 #[inline]
2401 fn encode(
2402 self,
2403 encoder_: &mut ___E,
2404 out_: &mut ::core::mem::MaybeUninit<
2405 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
2406 >,
2407 _: (),
2408 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2409 ::fidl_next::munge! {
2410 let crate::wire::EnvelopeInliningTestUnionStruct {
2411 u,
2412
2413 } = out_;
2414 }
2415
2416 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
2417
2418 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
2419
2420 Ok(())
2421 }
2422 }
2423
2424 unsafe impl<___E>
2425 ::fidl_next::EncodeOption<
2426 ::fidl_next::wire::Box<'static, crate::wire::EnvelopeInliningTestUnionStruct<'static>>,
2427 ___E,
2428 > for EnvelopeInliningTestUnionStruct
2429 where
2430 ___E: ::fidl_next::Encoder + ?Sized,
2431 EnvelopeInliningTestUnionStruct:
2432 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>,
2433 {
2434 #[inline]
2435 fn encode_option(
2436 this: ::core::option::Option<Self>,
2437 encoder: &mut ___E,
2438 out: &mut ::core::mem::MaybeUninit<
2439 ::fidl_next::wire::Box<
2440 'static,
2441 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
2442 >,
2443 >,
2444 _: (),
2445 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2446 if let Some(inner) = this {
2447 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2448 ::fidl_next::wire::Box::encode_present(out);
2449 } else {
2450 ::fidl_next::wire::Box::encode_absent(out);
2451 }
2452
2453 Ok(())
2454 }
2455 }
2456
2457 impl<'de> ::fidl_next::FromWire<crate::wire::EnvelopeInliningTestUnionStruct<'de>>
2458 for EnvelopeInliningTestUnionStruct
2459 {
2460 #[inline]
2461 fn from_wire(wire: crate::wire::EnvelopeInliningTestUnionStruct<'de>) -> Self {
2462 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
2463 }
2464 }
2465
2466 #[derive(Debug, PartialEq)]
2467 #[repr(C)]
2468 pub struct EventWithDefaultRights {
2469 pub h: ::fidl_next::fuchsia::zx::Event,
2470 }
2471
2472 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
2473 for EventWithDefaultRights
2474 where
2475 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2476 ___E: ::fidl_next::fuchsia::HandleEncoder,
2477 {
2478 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2479 Self,
2480 crate::wire::EventWithDefaultRights,
2481 > = unsafe {
2482 ::fidl_next::CopyOptimization::enable_if(
2483 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
2484 ::fidl_next::wire::fuchsia::Event,
2485 ___E,
2486 >>::COPY_OPTIMIZATION
2487 .is_enabled(),
2488 )
2489 };
2490
2491 #[inline]
2492 fn encode(
2493 self,
2494 encoder_: &mut ___E,
2495 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
2496 _: (),
2497 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2498 ::fidl_next::munge! {
2499 let crate::wire::EventWithDefaultRights {
2500 h,
2501
2502 } = out_;
2503 }
2504
2505 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
2506
2507 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
2508
2509 Ok(())
2510 }
2511 }
2512
2513 unsafe impl<___E>
2514 ::fidl_next::EncodeOption<
2515 ::fidl_next::wire::Box<'static, crate::wire::EventWithDefaultRights>,
2516 ___E,
2517 > for EventWithDefaultRights
2518 where
2519 ___E: ::fidl_next::Encoder + ?Sized,
2520 EventWithDefaultRights: ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>,
2521 {
2522 #[inline]
2523 fn encode_option(
2524 this: ::core::option::Option<Self>,
2525 encoder: &mut ___E,
2526 out: &mut ::core::mem::MaybeUninit<
2527 ::fidl_next::wire::Box<'static, crate::wire::EventWithDefaultRights>,
2528 >,
2529 _: (),
2530 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2531 if let Some(inner) = this {
2532 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2533 ::fidl_next::wire::Box::encode_present(out);
2534 } else {
2535 ::fidl_next::wire::Box::encode_absent(out);
2536 }
2537
2538 Ok(())
2539 }
2540 }
2541
2542 impl ::fidl_next::FromWire<crate::wire::EventWithDefaultRights> for EventWithDefaultRights {
2543 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2544 crate::wire::EventWithDefaultRights,
2545 Self,
2546 > = unsafe {
2547 ::fidl_next::CopyOptimization::enable_if(
2548 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
2549 ::fidl_next::wire::fuchsia::Event,
2550 >>::COPY_OPTIMIZATION
2551 .is_enabled(),
2552 )
2553 };
2554
2555 #[inline]
2556 fn from_wire(wire: crate::wire::EventWithDefaultRights) -> Self {
2557 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
2558 }
2559 }
2560
2561 #[derive(Debug, PartialEq)]
2562 #[repr(C)]
2563 pub struct EventWithReducedRights {
2564 pub h: ::fidl_next::fuchsia::zx::Event,
2565 }
2566
2567 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
2568 for EventWithReducedRights
2569 where
2570 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2571 ___E: ::fidl_next::fuchsia::HandleEncoder,
2572 {
2573 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2574 Self,
2575 crate::wire::EventWithReducedRights,
2576 > = unsafe {
2577 ::fidl_next::CopyOptimization::enable_if(
2578 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
2579 ::fidl_next::wire::fuchsia::Event,
2580 ___E,
2581 >>::COPY_OPTIMIZATION
2582 .is_enabled(),
2583 )
2584 };
2585
2586 #[inline]
2587 fn encode(
2588 self,
2589 encoder_: &mut ___E,
2590 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
2591 _: (),
2592 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2593 ::fidl_next::munge! {
2594 let crate::wire::EventWithReducedRights {
2595 h,
2596
2597 } = out_;
2598 }
2599
2600 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
2601
2602 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
2603
2604 Ok(())
2605 }
2606 }
2607
2608 unsafe impl<___E>
2609 ::fidl_next::EncodeOption<
2610 ::fidl_next::wire::Box<'static, crate::wire::EventWithReducedRights>,
2611 ___E,
2612 > for EventWithReducedRights
2613 where
2614 ___E: ::fidl_next::Encoder + ?Sized,
2615 EventWithReducedRights: ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>,
2616 {
2617 #[inline]
2618 fn encode_option(
2619 this: ::core::option::Option<Self>,
2620 encoder: &mut ___E,
2621 out: &mut ::core::mem::MaybeUninit<
2622 ::fidl_next::wire::Box<'static, crate::wire::EventWithReducedRights>,
2623 >,
2624 _: (),
2625 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2626 if let Some(inner) = this {
2627 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2628 ::fidl_next::wire::Box::encode_present(out);
2629 } else {
2630 ::fidl_next::wire::Box::encode_absent(out);
2631 }
2632
2633 Ok(())
2634 }
2635 }
2636
2637 impl ::fidl_next::FromWire<crate::wire::EventWithReducedRights> for EventWithReducedRights {
2638 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2639 crate::wire::EventWithReducedRights,
2640 Self,
2641 > = unsafe {
2642 ::fidl_next::CopyOptimization::enable_if(
2643 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
2644 ::fidl_next::wire::fuchsia::Event,
2645 >>::COPY_OPTIMIZATION
2646 .is_enabled(),
2647 )
2648 };
2649
2650 #[inline]
2651 fn from_wire(wire: crate::wire::EventWithReducedRights) -> Self {
2652 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
2653 }
2654 }
2655
2656 #[derive(Debug, PartialEq)]
2657 pub struct FidlvizDemo {
2658 pub f1: u8,
2659
2660 pub f2: i8,
2661
2662 pub f3: u16,
2663
2664 pub f4: u32,
2665
2666 pub f5: u64,
2667
2668 pub f6: u8,
2669
2670 pub f7: u8,
2671
2672 pub f8: u16,
2673
2674 pub f9: f32,
2675
2676 pub f10: f64,
2677
2678 pub f11: bool,
2679
2680 pub f12: bool,
2681
2682 pub f13: ::std::string::String,
2683
2684 pub f14: ::core::option::Option<::std::string::String>,
2685
2686 pub f15: ::std::string::String,
2687
2688 pub f16: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
2689
2690 pub f17: ::fidl_next::fuchsia::zx::NullableHandle,
2691
2692 pub f18: [u8; 3],
2693
2694 pub f19: ::std::vec::Vec<f64>,
2695
2696 pub f20: ::core::option::Option<::std::vec::Vec<u8>>,
2697
2698 pub f21: ::std::vec::Vec<u8>,
2699
2700 pub f22: crate::natural::FidlvizBits,
2701
2702 pub f23: crate::natural::FidlvizEnum,
2703
2704 pub f24: crate::natural::FidlvizStruct1,
2705
2706 pub f25: crate::natural::FidlvizStruct2,
2707
2708 pub f26: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizStruct1>>,
2709
2710 pub f27: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizStruct2>>,
2711
2712 pub f28: crate::natural::FidlvizTable,
2713
2714 pub f29: crate::natural::FidlvizTable,
2715
2716 pub f30: ::core::option::Option<::std::boxed::Box<crate::natural::FidlvizUnion>>,
2717
2718 pub f31: crate::natural::FidlvizUnion,
2719 }
2720
2721 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E> for FidlvizDemo
2722 where
2723 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2724 ___E: ::fidl_next::Encoder,
2725 ___E: ::fidl_next::fuchsia::HandleEncoder,
2726 {
2727 #[inline]
2728 fn encode(
2729 self,
2730 encoder_: &mut ___E,
2731 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
2732 _: (),
2733 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2734 ::fidl_next::munge! {
2735 let crate::wire::FidlvizDemo {
2736 f1,
2737 f2,
2738 f3,
2739 f4,
2740 f5,
2741 f6,
2742 f7,
2743 f8,
2744 f9,
2745 f10,
2746 f11,
2747 f12,
2748 f13,
2749 f14,
2750 f15,
2751 f16,
2752 f17,
2753 f18,
2754 f19,
2755 f20,
2756 f21,
2757 f22,
2758 f23,
2759 f24,
2760 f25,
2761 f26,
2762 f27,
2763 f28,
2764 f29,
2765 f30,
2766 f31,
2767
2768 } = out_;
2769 }
2770
2771 ::fidl_next::Encode::encode(self.f1, encoder_, f1, ())?;
2772
2773 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f1.as_mut_ptr()) };
2774
2775 ::fidl_next::Encode::encode(self.f2, encoder_, f2, ())?;
2776
2777 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f2.as_mut_ptr()) };
2778
2779 ::fidl_next::Encode::encode(self.f3, encoder_, f3, ())?;
2780
2781 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f3.as_mut_ptr()) };
2782
2783 ::fidl_next::Encode::encode(self.f4, encoder_, f4, ())?;
2784
2785 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f4.as_mut_ptr()) };
2786
2787 ::fidl_next::Encode::encode(self.f5, encoder_, f5, ())?;
2788
2789 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f5.as_mut_ptr()) };
2790
2791 ::fidl_next::Encode::encode(self.f6, encoder_, f6, ())?;
2792
2793 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f6.as_mut_ptr()) };
2794
2795 ::fidl_next::Encode::encode(self.f7, encoder_, f7, ())?;
2796
2797 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f7.as_mut_ptr()) };
2798
2799 ::fidl_next::Encode::encode(self.f8, encoder_, f8, ())?;
2800
2801 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f8.as_mut_ptr()) };
2802
2803 ::fidl_next::Encode::encode(self.f9, encoder_, f9, ())?;
2804
2805 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f9.as_mut_ptr()) };
2806
2807 ::fidl_next::Encode::encode(self.f10, encoder_, f10, ())?;
2808
2809 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f10.as_mut_ptr()) };
2810
2811 ::fidl_next::Encode::encode(self.f11, encoder_, f11, ())?;
2812
2813 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f11.as_mut_ptr()) };
2814
2815 ::fidl_next::Encode::encode(self.f12, encoder_, f12, ())?;
2816
2817 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f12.as_mut_ptr()) };
2818
2819 ::fidl_next::Encode::encode(self.f13, encoder_, f13, 4294967295)?;
2820
2821 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f13.as_mut_ptr()) };
2822 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2823
2824 ::fidl_next::Encode::encode(self.f14, encoder_, f14, 4294967295)?;
2825
2826 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f14.as_mut_ptr()) };
2827 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2828
2829 ::fidl_next::Encode::encode(self.f15, encoder_, f15, 4294967295)?;
2830
2831 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f15.as_mut_ptr()) };
2832 ::fidl_next::Constrained::validate(_field, 4294967295)?;
2833
2834 ::fidl_next::Encode::encode(self.f16, encoder_, f16, ())?;
2835
2836 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f16.as_mut_ptr()) };
2837
2838 ::fidl_next::Encode::encode(self.f17, encoder_, f17, ())?;
2839
2840 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f17.as_mut_ptr()) };
2841
2842 ::fidl_next::Encode::encode(self.f18, encoder_, f18, ())?;
2843
2844 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f18.as_mut_ptr()) };
2845
2846 ::fidl_next::Encode::encode(self.f19, encoder_, f19, (4294967295, ()))?;
2847
2848 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f19.as_mut_ptr()) };
2849 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2850
2851 ::fidl_next::Encode::encode(self.f20, encoder_, f20, (4294967295, ()))?;
2852
2853 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f20.as_mut_ptr()) };
2854 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2855
2856 ::fidl_next::Encode::encode(self.f21, encoder_, f21, (4294967295, ()))?;
2857
2858 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f21.as_mut_ptr()) };
2859 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2860
2861 ::fidl_next::Encode::encode(self.f22, encoder_, f22, ())?;
2862
2863 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f22.as_mut_ptr()) };
2864
2865 ::fidl_next::Encode::encode(self.f23, encoder_, f23, ())?;
2866
2867 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f23.as_mut_ptr()) };
2868
2869 ::fidl_next::Encode::encode(self.f24, encoder_, f24, ())?;
2870
2871 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f24.as_mut_ptr()) };
2872
2873 ::fidl_next::Encode::encode(self.f25, encoder_, f25, ())?;
2874
2875 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f25.as_mut_ptr()) };
2876
2877 ::fidl_next::Encode::encode(self.f26, encoder_, f26, ())?;
2878
2879 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f26.as_mut_ptr()) };
2880
2881 ::fidl_next::Encode::encode(self.f27, encoder_, f27, ())?;
2882
2883 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f27.as_mut_ptr()) };
2884
2885 ::fidl_next::Encode::encode(self.f28, encoder_, f28, ())?;
2886
2887 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f28.as_mut_ptr()) };
2888
2889 ::fidl_next::Encode::encode(self.f29, encoder_, f29, ())?;
2890
2891 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f29.as_mut_ptr()) };
2892
2893 ::fidl_next::Encode::encode(self.f30, encoder_, f30, ())?;
2894
2895 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f30.as_mut_ptr()) };
2896
2897 ::fidl_next::Encode::encode(self.f31, encoder_, f31, ())?;
2898
2899 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(f31.as_mut_ptr()) };
2900
2901 Ok(())
2902 }
2903 }
2904
2905 unsafe impl<___E>
2906 ::fidl_next::EncodeOption<
2907 ::fidl_next::wire::Box<'static, crate::wire::FidlvizDemo<'static>>,
2908 ___E,
2909 > for FidlvizDemo
2910 where
2911 ___E: ::fidl_next::Encoder + ?Sized,
2912 FidlvizDemo: ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>,
2913 {
2914 #[inline]
2915 fn encode_option(
2916 this: ::core::option::Option<Self>,
2917 encoder: &mut ___E,
2918 out: &mut ::core::mem::MaybeUninit<
2919 ::fidl_next::wire::Box<'static, crate::wire::FidlvizDemo<'static>>,
2920 >,
2921 _: (),
2922 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2923 if let Some(inner) = this {
2924 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2925 ::fidl_next::wire::Box::encode_present(out);
2926 } else {
2927 ::fidl_next::wire::Box::encode_absent(out);
2928 }
2929
2930 Ok(())
2931 }
2932 }
2933
2934 impl<'de> ::fidl_next::FromWire<crate::wire::FidlvizDemo<'de>> for FidlvizDemo {
2935 #[inline]
2936 fn from_wire(wire: crate::wire::FidlvizDemo<'de>) -> Self {
2937 Self {
2938 f1: ::fidl_next::FromWire::from_wire(wire.f1),
2939
2940 f2: ::fidl_next::FromWire::from_wire(wire.f2),
2941
2942 f3: ::fidl_next::FromWire::from_wire(wire.f3),
2943
2944 f4: ::fidl_next::FromWire::from_wire(wire.f4),
2945
2946 f5: ::fidl_next::FromWire::from_wire(wire.f5),
2947
2948 f6: ::fidl_next::FromWire::from_wire(wire.f6),
2949
2950 f7: ::fidl_next::FromWire::from_wire(wire.f7),
2951
2952 f8: ::fidl_next::FromWire::from_wire(wire.f8),
2953
2954 f9: ::fidl_next::FromWire::from_wire(wire.f9),
2955
2956 f10: ::fidl_next::FromWire::from_wire(wire.f10),
2957
2958 f11: ::fidl_next::FromWire::from_wire(wire.f11),
2959
2960 f12: ::fidl_next::FromWire::from_wire(wire.f12),
2961
2962 f13: ::fidl_next::FromWire::from_wire(wire.f13),
2963
2964 f14: ::fidl_next::FromWire::from_wire(wire.f14),
2965
2966 f15: ::fidl_next::FromWire::from_wire(wire.f15),
2967
2968 f16: ::fidl_next::FromWire::from_wire(wire.f16),
2969
2970 f17: ::fidl_next::FromWire::from_wire(wire.f17),
2971
2972 f18: ::fidl_next::FromWire::from_wire(wire.f18),
2973
2974 f19: ::fidl_next::FromWire::from_wire(wire.f19),
2975
2976 f20: ::fidl_next::FromWire::from_wire(wire.f20),
2977
2978 f21: ::fidl_next::FromWire::from_wire(wire.f21),
2979
2980 f22: ::fidl_next::FromWire::from_wire(wire.f22),
2981
2982 f23: ::fidl_next::FromWire::from_wire(wire.f23),
2983
2984 f24: ::fidl_next::FromWire::from_wire(wire.f24),
2985
2986 f25: ::fidl_next::FromWire::from_wire(wire.f25),
2987
2988 f26: ::fidl_next::FromWire::from_wire(wire.f26),
2989
2990 f27: ::fidl_next::FromWire::from_wire(wire.f27),
2991
2992 f28: ::fidl_next::FromWire::from_wire(wire.f28),
2993
2994 f29: ::fidl_next::FromWire::from_wire(wire.f29),
2995
2996 f30: ::fidl_next::FromWire::from_wire(wire.f30),
2997
2998 f31: ::fidl_next::FromWire::from_wire(wire.f31),
2999 }
3000 }
3001 }
3002
3003 #[derive(Debug, PartialEq)]
3004 #[repr(C)]
3005 pub struct GoldenHandleBasicRightsStruct {
3006 pub v: ::fidl_next::fuchsia::zx::Event,
3007 }
3008
3009 unsafe impl<___E> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
3010 for GoldenHandleBasicRightsStruct
3011 where
3012 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3013 ___E: ::fidl_next::fuchsia::HandleEncoder,
3014 {
3015 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3016 Self,
3017 crate::wire::GoldenHandleBasicRightsStruct,
3018 > = unsafe {
3019 ::fidl_next::CopyOptimization::enable_if(
3020 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
3021 ::fidl_next::wire::fuchsia::Event,
3022 ___E,
3023 >>::COPY_OPTIMIZATION
3024 .is_enabled(),
3025 )
3026 };
3027
3028 #[inline]
3029 fn encode(
3030 self,
3031 encoder_: &mut ___E,
3032 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
3033 _: (),
3034 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3035 ::fidl_next::munge! {
3036 let crate::wire::GoldenHandleBasicRightsStruct {
3037 v,
3038
3039 } = out_;
3040 }
3041
3042 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
3043
3044 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
3045
3046 Ok(())
3047 }
3048 }
3049
3050 unsafe impl<___E>
3051 ::fidl_next::EncodeOption<
3052 ::fidl_next::wire::Box<'static, crate::wire::GoldenHandleBasicRightsStruct>,
3053 ___E,
3054 > for GoldenHandleBasicRightsStruct
3055 where
3056 ___E: ::fidl_next::Encoder + ?Sized,
3057 GoldenHandleBasicRightsStruct:
3058 ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>,
3059 {
3060 #[inline]
3061 fn encode_option(
3062 this: ::core::option::Option<Self>,
3063 encoder: &mut ___E,
3064 out: &mut ::core::mem::MaybeUninit<
3065 ::fidl_next::wire::Box<'static, crate::wire::GoldenHandleBasicRightsStruct>,
3066 >,
3067 _: (),
3068 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3069 if let Some(inner) = this {
3070 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3071 ::fidl_next::wire::Box::encode_present(out);
3072 } else {
3073 ::fidl_next::wire::Box::encode_absent(out);
3074 }
3075
3076 Ok(())
3077 }
3078 }
3079
3080 impl ::fidl_next::FromWire<crate::wire::GoldenHandleBasicRightsStruct>
3081 for GoldenHandleBasicRightsStruct
3082 {
3083 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3084 crate::wire::GoldenHandleBasicRightsStruct,
3085 Self,
3086 > = unsafe {
3087 ::fidl_next::CopyOptimization::enable_if(
3088 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3089 ::fidl_next::wire::fuchsia::Event,
3090 >>::COPY_OPTIMIZATION
3091 .is_enabled(),
3092 )
3093 };
3094
3095 #[inline]
3096 fn from_wire(wire: crate::wire::GoldenHandleBasicRightsStruct) -> Self {
3097 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
3098 }
3099 }
3100
3101 #[derive(Debug, PartialEq)]
3102 #[repr(C)]
3103 pub struct GoldenNullableHandleStruct {
3104 pub v: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
3105 }
3106
3107 unsafe impl<___E> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
3108 for GoldenNullableHandleStruct
3109 where
3110 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3111 ___E: ::fidl_next::fuchsia::HandleEncoder,
3112 {
3113 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3114 Self,
3115 crate::wire::GoldenNullableHandleStruct,
3116 > = unsafe {
3117 ::fidl_next::CopyOptimization::enable_if(
3118 true
3119
3120 && <
3121 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
3122 >::COPY_OPTIMIZATION.is_enabled()
3123
3124 )
3125 };
3126
3127 #[inline]
3128 fn encode(
3129 self,
3130 encoder_: &mut ___E,
3131 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
3132 _: (),
3133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3134 ::fidl_next::munge! {
3135 let crate::wire::GoldenNullableHandleStruct {
3136 v,
3137
3138 } = out_;
3139 }
3140
3141 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
3142
3143 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
3144
3145 Ok(())
3146 }
3147 }
3148
3149 unsafe impl<___E>
3150 ::fidl_next::EncodeOption<
3151 ::fidl_next::wire::Box<'static, crate::wire::GoldenNullableHandleStruct>,
3152 ___E,
3153 > for GoldenNullableHandleStruct
3154 where
3155 ___E: ::fidl_next::Encoder + ?Sized,
3156 GoldenNullableHandleStruct:
3157 ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>,
3158 {
3159 #[inline]
3160 fn encode_option(
3161 this: ::core::option::Option<Self>,
3162 encoder: &mut ___E,
3163 out: &mut ::core::mem::MaybeUninit<
3164 ::fidl_next::wire::Box<'static, crate::wire::GoldenNullableHandleStruct>,
3165 >,
3166 _: (),
3167 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3168 if let Some(inner) = this {
3169 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3170 ::fidl_next::wire::Box::encode_present(out);
3171 } else {
3172 ::fidl_next::wire::Box::encode_absent(out);
3173 }
3174
3175 Ok(())
3176 }
3177 }
3178
3179 impl ::fidl_next::FromWire<crate::wire::GoldenNullableHandleStruct> for GoldenNullableHandleStruct {
3180 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3181 crate::wire::GoldenNullableHandleStruct,
3182 Self,
3183 > = unsafe {
3184 ::fidl_next::CopyOptimization::enable_if(
3185 true
3186
3187 && <
3188 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
3189 >::COPY_OPTIMIZATION.is_enabled()
3190
3191 )
3192 };
3193
3194 #[inline]
3195 fn from_wire(wire: crate::wire::GoldenNullableHandleStruct) -> Self {
3196 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
3197 }
3198 }
3199
3200 #[derive(Debug, PartialEq)]
3201 pub struct MultipleBoundedNonnullableVectorsOfHandles {
3202 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
3203
3204 pub vh1: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
3205 }
3206
3207 unsafe impl<___E>
3208 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
3209 for MultipleBoundedNonnullableVectorsOfHandles
3210 where
3211 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3212 ___E: ::fidl_next::Encoder,
3213 ___E: ::fidl_next::fuchsia::HandleEncoder,
3214 {
3215 #[inline]
3216 fn encode(
3217 self,
3218 encoder_: &mut ___E,
3219 out_: &mut ::core::mem::MaybeUninit<
3220 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3221 >,
3222 _: (),
3223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3224 ::fidl_next::munge! {
3225 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
3226 vh0,
3227 vh1,
3228
3229 } = out_;
3230 }
3231
3232 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
3233
3234 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
3235 ::fidl_next::Constrained::validate(_field, (2, ()))?;
3236
3237 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
3238
3239 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh1.as_mut_ptr()) };
3240 ::fidl_next::Constrained::validate(_field, (32, ()))?;
3241
3242 Ok(())
3243 }
3244 }
3245
3246 unsafe impl<___E>
3247 ::fidl_next::EncodeOption<
3248 ::fidl_next::wire::Box<
3249 'static,
3250 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3251 >,
3252 ___E,
3253 > for MultipleBoundedNonnullableVectorsOfHandles
3254 where
3255 ___E: ::fidl_next::Encoder + ?Sized,
3256 MultipleBoundedNonnullableVectorsOfHandles: ::fidl_next::Encode<
3257 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3258 ___E,
3259 >,
3260 {
3261 #[inline]
3262 fn encode_option(
3263 this: ::core::option::Option<Self>,
3264 encoder: &mut ___E,
3265 out: &mut ::core::mem::MaybeUninit<
3266 ::fidl_next::wire::Box<
3267 'static,
3268 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
3269 >,
3270 >,
3271 _: (),
3272 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3273 if let Some(inner) = this {
3274 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3275 ::fidl_next::wire::Box::encode_present(out);
3276 } else {
3277 ::fidl_next::wire::Box::encode_absent(out);
3278 }
3279
3280 Ok(())
3281 }
3282 }
3283
3284 impl<'de> ::fidl_next::FromWire<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'de>>
3285 for MultipleBoundedNonnullableVectorsOfHandles
3286 {
3287 #[inline]
3288 fn from_wire(wire: crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'de>) -> Self {
3289 Self {
3290 vh0: ::fidl_next::FromWire::from_wire(wire.vh0),
3291
3292 vh1: ::fidl_next::FromWire::from_wire(wire.vh1),
3293 }
3294 }
3295 }
3296
3297 #[derive(Debug, PartialEq)]
3298 pub struct MultipleBoundedNullableVectorsOfHandles {
3299 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
3300
3301 pub vh1: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
3302 }
3303
3304 unsafe impl<___E>
3305 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
3306 for MultipleBoundedNullableVectorsOfHandles
3307 where
3308 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3309 ___E: ::fidl_next::Encoder,
3310 ___E: ::fidl_next::fuchsia::HandleEncoder,
3311 {
3312 #[inline]
3313 fn encode(
3314 self,
3315 encoder_: &mut ___E,
3316 out_: &mut ::core::mem::MaybeUninit<
3317 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3318 >,
3319 _: (),
3320 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3321 ::fidl_next::munge! {
3322 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
3323 vh0,
3324 vh1,
3325
3326 } = out_;
3327 }
3328
3329 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
3330
3331 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
3332 ::fidl_next::Constrained::validate(_field, (2, ()))?;
3333
3334 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
3335
3336 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh1.as_mut_ptr()) };
3337 ::fidl_next::Constrained::validate(_field, (32, ()))?;
3338
3339 Ok(())
3340 }
3341 }
3342
3343 unsafe impl<___E>
3344 ::fidl_next::EncodeOption<
3345 ::fidl_next::wire::Box<
3346 'static,
3347 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3348 >,
3349 ___E,
3350 > for MultipleBoundedNullableVectorsOfHandles
3351 where
3352 ___E: ::fidl_next::Encoder + ?Sized,
3353 MultipleBoundedNullableVectorsOfHandles: ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>,
3354 {
3355 #[inline]
3356 fn encode_option(
3357 this: ::core::option::Option<Self>,
3358 encoder: &mut ___E,
3359 out: &mut ::core::mem::MaybeUninit<
3360 ::fidl_next::wire::Box<
3361 'static,
3362 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
3363 >,
3364 >,
3365 _: (),
3366 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3367 if let Some(inner) = this {
3368 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3369 ::fidl_next::wire::Box::encode_present(out);
3370 } else {
3371 ::fidl_next::wire::Box::encode_absent(out);
3372 }
3373
3374 Ok(())
3375 }
3376 }
3377
3378 impl<'de> ::fidl_next::FromWire<crate::wire::MultipleBoundedNullableVectorsOfHandles<'de>>
3379 for MultipleBoundedNullableVectorsOfHandles
3380 {
3381 #[inline]
3382 fn from_wire(wire: crate::wire::MultipleBoundedNullableVectorsOfHandles<'de>) -> Self {
3383 Self {
3384 vh0: ::fidl_next::FromWire::from_wire(wire.vh0),
3385
3386 vh1: ::fidl_next::FromWire::from_wire(wire.vh1),
3387 }
3388 }
3389 }
3390
3391 #[derive(Debug, PartialEq)]
3392 #[repr(C)]
3393 pub struct MultipleHandleSubtypes {
3394 pub untyped: ::fidl_next::fuchsia::zx::NullableHandle,
3395
3396 pub event: ::fidl_next::fuchsia::zx::Event,
3397
3398 pub channel: ::fidl_next::fuchsia::zx::Channel,
3399 }
3400
3401 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
3402 for MultipleHandleSubtypes
3403 where
3404 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3405 ___E: ::fidl_next::fuchsia::HandleEncoder,
3406 {
3407 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3408 Self,
3409 crate::wire::MultipleHandleSubtypes,
3410 > = unsafe {
3411 ::fidl_next::CopyOptimization::enable_if(
3412 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
3413 ::fidl_next::wire::fuchsia::NullableHandle,
3414 ___E,
3415 >>::COPY_OPTIMIZATION
3416 .is_enabled()
3417 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
3418 ::fidl_next::wire::fuchsia::Event,
3419 ___E,
3420 >>::COPY_OPTIMIZATION
3421 .is_enabled()
3422 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<
3423 ::fidl_next::wire::fuchsia::Channel,
3424 ___E,
3425 >>::COPY_OPTIMIZATION
3426 .is_enabled(),
3427 )
3428 };
3429
3430 #[inline]
3431 fn encode(
3432 self,
3433 encoder_: &mut ___E,
3434 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
3435 _: (),
3436 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3437 ::fidl_next::munge! {
3438 let crate::wire::MultipleHandleSubtypes {
3439 untyped,
3440 event,
3441 channel,
3442
3443 } = out_;
3444 }
3445
3446 ::fidl_next::Encode::encode(self.untyped, encoder_, untyped, ())?;
3447
3448 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(untyped.as_mut_ptr()) };
3449
3450 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
3451
3452 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
3453
3454 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
3455
3456 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(channel.as_mut_ptr()) };
3457
3458 Ok(())
3459 }
3460 }
3461
3462 unsafe impl<___E>
3463 ::fidl_next::EncodeOption<
3464 ::fidl_next::wire::Box<'static, crate::wire::MultipleHandleSubtypes>,
3465 ___E,
3466 > for MultipleHandleSubtypes
3467 where
3468 ___E: ::fidl_next::Encoder + ?Sized,
3469 MultipleHandleSubtypes: ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>,
3470 {
3471 #[inline]
3472 fn encode_option(
3473 this: ::core::option::Option<Self>,
3474 encoder: &mut ___E,
3475 out: &mut ::core::mem::MaybeUninit<
3476 ::fidl_next::wire::Box<'static, crate::wire::MultipleHandleSubtypes>,
3477 >,
3478 _: (),
3479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3480 if let Some(inner) = this {
3481 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3482 ::fidl_next::wire::Box::encode_present(out);
3483 } else {
3484 ::fidl_next::wire::Box::encode_absent(out);
3485 }
3486
3487 Ok(())
3488 }
3489 }
3490
3491 impl ::fidl_next::FromWire<crate::wire::MultipleHandleSubtypes> for MultipleHandleSubtypes {
3492 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3493 crate::wire::MultipleHandleSubtypes,
3494 Self,
3495 > = unsafe {
3496 ::fidl_next::CopyOptimization::enable_if(
3497 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3498 ::fidl_next::wire::fuchsia::NullableHandle,
3499 >>::COPY_OPTIMIZATION
3500 .is_enabled()
3501 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3502 ::fidl_next::wire::fuchsia::Event,
3503 >>::COPY_OPTIMIZATION
3504 .is_enabled()
3505 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
3506 ::fidl_next::wire::fuchsia::Channel,
3507 >>::COPY_OPTIMIZATION
3508 .is_enabled(),
3509 )
3510 };
3511
3512 #[inline]
3513 fn from_wire(wire: crate::wire::MultipleHandleSubtypes) -> Self {
3514 Self {
3515 untyped: ::fidl_next::FromWire::from_wire(wire.untyped),
3516
3517 event: ::fidl_next::FromWire::from_wire(wire.event),
3518
3519 channel: ::fidl_next::FromWire::from_wire(wire.channel),
3520 }
3521 }
3522 }
3523
3524 #[derive(Debug, PartialEq)]
3525 #[repr(C)]
3526 pub struct MultipleNonnullableHandles {
3527 pub data0: u32,
3528
3529 pub handle0: ::fidl_next::fuchsia::zx::NullableHandle,
3530
3531 pub data1: u64,
3532
3533 pub handle1: ::fidl_next::fuchsia::zx::Channel,
3534
3535 pub handle2: ::fidl_next::fuchsia::zx::Event,
3536
3537 pub data2: u64,
3538 }
3539
3540 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
3541 for MultipleNonnullableHandles
3542 where
3543 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3544 ___E: ::fidl_next::fuchsia::HandleEncoder,
3545 {
3546 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3547 Self,
3548 crate::wire::MultipleNonnullableHandles,
3549 > = unsafe {
3550 ::fidl_next::CopyOptimization::enable_if(
3551 true
3552
3553 && <
3554 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3555 >::COPY_OPTIMIZATION.is_enabled()
3556
3557 && <
3558 ::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>
3559 >::COPY_OPTIMIZATION.is_enabled()
3560
3561 && <
3562 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3563 >::COPY_OPTIMIZATION.is_enabled()
3564
3565 && <
3566 ::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>
3567 >::COPY_OPTIMIZATION.is_enabled()
3568
3569 && <
3570 ::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>
3571 >::COPY_OPTIMIZATION.is_enabled()
3572
3573 && <
3574 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3575 >::COPY_OPTIMIZATION.is_enabled()
3576
3577 )
3578 };
3579
3580 #[inline]
3581 fn encode(
3582 self,
3583 encoder_: &mut ___E,
3584 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
3585 _: (),
3586 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3587 ::fidl_next::munge! {
3588 let crate::wire::MultipleNonnullableHandles {
3589 data0,
3590 handle0,
3591 data1,
3592 handle1,
3593 handle2,
3594 data2,
3595
3596 } = out_;
3597 }
3598
3599 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
3600
3601 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data0.as_mut_ptr()) };
3602
3603 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
3604
3605 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle0.as_mut_ptr()) };
3606
3607 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
3608
3609 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data1.as_mut_ptr()) };
3610
3611 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
3612
3613 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle1.as_mut_ptr()) };
3614
3615 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
3616
3617 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle2.as_mut_ptr()) };
3618
3619 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
3620
3621 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data2.as_mut_ptr()) };
3622
3623 Ok(())
3624 }
3625 }
3626
3627 unsafe impl<___E>
3628 ::fidl_next::EncodeOption<
3629 ::fidl_next::wire::Box<'static, crate::wire::MultipleNonnullableHandles>,
3630 ___E,
3631 > for MultipleNonnullableHandles
3632 where
3633 ___E: ::fidl_next::Encoder + ?Sized,
3634 MultipleNonnullableHandles:
3635 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>,
3636 {
3637 #[inline]
3638 fn encode_option(
3639 this: ::core::option::Option<Self>,
3640 encoder: &mut ___E,
3641 out: &mut ::core::mem::MaybeUninit<
3642 ::fidl_next::wire::Box<'static, crate::wire::MultipleNonnullableHandles>,
3643 >,
3644 _: (),
3645 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3646 if let Some(inner) = this {
3647 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3648 ::fidl_next::wire::Box::encode_present(out);
3649 } else {
3650 ::fidl_next::wire::Box::encode_absent(out);
3651 }
3652
3653 Ok(())
3654 }
3655 }
3656
3657 impl ::fidl_next::FromWire<crate::wire::MultipleNonnullableHandles> for MultipleNonnullableHandles {
3658 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3659 crate::wire::MultipleNonnullableHandles,
3660 Self,
3661 > = unsafe {
3662 ::fidl_next::CopyOptimization::enable_if(
3663 true
3664 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
3665 .is_enabled()
3666 && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3667 ::fidl_next::wire::fuchsia::NullableHandle,
3668 >>::COPY_OPTIMIZATION
3669 .is_enabled()
3670 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
3671 .is_enabled()
3672 && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
3673 ::fidl_next::wire::fuchsia::Channel,
3674 >>::COPY_OPTIMIZATION
3675 .is_enabled()
3676 && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3677 ::fidl_next::wire::fuchsia::Event,
3678 >>::COPY_OPTIMIZATION
3679 .is_enabled()
3680 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
3681 .is_enabled(),
3682 )
3683 };
3684
3685 #[inline]
3686 fn from_wire(wire: crate::wire::MultipleNonnullableHandles) -> Self {
3687 Self {
3688 data0: ::fidl_next::FromWire::from_wire(wire.data0),
3689
3690 handle0: ::fidl_next::FromWire::from_wire(wire.handle0),
3691
3692 data1: ::fidl_next::FromWire::from_wire(wire.data1),
3693
3694 handle1: ::fidl_next::FromWire::from_wire(wire.handle1),
3695
3696 handle2: ::fidl_next::FromWire::from_wire(wire.handle2),
3697
3698 data2: ::fidl_next::FromWire::from_wire(wire.data2),
3699 }
3700 }
3701 }
3702
3703 #[derive(Debug, PartialEq)]
3704 #[repr(C)]
3705 pub struct MultipleNullableHandles {
3706 pub data0: u32,
3707
3708 pub handle0: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
3709
3710 pub data1: u64,
3711
3712 pub handle1: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
3713
3714 pub handle2: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
3715
3716 pub data2: u64,
3717 }
3718
3719 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
3720 for MultipleNullableHandles
3721 where
3722 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3723 ___E: ::fidl_next::fuchsia::HandleEncoder,
3724 {
3725 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3726 Self,
3727 crate::wire::MultipleNullableHandles,
3728 > = unsafe {
3729 ::fidl_next::CopyOptimization::enable_if(
3730 true
3731
3732 && <
3733 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3734 >::COPY_OPTIMIZATION.is_enabled()
3735
3736 && <
3737 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
3738 >::COPY_OPTIMIZATION.is_enabled()
3739
3740 && <
3741 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3742 >::COPY_OPTIMIZATION.is_enabled()
3743
3744 && <
3745 ::core::option::Option<::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>
3746 >::COPY_OPTIMIZATION.is_enabled()
3747
3748 && <
3749 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>
3750 >::COPY_OPTIMIZATION.is_enabled()
3751
3752 && <
3753 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
3754 >::COPY_OPTIMIZATION.is_enabled()
3755
3756 )
3757 };
3758
3759 #[inline]
3760 fn encode(
3761 self,
3762 encoder_: &mut ___E,
3763 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
3764 _: (),
3765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3766 ::fidl_next::munge! {
3767 let crate::wire::MultipleNullableHandles {
3768 data0,
3769 handle0,
3770 data1,
3771 handle1,
3772 handle2,
3773 data2,
3774
3775 } = out_;
3776 }
3777
3778 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
3779
3780 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data0.as_mut_ptr()) };
3781
3782 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
3783
3784 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle0.as_mut_ptr()) };
3785
3786 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
3787
3788 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data1.as_mut_ptr()) };
3789
3790 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
3791
3792 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle1.as_mut_ptr()) };
3793
3794 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
3795
3796 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handle2.as_mut_ptr()) };
3797
3798 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
3799
3800 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data2.as_mut_ptr()) };
3801
3802 Ok(())
3803 }
3804 }
3805
3806 unsafe impl<___E>
3807 ::fidl_next::EncodeOption<
3808 ::fidl_next::wire::Box<'static, crate::wire::MultipleNullableHandles>,
3809 ___E,
3810 > for MultipleNullableHandles
3811 where
3812 ___E: ::fidl_next::Encoder + ?Sized,
3813 MultipleNullableHandles: ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>,
3814 {
3815 #[inline]
3816 fn encode_option(
3817 this: ::core::option::Option<Self>,
3818 encoder: &mut ___E,
3819 out: &mut ::core::mem::MaybeUninit<
3820 ::fidl_next::wire::Box<'static, crate::wire::MultipleNullableHandles>,
3821 >,
3822 _: (),
3823 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3824 if let Some(inner) = this {
3825 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3826 ::fidl_next::wire::Box::encode_present(out);
3827 } else {
3828 ::fidl_next::wire::Box::encode_absent(out);
3829 }
3830
3831 Ok(())
3832 }
3833 }
3834
3835 impl ::fidl_next::FromWire<crate::wire::MultipleNullableHandles> for MultipleNullableHandles {
3836 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3837 crate::wire::MultipleNullableHandles,
3838 Self,
3839 > = unsafe {
3840 ::fidl_next::CopyOptimization::enable_if(
3841 true
3842
3843 && <
3844 u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>
3845 >::COPY_OPTIMIZATION.is_enabled()
3846
3847 && <
3848 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
3849 >::COPY_OPTIMIZATION.is_enabled()
3850
3851 && <
3852 u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>
3853 >::COPY_OPTIMIZATION.is_enabled()
3854
3855 && <
3856 ::core::option::Option<::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalChannel>
3857 >::COPY_OPTIMIZATION.is_enabled()
3858
3859 && <
3860 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalEvent>
3861 >::COPY_OPTIMIZATION.is_enabled()
3862
3863 && <
3864 u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>
3865 >::COPY_OPTIMIZATION.is_enabled()
3866
3867 )
3868 };
3869
3870 #[inline]
3871 fn from_wire(wire: crate::wire::MultipleNullableHandles) -> Self {
3872 Self {
3873 data0: ::fidl_next::FromWire::from_wire(wire.data0),
3874
3875 handle0: ::fidl_next::FromWire::from_wire(wire.handle0),
3876
3877 data1: ::fidl_next::FromWire::from_wire(wire.data1),
3878
3879 handle1: ::fidl_next::FromWire::from_wire(wire.handle1),
3880
3881 handle2: ::fidl_next::FromWire::from_wire(wire.handle2),
3882
3883 data2: ::fidl_next::FromWire::from_wire(wire.data2),
3884 }
3885 }
3886 }
3887
3888 #[derive(Debug, PartialEq)]
3889 #[repr(C)]
3890 pub struct NonnullableHandle {
3891 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
3892 }
3893
3894 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E> for NonnullableHandle
3895 where
3896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3897 ___E: ::fidl_next::fuchsia::HandleEncoder,
3898 {
3899 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3900 Self,
3901 crate::wire::NonnullableHandle,
3902 > = unsafe {
3903 ::fidl_next::CopyOptimization::enable_if(
3904 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
3905 ::fidl_next::wire::fuchsia::NullableHandle,
3906 ___E,
3907 >>::COPY_OPTIMIZATION
3908 .is_enabled(),
3909 )
3910 };
3911
3912 #[inline]
3913 fn encode(
3914 self,
3915 encoder_: &mut ___E,
3916 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
3917 _: (),
3918 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3919 ::fidl_next::munge! {
3920 let crate::wire::NonnullableHandle {
3921 h,
3922
3923 } = out_;
3924 }
3925
3926 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
3927
3928 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
3929
3930 Ok(())
3931 }
3932 }
3933
3934 unsafe impl<___E>
3935 ::fidl_next::EncodeOption<
3936 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandle>,
3937 ___E,
3938 > for NonnullableHandle
3939 where
3940 ___E: ::fidl_next::Encoder + ?Sized,
3941 NonnullableHandle: ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>,
3942 {
3943 #[inline]
3944 fn encode_option(
3945 this: ::core::option::Option<Self>,
3946 encoder: &mut ___E,
3947 out: &mut ::core::mem::MaybeUninit<
3948 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandle>,
3949 >,
3950 _: (),
3951 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3952 if let Some(inner) = this {
3953 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3954 ::fidl_next::wire::Box::encode_present(out);
3955 } else {
3956 ::fidl_next::wire::Box::encode_absent(out);
3957 }
3958
3959 Ok(())
3960 }
3961 }
3962
3963 impl ::fidl_next::FromWire<crate::wire::NonnullableHandle> for NonnullableHandle {
3964 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3965 crate::wire::NonnullableHandle,
3966 Self,
3967 > = unsafe {
3968 ::fidl_next::CopyOptimization::enable_if(
3969 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
3970 ::fidl_next::wire::fuchsia::NullableHandle,
3971 >>::COPY_OPTIMIZATION
3972 .is_enabled(),
3973 )
3974 };
3975
3976 #[inline]
3977 fn from_wire(wire: crate::wire::NonnullableHandle) -> Self {
3978 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
3979 }
3980 }
3981
3982 #[derive(Debug, PartialEq)]
3983 #[repr(C)]
3984 pub struct NonnullableHandleArray {
3985 pub handles: [::fidl_next::fuchsia::zx::NullableHandle; 4],
3986 }
3987
3988 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
3989 for NonnullableHandleArray
3990 where
3991 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3992 ___E: ::fidl_next::fuchsia::HandleEncoder,
3993 {
3994 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3995 Self,
3996 crate::wire::NonnullableHandleArray,
3997 > = unsafe {
3998 ::fidl_next::CopyOptimization::enable_if(
3999 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::Encode<
4000 [::fidl_next::wire::fuchsia::NullableHandle; 4],
4001 ___E,
4002 >>::COPY_OPTIMIZATION
4003 .is_enabled(),
4004 )
4005 };
4006
4007 #[inline]
4008 fn encode(
4009 self,
4010 encoder_: &mut ___E,
4011 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
4012 _: (),
4013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4014 ::fidl_next::munge! {
4015 let crate::wire::NonnullableHandleArray {
4016 handles,
4017
4018 } = out_;
4019 }
4020
4021 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
4022
4023 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
4024
4025 Ok(())
4026 }
4027 }
4028
4029 unsafe impl<___E>
4030 ::fidl_next::EncodeOption<
4031 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
4032 ___E,
4033 > for NonnullableHandleArray
4034 where
4035 ___E: ::fidl_next::Encoder + ?Sized,
4036 NonnullableHandleArray: ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>,
4037 {
4038 #[inline]
4039 fn encode_option(
4040 this: ::core::option::Option<Self>,
4041 encoder: &mut ___E,
4042 out: &mut ::core::mem::MaybeUninit<
4043 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
4044 >,
4045 _: (),
4046 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4047 if let Some(inner) = this {
4048 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4049 ::fidl_next::wire::Box::encode_present(out);
4050 } else {
4051 ::fidl_next::wire::Box::encode_absent(out);
4052 }
4053
4054 Ok(())
4055 }
4056 }
4057
4058 impl ::fidl_next::FromWire<crate::wire::NonnullableHandleArray> for NonnullableHandleArray {
4059 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4060 crate::wire::NonnullableHandleArray,
4061 Self,
4062 > = unsafe {
4063 ::fidl_next::CopyOptimization::enable_if(
4064 true && <[::fidl_next::fuchsia::zx::NullableHandle; 4] as ::fidl_next::FromWire<
4065 [::fidl_next::wire::fuchsia::NullableHandle; 4],
4066 >>::COPY_OPTIMIZATION
4067 .is_enabled(),
4068 )
4069 };
4070
4071 #[inline]
4072 fn from_wire(wire: crate::wire::NonnullableHandleArray) -> Self {
4073 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
4074 }
4075 }
4076
4077 #[derive(Debug, PartialEq)]
4078 #[repr(C)]
4079 pub struct NullableHandle {
4080 pub h: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
4081 }
4082
4083 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NullableHandle, ___E> for NullableHandle
4084 where
4085 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4086 ___E: ::fidl_next::fuchsia::HandleEncoder,
4087 {
4088 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::NullableHandle> = unsafe {
4089 ::fidl_next::CopyOptimization::enable_if(
4090 true
4091
4092 && <
4093 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
4094 >::COPY_OPTIMIZATION.is_enabled()
4095
4096 )
4097 };
4098
4099 #[inline]
4100 fn encode(
4101 self,
4102 encoder_: &mut ___E,
4103 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
4104 _: (),
4105 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4106 ::fidl_next::munge! {
4107 let crate::wire::NullableHandle {
4108 h,
4109
4110 } = out_;
4111 }
4112
4113 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
4114
4115 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
4116
4117 Ok(())
4118 }
4119 }
4120
4121 unsafe impl<___E>
4122 ::fidl_next::EncodeOption<
4123 ::fidl_next::wire::Box<'static, crate::wire::NullableHandle>,
4124 ___E,
4125 > for NullableHandle
4126 where
4127 ___E: ::fidl_next::Encoder + ?Sized,
4128 NullableHandle: ::fidl_next::Encode<crate::wire::NullableHandle, ___E>,
4129 {
4130 #[inline]
4131 fn encode_option(
4132 this: ::core::option::Option<Self>,
4133 encoder: &mut ___E,
4134 out: &mut ::core::mem::MaybeUninit<
4135 ::fidl_next::wire::Box<'static, crate::wire::NullableHandle>,
4136 >,
4137 _: (),
4138 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4139 if let Some(inner) = this {
4140 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4141 ::fidl_next::wire::Box::encode_present(out);
4142 } else {
4143 ::fidl_next::wire::Box::encode_absent(out);
4144 }
4145
4146 Ok(())
4147 }
4148 }
4149
4150 impl ::fidl_next::FromWire<crate::wire::NullableHandle> for NullableHandle {
4151 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::NullableHandle, Self> = unsafe {
4152 ::fidl_next::CopyOptimization::enable_if(
4153 true
4154
4155 && <
4156 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
4157 >::COPY_OPTIMIZATION.is_enabled()
4158
4159 )
4160 };
4161
4162 #[inline]
4163 fn from_wire(wire: crate::wire::NullableHandle) -> Self {
4164 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
4165 }
4166 }
4167
4168 #[derive(Debug, PartialEq)]
4169 pub struct OutOfLineArrayOfNonnullableHandles {
4170 pub handles:
4171 ::core::option::Option<::std::boxed::Box<crate::natural::NonnullableHandleArray>>,
4172 }
4173
4174 unsafe impl<___E>
4175 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
4176 for OutOfLineArrayOfNonnullableHandles
4177 where
4178 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4179 ___E: ::fidl_next::Encoder,
4180 ___E: ::fidl_next::fuchsia::HandleEncoder,
4181 {
4182 #[inline]
4183 fn encode(
4184 self,
4185 encoder_: &mut ___E,
4186 out_: &mut ::core::mem::MaybeUninit<
4187 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4188 >,
4189 _: (),
4190 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4191 ::fidl_next::munge! {
4192 let crate::wire::OutOfLineArrayOfNonnullableHandles {
4193 handles,
4194
4195 } = out_;
4196 }
4197
4198 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
4199
4200 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handles.as_mut_ptr()) };
4201
4202 Ok(())
4203 }
4204 }
4205
4206 unsafe impl<___E>
4207 ::fidl_next::EncodeOption<
4208 ::fidl_next::wire::Box<
4209 'static,
4210 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4211 >,
4212 ___E,
4213 > for OutOfLineArrayOfNonnullableHandles
4214 where
4215 ___E: ::fidl_next::Encoder + ?Sized,
4216 OutOfLineArrayOfNonnullableHandles:
4217 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>,
4218 {
4219 #[inline]
4220 fn encode_option(
4221 this: ::core::option::Option<Self>,
4222 encoder: &mut ___E,
4223 out: &mut ::core::mem::MaybeUninit<
4224 ::fidl_next::wire::Box<
4225 'static,
4226 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
4227 >,
4228 >,
4229 _: (),
4230 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4231 if let Some(inner) = this {
4232 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4233 ::fidl_next::wire::Box::encode_present(out);
4234 } else {
4235 ::fidl_next::wire::Box::encode_absent(out);
4236 }
4237
4238 Ok(())
4239 }
4240 }
4241
4242 impl<'de> ::fidl_next::FromWire<crate::wire::OutOfLineArrayOfNonnullableHandles<'de>>
4243 for OutOfLineArrayOfNonnullableHandles
4244 {
4245 #[inline]
4246 fn from_wire(wire: crate::wire::OutOfLineArrayOfNonnullableHandles<'de>) -> Self {
4247 Self { handles: ::fidl_next::FromWire::from_wire(wire.handles) }
4248 }
4249 }
4250
4251 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4252 pub enum SampleResourceXUnion {
4253 U(u32),
4254
4255 Su(crate::natural::SimpleUnion),
4256
4257 St(crate::natural::SimpleTable),
4258
4259 UnknownOrdinal_(u64),
4260 }
4261
4262 impl SampleResourceXUnion {
4263 pub fn is_unknown(&self) -> bool {
4264 #[allow(unreachable_patterns)]
4265 match self {
4266 Self::UnknownOrdinal_(_) => true,
4267 _ => false,
4268 }
4269 }
4270 }
4271
4272 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>
4273 for SampleResourceXUnion
4274 where
4275 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4276 ___E: ::fidl_next::Encoder,
4277 ___E: ::fidl_next::fuchsia::HandleEncoder,
4278 {
4279 #[inline]
4280 fn encode(
4281 self,
4282 encoder: &mut ___E,
4283 out: &mut ::core::mem::MaybeUninit<crate::wire::SampleResourceXUnion<'static>>,
4284 _: (),
4285 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4286 ::fidl_next::munge!(let crate::wire::SampleResourceXUnion { raw, _phantom: _ } = out);
4287
4288 match self {
4289 Self::U(value) => ::fidl_next::wire::Union::encode_as::<
4290 ___E,
4291 ::fidl_next::wire::Uint32,
4292 >(value, 1, encoder, raw, ())?,
4293
4294 Self::Su(value) => ::fidl_next::wire::Union::encode_as::<
4295 ___E,
4296 crate::wire::SimpleUnion<'static>,
4297 >(value, 2, encoder, raw, ())?,
4298
4299 Self::St(value) => ::fidl_next::wire::Union::encode_as::<
4300 ___E,
4301 crate::wire::SimpleTable<'static>,
4302 >(value, 3, encoder, raw, ())?,
4303
4304 Self::UnknownOrdinal_(ordinal) => {
4305 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
4306 }
4307 }
4308
4309 Ok(())
4310 }
4311 }
4312
4313 unsafe impl<___E>
4314 ::fidl_next::EncodeOption<crate::wire_optional::SampleResourceXUnion<'static>, ___E>
4315 for SampleResourceXUnion
4316 where
4317 ___E: ?Sized,
4318 SampleResourceXUnion: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
4319 {
4320 #[inline]
4321 fn encode_option(
4322 this: ::core::option::Option<Self>,
4323 encoder: &mut ___E,
4324 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SampleResourceXUnion<'static>>,
4325 _: (),
4326 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4327 ::fidl_next::munge!(let crate::wire_optional::SampleResourceXUnion { raw, _phantom: _ } = &mut *out);
4328
4329 if let Some(inner) = this {
4330 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4331 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4332 } else {
4333 ::fidl_next::wire::Union::encode_absent(raw);
4334 }
4335
4336 Ok(())
4337 }
4338 }
4339
4340 impl<'de> ::fidl_next::FromWire<crate::wire::SampleResourceXUnion<'de>> for SampleResourceXUnion {
4341 #[inline]
4342 fn from_wire(wire: crate::wire::SampleResourceXUnion<'de>) -> Self {
4343 let wire = ::core::mem::ManuallyDrop::new(wire);
4344 match wire.raw.ordinal() {
4345 1 => Self::U(::fidl_next::FromWire::from_wire(unsafe {
4346 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
4347 })),
4348
4349 2 => Self::Su(::fidl_next::FromWire::from_wire(unsafe {
4350 wire.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
4351 })),
4352
4353 3 => Self::St(::fidl_next::FromWire::from_wire(unsafe {
4354 wire.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
4355 })),
4356
4357 ord => return Self::UnknownOrdinal_(ord as u64),
4358 }
4359 }
4360 }
4361
4362 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleResourceXUnion<'de>>
4363 for SampleResourceXUnion
4364 {
4365 #[inline]
4366 fn from_wire_option(
4367 wire: crate::wire_optional::SampleResourceXUnion<'de>,
4368 ) -> ::core::option::Option<Self> {
4369 if let Some(inner) = wire.into_option() {
4370 Some(::fidl_next::FromWire::from_wire(inner))
4371 } else {
4372 None
4373 }
4374 }
4375 }
4376
4377 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleResourceXUnion<'de>>
4378 for Box<SampleResourceXUnion>
4379 {
4380 #[inline]
4381 fn from_wire_option(
4382 wire: crate::wire_optional::SampleResourceXUnion<'de>,
4383 ) -> ::core::option::Option<Self> {
4384 <SampleResourceXUnion as ::fidl_next::FromWireOption<
4385 crate::wire_optional::SampleResourceXUnion<'de>,
4386 >>::from_wire_option(wire)
4387 .map(Box::new)
4388 }
4389 }
4390
4391 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4392 pub enum SampleStrictResourceXUnion {
4393 U(u32),
4394
4395 Su(crate::natural::SimpleUnion),
4396
4397 St(crate::natural::SimpleTable),
4398 }
4399
4400 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>
4401 for SampleStrictResourceXUnion
4402 where
4403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4404 ___E: ::fidl_next::Encoder,
4405 ___E: ::fidl_next::fuchsia::HandleEncoder,
4406 {
4407 #[inline]
4408 fn encode(
4409 self,
4410 encoder: &mut ___E,
4411 out: &mut ::core::mem::MaybeUninit<crate::wire::SampleStrictResourceXUnion<'static>>,
4412 _: (),
4413 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4414 ::fidl_next::munge!(let crate::wire::SampleStrictResourceXUnion { raw, _phantom: _ } = out);
4415
4416 match self {
4417 Self::U(value) => ::fidl_next::wire::Union::encode_as::<
4418 ___E,
4419 ::fidl_next::wire::Uint32,
4420 >(value, 1, encoder, raw, ())?,
4421
4422 Self::Su(value) => ::fidl_next::wire::Union::encode_as::<
4423 ___E,
4424 crate::wire::SimpleUnion<'static>,
4425 >(value, 2, encoder, raw, ())?,
4426
4427 Self::St(value) => ::fidl_next::wire::Union::encode_as::<
4428 ___E,
4429 crate::wire::SimpleTable<'static>,
4430 >(value, 3, encoder, raw, ())?,
4431 }
4432
4433 Ok(())
4434 }
4435 }
4436
4437 unsafe impl<___E>
4438 ::fidl_next::EncodeOption<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>
4439 for SampleStrictResourceXUnion
4440 where
4441 ___E: ?Sized,
4442 SampleStrictResourceXUnion:
4443 ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
4444 {
4445 #[inline]
4446 fn encode_option(
4447 this: ::core::option::Option<Self>,
4448 encoder: &mut ___E,
4449 out: &mut ::core::mem::MaybeUninit<
4450 crate::wire_optional::SampleStrictResourceXUnion<'static>,
4451 >,
4452 _: (),
4453 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4454 ::fidl_next::munge!(let crate::wire_optional::SampleStrictResourceXUnion { raw, _phantom: _ } = &mut *out);
4455
4456 if let Some(inner) = this {
4457 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4458 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4459 } else {
4460 ::fidl_next::wire::Union::encode_absent(raw);
4461 }
4462
4463 Ok(())
4464 }
4465 }
4466
4467 impl<'de> ::fidl_next::FromWire<crate::wire::SampleStrictResourceXUnion<'de>>
4468 for SampleStrictResourceXUnion
4469 {
4470 #[inline]
4471 fn from_wire(wire: crate::wire::SampleStrictResourceXUnion<'de>) -> Self {
4472 let wire = ::core::mem::ManuallyDrop::new(wire);
4473 match wire.raw.ordinal() {
4474 1 => Self::U(::fidl_next::FromWire::from_wire(unsafe {
4475 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
4476 })),
4477
4478 2 => Self::Su(::fidl_next::FromWire::from_wire(unsafe {
4479 wire.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
4480 })),
4481
4482 3 => Self::St(::fidl_next::FromWire::from_wire(unsafe {
4483 wire.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
4484 })),
4485
4486 _ => unsafe { ::core::hint::unreachable_unchecked() },
4487 }
4488 }
4489 }
4490
4491 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleStrictResourceXUnion<'de>>
4492 for SampleStrictResourceXUnion
4493 {
4494 #[inline]
4495 fn from_wire_option(
4496 wire: crate::wire_optional::SampleStrictResourceXUnion<'de>,
4497 ) -> ::core::option::Option<Self> {
4498 if let Some(inner) = wire.into_option() {
4499 Some(::fidl_next::FromWire::from_wire(inner))
4500 } else {
4501 None
4502 }
4503 }
4504 }
4505
4506 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SampleStrictResourceXUnion<'de>>
4507 for Box<SampleStrictResourceXUnion>
4508 {
4509 #[inline]
4510 fn from_wire_option(
4511 wire: crate::wire_optional::SampleStrictResourceXUnion<'de>,
4512 ) -> ::core::option::Option<Self> {
4513 <SampleStrictResourceXUnion as ::fidl_next::FromWireOption<
4514 crate::wire_optional::SampleStrictResourceXUnion<'de>,
4515 >>::from_wire_option(wire)
4516 .map(Box::new)
4517 }
4518 }
4519
4520 #[derive(Debug, PartialEq)]
4521 pub enum UnionWithVector {
4522 Unused(u8),
4523
4524 VectorOfUint8(::std::vec::Vec<u8>),
4525
4526 S(::std::string::String),
4527
4528 VectorS3A1(::std::vec::Vec<crate::natural::StructSize3Align1>),
4529
4530 VectorS3A2(::std::vec::Vec<crate::natural::StructSize3Align2>),
4531
4532 Handles(::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>),
4533
4534 ArrayS3A1([crate::natural::StructSize3Align1; 2]),
4535
4536 ArrayS3A2([crate::natural::StructSize3Align2; 2]),
4537
4538 VectorUnion(::std::vec::Vec<crate::natural::UnionSize8Align4>),
4539 }
4540
4541 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>
4542 for UnionWithVector
4543 where
4544 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4545 ___E: ::fidl_next::Encoder,
4546 ___E: ::fidl_next::fuchsia::HandleEncoder,
4547 {
4548 #[inline]
4549 fn encode(
4550 self,
4551 encoder: &mut ___E,
4552 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionWithVector<'static>>,
4553 _: (),
4554 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4555 ::fidl_next::munge!(let crate::wire::UnionWithVector { raw, _phantom: _ } = out);
4556
4557 match self {
4558 Self::Unused(value) => {
4559 ::fidl_next::wire::Union::encode_as::<___E, u8>(value, 1, encoder, raw, ())?
4560 }
4561
4562 Self::VectorOfUint8(value) => {
4563 ::fidl_next::wire::Union::encode_as::<
4564 ___E,
4565 ::fidl_next::wire::Vector<'static, u8>,
4566 >(value, 2, encoder, raw, (4294967295, ()))?
4567 }
4568
4569 Self::S(value) => ::fidl_next::wire::Union::encode_as::<
4570 ___E,
4571 ::fidl_next::wire::String<'static>,
4572 >(value, 3, encoder, raw, 4294967295)?,
4573
4574 Self::VectorS3A1(value) => {
4575 ::fidl_next::wire::Union::encode_as::<
4576 ___E,
4577 ::fidl_next::wire::Vector<'static, crate::wire::StructSize3Align1>,
4578 >(value, 4, encoder, raw, (4294967295, ()))?
4579 }
4580
4581 Self::VectorS3A2(value) => {
4582 ::fidl_next::wire::Union::encode_as::<
4583 ___E,
4584 ::fidl_next::wire::Vector<'static, crate::wire::StructSize3Align2>,
4585 >(value, 5, encoder, raw, (4294967295, ()))?
4586 }
4587
4588 Self::Handles(value) => ::fidl_next::wire::Union::encode_as::<
4589 ___E,
4590 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
4591 >(value, 6, encoder, raw, (4294967295, ()))?,
4592
4593 Self::ArrayS3A1(value) => ::fidl_next::wire::Union::encode_as::<
4594 ___E,
4595 [crate::wire::StructSize3Align1; 2],
4596 >(value, 7, encoder, raw, ())?,
4597
4598 Self::ArrayS3A2(value) => ::fidl_next::wire::Union::encode_as::<
4599 ___E,
4600 [crate::wire::StructSize3Align2; 2],
4601 >(value, 8, encoder, raw, ())?,
4602
4603 Self::VectorUnion(value) => {
4604 ::fidl_next::wire::Union::encode_as::<
4605 ___E,
4606 ::fidl_next::wire::Vector<'static, crate::wire::UnionSize8Align4>,
4607 >(value, 9, encoder, raw, (4294967295, ()))?
4608 }
4609 }
4610
4611 Ok(())
4612 }
4613 }
4614
4615 unsafe impl<___E>
4616 ::fidl_next::EncodeOption<crate::wire_optional::UnionWithVector<'static>, ___E>
4617 for UnionWithVector
4618 where
4619 ___E: ?Sized,
4620 UnionWithVector: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
4621 {
4622 #[inline]
4623 fn encode_option(
4624 this: ::core::option::Option<Self>,
4625 encoder: &mut ___E,
4626 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::UnionWithVector<'static>>,
4627 _: (),
4628 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4629 ::fidl_next::munge!(let crate::wire_optional::UnionWithVector { raw, _phantom: _ } = &mut *out);
4630
4631 if let Some(inner) = this {
4632 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4633 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4634 } else {
4635 ::fidl_next::wire::Union::encode_absent(raw);
4636 }
4637
4638 Ok(())
4639 }
4640 }
4641
4642 impl<'de> ::fidl_next::FromWire<crate::wire::UnionWithVector<'de>> for UnionWithVector {
4643 #[inline]
4644 fn from_wire(wire: crate::wire::UnionWithVector<'de>) -> Self {
4645 let wire = ::core::mem::ManuallyDrop::new(wire);
4646 match wire.raw.ordinal() {
4647 1 => Self::Unused(::fidl_next::FromWire::from_wire(unsafe {
4648 wire.raw.get().read_unchecked::<u8>()
4649 })),
4650
4651 2 => Self::VectorOfUint8(::fidl_next::FromWire::from_wire(unsafe {
4652 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4653 })),
4654
4655 3 => Self::S(::fidl_next::FromWire::from_wire(unsafe {
4656 wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
4657 })),
4658
4659 4 => Self::VectorS3A1(::fidl_next::FromWire::from_wire(unsafe {
4660 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
4661 })),
4662
4663 5 => Self::VectorS3A2(::fidl_next::FromWire::from_wire(unsafe {
4664 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
4665 })),
4666
4667 6 => Self::Handles(::fidl_next::FromWire::from_wire(unsafe {
4668 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>>()
4669 })),
4670
4671 7 => Self::ArrayS3A1(::fidl_next::FromWire::from_wire(unsafe {
4672 wire.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
4673 })),
4674
4675 8 => Self::ArrayS3A2(::fidl_next::FromWire::from_wire(unsafe {
4676 wire.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
4677 })),
4678
4679 9 => Self::VectorUnion(::fidl_next::FromWire::from_wire(unsafe {
4680 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
4681 })),
4682
4683 _ => unsafe { ::core::hint::unreachable_unchecked() },
4684 }
4685 }
4686 }
4687
4688 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionWithVector<'de>>
4689 for UnionWithVector
4690 {
4691 #[inline]
4692 fn from_wire_option(
4693 wire: crate::wire_optional::UnionWithVector<'de>,
4694 ) -> ::core::option::Option<Self> {
4695 if let Some(inner) = wire.into_option() {
4696 Some(::fidl_next::FromWire::from_wire(inner))
4697 } else {
4698 None
4699 }
4700 }
4701 }
4702
4703 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionWithVector<'de>>
4704 for Box<UnionWithVector>
4705 {
4706 #[inline]
4707 fn from_wire_option(
4708 wire: crate::wire_optional::UnionWithVector<'de>,
4709 ) -> ::core::option::Option<Self> {
4710 <UnionWithVector as ::fidl_next::FromWireOption<
4711 crate::wire_optional::UnionWithVector<'de>,
4712 >>::from_wire_option(wire)
4713 .map(Box::new)
4714 }
4715 }
4716
4717 #[derive(Debug, PartialEq)]
4718 pub struct Sandwich6 {
4719 pub before: u32,
4720
4721 pub the_union: crate::natural::UnionWithVector,
4722
4723 pub after: u32,
4724 }
4725
4726 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E> for Sandwich6
4727 where
4728 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4729 ___E: ::fidl_next::Encoder,
4730 ___E: ::fidl_next::fuchsia::HandleEncoder,
4731 {
4732 #[inline]
4733 fn encode(
4734 self,
4735 encoder_: &mut ___E,
4736 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
4737 _: (),
4738 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4739 ::fidl_next::munge! {
4740 let crate::wire::Sandwich6 {
4741 before,
4742 the_union,
4743 after,
4744
4745 } = out_;
4746 }
4747
4748 ::fidl_next::Encode::encode(self.before, encoder_, before, ())?;
4749
4750 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(before.as_mut_ptr()) };
4751
4752 ::fidl_next::Encode::encode(self.the_union, encoder_, the_union, ())?;
4753
4754 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(the_union.as_mut_ptr()) };
4755
4756 ::fidl_next::Encode::encode(self.after, encoder_, after, ())?;
4757
4758 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(after.as_mut_ptr()) };
4759
4760 Ok(())
4761 }
4762 }
4763
4764 unsafe impl<___E>
4765 ::fidl_next::EncodeOption<
4766 ::fidl_next::wire::Box<'static, crate::wire::Sandwich6<'static>>,
4767 ___E,
4768 > for Sandwich6
4769 where
4770 ___E: ::fidl_next::Encoder + ?Sized,
4771 Sandwich6: ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>,
4772 {
4773 #[inline]
4774 fn encode_option(
4775 this: ::core::option::Option<Self>,
4776 encoder: &mut ___E,
4777 out: &mut ::core::mem::MaybeUninit<
4778 ::fidl_next::wire::Box<'static, crate::wire::Sandwich6<'static>>,
4779 >,
4780 _: (),
4781 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4782 if let Some(inner) = this {
4783 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4784 ::fidl_next::wire::Box::encode_present(out);
4785 } else {
4786 ::fidl_next::wire::Box::encode_absent(out);
4787 }
4788
4789 Ok(())
4790 }
4791 }
4792
4793 impl<'de> ::fidl_next::FromWire<crate::wire::Sandwich6<'de>> for Sandwich6 {
4794 #[inline]
4795 fn from_wire(wire: crate::wire::Sandwich6<'de>) -> Self {
4796 Self {
4797 before: ::fidl_next::FromWire::from_wire(wire.before),
4798
4799 the_union: ::fidl_next::FromWire::from_wire(wire.the_union),
4800
4801 after: ::fidl_next::FromWire::from_wire(wire.after),
4802 }
4803 }
4804 }
4805
4806 #[derive(Debug, PartialEq)]
4807 pub struct ShortStringThenHandle {
4808 pub s: ::std::string::String,
4809
4810 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
4811 }
4812
4813 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
4814 for ShortStringThenHandle
4815 where
4816 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4817 ___E: ::fidl_next::Encoder,
4818 ___E: ::fidl_next::fuchsia::HandleEncoder,
4819 {
4820 #[inline]
4821 fn encode(
4822 self,
4823 encoder_: &mut ___E,
4824 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
4825 _: (),
4826 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4827 ::fidl_next::munge! {
4828 let crate::wire::ShortStringThenHandle {
4829 s,
4830 h,
4831
4832 } = out_;
4833 }
4834
4835 ::fidl_next::Encode::encode(self.s, encoder_, s, 1)?;
4836
4837 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4838 ::fidl_next::Constrained::validate(_field, 1)?;
4839
4840 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
4841
4842 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
4843
4844 Ok(())
4845 }
4846 }
4847
4848 unsafe impl<___E>
4849 ::fidl_next::EncodeOption<
4850 ::fidl_next::wire::Box<'static, crate::wire::ShortStringThenHandle<'static>>,
4851 ___E,
4852 > for ShortStringThenHandle
4853 where
4854 ___E: ::fidl_next::Encoder + ?Sized,
4855 ShortStringThenHandle:
4856 ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>,
4857 {
4858 #[inline]
4859 fn encode_option(
4860 this: ::core::option::Option<Self>,
4861 encoder: &mut ___E,
4862 out: &mut ::core::mem::MaybeUninit<
4863 ::fidl_next::wire::Box<'static, crate::wire::ShortStringThenHandle<'static>>,
4864 >,
4865 _: (),
4866 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4867 if let Some(inner) = this {
4868 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4869 ::fidl_next::wire::Box::encode_present(out);
4870 } else {
4871 ::fidl_next::wire::Box::encode_absent(out);
4872 }
4873
4874 Ok(())
4875 }
4876 }
4877
4878 impl<'de> ::fidl_next::FromWire<crate::wire::ShortStringThenHandle<'de>> for ShortStringThenHandle {
4879 #[inline]
4880 fn from_wire(wire: crate::wire::ShortStringThenHandle<'de>) -> Self {
4881 Self {
4882 s: ::fidl_next::FromWire::from_wire(wire.s),
4883
4884 h: ::fidl_next::FromWire::from_wire(wire.h),
4885 }
4886 }
4887 }
4888
4889 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4890 pub struct SimpleResourceTable {
4891 pub x: ::core::option::Option<i64>,
4892
4893 pub y: ::core::option::Option<i64>,
4894 }
4895
4896 impl SimpleResourceTable {
4897 fn __max_ordinal(&self) -> usize {
4898 if self.y.is_some() {
4899 return 5;
4900 }
4901
4902 if self.x.is_some() {
4903 return 1;
4904 }
4905
4906 0
4907 }
4908 }
4909
4910 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>
4911 for SimpleResourceTable
4912 where
4913 ___E: ::fidl_next::Encoder + ?Sized,
4914 ___E: ::fidl_next::fuchsia::HandleEncoder,
4915 {
4916 #[inline]
4917 fn encode(
4918 mut self,
4919 encoder: &mut ___E,
4920 out: &mut ::core::mem::MaybeUninit<crate::wire::SimpleResourceTable<'static>>,
4921 _: (),
4922 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4923 ::fidl_next::munge!(let crate::wire::SimpleResourceTable { table } = out);
4924
4925 let max_ord = self.__max_ordinal();
4926
4927 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4928 ::fidl_next::Wire::zero_padding(&mut out);
4929
4930 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4931 ::fidl_next::wire::Envelope,
4932 >(encoder, max_ord);
4933
4934 for i in 1..=max_ord {
4935 match i {
4936 5 => {
4937 if let Some(value) = self.y.take() {
4938 ::fidl_next::wire::Envelope::encode_value::<
4939 ::fidl_next::wire::Int64,
4940 ___E,
4941 >(
4942 value, preallocated.encoder, &mut out, ()
4943 )?;
4944 } else {
4945 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4946 }
4947 }
4948
4949 1 => {
4950 if let Some(value) = self.x.take() {
4951 ::fidl_next::wire::Envelope::encode_value::<
4952 ::fidl_next::wire::Int64,
4953 ___E,
4954 >(
4955 value, preallocated.encoder, &mut out, ()
4956 )?;
4957 } else {
4958 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4959 }
4960 }
4961
4962 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4963 }
4964 unsafe {
4965 preallocated.write_next(out.assume_init_ref());
4966 }
4967 }
4968
4969 ::fidl_next::wire::Table::encode_len(table, max_ord);
4970
4971 Ok(())
4972 }
4973 }
4974
4975 impl<'de> ::fidl_next::FromWire<crate::wire::SimpleResourceTable<'de>> for SimpleResourceTable {
4976 #[inline]
4977 fn from_wire(wire_: crate::wire::SimpleResourceTable<'de>) -> Self {
4978 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4979
4980 let x = wire_.table.get(1);
4981
4982 let y = wire_.table.get(5);
4983
4984 Self {
4985 x: x.map(|envelope| {
4986 ::fidl_next::FromWire::from_wire(unsafe {
4987 envelope.read_unchecked::<::fidl_next::wire::Int64>()
4988 })
4989 }),
4990
4991 y: y.map(|envelope| {
4992 ::fidl_next::FromWire::from_wire(unsafe {
4993 envelope.read_unchecked::<::fidl_next::wire::Int64>()
4994 })
4995 }),
4996 }
4997 }
4998 }
4999
5000 #[derive(Debug, PartialEq)]
5001 #[repr(C)]
5002 pub struct SingleHandle {
5003 pub h: ::fidl_next::fuchsia::zx::NullableHandle,
5004 }
5005
5006 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SingleHandle, ___E> for SingleHandle
5007 where
5008 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5009 ___E: ::fidl_next::fuchsia::HandleEncoder,
5010 {
5011 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::SingleHandle> = unsafe {
5012 ::fidl_next::CopyOptimization::enable_if(
5013 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::Encode<
5014 ::fidl_next::wire::fuchsia::NullableHandle,
5015 ___E,
5016 >>::COPY_OPTIMIZATION
5017 .is_enabled(),
5018 )
5019 };
5020
5021 #[inline]
5022 fn encode(
5023 self,
5024 encoder_: &mut ___E,
5025 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
5026 _: (),
5027 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5028 ::fidl_next::munge! {
5029 let crate::wire::SingleHandle {
5030 h,
5031
5032 } = out_;
5033 }
5034
5035 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
5036
5037 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
5038
5039 Ok(())
5040 }
5041 }
5042
5043 unsafe impl<___E>
5044 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>
5045 for SingleHandle
5046 where
5047 ___E: ::fidl_next::Encoder + ?Sized,
5048 SingleHandle: ::fidl_next::Encode<crate::wire::SingleHandle, ___E>,
5049 {
5050 #[inline]
5051 fn encode_option(
5052 this: ::core::option::Option<Self>,
5053 encoder: &mut ___E,
5054 out: &mut ::core::mem::MaybeUninit<
5055 ::fidl_next::wire::Box<'static, crate::wire::SingleHandle>,
5056 >,
5057 _: (),
5058 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5059 if let Some(inner) = this {
5060 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5061 ::fidl_next::wire::Box::encode_present(out);
5062 } else {
5063 ::fidl_next::wire::Box::encode_absent(out);
5064 }
5065
5066 Ok(())
5067 }
5068 }
5069
5070 impl ::fidl_next::FromWire<crate::wire::SingleHandle> for SingleHandle {
5071 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::SingleHandle, Self> = unsafe {
5072 ::fidl_next::CopyOptimization::enable_if(
5073 true && <::fidl_next::fuchsia::zx::NullableHandle as ::fidl_next::FromWire<
5074 ::fidl_next::wire::fuchsia::NullableHandle,
5075 >>::COPY_OPTIMIZATION
5076 .is_enabled(),
5077 )
5078 };
5079
5080 #[inline]
5081 fn from_wire(wire: crate::wire::SingleHandle) -> Self {
5082 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
5083 }
5084 }
5085
5086 #[derive(Debug, PartialEq)]
5087 #[repr(C)]
5088 pub struct SingleOptionalHandle {
5089 pub h: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
5090 }
5091
5092 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
5093 for SingleOptionalHandle
5094 where
5095 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5096 ___E: ::fidl_next::fuchsia::HandleEncoder,
5097 {
5098 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5099 Self,
5100 crate::wire::SingleOptionalHandle,
5101 > = unsafe {
5102 ::fidl_next::CopyOptimization::enable_if(
5103 true
5104
5105 && <
5106 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
5107 >::COPY_OPTIMIZATION.is_enabled()
5108
5109 )
5110 };
5111
5112 #[inline]
5113 fn encode(
5114 self,
5115 encoder_: &mut ___E,
5116 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
5117 _: (),
5118 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5119 ::fidl_next::munge! {
5120 let crate::wire::SingleOptionalHandle {
5121 h,
5122
5123 } = out_;
5124 }
5125
5126 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
5127
5128 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
5129
5130 Ok(())
5131 }
5132 }
5133
5134 unsafe impl<___E>
5135 ::fidl_next::EncodeOption<
5136 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
5137 ___E,
5138 > for SingleOptionalHandle
5139 where
5140 ___E: ::fidl_next::Encoder + ?Sized,
5141 SingleOptionalHandle: ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>,
5142 {
5143 #[inline]
5144 fn encode_option(
5145 this: ::core::option::Option<Self>,
5146 encoder: &mut ___E,
5147 out: &mut ::core::mem::MaybeUninit<
5148 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
5149 >,
5150 _: (),
5151 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5152 if let Some(inner) = this {
5153 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5154 ::fidl_next::wire::Box::encode_present(out);
5155 } else {
5156 ::fidl_next::wire::Box::encode_absent(out);
5157 }
5158
5159 Ok(())
5160 }
5161 }
5162
5163 impl ::fidl_next::FromWire<crate::wire::SingleOptionalHandle> for SingleOptionalHandle {
5164 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5165 crate::wire::SingleOptionalHandle,
5166 Self,
5167 > = unsafe {
5168 ::fidl_next::CopyOptimization::enable_if(
5169 true
5170
5171 && <
5172 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
5173 >::COPY_OPTIMIZATION.is_enabled()
5174
5175 )
5176 };
5177
5178 #[inline]
5179 fn from_wire(wire: crate::wire::SingleOptionalHandle) -> Self {
5180 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
5181 }
5182 }
5183
5184 #[derive(Debug, PartialEq)]
5185 #[repr(C)]
5186 pub struct StructOfEndpoints {
5187 pub client_end: ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5188
5189 pub optional_client_end: ::core::option::Option<
5190 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5191 >,
5192
5193 pub server_end: ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5194
5195 pub optional_server_end: ::core::option::Option<
5196 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5197 >,
5198 }
5199
5200 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E> for StructOfEndpoints
5201 where
5202 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5203 ___E: ::fidl_next::fuchsia::HandleEncoder,
5204 {
5205 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5206 Self,
5207 crate::wire::StructOfEndpoints,
5208 > = unsafe {
5209 ::fidl_next::CopyOptimization::enable_if(
5210 true
5211
5212 && <
5213 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>, ___E>
5214 >::COPY_OPTIMIZATION.is_enabled()
5215
5216 && <
5217 ::core::option::Option<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>, ___E>
5218 >::COPY_OPTIMIZATION.is_enabled()
5219
5220 && <
5221 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>, ___E>
5222 >::COPY_OPTIMIZATION.is_enabled()
5223
5224 && <
5225 ::core::option::Option<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>, ___E>
5226 >::COPY_OPTIMIZATION.is_enabled()
5227
5228 )
5229 };
5230
5231 #[inline]
5232 fn encode(
5233 self,
5234 encoder_: &mut ___E,
5235 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
5236 _: (),
5237 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5238 ::fidl_next::munge! {
5239 let crate::wire::StructOfEndpoints {
5240 client_end,
5241 optional_client_end,
5242 server_end,
5243 optional_server_end,
5244
5245 } = out_;
5246 }
5247
5248 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
5249
5250 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_end.as_mut_ptr()) };
5251
5252 ::fidl_next::Encode::encode(
5253 self.optional_client_end,
5254 encoder_,
5255 optional_client_end,
5256 (),
5257 )?;
5258
5259 let mut _field =
5260 unsafe { ::fidl_next::Slot::new_unchecked(optional_client_end.as_mut_ptr()) };
5261
5262 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
5263
5264 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server_end.as_mut_ptr()) };
5265
5266 ::fidl_next::Encode::encode(
5267 self.optional_server_end,
5268 encoder_,
5269 optional_server_end,
5270 (),
5271 )?;
5272
5273 let mut _field =
5274 unsafe { ::fidl_next::Slot::new_unchecked(optional_server_end.as_mut_ptr()) };
5275
5276 Ok(())
5277 }
5278 }
5279
5280 unsafe impl<___E>
5281 ::fidl_next::EncodeOption<
5282 ::fidl_next::wire::Box<'static, crate::wire::StructOfEndpoints>,
5283 ___E,
5284 > for StructOfEndpoints
5285 where
5286 ___E: ::fidl_next::Encoder + ?Sized,
5287 StructOfEndpoints: ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>,
5288 {
5289 #[inline]
5290 fn encode_option(
5291 this: ::core::option::Option<Self>,
5292 encoder: &mut ___E,
5293 out: &mut ::core::mem::MaybeUninit<
5294 ::fidl_next::wire::Box<'static, crate::wire::StructOfEndpoints>,
5295 >,
5296 _: (),
5297 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5298 if let Some(inner) = this {
5299 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5300 ::fidl_next::wire::Box::encode_present(out);
5301 } else {
5302 ::fidl_next::wire::Box::encode_absent(out);
5303 }
5304
5305 Ok(())
5306 }
5307 }
5308
5309 impl ::fidl_next::FromWire<crate::wire::StructOfEndpoints> for StructOfEndpoints {
5310 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5311 crate::wire::StructOfEndpoints,
5312 Self,
5313 > = unsafe {
5314 ::fidl_next::CopyOptimization::enable_if(
5315 true
5316
5317 && <
5318 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>
5319 >::COPY_OPTIMIZATION.is_enabled()
5320
5321 && <
5322 ::core::option::Option<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>>
5323 >::COPY_OPTIMIZATION.is_enabled()
5324
5325 && <
5326 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>
5327 >::COPY_OPTIMIZATION.is_enabled()
5328
5329 && <
5330 ::core::option::Option<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>>
5331 >::COPY_OPTIMIZATION.is_enabled()
5332
5333 )
5334 };
5335
5336 #[inline]
5337 fn from_wire(wire: crate::wire::StructOfEndpoints) -> Self {
5338 Self {
5339 client_end: ::fidl_next::FromWire::from_wire(wire.client_end),
5340
5341 optional_client_end: ::fidl_next::FromWire::from_wire(wire.optional_client_end),
5342
5343 server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
5344
5345 optional_server_end: ::fidl_next::FromWire::from_wire(wire.optional_server_end),
5346 }
5347 }
5348 }
5349
5350 #[derive(Debug, PartialEq)]
5351 #[repr(C)]
5352 pub struct StructOfOptionalUnionOfHandle {
5353 pub u: ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>>,
5354 }
5355
5356 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
5357 for StructOfOptionalUnionOfHandle
5358 where
5359 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5360 ___E: ::fidl_next::fuchsia::HandleEncoder,
5361 {
5362 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5363 Self,
5364 crate::wire::StructOfOptionalUnionOfHandle,
5365 > = unsafe {
5366 ::fidl_next::CopyOptimization::enable_if(
5367 true
5368
5369 && <
5370 ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>> as ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>
5371 >::COPY_OPTIMIZATION.is_enabled()
5372
5373 )
5374 };
5375
5376 #[inline]
5377 fn encode(
5378 self,
5379 encoder_: &mut ___E,
5380 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
5381 _: (),
5382 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5383 ::fidl_next::munge! {
5384 let crate::wire::StructOfOptionalUnionOfHandle {
5385 u,
5386
5387 } = out_;
5388 }
5389
5390 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
5391
5392 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
5393
5394 Ok(())
5395 }
5396 }
5397
5398 unsafe impl<___E>
5399 ::fidl_next::EncodeOption<
5400 ::fidl_next::wire::Box<'static, crate::wire::StructOfOptionalUnionOfHandle>,
5401 ___E,
5402 > for StructOfOptionalUnionOfHandle
5403 where
5404 ___E: ::fidl_next::Encoder + ?Sized,
5405 StructOfOptionalUnionOfHandle:
5406 ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>,
5407 {
5408 #[inline]
5409 fn encode_option(
5410 this: ::core::option::Option<Self>,
5411 encoder: &mut ___E,
5412 out: &mut ::core::mem::MaybeUninit<
5413 ::fidl_next::wire::Box<'static, crate::wire::StructOfOptionalUnionOfHandle>,
5414 >,
5415 _: (),
5416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5417 if let Some(inner) = this {
5418 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5419 ::fidl_next::wire::Box::encode_present(out);
5420 } else {
5421 ::fidl_next::wire::Box::encode_absent(out);
5422 }
5423
5424 Ok(())
5425 }
5426 }
5427
5428 impl ::fidl_next::FromWire<crate::wire::StructOfOptionalUnionOfHandle>
5429 for StructOfOptionalUnionOfHandle
5430 {
5431 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5432 crate::wire::StructOfOptionalUnionOfHandle,
5433 Self,
5434 > = unsafe {
5435 ::fidl_next::CopyOptimization::enable_if(
5436 true
5437
5438 && <
5439 ::core::option::Option<::std::boxed::Box<crate::natural::UnionOfHandle>> as ::fidl_next::FromWire<crate::wire_optional::UnionOfHandle>
5440 >::COPY_OPTIMIZATION.is_enabled()
5441
5442 )
5443 };
5444
5445 #[inline]
5446 fn from_wire(wire: crate::wire::StructOfOptionalUnionOfHandle) -> Self {
5447 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
5448 }
5449 }
5450
5451 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5452 pub struct StructOfSimpleResourceTable {
5453 pub table: crate::natural::SimpleResourceTable,
5454 }
5455
5456 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
5457 for StructOfSimpleResourceTable
5458 where
5459 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5460 ___E: ::fidl_next::Encoder,
5461 ___E: ::fidl_next::fuchsia::HandleEncoder,
5462 {
5463 #[inline]
5464 fn encode(
5465 self,
5466 encoder_: &mut ___E,
5467 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
5468 _: (),
5469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5470 ::fidl_next::munge! {
5471 let crate::wire::StructOfSimpleResourceTable {
5472 table,
5473
5474 } = out_;
5475 }
5476
5477 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
5478
5479 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
5480
5481 Ok(())
5482 }
5483 }
5484
5485 unsafe impl<___E>
5486 ::fidl_next::EncodeOption<
5487 ::fidl_next::wire::Box<'static, crate::wire::StructOfSimpleResourceTable<'static>>,
5488 ___E,
5489 > for StructOfSimpleResourceTable
5490 where
5491 ___E: ::fidl_next::Encoder + ?Sized,
5492 StructOfSimpleResourceTable:
5493 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>,
5494 {
5495 #[inline]
5496 fn encode_option(
5497 this: ::core::option::Option<Self>,
5498 encoder: &mut ___E,
5499 out: &mut ::core::mem::MaybeUninit<
5500 ::fidl_next::wire::Box<'static, crate::wire::StructOfSimpleResourceTable<'static>>,
5501 >,
5502 _: (),
5503 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5504 if let Some(inner) = this {
5505 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5506 ::fidl_next::wire::Box::encode_present(out);
5507 } else {
5508 ::fidl_next::wire::Box::encode_absent(out);
5509 }
5510
5511 Ok(())
5512 }
5513 }
5514
5515 impl<'de> ::fidl_next::FromWire<crate::wire::StructOfSimpleResourceTable<'de>>
5516 for StructOfSimpleResourceTable
5517 {
5518 #[inline]
5519 fn from_wire(wire: crate::wire::StructOfSimpleResourceTable<'de>) -> Self {
5520 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
5521 }
5522 }
5523
5524 #[derive(Debug, Default, PartialEq)]
5525 pub struct TableFieldInlinedHandle {
5526 pub f: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
5527 }
5528
5529 impl TableFieldInlinedHandle {
5530 fn __max_ordinal(&self) -> usize {
5531 if self.f.is_some() {
5532 return 1;
5533 }
5534
5535 0
5536 }
5537 }
5538
5539 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>
5540 for TableFieldInlinedHandle
5541 where
5542 ___E: ::fidl_next::Encoder + ?Sized,
5543 ___E: ::fidl_next::fuchsia::HandleEncoder,
5544 {
5545 #[inline]
5546 fn encode(
5547 mut self,
5548 encoder: &mut ___E,
5549 out: &mut ::core::mem::MaybeUninit<crate::wire::TableFieldInlinedHandle<'static>>,
5550 _: (),
5551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5552 ::fidl_next::munge!(let crate::wire::TableFieldInlinedHandle { table } = out);
5553
5554 let max_ord = self.__max_ordinal();
5555
5556 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5557 ::fidl_next::Wire::zero_padding(&mut out);
5558
5559 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5560 ::fidl_next::wire::Envelope,
5561 >(encoder, max_ord);
5562
5563 for i in 1..=max_ord {
5564 match i {
5565 1 => {
5566 if let Some(value) = self.f.take() {
5567 ::fidl_next::wire::Envelope::encode_value::<
5568 ::fidl_next::wire::fuchsia::Channel,
5569 ___E,
5570 >(
5571 value, preallocated.encoder, &mut out, ()
5572 )?;
5573 } else {
5574 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5575 }
5576 }
5577
5578 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5579 }
5580 unsafe {
5581 preallocated.write_next(out.assume_init_ref());
5582 }
5583 }
5584
5585 ::fidl_next::wire::Table::encode_len(table, max_ord);
5586
5587 Ok(())
5588 }
5589 }
5590
5591 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldInlinedHandle<'de>>
5592 for TableFieldInlinedHandle
5593 {
5594 #[inline]
5595 fn from_wire(wire_: crate::wire::TableFieldInlinedHandle<'de>) -> Self {
5596 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5597
5598 let f = wire_.table.get(1);
5599
5600 Self {
5601 f: f.map(|envelope| {
5602 ::fidl_next::FromWire::from_wire(unsafe {
5603 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
5604 })
5605 }),
5606 }
5607 }
5608 }
5609
5610 #[derive(Debug, PartialEq)]
5611 pub struct TableFieldInlinedHandleStruct {
5612 pub t: crate::natural::TableFieldInlinedHandle,
5613 }
5614
5615 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
5616 for TableFieldInlinedHandleStruct
5617 where
5618 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5619 ___E: ::fidl_next::Encoder,
5620 ___E: ::fidl_next::fuchsia::HandleEncoder,
5621 {
5622 #[inline]
5623 fn encode(
5624 self,
5625 encoder_: &mut ___E,
5626 out_: &mut ::core::mem::MaybeUninit<
5627 crate::wire::TableFieldInlinedHandleStruct<'static>,
5628 >,
5629 _: (),
5630 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5631 ::fidl_next::munge! {
5632 let crate::wire::TableFieldInlinedHandleStruct {
5633 t,
5634
5635 } = out_;
5636 }
5637
5638 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5639
5640 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5641
5642 Ok(())
5643 }
5644 }
5645
5646 unsafe impl<___E>
5647 ::fidl_next::EncodeOption<
5648 ::fidl_next::wire::Box<'static, crate::wire::TableFieldInlinedHandleStruct<'static>>,
5649 ___E,
5650 > for TableFieldInlinedHandleStruct
5651 where
5652 ___E: ::fidl_next::Encoder + ?Sized,
5653 TableFieldInlinedHandleStruct:
5654 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>,
5655 {
5656 #[inline]
5657 fn encode_option(
5658 this: ::core::option::Option<Self>,
5659 encoder: &mut ___E,
5660 out: &mut ::core::mem::MaybeUninit<
5661 ::fidl_next::wire::Box<
5662 'static,
5663 crate::wire::TableFieldInlinedHandleStruct<'static>,
5664 >,
5665 >,
5666 _: (),
5667 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5668 if let Some(inner) = this {
5669 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5670 ::fidl_next::wire::Box::encode_present(out);
5671 } else {
5672 ::fidl_next::wire::Box::encode_absent(out);
5673 }
5674
5675 Ok(())
5676 }
5677 }
5678
5679 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldInlinedHandleStruct<'de>>
5680 for TableFieldInlinedHandleStruct
5681 {
5682 #[inline]
5683 fn from_wire(wire: crate::wire::TableFieldInlinedHandleStruct<'de>) -> Self {
5684 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
5685 }
5686 }
5687
5688 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5689 pub struct TableFieldUnknownResource {}
5690
5691 impl TableFieldUnknownResource {
5692 fn __max_ordinal(&self) -> usize {
5693 0
5694 }
5695 }
5696
5697 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>
5698 for TableFieldUnknownResource
5699 where
5700 ___E: ::fidl_next::Encoder + ?Sized,
5701 ___E: ::fidl_next::fuchsia::HandleEncoder,
5702 {
5703 #[inline]
5704 fn encode(
5705 mut self,
5706 encoder: &mut ___E,
5707 out: &mut ::core::mem::MaybeUninit<crate::wire::TableFieldUnknownResource<'static>>,
5708 _: (),
5709 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5710 ::fidl_next::munge!(let crate::wire::TableFieldUnknownResource { table } = out);
5711
5712 let max_ord = self.__max_ordinal();
5713
5714 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5715 ::fidl_next::Wire::zero_padding(&mut out);
5716
5717 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5718 ::fidl_next::wire::Envelope,
5719 >(encoder, max_ord);
5720
5721 for i in 1..=max_ord {
5722 match i {
5723 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5724 }
5725 unsafe {
5726 preallocated.write_next(out.assume_init_ref());
5727 }
5728 }
5729
5730 ::fidl_next::wire::Table::encode_len(table, max_ord);
5731
5732 Ok(())
5733 }
5734 }
5735
5736 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldUnknownResource<'de>>
5737 for TableFieldUnknownResource
5738 {
5739 #[inline]
5740 fn from_wire(wire_: crate::wire::TableFieldUnknownResource<'de>) -> Self {
5741 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5742
5743 Self {}
5744 }
5745 }
5746
5747 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5748 pub struct TableFieldUnknownResourceStruct {
5749 pub t: crate::natural::TableFieldUnknownResource,
5750 }
5751
5752 unsafe impl<___E>
5753 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
5754 for TableFieldUnknownResourceStruct
5755 where
5756 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5757 ___E: ::fidl_next::Encoder,
5758 ___E: ::fidl_next::fuchsia::HandleEncoder,
5759 {
5760 #[inline]
5761 fn encode(
5762 self,
5763 encoder_: &mut ___E,
5764 out_: &mut ::core::mem::MaybeUninit<
5765 crate::wire::TableFieldUnknownResourceStruct<'static>,
5766 >,
5767 _: (),
5768 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5769 ::fidl_next::munge! {
5770 let crate::wire::TableFieldUnknownResourceStruct {
5771 t,
5772
5773 } = out_;
5774 }
5775
5776 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5777
5778 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5779
5780 Ok(())
5781 }
5782 }
5783
5784 unsafe impl<___E>
5785 ::fidl_next::EncodeOption<
5786 ::fidl_next::wire::Box<'static, crate::wire::TableFieldUnknownResourceStruct<'static>>,
5787 ___E,
5788 > for TableFieldUnknownResourceStruct
5789 where
5790 ___E: ::fidl_next::Encoder + ?Sized,
5791 TableFieldUnknownResourceStruct:
5792 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>,
5793 {
5794 #[inline]
5795 fn encode_option(
5796 this: ::core::option::Option<Self>,
5797 encoder: &mut ___E,
5798 out: &mut ::core::mem::MaybeUninit<
5799 ::fidl_next::wire::Box<
5800 'static,
5801 crate::wire::TableFieldUnknownResourceStruct<'static>,
5802 >,
5803 >,
5804 _: (),
5805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5806 if let Some(inner) = this {
5807 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5808 ::fidl_next::wire::Box::encode_present(out);
5809 } else {
5810 ::fidl_next::wire::Box::encode_absent(out);
5811 }
5812
5813 Ok(())
5814 }
5815 }
5816
5817 impl<'de> ::fidl_next::FromWire<crate::wire::TableFieldUnknownResourceStruct<'de>>
5818 for TableFieldUnknownResourceStruct
5819 {
5820 #[inline]
5821 fn from_wire(wire: crate::wire::TableFieldUnknownResourceStruct<'de>) -> Self {
5822 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
5823 }
5824 }
5825
5826 #[derive(Debug, Default, PartialEq)]
5827 pub struct TableOfEndpointsTable {
5828 pub client_end: ::core::option::Option<
5829 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5830 >,
5831
5832 pub server_end: ::core::option::Option<
5833 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>,
5834 >,
5835 }
5836
5837 impl TableOfEndpointsTable {
5838 fn __max_ordinal(&self) -> usize {
5839 if self.server_end.is_some() {
5840 return 2;
5841 }
5842
5843 if self.client_end.is_some() {
5844 return 1;
5845 }
5846
5847 0
5848 }
5849 }
5850
5851 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>
5852 for TableOfEndpointsTable
5853 where
5854 ___E: ::fidl_next::Encoder + ?Sized,
5855 ___E: ::fidl_next::fuchsia::HandleEncoder,
5856 {
5857 #[inline]
5858 fn encode(
5859 mut self,
5860 encoder: &mut ___E,
5861 out: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpointsTable<'static>>,
5862 _: (),
5863 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5864 ::fidl_next::munge!(let crate::wire::TableOfEndpointsTable { table } = out);
5865
5866 let max_ord = self.__max_ordinal();
5867
5868 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5869 ::fidl_next::Wire::zero_padding(&mut out);
5870
5871 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5872 ::fidl_next::wire::Envelope,
5873 >(encoder, max_ord);
5874
5875 for i in 1..=max_ord {
5876 match i {
5877 2 => {
5878 if let Some(value) = self.server_end.take() {
5879 ::fidl_next::wire::Envelope::encode_value::<
5880 ::fidl_next::ServerEnd<
5881 crate::Protocol,
5882 ::fidl_next::wire::fuchsia::Channel,
5883 >,
5884 ___E,
5885 >(
5886 value, preallocated.encoder, &mut out, ()
5887 )?;
5888 } else {
5889 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5890 }
5891 }
5892
5893 1 => {
5894 if let Some(value) = self.client_end.take() {
5895 ::fidl_next::wire::Envelope::encode_value::<
5896 ::fidl_next::ClientEnd<
5897 crate::Protocol,
5898 ::fidl_next::wire::fuchsia::Channel,
5899 >,
5900 ___E,
5901 >(
5902 value, preallocated.encoder, &mut out, ()
5903 )?;
5904 } else {
5905 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5906 }
5907 }
5908
5909 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5910 }
5911 unsafe {
5912 preallocated.write_next(out.assume_init_ref());
5913 }
5914 }
5915
5916 ::fidl_next::wire::Table::encode_len(table, max_ord);
5917
5918 Ok(())
5919 }
5920 }
5921
5922 impl<'de> ::fidl_next::FromWire<crate::wire::TableOfEndpointsTable<'de>> for TableOfEndpointsTable {
5923 #[inline]
5924 fn from_wire(wire_: crate::wire::TableOfEndpointsTable<'de>) -> Self {
5925 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5926
5927 let client_end = wire_.table.get(1);
5928
5929 let server_end = wire_.table.get(2);
5930
5931 Self {
5932 client_end: client_end.map(|envelope| {
5933 ::fidl_next::FromWire::from_wire(unsafe {
5934 envelope.read_unchecked::<::fidl_next::ClientEnd<
5935 crate::Protocol,
5936 ::fidl_next::wire::fuchsia::Channel,
5937 >>()
5938 })
5939 }),
5940
5941 server_end: server_end.map(|envelope| {
5942 ::fidl_next::FromWire::from_wire(unsafe {
5943 envelope.read_unchecked::<::fidl_next::ServerEnd<
5944 crate::Protocol,
5945 ::fidl_next::wire::fuchsia::Channel,
5946 >>()
5947 })
5948 }),
5949 }
5950 }
5951 }
5952
5953 #[derive(Debug, PartialEq)]
5954 pub struct TableOfEndpoints {
5955 pub t: crate::natural::TableOfEndpointsTable,
5956 }
5957
5958 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
5959 for TableOfEndpoints
5960 where
5961 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5962 ___E: ::fidl_next::Encoder,
5963 ___E: ::fidl_next::fuchsia::HandleEncoder,
5964 {
5965 #[inline]
5966 fn encode(
5967 self,
5968 encoder_: &mut ___E,
5969 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
5970 _: (),
5971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5972 ::fidl_next::munge! {
5973 let crate::wire::TableOfEndpoints {
5974 t,
5975
5976 } = out_;
5977 }
5978
5979 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
5980
5981 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
5982
5983 Ok(())
5984 }
5985 }
5986
5987 unsafe impl<___E>
5988 ::fidl_next::EncodeOption<
5989 ::fidl_next::wire::Box<'static, crate::wire::TableOfEndpoints<'static>>,
5990 ___E,
5991 > for TableOfEndpoints
5992 where
5993 ___E: ::fidl_next::Encoder + ?Sized,
5994 TableOfEndpoints: ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>,
5995 {
5996 #[inline]
5997 fn encode_option(
5998 this: ::core::option::Option<Self>,
5999 encoder: &mut ___E,
6000 out: &mut ::core::mem::MaybeUninit<
6001 ::fidl_next::wire::Box<'static, crate::wire::TableOfEndpoints<'static>>,
6002 >,
6003 _: (),
6004 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6005 if let Some(inner) = this {
6006 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6007 ::fidl_next::wire::Box::encode_present(out);
6008 } else {
6009 ::fidl_next::wire::Box::encode_absent(out);
6010 }
6011
6012 Ok(())
6013 }
6014 }
6015
6016 impl<'de> ::fidl_next::FromWire<crate::wire::TableOfEndpoints<'de>> for TableOfEndpoints {
6017 #[inline]
6018 fn from_wire(wire: crate::wire::TableOfEndpoints<'de>) -> Self {
6019 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
6020 }
6021 }
6022
6023 #[derive(Debug, Default, PartialEq)]
6024 pub struct TableUnionWithVectorReservedSandwich {
6025 pub uv: ::core::option::Option<crate::natural::UnionWithVector>,
6026 }
6027
6028 impl TableUnionWithVectorReservedSandwich {
6029 fn __max_ordinal(&self) -> usize {
6030 if self.uv.is_some() {
6031 return 2;
6032 }
6033
6034 0
6035 }
6036 }
6037
6038 unsafe impl<___E>
6039 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>
6040 for TableUnionWithVectorReservedSandwich
6041 where
6042 ___E: ::fidl_next::Encoder + ?Sized,
6043 ___E: ::fidl_next::fuchsia::HandleEncoder,
6044 {
6045 #[inline]
6046 fn encode(
6047 mut self,
6048 encoder: &mut ___E,
6049 out: &mut ::core::mem::MaybeUninit<
6050 crate::wire::TableUnionWithVectorReservedSandwich<'static>,
6051 >,
6052 _: (),
6053 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6054 ::fidl_next::munge!(let crate::wire::TableUnionWithVectorReservedSandwich { table } = out);
6055
6056 let max_ord = self.__max_ordinal();
6057
6058 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6059 ::fidl_next::Wire::zero_padding(&mut out);
6060
6061 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6062 ::fidl_next::wire::Envelope,
6063 >(encoder, max_ord);
6064
6065 for i in 1..=max_ord {
6066 match i {
6067 2 => {
6068 if let Some(value) = self.uv.take() {
6069 ::fidl_next::wire::Envelope::encode_value::<
6070 crate::wire::UnionWithVector<'static>,
6071 ___E,
6072 >(
6073 value, preallocated.encoder, &mut out, ()
6074 )?;
6075 } else {
6076 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6077 }
6078 }
6079
6080 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6081 }
6082 unsafe {
6083 preallocated.write_next(out.assume_init_ref());
6084 }
6085 }
6086
6087 ::fidl_next::wire::Table::encode_len(table, max_ord);
6088
6089 Ok(())
6090 }
6091 }
6092
6093 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorReservedSandwich<'de>>
6094 for TableUnionWithVectorReservedSandwich
6095 {
6096 #[inline]
6097 fn from_wire(wire_: crate::wire::TableUnionWithVectorReservedSandwich<'de>) -> Self {
6098 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6099
6100 let uv = wire_.table.get(2);
6101
6102 Self {
6103 uv: uv.map(|envelope| {
6104 ::fidl_next::FromWire::from_wire(unsafe {
6105 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
6106 })
6107 }),
6108 }
6109 }
6110 }
6111
6112 #[derive(Debug, PartialEq)]
6113 pub struct TableUnionWithVectorReservedSandwichStruct {
6114 pub table: crate::natural::TableUnionWithVectorReservedSandwich,
6115 }
6116
6117 unsafe impl<___E>
6118 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
6119 for TableUnionWithVectorReservedSandwichStruct
6120 where
6121 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6122 ___E: ::fidl_next::Encoder,
6123 ___E: ::fidl_next::fuchsia::HandleEncoder,
6124 {
6125 #[inline]
6126 fn encode(
6127 self,
6128 encoder_: &mut ___E,
6129 out_: &mut ::core::mem::MaybeUninit<
6130 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6131 >,
6132 _: (),
6133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6134 ::fidl_next::munge! {
6135 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
6136 table,
6137
6138 } = out_;
6139 }
6140
6141 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
6142
6143 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
6144
6145 Ok(())
6146 }
6147 }
6148
6149 unsafe impl<___E>
6150 ::fidl_next::EncodeOption<
6151 ::fidl_next::wire::Box<
6152 'static,
6153 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6154 >,
6155 ___E,
6156 > for TableUnionWithVectorReservedSandwichStruct
6157 where
6158 ___E: ::fidl_next::Encoder + ?Sized,
6159 TableUnionWithVectorReservedSandwichStruct: ::fidl_next::Encode<
6160 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6161 ___E,
6162 >,
6163 {
6164 #[inline]
6165 fn encode_option(
6166 this: ::core::option::Option<Self>,
6167 encoder: &mut ___E,
6168 out: &mut ::core::mem::MaybeUninit<
6169 ::fidl_next::wire::Box<
6170 'static,
6171 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
6172 >,
6173 >,
6174 _: (),
6175 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6176 if let Some(inner) = this {
6177 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6178 ::fidl_next::wire::Box::encode_present(out);
6179 } else {
6180 ::fidl_next::wire::Box::encode_absent(out);
6181 }
6182
6183 Ok(())
6184 }
6185 }
6186
6187 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorReservedSandwichStruct<'de>>
6188 for TableUnionWithVectorReservedSandwichStruct
6189 {
6190 #[inline]
6191 fn from_wire(wire: crate::wire::TableUnionWithVectorReservedSandwichStruct<'de>) -> Self {
6192 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
6193 }
6194 }
6195
6196 #[derive(Debug, Default, PartialEq)]
6197 pub struct TableUnionWithVectorStructSandwich {
6198 pub s1: ::core::option::Option<crate::natural::StructSize3Align1>,
6199
6200 pub uv: ::core::option::Option<crate::natural::UnionWithVector>,
6201
6202 pub s2: ::core::option::Option<crate::natural::StructSize3Align1>,
6203 }
6204
6205 impl TableUnionWithVectorStructSandwich {
6206 fn __max_ordinal(&self) -> usize {
6207 if self.s2.is_some() {
6208 return 3;
6209 }
6210
6211 if self.uv.is_some() {
6212 return 2;
6213 }
6214
6215 if self.s1.is_some() {
6216 return 1;
6217 }
6218
6219 0
6220 }
6221 }
6222
6223 unsafe impl<___E>
6224 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>
6225 for TableUnionWithVectorStructSandwich
6226 where
6227 ___E: ::fidl_next::Encoder + ?Sized,
6228 ___E: ::fidl_next::fuchsia::HandleEncoder,
6229 {
6230 #[inline]
6231 fn encode(
6232 mut self,
6233 encoder: &mut ___E,
6234 out: &mut ::core::mem::MaybeUninit<
6235 crate::wire::TableUnionWithVectorStructSandwich<'static>,
6236 >,
6237 _: (),
6238 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6239 ::fidl_next::munge!(let crate::wire::TableUnionWithVectorStructSandwich { table } = out);
6240
6241 let max_ord = self.__max_ordinal();
6242
6243 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6244 ::fidl_next::Wire::zero_padding(&mut out);
6245
6246 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6247 ::fidl_next::wire::Envelope,
6248 >(encoder, max_ord);
6249
6250 for i in 1..=max_ord {
6251 match i {
6252 3 => {
6253 if let Some(value) = self.s2.take() {
6254 ::fidl_next::wire::Envelope::encode_value::<
6255 crate::wire::StructSize3Align1,
6256 ___E,
6257 >(
6258 value, preallocated.encoder, &mut out, ()
6259 )?;
6260 } else {
6261 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6262 }
6263 }
6264
6265 2 => {
6266 if let Some(value) = self.uv.take() {
6267 ::fidl_next::wire::Envelope::encode_value::<
6268 crate::wire::UnionWithVector<'static>,
6269 ___E,
6270 >(
6271 value, preallocated.encoder, &mut out, ()
6272 )?;
6273 } else {
6274 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6275 }
6276 }
6277
6278 1 => {
6279 if let Some(value) = self.s1.take() {
6280 ::fidl_next::wire::Envelope::encode_value::<
6281 crate::wire::StructSize3Align1,
6282 ___E,
6283 >(
6284 value, preallocated.encoder, &mut out, ()
6285 )?;
6286 } else {
6287 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6288 }
6289 }
6290
6291 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6292 }
6293 unsafe {
6294 preallocated.write_next(out.assume_init_ref());
6295 }
6296 }
6297
6298 ::fidl_next::wire::Table::encode_len(table, max_ord);
6299
6300 Ok(())
6301 }
6302 }
6303
6304 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorStructSandwich<'de>>
6305 for TableUnionWithVectorStructSandwich
6306 {
6307 #[inline]
6308 fn from_wire(wire_: crate::wire::TableUnionWithVectorStructSandwich<'de>) -> Self {
6309 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6310
6311 let s1 = wire_.table.get(1);
6312
6313 let uv = wire_.table.get(2);
6314
6315 let s2 = wire_.table.get(3);
6316
6317 Self {
6318 s1: s1.map(|envelope| {
6319 ::fidl_next::FromWire::from_wire(unsafe {
6320 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
6321 })
6322 }),
6323
6324 uv: uv.map(|envelope| {
6325 ::fidl_next::FromWire::from_wire(unsafe {
6326 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
6327 })
6328 }),
6329
6330 s2: s2.map(|envelope| {
6331 ::fidl_next::FromWire::from_wire(unsafe {
6332 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
6333 })
6334 }),
6335 }
6336 }
6337 }
6338
6339 #[derive(Debug, PartialEq)]
6340 pub struct TableUnionWithVectorStructSandwichStruct {
6341 pub table: crate::natural::TableUnionWithVectorStructSandwich,
6342 }
6343
6344 unsafe impl<___E>
6345 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
6346 for TableUnionWithVectorStructSandwichStruct
6347 where
6348 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6349 ___E: ::fidl_next::Encoder,
6350 ___E: ::fidl_next::fuchsia::HandleEncoder,
6351 {
6352 #[inline]
6353 fn encode(
6354 self,
6355 encoder_: &mut ___E,
6356 out_: &mut ::core::mem::MaybeUninit<
6357 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6358 >,
6359 _: (),
6360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6361 ::fidl_next::munge! {
6362 let crate::wire::TableUnionWithVectorStructSandwichStruct {
6363 table,
6364
6365 } = out_;
6366 }
6367
6368 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
6369
6370 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(table.as_mut_ptr()) };
6371
6372 Ok(())
6373 }
6374 }
6375
6376 unsafe impl<___E>
6377 ::fidl_next::EncodeOption<
6378 ::fidl_next::wire::Box<
6379 'static,
6380 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6381 >,
6382 ___E,
6383 > for TableUnionWithVectorStructSandwichStruct
6384 where
6385 ___E: ::fidl_next::Encoder + ?Sized,
6386 TableUnionWithVectorStructSandwichStruct: ::fidl_next::Encode<
6387 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6388 ___E,
6389 >,
6390 {
6391 #[inline]
6392 fn encode_option(
6393 this: ::core::option::Option<Self>,
6394 encoder: &mut ___E,
6395 out: &mut ::core::mem::MaybeUninit<
6396 ::fidl_next::wire::Box<
6397 'static,
6398 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
6399 >,
6400 >,
6401 _: (),
6402 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6403 if let Some(inner) = this {
6404 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6405 ::fidl_next::wire::Box::encode_present(out);
6406 } else {
6407 ::fidl_next::wire::Box::encode_absent(out);
6408 }
6409
6410 Ok(())
6411 }
6412 }
6413
6414 impl<'de> ::fidl_next::FromWire<crate::wire::TableUnionWithVectorStructSandwichStruct<'de>>
6415 for TableUnionWithVectorStructSandwichStruct
6416 {
6417 #[inline]
6418 fn from_wire(wire: crate::wire::TableUnionWithVectorStructSandwichStruct<'de>) -> Self {
6419 Self { table: ::fidl_next::FromWire::from_wire(wire.table) }
6420 }
6421 }
6422
6423 #[derive(Debug, Default, PartialEq)]
6424 pub struct TableWithUnknownEnvelopesAfterKnownEnvelopes {
6425 pub a: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
6426 }
6427
6428 impl TableWithUnknownEnvelopesAfterKnownEnvelopes {
6429 fn __max_ordinal(&self) -> usize {
6430 if self.a.is_some() {
6431 return 1;
6432 }
6433
6434 0
6435 }
6436 }
6437
6438 unsafe impl<___E>
6439 ::fidl_next::Encode<
6440 crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'static>,
6441 ___E,
6442 > for TableWithUnknownEnvelopesAfterKnownEnvelopes
6443 where
6444 ___E: ::fidl_next::Encoder + ?Sized,
6445 ___E: ::fidl_next::fuchsia::HandleEncoder,
6446 {
6447 #[inline]
6448 fn encode(
6449 mut self,
6450 encoder: &mut ___E,
6451 out: &mut ::core::mem::MaybeUninit<
6452 crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'static>,
6453 >,
6454 _: (),
6455 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6456 ::fidl_next::munge!(let crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes { table } = out);
6457
6458 let max_ord = self.__max_ordinal();
6459
6460 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6461 ::fidl_next::Wire::zero_padding(&mut out);
6462
6463 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6464 ::fidl_next::wire::Envelope,
6465 >(encoder, max_ord);
6466
6467 for i in 1..=max_ord {
6468 match i {
6469 1 => {
6470 if let Some(value) = self.a.take() {
6471 ::fidl_next::wire::Envelope::encode_value::<
6472 ::fidl_next::wire::fuchsia::Event,
6473 ___E,
6474 >(
6475 value, preallocated.encoder, &mut out, ()
6476 )?;
6477 } else {
6478 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6479 }
6480 }
6481
6482 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6483 }
6484 unsafe {
6485 preallocated.write_next(out.assume_init_ref());
6486 }
6487 }
6488
6489 ::fidl_next::wire::Table::encode_len(table, max_ord);
6490
6491 Ok(())
6492 }
6493 }
6494
6495 impl<'de> ::fidl_next::FromWire<crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>>
6496 for TableWithUnknownEnvelopesAfterKnownEnvelopes
6497 {
6498 #[inline]
6499 fn from_wire(
6500 wire_: crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>,
6501 ) -> Self {
6502 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6503
6504 let a = wire_.table.get(1);
6505
6506 Self {
6507 a: a.map(|envelope| {
6508 ::fidl_next::FromWire::from_wire(unsafe {
6509 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
6510 })
6511 }),
6512 }
6513 }
6514 }
6515
6516 #[derive(Debug, PartialEq)]
6517 pub struct TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
6518 pub t: crate::natural::TableWithUnknownEnvelopesAfterKnownEnvelopes,
6519 }
6520
6521 unsafe impl<___E>
6522 ::fidl_next::Encode<
6523 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6524 ___E,
6525 > for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
6526 where
6527 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6528 ___E: ::fidl_next::Encoder,
6529 ___E: ::fidl_next::fuchsia::HandleEncoder,
6530 {
6531 #[inline]
6532 fn encode(
6533 self,
6534 encoder_: &mut ___E,
6535 out_: &mut ::core::mem::MaybeUninit<
6536 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6537 >,
6538 _: (),
6539 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6540 ::fidl_next::munge! {
6541 let crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
6542 t,
6543
6544 } = out_;
6545 }
6546
6547 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
6548
6549 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
6550
6551 Ok(())
6552 }
6553 }
6554
6555 unsafe impl<___E>
6556 ::fidl_next::EncodeOption<
6557 ::fidl_next::wire::Box<
6558 'static,
6559 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6560 >,
6561 ___E,
6562 > for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
6563 where
6564 ___E: ::fidl_next::Encoder + ?Sized,
6565 TableWithUnknownEnveloepsAfterKnownEnvelopesStruct: ::fidl_next::Encode<
6566 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6567 ___E,
6568 >,
6569 {
6570 #[inline]
6571 fn encode_option(
6572 this: ::core::option::Option<Self>,
6573 encoder: &mut ___E,
6574 out: &mut ::core::mem::MaybeUninit<
6575 ::fidl_next::wire::Box<
6576 'static,
6577 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
6578 >,
6579 >,
6580 _: (),
6581 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6582 if let Some(inner) = this {
6583 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6584 ::fidl_next::wire::Box::encode_present(out);
6585 } else {
6586 ::fidl_next::wire::Box::encode_absent(out);
6587 }
6588
6589 Ok(())
6590 }
6591 }
6592
6593 impl<'de>
6594 ::fidl_next::FromWire<crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de>>
6595 for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct
6596 {
6597 #[inline]
6598 fn from_wire(
6599 wire: crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de>,
6600 ) -> Self {
6601 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
6602 }
6603 }
6604
6605 #[derive(Debug, Default, PartialEq)]
6606 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopes {
6607 pub b: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
6608 }
6609
6610 impl TableWithUnknownEnvelopesBeforeKnownEnvelopes {
6611 fn __max_ordinal(&self) -> usize {
6612 if self.b.is_some() {
6613 return 2;
6614 }
6615
6616 0
6617 }
6618 }
6619
6620 unsafe impl<___E>
6621 ::fidl_next::Encode<
6622 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static>,
6623 ___E,
6624 > for TableWithUnknownEnvelopesBeforeKnownEnvelopes
6625 where
6626 ___E: ::fidl_next::Encoder + ?Sized,
6627 ___E: ::fidl_next::fuchsia::HandleEncoder,
6628 {
6629 #[inline]
6630 fn encode(
6631 mut self,
6632 encoder: &mut ___E,
6633 out: &mut ::core::mem::MaybeUninit<
6634 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static>,
6635 >,
6636 _: (),
6637 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6638 ::fidl_next::munge!(let crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes { table } = out);
6639
6640 let max_ord = self.__max_ordinal();
6641
6642 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6643 ::fidl_next::Wire::zero_padding(&mut out);
6644
6645 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6646 ::fidl_next::wire::Envelope,
6647 >(encoder, max_ord);
6648
6649 for i in 1..=max_ord {
6650 match i {
6651 2 => {
6652 if let Some(value) = self.b.take() {
6653 ::fidl_next::wire::Envelope::encode_value::<
6654 ::fidl_next::wire::fuchsia::Event,
6655 ___E,
6656 >(
6657 value, preallocated.encoder, &mut out, ()
6658 )?;
6659 } else {
6660 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6661 }
6662 }
6663
6664 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6665 }
6666 unsafe {
6667 preallocated.write_next(out.assume_init_ref());
6668 }
6669 }
6670
6671 ::fidl_next::wire::Table::encode_len(table, max_ord);
6672
6673 Ok(())
6674 }
6675 }
6676
6677 impl<'de> ::fidl_next::FromWire<crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>>
6678 for TableWithUnknownEnvelopesBeforeKnownEnvelopes
6679 {
6680 #[inline]
6681 fn from_wire(
6682 wire_: crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>,
6683 ) -> Self {
6684 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6685
6686 let b = wire_.table.get(2);
6687
6688 Self {
6689 b: b.map(|envelope| {
6690 ::fidl_next::FromWire::from_wire(unsafe {
6691 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
6692 })
6693 }),
6694 }
6695 }
6696 }
6697
6698 #[derive(Debug, PartialEq)]
6699 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
6700 pub t: crate::natural::TableWithUnknownEnvelopesBeforeKnownEnvelopes,
6701 }
6702
6703 unsafe impl<___E>
6704 ::fidl_next::Encode<
6705 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6706 ___E,
6707 > for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
6708 where
6709 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6710 ___E: ::fidl_next::Encoder,
6711 ___E: ::fidl_next::fuchsia::HandleEncoder,
6712 {
6713 #[inline]
6714 fn encode(
6715 self,
6716 encoder_: &mut ___E,
6717 out_: &mut ::core::mem::MaybeUninit<
6718 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6719 >,
6720 _: (),
6721 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6722 ::fidl_next::munge! {
6723 let crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
6724 t,
6725
6726 } = out_;
6727 }
6728
6729 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
6730
6731 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
6732
6733 Ok(())
6734 }
6735 }
6736
6737 unsafe impl<___E>
6738 ::fidl_next::EncodeOption<
6739 ::fidl_next::wire::Box<
6740 'static,
6741 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6742 >,
6743 ___E,
6744 > for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
6745 where
6746 ___E: ::fidl_next::Encoder + ?Sized,
6747 TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct: ::fidl_next::Encode<
6748 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6749 ___E,
6750 >,
6751 {
6752 #[inline]
6753 fn encode_option(
6754 this: ::core::option::Option<Self>,
6755 encoder: &mut ___E,
6756 out: &mut ::core::mem::MaybeUninit<
6757 ::fidl_next::wire::Box<
6758 'static,
6759 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
6760 >,
6761 >,
6762 _: (),
6763 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6764 if let Some(inner) = this {
6765 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6766 ::fidl_next::wire::Box::encode_present(out);
6767 } else {
6768 ::fidl_next::wire::Box::encode_absent(out);
6769 }
6770
6771 Ok(())
6772 }
6773 }
6774
6775 impl<'de>
6776 ::fidl_next::FromWire<crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de>>
6777 for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct
6778 {
6779 #[inline]
6780 fn from_wire(
6781 wire: crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de>,
6782 ) -> Self {
6783 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
6784 }
6785 }
6786
6787 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6788 pub struct TestFlexibleResourceXUnionInStruct {
6789 pub xu: crate::natural::SampleResourceXUnion,
6790 }
6791
6792 unsafe impl<___E>
6793 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
6794 for TestFlexibleResourceXUnionInStruct
6795 where
6796 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6797 ___E: ::fidl_next::Encoder,
6798 ___E: ::fidl_next::fuchsia::HandleEncoder,
6799 {
6800 #[inline]
6801 fn encode(
6802 self,
6803 encoder_: &mut ___E,
6804 out_: &mut ::core::mem::MaybeUninit<
6805 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6806 >,
6807 _: (),
6808 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6809 ::fidl_next::munge! {
6810 let crate::wire::TestFlexibleResourceXUnionInStruct {
6811 xu,
6812
6813 } = out_;
6814 }
6815
6816 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6817
6818 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6819
6820 Ok(())
6821 }
6822 }
6823
6824 unsafe impl<___E>
6825 ::fidl_next::EncodeOption<
6826 ::fidl_next::wire::Box<
6827 'static,
6828 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6829 >,
6830 ___E,
6831 > for TestFlexibleResourceXUnionInStruct
6832 where
6833 ___E: ::fidl_next::Encoder + ?Sized,
6834 TestFlexibleResourceXUnionInStruct:
6835 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>,
6836 {
6837 #[inline]
6838 fn encode_option(
6839 this: ::core::option::Option<Self>,
6840 encoder: &mut ___E,
6841 out: &mut ::core::mem::MaybeUninit<
6842 ::fidl_next::wire::Box<
6843 'static,
6844 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
6845 >,
6846 >,
6847 _: (),
6848 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6849 if let Some(inner) = this {
6850 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6851 ::fidl_next::wire::Box::encode_present(out);
6852 } else {
6853 ::fidl_next::wire::Box::encode_absent(out);
6854 }
6855
6856 Ok(())
6857 }
6858 }
6859
6860 impl<'de> ::fidl_next::FromWire<crate::wire::TestFlexibleResourceXUnionInStruct<'de>>
6861 for TestFlexibleResourceXUnionInStruct
6862 {
6863 #[inline]
6864 fn from_wire(wire: crate::wire::TestFlexibleResourceXUnionInStruct<'de>) -> Self {
6865 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6866 }
6867 }
6868
6869 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6870 pub struct TestOptionalFlexibleResourceXUnionInStruct {
6871 pub xu: ::core::option::Option<::std::boxed::Box<crate::natural::SampleResourceXUnion>>,
6872 }
6873
6874 unsafe impl<___E>
6875 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
6876 for TestOptionalFlexibleResourceXUnionInStruct
6877 where
6878 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6879 ___E: ::fidl_next::Encoder,
6880 ___E: ::fidl_next::fuchsia::HandleEncoder,
6881 {
6882 #[inline]
6883 fn encode(
6884 self,
6885 encoder_: &mut ___E,
6886 out_: &mut ::core::mem::MaybeUninit<
6887 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6888 >,
6889 _: (),
6890 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6891 ::fidl_next::munge! {
6892 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
6893 xu,
6894
6895 } = out_;
6896 }
6897
6898 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6899
6900 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6901
6902 Ok(())
6903 }
6904 }
6905
6906 unsafe impl<___E>
6907 ::fidl_next::EncodeOption<
6908 ::fidl_next::wire::Box<
6909 'static,
6910 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6911 >,
6912 ___E,
6913 > for TestOptionalFlexibleResourceXUnionInStruct
6914 where
6915 ___E: ::fidl_next::Encoder + ?Sized,
6916 TestOptionalFlexibleResourceXUnionInStruct: ::fidl_next::Encode<
6917 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6918 ___E,
6919 >,
6920 {
6921 #[inline]
6922 fn encode_option(
6923 this: ::core::option::Option<Self>,
6924 encoder: &mut ___E,
6925 out: &mut ::core::mem::MaybeUninit<
6926 ::fidl_next::wire::Box<
6927 'static,
6928 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
6929 >,
6930 >,
6931 _: (),
6932 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6933 if let Some(inner) = this {
6934 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6935 ::fidl_next::wire::Box::encode_present(out);
6936 } else {
6937 ::fidl_next::wire::Box::encode_absent(out);
6938 }
6939
6940 Ok(())
6941 }
6942 }
6943
6944 impl<'de> ::fidl_next::FromWire<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'de>>
6945 for TestOptionalFlexibleResourceXUnionInStruct
6946 {
6947 #[inline]
6948 fn from_wire(wire: crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'de>) -> Self {
6949 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
6950 }
6951 }
6952
6953 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6954 pub struct TestOptionalStrictResourceXUnionInStruct {
6955 pub xu:
6956 ::core::option::Option<::std::boxed::Box<crate::natural::SampleStrictResourceXUnion>>,
6957 }
6958
6959 unsafe impl<___E>
6960 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
6961 for TestOptionalStrictResourceXUnionInStruct
6962 where
6963 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6964 ___E: ::fidl_next::Encoder,
6965 ___E: ::fidl_next::fuchsia::HandleEncoder,
6966 {
6967 #[inline]
6968 fn encode(
6969 self,
6970 encoder_: &mut ___E,
6971 out_: &mut ::core::mem::MaybeUninit<
6972 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6973 >,
6974 _: (),
6975 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6976 ::fidl_next::munge! {
6977 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
6978 xu,
6979
6980 } = out_;
6981 }
6982
6983 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
6984
6985 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
6986
6987 Ok(())
6988 }
6989 }
6990
6991 unsafe impl<___E>
6992 ::fidl_next::EncodeOption<
6993 ::fidl_next::wire::Box<
6994 'static,
6995 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
6996 >,
6997 ___E,
6998 > for TestOptionalStrictResourceXUnionInStruct
6999 where
7000 ___E: ::fidl_next::Encoder + ?Sized,
7001 TestOptionalStrictResourceXUnionInStruct: ::fidl_next::Encode<
7002 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
7003 ___E,
7004 >,
7005 {
7006 #[inline]
7007 fn encode_option(
7008 this: ::core::option::Option<Self>,
7009 encoder: &mut ___E,
7010 out: &mut ::core::mem::MaybeUninit<
7011 ::fidl_next::wire::Box<
7012 'static,
7013 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
7014 >,
7015 >,
7016 _: (),
7017 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7018 if let Some(inner) = this {
7019 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7020 ::fidl_next::wire::Box::encode_present(out);
7021 } else {
7022 ::fidl_next::wire::Box::encode_absent(out);
7023 }
7024
7025 Ok(())
7026 }
7027 }
7028
7029 impl<'de> ::fidl_next::FromWire<crate::wire::TestOptionalStrictResourceXUnionInStruct<'de>>
7030 for TestOptionalStrictResourceXUnionInStruct
7031 {
7032 #[inline]
7033 fn from_wire(wire: crate::wire::TestOptionalStrictResourceXUnionInStruct<'de>) -> Self {
7034 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
7035 }
7036 }
7037
7038 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7039 pub struct TestPackageResolverResolveRequest {
7040 pub package_url: ::std::string::String,
7041
7042 pub selectors: ::std::vec::Vec<::std::string::String>,
7043
7044 pub update_policy: crate::natural::UpdatePolicy,
7045
7046 pub this_should_be_a_handle: u32,
7047 }
7048
7049 unsafe impl<___E>
7050 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
7051 for TestPackageResolverResolveRequest
7052 where
7053 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7054 ___E: ::fidl_next::Encoder,
7055 ___E: ::fidl_next::fuchsia::HandleEncoder,
7056 {
7057 #[inline]
7058 fn encode(
7059 self,
7060 encoder_: &mut ___E,
7061 out_: &mut ::core::mem::MaybeUninit<
7062 crate::wire::TestPackageResolverResolveRequest<'static>,
7063 >,
7064 _: (),
7065 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7066 ::fidl_next::munge! {
7067 let crate::wire::TestPackageResolverResolveRequest {
7068 package_url,
7069 selectors,
7070 update_policy,
7071 this_should_be_a_handle,
7072
7073 } = out_;
7074 }
7075
7076 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
7077
7078 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(package_url.as_mut_ptr()) };
7079 ::fidl_next::Constrained::validate(_field, 4294967295)?;
7080
7081 ::fidl_next::Encode::encode(
7082 self.selectors,
7083 encoder_,
7084 selectors,
7085 (4294967295, 4294967295),
7086 )?;
7087
7088 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(selectors.as_mut_ptr()) };
7089 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
7090
7091 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
7092
7093 let mut _field =
7094 unsafe { ::fidl_next::Slot::new_unchecked(update_policy.as_mut_ptr()) };
7095
7096 ::fidl_next::Encode::encode(
7097 self.this_should_be_a_handle,
7098 encoder_,
7099 this_should_be_a_handle,
7100 (),
7101 )?;
7102
7103 let mut _field =
7104 unsafe { ::fidl_next::Slot::new_unchecked(this_should_be_a_handle.as_mut_ptr()) };
7105
7106 Ok(())
7107 }
7108 }
7109
7110 unsafe impl<___E>
7111 ::fidl_next::EncodeOption<
7112 ::fidl_next::wire::Box<
7113 'static,
7114 crate::wire::TestPackageResolverResolveRequest<'static>,
7115 >,
7116 ___E,
7117 > for TestPackageResolverResolveRequest
7118 where
7119 ___E: ::fidl_next::Encoder + ?Sized,
7120 TestPackageResolverResolveRequest:
7121 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>,
7122 {
7123 #[inline]
7124 fn encode_option(
7125 this: ::core::option::Option<Self>,
7126 encoder: &mut ___E,
7127 out: &mut ::core::mem::MaybeUninit<
7128 ::fidl_next::wire::Box<
7129 'static,
7130 crate::wire::TestPackageResolverResolveRequest<'static>,
7131 >,
7132 >,
7133 _: (),
7134 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7135 if let Some(inner) = this {
7136 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7137 ::fidl_next::wire::Box::encode_present(out);
7138 } else {
7139 ::fidl_next::wire::Box::encode_absent(out);
7140 }
7141
7142 Ok(())
7143 }
7144 }
7145
7146 impl<'de> ::fidl_next::FromWire<crate::wire::TestPackageResolverResolveRequest<'de>>
7147 for TestPackageResolverResolveRequest
7148 {
7149 #[inline]
7150 fn from_wire(wire: crate::wire::TestPackageResolverResolveRequest<'de>) -> Self {
7151 Self {
7152 package_url: ::fidl_next::FromWire::from_wire(wire.package_url),
7153
7154 selectors: ::fidl_next::FromWire::from_wire(wire.selectors),
7155
7156 update_policy: ::fidl_next::FromWire::from_wire(wire.update_policy),
7157
7158 this_should_be_a_handle: ::fidl_next::FromWire::from_wire(
7159 wire.this_should_be_a_handle,
7160 ),
7161 }
7162 }
7163 }
7164
7165 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7166 pub struct TestStrictResourceXUnionInStruct {
7167 pub xu: crate::natural::SampleStrictResourceXUnion,
7168 }
7169
7170 unsafe impl<___E>
7171 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
7172 for TestStrictResourceXUnionInStruct
7173 where
7174 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7175 ___E: ::fidl_next::Encoder,
7176 ___E: ::fidl_next::fuchsia::HandleEncoder,
7177 {
7178 #[inline]
7179 fn encode(
7180 self,
7181 encoder_: &mut ___E,
7182 out_: &mut ::core::mem::MaybeUninit<
7183 crate::wire::TestStrictResourceXUnionInStruct<'static>,
7184 >,
7185 _: (),
7186 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7187 ::fidl_next::munge! {
7188 let crate::wire::TestStrictResourceXUnionInStruct {
7189 xu,
7190
7191 } = out_;
7192 }
7193
7194 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
7195
7196 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(xu.as_mut_ptr()) };
7197
7198 Ok(())
7199 }
7200 }
7201
7202 unsafe impl<___E>
7203 ::fidl_next::EncodeOption<
7204 ::fidl_next::wire::Box<'static, crate::wire::TestStrictResourceXUnionInStruct<'static>>,
7205 ___E,
7206 > for TestStrictResourceXUnionInStruct
7207 where
7208 ___E: ::fidl_next::Encoder + ?Sized,
7209 TestStrictResourceXUnionInStruct:
7210 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>,
7211 {
7212 #[inline]
7213 fn encode_option(
7214 this: ::core::option::Option<Self>,
7215 encoder: &mut ___E,
7216 out: &mut ::core::mem::MaybeUninit<
7217 ::fidl_next::wire::Box<
7218 'static,
7219 crate::wire::TestStrictResourceXUnionInStruct<'static>,
7220 >,
7221 >,
7222 _: (),
7223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7224 if let Some(inner) = this {
7225 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7226 ::fidl_next::wire::Box::encode_present(out);
7227 } else {
7228 ::fidl_next::wire::Box::encode_absent(out);
7229 }
7230
7231 Ok(())
7232 }
7233 }
7234
7235 impl<'de> ::fidl_next::FromWire<crate::wire::TestStrictResourceXUnionInStruct<'de>>
7236 for TestStrictResourceXUnionInStruct
7237 {
7238 #[inline]
7239 fn from_wire(wire: crate::wire::TestStrictResourceXUnionInStruct<'de>) -> Self {
7240 Self { xu: ::fidl_next::FromWire::from_wire(wire.xu) }
7241 }
7242 }
7243
7244 #[derive(Debug, PartialEq)]
7245 pub struct UnboundedNonnullableVectorOfHandles {
7246 pub vh0: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
7247 }
7248
7249 unsafe impl<___E>
7250 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
7251 for UnboundedNonnullableVectorOfHandles
7252 where
7253 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7254 ___E: ::fidl_next::Encoder,
7255 ___E: ::fidl_next::fuchsia::HandleEncoder,
7256 {
7257 #[inline]
7258 fn encode(
7259 self,
7260 encoder_: &mut ___E,
7261 out_: &mut ::core::mem::MaybeUninit<
7262 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
7263 >,
7264 _: (),
7265 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7266 ::fidl_next::munge! {
7267 let crate::wire::UnboundedNonnullableVectorOfHandles {
7268 vh0,
7269
7270 } = out_;
7271 }
7272
7273 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
7274
7275 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
7276 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
7277
7278 Ok(())
7279 }
7280 }
7281
7282 unsafe impl<___E>
7283 ::fidl_next::EncodeOption<
7284 ::fidl_next::wire::Box<
7285 'static,
7286 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
7287 >,
7288 ___E,
7289 > for UnboundedNonnullableVectorOfHandles
7290 where
7291 ___E: ::fidl_next::Encoder + ?Sized,
7292 UnboundedNonnullableVectorOfHandles:
7293 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>,
7294 {
7295 #[inline]
7296 fn encode_option(
7297 this: ::core::option::Option<Self>,
7298 encoder: &mut ___E,
7299 out: &mut ::core::mem::MaybeUninit<
7300 ::fidl_next::wire::Box<
7301 'static,
7302 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
7303 >,
7304 >,
7305 _: (),
7306 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7307 if let Some(inner) = this {
7308 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7309 ::fidl_next::wire::Box::encode_present(out);
7310 } else {
7311 ::fidl_next::wire::Box::encode_absent(out);
7312 }
7313
7314 Ok(())
7315 }
7316 }
7317
7318 impl<'de> ::fidl_next::FromWire<crate::wire::UnboundedNonnullableVectorOfHandles<'de>>
7319 for UnboundedNonnullableVectorOfHandles
7320 {
7321 #[inline]
7322 fn from_wire(wire: crate::wire::UnboundedNonnullableVectorOfHandles<'de>) -> Self {
7323 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
7324 }
7325 }
7326
7327 #[derive(Debug, PartialEq)]
7328 pub struct UnboundedNullableVectorOfHandles {
7329 pub vh0: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>>,
7330 }
7331
7332 unsafe impl<___E>
7333 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
7334 for UnboundedNullableVectorOfHandles
7335 where
7336 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7337 ___E: ::fidl_next::Encoder,
7338 ___E: ::fidl_next::fuchsia::HandleEncoder,
7339 {
7340 #[inline]
7341 fn encode(
7342 self,
7343 encoder_: &mut ___E,
7344 out_: &mut ::core::mem::MaybeUninit<
7345 crate::wire::UnboundedNullableVectorOfHandles<'static>,
7346 >,
7347 _: (),
7348 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7349 ::fidl_next::munge! {
7350 let crate::wire::UnboundedNullableVectorOfHandles {
7351 vh0,
7352
7353 } = out_;
7354 }
7355
7356 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
7357
7358 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vh0.as_mut_ptr()) };
7359 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
7360
7361 Ok(())
7362 }
7363 }
7364
7365 unsafe impl<___E>
7366 ::fidl_next::EncodeOption<
7367 ::fidl_next::wire::Box<'static, crate::wire::UnboundedNullableVectorOfHandles<'static>>,
7368 ___E,
7369 > for UnboundedNullableVectorOfHandles
7370 where
7371 ___E: ::fidl_next::Encoder + ?Sized,
7372 UnboundedNullableVectorOfHandles:
7373 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>,
7374 {
7375 #[inline]
7376 fn encode_option(
7377 this: ::core::option::Option<Self>,
7378 encoder: &mut ___E,
7379 out: &mut ::core::mem::MaybeUninit<
7380 ::fidl_next::wire::Box<
7381 'static,
7382 crate::wire::UnboundedNullableVectorOfHandles<'static>,
7383 >,
7384 >,
7385 _: (),
7386 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7387 if let Some(inner) = this {
7388 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7389 ::fidl_next::wire::Box::encode_present(out);
7390 } else {
7391 ::fidl_next::wire::Box::encode_absent(out);
7392 }
7393
7394 Ok(())
7395 }
7396 }
7397
7398 impl<'de> ::fidl_next::FromWire<crate::wire::UnboundedNullableVectorOfHandles<'de>>
7399 for UnboundedNullableVectorOfHandles
7400 {
7401 #[inline]
7402 fn from_wire(wire: crate::wire::UnboundedNullableVectorOfHandles<'de>) -> Self {
7403 Self { vh0: ::fidl_next::FromWire::from_wire(wire.vh0) }
7404 }
7405 }
7406
7407 #[derive(Debug, PartialEq)]
7408 pub enum UnionOfEndpointsUnion {
7409 ClientEnd(::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>),
7410
7411 ServerEnd(::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::fuchsia::zx::Channel>),
7412
7413 UnknownOrdinal_(u64),
7414 }
7415
7416 impl UnionOfEndpointsUnion {
7417 pub fn is_unknown(&self) -> bool {
7418 #[allow(unreachable_patterns)]
7419 match self {
7420 Self::UnknownOrdinal_(_) => true,
7421 _ => false,
7422 }
7423 }
7424 }
7425
7426 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>
7427 for UnionOfEndpointsUnion
7428 where
7429 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7430 ___E: ::fidl_next::Encoder,
7431 ___E: ::fidl_next::fuchsia::HandleEncoder,
7432 {
7433 #[inline]
7434 fn encode(
7435 self,
7436 encoder: &mut ___E,
7437 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpointsUnion<'static>>,
7438 _: (),
7439 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7440 ::fidl_next::munge!(let crate::wire::UnionOfEndpointsUnion { raw, _phantom: _ } = out);
7441
7442 match self {
7443 Self::ClientEnd(value) => ::fidl_next::wire::Union::encode_as::<
7444 ___E,
7445 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
7446 >(value, 1, encoder, raw, ())?,
7447
7448 Self::ServerEnd(value) => ::fidl_next::wire::Union::encode_as::<
7449 ___E,
7450 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
7451 >(value, 2, encoder, raw, ())?,
7452
7453 Self::UnknownOrdinal_(ordinal) => {
7454 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
7455 }
7456 }
7457
7458 Ok(())
7459 }
7460 }
7461
7462 unsafe impl<___E>
7463 ::fidl_next::EncodeOption<crate::wire_optional::UnionOfEndpointsUnion<'static>, ___E>
7464 for UnionOfEndpointsUnion
7465 where
7466 ___E: ?Sized,
7467 UnionOfEndpointsUnion:
7468 ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
7469 {
7470 #[inline]
7471 fn encode_option(
7472 this: ::core::option::Option<Self>,
7473 encoder: &mut ___E,
7474 out: &mut ::core::mem::MaybeUninit<
7475 crate::wire_optional::UnionOfEndpointsUnion<'static>,
7476 >,
7477 _: (),
7478 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7479 ::fidl_next::munge!(let crate::wire_optional::UnionOfEndpointsUnion { raw, _phantom: _ } = &mut *out);
7480
7481 if let Some(inner) = this {
7482 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7483 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7484 } else {
7485 ::fidl_next::wire::Union::encode_absent(raw);
7486 }
7487
7488 Ok(())
7489 }
7490 }
7491
7492 impl<'de> ::fidl_next::FromWire<crate::wire::UnionOfEndpointsUnion<'de>> for UnionOfEndpointsUnion {
7493 #[inline]
7494 fn from_wire(wire: crate::wire::UnionOfEndpointsUnion<'de>) -> Self {
7495 let wire = ::core::mem::ManuallyDrop::new(wire);
7496 match wire.raw.ordinal() {
7497 1 => Self::ClientEnd(::fidl_next::FromWire::from_wire(unsafe {
7498 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
7499 })),
7500
7501 2 => Self::ServerEnd(::fidl_next::FromWire::from_wire(unsafe {
7502 wire.raw.get().read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
7503 })),
7504
7505 ord => return Self::UnknownOrdinal_(ord as u64),
7506 }
7507 }
7508 }
7509
7510 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionOfEndpointsUnion<'de>>
7511 for UnionOfEndpointsUnion
7512 {
7513 #[inline]
7514 fn from_wire_option(
7515 wire: crate::wire_optional::UnionOfEndpointsUnion<'de>,
7516 ) -> ::core::option::Option<Self> {
7517 if let Some(inner) = wire.into_option() {
7518 Some(::fidl_next::FromWire::from_wire(inner))
7519 } else {
7520 None
7521 }
7522 }
7523 }
7524
7525 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::UnionOfEndpointsUnion<'de>>
7526 for Box<UnionOfEndpointsUnion>
7527 {
7528 #[inline]
7529 fn from_wire_option(
7530 wire: crate::wire_optional::UnionOfEndpointsUnion<'de>,
7531 ) -> ::core::option::Option<Self> {
7532 <UnionOfEndpointsUnion as ::fidl_next::FromWireOption<
7533 crate::wire_optional::UnionOfEndpointsUnion<'de>,
7534 >>::from_wire_option(wire)
7535 .map(Box::new)
7536 }
7537 }
7538
7539 #[derive(Debug, PartialEq)]
7540 pub struct UnionOfEndpoints {
7541 pub u: crate::natural::UnionOfEndpointsUnion,
7542 }
7543
7544 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
7545 for UnionOfEndpoints
7546 where
7547 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7548 ___E: ::fidl_next::Encoder,
7549 ___E: ::fidl_next::fuchsia::HandleEncoder,
7550 {
7551 #[inline]
7552 fn encode(
7553 self,
7554 encoder_: &mut ___E,
7555 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
7556 _: (),
7557 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7558 ::fidl_next::munge! {
7559 let crate::wire::UnionOfEndpoints {
7560 u,
7561
7562 } = out_;
7563 }
7564
7565 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
7566
7567 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
7568
7569 Ok(())
7570 }
7571 }
7572
7573 unsafe impl<___E>
7574 ::fidl_next::EncodeOption<
7575 ::fidl_next::wire::Box<'static, crate::wire::UnionOfEndpoints<'static>>,
7576 ___E,
7577 > for UnionOfEndpoints
7578 where
7579 ___E: ::fidl_next::Encoder + ?Sized,
7580 UnionOfEndpoints: ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>,
7581 {
7582 #[inline]
7583 fn encode_option(
7584 this: ::core::option::Option<Self>,
7585 encoder: &mut ___E,
7586 out: &mut ::core::mem::MaybeUninit<
7587 ::fidl_next::wire::Box<'static, crate::wire::UnionOfEndpoints<'static>>,
7588 >,
7589 _: (),
7590 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7591 if let Some(inner) = this {
7592 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7593 ::fidl_next::wire::Box::encode_present(out);
7594 } else {
7595 ::fidl_next::wire::Box::encode_absent(out);
7596 }
7597
7598 Ok(())
7599 }
7600 }
7601
7602 impl<'de> ::fidl_next::FromWire<crate::wire::UnionOfEndpoints<'de>> for UnionOfEndpoints {
7603 #[inline]
7604 fn from_wire(wire: crate::wire::UnionOfEndpoints<'de>) -> Self {
7605 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
7606 }
7607 }
7608
7609 #[derive(Debug, PartialEq)]
7610 pub enum UnionOfHandle {
7611 H(::fidl_next::fuchsia::zx::NullableHandle),
7612 }
7613
7614 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnionOfHandle, ___E> for UnionOfHandle
7615 where
7616 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7617 ___E: ::fidl_next::fuchsia::HandleEncoder,
7618 {
7619 #[inline]
7620 fn encode(
7621 self,
7622 encoder: &mut ___E,
7623 out: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfHandle>,
7624 _: (),
7625 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7626 ::fidl_next::munge!(let crate::wire::UnionOfHandle { raw, _phantom: _ } = out);
7627
7628 match self {
7629 Self::H(value) => ::fidl_next::wire::Union::encode_as_static::<
7630 ___E,
7631 ::fidl_next::wire::fuchsia::NullableHandle,
7632 >(value, 1, encoder, raw, ())?,
7633 }
7634
7635 Ok(())
7636 }
7637 }
7638
7639 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::UnionOfHandle, ___E>
7640 for UnionOfHandle
7641 where
7642 ___E: ?Sized,
7643 UnionOfHandle: ::fidl_next::Encode<crate::wire::UnionOfHandle, ___E>,
7644 {
7645 #[inline]
7646 fn encode_option(
7647 this: ::core::option::Option<Self>,
7648 encoder: &mut ___E,
7649 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::UnionOfHandle>,
7650 _: (),
7651 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7652 ::fidl_next::munge!(let crate::wire_optional::UnionOfHandle { raw, _phantom: _ } = &mut *out);
7653
7654 if let Some(inner) = this {
7655 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7656 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
7657 } else {
7658 ::fidl_next::wire::Union::encode_absent(raw);
7659 }
7660
7661 Ok(())
7662 }
7663 }
7664
7665 impl ::fidl_next::FromWire<crate::wire::UnionOfHandle> for UnionOfHandle {
7666 #[inline]
7667 fn from_wire(wire: crate::wire::UnionOfHandle) -> Self {
7668 let wire = ::core::mem::ManuallyDrop::new(wire);
7669 match wire.raw.ordinal() {
7670 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
7671 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
7672 })),
7673
7674 _ => unsafe { ::core::hint::unreachable_unchecked() },
7675 }
7676 }
7677 }
7678
7679 impl ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle> for UnionOfHandle {
7680 #[inline]
7681 fn from_wire_option(
7682 wire: crate::wire_optional::UnionOfHandle,
7683 ) -> ::core::option::Option<Self> {
7684 if let Some(inner) = wire.into_option() {
7685 Some(::fidl_next::FromWire::from_wire(inner))
7686 } else {
7687 None
7688 }
7689 }
7690 }
7691
7692 impl ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle> for Box<UnionOfHandle> {
7693 #[inline]
7694 fn from_wire_option(
7695 wire: crate::wire_optional::UnionOfHandle,
7696 ) -> ::core::option::Option<Self> {
7697 <
7698 UnionOfHandle as ::fidl_next::FromWireOption<crate::wire_optional::UnionOfHandle>
7699 >::from_wire_option(wire).map(Box::new)
7700 }
7701 }
7702
7703 #[derive(Debug, PartialEq)]
7704 pub struct VectorOfArrayOfEventInStructWithDefaultRights {
7705 pub h: ::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>,
7706 }
7707
7708 unsafe impl<___E>
7709 ::fidl_next::Encode<
7710 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7711 ___E,
7712 > for VectorOfArrayOfEventInStructWithDefaultRights
7713 where
7714 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7715 ___E: ::fidl_next::Encoder,
7716 ___E: ::fidl_next::fuchsia::HandleEncoder,
7717 {
7718 #[inline]
7719 fn encode(
7720 self,
7721 encoder_: &mut ___E,
7722 out_: &mut ::core::mem::MaybeUninit<
7723 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7724 >,
7725 _: (),
7726 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7727 ::fidl_next::munge! {
7728 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
7729 h,
7730
7731 } = out_;
7732 }
7733
7734 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
7735
7736 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
7737 ::fidl_next::Constrained::validate(_field, (1, ()))?;
7738
7739 Ok(())
7740 }
7741 }
7742
7743 unsafe impl<___E>
7744 ::fidl_next::EncodeOption<
7745 ::fidl_next::wire::Box<
7746 'static,
7747 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7748 >,
7749 ___E,
7750 > for VectorOfArrayOfEventInStructWithDefaultRights
7751 where
7752 ___E: ::fidl_next::Encoder + ?Sized,
7753 VectorOfArrayOfEventInStructWithDefaultRights: ::fidl_next::Encode<
7754 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7755 ___E,
7756 >,
7757 {
7758 #[inline]
7759 fn encode_option(
7760 this: ::core::option::Option<Self>,
7761 encoder: &mut ___E,
7762 out: &mut ::core::mem::MaybeUninit<
7763 ::fidl_next::wire::Box<
7764 'static,
7765 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
7766 >,
7767 >,
7768 _: (),
7769 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7770 if let Some(inner) = this {
7771 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7772 ::fidl_next::wire::Box::encode_present(out);
7773 } else {
7774 ::fidl_next::wire::Box::encode_absent(out);
7775 }
7776
7777 Ok(())
7778 }
7779 }
7780
7781 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'de>>
7782 for VectorOfArrayOfEventInStructWithDefaultRights
7783 {
7784 #[inline]
7785 fn from_wire(
7786 wire: crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'de>,
7787 ) -> Self {
7788 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
7789 }
7790 }
7791
7792 #[derive(Debug, PartialEq)]
7793 pub struct VectorOfArrayOfEventInStructWithReducedRights {
7794 pub h: ::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>,
7795 }
7796
7797 unsafe impl<___E>
7798 ::fidl_next::Encode<
7799 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7800 ___E,
7801 > for VectorOfArrayOfEventInStructWithReducedRights
7802 where
7803 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7804 ___E: ::fidl_next::Encoder,
7805 ___E: ::fidl_next::fuchsia::HandleEncoder,
7806 {
7807 #[inline]
7808 fn encode(
7809 self,
7810 encoder_: &mut ___E,
7811 out_: &mut ::core::mem::MaybeUninit<
7812 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7813 >,
7814 _: (),
7815 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7816 ::fidl_next::munge! {
7817 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
7818 h,
7819
7820 } = out_;
7821 }
7822
7823 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
7824
7825 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(h.as_mut_ptr()) };
7826 ::fidl_next::Constrained::validate(_field, (1, ()))?;
7827
7828 Ok(())
7829 }
7830 }
7831
7832 unsafe impl<___E>
7833 ::fidl_next::EncodeOption<
7834 ::fidl_next::wire::Box<
7835 'static,
7836 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7837 >,
7838 ___E,
7839 > for VectorOfArrayOfEventInStructWithReducedRights
7840 where
7841 ___E: ::fidl_next::Encoder + ?Sized,
7842 VectorOfArrayOfEventInStructWithReducedRights: ::fidl_next::Encode<
7843 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7844 ___E,
7845 >,
7846 {
7847 #[inline]
7848 fn encode_option(
7849 this: ::core::option::Option<Self>,
7850 encoder: &mut ___E,
7851 out: &mut ::core::mem::MaybeUninit<
7852 ::fidl_next::wire::Box<
7853 'static,
7854 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
7855 >,
7856 >,
7857 _: (),
7858 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7859 if let Some(inner) = this {
7860 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7861 ::fidl_next::wire::Box::encode_present(out);
7862 } else {
7863 ::fidl_next::wire::Box::encode_absent(out);
7864 }
7865
7866 Ok(())
7867 }
7868 }
7869
7870 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'de>>
7871 for VectorOfArrayOfEventInStructWithReducedRights
7872 {
7873 #[inline]
7874 fn from_wire(
7875 wire: crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'de>,
7876 ) -> Self {
7877 Self { h: ::fidl_next::FromWire::from_wire(wire.h) }
7878 }
7879 }
7880
7881 #[derive(Debug, Default, PartialEq)]
7882 pub struct VectorOfArrayOfEventInTableWithReducedRights {
7883 pub h: ::core::option::Option<::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>>,
7884 }
7885
7886 impl VectorOfArrayOfEventInTableWithReducedRights {
7887 fn __max_ordinal(&self) -> usize {
7888 if self.h.is_some() {
7889 return 1;
7890 }
7891
7892 0
7893 }
7894 }
7895
7896 unsafe impl<___E>
7897 ::fidl_next::Encode<
7898 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
7899 ___E,
7900 > for VectorOfArrayOfEventInTableWithReducedRights
7901 where
7902 ___E: ::fidl_next::Encoder + ?Sized,
7903 ___E: ::fidl_next::fuchsia::HandleEncoder,
7904 {
7905 #[inline]
7906 fn encode(
7907 mut self,
7908 encoder: &mut ___E,
7909 out: &mut ::core::mem::MaybeUninit<
7910 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
7911 >,
7912 _: (),
7913 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7914 ::fidl_next::munge!(let crate::wire::VectorOfArrayOfEventInTableWithReducedRights { table } = out);
7915
7916 let max_ord = self.__max_ordinal();
7917
7918 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7919 ::fidl_next::Wire::zero_padding(&mut out);
7920
7921 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7922 ::fidl_next::wire::Envelope,
7923 >(encoder, max_ord);
7924
7925 for i in 1..=max_ord {
7926 match i {
7927 1 => {
7928 if let Some(value) = self.h.take() {
7929 ::fidl_next::wire::Envelope::encode_value::<
7930 ::fidl_next::wire::Vector<
7931 'static,
7932 [::fidl_next::wire::fuchsia::Event; 1],
7933 >,
7934 ___E,
7935 >(
7936 value, preallocated.encoder, &mut out, (1, ())
7937 )?;
7938 } else {
7939 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7940 }
7941 }
7942
7943 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7944 }
7945 unsafe {
7946 preallocated.write_next(out.assume_init_ref());
7947 }
7948 }
7949
7950 ::fidl_next::wire::Table::encode_len(table, max_ord);
7951
7952 Ok(())
7953 }
7954 }
7955
7956 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>>
7957 for VectorOfArrayOfEventInTableWithReducedRights
7958 {
7959 #[inline]
7960 fn from_wire(
7961 wire_: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
7962 ) -> Self {
7963 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7964
7965 let h = wire_.table.get(1);
7966
7967 Self {
7968 h: h.map(|envelope| {
7969 ::fidl_next::FromWire::from_wire(unsafe {
7970 envelope.read_unchecked::<::fidl_next::wire::Vector<
7971 'de,
7972 [::fidl_next::wire::fuchsia::Event; 1],
7973 >>()
7974 })
7975 }),
7976 }
7977 }
7978 }
7979
7980 #[derive(Debug, PartialEq)]
7981 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct {
7982 pub t: crate::natural::VectorOfArrayOfEventInTableWithReducedRights,
7983 }
7984
7985 unsafe impl<___E>
7986 ::fidl_next::Encode<
7987 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
7988 ___E,
7989 > for VectorOfArrayOfEventInTableWithReducedRightsStruct
7990 where
7991 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7992 ___E: ::fidl_next::Encoder,
7993 ___E: ::fidl_next::fuchsia::HandleEncoder,
7994 {
7995 #[inline]
7996 fn encode(
7997 self,
7998 encoder_: &mut ___E,
7999 out_: &mut ::core::mem::MaybeUninit<
8000 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
8001 >,
8002 _: (),
8003 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8004 ::fidl_next::munge! {
8005 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
8006 t,
8007
8008 } = out_;
8009 }
8010
8011 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
8012
8013 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(t.as_mut_ptr()) };
8014
8015 Ok(())
8016 }
8017 }
8018
8019 unsafe impl<___E>
8020 ::fidl_next::EncodeOption<
8021 ::fidl_next::wire::Box<
8022 'static,
8023 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
8024 >,
8025 ___E,
8026 > for VectorOfArrayOfEventInTableWithReducedRightsStruct
8027 where
8028 ___E: ::fidl_next::Encoder + ?Sized,
8029 VectorOfArrayOfEventInTableWithReducedRightsStruct: ::fidl_next::Encode<
8030 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
8031 ___E,
8032 >,
8033 {
8034 #[inline]
8035 fn encode_option(
8036 this: ::core::option::Option<Self>,
8037 encoder: &mut ___E,
8038 out: &mut ::core::mem::MaybeUninit<
8039 ::fidl_next::wire::Box<
8040 'static,
8041 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
8042 >,
8043 >,
8044 _: (),
8045 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8046 if let Some(inner) = this {
8047 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8048 ::fidl_next::wire::Box::encode_present(out);
8049 } else {
8050 ::fidl_next::wire::Box::encode_absent(out);
8051 }
8052
8053 Ok(())
8054 }
8055 }
8056
8057 impl<'de>
8058 ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>>
8059 for VectorOfArrayOfEventInTableWithReducedRightsStruct
8060 {
8061 #[inline]
8062 fn from_wire(
8063 wire: crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>,
8064 ) -> Self {
8065 Self { t: ::fidl_next::FromWire::from_wire(wire.t) }
8066 }
8067 }
8068
8069 #[derive(Debug, PartialEq)]
8070 pub enum VectorOfArrayOfEventInUnionWithReducedRights {
8071 H(::std::vec::Vec<[::fidl_next::fuchsia::zx::Event; 1]>),
8072 }
8073
8074 unsafe impl<___E>
8075 ::fidl_next::Encode<
8076 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8077 ___E,
8078 > for VectorOfArrayOfEventInUnionWithReducedRights
8079 where
8080 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8081 ___E: ::fidl_next::Encoder,
8082 ___E: ::fidl_next::fuchsia::HandleEncoder,
8083 {
8084 #[inline]
8085 fn encode(
8086 self,
8087 encoder: &mut ___E,
8088 out: &mut ::core::mem::MaybeUninit<
8089 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8090 >,
8091 _: (),
8092 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8093 ::fidl_next::munge!(let crate::wire::VectorOfArrayOfEventInUnionWithReducedRights { raw, _phantom: _ } = out);
8094
8095 match self {
8096 Self::H(value) => ::fidl_next::wire::Union::encode_as::<
8097 ___E,
8098 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
8099 >(value, 1, encoder, raw, (1, ()))?,
8100 }
8101
8102 Ok(())
8103 }
8104 }
8105
8106 unsafe impl<___E>
8107 ::fidl_next::EncodeOption<
8108 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8109 ___E,
8110 > for VectorOfArrayOfEventInUnionWithReducedRights
8111 where
8112 ___E: ?Sized,
8113 VectorOfArrayOfEventInUnionWithReducedRights: ::fidl_next::Encode<
8114 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8115 ___E,
8116 >,
8117 {
8118 #[inline]
8119 fn encode_option(
8120 this: ::core::option::Option<Self>,
8121 encoder: &mut ___E,
8122 out: &mut ::core::mem::MaybeUninit<
8123 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
8124 >,
8125 _: (),
8126 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8127 ::fidl_next::munge!(let crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights { raw, _phantom: _ } = &mut *out);
8128
8129 if let Some(inner) = this {
8130 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
8131 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
8132 } else {
8133 ::fidl_next::wire::Union::encode_absent(raw);
8134 }
8135
8136 Ok(())
8137 }
8138 }
8139
8140 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
8141 for VectorOfArrayOfEventInUnionWithReducedRights
8142 {
8143 #[inline]
8144 fn from_wire(wire: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>) -> Self {
8145 let wire = ::core::mem::ManuallyDrop::new(wire);
8146 match wire.raw.ordinal() {
8147 1 => Self::H(::fidl_next::FromWire::from_wire(unsafe {
8148 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
8149 })),
8150
8151 _ => unsafe { ::core::hint::unreachable_unchecked() },
8152 }
8153 }
8154 }
8155
8156 impl<'de>
8157 ::fidl_next::FromWireOption<
8158 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8159 > for VectorOfArrayOfEventInUnionWithReducedRights
8160 {
8161 #[inline]
8162 fn from_wire_option(
8163 wire: crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8164 ) -> ::core::option::Option<Self> {
8165 if let Some(inner) = wire.into_option() {
8166 Some(::fidl_next::FromWire::from_wire(inner))
8167 } else {
8168 None
8169 }
8170 }
8171 }
8172
8173 impl<'de>
8174 ::fidl_next::FromWireOption<
8175 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8176 > for Box<VectorOfArrayOfEventInUnionWithReducedRights>
8177 {
8178 #[inline]
8179 fn from_wire_option(
8180 wire: crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8181 ) -> ::core::option::Option<Self> {
8182 <VectorOfArrayOfEventInUnionWithReducedRights as ::fidl_next::FromWireOption<
8183 crate::wire_optional::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
8184 >>::from_wire_option(wire)
8185 .map(Box::new)
8186 }
8187 }
8188
8189 #[derive(Debug, PartialEq)]
8190 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct {
8191 pub u: crate::natural::VectorOfArrayOfEventInUnionWithReducedRights,
8192 }
8193
8194 unsafe impl<___E>
8195 ::fidl_next::Encode<
8196 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8197 ___E,
8198 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct
8199 where
8200 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8201 ___E: ::fidl_next::Encoder,
8202 ___E: ::fidl_next::fuchsia::HandleEncoder,
8203 {
8204 #[inline]
8205 fn encode(
8206 self,
8207 encoder_: &mut ___E,
8208 out_: &mut ::core::mem::MaybeUninit<
8209 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8210 >,
8211 _: (),
8212 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8213 ::fidl_next::munge! {
8214 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
8215 u,
8216
8217 } = out_;
8218 }
8219
8220 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
8221
8222 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(u.as_mut_ptr()) };
8223
8224 Ok(())
8225 }
8226 }
8227
8228 unsafe impl<___E>
8229 ::fidl_next::EncodeOption<
8230 ::fidl_next::wire::Box<
8231 'static,
8232 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8233 >,
8234 ___E,
8235 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct
8236 where
8237 ___E: ::fidl_next::Encoder + ?Sized,
8238 VectorOfArrayOfEventInUnionWithReducedRightsStruct: ::fidl_next::Encode<
8239 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8240 ___E,
8241 >,
8242 {
8243 #[inline]
8244 fn encode_option(
8245 this: ::core::option::Option<Self>,
8246 encoder: &mut ___E,
8247 out: &mut ::core::mem::MaybeUninit<
8248 ::fidl_next::wire::Box<
8249 'static,
8250 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
8251 >,
8252 >,
8253 _: (),
8254 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8255 if let Some(inner) = this {
8256 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8257 ::fidl_next::wire::Box::encode_present(out);
8258 } else {
8259 ::fidl_next::wire::Box::encode_absent(out);
8260 }
8261
8262 Ok(())
8263 }
8264 }
8265
8266 impl<'de>
8267 ::fidl_next::FromWire<crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>>
8268 for VectorOfArrayOfEventInUnionWithReducedRightsStruct
8269 {
8270 #[inline]
8271 fn from_wire(
8272 wire: crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>,
8273 ) -> Self {
8274 Self { u: ::fidl_next::FromWire::from_wire(wire.u) }
8275 }
8276 }
8277
8278 #[derive(Debug, PartialEq)]
8279 pub struct VectorOfHandles {
8280 pub v: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
8281 }
8282
8283 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
8284 for VectorOfHandles
8285 where
8286 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8287 ___E: ::fidl_next::Encoder,
8288 ___E: ::fidl_next::fuchsia::HandleEncoder,
8289 {
8290 #[inline]
8291 fn encode(
8292 self,
8293 encoder_: &mut ___E,
8294 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
8295 _: (),
8296 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8297 ::fidl_next::munge! {
8298 let crate::wire::VectorOfHandles {
8299 v,
8300
8301 } = out_;
8302 }
8303
8304 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
8305
8306 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8307 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
8308
8309 Ok(())
8310 }
8311 }
8312
8313 unsafe impl<___E>
8314 ::fidl_next::EncodeOption<
8315 ::fidl_next::wire::Box<'static, crate::wire::VectorOfHandles<'static>>,
8316 ___E,
8317 > for VectorOfHandles
8318 where
8319 ___E: ::fidl_next::Encoder + ?Sized,
8320 VectorOfHandles: ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>,
8321 {
8322 #[inline]
8323 fn encode_option(
8324 this: ::core::option::Option<Self>,
8325 encoder: &mut ___E,
8326 out: &mut ::core::mem::MaybeUninit<
8327 ::fidl_next::wire::Box<'static, crate::wire::VectorOfHandles<'static>>,
8328 >,
8329 _: (),
8330 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8331 if let Some(inner) = this {
8332 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8333 ::fidl_next::wire::Box::encode_present(out);
8334 } else {
8335 ::fidl_next::wire::Box::encode_absent(out);
8336 }
8337
8338 Ok(())
8339 }
8340 }
8341
8342 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfHandles<'de>> for VectorOfHandles {
8343 #[inline]
8344 fn from_wire(wire: crate::wire::VectorOfHandles<'de>) -> Self {
8345 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8346 }
8347 }
8348
8349 #[derive(Debug, PartialEq)]
8350 pub struct VectorOfOptionalHandles {
8351 pub v: ::std::vec::Vec<::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>>,
8352 }
8353
8354 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
8355 for VectorOfOptionalHandles
8356 where
8357 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8358 ___E: ::fidl_next::Encoder,
8359 ___E: ::fidl_next::fuchsia::HandleEncoder,
8360 {
8361 #[inline]
8362 fn encode(
8363 self,
8364 encoder_: &mut ___E,
8365 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
8366 _: (),
8367 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8368 ::fidl_next::munge! {
8369 let crate::wire::VectorOfOptionalHandles {
8370 v,
8371
8372 } = out_;
8373 }
8374
8375 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
8376
8377 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8378 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
8379
8380 Ok(())
8381 }
8382 }
8383
8384 unsafe impl<___E>
8385 ::fidl_next::EncodeOption<
8386 ::fidl_next::wire::Box<'static, crate::wire::VectorOfOptionalHandles<'static>>,
8387 ___E,
8388 > for VectorOfOptionalHandles
8389 where
8390 ___E: ::fidl_next::Encoder + ?Sized,
8391 VectorOfOptionalHandles:
8392 ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>,
8393 {
8394 #[inline]
8395 fn encode_option(
8396 this: ::core::option::Option<Self>,
8397 encoder: &mut ___E,
8398 out: &mut ::core::mem::MaybeUninit<
8399 ::fidl_next::wire::Box<'static, crate::wire::VectorOfOptionalHandles<'static>>,
8400 >,
8401 _: (),
8402 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8403 if let Some(inner) = this {
8404 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8405 ::fidl_next::wire::Box::encode_present(out);
8406 } else {
8407 ::fidl_next::wire::Box::encode_absent(out);
8408 }
8409
8410 Ok(())
8411 }
8412 }
8413
8414 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfOptionalHandles<'de>>
8415 for VectorOfOptionalHandles
8416 {
8417 #[inline]
8418 fn from_wire(wire: crate::wire::VectorOfOptionalHandles<'de>) -> Self {
8419 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8420 }
8421 }
8422
8423 #[derive(Debug, PartialEq)]
8424 pub struct VectorOfUpTo2Handles {
8425 pub v: ::std::vec::Vec<::fidl_next::fuchsia::zx::NullableHandle>,
8426 }
8427
8428 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
8429 for VectorOfUpTo2Handles
8430 where
8431 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8432 ___E: ::fidl_next::Encoder,
8433 ___E: ::fidl_next::fuchsia::HandleEncoder,
8434 {
8435 #[inline]
8436 fn encode(
8437 self,
8438 encoder_: &mut ___E,
8439 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
8440 _: (),
8441 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8442 ::fidl_next::munge! {
8443 let crate::wire::VectorOfUpTo2Handles {
8444 v,
8445
8446 } = out_;
8447 }
8448
8449 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
8450
8451 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(v.as_mut_ptr()) };
8452 ::fidl_next::Constrained::validate(_field, (2, ()))?;
8453
8454 Ok(())
8455 }
8456 }
8457
8458 unsafe impl<___E>
8459 ::fidl_next::EncodeOption<
8460 ::fidl_next::wire::Box<'static, crate::wire::VectorOfUpTo2Handles<'static>>,
8461 ___E,
8462 > for VectorOfUpTo2Handles
8463 where
8464 ___E: ::fidl_next::Encoder + ?Sized,
8465 VectorOfUpTo2Handles: ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>,
8466 {
8467 #[inline]
8468 fn encode_option(
8469 this: ::core::option::Option<Self>,
8470 encoder: &mut ___E,
8471 out: &mut ::core::mem::MaybeUninit<
8472 ::fidl_next::wire::Box<'static, crate::wire::VectorOfUpTo2Handles<'static>>,
8473 >,
8474 _: (),
8475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8476 if let Some(inner) = this {
8477 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8478 ::fidl_next::wire::Box::encode_present(out);
8479 } else {
8480 ::fidl_next::wire::Box::encode_absent(out);
8481 }
8482
8483 Ok(())
8484 }
8485 }
8486
8487 impl<'de> ::fidl_next::FromWire<crate::wire::VectorOfUpTo2Handles<'de>> for VectorOfUpTo2Handles {
8488 #[inline]
8489 fn from_wire(wire: crate::wire::VectorOfUpTo2Handles<'de>) -> Self {
8490 Self { v: ::fidl_next::FromWire::from_wire(wire.v) }
8491 }
8492 }
8493}
8494
8495pub mod wire {
8496
8497 pub use fidl_next_common_test_conformance::wire::*;
8498
8499 #[derive(Debug)]
8501 #[repr(C)]
8502 pub struct AlternatingHandlesAndFailures<'de> {
8503 pub h1: ::fidl_next::wire::fuchsia::NullableHandle,
8504
8505 pub failure_trigger1: ::fidl_next::wire::String<'de>,
8506
8507 pub h2: ::fidl_next::wire::fuchsia::NullableHandle,
8508
8509 pub failure_trigger2: ::fidl_next::wire::String<'de>,
8510
8511 pub h3: ::fidl_next::wire::fuchsia::NullableHandle,
8512 }
8513
8514 static_assertions::const_assert_eq!(
8515 std::mem::size_of::<AlternatingHandlesAndFailures<'_>>(),
8516 56
8517 );
8518 static_assertions::const_assert_eq!(
8519 std::mem::align_of::<AlternatingHandlesAndFailures<'_>>(),
8520 8
8521 );
8522
8523 static_assertions::const_assert_eq!(
8524 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h1),
8525 0
8526 );
8527
8528 static_assertions::const_assert_eq!(
8529 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, failure_trigger1),
8530 8
8531 );
8532
8533 static_assertions::const_assert_eq!(
8534 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h2),
8535 24
8536 );
8537
8538 static_assertions::const_assert_eq!(
8539 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, failure_trigger2),
8540 32
8541 );
8542
8543 static_assertions::const_assert_eq!(
8544 std::mem::offset_of!(AlternatingHandlesAndFailures<'_>, h3),
8545 48
8546 );
8547
8548 impl ::fidl_next::Constrained for AlternatingHandlesAndFailures<'_> {
8549 type Constraint = ();
8550
8551 fn validate(
8552 _: ::fidl_next::Slot<'_, Self>,
8553 _: Self::Constraint,
8554 ) -> Result<(), ::fidl_next::ValidationError> {
8555 Ok(())
8556 }
8557 }
8558
8559 unsafe impl ::fidl_next::Wire for AlternatingHandlesAndFailures<'static> {
8560 type Narrowed<'de> = AlternatingHandlesAndFailures<'de>;
8561
8562 #[inline]
8563 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8564 ::fidl_next::munge! {
8565 let Self {
8566 h1,
8567 failure_trigger1,
8568 h2,
8569 failure_trigger2,
8570 h3,
8571
8572 } = &mut *out_;
8573 }
8574
8575 ::fidl_next::Wire::zero_padding(h1);
8576
8577 ::fidl_next::Wire::zero_padding(failure_trigger1);
8578
8579 ::fidl_next::Wire::zero_padding(h2);
8580
8581 ::fidl_next::Wire::zero_padding(failure_trigger2);
8582
8583 ::fidl_next::Wire::zero_padding(h3);
8584
8585 unsafe {
8586 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
8587 }
8588
8589 unsafe {
8590 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
8591 }
8592
8593 unsafe {
8594 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
8595 }
8596 }
8597 }
8598
8599 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AlternatingHandlesAndFailures<'de>
8600 where
8601 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8602 ___D: ::fidl_next::Decoder<'de>,
8603 ___D: ::fidl_next::fuchsia::HandleDecoder,
8604 {
8605 fn decode(
8606 slot_: ::fidl_next::Slot<'_, Self>,
8607 decoder_: &mut ___D,
8608 _: (),
8609 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8610 if slot_.as_bytes()[52..56] != [0u8; 4] {
8611 return Err(::fidl_next::DecodeError::InvalidPadding);
8612 }
8613
8614 if slot_.as_bytes()[28..32] != [0u8; 4] {
8615 return Err(::fidl_next::DecodeError::InvalidPadding);
8616 }
8617
8618 if slot_.as_bytes()[4..8] != [0u8; 4] {
8619 return Err(::fidl_next::DecodeError::InvalidPadding);
8620 }
8621
8622 ::fidl_next::munge! {
8623 let Self {
8624 mut h1,
8625 mut failure_trigger1,
8626 mut h2,
8627 mut failure_trigger2,
8628 mut h3,
8629
8630 } = slot_;
8631 }
8632
8633 let _field = h1.as_mut();
8634
8635 ::fidl_next::Decode::decode(h1.as_mut(), decoder_, ())?;
8636
8637 let _field = failure_trigger1.as_mut();
8638 ::fidl_next::Constrained::validate(_field, 1)?;
8639 ::fidl_next::Decode::decode(failure_trigger1.as_mut(), decoder_, 1)?;
8640
8641 let failure_trigger1 = unsafe { failure_trigger1.deref_unchecked() };
8642
8643 if failure_trigger1.len() > 1 {
8644 return Err(::fidl_next::DecodeError::VectorTooLong {
8645 size: failure_trigger1.len() as u64,
8646 limit: 1,
8647 });
8648 }
8649
8650 let _field = h2.as_mut();
8651
8652 ::fidl_next::Decode::decode(h2.as_mut(), decoder_, ())?;
8653
8654 let _field = failure_trigger2.as_mut();
8655 ::fidl_next::Constrained::validate(_field, 1)?;
8656 ::fidl_next::Decode::decode(failure_trigger2.as_mut(), decoder_, 1)?;
8657
8658 let failure_trigger2 = unsafe { failure_trigger2.deref_unchecked() };
8659
8660 if failure_trigger2.len() > 1 {
8661 return Err(::fidl_next::DecodeError::VectorTooLong {
8662 size: failure_trigger2.len() as u64,
8663 limit: 1,
8664 });
8665 }
8666
8667 let _field = h3.as_mut();
8668
8669 ::fidl_next::Decode::decode(h3.as_mut(), decoder_, ())?;
8670
8671 Ok(())
8672 }
8673 }
8674
8675 impl<'de> ::fidl_next::IntoNatural for AlternatingHandlesAndFailures<'de> {
8676 type Natural = crate::natural::AlternatingHandlesAndFailures;
8677 }
8678
8679 #[derive(Debug)]
8681 #[repr(C)]
8682 pub struct ArrayOfArrayOfNonnullableHandles {
8683 pub handles: [[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4],
8684 }
8685
8686 static_assertions::const_assert_eq!(
8687 std::mem::size_of::<ArrayOfArrayOfNonnullableHandles>(),
8688 48
8689 );
8690 static_assertions::const_assert_eq!(
8691 std::mem::align_of::<ArrayOfArrayOfNonnullableHandles>(),
8692 4
8693 );
8694
8695 static_assertions::const_assert_eq!(
8696 std::mem::offset_of!(ArrayOfArrayOfNonnullableHandles, handles),
8697 0
8698 );
8699
8700 impl ::fidl_next::Constrained for ArrayOfArrayOfNonnullableHandles {
8701 type Constraint = ();
8702
8703 fn validate(
8704 _: ::fidl_next::Slot<'_, Self>,
8705 _: Self::Constraint,
8706 ) -> Result<(), ::fidl_next::ValidationError> {
8707 Ok(())
8708 }
8709 }
8710
8711 unsafe impl ::fidl_next::Wire for ArrayOfArrayOfNonnullableHandles {
8712 type Narrowed<'de> = ArrayOfArrayOfNonnullableHandles;
8713
8714 #[inline]
8715 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8716 ::fidl_next::munge! {
8717 let Self {
8718 handles,
8719
8720 } = &mut *out_;
8721 }
8722
8723 ::fidl_next::Wire::zero_padding(handles);
8724 }
8725 }
8726
8727 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfArrayOfNonnullableHandles
8728 where
8729 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8730 ___D: ::fidl_next::fuchsia::HandleDecoder,
8731 {
8732 fn decode(
8733 slot_: ::fidl_next::Slot<'_, Self>,
8734 decoder_: &mut ___D,
8735 _: (),
8736 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8737 ::fidl_next::munge! {
8738 let Self {
8739 mut handles,
8740
8741 } = slot_;
8742 }
8743
8744 let _field = handles.as_mut();
8745
8746 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8747
8748 Ok(())
8749 }
8750 }
8751
8752 impl ::fidl_next::IntoNatural for ArrayOfArrayOfNonnullableHandles {
8753 type Natural = crate::natural::ArrayOfArrayOfNonnullableHandles;
8754 }
8755
8756 #[derive(Debug)]
8758 #[repr(C)]
8759 pub struct ArrayOfHandles {
8760 pub a: [::fidl_next::wire::fuchsia::NullableHandle; 3],
8761 }
8762
8763 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfHandles>(), 12);
8764 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfHandles>(), 4);
8765
8766 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfHandles, a), 0);
8767
8768 impl ::fidl_next::Constrained for ArrayOfHandles {
8769 type Constraint = ();
8770
8771 fn validate(
8772 _: ::fidl_next::Slot<'_, Self>,
8773 _: Self::Constraint,
8774 ) -> Result<(), ::fidl_next::ValidationError> {
8775 Ok(())
8776 }
8777 }
8778
8779 unsafe impl ::fidl_next::Wire for ArrayOfHandles {
8780 type Narrowed<'de> = ArrayOfHandles;
8781
8782 #[inline]
8783 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8784 ::fidl_next::munge! {
8785 let Self {
8786 a,
8787
8788 } = &mut *out_;
8789 }
8790
8791 ::fidl_next::Wire::zero_padding(a);
8792 }
8793 }
8794
8795 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfHandles
8796 where
8797 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8798 ___D: ::fidl_next::fuchsia::HandleDecoder,
8799 {
8800 fn decode(
8801 slot_: ::fidl_next::Slot<'_, Self>,
8802 decoder_: &mut ___D,
8803 _: (),
8804 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8805 ::fidl_next::munge! {
8806 let Self {
8807 mut a,
8808
8809 } = slot_;
8810 }
8811
8812 let _field = a.as_mut();
8813
8814 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
8815
8816 Ok(())
8817 }
8818 }
8819
8820 impl ::fidl_next::IntoNatural for ArrayOfHandles {
8821 type Natural = crate::natural::ArrayOfHandles;
8822 }
8823
8824 #[derive(Debug)]
8826 #[repr(C)]
8827 pub struct ArrayOfNonnullableHandles {
8828 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
8829 }
8830
8831 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNonnullableHandles>(), 16);
8832 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNonnullableHandles>(), 4);
8833
8834 static_assertions::const_assert_eq!(
8835 std::mem::offset_of!(ArrayOfNonnullableHandles, handles),
8836 0
8837 );
8838
8839 impl ::fidl_next::Constrained for ArrayOfNonnullableHandles {
8840 type Constraint = ();
8841
8842 fn validate(
8843 _: ::fidl_next::Slot<'_, Self>,
8844 _: Self::Constraint,
8845 ) -> Result<(), ::fidl_next::ValidationError> {
8846 Ok(())
8847 }
8848 }
8849
8850 unsafe impl ::fidl_next::Wire for ArrayOfNonnullableHandles {
8851 type Narrowed<'de> = ArrayOfNonnullableHandles;
8852
8853 #[inline]
8854 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8855 ::fidl_next::munge! {
8856 let Self {
8857 handles,
8858
8859 } = &mut *out_;
8860 }
8861
8862 ::fidl_next::Wire::zero_padding(handles);
8863 }
8864 }
8865
8866 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNonnullableHandles
8867 where
8868 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8869 ___D: ::fidl_next::fuchsia::HandleDecoder,
8870 {
8871 fn decode(
8872 slot_: ::fidl_next::Slot<'_, Self>,
8873 decoder_: &mut ___D,
8874 _: (),
8875 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8876 ::fidl_next::munge! {
8877 let Self {
8878 mut handles,
8879
8880 } = slot_;
8881 }
8882
8883 let _field = handles.as_mut();
8884
8885 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8886
8887 Ok(())
8888 }
8889 }
8890
8891 impl ::fidl_next::IntoNatural for ArrayOfNonnullableHandles {
8892 type Natural = crate::natural::ArrayOfNonnullableHandles;
8893 }
8894
8895 #[derive(Debug)]
8897 #[repr(C)]
8898 pub struct ArrayOfNullableHandles {
8899 pub handles: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 5],
8900 }
8901
8902 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfNullableHandles>(), 20);
8903 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfNullableHandles>(), 4);
8904
8905 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfNullableHandles, handles), 0);
8906
8907 impl ::fidl_next::Constrained for ArrayOfNullableHandles {
8908 type Constraint = ();
8909
8910 fn validate(
8911 _: ::fidl_next::Slot<'_, Self>,
8912 _: Self::Constraint,
8913 ) -> Result<(), ::fidl_next::ValidationError> {
8914 Ok(())
8915 }
8916 }
8917
8918 unsafe impl ::fidl_next::Wire for ArrayOfNullableHandles {
8919 type Narrowed<'de> = ArrayOfNullableHandles;
8920
8921 #[inline]
8922 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8923 ::fidl_next::munge! {
8924 let Self {
8925 handles,
8926
8927 } = &mut *out_;
8928 }
8929
8930 ::fidl_next::Wire::zero_padding(handles);
8931 }
8932 }
8933
8934 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfNullableHandles
8935 where
8936 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8937 ___D: ::fidl_next::fuchsia::HandleDecoder,
8938 {
8939 fn decode(
8940 slot_: ::fidl_next::Slot<'_, Self>,
8941 decoder_: &mut ___D,
8942 _: (),
8943 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8944 ::fidl_next::munge! {
8945 let Self {
8946 mut handles,
8947
8948 } = slot_;
8949 }
8950
8951 let _field = handles.as_mut();
8952
8953 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
8954
8955 Ok(())
8956 }
8957 }
8958
8959 impl ::fidl_next::IntoNatural for ArrayOfNullableHandles {
8960 type Natural = crate::natural::ArrayOfNullableHandles;
8961 }
8962
8963 #[derive(Debug)]
8965 #[repr(C)]
8966 pub struct ArrayOfOptionalHandles {
8967 pub a: [::fidl_next::wire::fuchsia::OptionalNullableHandle; 3],
8968 }
8969
8970 static_assertions::const_assert_eq!(std::mem::size_of::<ArrayOfOptionalHandles>(), 12);
8971 static_assertions::const_assert_eq!(std::mem::align_of::<ArrayOfOptionalHandles>(), 4);
8972
8973 static_assertions::const_assert_eq!(std::mem::offset_of!(ArrayOfOptionalHandles, a), 0);
8974
8975 impl ::fidl_next::Constrained for ArrayOfOptionalHandles {
8976 type Constraint = ();
8977
8978 fn validate(
8979 _: ::fidl_next::Slot<'_, Self>,
8980 _: Self::Constraint,
8981 ) -> Result<(), ::fidl_next::ValidationError> {
8982 Ok(())
8983 }
8984 }
8985
8986 unsafe impl ::fidl_next::Wire for ArrayOfOptionalHandles {
8987 type Narrowed<'de> = ArrayOfOptionalHandles;
8988
8989 #[inline]
8990 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8991 ::fidl_next::munge! {
8992 let Self {
8993 a,
8994
8995 } = &mut *out_;
8996 }
8997
8998 ::fidl_next::Wire::zero_padding(a);
8999 }
9000 }
9001
9002 unsafe impl<___D> ::fidl_next::Decode<___D> for ArrayOfOptionalHandles
9003 where
9004 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9005 ___D: ::fidl_next::fuchsia::HandleDecoder,
9006 {
9007 fn decode(
9008 slot_: ::fidl_next::Slot<'_, Self>,
9009 decoder_: &mut ___D,
9010 _: (),
9011 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9012 ::fidl_next::munge! {
9013 let Self {
9014 mut a,
9015
9016 } = slot_;
9017 }
9018
9019 let _field = a.as_mut();
9020
9021 ::fidl_next::Decode::decode(a.as_mut(), decoder_, ())?;
9022
9023 Ok(())
9024 }
9025 }
9026
9027 impl ::fidl_next::IntoNatural for ArrayOfOptionalHandles {
9028 type Natural = crate::natural::ArrayOfOptionalHandles;
9029 }
9030
9031 #[derive(Debug)]
9033 #[repr(C)]
9034 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
9035 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9036 }
9037
9038 static_assertions::const_assert_eq!(
9039 std::mem::size_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
9040 16
9041 );
9042 static_assertions::const_assert_eq!(
9043 std::mem::align_of::<ArrayOfVectorOfEventInStructWithDefaultRights<'_>>(),
9044 8
9045 );
9046
9047 static_assertions::const_assert_eq!(
9048 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithDefaultRights<'_>, h),
9049 0
9050 );
9051
9052 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithDefaultRights<'_> {
9053 type Constraint = ();
9054
9055 fn validate(
9056 _: ::fidl_next::Slot<'_, Self>,
9057 _: Self::Constraint,
9058 ) -> Result<(), ::fidl_next::ValidationError> {
9059 Ok(())
9060 }
9061 }
9062
9063 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithDefaultRights<'static> {
9064 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithDefaultRights<'de>;
9065
9066 #[inline]
9067 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9068 ::fidl_next::munge! {
9069 let Self {
9070 h,
9071
9072 } = &mut *out_;
9073 }
9074
9075 ::fidl_next::Wire::zero_padding(h);
9076 }
9077 }
9078
9079 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9080 for ArrayOfVectorOfEventInStructWithDefaultRights<'de>
9081 where
9082 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9083 ___D: ::fidl_next::Decoder<'de>,
9084 ___D: ::fidl_next::fuchsia::HandleDecoder,
9085 {
9086 fn decode(
9087 slot_: ::fidl_next::Slot<'_, Self>,
9088 decoder_: &mut ___D,
9089 _: (),
9090 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9091 ::fidl_next::munge! {
9092 let Self {
9093 mut h,
9094
9095 } = slot_;
9096 }
9097
9098 let _field = h.as_mut();
9099 ::fidl_next::Constrained::validate(_field, (1, ()))?;
9100 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
9101
9102 Ok(())
9103 }
9104 }
9105
9106 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithDefaultRights<'de> {
9107 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithDefaultRights;
9108 }
9109
9110 #[derive(Debug)]
9112 #[repr(C)]
9113 pub struct ArrayOfVectorOfEventInStructWithReducedRights<'de> {
9114 pub h: [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9115 }
9116
9117 static_assertions::const_assert_eq!(
9118 std::mem::size_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
9119 16
9120 );
9121 static_assertions::const_assert_eq!(
9122 std::mem::align_of::<ArrayOfVectorOfEventInStructWithReducedRights<'_>>(),
9123 8
9124 );
9125
9126 static_assertions::const_assert_eq!(
9127 std::mem::offset_of!(ArrayOfVectorOfEventInStructWithReducedRights<'_>, h),
9128 0
9129 );
9130
9131 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInStructWithReducedRights<'_> {
9132 type Constraint = ();
9133
9134 fn validate(
9135 _: ::fidl_next::Slot<'_, Self>,
9136 _: Self::Constraint,
9137 ) -> Result<(), ::fidl_next::ValidationError> {
9138 Ok(())
9139 }
9140 }
9141
9142 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInStructWithReducedRights<'static> {
9143 type Narrowed<'de> = ArrayOfVectorOfEventInStructWithReducedRights<'de>;
9144
9145 #[inline]
9146 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9147 ::fidl_next::munge! {
9148 let Self {
9149 h,
9150
9151 } = &mut *out_;
9152 }
9153
9154 ::fidl_next::Wire::zero_padding(h);
9155 }
9156 }
9157
9158 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9159 for ArrayOfVectorOfEventInStructWithReducedRights<'de>
9160 where
9161 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9162 ___D: ::fidl_next::Decoder<'de>,
9163 ___D: ::fidl_next::fuchsia::HandleDecoder,
9164 {
9165 fn decode(
9166 slot_: ::fidl_next::Slot<'_, Self>,
9167 decoder_: &mut ___D,
9168 _: (),
9169 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9170 ::fidl_next::munge! {
9171 let Self {
9172 mut h,
9173
9174 } = slot_;
9175 }
9176
9177 let _field = h.as_mut();
9178 ::fidl_next::Constrained::validate(_field, (1, ()))?;
9179 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
9180
9181 Ok(())
9182 }
9183 }
9184
9185 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInStructWithReducedRights<'de> {
9186 type Natural = crate::natural::ArrayOfVectorOfEventInStructWithReducedRights;
9187 }
9188
9189 #[repr(C)]
9191 pub struct ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9192 pub(crate) table: ::fidl_next::wire::Table<'de>,
9193 }
9194
9195 impl<'de> Drop for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9196 fn drop(&mut self) {
9197 let _ = self.table.get(1)
9198 .map(|envelope| unsafe {
9199 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9200 });
9201 }
9202 }
9203
9204 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRights<'_> {
9205 type Constraint = ();
9206
9207 fn validate(
9208 _: ::fidl_next::Slot<'_, Self>,
9209 _: Self::Constraint,
9210 ) -> Result<(), ::fidl_next::ValidationError> {
9211 Ok(())
9212 }
9213 }
9214
9215 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRights<'static> {
9216 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRights<'de>;
9217
9218 #[inline]
9219 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9220 ::fidl_next::munge!(let Self { table } = out);
9221 ::fidl_next::wire::Table::zero_padding(table);
9222 }
9223 }
9224
9225 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9226 for ArrayOfVectorOfEventInTableWithDefaultRights<'de>
9227 where
9228 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9229 ___D: ::fidl_next::fuchsia::HandleDecoder,
9230 {
9231 fn decode(
9232 slot: ::fidl_next::Slot<'_, Self>,
9233 decoder: &mut ___D,
9234 _: (),
9235 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9236 ::fidl_next::munge!(let Self { table } = slot);
9237
9238 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9239 match ordinal {
9240 0 => unsafe { ::core::hint::unreachable_unchecked() },
9241
9242 1 => {
9243 ::fidl_next::wire::Envelope::decode_as::<
9244 ___D,
9245 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9246 >(slot.as_mut(), decoder, (1, ()))?;
9247
9248 Ok(())
9249 }
9250
9251 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9252 }
9253 })
9254 }
9255 }
9256
9257 impl<'de> ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9258 pub fn h(
9259 &self,
9260 ) -> ::core::option::Option<
9261 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9262 > {
9263 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9264 }
9265
9266 pub fn take_h(
9267 &mut self,
9268 ) -> ::core::option::Option<
9269 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9270 > {
9271 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9272 }
9273 }
9274
9275 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9276 fn fmt(
9277 &self,
9278 f: &mut ::core::fmt::Formatter<'_>,
9279 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9280 f.debug_struct("ArrayOfVectorOfEventInTableWithDefaultRights")
9281 .field("h", &self.h())
9282 .finish()
9283 }
9284 }
9285
9286 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRights<'de> {
9287 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRights;
9288 }
9289
9290 #[derive(Debug)]
9292 #[repr(C)]
9293 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
9294 pub t: crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'de>,
9295 }
9296
9297 static_assertions::const_assert_eq!(
9298 std::mem::size_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
9299 16
9300 );
9301 static_assertions::const_assert_eq!(
9302 std::mem::align_of::<ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>>(),
9303 8
9304 );
9305
9306 static_assertions::const_assert_eq!(
9307 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_>, t),
9308 0
9309 );
9310
9311 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'_> {
9312 type Constraint = ();
9313
9314 fn validate(
9315 _: ::fidl_next::Slot<'_, Self>,
9316 _: Self::Constraint,
9317 ) -> Result<(), ::fidl_next::ValidationError> {
9318 Ok(())
9319 }
9320 }
9321
9322 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static> {
9323 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>;
9324
9325 #[inline]
9326 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9327 ::fidl_next::munge! {
9328 let Self {
9329 t,
9330
9331 } = &mut *out_;
9332 }
9333
9334 ::fidl_next::Wire::zero_padding(t);
9335 }
9336 }
9337
9338 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9339 for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de>
9340 where
9341 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9342 ___D: ::fidl_next::Decoder<'de>,
9343 ___D: ::fidl_next::fuchsia::HandleDecoder,
9344 {
9345 fn decode(
9346 slot_: ::fidl_next::Slot<'_, Self>,
9347 decoder_: &mut ___D,
9348 _: (),
9349 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9350 ::fidl_next::munge! {
9351 let Self {
9352 mut t,
9353
9354 } = slot_;
9355 }
9356
9357 let _field = t.as_mut();
9358
9359 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
9360
9361 Ok(())
9362 }
9363 }
9364
9365 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'de> {
9366 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithDefaultRightsStruct;
9367 }
9368
9369 #[repr(C)]
9371 pub struct ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9372 pub(crate) table: ::fidl_next::wire::Table<'de>,
9373 }
9374
9375 impl<'de> Drop for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9376 fn drop(&mut self) {
9377 let _ = self.table.get(1)
9378 .map(|envelope| unsafe {
9379 envelope.read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9380 });
9381 }
9382 }
9383
9384 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRights<'_> {
9385 type Constraint = ();
9386
9387 fn validate(
9388 _: ::fidl_next::Slot<'_, Self>,
9389 _: Self::Constraint,
9390 ) -> Result<(), ::fidl_next::ValidationError> {
9391 Ok(())
9392 }
9393 }
9394
9395 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRights<'static> {
9396 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRights<'de>;
9397
9398 #[inline]
9399 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9400 ::fidl_next::munge!(let Self { table } = out);
9401 ::fidl_next::wire::Table::zero_padding(table);
9402 }
9403 }
9404
9405 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9406 for ArrayOfVectorOfEventInTableWithReducedRights<'de>
9407 where
9408 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9409 ___D: ::fidl_next::fuchsia::HandleDecoder,
9410 {
9411 fn decode(
9412 slot: ::fidl_next::Slot<'_, Self>,
9413 decoder: &mut ___D,
9414 _: (),
9415 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9416 ::fidl_next::munge!(let Self { table } = slot);
9417
9418 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9419 match ordinal {
9420 0 => unsafe { ::core::hint::unreachable_unchecked() },
9421
9422 1 => {
9423 ::fidl_next::wire::Envelope::decode_as::<
9424 ___D,
9425 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9426 >(slot.as_mut(), decoder, (1, ()))?;
9427
9428 Ok(())
9429 }
9430
9431 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9432 }
9433 })
9434 }
9435 }
9436
9437 impl<'de> ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9438 pub fn h(
9439 &self,
9440 ) -> ::core::option::Option<
9441 &[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9442 > {
9443 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9444 }
9445
9446 pub fn take_h(
9447 &mut self,
9448 ) -> ::core::option::Option<
9449 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9450 > {
9451 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9452 }
9453 }
9454
9455 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9456 fn fmt(
9457 &self,
9458 f: &mut ::core::fmt::Formatter<'_>,
9459 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9460 f.debug_struct("ArrayOfVectorOfEventInTableWithReducedRights")
9461 .field("h", &self.h())
9462 .finish()
9463 }
9464 }
9465
9466 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRights<'de> {
9467 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRights;
9468 }
9469
9470 #[derive(Debug)]
9472 #[repr(C)]
9473 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9474 pub t: crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'de>,
9475 }
9476
9477 static_assertions::const_assert_eq!(
9478 std::mem::size_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9479 16
9480 );
9481 static_assertions::const_assert_eq!(
9482 std::mem::align_of::<ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>>(),
9483 8
9484 );
9485
9486 static_assertions::const_assert_eq!(
9487 std::mem::offset_of!(ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_>, t),
9488 0
9489 );
9490
9491 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'_> {
9492 type Constraint = ();
9493
9494 fn validate(
9495 _: ::fidl_next::Slot<'_, Self>,
9496 _: Self::Constraint,
9497 ) -> Result<(), ::fidl_next::ValidationError> {
9498 Ok(())
9499 }
9500 }
9501
9502 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static> {
9503 type Narrowed<'de> = ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>;
9504
9505 #[inline]
9506 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9507 ::fidl_next::munge! {
9508 let Self {
9509 t,
9510
9511 } = &mut *out_;
9512 }
9513
9514 ::fidl_next::Wire::zero_padding(t);
9515 }
9516 }
9517
9518 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9519 for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de>
9520 where
9521 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9522 ___D: ::fidl_next::Decoder<'de>,
9523 ___D: ::fidl_next::fuchsia::HandleDecoder,
9524 {
9525 fn decode(
9526 slot_: ::fidl_next::Slot<'_, Self>,
9527 decoder_: &mut ___D,
9528 _: (),
9529 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9530 ::fidl_next::munge! {
9531 let Self {
9532 mut t,
9533
9534 } = slot_;
9535 }
9536
9537 let _field = t.as_mut();
9538
9539 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
9540
9541 Ok(())
9542 }
9543 }
9544
9545 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInTableWithReducedRightsStruct<'de> {
9546 type Natural = crate::natural::ArrayOfVectorOfEventInTableWithReducedRightsStruct;
9547 }
9548
9549 #[repr(transparent)]
9551 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9552 pub(crate) raw: ::fidl_next::wire::Union,
9553 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9554 }
9555
9556 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9557 fn drop(&mut self) {
9558 match self.raw.ordinal() {
9559 1 => {
9560 let _ = unsafe {
9561 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9562 };
9563 }
9564
9565 _ => unsafe { ::core::hint::unreachable_unchecked() },
9566 }
9567 }
9568 }
9569
9570 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
9571 type Constraint = ();
9572
9573 fn validate(
9574 _: ::fidl_next::Slot<'_, Self>,
9575 _: Self::Constraint,
9576 ) -> Result<(), ::fidl_next::ValidationError> {
9577 Ok(())
9578 }
9579 }
9580
9581 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
9582 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
9583
9584 #[inline]
9585 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9586 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9587 ::fidl_next::wire::Union::zero_padding(raw);
9588 }
9589 }
9590
9591 pub mod array_of_vector_of_event_in_union_with_default_rights {
9592 pub enum Ref<'de> {
9593 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9594 }
9595
9596 pub enum Value<'de> {
9597 H([::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9598 }
9599 }
9600
9601 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9602 pub fn as_ref(
9603 &self,
9604 ) -> crate::wire::array_of_vector_of_event_in_union_with_default_rights::Ref<'_> {
9605 match self.raw.ordinal() {
9606 1 => crate::wire::array_of_vector_of_event_in_union_with_default_rights::Ref::H(
9607 unsafe {
9608 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9609 },
9610 ),
9611
9612 _ => unsafe { ::core::hint::unreachable_unchecked() },
9613 }
9614 }
9615
9616 pub fn into_inner(
9617 self,
9618 ) -> crate::wire::array_of_vector_of_event_in_union_with_default_rights::Value<'de>
9619 {
9620 let this = ::core::mem::ManuallyDrop::new(self);
9621
9622 match this.raw.ordinal() {
9623 1 => crate::wire::array_of_vector_of_event_in_union_with_default_rights::Value::H(
9624 unsafe {
9625 this.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9626 },
9627 ),
9628
9629 _ => unsafe { ::core::hint::unreachable_unchecked() },
9630 }
9631 }
9632 }
9633
9634 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9635 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
9636 where
9637 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9638 ___D: ::fidl_next::Decoder<'de>,
9639 ___D: ::fidl_next::fuchsia::HandleDecoder,
9640 {
9641 fn decode(
9642 mut slot: ::fidl_next::Slot<'_, Self>,
9643 decoder: &mut ___D,
9644 _: (),
9645 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9646 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9647 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9648 1 => ::fidl_next::wire::Union::decode_as::<
9649 ___D,
9650 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9651 >(raw, decoder, (1, ()))?,
9652
9653 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9654 }
9655
9656 Ok(())
9657 }
9658 }
9659
9660 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9661 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9662 match self.raw.ordinal() {
9663 1 => unsafe {
9664 self.raw.get().deref_unchecked::<
9665 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9666 >().fmt(f)
9667 },
9668 _ => unsafe { ::core::hint::unreachable_unchecked() },
9669 }
9670 }
9671 }
9672
9673 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
9674 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights;
9675 }
9676
9677 #[derive(Debug)]
9679 #[repr(C)]
9680 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9681 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>,
9682 }
9683
9684 static_assertions::const_assert_eq!(
9685 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9686 16
9687 );
9688 static_assertions::const_assert_eq!(
9689 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>>(),
9690 8
9691 );
9692
9693 static_assertions::const_assert_eq!(
9694 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_>, u),
9695 0
9696 );
9697
9698 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'_> {
9699 type Constraint = ();
9700
9701 fn validate(
9702 _: ::fidl_next::Slot<'_, Self>,
9703 _: Self::Constraint,
9704 ) -> Result<(), ::fidl_next::ValidationError> {
9705 Ok(())
9706 }
9707 }
9708
9709 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static> {
9710 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>;
9711
9712 #[inline]
9713 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9714 ::fidl_next::munge! {
9715 let Self {
9716 u,
9717
9718 } = &mut *out_;
9719 }
9720
9721 ::fidl_next::Wire::zero_padding(u);
9722 }
9723 }
9724
9725 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9726 for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de>
9727 where
9728 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9729 ___D: ::fidl_next::Decoder<'de>,
9730 ___D: ::fidl_next::fuchsia::HandleDecoder,
9731 {
9732 fn decode(
9733 slot_: ::fidl_next::Slot<'_, Self>,
9734 decoder_: &mut ___D,
9735 _: (),
9736 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9737 ::fidl_next::munge! {
9738 let Self {
9739 mut u,
9740
9741 } = slot_;
9742 }
9743
9744 let _field = u.as_mut();
9745
9746 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9747
9748 Ok(())
9749 }
9750 }
9751
9752 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'de> {
9753 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct;
9754 }
9755
9756 #[repr(transparent)]
9758 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9759 pub(crate) raw: ::fidl_next::wire::Union,
9760 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9761 }
9762
9763 impl<'de> Drop for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9764 fn drop(&mut self) {
9765 match self.raw.ordinal() {
9766 1 => {
9767 let _ = unsafe {
9768 self.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9769 };
9770 }
9771
9772 _ => unsafe { ::core::hint::unreachable_unchecked() },
9773 }
9774 }
9775 }
9776
9777 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
9778 type Constraint = ();
9779
9780 fn validate(
9781 _: ::fidl_next::Slot<'_, Self>,
9782 _: Self::Constraint,
9783 ) -> Result<(), ::fidl_next::ValidationError> {
9784 Ok(())
9785 }
9786 }
9787
9788 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
9789 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
9790
9791 #[inline]
9792 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9793 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9794 ::fidl_next::wire::Union::zero_padding(raw);
9795 }
9796 }
9797
9798 pub mod array_of_vector_of_event_in_union_with_reduced_rights {
9799 pub enum Ref<'de> {
9800 H(&'de [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9801 }
9802
9803 pub enum Value<'de> {
9804 H([::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]),
9805 }
9806 }
9807
9808 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9809 pub fn as_ref(
9810 &self,
9811 ) -> crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref<'_> {
9812 match self.raw.ordinal() {
9813 1 => crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Ref::H(
9814 unsafe {
9815 self.raw.get().deref_unchecked::<[::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]>()
9816 },
9817 ),
9818
9819 _ => unsafe { ::core::hint::unreachable_unchecked() },
9820 }
9821 }
9822
9823 pub fn into_inner(
9824 self,
9825 ) -> crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Value<'de>
9826 {
9827 let this = ::core::mem::ManuallyDrop::new(self);
9828
9829 match this.raw.ordinal() {
9830 1 => crate::wire::array_of_vector_of_event_in_union_with_reduced_rights::Value::H(
9831 unsafe {
9832 this.raw.get().read_unchecked::<[::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1]>()
9833 },
9834 ),
9835
9836 _ => unsafe { ::core::hint::unreachable_unchecked() },
9837 }
9838 }
9839 }
9840
9841 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9842 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
9843 where
9844 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9845 ___D: ::fidl_next::Decoder<'de>,
9846 ___D: ::fidl_next::fuchsia::HandleDecoder,
9847 {
9848 fn decode(
9849 mut slot: ::fidl_next::Slot<'_, Self>,
9850 decoder: &mut ___D,
9851 _: (),
9852 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9853 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9854 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
9855 1 => ::fidl_next::wire::Union::decode_as::<
9856 ___D,
9857 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
9858 >(raw, decoder, (1, ()))?,
9859
9860 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9861 }
9862
9863 Ok(())
9864 }
9865 }
9866
9867 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9868 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9869 match self.raw.ordinal() {
9870 1 => unsafe {
9871 self.raw.get().deref_unchecked::<
9872 [::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Event>; 1]
9873 >().fmt(f)
9874 },
9875 _ => unsafe { ::core::hint::unreachable_unchecked() },
9876 }
9877 }
9878 }
9879
9880 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
9881 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights;
9882 }
9883
9884 #[derive(Debug)]
9886 #[repr(C)]
9887 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9888 pub u: crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>,
9889 }
9890
9891 static_assertions::const_assert_eq!(
9892 std::mem::size_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9893 16
9894 );
9895 static_assertions::const_assert_eq!(
9896 std::mem::align_of::<ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>>(),
9897 8
9898 );
9899
9900 static_assertions::const_assert_eq!(
9901 std::mem::offset_of!(ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_>, u),
9902 0
9903 );
9904
9905 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'_> {
9906 type Constraint = ();
9907
9908 fn validate(
9909 _: ::fidl_next::Slot<'_, Self>,
9910 _: Self::Constraint,
9911 ) -> Result<(), ::fidl_next::ValidationError> {
9912 Ok(())
9913 }
9914 }
9915
9916 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static> {
9917 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>;
9918
9919 #[inline]
9920 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9921 ::fidl_next::munge! {
9922 let Self {
9923 u,
9924
9925 } = &mut *out_;
9926 }
9927
9928 ::fidl_next::Wire::zero_padding(u);
9929 }
9930 }
9931
9932 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
9933 for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de>
9934 where
9935 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9936 ___D: ::fidl_next::Decoder<'de>,
9937 ___D: ::fidl_next::fuchsia::HandleDecoder,
9938 {
9939 fn decode(
9940 slot_: ::fidl_next::Slot<'_, Self>,
9941 decoder_: &mut ___D,
9942 _: (),
9943 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9944 ::fidl_next::munge! {
9945 let Self {
9946 mut u,
9947
9948 } = slot_;
9949 }
9950
9951 let _field = u.as_mut();
9952
9953 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
9954
9955 Ok(())
9956 }
9957 }
9958
9959 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'de> {
9960 type Natural = crate::natural::ArrayOfVectorOfEventInUnionWithReducedRightsStruct;
9961 }
9962
9963 #[derive(Debug)]
9965 #[repr(C)]
9966 pub struct Bounded32NonnullableVectorOfHandles<'de> {
9967 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
9968 }
9969
9970 static_assertions::const_assert_eq!(
9971 std::mem::size_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9972 16
9973 );
9974 static_assertions::const_assert_eq!(
9975 std::mem::align_of::<Bounded32NonnullableVectorOfHandles<'_>>(),
9976 8
9977 );
9978
9979 static_assertions::const_assert_eq!(
9980 std::mem::offset_of!(Bounded32NonnullableVectorOfHandles<'_>, vh0),
9981 0
9982 );
9983
9984 impl ::fidl_next::Constrained for Bounded32NonnullableVectorOfHandles<'_> {
9985 type Constraint = ();
9986
9987 fn validate(
9988 _: ::fidl_next::Slot<'_, Self>,
9989 _: Self::Constraint,
9990 ) -> Result<(), ::fidl_next::ValidationError> {
9991 Ok(())
9992 }
9993 }
9994
9995 unsafe impl ::fidl_next::Wire for Bounded32NonnullableVectorOfHandles<'static> {
9996 type Narrowed<'de> = Bounded32NonnullableVectorOfHandles<'de>;
9997
9998 #[inline]
9999 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10000 ::fidl_next::munge! {
10001 let Self {
10002 vh0,
10003
10004 } = &mut *out_;
10005 }
10006
10007 ::fidl_next::Wire::zero_padding(vh0);
10008 }
10009 }
10010
10011 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NonnullableVectorOfHandles<'de>
10012 where
10013 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10014 ___D: ::fidl_next::Decoder<'de>,
10015 ___D: ::fidl_next::fuchsia::HandleDecoder,
10016 {
10017 fn decode(
10018 slot_: ::fidl_next::Slot<'_, Self>,
10019 decoder_: &mut ___D,
10020 _: (),
10021 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10022 ::fidl_next::munge! {
10023 let Self {
10024 mut vh0,
10025
10026 } = slot_;
10027 }
10028
10029 let _field = vh0.as_mut();
10030 ::fidl_next::Constrained::validate(_field, (32, ()))?;
10031 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
10032
10033 let vh0 = unsafe { vh0.deref_unchecked() };
10034
10035 if vh0.len() > 32 {
10036 return Err(::fidl_next::DecodeError::VectorTooLong {
10037 size: vh0.len() as u64,
10038 limit: 32,
10039 });
10040 }
10041
10042 Ok(())
10043 }
10044 }
10045
10046 impl<'de> ::fidl_next::IntoNatural for Bounded32NonnullableVectorOfHandles<'de> {
10047 type Natural = crate::natural::Bounded32NonnullableVectorOfHandles;
10048 }
10049
10050 #[derive(Debug)]
10052 #[repr(C)]
10053 pub struct Bounded32NullableVectorOfHandles<'de> {
10054 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
10055 }
10056
10057 static_assertions::const_assert_eq!(
10058 std::mem::size_of::<Bounded32NullableVectorOfHandles<'_>>(),
10059 16
10060 );
10061 static_assertions::const_assert_eq!(
10062 std::mem::align_of::<Bounded32NullableVectorOfHandles<'_>>(),
10063 8
10064 );
10065
10066 static_assertions::const_assert_eq!(
10067 std::mem::offset_of!(Bounded32NullableVectorOfHandles<'_>, vh0),
10068 0
10069 );
10070
10071 impl ::fidl_next::Constrained for Bounded32NullableVectorOfHandles<'_> {
10072 type Constraint = ();
10073
10074 fn validate(
10075 _: ::fidl_next::Slot<'_, Self>,
10076 _: Self::Constraint,
10077 ) -> Result<(), ::fidl_next::ValidationError> {
10078 Ok(())
10079 }
10080 }
10081
10082 unsafe impl ::fidl_next::Wire for Bounded32NullableVectorOfHandles<'static> {
10083 type Narrowed<'de> = Bounded32NullableVectorOfHandles<'de>;
10084
10085 #[inline]
10086 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10087 ::fidl_next::munge! {
10088 let Self {
10089 vh0,
10090
10091 } = &mut *out_;
10092 }
10093
10094 ::fidl_next::Wire::zero_padding(vh0);
10095 }
10096 }
10097
10098 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Bounded32NullableVectorOfHandles<'de>
10099 where
10100 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10101 ___D: ::fidl_next::Decoder<'de>,
10102 ___D: ::fidl_next::fuchsia::HandleDecoder,
10103 {
10104 fn decode(
10105 slot_: ::fidl_next::Slot<'_, Self>,
10106 decoder_: &mut ___D,
10107 _: (),
10108 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10109 ::fidl_next::munge! {
10110 let Self {
10111 mut vh0,
10112
10113 } = slot_;
10114 }
10115
10116 let _field = vh0.as_mut();
10117 ::fidl_next::Constrained::validate(_field, (32, ()))?;
10118 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (32, ()))?;
10119
10120 let vh0 = unsafe { vh0.deref_unchecked() };
10121
10122 if let Some(vh0) = vh0.as_ref() {
10123 if vh0.len() > 32 {
10124 return Err(::fidl_next::DecodeError::VectorTooLong {
10125 size: vh0.len() as u64,
10126 limit: 32,
10127 });
10128 }
10129 }
10130
10131 Ok(())
10132 }
10133 }
10134
10135 impl<'de> ::fidl_next::IntoNatural for Bounded32NullableVectorOfHandles<'de> {
10136 type Natural = crate::natural::Bounded32NullableVectorOfHandles;
10137 }
10138
10139 #[derive(Debug)]
10141 #[repr(C)]
10142 pub struct BoxOfSingleHandle<'de> {
10143 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleHandle>,
10144 }
10145
10146 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleHandle<'_>>(), 8);
10147 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleHandle<'_>>(), 8);
10148
10149 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleHandle<'_>, b), 0);
10150
10151 impl ::fidl_next::Constrained for BoxOfSingleHandle<'_> {
10152 type Constraint = ();
10153
10154 fn validate(
10155 _: ::fidl_next::Slot<'_, Self>,
10156 _: Self::Constraint,
10157 ) -> Result<(), ::fidl_next::ValidationError> {
10158 Ok(())
10159 }
10160 }
10161
10162 unsafe impl ::fidl_next::Wire for BoxOfSingleHandle<'static> {
10163 type Narrowed<'de> = BoxOfSingleHandle<'de>;
10164
10165 #[inline]
10166 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10167 ::fidl_next::munge! {
10168 let Self {
10169 b,
10170
10171 } = &mut *out_;
10172 }
10173
10174 ::fidl_next::Wire::zero_padding(b);
10175 }
10176 }
10177
10178 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleHandle<'de>
10179 where
10180 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10181 ___D: ::fidl_next::Decoder<'de>,
10182 ___D: ::fidl_next::fuchsia::HandleDecoder,
10183 {
10184 fn decode(
10185 slot_: ::fidl_next::Slot<'_, Self>,
10186 decoder_: &mut ___D,
10187 _: (),
10188 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10189 ::fidl_next::munge! {
10190 let Self {
10191 mut b,
10192
10193 } = slot_;
10194 }
10195
10196 let _field = b.as_mut();
10197
10198 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
10199
10200 Ok(())
10201 }
10202 }
10203
10204 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleHandle<'de> {
10205 type Natural = crate::natural::BoxOfSingleHandle;
10206 }
10207
10208 #[derive(Debug)]
10210 #[repr(C)]
10211 pub struct BoxOfSingleOptionalHandle<'de> {
10212 pub b: ::fidl_next::wire::Box<'de, crate::wire::SingleOptionalHandle>,
10213 }
10214
10215 static_assertions::const_assert_eq!(std::mem::size_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
10216 static_assertions::const_assert_eq!(std::mem::align_of::<BoxOfSingleOptionalHandle<'_>>(), 8);
10217
10218 static_assertions::const_assert_eq!(std::mem::offset_of!(BoxOfSingleOptionalHandle<'_>, b), 0);
10219
10220 impl ::fidl_next::Constrained for BoxOfSingleOptionalHandle<'_> {
10221 type Constraint = ();
10222
10223 fn validate(
10224 _: ::fidl_next::Slot<'_, Self>,
10225 _: Self::Constraint,
10226 ) -> Result<(), ::fidl_next::ValidationError> {
10227 Ok(())
10228 }
10229 }
10230
10231 unsafe impl ::fidl_next::Wire for BoxOfSingleOptionalHandle<'static> {
10232 type Narrowed<'de> = BoxOfSingleOptionalHandle<'de>;
10233
10234 #[inline]
10235 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10236 ::fidl_next::munge! {
10237 let Self {
10238 b,
10239
10240 } = &mut *out_;
10241 }
10242
10243 ::fidl_next::Wire::zero_padding(b);
10244 }
10245 }
10246
10247 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BoxOfSingleOptionalHandle<'de>
10248 where
10249 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10250 ___D: ::fidl_next::Decoder<'de>,
10251 ___D: ::fidl_next::fuchsia::HandleDecoder,
10252 {
10253 fn decode(
10254 slot_: ::fidl_next::Slot<'_, Self>,
10255 decoder_: &mut ___D,
10256 _: (),
10257 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10258 ::fidl_next::munge! {
10259 let Self {
10260 mut b,
10261
10262 } = slot_;
10263 }
10264
10265 let _field = b.as_mut();
10266
10267 ::fidl_next::Decode::decode(b.as_mut(), decoder_, ())?;
10268
10269 Ok(())
10270 }
10271 }
10272
10273 impl<'de> ::fidl_next::IntoNatural for BoxOfSingleOptionalHandle<'de> {
10274 type Natural = crate::natural::BoxOfSingleOptionalHandle;
10275 }
10276
10277 #[derive(Debug)]
10279 #[repr(C)]
10280 pub struct LaunchInfo<'de> {
10281 pub url: ::fidl_next::wire::String<'de>,
10282
10283 pub arguments: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::String<'de>>,
10284
10285 pub out: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
10286
10287 pub err: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
10288
10289 pub directory_request: ::fidl_next::wire::fuchsia::OptionalChannel,
10290
10291 pub flat_namespace: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
10292
10293 pub additional_services: ::fidl_next::wire::Box<'de, crate::wire::TransformerEmptyStruct>,
10294 }
10295
10296 static_assertions::const_assert_eq!(std::mem::size_of::<LaunchInfo<'_>>(), 72);
10297 static_assertions::const_assert_eq!(std::mem::align_of::<LaunchInfo<'_>>(), 8);
10298
10299 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, url), 0);
10300
10301 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, arguments), 16);
10302
10303 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, out), 32);
10304
10305 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, err), 40);
10306
10307 static_assertions::const_assert_eq!(
10308 std::mem::offset_of!(LaunchInfo<'_>, directory_request),
10309 48
10310 );
10311
10312 static_assertions::const_assert_eq!(std::mem::offset_of!(LaunchInfo<'_>, flat_namespace), 56);
10313
10314 static_assertions::const_assert_eq!(
10315 std::mem::offset_of!(LaunchInfo<'_>, additional_services),
10316 64
10317 );
10318
10319 impl ::fidl_next::Constrained for LaunchInfo<'_> {
10320 type Constraint = ();
10321
10322 fn validate(
10323 _: ::fidl_next::Slot<'_, Self>,
10324 _: Self::Constraint,
10325 ) -> Result<(), ::fidl_next::ValidationError> {
10326 Ok(())
10327 }
10328 }
10329
10330 unsafe impl ::fidl_next::Wire for LaunchInfo<'static> {
10331 type Narrowed<'de> = LaunchInfo<'de>;
10332
10333 #[inline]
10334 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10335 ::fidl_next::munge! {
10336 let Self {
10337 url,
10338 arguments,
10339 out,
10340 err,
10341 directory_request,
10342 flat_namespace,
10343 additional_services,
10344
10345 } = &mut *out_;
10346 }
10347
10348 ::fidl_next::Wire::zero_padding(url);
10349
10350 ::fidl_next::Wire::zero_padding(arguments);
10351
10352 ::fidl_next::Wire::zero_padding(out);
10353
10354 ::fidl_next::Wire::zero_padding(err);
10355
10356 ::fidl_next::Wire::zero_padding(directory_request);
10357
10358 ::fidl_next::Wire::zero_padding(flat_namespace);
10359
10360 ::fidl_next::Wire::zero_padding(additional_services);
10361
10362 unsafe {
10363 out_.as_mut_ptr().cast::<u8>().add(52).write_bytes(0, 4);
10364 }
10365 }
10366 }
10367
10368 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LaunchInfo<'de>
10369 where
10370 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10371 ___D: ::fidl_next::Decoder<'de>,
10372 ___D: ::fidl_next::fuchsia::HandleDecoder,
10373 {
10374 fn decode(
10375 slot_: ::fidl_next::Slot<'_, Self>,
10376 decoder_: &mut ___D,
10377 _: (),
10378 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10379 if slot_.as_bytes()[52..56] != [0u8; 4] {
10380 return Err(::fidl_next::DecodeError::InvalidPadding);
10381 }
10382
10383 ::fidl_next::munge! {
10384 let Self {
10385 mut url,
10386 mut arguments,
10387 mut out,
10388 mut err,
10389 mut directory_request,
10390 mut flat_namespace,
10391 mut additional_services,
10392
10393 } = slot_;
10394 }
10395
10396 let _field = url.as_mut();
10397 ::fidl_next::Constrained::validate(_field, 200)?;
10398 ::fidl_next::Decode::decode(url.as_mut(), decoder_, 200)?;
10399
10400 let url = unsafe { url.deref_unchecked() };
10401
10402 if url.len() > 200 {
10403 return Err(::fidl_next::DecodeError::VectorTooLong {
10404 size: url.len() as u64,
10405 limit: 200,
10406 });
10407 }
10408
10409 let _field = arguments.as_mut();
10410 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
10411 ::fidl_next::Decode::decode(arguments.as_mut(), decoder_, (4294967295, 4294967295))?;
10412
10413 let _field = out.as_mut();
10414
10415 ::fidl_next::Decode::decode(out.as_mut(), decoder_, ())?;
10416
10417 let _field = err.as_mut();
10418
10419 ::fidl_next::Decode::decode(err.as_mut(), decoder_, ())?;
10420
10421 let _field = directory_request.as_mut();
10422
10423 ::fidl_next::Decode::decode(directory_request.as_mut(), decoder_, ())?;
10424
10425 let _field = flat_namespace.as_mut();
10426
10427 ::fidl_next::Decode::decode(flat_namespace.as_mut(), decoder_, ())?;
10428
10429 let _field = additional_services.as_mut();
10430
10431 ::fidl_next::Decode::decode(additional_services.as_mut(), decoder_, ())?;
10432
10433 Ok(())
10434 }
10435 }
10436
10437 impl<'de> ::fidl_next::IntoNatural for LaunchInfo<'de> {
10438 type Natural = crate::natural::LaunchInfo;
10439 }
10440
10441 #[derive(Debug)]
10443 #[repr(C)]
10444 pub struct CreateComponentRequest<'de> {
10445 pub launch_info: crate::wire::LaunchInfo<'de>,
10446
10447 pub controller: ::fidl_next::ServerEnd<
10448 crate::ComponentController,
10449 ::fidl_next::wire::fuchsia::OptionalChannel,
10450 >,
10451 }
10452
10453 static_assertions::const_assert_eq!(std::mem::size_of::<CreateComponentRequest<'_>>(), 80);
10454 static_assertions::const_assert_eq!(std::mem::align_of::<CreateComponentRequest<'_>>(), 8);
10455
10456 static_assertions::const_assert_eq!(
10457 std::mem::offset_of!(CreateComponentRequest<'_>, launch_info),
10458 0
10459 );
10460
10461 static_assertions::const_assert_eq!(
10462 std::mem::offset_of!(CreateComponentRequest<'_>, controller),
10463 72
10464 );
10465
10466 impl ::fidl_next::Constrained for CreateComponentRequest<'_> {
10467 type Constraint = ();
10468
10469 fn validate(
10470 _: ::fidl_next::Slot<'_, Self>,
10471 _: Self::Constraint,
10472 ) -> Result<(), ::fidl_next::ValidationError> {
10473 Ok(())
10474 }
10475 }
10476
10477 unsafe impl ::fidl_next::Wire for CreateComponentRequest<'static> {
10478 type Narrowed<'de> = CreateComponentRequest<'de>;
10479
10480 #[inline]
10481 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10482 ::fidl_next::munge! {
10483 let Self {
10484 launch_info,
10485 controller,
10486
10487 } = &mut *out_;
10488 }
10489
10490 ::fidl_next::Wire::zero_padding(launch_info);
10491
10492 ::fidl_next::Wire::zero_padding(controller);
10493
10494 unsafe {
10495 out_.as_mut_ptr().cast::<u8>().add(76).write_bytes(0, 4);
10496 }
10497 }
10498 }
10499
10500 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CreateComponentRequest<'de>
10501 where
10502 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10503 ___D: ::fidl_next::Decoder<'de>,
10504 ___D: ::fidl_next::fuchsia::HandleDecoder,
10505 {
10506 fn decode(
10507 slot_: ::fidl_next::Slot<'_, Self>,
10508 decoder_: &mut ___D,
10509 _: (),
10510 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10511 if slot_.as_bytes()[76..80] != [0u8; 4] {
10512 return Err(::fidl_next::DecodeError::InvalidPadding);
10513 }
10514
10515 ::fidl_next::munge! {
10516 let Self {
10517 mut launch_info,
10518 mut controller,
10519
10520 } = slot_;
10521 }
10522
10523 let _field = launch_info.as_mut();
10524
10525 ::fidl_next::Decode::decode(launch_info.as_mut(), decoder_, ())?;
10526
10527 let _field = controller.as_mut();
10528
10529 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
10530
10531 Ok(())
10532 }
10533 }
10534
10535 impl<'de> ::fidl_next::IntoNatural for CreateComponentRequest<'de> {
10536 type Natural = crate::natural::CreateComponentRequest;
10537 }
10538
10539 #[repr(C)]
10541 pub struct EmptyResourceTable<'de> {
10542 pub(crate) table: ::fidl_next::wire::Table<'de>,
10543 }
10544
10545 impl<'de> Drop for EmptyResourceTable<'de> {
10546 fn drop(&mut self) {}
10547 }
10548
10549 impl ::fidl_next::Constrained for EmptyResourceTable<'_> {
10550 type Constraint = ();
10551
10552 fn validate(
10553 _: ::fidl_next::Slot<'_, Self>,
10554 _: Self::Constraint,
10555 ) -> Result<(), ::fidl_next::ValidationError> {
10556 Ok(())
10557 }
10558 }
10559
10560 unsafe impl ::fidl_next::Wire for EmptyResourceTable<'static> {
10561 type Narrowed<'de> = EmptyResourceTable<'de>;
10562
10563 #[inline]
10564 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10565 ::fidl_next::munge!(let Self { table } = out);
10566 ::fidl_next::wire::Table::zero_padding(table);
10567 }
10568 }
10569
10570 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTable<'de>
10571 where
10572 ___D: ::fidl_next::Decoder<'de> + ?Sized,
10573 ___D: ::fidl_next::fuchsia::HandleDecoder,
10574 {
10575 fn decode(
10576 slot: ::fidl_next::Slot<'_, Self>,
10577 decoder: &mut ___D,
10578 _: (),
10579 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10580 ::fidl_next::munge!(let Self { table } = slot);
10581
10582 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10583 match ordinal {
10584 0 => unsafe { ::core::hint::unreachable_unchecked() },
10585
10586 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10587 }
10588 })
10589 }
10590 }
10591
10592 impl<'de> EmptyResourceTable<'de> {}
10593
10594 impl<'de> ::core::fmt::Debug for EmptyResourceTable<'de> {
10595 fn fmt(
10596 &self,
10597 f: &mut ::core::fmt::Formatter<'_>,
10598 ) -> ::core::result::Result<(), ::core::fmt::Error> {
10599 f.debug_struct("EmptyResourceTable").finish()
10600 }
10601 }
10602
10603 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTable<'de> {
10604 type Natural = crate::natural::EmptyResourceTable;
10605 }
10606
10607 #[derive(Debug)]
10609 #[repr(C)]
10610 pub struct EmptyResourceTableStruct<'de> {
10611 pub table: crate::wire::EmptyResourceTable<'de>,
10612 }
10613
10614 static_assertions::const_assert_eq!(std::mem::size_of::<EmptyResourceTableStruct<'_>>(), 16);
10615 static_assertions::const_assert_eq!(std::mem::align_of::<EmptyResourceTableStruct<'_>>(), 8);
10616
10617 static_assertions::const_assert_eq!(
10618 std::mem::offset_of!(EmptyResourceTableStruct<'_>, table),
10619 0
10620 );
10621
10622 impl ::fidl_next::Constrained for EmptyResourceTableStruct<'_> {
10623 type Constraint = ();
10624
10625 fn validate(
10626 _: ::fidl_next::Slot<'_, Self>,
10627 _: Self::Constraint,
10628 ) -> Result<(), ::fidl_next::ValidationError> {
10629 Ok(())
10630 }
10631 }
10632
10633 unsafe impl ::fidl_next::Wire for EmptyResourceTableStruct<'static> {
10634 type Narrowed<'de> = EmptyResourceTableStruct<'de>;
10635
10636 #[inline]
10637 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10638 ::fidl_next::munge! {
10639 let Self {
10640 table,
10641
10642 } = &mut *out_;
10643 }
10644
10645 ::fidl_next::Wire::zero_padding(table);
10646 }
10647 }
10648
10649 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EmptyResourceTableStruct<'de>
10650 where
10651 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10652 ___D: ::fidl_next::Decoder<'de>,
10653 ___D: ::fidl_next::fuchsia::HandleDecoder,
10654 {
10655 fn decode(
10656 slot_: ::fidl_next::Slot<'_, Self>,
10657 decoder_: &mut ___D,
10658 _: (),
10659 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10660 ::fidl_next::munge! {
10661 let Self {
10662 mut table,
10663
10664 } = slot_;
10665 }
10666
10667 let _field = table.as_mut();
10668
10669 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
10670
10671 Ok(())
10672 }
10673 }
10674
10675 impl<'de> ::fidl_next::IntoNatural for EmptyResourceTableStruct<'de> {
10676 type Natural = crate::natural::EmptyResourceTableStruct;
10677 }
10678
10679 #[repr(transparent)]
10681 pub struct EnvelopeInliningTestUnion<'de> {
10682 pub(crate) raw: ::fidl_next::wire::Union,
10683 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
10684 }
10685
10686 impl<'de> Drop for EnvelopeInliningTestUnion<'de> {
10687 fn drop(&mut self) {
10688 match self.raw.ordinal() {
10689 1 => {
10690 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
10691 }
10692
10693 2 => {
10694 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint64>() };
10695 }
10696
10697 3 => {
10698 let _ = unsafe {
10699 self.raw
10700 .get()
10701 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10702 };
10703 }
10704
10705 _ => (),
10706 }
10707 }
10708 }
10709
10710 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
10711 type Constraint = ();
10712
10713 fn validate(
10714 _: ::fidl_next::Slot<'_, Self>,
10715 _: Self::Constraint,
10716 ) -> Result<(), ::fidl_next::ValidationError> {
10717 Ok(())
10718 }
10719 }
10720
10721 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
10722 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
10723
10724 #[inline]
10725 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10726 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
10727 ::fidl_next::wire::Union::zero_padding(raw);
10728 }
10729 }
10730
10731 pub mod envelope_inlining_test_union {
10732 pub enum Ref<'de> {
10733 Small(&'de ::fidl_next::wire::Uint32),
10734
10735 Large(&'de ::fidl_next::wire::Uint64),
10736
10737 Handle(&'de ::fidl_next::wire::fuchsia::NullableHandle),
10738
10739 UnknownOrdinal_(u64),
10740 }
10741
10742 pub enum Value {
10743 Small(::fidl_next::wire::Uint32),
10744
10745 Large(::fidl_next::wire::Uint64),
10746
10747 Handle(::fidl_next::wire::fuchsia::NullableHandle),
10748
10749 UnknownOrdinal_(u64),
10750 }
10751 }
10752
10753 impl<'de> EnvelopeInliningTestUnion<'de> {
10754 pub fn as_ref(&self) -> crate::wire::envelope_inlining_test_union::Ref<'_> {
10755 match self.raw.ordinal() {
10756 1 => crate::wire::envelope_inlining_test_union::Ref::Small(unsafe {
10757 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
10758 }),
10759
10760 2 => crate::wire::envelope_inlining_test_union::Ref::Large(unsafe {
10761 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>()
10762 }),
10763
10764 3 => crate::wire::envelope_inlining_test_union::Ref::Handle(unsafe {
10765 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10766 }),
10767
10768 unknown => crate::wire::envelope_inlining_test_union::Ref::UnknownOrdinal_(unknown),
10769 }
10770 }
10771
10772 pub fn into_inner(self) -> crate::wire::envelope_inlining_test_union::Value {
10773 let this = ::core::mem::ManuallyDrop::new(self);
10774
10775 match this.raw.ordinal() {
10776 1 => crate::wire::envelope_inlining_test_union::Value::Small(unsafe {
10777 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
10778 }),
10779
10780 2 => crate::wire::envelope_inlining_test_union::Value::Large(unsafe {
10781 this.raw.get().read_unchecked::<::fidl_next::wire::Uint64>()
10782 }),
10783
10784 3 => crate::wire::envelope_inlining_test_union::Value::Handle(unsafe {
10785 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10786 }),
10787
10788 unknown => {
10789 crate::wire::envelope_inlining_test_union::Value::UnknownOrdinal_(unknown)
10790 }
10791 }
10792 }
10793 }
10794
10795 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
10796 where
10797 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10798 ___D: ::fidl_next::Decoder<'de>,
10799 ___D: ::fidl_next::fuchsia::HandleDecoder,
10800 {
10801 fn decode(
10802 mut slot: ::fidl_next::Slot<'_, Self>,
10803 decoder: &mut ___D,
10804 _: (),
10805 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10806 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
10807 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
10808 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
10809 raw,
10810 decoder,
10811 (),
10812 )?,
10813
10814 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
10815 raw,
10816 decoder,
10817 (),
10818 )?,
10819
10820 3 => ::fidl_next::wire::Union::decode_as::<
10821 ___D,
10822 ::fidl_next::wire::fuchsia::NullableHandle,
10823 >(raw, decoder, ())?,
10824
10825 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
10826 }
10827
10828 Ok(())
10829 }
10830 }
10831
10832 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
10833 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10834 match self.raw.ordinal() {
10835 1 => unsafe {
10836 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
10837 },
10838 2 => unsafe {
10839 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>().fmt(f)
10840 },
10841 3 => unsafe {
10842 self.raw
10843 .get()
10844 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
10845 .fmt(f)
10846 },
10847 _ => unsafe { ::core::hint::unreachable_unchecked() },
10848 }
10849 }
10850 }
10851
10852 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
10853 type Natural = crate::natural::EnvelopeInliningTestUnion;
10854 }
10855
10856 #[derive(Debug)]
10858 #[repr(C)]
10859 pub struct EnvelopeInliningTestUnionStruct<'de> {
10860 pub u: crate::wire::EnvelopeInliningTestUnion<'de>,
10861 }
10862
10863 static_assertions::const_assert_eq!(
10864 std::mem::size_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10865 16
10866 );
10867 static_assertions::const_assert_eq!(
10868 std::mem::align_of::<EnvelopeInliningTestUnionStruct<'_>>(),
10869 8
10870 );
10871
10872 static_assertions::const_assert_eq!(
10873 std::mem::offset_of!(EnvelopeInliningTestUnionStruct<'_>, u),
10874 0
10875 );
10876
10877 impl ::fidl_next::Constrained for EnvelopeInliningTestUnionStruct<'_> {
10878 type Constraint = ();
10879
10880 fn validate(
10881 _: ::fidl_next::Slot<'_, Self>,
10882 _: Self::Constraint,
10883 ) -> Result<(), ::fidl_next::ValidationError> {
10884 Ok(())
10885 }
10886 }
10887
10888 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnionStruct<'static> {
10889 type Narrowed<'de> = EnvelopeInliningTestUnionStruct<'de>;
10890
10891 #[inline]
10892 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10893 ::fidl_next::munge! {
10894 let Self {
10895 u,
10896
10897 } = &mut *out_;
10898 }
10899
10900 ::fidl_next::Wire::zero_padding(u);
10901 }
10902 }
10903
10904 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnionStruct<'de>
10905 where
10906 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10907 ___D: ::fidl_next::Decoder<'de>,
10908 ___D: ::fidl_next::fuchsia::HandleDecoder,
10909 {
10910 fn decode(
10911 slot_: ::fidl_next::Slot<'_, Self>,
10912 decoder_: &mut ___D,
10913 _: (),
10914 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10915 ::fidl_next::munge! {
10916 let Self {
10917 mut u,
10918
10919 } = slot_;
10920 }
10921
10922 let _field = u.as_mut();
10923
10924 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
10925
10926 Ok(())
10927 }
10928 }
10929
10930 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnionStruct<'de> {
10931 type Natural = crate::natural::EnvelopeInliningTestUnionStruct;
10932 }
10933
10934 #[derive(Debug)]
10936 #[repr(C)]
10937 pub struct EventWithDefaultRights {
10938 pub h: ::fidl_next::wire::fuchsia::Event,
10939 }
10940
10941 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithDefaultRights>(), 4);
10942 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithDefaultRights>(), 4);
10943
10944 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithDefaultRights, h), 0);
10945
10946 impl ::fidl_next::Constrained for EventWithDefaultRights {
10947 type Constraint = ();
10948
10949 fn validate(
10950 _: ::fidl_next::Slot<'_, Self>,
10951 _: Self::Constraint,
10952 ) -> Result<(), ::fidl_next::ValidationError> {
10953 Ok(())
10954 }
10955 }
10956
10957 unsafe impl ::fidl_next::Wire for EventWithDefaultRights {
10958 type Narrowed<'de> = EventWithDefaultRights;
10959
10960 #[inline]
10961 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10962 ::fidl_next::munge! {
10963 let Self {
10964 h,
10965
10966 } = &mut *out_;
10967 }
10968
10969 ::fidl_next::Wire::zero_padding(h);
10970 }
10971 }
10972
10973 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithDefaultRights
10974 where
10975 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10976 ___D: ::fidl_next::fuchsia::HandleDecoder,
10977 {
10978 fn decode(
10979 slot_: ::fidl_next::Slot<'_, Self>,
10980 decoder_: &mut ___D,
10981 _: (),
10982 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10983 ::fidl_next::munge! {
10984 let Self {
10985 mut h,
10986
10987 } = slot_;
10988 }
10989
10990 let _field = h.as_mut();
10991
10992 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
10993
10994 Ok(())
10995 }
10996 }
10997
10998 impl ::fidl_next::IntoNatural for EventWithDefaultRights {
10999 type Natural = crate::natural::EventWithDefaultRights;
11000 }
11001
11002 #[derive(Debug)]
11004 #[repr(C)]
11005 pub struct EventWithReducedRights {
11006 pub h: ::fidl_next::wire::fuchsia::Event,
11007 }
11008
11009 static_assertions::const_assert_eq!(std::mem::size_of::<EventWithReducedRights>(), 4);
11010 static_assertions::const_assert_eq!(std::mem::align_of::<EventWithReducedRights>(), 4);
11011
11012 static_assertions::const_assert_eq!(std::mem::offset_of!(EventWithReducedRights, h), 0);
11013
11014 impl ::fidl_next::Constrained for EventWithReducedRights {
11015 type Constraint = ();
11016
11017 fn validate(
11018 _: ::fidl_next::Slot<'_, Self>,
11019 _: Self::Constraint,
11020 ) -> Result<(), ::fidl_next::ValidationError> {
11021 Ok(())
11022 }
11023 }
11024
11025 unsafe impl ::fidl_next::Wire for EventWithReducedRights {
11026 type Narrowed<'de> = EventWithReducedRights;
11027
11028 #[inline]
11029 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11030 ::fidl_next::munge! {
11031 let Self {
11032 h,
11033
11034 } = &mut *out_;
11035 }
11036
11037 ::fidl_next::Wire::zero_padding(h);
11038 }
11039 }
11040
11041 unsafe impl<___D> ::fidl_next::Decode<___D> for EventWithReducedRights
11042 where
11043 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11044 ___D: ::fidl_next::fuchsia::HandleDecoder,
11045 {
11046 fn decode(
11047 slot_: ::fidl_next::Slot<'_, Self>,
11048 decoder_: &mut ___D,
11049 _: (),
11050 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11051 ::fidl_next::munge! {
11052 let Self {
11053 mut h,
11054
11055 } = slot_;
11056 }
11057
11058 let _field = h.as_mut();
11059
11060 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
11061
11062 Ok(())
11063 }
11064 }
11065
11066 impl ::fidl_next::IntoNatural for EventWithReducedRights {
11067 type Natural = crate::natural::EventWithReducedRights;
11068 }
11069
11070 #[derive(Debug)]
11072 #[repr(C)]
11073 pub struct FidlvizDemo<'de> {
11074 pub f1: u8,
11075
11076 pub f2: i8,
11077
11078 pub f3: ::fidl_next::wire::Uint16,
11079
11080 pub f4: ::fidl_next::wire::Uint32,
11081
11082 pub f5: ::fidl_next::wire::Uint64,
11083
11084 pub f6: u8,
11085
11086 pub f7: u8,
11087
11088 pub f8: ::fidl_next::wire::Uint16,
11089
11090 pub f9: ::fidl_next::wire::Float32,
11091
11092 pub f10: ::fidl_next::wire::Float64,
11093
11094 pub f11: bool,
11095
11096 pub f12: bool,
11097
11098 pub f13: ::fidl_next::wire::String<'de>,
11099
11100 pub f14: ::fidl_next::wire::OptionalString<'de>,
11101
11102 pub f15: ::fidl_next::wire::String<'de>,
11103
11104 pub f16: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11105
11106 pub f17: ::fidl_next::wire::fuchsia::NullableHandle,
11107
11108 pub f18: [u8; 3],
11109
11110 pub f19: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Float64>,
11111
11112 pub f20: ::fidl_next::wire::OptionalVector<'de, u8>,
11113
11114 pub f21: ::fidl_next::wire::Vector<'de, u8>,
11115
11116 pub f22: crate::wire::FidlvizBits,
11117
11118 pub f23: crate::wire::FidlvizEnum,
11119
11120 pub f24: crate::wire::FidlvizStruct1,
11121
11122 pub f25: crate::wire::FidlvizStruct2,
11123
11124 pub f26: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct1>,
11125
11126 pub f27: ::fidl_next::wire::Box<'de, crate::wire::FidlvizStruct2>,
11127
11128 pub f28: crate::wire::FidlvizTable<'de>,
11129
11130 pub f29: crate::wire::FidlvizTable<'de>,
11131
11132 pub f30: crate::wire_optional::FidlvizUnion<'de>,
11133
11134 pub f31: crate::wire::FidlvizUnion<'de>,
11135 }
11136
11137 static_assertions::const_assert_eq!(std::mem::size_of::<FidlvizDemo<'_>>(), 248);
11138 static_assertions::const_assert_eq!(std::mem::align_of::<FidlvizDemo<'_>>(), 8);
11139
11140 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f1), 0);
11141
11142 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f2), 1);
11143
11144 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f3), 2);
11145
11146 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f4), 4);
11147
11148 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f5), 8);
11149
11150 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f6), 16);
11151
11152 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f7), 17);
11153
11154 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f8), 18);
11155
11156 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f9), 20);
11157
11158 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f10), 24);
11159
11160 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f11), 32);
11161
11162 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f12), 33);
11163
11164 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f13), 40);
11165
11166 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f14), 56);
11167
11168 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f15), 72);
11169
11170 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f16), 88);
11171
11172 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f17), 92);
11173
11174 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f18), 96);
11175
11176 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f19), 104);
11177
11178 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f20), 120);
11179
11180 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f21), 136);
11181
11182 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f22), 152);
11183
11184 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f23), 153);
11185
11186 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f24), 154);
11187
11188 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f25), 160);
11189
11190 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f26), 168);
11191
11192 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f27), 176);
11193
11194 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f28), 184);
11195
11196 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f29), 200);
11197
11198 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f30), 216);
11199
11200 static_assertions::const_assert_eq!(std::mem::offset_of!(FidlvizDemo<'_>, f31), 232);
11201
11202 impl ::fidl_next::Constrained for FidlvizDemo<'_> {
11203 type Constraint = ();
11204
11205 fn validate(
11206 _: ::fidl_next::Slot<'_, Self>,
11207 _: Self::Constraint,
11208 ) -> Result<(), ::fidl_next::ValidationError> {
11209 Ok(())
11210 }
11211 }
11212
11213 unsafe impl ::fidl_next::Wire for FidlvizDemo<'static> {
11214 type Narrowed<'de> = FidlvizDemo<'de>;
11215
11216 #[inline]
11217 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11218 ::fidl_next::munge! {
11219 let Self {
11220 f1,
11221 f2,
11222 f3,
11223 f4,
11224 f5,
11225 f6,
11226 f7,
11227 f8,
11228 f9,
11229 f10,
11230 f11,
11231 f12,
11232 f13,
11233 f14,
11234 f15,
11235 f16,
11236 f17,
11237 f18,
11238 f19,
11239 f20,
11240 f21,
11241 f22,
11242 f23,
11243 f24,
11244 f25,
11245 f26,
11246 f27,
11247 f28,
11248 f29,
11249 f30,
11250 f31,
11251
11252 } = &mut *out_;
11253 }
11254
11255 ::fidl_next::Wire::zero_padding(f1);
11256
11257 ::fidl_next::Wire::zero_padding(f2);
11258
11259 ::fidl_next::Wire::zero_padding(f3);
11260
11261 ::fidl_next::Wire::zero_padding(f4);
11262
11263 ::fidl_next::Wire::zero_padding(f5);
11264
11265 ::fidl_next::Wire::zero_padding(f6);
11266
11267 ::fidl_next::Wire::zero_padding(f7);
11268
11269 ::fidl_next::Wire::zero_padding(f8);
11270
11271 ::fidl_next::Wire::zero_padding(f9);
11272
11273 ::fidl_next::Wire::zero_padding(f10);
11274
11275 ::fidl_next::Wire::zero_padding(f11);
11276
11277 ::fidl_next::Wire::zero_padding(f12);
11278
11279 ::fidl_next::Wire::zero_padding(f13);
11280
11281 ::fidl_next::Wire::zero_padding(f14);
11282
11283 ::fidl_next::Wire::zero_padding(f15);
11284
11285 ::fidl_next::Wire::zero_padding(f16);
11286
11287 ::fidl_next::Wire::zero_padding(f17);
11288
11289 ::fidl_next::Wire::zero_padding(f18);
11290
11291 ::fidl_next::Wire::zero_padding(f19);
11292
11293 ::fidl_next::Wire::zero_padding(f20);
11294
11295 ::fidl_next::Wire::zero_padding(f21);
11296
11297 ::fidl_next::Wire::zero_padding(f22);
11298
11299 ::fidl_next::Wire::zero_padding(f23);
11300
11301 ::fidl_next::Wire::zero_padding(f24);
11302
11303 ::fidl_next::Wire::zero_padding(f25);
11304
11305 ::fidl_next::Wire::zero_padding(f26);
11306
11307 ::fidl_next::Wire::zero_padding(f27);
11308
11309 ::fidl_next::Wire::zero_padding(f28);
11310
11311 ::fidl_next::Wire::zero_padding(f29);
11312
11313 ::fidl_next::Wire::zero_padding(f30);
11314
11315 ::fidl_next::Wire::zero_padding(f31);
11316
11317 unsafe {
11318 out_.as_mut_ptr().cast::<u8>().add(155).write_bytes(0, 5);
11319 }
11320
11321 unsafe {
11322 out_.as_mut_ptr().cast::<u8>().add(99).write_bytes(0, 5);
11323 }
11324
11325 unsafe {
11326 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 6);
11327 }
11328 }
11329 }
11330
11331 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FidlvizDemo<'de>
11332 where
11333 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11334 ___D: ::fidl_next::Decoder<'de>,
11335 ___D: ::fidl_next::fuchsia::HandleDecoder,
11336 {
11337 fn decode(
11338 slot_: ::fidl_next::Slot<'_, Self>,
11339 decoder_: &mut ___D,
11340 _: (),
11341 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11342 if slot_.as_bytes()[155..160] != [0u8; 5] {
11343 return Err(::fidl_next::DecodeError::InvalidPadding);
11344 }
11345
11346 if slot_.as_bytes()[99..104] != [0u8; 5] {
11347 return Err(::fidl_next::DecodeError::InvalidPadding);
11348 }
11349
11350 if slot_.as_bytes()[34..40] != [0u8; 6] {
11351 return Err(::fidl_next::DecodeError::InvalidPadding);
11352 }
11353
11354 ::fidl_next::munge! {
11355 let Self {
11356 mut f1,
11357 mut f2,
11358 mut f3,
11359 mut f4,
11360 mut f5,
11361 mut f6,
11362 mut f7,
11363 mut f8,
11364 mut f9,
11365 mut f10,
11366 mut f11,
11367 mut f12,
11368 mut f13,
11369 mut f14,
11370 mut f15,
11371 mut f16,
11372 mut f17,
11373 mut f18,
11374 mut f19,
11375 mut f20,
11376 mut f21,
11377 mut f22,
11378 mut f23,
11379 mut f24,
11380 mut f25,
11381 mut f26,
11382 mut f27,
11383 mut f28,
11384 mut f29,
11385 mut f30,
11386 mut f31,
11387
11388 } = slot_;
11389 }
11390
11391 let _field = f1.as_mut();
11392
11393 ::fidl_next::Decode::decode(f1.as_mut(), decoder_, ())?;
11394
11395 let _field = f2.as_mut();
11396
11397 ::fidl_next::Decode::decode(f2.as_mut(), decoder_, ())?;
11398
11399 let _field = f3.as_mut();
11400
11401 ::fidl_next::Decode::decode(f3.as_mut(), decoder_, ())?;
11402
11403 let _field = f4.as_mut();
11404
11405 ::fidl_next::Decode::decode(f4.as_mut(), decoder_, ())?;
11406
11407 let _field = f5.as_mut();
11408
11409 ::fidl_next::Decode::decode(f5.as_mut(), decoder_, ())?;
11410
11411 let _field = f6.as_mut();
11412
11413 ::fidl_next::Decode::decode(f6.as_mut(), decoder_, ())?;
11414
11415 let _field = f7.as_mut();
11416
11417 ::fidl_next::Decode::decode(f7.as_mut(), decoder_, ())?;
11418
11419 let _field = f8.as_mut();
11420
11421 ::fidl_next::Decode::decode(f8.as_mut(), decoder_, ())?;
11422
11423 let _field = f9.as_mut();
11424
11425 ::fidl_next::Decode::decode(f9.as_mut(), decoder_, ())?;
11426
11427 let _field = f10.as_mut();
11428
11429 ::fidl_next::Decode::decode(f10.as_mut(), decoder_, ())?;
11430
11431 let _field = f11.as_mut();
11432
11433 ::fidl_next::Decode::decode(f11.as_mut(), decoder_, ())?;
11434
11435 let _field = f12.as_mut();
11436
11437 ::fidl_next::Decode::decode(f12.as_mut(), decoder_, ())?;
11438
11439 let _field = f13.as_mut();
11440 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11441 ::fidl_next::Decode::decode(f13.as_mut(), decoder_, 4294967295)?;
11442
11443 let _field = f14.as_mut();
11444 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11445 ::fidl_next::Decode::decode(f14.as_mut(), decoder_, 4294967295)?;
11446
11447 let _field = f15.as_mut();
11448 ::fidl_next::Constrained::validate(_field, 4294967295)?;
11449 ::fidl_next::Decode::decode(f15.as_mut(), decoder_, 4294967295)?;
11450
11451 let _field = f16.as_mut();
11452
11453 ::fidl_next::Decode::decode(f16.as_mut(), decoder_, ())?;
11454
11455 let _field = f17.as_mut();
11456
11457 ::fidl_next::Decode::decode(f17.as_mut(), decoder_, ())?;
11458
11459 let _field = f18.as_mut();
11460
11461 ::fidl_next::Decode::decode(f18.as_mut(), decoder_, ())?;
11462
11463 let _field = f19.as_mut();
11464 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11465 ::fidl_next::Decode::decode(f19.as_mut(), decoder_, (4294967295, ()))?;
11466
11467 let _field = f20.as_mut();
11468 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11469 ::fidl_next::Decode::decode(f20.as_mut(), decoder_, (4294967295, ()))?;
11470
11471 let _field = f21.as_mut();
11472 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
11473 ::fidl_next::Decode::decode(f21.as_mut(), decoder_, (4294967295, ()))?;
11474
11475 let _field = f22.as_mut();
11476
11477 ::fidl_next::Decode::decode(f22.as_mut(), decoder_, ())?;
11478
11479 let _field = f23.as_mut();
11480
11481 ::fidl_next::Decode::decode(f23.as_mut(), decoder_, ())?;
11482
11483 let _field = f24.as_mut();
11484
11485 ::fidl_next::Decode::decode(f24.as_mut(), decoder_, ())?;
11486
11487 let _field = f25.as_mut();
11488
11489 ::fidl_next::Decode::decode(f25.as_mut(), decoder_, ())?;
11490
11491 let _field = f26.as_mut();
11492
11493 ::fidl_next::Decode::decode(f26.as_mut(), decoder_, ())?;
11494
11495 let _field = f27.as_mut();
11496
11497 ::fidl_next::Decode::decode(f27.as_mut(), decoder_, ())?;
11498
11499 let _field = f28.as_mut();
11500
11501 ::fidl_next::Decode::decode(f28.as_mut(), decoder_, ())?;
11502
11503 let _field = f29.as_mut();
11504
11505 ::fidl_next::Decode::decode(f29.as_mut(), decoder_, ())?;
11506
11507 let _field = f30.as_mut();
11508
11509 ::fidl_next::Decode::decode(f30.as_mut(), decoder_, ())?;
11510
11511 let _field = f31.as_mut();
11512
11513 ::fidl_next::Decode::decode(f31.as_mut(), decoder_, ())?;
11514
11515 Ok(())
11516 }
11517 }
11518
11519 impl<'de> ::fidl_next::IntoNatural for FidlvizDemo<'de> {
11520 type Natural = crate::natural::FidlvizDemo;
11521 }
11522
11523 #[derive(Debug)]
11525 #[repr(C)]
11526 pub struct GoldenHandleBasicRightsStruct {
11527 pub v: ::fidl_next::wire::fuchsia::Event,
11528 }
11529
11530 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenHandleBasicRightsStruct>(), 4);
11531 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenHandleBasicRightsStruct>(), 4);
11532
11533 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenHandleBasicRightsStruct, v), 0);
11534
11535 impl ::fidl_next::Constrained for GoldenHandleBasicRightsStruct {
11536 type Constraint = ();
11537
11538 fn validate(
11539 _: ::fidl_next::Slot<'_, Self>,
11540 _: Self::Constraint,
11541 ) -> Result<(), ::fidl_next::ValidationError> {
11542 Ok(())
11543 }
11544 }
11545
11546 unsafe impl ::fidl_next::Wire for GoldenHandleBasicRightsStruct {
11547 type Narrowed<'de> = GoldenHandleBasicRightsStruct;
11548
11549 #[inline]
11550 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11551 ::fidl_next::munge! {
11552 let Self {
11553 v,
11554
11555 } = &mut *out_;
11556 }
11557
11558 ::fidl_next::Wire::zero_padding(v);
11559 }
11560 }
11561
11562 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenHandleBasicRightsStruct
11563 where
11564 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11565 ___D: ::fidl_next::fuchsia::HandleDecoder,
11566 {
11567 fn decode(
11568 slot_: ::fidl_next::Slot<'_, Self>,
11569 decoder_: &mut ___D,
11570 _: (),
11571 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11572 ::fidl_next::munge! {
11573 let Self {
11574 mut v,
11575
11576 } = slot_;
11577 }
11578
11579 let _field = v.as_mut();
11580
11581 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11582
11583 Ok(())
11584 }
11585 }
11586
11587 impl ::fidl_next::IntoNatural for GoldenHandleBasicRightsStruct {
11588 type Natural = crate::natural::GoldenHandleBasicRightsStruct;
11589 }
11590
11591 #[derive(Debug)]
11593 #[repr(C)]
11594 pub struct GoldenNullableHandleStruct {
11595 pub v: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
11596 }
11597
11598 static_assertions::const_assert_eq!(std::mem::size_of::<GoldenNullableHandleStruct>(), 4);
11599 static_assertions::const_assert_eq!(std::mem::align_of::<GoldenNullableHandleStruct>(), 4);
11600
11601 static_assertions::const_assert_eq!(std::mem::offset_of!(GoldenNullableHandleStruct, v), 0);
11602
11603 impl ::fidl_next::Constrained for GoldenNullableHandleStruct {
11604 type Constraint = ();
11605
11606 fn validate(
11607 _: ::fidl_next::Slot<'_, Self>,
11608 _: Self::Constraint,
11609 ) -> Result<(), ::fidl_next::ValidationError> {
11610 Ok(())
11611 }
11612 }
11613
11614 unsafe impl ::fidl_next::Wire for GoldenNullableHandleStruct {
11615 type Narrowed<'de> = GoldenNullableHandleStruct;
11616
11617 #[inline]
11618 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11619 ::fidl_next::munge! {
11620 let Self {
11621 v,
11622
11623 } = &mut *out_;
11624 }
11625
11626 ::fidl_next::Wire::zero_padding(v);
11627 }
11628 }
11629
11630 unsafe impl<___D> ::fidl_next::Decode<___D> for GoldenNullableHandleStruct
11631 where
11632 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11633 ___D: ::fidl_next::fuchsia::HandleDecoder,
11634 {
11635 fn decode(
11636 slot_: ::fidl_next::Slot<'_, Self>,
11637 decoder_: &mut ___D,
11638 _: (),
11639 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11640 ::fidl_next::munge! {
11641 let Self {
11642 mut v,
11643
11644 } = slot_;
11645 }
11646
11647 let _field = v.as_mut();
11648
11649 ::fidl_next::Decode::decode(v.as_mut(), decoder_, ())?;
11650
11651 Ok(())
11652 }
11653 }
11654
11655 impl ::fidl_next::IntoNatural for GoldenNullableHandleStruct {
11656 type Natural = crate::natural::GoldenNullableHandleStruct;
11657 }
11658
11659 #[derive(Debug)]
11661 #[repr(C)]
11662 pub struct MultipleBoundedNonnullableVectorsOfHandles<'de> {
11663 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11664
11665 pub vh1: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11666 }
11667
11668 static_assertions::const_assert_eq!(
11669 std::mem::size_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11670 32
11671 );
11672 static_assertions::const_assert_eq!(
11673 std::mem::align_of::<MultipleBoundedNonnullableVectorsOfHandles<'_>>(),
11674 8
11675 );
11676
11677 static_assertions::const_assert_eq!(
11678 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh0),
11679 0
11680 );
11681
11682 static_assertions::const_assert_eq!(
11683 std::mem::offset_of!(MultipleBoundedNonnullableVectorsOfHandles<'_>, vh1),
11684 16
11685 );
11686
11687 impl ::fidl_next::Constrained for MultipleBoundedNonnullableVectorsOfHandles<'_> {
11688 type Constraint = ();
11689
11690 fn validate(
11691 _: ::fidl_next::Slot<'_, Self>,
11692 _: Self::Constraint,
11693 ) -> Result<(), ::fidl_next::ValidationError> {
11694 Ok(())
11695 }
11696 }
11697
11698 unsafe impl ::fidl_next::Wire for MultipleBoundedNonnullableVectorsOfHandles<'static> {
11699 type Narrowed<'de> = MultipleBoundedNonnullableVectorsOfHandles<'de>;
11700
11701 #[inline]
11702 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11703 ::fidl_next::munge! {
11704 let Self {
11705 vh0,
11706 vh1,
11707
11708 } = &mut *out_;
11709 }
11710
11711 ::fidl_next::Wire::zero_padding(vh0);
11712
11713 ::fidl_next::Wire::zero_padding(vh1);
11714 }
11715 }
11716
11717 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNonnullableVectorsOfHandles<'de>
11718 where
11719 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11720 ___D: ::fidl_next::Decoder<'de>,
11721 ___D: ::fidl_next::fuchsia::HandleDecoder,
11722 {
11723 fn decode(
11724 slot_: ::fidl_next::Slot<'_, Self>,
11725 decoder_: &mut ___D,
11726 _: (),
11727 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11728 ::fidl_next::munge! {
11729 let Self {
11730 mut vh0,
11731 mut vh1,
11732
11733 } = slot_;
11734 }
11735
11736 let _field = vh0.as_mut();
11737 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11738 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11739
11740 let vh0 = unsafe { vh0.deref_unchecked() };
11741
11742 if vh0.len() > 2 {
11743 return Err(::fidl_next::DecodeError::VectorTooLong {
11744 size: vh0.len() as u64,
11745 limit: 2,
11746 });
11747 }
11748
11749 let _field = vh1.as_mut();
11750 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11751 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11752
11753 let vh1 = unsafe { vh1.deref_unchecked() };
11754
11755 if vh1.len() > 32 {
11756 return Err(::fidl_next::DecodeError::VectorTooLong {
11757 size: vh1.len() as u64,
11758 limit: 32,
11759 });
11760 }
11761
11762 Ok(())
11763 }
11764 }
11765
11766 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNonnullableVectorsOfHandles<'de> {
11767 type Natural = crate::natural::MultipleBoundedNonnullableVectorsOfHandles;
11768 }
11769
11770 #[derive(Debug)]
11772 #[repr(C)]
11773 pub struct MultipleBoundedNullableVectorsOfHandles<'de> {
11774 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11775
11776 pub vh1: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
11777 }
11778
11779 static_assertions::const_assert_eq!(
11780 std::mem::size_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11781 32
11782 );
11783 static_assertions::const_assert_eq!(
11784 std::mem::align_of::<MultipleBoundedNullableVectorsOfHandles<'_>>(),
11785 8
11786 );
11787
11788 static_assertions::const_assert_eq!(
11789 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh0),
11790 0
11791 );
11792
11793 static_assertions::const_assert_eq!(
11794 std::mem::offset_of!(MultipleBoundedNullableVectorsOfHandles<'_>, vh1),
11795 16
11796 );
11797
11798 impl ::fidl_next::Constrained for MultipleBoundedNullableVectorsOfHandles<'_> {
11799 type Constraint = ();
11800
11801 fn validate(
11802 _: ::fidl_next::Slot<'_, Self>,
11803 _: Self::Constraint,
11804 ) -> Result<(), ::fidl_next::ValidationError> {
11805 Ok(())
11806 }
11807 }
11808
11809 unsafe impl ::fidl_next::Wire for MultipleBoundedNullableVectorsOfHandles<'static> {
11810 type Narrowed<'de> = MultipleBoundedNullableVectorsOfHandles<'de>;
11811
11812 #[inline]
11813 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11814 ::fidl_next::munge! {
11815 let Self {
11816 vh0,
11817 vh1,
11818
11819 } = &mut *out_;
11820 }
11821
11822 ::fidl_next::Wire::zero_padding(vh0);
11823
11824 ::fidl_next::Wire::zero_padding(vh1);
11825 }
11826 }
11827
11828 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MultipleBoundedNullableVectorsOfHandles<'de>
11829 where
11830 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11831 ___D: ::fidl_next::Decoder<'de>,
11832 ___D: ::fidl_next::fuchsia::HandleDecoder,
11833 {
11834 fn decode(
11835 slot_: ::fidl_next::Slot<'_, Self>,
11836 decoder_: &mut ___D,
11837 _: (),
11838 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11839 ::fidl_next::munge! {
11840 let Self {
11841 mut vh0,
11842 mut vh1,
11843
11844 } = slot_;
11845 }
11846
11847 let _field = vh0.as_mut();
11848 ::fidl_next::Constrained::validate(_field, (2, ()))?;
11849 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (2, ()))?;
11850
11851 let vh0 = unsafe { vh0.deref_unchecked() };
11852
11853 if let Some(vh0) = vh0.as_ref() {
11854 if vh0.len() > 2 {
11855 return Err(::fidl_next::DecodeError::VectorTooLong {
11856 size: vh0.len() as u64,
11857 limit: 2,
11858 });
11859 }
11860 }
11861
11862 let _field = vh1.as_mut();
11863 ::fidl_next::Constrained::validate(_field, (32, ()))?;
11864 ::fidl_next::Decode::decode(vh1.as_mut(), decoder_, (32, ()))?;
11865
11866 let vh1 = unsafe { vh1.deref_unchecked() };
11867
11868 if let Some(vh1) = vh1.as_ref() {
11869 if vh1.len() > 32 {
11870 return Err(::fidl_next::DecodeError::VectorTooLong {
11871 size: vh1.len() as u64,
11872 limit: 32,
11873 });
11874 }
11875 }
11876
11877 Ok(())
11878 }
11879 }
11880
11881 impl<'de> ::fidl_next::IntoNatural for MultipleBoundedNullableVectorsOfHandles<'de> {
11882 type Natural = crate::natural::MultipleBoundedNullableVectorsOfHandles;
11883 }
11884
11885 #[derive(Debug)]
11887 #[repr(C)]
11888 pub struct MultipleHandleSubtypes {
11889 pub untyped: ::fidl_next::wire::fuchsia::NullableHandle,
11890
11891 pub event: ::fidl_next::wire::fuchsia::Event,
11892
11893 pub channel: ::fidl_next::wire::fuchsia::Channel,
11894 }
11895
11896 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleHandleSubtypes>(), 12);
11897 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleHandleSubtypes>(), 4);
11898
11899 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, untyped), 0);
11900
11901 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, event), 4);
11902
11903 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleHandleSubtypes, channel), 8);
11904
11905 impl ::fidl_next::Constrained for MultipleHandleSubtypes {
11906 type Constraint = ();
11907
11908 fn validate(
11909 _: ::fidl_next::Slot<'_, Self>,
11910 _: Self::Constraint,
11911 ) -> Result<(), ::fidl_next::ValidationError> {
11912 Ok(())
11913 }
11914 }
11915
11916 unsafe impl ::fidl_next::Wire for MultipleHandleSubtypes {
11917 type Narrowed<'de> = MultipleHandleSubtypes;
11918
11919 #[inline]
11920 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11921 ::fidl_next::munge! {
11922 let Self {
11923 untyped,
11924 event,
11925 channel,
11926
11927 } = &mut *out_;
11928 }
11929
11930 ::fidl_next::Wire::zero_padding(untyped);
11931
11932 ::fidl_next::Wire::zero_padding(event);
11933
11934 ::fidl_next::Wire::zero_padding(channel);
11935 }
11936 }
11937
11938 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleHandleSubtypes
11939 where
11940 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11941 ___D: ::fidl_next::fuchsia::HandleDecoder,
11942 {
11943 fn decode(
11944 slot_: ::fidl_next::Slot<'_, Self>,
11945 decoder_: &mut ___D,
11946 _: (),
11947 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11948 ::fidl_next::munge! {
11949 let Self {
11950 mut untyped,
11951 mut event,
11952 mut channel,
11953
11954 } = slot_;
11955 }
11956
11957 let _field = untyped.as_mut();
11958
11959 ::fidl_next::Decode::decode(untyped.as_mut(), decoder_, ())?;
11960
11961 let _field = event.as_mut();
11962
11963 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
11964
11965 let _field = channel.as_mut();
11966
11967 ::fidl_next::Decode::decode(channel.as_mut(), decoder_, ())?;
11968
11969 Ok(())
11970 }
11971 }
11972
11973 impl ::fidl_next::IntoNatural for MultipleHandleSubtypes {
11974 type Natural = crate::natural::MultipleHandleSubtypes;
11975 }
11976
11977 #[derive(Debug)]
11979 #[repr(C)]
11980 pub struct MultipleNonnullableHandles {
11981 pub data0: ::fidl_next::wire::Uint32,
11982
11983 pub handle0: ::fidl_next::wire::fuchsia::NullableHandle,
11984
11985 pub data1: ::fidl_next::wire::Uint64,
11986
11987 pub handle1: ::fidl_next::wire::fuchsia::Channel,
11988
11989 pub handle2: ::fidl_next::wire::fuchsia::Event,
11990
11991 pub data2: ::fidl_next::wire::Uint64,
11992 }
11993
11994 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNonnullableHandles>(), 32);
11995 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNonnullableHandles>(), 8);
11996
11997 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data0), 0);
11998
11999 static_assertions::const_assert_eq!(
12000 std::mem::offset_of!(MultipleNonnullableHandles, handle0),
12001 4
12002 );
12003
12004 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNonnullableHandles, data1), 8);
12005
12006 static_assertions::const_assert_eq!(
12007 std::mem::offset_of!(MultipleNonnullableHandles, handle1),
12008 16
12009 );
12010
12011 static_assertions::const_assert_eq!(
12012 std::mem::offset_of!(MultipleNonnullableHandles, handle2),
12013 20
12014 );
12015
12016 static_assertions::const_assert_eq!(
12017 std::mem::offset_of!(MultipleNonnullableHandles, data2),
12018 24
12019 );
12020
12021 impl ::fidl_next::Constrained for MultipleNonnullableHandles {
12022 type Constraint = ();
12023
12024 fn validate(
12025 _: ::fidl_next::Slot<'_, Self>,
12026 _: Self::Constraint,
12027 ) -> Result<(), ::fidl_next::ValidationError> {
12028 Ok(())
12029 }
12030 }
12031
12032 unsafe impl ::fidl_next::Wire for MultipleNonnullableHandles {
12033 type Narrowed<'de> = MultipleNonnullableHandles;
12034
12035 #[inline]
12036 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12037 ::fidl_next::munge! {
12038 let Self {
12039 data0,
12040 handle0,
12041 data1,
12042 handle1,
12043 handle2,
12044 data2,
12045
12046 } = &mut *out_;
12047 }
12048
12049 ::fidl_next::Wire::zero_padding(data0);
12050
12051 ::fidl_next::Wire::zero_padding(handle0);
12052
12053 ::fidl_next::Wire::zero_padding(data1);
12054
12055 ::fidl_next::Wire::zero_padding(handle1);
12056
12057 ::fidl_next::Wire::zero_padding(handle2);
12058
12059 ::fidl_next::Wire::zero_padding(data2);
12060 }
12061 }
12062
12063 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNonnullableHandles
12064 where
12065 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12066 ___D: ::fidl_next::fuchsia::HandleDecoder,
12067 {
12068 fn decode(
12069 slot_: ::fidl_next::Slot<'_, Self>,
12070 decoder_: &mut ___D,
12071 _: (),
12072 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12073 ::fidl_next::munge! {
12074 let Self {
12075 mut data0,
12076 mut handle0,
12077 mut data1,
12078 mut handle1,
12079 mut handle2,
12080 mut data2,
12081
12082 } = slot_;
12083 }
12084
12085 let _field = data0.as_mut();
12086
12087 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
12088
12089 let _field = handle0.as_mut();
12090
12091 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
12092
12093 let _field = data1.as_mut();
12094
12095 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
12096
12097 let _field = handle1.as_mut();
12098
12099 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
12100
12101 let _field = handle2.as_mut();
12102
12103 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
12104
12105 let _field = data2.as_mut();
12106
12107 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
12108
12109 Ok(())
12110 }
12111 }
12112
12113 impl ::fidl_next::IntoNatural for MultipleNonnullableHandles {
12114 type Natural = crate::natural::MultipleNonnullableHandles;
12115 }
12116
12117 #[derive(Debug)]
12119 #[repr(C)]
12120 pub struct MultipleNullableHandles {
12121 pub data0: ::fidl_next::wire::Uint32,
12122
12123 pub handle0: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
12124
12125 pub data1: ::fidl_next::wire::Uint64,
12126
12127 pub handle1: ::fidl_next::wire::fuchsia::OptionalChannel,
12128
12129 pub handle2: ::fidl_next::wire::fuchsia::OptionalEvent,
12130
12131 pub data2: ::fidl_next::wire::Uint64,
12132 }
12133
12134 static_assertions::const_assert_eq!(std::mem::size_of::<MultipleNullableHandles>(), 32);
12135 static_assertions::const_assert_eq!(std::mem::align_of::<MultipleNullableHandles>(), 8);
12136
12137 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data0), 0);
12138
12139 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle0), 4);
12140
12141 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data1), 8);
12142
12143 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle1), 16);
12144
12145 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, handle2), 20);
12146
12147 static_assertions::const_assert_eq!(std::mem::offset_of!(MultipleNullableHandles, data2), 24);
12148
12149 impl ::fidl_next::Constrained for MultipleNullableHandles {
12150 type Constraint = ();
12151
12152 fn validate(
12153 _: ::fidl_next::Slot<'_, Self>,
12154 _: Self::Constraint,
12155 ) -> Result<(), ::fidl_next::ValidationError> {
12156 Ok(())
12157 }
12158 }
12159
12160 unsafe impl ::fidl_next::Wire for MultipleNullableHandles {
12161 type Narrowed<'de> = MultipleNullableHandles;
12162
12163 #[inline]
12164 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12165 ::fidl_next::munge! {
12166 let Self {
12167 data0,
12168 handle0,
12169 data1,
12170 handle1,
12171 handle2,
12172 data2,
12173
12174 } = &mut *out_;
12175 }
12176
12177 ::fidl_next::Wire::zero_padding(data0);
12178
12179 ::fidl_next::Wire::zero_padding(handle0);
12180
12181 ::fidl_next::Wire::zero_padding(data1);
12182
12183 ::fidl_next::Wire::zero_padding(handle1);
12184
12185 ::fidl_next::Wire::zero_padding(handle2);
12186
12187 ::fidl_next::Wire::zero_padding(data2);
12188 }
12189 }
12190
12191 unsafe impl<___D> ::fidl_next::Decode<___D> for MultipleNullableHandles
12192 where
12193 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12194 ___D: ::fidl_next::fuchsia::HandleDecoder,
12195 {
12196 fn decode(
12197 slot_: ::fidl_next::Slot<'_, Self>,
12198 decoder_: &mut ___D,
12199 _: (),
12200 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12201 ::fidl_next::munge! {
12202 let Self {
12203 mut data0,
12204 mut handle0,
12205 mut data1,
12206 mut handle1,
12207 mut handle2,
12208 mut data2,
12209
12210 } = slot_;
12211 }
12212
12213 let _field = data0.as_mut();
12214
12215 ::fidl_next::Decode::decode(data0.as_mut(), decoder_, ())?;
12216
12217 let _field = handle0.as_mut();
12218
12219 ::fidl_next::Decode::decode(handle0.as_mut(), decoder_, ())?;
12220
12221 let _field = data1.as_mut();
12222
12223 ::fidl_next::Decode::decode(data1.as_mut(), decoder_, ())?;
12224
12225 let _field = handle1.as_mut();
12226
12227 ::fidl_next::Decode::decode(handle1.as_mut(), decoder_, ())?;
12228
12229 let _field = handle2.as_mut();
12230
12231 ::fidl_next::Decode::decode(handle2.as_mut(), decoder_, ())?;
12232
12233 let _field = data2.as_mut();
12234
12235 ::fidl_next::Decode::decode(data2.as_mut(), decoder_, ())?;
12236
12237 Ok(())
12238 }
12239 }
12240
12241 impl ::fidl_next::IntoNatural for MultipleNullableHandles {
12242 type Natural = crate::natural::MultipleNullableHandles;
12243 }
12244
12245 #[derive(Debug)]
12247 #[repr(C)]
12248 pub struct NonnullableHandle {
12249 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
12250 }
12251
12252 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandle>(), 4);
12253 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandle>(), 4);
12254
12255 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandle, h), 0);
12256
12257 impl ::fidl_next::Constrained for NonnullableHandle {
12258 type Constraint = ();
12259
12260 fn validate(
12261 _: ::fidl_next::Slot<'_, Self>,
12262 _: Self::Constraint,
12263 ) -> Result<(), ::fidl_next::ValidationError> {
12264 Ok(())
12265 }
12266 }
12267
12268 unsafe impl ::fidl_next::Wire for NonnullableHandle {
12269 type Narrowed<'de> = NonnullableHandle;
12270
12271 #[inline]
12272 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12273 ::fidl_next::munge! {
12274 let Self {
12275 h,
12276
12277 } = &mut *out_;
12278 }
12279
12280 ::fidl_next::Wire::zero_padding(h);
12281 }
12282 }
12283
12284 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandle
12285 where
12286 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12287 ___D: ::fidl_next::fuchsia::HandleDecoder,
12288 {
12289 fn decode(
12290 slot_: ::fidl_next::Slot<'_, Self>,
12291 decoder_: &mut ___D,
12292 _: (),
12293 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12294 ::fidl_next::munge! {
12295 let Self {
12296 mut h,
12297
12298 } = slot_;
12299 }
12300
12301 let _field = h.as_mut();
12302
12303 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12304
12305 Ok(())
12306 }
12307 }
12308
12309 impl ::fidl_next::IntoNatural for NonnullableHandle {
12310 type Natural = crate::natural::NonnullableHandle;
12311 }
12312
12313 #[derive(Debug)]
12315 #[repr(C)]
12316 pub struct NonnullableHandleArray {
12317 pub handles: [::fidl_next::wire::fuchsia::NullableHandle; 4],
12318 }
12319
12320 static_assertions::const_assert_eq!(std::mem::size_of::<NonnullableHandleArray>(), 16);
12321 static_assertions::const_assert_eq!(std::mem::align_of::<NonnullableHandleArray>(), 4);
12322
12323 static_assertions::const_assert_eq!(std::mem::offset_of!(NonnullableHandleArray, handles), 0);
12324
12325 impl ::fidl_next::Constrained for NonnullableHandleArray {
12326 type Constraint = ();
12327
12328 fn validate(
12329 _: ::fidl_next::Slot<'_, Self>,
12330 _: Self::Constraint,
12331 ) -> Result<(), ::fidl_next::ValidationError> {
12332 Ok(())
12333 }
12334 }
12335
12336 unsafe impl ::fidl_next::Wire for NonnullableHandleArray {
12337 type Narrowed<'de> = NonnullableHandleArray;
12338
12339 #[inline]
12340 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12341 ::fidl_next::munge! {
12342 let Self {
12343 handles,
12344
12345 } = &mut *out_;
12346 }
12347
12348 ::fidl_next::Wire::zero_padding(handles);
12349 }
12350 }
12351
12352 unsafe impl<___D> ::fidl_next::Decode<___D> for NonnullableHandleArray
12353 where
12354 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12355 ___D: ::fidl_next::fuchsia::HandleDecoder,
12356 {
12357 fn decode(
12358 slot_: ::fidl_next::Slot<'_, Self>,
12359 decoder_: &mut ___D,
12360 _: (),
12361 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12362 ::fidl_next::munge! {
12363 let Self {
12364 mut handles,
12365
12366 } = slot_;
12367 }
12368
12369 let _field = handles.as_mut();
12370
12371 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
12372
12373 Ok(())
12374 }
12375 }
12376
12377 impl ::fidl_next::IntoNatural for NonnullableHandleArray {
12378 type Natural = crate::natural::NonnullableHandleArray;
12379 }
12380
12381 #[derive(Debug)]
12383 #[repr(C)]
12384 pub struct NullableHandle {
12385 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
12386 }
12387
12388 static_assertions::const_assert_eq!(std::mem::size_of::<NullableHandle>(), 4);
12389 static_assertions::const_assert_eq!(std::mem::align_of::<NullableHandle>(), 4);
12390
12391 static_assertions::const_assert_eq!(std::mem::offset_of!(NullableHandle, h), 0);
12392
12393 impl ::fidl_next::Constrained for NullableHandle {
12394 type Constraint = ();
12395
12396 fn validate(
12397 _: ::fidl_next::Slot<'_, Self>,
12398 _: Self::Constraint,
12399 ) -> Result<(), ::fidl_next::ValidationError> {
12400 Ok(())
12401 }
12402 }
12403
12404 unsafe impl ::fidl_next::Wire for NullableHandle {
12405 type Narrowed<'de> = NullableHandle;
12406
12407 #[inline]
12408 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12409 ::fidl_next::munge! {
12410 let Self {
12411 h,
12412
12413 } = &mut *out_;
12414 }
12415
12416 ::fidl_next::Wire::zero_padding(h);
12417 }
12418 }
12419
12420 unsafe impl<___D> ::fidl_next::Decode<___D> for NullableHandle
12421 where
12422 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12423 ___D: ::fidl_next::fuchsia::HandleDecoder,
12424 {
12425 fn decode(
12426 slot_: ::fidl_next::Slot<'_, Self>,
12427 decoder_: &mut ___D,
12428 _: (),
12429 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12430 ::fidl_next::munge! {
12431 let Self {
12432 mut h,
12433
12434 } = slot_;
12435 }
12436
12437 let _field = h.as_mut();
12438
12439 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
12440
12441 Ok(())
12442 }
12443 }
12444
12445 impl ::fidl_next::IntoNatural for NullableHandle {
12446 type Natural = crate::natural::NullableHandle;
12447 }
12448
12449 #[derive(Debug)]
12451 #[repr(C)]
12452 pub struct OutOfLineArrayOfNonnullableHandles<'de> {
12453 pub handles: ::fidl_next::wire::Box<'de, crate::wire::NonnullableHandleArray>,
12454 }
12455
12456 static_assertions::const_assert_eq!(
12457 std::mem::size_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12458 8
12459 );
12460 static_assertions::const_assert_eq!(
12461 std::mem::align_of::<OutOfLineArrayOfNonnullableHandles<'_>>(),
12462 8
12463 );
12464
12465 static_assertions::const_assert_eq!(
12466 std::mem::offset_of!(OutOfLineArrayOfNonnullableHandles<'_>, handles),
12467 0
12468 );
12469
12470 impl ::fidl_next::Constrained for OutOfLineArrayOfNonnullableHandles<'_> {
12471 type Constraint = ();
12472
12473 fn validate(
12474 _: ::fidl_next::Slot<'_, Self>,
12475 _: Self::Constraint,
12476 ) -> Result<(), ::fidl_next::ValidationError> {
12477 Ok(())
12478 }
12479 }
12480
12481 unsafe impl ::fidl_next::Wire for OutOfLineArrayOfNonnullableHandles<'static> {
12482 type Narrowed<'de> = OutOfLineArrayOfNonnullableHandles<'de>;
12483
12484 #[inline]
12485 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12486 ::fidl_next::munge! {
12487 let Self {
12488 handles,
12489
12490 } = &mut *out_;
12491 }
12492
12493 ::fidl_next::Wire::zero_padding(handles);
12494 }
12495 }
12496
12497 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OutOfLineArrayOfNonnullableHandles<'de>
12498 where
12499 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12500 ___D: ::fidl_next::Decoder<'de>,
12501 ___D: ::fidl_next::fuchsia::HandleDecoder,
12502 {
12503 fn decode(
12504 slot_: ::fidl_next::Slot<'_, Self>,
12505 decoder_: &mut ___D,
12506 _: (),
12507 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12508 ::fidl_next::munge! {
12509 let Self {
12510 mut handles,
12511
12512 } = slot_;
12513 }
12514
12515 let _field = handles.as_mut();
12516
12517 ::fidl_next::Decode::decode(handles.as_mut(), decoder_, ())?;
12518
12519 Ok(())
12520 }
12521 }
12522
12523 impl<'de> ::fidl_next::IntoNatural for OutOfLineArrayOfNonnullableHandles<'de> {
12524 type Natural = crate::natural::OutOfLineArrayOfNonnullableHandles;
12525 }
12526
12527 #[repr(transparent)]
12529 pub struct SampleResourceXUnion<'de> {
12530 pub(crate) raw: ::fidl_next::wire::Union,
12531 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12532 }
12533
12534 impl<'de> Drop for SampleResourceXUnion<'de> {
12535 fn drop(&mut self) {
12536 match self.raw.ordinal() {
12537 1 => {
12538 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12539 }
12540
12541 2 => {
12542 let _ =
12543 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12544 }
12545
12546 3 => {
12547 let _ =
12548 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12549 }
12550
12551 _ => (),
12552 }
12553 }
12554 }
12555
12556 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
12557 type Constraint = ();
12558
12559 fn validate(
12560 _: ::fidl_next::Slot<'_, Self>,
12561 _: Self::Constraint,
12562 ) -> Result<(), ::fidl_next::ValidationError> {
12563 Ok(())
12564 }
12565 }
12566
12567 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
12568 type Narrowed<'de> = SampleResourceXUnion<'de>;
12569
12570 #[inline]
12571 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12572 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12573 ::fidl_next::wire::Union::zero_padding(raw);
12574 }
12575 }
12576
12577 pub mod sample_resource_x_union {
12578 pub enum Ref<'de> {
12579 U(&'de ::fidl_next::wire::Uint32),
12580
12581 Su(&'de crate::wire::SimpleUnion<'de>),
12582
12583 St(&'de crate::wire::SimpleTable<'de>),
12584
12585 UnknownOrdinal_(u64),
12586 }
12587
12588 pub enum Value<'de> {
12589 U(::fidl_next::wire::Uint32),
12590
12591 Su(crate::wire::SimpleUnion<'de>),
12592
12593 St(crate::wire::SimpleTable<'de>),
12594
12595 UnknownOrdinal_(u64),
12596 }
12597 }
12598
12599 impl<'de> SampleResourceXUnion<'de> {
12600 pub fn as_ref(&self) -> crate::wire::sample_resource_x_union::Ref<'_> {
12601 match self.raw.ordinal() {
12602 1 => crate::wire::sample_resource_x_union::Ref::U(unsafe {
12603 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12604 }),
12605
12606 2 => crate::wire::sample_resource_x_union::Ref::Su(unsafe {
12607 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12608 }),
12609
12610 3 => crate::wire::sample_resource_x_union::Ref::St(unsafe {
12611 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12612 }),
12613
12614 unknown => crate::wire::sample_resource_x_union::Ref::UnknownOrdinal_(unknown),
12615 }
12616 }
12617
12618 pub fn into_inner(self) -> crate::wire::sample_resource_x_union::Value<'de> {
12619 let this = ::core::mem::ManuallyDrop::new(self);
12620
12621 match this.raw.ordinal() {
12622 1 => crate::wire::sample_resource_x_union::Value::U(unsafe {
12623 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
12624 }),
12625
12626 2 => crate::wire::sample_resource_x_union::Value::Su(unsafe {
12627 this.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
12628 }),
12629
12630 3 => crate::wire::sample_resource_x_union::Value::St(unsafe {
12631 this.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
12632 }),
12633
12634 unknown => crate::wire::sample_resource_x_union::Value::UnknownOrdinal_(unknown),
12635 }
12636 }
12637 }
12638
12639 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
12640 where
12641 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12642 ___D: ::fidl_next::Decoder<'de>,
12643 ___D: ::fidl_next::fuchsia::HandleDecoder,
12644 {
12645 fn decode(
12646 mut slot: ::fidl_next::Slot<'_, Self>,
12647 decoder: &mut ___D,
12648 _: (),
12649 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12650 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12651 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12652 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12653 raw,
12654 decoder,
12655 (),
12656 )?,
12657
12658 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12659 raw,
12660 decoder,
12661 (),
12662 )?,
12663
12664 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12665 raw,
12666 decoder,
12667 (),
12668 )?,
12669
12670 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
12671 }
12672
12673 Ok(())
12674 }
12675 }
12676
12677 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
12678 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12679 match self.raw.ordinal() {
12680 1 => unsafe {
12681 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12682 },
12683 2 => unsafe {
12684 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12685 },
12686 3 => unsafe {
12687 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12688 },
12689 _ => unsafe { ::core::hint::unreachable_unchecked() },
12690 }
12691 }
12692 }
12693
12694 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
12695 type Natural = crate::natural::SampleResourceXUnion;
12696 }
12697
12698 #[repr(transparent)]
12700 pub struct SampleStrictResourceXUnion<'de> {
12701 pub(crate) raw: ::fidl_next::wire::Union,
12702 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12703 }
12704
12705 impl<'de> Drop for SampleStrictResourceXUnion<'de> {
12706 fn drop(&mut self) {
12707 match self.raw.ordinal() {
12708 1 => {
12709 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
12710 }
12711
12712 2 => {
12713 let _ =
12714 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>() };
12715 }
12716
12717 3 => {
12718 let _ =
12719 unsafe { self.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>() };
12720 }
12721
12722 _ => unsafe { ::core::hint::unreachable_unchecked() },
12723 }
12724 }
12725 }
12726
12727 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
12728 type Constraint = ();
12729
12730 fn validate(
12731 _: ::fidl_next::Slot<'_, Self>,
12732 _: Self::Constraint,
12733 ) -> Result<(), ::fidl_next::ValidationError> {
12734 Ok(())
12735 }
12736 }
12737
12738 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
12739 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
12740
12741 #[inline]
12742 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12743 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12744 ::fidl_next::wire::Union::zero_padding(raw);
12745 }
12746 }
12747
12748 pub mod sample_strict_resource_x_union {
12749 pub enum Ref<'de> {
12750 U(&'de ::fidl_next::wire::Uint32),
12751
12752 Su(&'de crate::wire::SimpleUnion<'de>),
12753
12754 St(&'de crate::wire::SimpleTable<'de>),
12755 }
12756
12757 pub enum Value<'de> {
12758 U(::fidl_next::wire::Uint32),
12759
12760 Su(crate::wire::SimpleUnion<'de>),
12761
12762 St(crate::wire::SimpleTable<'de>),
12763 }
12764 }
12765
12766 impl<'de> SampleStrictResourceXUnion<'de> {
12767 pub fn as_ref(&self) -> crate::wire::sample_strict_resource_x_union::Ref<'_> {
12768 match self.raw.ordinal() {
12769 1 => crate::wire::sample_strict_resource_x_union::Ref::U(unsafe {
12770 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
12771 }),
12772
12773 2 => crate::wire::sample_strict_resource_x_union::Ref::Su(unsafe {
12774 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>()
12775 }),
12776
12777 3 => crate::wire::sample_strict_resource_x_union::Ref::St(unsafe {
12778 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>()
12779 }),
12780
12781 _ => unsafe { ::core::hint::unreachable_unchecked() },
12782 }
12783 }
12784
12785 pub fn into_inner(self) -> crate::wire::sample_strict_resource_x_union::Value<'de> {
12786 let this = ::core::mem::ManuallyDrop::new(self);
12787
12788 match this.raw.ordinal() {
12789 1 => crate::wire::sample_strict_resource_x_union::Value::U(unsafe {
12790 this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
12791 }),
12792
12793 2 => crate::wire::sample_strict_resource_x_union::Value::Su(unsafe {
12794 this.raw.get().read_unchecked::<crate::wire::SimpleUnion<'de>>()
12795 }),
12796
12797 3 => crate::wire::sample_strict_resource_x_union::Value::St(unsafe {
12798 this.raw.get().read_unchecked::<crate::wire::SimpleTable<'de>>()
12799 }),
12800
12801 _ => unsafe { ::core::hint::unreachable_unchecked() },
12802 }
12803 }
12804 }
12805
12806 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
12807 where
12808 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12809 ___D: ::fidl_next::Decoder<'de>,
12810 ___D: ::fidl_next::fuchsia::HandleDecoder,
12811 {
12812 fn decode(
12813 mut slot: ::fidl_next::Slot<'_, Self>,
12814 decoder: &mut ___D,
12815 _: (),
12816 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12817 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12818 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12819 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
12820 raw,
12821 decoder,
12822 (),
12823 )?,
12824
12825 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
12826 raw,
12827 decoder,
12828 (),
12829 )?,
12830
12831 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
12832 raw,
12833 decoder,
12834 (),
12835 )?,
12836
12837 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12838 }
12839
12840 Ok(())
12841 }
12842 }
12843
12844 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
12845 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12846 match self.raw.ordinal() {
12847 1 => unsafe {
12848 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
12849 },
12850 2 => unsafe {
12851 self.raw.get().deref_unchecked::<crate::wire::SimpleUnion<'_>>().fmt(f)
12852 },
12853 3 => unsafe {
12854 self.raw.get().deref_unchecked::<crate::wire::SimpleTable<'_>>().fmt(f)
12855 },
12856 _ => unsafe { ::core::hint::unreachable_unchecked() },
12857 }
12858 }
12859 }
12860
12861 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
12862 type Natural = crate::natural::SampleStrictResourceXUnion;
12863 }
12864
12865 #[repr(transparent)]
12867 pub struct UnionWithVector<'de> {
12868 pub(crate) raw: ::fidl_next::wire::Union,
12869 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12870 }
12871
12872 impl<'de> Drop for UnionWithVector<'de> {
12873 fn drop(&mut self) {
12874 match self.raw.ordinal() {
12875 1 => {
12876 let _ = unsafe { self.raw.get().read_unchecked::<u8>() };
12877 }
12878
12879 2 => {
12880 let _ = unsafe {
12881 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12882 };
12883 }
12884
12885 3 => {
12886 let _ = unsafe {
12887 self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
12888 };
12889 }
12890
12891 4 => {
12892 let _ = unsafe {
12893 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
12894 };
12895 }
12896
12897 5 => {
12898 let _ = unsafe {
12899 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
12900 };
12901 }
12902
12903 6 => {
12904 let _ = unsafe {
12905 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<
12906 'de,
12907 ::fidl_next::wire::fuchsia::NullableHandle,
12908 >>()
12909 };
12910 }
12911
12912 7 => {
12913 let _ = unsafe {
12914 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
12915 };
12916 }
12917
12918 8 => {
12919 let _ = unsafe {
12920 self.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
12921 };
12922 }
12923
12924 9 => {
12925 let _ = unsafe {
12926 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
12927 };
12928 }
12929
12930 _ => unsafe { ::core::hint::unreachable_unchecked() },
12931 }
12932 }
12933 }
12934
12935 impl ::fidl_next::Constrained for UnionWithVector<'_> {
12936 type Constraint = ();
12937
12938 fn validate(
12939 _: ::fidl_next::Slot<'_, Self>,
12940 _: Self::Constraint,
12941 ) -> Result<(), ::fidl_next::ValidationError> {
12942 Ok(())
12943 }
12944 }
12945
12946 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
12947 type Narrowed<'de> = UnionWithVector<'de>;
12948
12949 #[inline]
12950 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12951 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12952 ::fidl_next::wire::Union::zero_padding(raw);
12953 }
12954 }
12955
12956 pub mod union_with_vector {
12957 pub enum Ref<'de> {
12958 Unused(&'de u8),
12959
12960 VectorOfUint8(&'de ::fidl_next::wire::Vector<'de, u8>),
12961
12962 S(&'de ::fidl_next::wire::String<'de>),
12963
12964 VectorS3A1(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>),
12965
12966 VectorS3A2(&'de ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>),
12967
12968 Handles(
12969 &'de ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
12970 ),
12971
12972 ArrayS3A1(&'de [crate::wire::StructSize3Align1; 2]),
12973
12974 ArrayS3A2(&'de [crate::wire::StructSize3Align2; 2]),
12975
12976 VectorUnion(&'de ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>),
12977 }
12978
12979 pub enum Value<'de> {
12980 Unused(u8),
12981
12982 VectorOfUint8(::fidl_next::wire::Vector<'de, u8>),
12983
12984 S(::fidl_next::wire::String<'de>),
12985
12986 VectorS3A1(::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>),
12987
12988 VectorS3A2(::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>),
12989
12990 Handles(::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>),
12991
12992 ArrayS3A1([crate::wire::StructSize3Align1; 2]),
12993
12994 ArrayS3A2([crate::wire::StructSize3Align2; 2]),
12995
12996 VectorUnion(::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>),
12997 }
12998 }
12999
13000 impl<'de> UnionWithVector<'de> {
13001 pub fn as_ref(&self) -> crate::wire::union_with_vector::Ref<'_> {
13002 match self.raw.ordinal() {
13003 1 => crate::wire::union_with_vector::Ref::Unused(unsafe {
13004 self.raw.get().deref_unchecked::<u8>()
13005 }),
13006
13007 2 => crate::wire::union_with_vector::Ref::VectorOfUint8(unsafe {
13008 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13009 }),
13010
13011 3 => crate::wire::union_with_vector::Ref::S(unsafe {
13012 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
13013 }),
13014
13015 4 => crate::wire::union_with_vector::Ref::VectorS3A1(unsafe {
13016 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>>()
13017 }),
13018
13019 5 => crate::wire::union_with_vector::Ref::VectorS3A2(unsafe {
13020 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>>()
13021 }),
13022
13023 6 => crate::wire::union_with_vector::Ref::Handles(unsafe {
13024 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>>()
13025 }),
13026
13027 7 => crate::wire::union_with_vector::Ref::ArrayS3A1(unsafe {
13028 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>()
13029 }),
13030
13031 8 => crate::wire::union_with_vector::Ref::ArrayS3A2(unsafe {
13032 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>()
13033 }),
13034
13035 9 => crate::wire::union_with_vector::Ref::VectorUnion(unsafe {
13036 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>>()
13037 }),
13038
13039 _ => unsafe { ::core::hint::unreachable_unchecked() },
13040 }
13041 }
13042
13043 pub fn into_inner(self) -> crate::wire::union_with_vector::Value<'de> {
13044 let this = ::core::mem::ManuallyDrop::new(self);
13045
13046 match this.raw.ordinal() {
13047 1 => crate::wire::union_with_vector::Value::Unused(unsafe {
13048 this.raw.get().read_unchecked::<u8>()
13049 }),
13050
13051 2 => crate::wire::union_with_vector::Value::VectorOfUint8(unsafe {
13052 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13053 }),
13054
13055 3 => crate::wire::union_with_vector::Value::S(unsafe {
13056 this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
13057 }),
13058
13059 4 => crate::wire::union_with_vector::Value::VectorS3A1(unsafe {
13060 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>>()
13061 }),
13062
13063 5 => crate::wire::union_with_vector::Value::VectorS3A2(unsafe {
13064 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>>()
13065 }),
13066
13067 6 => crate::wire::union_with_vector::Value::Handles(unsafe {
13068 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>>()
13069 }),
13070
13071 7 => crate::wire::union_with_vector::Value::ArrayS3A1(unsafe {
13072 this.raw.get().read_unchecked::<[crate::wire::StructSize3Align1; 2]>()
13073 }),
13074
13075 8 => crate::wire::union_with_vector::Value::ArrayS3A2(unsafe {
13076 this.raw.get().read_unchecked::<[crate::wire::StructSize3Align2; 2]>()
13077 }),
13078
13079 9 => crate::wire::union_with_vector::Value::VectorUnion(unsafe {
13080 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>>()
13081 }),
13082
13083 _ => unsafe { ::core::hint::unreachable_unchecked() },
13084 }
13085 }
13086 }
13087
13088 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
13089 where
13090 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13091 ___D: ::fidl_next::Decoder<'de>,
13092 ___D: ::fidl_next::fuchsia::HandleDecoder,
13093 {
13094 fn decode(
13095 mut slot: ::fidl_next::Slot<'_, Self>,
13096 decoder: &mut ___D,
13097 _: (),
13098 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13099 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
13100 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
13101 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
13102
13103 2 => {
13104 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
13105 raw,
13106 decoder,
13107 (4294967295, ()),
13108 )?
13109 }
13110
13111 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
13112 raw, decoder, 4294967295,
13113 )?,
13114
13115 4 => ::fidl_next::wire::Union::decode_as::<
13116 ___D,
13117 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
13118 >(raw, decoder, (4294967295, ()))?,
13119
13120 5 => ::fidl_next::wire::Union::decode_as::<
13121 ___D,
13122 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
13123 >(raw, decoder, (4294967295, ()))?,
13124
13125 6 => ::fidl_next::wire::Union::decode_as::<
13126 ___D,
13127 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
13128 >(raw, decoder, (4294967295, ()))?,
13129
13130 7 => ::fidl_next::wire::Union::decode_as::<
13131 ___D,
13132 [crate::wire::StructSize3Align1; 2],
13133 >(raw, decoder, ())?,
13134
13135 8 => ::fidl_next::wire::Union::decode_as::<
13136 ___D,
13137 [crate::wire::StructSize3Align2; 2],
13138 >(raw, decoder, ())?,
13139
13140 9 => ::fidl_next::wire::Union::decode_as::<
13141 ___D,
13142 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
13143 >(raw, decoder, (4294967295, ()))?,
13144
13145 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
13146 }
13147
13148 Ok(())
13149 }
13150 }
13151
13152 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
13153 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
13154 match self.raw.ordinal() {
13155 1 => unsafe { self.raw.get().deref_unchecked::<u8>().fmt(f) },
13156 2 => unsafe {
13157 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
13158 },
13159 3 => unsafe {
13160 self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
13161 },
13162 4 => unsafe {
13163 self.raw.get().deref_unchecked::<
13164 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align1>
13165 >().fmt(f)
13166 },
13167 5 => unsafe {
13168 self.raw.get().deref_unchecked::<
13169 ::fidl_next::wire::Vector<'_, crate::wire::StructSize3Align2>
13170 >().fmt(f)
13171 },
13172 6 => unsafe {
13173 self.raw.get().deref_unchecked::<
13174 ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::NullableHandle>
13175 >().fmt(f)
13176 },
13177 7 => unsafe {
13178 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align1; 2]>().fmt(f)
13179 },
13180 8 => unsafe {
13181 self.raw.get().deref_unchecked::<[crate::wire::StructSize3Align2; 2]>().fmt(f)
13182 },
13183 9 => unsafe {
13184 self.raw.get().deref_unchecked::<
13185 ::fidl_next::wire::Vector<'_, crate::wire::UnionSize8Align4>
13186 >().fmt(f)
13187 },
13188 _ => unsafe { ::core::hint::unreachable_unchecked() },
13189 }
13190 }
13191 }
13192
13193 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
13194 type Natural = crate::natural::UnionWithVector;
13195 }
13196
13197 #[derive(Debug)]
13199 #[repr(C)]
13200 pub struct Sandwich6<'de> {
13201 pub before: ::fidl_next::wire::Uint32,
13202
13203 pub the_union: crate::wire::UnionWithVector<'de>,
13204
13205 pub after: ::fidl_next::wire::Uint32,
13206 }
13207
13208 static_assertions::const_assert_eq!(std::mem::size_of::<Sandwich6<'_>>(), 32);
13209 static_assertions::const_assert_eq!(std::mem::align_of::<Sandwich6<'_>>(), 8);
13210
13211 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, before), 0);
13212
13213 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, the_union), 8);
13214
13215 static_assertions::const_assert_eq!(std::mem::offset_of!(Sandwich6<'_>, after), 24);
13216
13217 impl ::fidl_next::Constrained for Sandwich6<'_> {
13218 type Constraint = ();
13219
13220 fn validate(
13221 _: ::fidl_next::Slot<'_, Self>,
13222 _: Self::Constraint,
13223 ) -> Result<(), ::fidl_next::ValidationError> {
13224 Ok(())
13225 }
13226 }
13227
13228 unsafe impl ::fidl_next::Wire for Sandwich6<'static> {
13229 type Narrowed<'de> = Sandwich6<'de>;
13230
13231 #[inline]
13232 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13233 ::fidl_next::munge! {
13234 let Self {
13235 before,
13236 the_union,
13237 after,
13238
13239 } = &mut *out_;
13240 }
13241
13242 ::fidl_next::Wire::zero_padding(before);
13243
13244 ::fidl_next::Wire::zero_padding(the_union);
13245
13246 ::fidl_next::Wire::zero_padding(after);
13247
13248 unsafe {
13249 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
13250 }
13251
13252 unsafe {
13253 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
13254 }
13255 }
13256 }
13257
13258 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Sandwich6<'de>
13259 where
13260 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13261 ___D: ::fidl_next::Decoder<'de>,
13262 ___D: ::fidl_next::fuchsia::HandleDecoder,
13263 {
13264 fn decode(
13265 slot_: ::fidl_next::Slot<'_, Self>,
13266 decoder_: &mut ___D,
13267 _: (),
13268 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13269 if slot_.as_bytes()[28..32] != [0u8; 4] {
13270 return Err(::fidl_next::DecodeError::InvalidPadding);
13271 }
13272
13273 if slot_.as_bytes()[4..8] != [0u8; 4] {
13274 return Err(::fidl_next::DecodeError::InvalidPadding);
13275 }
13276
13277 ::fidl_next::munge! {
13278 let Self {
13279 mut before,
13280 mut the_union,
13281 mut after,
13282
13283 } = slot_;
13284 }
13285
13286 let _field = before.as_mut();
13287
13288 ::fidl_next::Decode::decode(before.as_mut(), decoder_, ())?;
13289
13290 let _field = the_union.as_mut();
13291
13292 ::fidl_next::Decode::decode(the_union.as_mut(), decoder_, ())?;
13293
13294 let _field = after.as_mut();
13295
13296 ::fidl_next::Decode::decode(after.as_mut(), decoder_, ())?;
13297
13298 Ok(())
13299 }
13300 }
13301
13302 impl<'de> ::fidl_next::IntoNatural for Sandwich6<'de> {
13303 type Natural = crate::natural::Sandwich6;
13304 }
13305
13306 #[derive(Debug)]
13308 #[repr(C)]
13309 pub struct ShortStringThenHandle<'de> {
13310 pub s: ::fidl_next::wire::String<'de>,
13311
13312 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
13313 }
13314
13315 static_assertions::const_assert_eq!(std::mem::size_of::<ShortStringThenHandle<'_>>(), 24);
13316 static_assertions::const_assert_eq!(std::mem::align_of::<ShortStringThenHandle<'_>>(), 8);
13317
13318 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, s), 0);
13319
13320 static_assertions::const_assert_eq!(std::mem::offset_of!(ShortStringThenHandle<'_>, h), 16);
13321
13322 impl ::fidl_next::Constrained for ShortStringThenHandle<'_> {
13323 type Constraint = ();
13324
13325 fn validate(
13326 _: ::fidl_next::Slot<'_, Self>,
13327 _: Self::Constraint,
13328 ) -> Result<(), ::fidl_next::ValidationError> {
13329 Ok(())
13330 }
13331 }
13332
13333 unsafe impl ::fidl_next::Wire for ShortStringThenHandle<'static> {
13334 type Narrowed<'de> = ShortStringThenHandle<'de>;
13335
13336 #[inline]
13337 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13338 ::fidl_next::munge! {
13339 let Self {
13340 s,
13341 h,
13342
13343 } = &mut *out_;
13344 }
13345
13346 ::fidl_next::Wire::zero_padding(s);
13347
13348 ::fidl_next::Wire::zero_padding(h);
13349
13350 unsafe {
13351 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
13352 }
13353 }
13354 }
13355
13356 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ShortStringThenHandle<'de>
13357 where
13358 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13359 ___D: ::fidl_next::Decoder<'de>,
13360 ___D: ::fidl_next::fuchsia::HandleDecoder,
13361 {
13362 fn decode(
13363 slot_: ::fidl_next::Slot<'_, Self>,
13364 decoder_: &mut ___D,
13365 _: (),
13366 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13367 if slot_.as_bytes()[20..24] != [0u8; 4] {
13368 return Err(::fidl_next::DecodeError::InvalidPadding);
13369 }
13370
13371 ::fidl_next::munge! {
13372 let Self {
13373 mut s,
13374 mut h,
13375
13376 } = slot_;
13377 }
13378
13379 let _field = s.as_mut();
13380 ::fidl_next::Constrained::validate(_field, 1)?;
13381 ::fidl_next::Decode::decode(s.as_mut(), decoder_, 1)?;
13382
13383 let s = unsafe { s.deref_unchecked() };
13384
13385 if s.len() > 1 {
13386 return Err(::fidl_next::DecodeError::VectorTooLong {
13387 size: s.len() as u64,
13388 limit: 1,
13389 });
13390 }
13391
13392 let _field = h.as_mut();
13393
13394 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13395
13396 Ok(())
13397 }
13398 }
13399
13400 impl<'de> ::fidl_next::IntoNatural for ShortStringThenHandle<'de> {
13401 type Natural = crate::natural::ShortStringThenHandle;
13402 }
13403
13404 #[repr(C)]
13406 pub struct SimpleResourceTable<'de> {
13407 pub(crate) table: ::fidl_next::wire::Table<'de>,
13408 }
13409
13410 impl<'de> Drop for SimpleResourceTable<'de> {
13411 fn drop(&mut self) {
13412 let _ = self
13413 .table
13414 .get(1)
13415 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
13416
13417 let _ = self
13418 .table
13419 .get(5)
13420 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
13421 }
13422 }
13423
13424 impl ::fidl_next::Constrained for SimpleResourceTable<'_> {
13425 type Constraint = ();
13426
13427 fn validate(
13428 _: ::fidl_next::Slot<'_, Self>,
13429 _: Self::Constraint,
13430 ) -> Result<(), ::fidl_next::ValidationError> {
13431 Ok(())
13432 }
13433 }
13434
13435 unsafe impl ::fidl_next::Wire for SimpleResourceTable<'static> {
13436 type Narrowed<'de> = SimpleResourceTable<'de>;
13437
13438 #[inline]
13439 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13440 ::fidl_next::munge!(let Self { table } = out);
13441 ::fidl_next::wire::Table::zero_padding(table);
13442 }
13443 }
13444
13445 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SimpleResourceTable<'de>
13446 where
13447 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13448 ___D: ::fidl_next::fuchsia::HandleDecoder,
13449 {
13450 fn decode(
13451 slot: ::fidl_next::Slot<'_, Self>,
13452 decoder: &mut ___D,
13453 _: (),
13454 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13455 ::fidl_next::munge!(let Self { table } = slot);
13456
13457 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13458 match ordinal {
13459 0 => unsafe { ::core::hint::unreachable_unchecked() },
13460
13461 1 => {
13462 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
13463 slot.as_mut(),
13464 decoder,
13465 (),
13466 )?;
13467
13468 Ok(())
13469 }
13470
13471 5 => {
13472 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
13473 slot.as_mut(),
13474 decoder,
13475 (),
13476 )?;
13477
13478 Ok(())
13479 }
13480
13481 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13482 }
13483 })
13484 }
13485 }
13486
13487 impl<'de> SimpleResourceTable<'de> {
13488 pub fn x(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
13489 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13490 }
13491
13492 pub fn take_x(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
13493 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13494 }
13495
13496 pub fn y(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
13497 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13498 }
13499
13500 pub fn take_y(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
13501 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13502 }
13503 }
13504
13505 impl<'de> ::core::fmt::Debug for SimpleResourceTable<'de> {
13506 fn fmt(
13507 &self,
13508 f: &mut ::core::fmt::Formatter<'_>,
13509 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13510 f.debug_struct("SimpleResourceTable")
13511 .field("x", &self.x())
13512 .field("y", &self.y())
13513 .finish()
13514 }
13515 }
13516
13517 impl<'de> ::fidl_next::IntoNatural for SimpleResourceTable<'de> {
13518 type Natural = crate::natural::SimpleResourceTable;
13519 }
13520
13521 #[derive(Debug)]
13523 #[repr(C)]
13524 pub struct SingleHandle {
13525 pub h: ::fidl_next::wire::fuchsia::NullableHandle,
13526 }
13527
13528 static_assertions::const_assert_eq!(std::mem::size_of::<SingleHandle>(), 4);
13529 static_assertions::const_assert_eq!(std::mem::align_of::<SingleHandle>(), 4);
13530
13531 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleHandle, h), 0);
13532
13533 impl ::fidl_next::Constrained for SingleHandle {
13534 type Constraint = ();
13535
13536 fn validate(
13537 _: ::fidl_next::Slot<'_, Self>,
13538 _: Self::Constraint,
13539 ) -> Result<(), ::fidl_next::ValidationError> {
13540 Ok(())
13541 }
13542 }
13543
13544 unsafe impl ::fidl_next::Wire for SingleHandle {
13545 type Narrowed<'de> = SingleHandle;
13546
13547 #[inline]
13548 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13549 ::fidl_next::munge! {
13550 let Self {
13551 h,
13552
13553 } = &mut *out_;
13554 }
13555
13556 ::fidl_next::Wire::zero_padding(h);
13557 }
13558 }
13559
13560 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleHandle
13561 where
13562 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13563 ___D: ::fidl_next::fuchsia::HandleDecoder,
13564 {
13565 fn decode(
13566 slot_: ::fidl_next::Slot<'_, Self>,
13567 decoder_: &mut ___D,
13568 _: (),
13569 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13570 ::fidl_next::munge! {
13571 let Self {
13572 mut h,
13573
13574 } = slot_;
13575 }
13576
13577 let _field = h.as_mut();
13578
13579 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13580
13581 Ok(())
13582 }
13583 }
13584
13585 impl ::fidl_next::IntoNatural for SingleHandle {
13586 type Natural = crate::natural::SingleHandle;
13587 }
13588
13589 #[derive(Debug)]
13591 #[repr(C)]
13592 pub struct SingleOptionalHandle {
13593 pub h: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
13594 }
13595
13596 static_assertions::const_assert_eq!(std::mem::size_of::<SingleOptionalHandle>(), 4);
13597 static_assertions::const_assert_eq!(std::mem::align_of::<SingleOptionalHandle>(), 4);
13598
13599 static_assertions::const_assert_eq!(std::mem::offset_of!(SingleOptionalHandle, h), 0);
13600
13601 impl ::fidl_next::Constrained for SingleOptionalHandle {
13602 type Constraint = ();
13603
13604 fn validate(
13605 _: ::fidl_next::Slot<'_, Self>,
13606 _: Self::Constraint,
13607 ) -> Result<(), ::fidl_next::ValidationError> {
13608 Ok(())
13609 }
13610 }
13611
13612 unsafe impl ::fidl_next::Wire for SingleOptionalHandle {
13613 type Narrowed<'de> = SingleOptionalHandle;
13614
13615 #[inline]
13616 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13617 ::fidl_next::munge! {
13618 let Self {
13619 h,
13620
13621 } = &mut *out_;
13622 }
13623
13624 ::fidl_next::Wire::zero_padding(h);
13625 }
13626 }
13627
13628 unsafe impl<___D> ::fidl_next::Decode<___D> for SingleOptionalHandle
13629 where
13630 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13631 ___D: ::fidl_next::fuchsia::HandleDecoder,
13632 {
13633 fn decode(
13634 slot_: ::fidl_next::Slot<'_, Self>,
13635 decoder_: &mut ___D,
13636 _: (),
13637 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13638 ::fidl_next::munge! {
13639 let Self {
13640 mut h,
13641
13642 } = slot_;
13643 }
13644
13645 let _field = h.as_mut();
13646
13647 ::fidl_next::Decode::decode(h.as_mut(), decoder_, ())?;
13648
13649 Ok(())
13650 }
13651 }
13652
13653 impl ::fidl_next::IntoNatural for SingleOptionalHandle {
13654 type Natural = crate::natural::SingleOptionalHandle;
13655 }
13656
13657 #[derive(Debug)]
13659 #[repr(C)]
13660 pub struct StructOfEndpoints {
13661 pub client_end:
13662 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13663
13664 pub optional_client_end:
13665 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13666
13667 pub server_end:
13668 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
13669
13670 pub optional_server_end:
13671 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::OptionalChannel>,
13672 }
13673
13674 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfEndpoints>(), 16);
13675 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfEndpoints>(), 4);
13676
13677 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, client_end), 0);
13678
13679 static_assertions::const_assert_eq!(
13680 std::mem::offset_of!(StructOfEndpoints, optional_client_end),
13681 4
13682 );
13683
13684 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfEndpoints, server_end), 8);
13685
13686 static_assertions::const_assert_eq!(
13687 std::mem::offset_of!(StructOfEndpoints, optional_server_end),
13688 12
13689 );
13690
13691 impl ::fidl_next::Constrained for StructOfEndpoints {
13692 type Constraint = ();
13693
13694 fn validate(
13695 _: ::fidl_next::Slot<'_, Self>,
13696 _: Self::Constraint,
13697 ) -> Result<(), ::fidl_next::ValidationError> {
13698 Ok(())
13699 }
13700 }
13701
13702 unsafe impl ::fidl_next::Wire for StructOfEndpoints {
13703 type Narrowed<'de> = StructOfEndpoints;
13704
13705 #[inline]
13706 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13707 ::fidl_next::munge! {
13708 let Self {
13709 client_end,
13710 optional_client_end,
13711 server_end,
13712 optional_server_end,
13713
13714 } = &mut *out_;
13715 }
13716
13717 ::fidl_next::Wire::zero_padding(client_end);
13718
13719 ::fidl_next::Wire::zero_padding(optional_client_end);
13720
13721 ::fidl_next::Wire::zero_padding(server_end);
13722
13723 ::fidl_next::Wire::zero_padding(optional_server_end);
13724 }
13725 }
13726
13727 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfEndpoints
13728 where
13729 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13730 ___D: ::fidl_next::fuchsia::HandleDecoder,
13731 {
13732 fn decode(
13733 slot_: ::fidl_next::Slot<'_, Self>,
13734 decoder_: &mut ___D,
13735 _: (),
13736 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13737 ::fidl_next::munge! {
13738 let Self {
13739 mut client_end,
13740 mut optional_client_end,
13741 mut server_end,
13742 mut optional_server_end,
13743
13744 } = slot_;
13745 }
13746
13747 let _field = client_end.as_mut();
13748
13749 ::fidl_next::Decode::decode(client_end.as_mut(), decoder_, ())?;
13750
13751 let _field = optional_client_end.as_mut();
13752
13753 ::fidl_next::Decode::decode(optional_client_end.as_mut(), decoder_, ())?;
13754
13755 let _field = server_end.as_mut();
13756
13757 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
13758
13759 let _field = optional_server_end.as_mut();
13760
13761 ::fidl_next::Decode::decode(optional_server_end.as_mut(), decoder_, ())?;
13762
13763 Ok(())
13764 }
13765 }
13766
13767 impl ::fidl_next::IntoNatural for StructOfEndpoints {
13768 type Natural = crate::natural::StructOfEndpoints;
13769 }
13770
13771 #[derive(Debug)]
13773 #[repr(C)]
13774 pub struct StructOfOptionalUnionOfHandle {
13775 pub u: crate::wire_optional::UnionOfHandle,
13776 }
13777
13778 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfOptionalUnionOfHandle>(), 16);
13779 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfOptionalUnionOfHandle>(), 8);
13780
13781 static_assertions::const_assert_eq!(std::mem::offset_of!(StructOfOptionalUnionOfHandle, u), 0);
13782
13783 impl ::fidl_next::Constrained for StructOfOptionalUnionOfHandle {
13784 type Constraint = ();
13785
13786 fn validate(
13787 _: ::fidl_next::Slot<'_, Self>,
13788 _: Self::Constraint,
13789 ) -> Result<(), ::fidl_next::ValidationError> {
13790 Ok(())
13791 }
13792 }
13793
13794 unsafe impl ::fidl_next::Wire for StructOfOptionalUnionOfHandle {
13795 type Narrowed<'de> = StructOfOptionalUnionOfHandle;
13796
13797 #[inline]
13798 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13799 ::fidl_next::munge! {
13800 let Self {
13801 u,
13802
13803 } = &mut *out_;
13804 }
13805
13806 ::fidl_next::Wire::zero_padding(u);
13807 }
13808 }
13809
13810 unsafe impl<___D> ::fidl_next::Decode<___D> for StructOfOptionalUnionOfHandle
13811 where
13812 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13813 ___D: ::fidl_next::fuchsia::HandleDecoder,
13814 {
13815 fn decode(
13816 slot_: ::fidl_next::Slot<'_, Self>,
13817 decoder_: &mut ___D,
13818 _: (),
13819 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13820 ::fidl_next::munge! {
13821 let Self {
13822 mut u,
13823
13824 } = slot_;
13825 }
13826
13827 let _field = u.as_mut();
13828
13829 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
13830
13831 Ok(())
13832 }
13833 }
13834
13835 impl ::fidl_next::IntoNatural for StructOfOptionalUnionOfHandle {
13836 type Natural = crate::natural::StructOfOptionalUnionOfHandle;
13837 }
13838
13839 #[derive(Debug)]
13841 #[repr(C)]
13842 pub struct StructOfSimpleResourceTable<'de> {
13843 pub table: crate::wire::SimpleResourceTable<'de>,
13844 }
13845
13846 static_assertions::const_assert_eq!(std::mem::size_of::<StructOfSimpleResourceTable<'_>>(), 16);
13847 static_assertions::const_assert_eq!(std::mem::align_of::<StructOfSimpleResourceTable<'_>>(), 8);
13848
13849 static_assertions::const_assert_eq!(
13850 std::mem::offset_of!(StructOfSimpleResourceTable<'_>, table),
13851 0
13852 );
13853
13854 impl ::fidl_next::Constrained for StructOfSimpleResourceTable<'_> {
13855 type Constraint = ();
13856
13857 fn validate(
13858 _: ::fidl_next::Slot<'_, Self>,
13859 _: Self::Constraint,
13860 ) -> Result<(), ::fidl_next::ValidationError> {
13861 Ok(())
13862 }
13863 }
13864
13865 unsafe impl ::fidl_next::Wire for StructOfSimpleResourceTable<'static> {
13866 type Narrowed<'de> = StructOfSimpleResourceTable<'de>;
13867
13868 #[inline]
13869 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13870 ::fidl_next::munge! {
13871 let Self {
13872 table,
13873
13874 } = &mut *out_;
13875 }
13876
13877 ::fidl_next::Wire::zero_padding(table);
13878 }
13879 }
13880
13881 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StructOfSimpleResourceTable<'de>
13882 where
13883 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13884 ___D: ::fidl_next::Decoder<'de>,
13885 ___D: ::fidl_next::fuchsia::HandleDecoder,
13886 {
13887 fn decode(
13888 slot_: ::fidl_next::Slot<'_, Self>,
13889 decoder_: &mut ___D,
13890 _: (),
13891 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13892 ::fidl_next::munge! {
13893 let Self {
13894 mut table,
13895
13896 } = slot_;
13897 }
13898
13899 let _field = table.as_mut();
13900
13901 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
13902
13903 Ok(())
13904 }
13905 }
13906
13907 impl<'de> ::fidl_next::IntoNatural for StructOfSimpleResourceTable<'de> {
13908 type Natural = crate::natural::StructOfSimpleResourceTable;
13909 }
13910
13911 #[repr(C)]
13913 pub struct TableFieldInlinedHandle<'de> {
13914 pub(crate) table: ::fidl_next::wire::Table<'de>,
13915 }
13916
13917 impl<'de> Drop for TableFieldInlinedHandle<'de> {
13918 fn drop(&mut self) {
13919 let _ = self.table.get(1).map(|envelope| unsafe {
13920 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
13921 });
13922 }
13923 }
13924
13925 impl ::fidl_next::Constrained for TableFieldInlinedHandle<'_> {
13926 type Constraint = ();
13927
13928 fn validate(
13929 _: ::fidl_next::Slot<'_, Self>,
13930 _: Self::Constraint,
13931 ) -> Result<(), ::fidl_next::ValidationError> {
13932 Ok(())
13933 }
13934 }
13935
13936 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandle<'static> {
13937 type Narrowed<'de> = TableFieldInlinedHandle<'de>;
13938
13939 #[inline]
13940 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13941 ::fidl_next::munge!(let Self { table } = out);
13942 ::fidl_next::wire::Table::zero_padding(table);
13943 }
13944 }
13945
13946 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandle<'de>
13947 where
13948 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13949 ___D: ::fidl_next::fuchsia::HandleDecoder,
13950 {
13951 fn decode(
13952 slot: ::fidl_next::Slot<'_, Self>,
13953 decoder: &mut ___D,
13954 _: (),
13955 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13956 ::fidl_next::munge!(let Self { table } = slot);
13957
13958 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13959 match ordinal {
13960 0 => unsafe { ::core::hint::unreachable_unchecked() },
13961
13962 1 => {
13963 ::fidl_next::wire::Envelope::decode_as::<
13964 ___D,
13965 ::fidl_next::wire::fuchsia::Channel,
13966 >(slot.as_mut(), decoder, ())?;
13967
13968 Ok(())
13969 }
13970
13971 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13972 }
13973 })
13974 }
13975 }
13976
13977 impl<'de> TableFieldInlinedHandle<'de> {
13978 pub fn f(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
13979 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13980 }
13981
13982 pub fn take_f(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Channel> {
13983 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13984 }
13985 }
13986
13987 impl<'de> ::core::fmt::Debug for TableFieldInlinedHandle<'de> {
13988 fn fmt(
13989 &self,
13990 f: &mut ::core::fmt::Formatter<'_>,
13991 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13992 f.debug_struct("TableFieldInlinedHandle").field("f", &self.f()).finish()
13993 }
13994 }
13995
13996 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandle<'de> {
13997 type Natural = crate::natural::TableFieldInlinedHandle;
13998 }
13999
14000 #[derive(Debug)]
14002 #[repr(C)]
14003 pub struct TableFieldInlinedHandleStruct<'de> {
14004 pub t: crate::wire::TableFieldInlinedHandle<'de>,
14005 }
14006
14007 static_assertions::const_assert_eq!(
14008 std::mem::size_of::<TableFieldInlinedHandleStruct<'_>>(),
14009 16
14010 );
14011 static_assertions::const_assert_eq!(
14012 std::mem::align_of::<TableFieldInlinedHandleStruct<'_>>(),
14013 8
14014 );
14015
14016 static_assertions::const_assert_eq!(
14017 std::mem::offset_of!(TableFieldInlinedHandleStruct<'_>, t),
14018 0
14019 );
14020
14021 impl ::fidl_next::Constrained for TableFieldInlinedHandleStruct<'_> {
14022 type Constraint = ();
14023
14024 fn validate(
14025 _: ::fidl_next::Slot<'_, Self>,
14026 _: Self::Constraint,
14027 ) -> Result<(), ::fidl_next::ValidationError> {
14028 Ok(())
14029 }
14030 }
14031
14032 unsafe impl ::fidl_next::Wire for TableFieldInlinedHandleStruct<'static> {
14033 type Narrowed<'de> = TableFieldInlinedHandleStruct<'de>;
14034
14035 #[inline]
14036 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14037 ::fidl_next::munge! {
14038 let Self {
14039 t,
14040
14041 } = &mut *out_;
14042 }
14043
14044 ::fidl_next::Wire::zero_padding(t);
14045 }
14046 }
14047
14048 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldInlinedHandleStruct<'de>
14049 where
14050 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14051 ___D: ::fidl_next::Decoder<'de>,
14052 ___D: ::fidl_next::fuchsia::HandleDecoder,
14053 {
14054 fn decode(
14055 slot_: ::fidl_next::Slot<'_, Self>,
14056 decoder_: &mut ___D,
14057 _: (),
14058 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14059 ::fidl_next::munge! {
14060 let Self {
14061 mut t,
14062
14063 } = slot_;
14064 }
14065
14066 let _field = t.as_mut();
14067
14068 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14069
14070 Ok(())
14071 }
14072 }
14073
14074 impl<'de> ::fidl_next::IntoNatural for TableFieldInlinedHandleStruct<'de> {
14075 type Natural = crate::natural::TableFieldInlinedHandleStruct;
14076 }
14077
14078 #[repr(C)]
14080 pub struct TableFieldUnknownResource<'de> {
14081 pub(crate) table: ::fidl_next::wire::Table<'de>,
14082 }
14083
14084 impl<'de> Drop for TableFieldUnknownResource<'de> {
14085 fn drop(&mut self) {}
14086 }
14087
14088 impl ::fidl_next::Constrained for TableFieldUnknownResource<'_> {
14089 type Constraint = ();
14090
14091 fn validate(
14092 _: ::fidl_next::Slot<'_, Self>,
14093 _: Self::Constraint,
14094 ) -> Result<(), ::fidl_next::ValidationError> {
14095 Ok(())
14096 }
14097 }
14098
14099 unsafe impl ::fidl_next::Wire for TableFieldUnknownResource<'static> {
14100 type Narrowed<'de> = TableFieldUnknownResource<'de>;
14101
14102 #[inline]
14103 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14104 ::fidl_next::munge!(let Self { table } = out);
14105 ::fidl_next::wire::Table::zero_padding(table);
14106 }
14107 }
14108
14109 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResource<'de>
14110 where
14111 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14112 ___D: ::fidl_next::fuchsia::HandleDecoder,
14113 {
14114 fn decode(
14115 slot: ::fidl_next::Slot<'_, Self>,
14116 decoder: &mut ___D,
14117 _: (),
14118 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14119 ::fidl_next::munge!(let Self { table } = slot);
14120
14121 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14122 match ordinal {
14123 0 => unsafe { ::core::hint::unreachable_unchecked() },
14124
14125 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14126 }
14127 })
14128 }
14129 }
14130
14131 impl<'de> TableFieldUnknownResource<'de> {}
14132
14133 impl<'de> ::core::fmt::Debug for TableFieldUnknownResource<'de> {
14134 fn fmt(
14135 &self,
14136 f: &mut ::core::fmt::Formatter<'_>,
14137 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14138 f.debug_struct("TableFieldUnknownResource").finish()
14139 }
14140 }
14141
14142 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResource<'de> {
14143 type Natural = crate::natural::TableFieldUnknownResource;
14144 }
14145
14146 #[derive(Debug)]
14148 #[repr(C)]
14149 pub struct TableFieldUnknownResourceStruct<'de> {
14150 pub t: crate::wire::TableFieldUnknownResource<'de>,
14151 }
14152
14153 static_assertions::const_assert_eq!(
14154 std::mem::size_of::<TableFieldUnknownResourceStruct<'_>>(),
14155 16
14156 );
14157 static_assertions::const_assert_eq!(
14158 std::mem::align_of::<TableFieldUnknownResourceStruct<'_>>(),
14159 8
14160 );
14161
14162 static_assertions::const_assert_eq!(
14163 std::mem::offset_of!(TableFieldUnknownResourceStruct<'_>, t),
14164 0
14165 );
14166
14167 impl ::fidl_next::Constrained for TableFieldUnknownResourceStruct<'_> {
14168 type Constraint = ();
14169
14170 fn validate(
14171 _: ::fidl_next::Slot<'_, Self>,
14172 _: Self::Constraint,
14173 ) -> Result<(), ::fidl_next::ValidationError> {
14174 Ok(())
14175 }
14176 }
14177
14178 unsafe impl ::fidl_next::Wire for TableFieldUnknownResourceStruct<'static> {
14179 type Narrowed<'de> = TableFieldUnknownResourceStruct<'de>;
14180
14181 #[inline]
14182 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14183 ::fidl_next::munge! {
14184 let Self {
14185 t,
14186
14187 } = &mut *out_;
14188 }
14189
14190 ::fidl_next::Wire::zero_padding(t);
14191 }
14192 }
14193
14194 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableFieldUnknownResourceStruct<'de>
14195 where
14196 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14197 ___D: ::fidl_next::Decoder<'de>,
14198 ___D: ::fidl_next::fuchsia::HandleDecoder,
14199 {
14200 fn decode(
14201 slot_: ::fidl_next::Slot<'_, Self>,
14202 decoder_: &mut ___D,
14203 _: (),
14204 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14205 ::fidl_next::munge! {
14206 let Self {
14207 mut t,
14208
14209 } = slot_;
14210 }
14211
14212 let _field = t.as_mut();
14213
14214 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14215
14216 Ok(())
14217 }
14218 }
14219
14220 impl<'de> ::fidl_next::IntoNatural for TableFieldUnknownResourceStruct<'de> {
14221 type Natural = crate::natural::TableFieldUnknownResourceStruct;
14222 }
14223
14224 #[repr(C)]
14226 pub struct TableOfEndpointsTable<'de> {
14227 pub(crate) table: ::fidl_next::wire::Table<'de>,
14228 }
14229
14230 impl<'de> Drop for TableOfEndpointsTable<'de> {
14231 fn drop(&mut self) {
14232 let _ = self.table.get(1)
14233 .map(|envelope| unsafe {
14234 envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
14235 });
14236
14237 let _ = self.table.get(2)
14238 .map(|envelope| unsafe {
14239 envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
14240 });
14241 }
14242 }
14243
14244 impl ::fidl_next::Constrained for TableOfEndpointsTable<'_> {
14245 type Constraint = ();
14246
14247 fn validate(
14248 _: ::fidl_next::Slot<'_, Self>,
14249 _: Self::Constraint,
14250 ) -> Result<(), ::fidl_next::ValidationError> {
14251 Ok(())
14252 }
14253 }
14254
14255 unsafe impl ::fidl_next::Wire for TableOfEndpointsTable<'static> {
14256 type Narrowed<'de> = TableOfEndpointsTable<'de>;
14257
14258 #[inline]
14259 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14260 ::fidl_next::munge!(let Self { table } = out);
14261 ::fidl_next::wire::Table::zero_padding(table);
14262 }
14263 }
14264
14265 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpointsTable<'de>
14266 where
14267 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14268 ___D: ::fidl_next::fuchsia::HandleDecoder,
14269 {
14270 fn decode(
14271 slot: ::fidl_next::Slot<'_, Self>,
14272 decoder: &mut ___D,
14273 _: (),
14274 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14275 ::fidl_next::munge!(let Self { table } = slot);
14276
14277 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14278 match ordinal {
14279 0 => unsafe { ::core::hint::unreachable_unchecked() },
14280
14281 1 => {
14282 ::fidl_next::wire::Envelope::decode_as::<
14283 ___D,
14284 ::fidl_next::ClientEnd<
14285 crate::Protocol,
14286 ::fidl_next::wire::fuchsia::Channel,
14287 >,
14288 >(slot.as_mut(), decoder, ())?;
14289
14290 Ok(())
14291 }
14292
14293 2 => {
14294 ::fidl_next::wire::Envelope::decode_as::<
14295 ___D,
14296 ::fidl_next::ServerEnd<
14297 crate::Protocol,
14298 ::fidl_next::wire::fuchsia::Channel,
14299 >,
14300 >(slot.as_mut(), decoder, ())?;
14301
14302 Ok(())
14303 }
14304
14305 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14306 }
14307 })
14308 }
14309 }
14310
14311 impl<'de> TableOfEndpointsTable<'de> {
14312 pub fn client_end(
14313 &self,
14314 ) -> ::core::option::Option<
14315 &::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14316 > {
14317 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14318 }
14319
14320 pub fn take_client_end(
14321 &mut self,
14322 ) -> ::core::option::Option<
14323 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14324 > {
14325 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14326 }
14327
14328 pub fn server_end(
14329 &self,
14330 ) -> ::core::option::Option<
14331 &::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14332 > {
14333 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14334 }
14335
14336 pub fn take_server_end(
14337 &mut self,
14338 ) -> ::core::option::Option<
14339 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
14340 > {
14341 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14342 }
14343 }
14344
14345 impl<'de> ::core::fmt::Debug for TableOfEndpointsTable<'de> {
14346 fn fmt(
14347 &self,
14348 f: &mut ::core::fmt::Formatter<'_>,
14349 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14350 f.debug_struct("TableOfEndpointsTable")
14351 .field("client_end", &self.client_end())
14352 .field("server_end", &self.server_end())
14353 .finish()
14354 }
14355 }
14356
14357 impl<'de> ::fidl_next::IntoNatural for TableOfEndpointsTable<'de> {
14358 type Natural = crate::natural::TableOfEndpointsTable;
14359 }
14360
14361 #[derive(Debug)]
14363 #[repr(C)]
14364 pub struct TableOfEndpoints<'de> {
14365 pub t: crate::wire::TableOfEndpointsTable<'de>,
14366 }
14367
14368 static_assertions::const_assert_eq!(std::mem::size_of::<TableOfEndpoints<'_>>(), 16);
14369 static_assertions::const_assert_eq!(std::mem::align_of::<TableOfEndpoints<'_>>(), 8);
14370
14371 static_assertions::const_assert_eq!(std::mem::offset_of!(TableOfEndpoints<'_>, t), 0);
14372
14373 impl ::fidl_next::Constrained for TableOfEndpoints<'_> {
14374 type Constraint = ();
14375
14376 fn validate(
14377 _: ::fidl_next::Slot<'_, Self>,
14378 _: Self::Constraint,
14379 ) -> Result<(), ::fidl_next::ValidationError> {
14380 Ok(())
14381 }
14382 }
14383
14384 unsafe impl ::fidl_next::Wire for TableOfEndpoints<'static> {
14385 type Narrowed<'de> = TableOfEndpoints<'de>;
14386
14387 #[inline]
14388 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14389 ::fidl_next::munge! {
14390 let Self {
14391 t,
14392
14393 } = &mut *out_;
14394 }
14395
14396 ::fidl_next::Wire::zero_padding(t);
14397 }
14398 }
14399
14400 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableOfEndpoints<'de>
14401 where
14402 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14403 ___D: ::fidl_next::Decoder<'de>,
14404 ___D: ::fidl_next::fuchsia::HandleDecoder,
14405 {
14406 fn decode(
14407 slot_: ::fidl_next::Slot<'_, Self>,
14408 decoder_: &mut ___D,
14409 _: (),
14410 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14411 ::fidl_next::munge! {
14412 let Self {
14413 mut t,
14414
14415 } = slot_;
14416 }
14417
14418 let _field = t.as_mut();
14419
14420 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14421
14422 Ok(())
14423 }
14424 }
14425
14426 impl<'de> ::fidl_next::IntoNatural for TableOfEndpoints<'de> {
14427 type Natural = crate::natural::TableOfEndpoints;
14428 }
14429
14430 #[repr(C)]
14432 pub struct TableUnionWithVectorReservedSandwich<'de> {
14433 pub(crate) table: ::fidl_next::wire::Table<'de>,
14434 }
14435
14436 impl<'de> Drop for TableUnionWithVectorReservedSandwich<'de> {
14437 fn drop(&mut self) {
14438 let _ = self.table.get(2).map(|envelope| unsafe {
14439 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
14440 });
14441 }
14442 }
14443
14444 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwich<'_> {
14445 type Constraint = ();
14446
14447 fn validate(
14448 _: ::fidl_next::Slot<'_, Self>,
14449 _: Self::Constraint,
14450 ) -> Result<(), ::fidl_next::ValidationError> {
14451 Ok(())
14452 }
14453 }
14454
14455 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwich<'static> {
14456 type Narrowed<'de> = TableUnionWithVectorReservedSandwich<'de>;
14457
14458 #[inline]
14459 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14460 ::fidl_next::munge!(let Self { table } = out);
14461 ::fidl_next::wire::Table::zero_padding(table);
14462 }
14463 }
14464
14465 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwich<'de>
14466 where
14467 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14468 ___D: ::fidl_next::fuchsia::HandleDecoder,
14469 {
14470 fn decode(
14471 slot: ::fidl_next::Slot<'_, Self>,
14472 decoder: &mut ___D,
14473 _: (),
14474 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14475 ::fidl_next::munge!(let Self { table } = slot);
14476
14477 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14478 match ordinal {
14479 0 => unsafe { ::core::hint::unreachable_unchecked() },
14480
14481 2 => {
14482 ::fidl_next::wire::Envelope::decode_as::<
14483 ___D,
14484 crate::wire::UnionWithVector<'de>,
14485 >(slot.as_mut(), decoder, ())?;
14486
14487 Ok(())
14488 }
14489
14490 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14491 }
14492 })
14493 }
14494 }
14495
14496 impl<'de> TableUnionWithVectorReservedSandwich<'de> {
14497 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
14498 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14499 }
14500
14501 pub fn take_uv(&mut self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
14502 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14503 }
14504 }
14505
14506 impl<'de> ::core::fmt::Debug for TableUnionWithVectorReservedSandwich<'de> {
14507 fn fmt(
14508 &self,
14509 f: &mut ::core::fmt::Formatter<'_>,
14510 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14511 f.debug_struct("TableUnionWithVectorReservedSandwich").field("uv", &self.uv()).finish()
14512 }
14513 }
14514
14515 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwich<'de> {
14516 type Natural = crate::natural::TableUnionWithVectorReservedSandwich;
14517 }
14518
14519 #[derive(Debug)]
14521 #[repr(C)]
14522 pub struct TableUnionWithVectorReservedSandwichStruct<'de> {
14523 pub table: crate::wire::TableUnionWithVectorReservedSandwich<'de>,
14524 }
14525
14526 static_assertions::const_assert_eq!(
14527 std::mem::size_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
14528 16
14529 );
14530 static_assertions::const_assert_eq!(
14531 std::mem::align_of::<TableUnionWithVectorReservedSandwichStruct<'_>>(),
14532 8
14533 );
14534
14535 static_assertions::const_assert_eq!(
14536 std::mem::offset_of!(TableUnionWithVectorReservedSandwichStruct<'_>, table),
14537 0
14538 );
14539
14540 impl ::fidl_next::Constrained for TableUnionWithVectorReservedSandwichStruct<'_> {
14541 type Constraint = ();
14542
14543 fn validate(
14544 _: ::fidl_next::Slot<'_, Self>,
14545 _: Self::Constraint,
14546 ) -> Result<(), ::fidl_next::ValidationError> {
14547 Ok(())
14548 }
14549 }
14550
14551 unsafe impl ::fidl_next::Wire for TableUnionWithVectorReservedSandwichStruct<'static> {
14552 type Narrowed<'de> = TableUnionWithVectorReservedSandwichStruct<'de>;
14553
14554 #[inline]
14555 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14556 ::fidl_next::munge! {
14557 let Self {
14558 table,
14559
14560 } = &mut *out_;
14561 }
14562
14563 ::fidl_next::Wire::zero_padding(table);
14564 }
14565 }
14566
14567 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorReservedSandwichStruct<'de>
14568 where
14569 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14570 ___D: ::fidl_next::Decoder<'de>,
14571 ___D: ::fidl_next::fuchsia::HandleDecoder,
14572 {
14573 fn decode(
14574 slot_: ::fidl_next::Slot<'_, Self>,
14575 decoder_: &mut ___D,
14576 _: (),
14577 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14578 ::fidl_next::munge! {
14579 let Self {
14580 mut table,
14581
14582 } = slot_;
14583 }
14584
14585 let _field = table.as_mut();
14586
14587 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14588
14589 Ok(())
14590 }
14591 }
14592
14593 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorReservedSandwichStruct<'de> {
14594 type Natural = crate::natural::TableUnionWithVectorReservedSandwichStruct;
14595 }
14596
14597 #[repr(C)]
14599 pub struct TableUnionWithVectorStructSandwich<'de> {
14600 pub(crate) table: ::fidl_next::wire::Table<'de>,
14601 }
14602
14603 impl<'de> Drop for TableUnionWithVectorStructSandwich<'de> {
14604 fn drop(&mut self) {
14605 let _ = self.table.get(1).map(|envelope| unsafe {
14606 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14607 });
14608
14609 let _ = self.table.get(2).map(|envelope| unsafe {
14610 envelope.read_unchecked::<crate::wire::UnionWithVector<'de>>()
14611 });
14612
14613 let _ = self.table.get(3).map(|envelope| unsafe {
14614 envelope.read_unchecked::<crate::wire::StructSize3Align1>()
14615 });
14616 }
14617 }
14618
14619 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwich<'_> {
14620 type Constraint = ();
14621
14622 fn validate(
14623 _: ::fidl_next::Slot<'_, Self>,
14624 _: Self::Constraint,
14625 ) -> Result<(), ::fidl_next::ValidationError> {
14626 Ok(())
14627 }
14628 }
14629
14630 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwich<'static> {
14631 type Narrowed<'de> = TableUnionWithVectorStructSandwich<'de>;
14632
14633 #[inline]
14634 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14635 ::fidl_next::munge!(let Self { table } = out);
14636 ::fidl_next::wire::Table::zero_padding(table);
14637 }
14638 }
14639
14640 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwich<'de>
14641 where
14642 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14643 ___D: ::fidl_next::fuchsia::HandleDecoder,
14644 {
14645 fn decode(
14646 slot: ::fidl_next::Slot<'_, Self>,
14647 decoder: &mut ___D,
14648 _: (),
14649 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14650 ::fidl_next::munge!(let Self { table } = slot);
14651
14652 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14653 match ordinal {
14654 0 => unsafe { ::core::hint::unreachable_unchecked() },
14655
14656 1 => {
14657 ::fidl_next::wire::Envelope::decode_as::<
14658 ___D,
14659 crate::wire::StructSize3Align1,
14660 >(slot.as_mut(), decoder, ())?;
14661
14662 Ok(())
14663 }
14664
14665 2 => {
14666 ::fidl_next::wire::Envelope::decode_as::<
14667 ___D,
14668 crate::wire::UnionWithVector<'de>,
14669 >(slot.as_mut(), decoder, ())?;
14670
14671 Ok(())
14672 }
14673
14674 3 => {
14675 ::fidl_next::wire::Envelope::decode_as::<
14676 ___D,
14677 crate::wire::StructSize3Align1,
14678 >(slot.as_mut(), decoder, ())?;
14679
14680 Ok(())
14681 }
14682
14683 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14684 }
14685 })
14686 }
14687 }
14688
14689 impl<'de> TableUnionWithVectorStructSandwich<'de> {
14690 pub fn s1(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14691 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14692 }
14693
14694 pub fn take_s1(&mut self) -> ::core::option::Option<crate::wire::StructSize3Align1> {
14695 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14696 }
14697
14698 pub fn uv(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
14699 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14700 }
14701
14702 pub fn take_uv(&mut self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
14703 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14704 }
14705
14706 pub fn s2(&self) -> ::core::option::Option<&crate::wire::StructSize3Align1> {
14707 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
14708 }
14709
14710 pub fn take_s2(&mut self) -> ::core::option::Option<crate::wire::StructSize3Align1> {
14711 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
14712 }
14713 }
14714
14715 impl<'de> ::core::fmt::Debug for TableUnionWithVectorStructSandwich<'de> {
14716 fn fmt(
14717 &self,
14718 f: &mut ::core::fmt::Formatter<'_>,
14719 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14720 f.debug_struct("TableUnionWithVectorStructSandwich")
14721 .field("s1", &self.s1())
14722 .field("uv", &self.uv())
14723 .field("s2", &self.s2())
14724 .finish()
14725 }
14726 }
14727
14728 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwich<'de> {
14729 type Natural = crate::natural::TableUnionWithVectorStructSandwich;
14730 }
14731
14732 #[derive(Debug)]
14734 #[repr(C)]
14735 pub struct TableUnionWithVectorStructSandwichStruct<'de> {
14736 pub table: crate::wire::TableUnionWithVectorStructSandwich<'de>,
14737 }
14738
14739 static_assertions::const_assert_eq!(
14740 std::mem::size_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14741 16
14742 );
14743 static_assertions::const_assert_eq!(
14744 std::mem::align_of::<TableUnionWithVectorStructSandwichStruct<'_>>(),
14745 8
14746 );
14747
14748 static_assertions::const_assert_eq!(
14749 std::mem::offset_of!(TableUnionWithVectorStructSandwichStruct<'_>, table),
14750 0
14751 );
14752
14753 impl ::fidl_next::Constrained for TableUnionWithVectorStructSandwichStruct<'_> {
14754 type Constraint = ();
14755
14756 fn validate(
14757 _: ::fidl_next::Slot<'_, Self>,
14758 _: Self::Constraint,
14759 ) -> Result<(), ::fidl_next::ValidationError> {
14760 Ok(())
14761 }
14762 }
14763
14764 unsafe impl ::fidl_next::Wire for TableUnionWithVectorStructSandwichStruct<'static> {
14765 type Narrowed<'de> = TableUnionWithVectorStructSandwichStruct<'de>;
14766
14767 #[inline]
14768 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14769 ::fidl_next::munge! {
14770 let Self {
14771 table,
14772
14773 } = &mut *out_;
14774 }
14775
14776 ::fidl_next::Wire::zero_padding(table);
14777 }
14778 }
14779
14780 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TableUnionWithVectorStructSandwichStruct<'de>
14781 where
14782 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14783 ___D: ::fidl_next::Decoder<'de>,
14784 ___D: ::fidl_next::fuchsia::HandleDecoder,
14785 {
14786 fn decode(
14787 slot_: ::fidl_next::Slot<'_, Self>,
14788 decoder_: &mut ___D,
14789 _: (),
14790 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14791 ::fidl_next::munge! {
14792 let Self {
14793 mut table,
14794
14795 } = slot_;
14796 }
14797
14798 let _field = table.as_mut();
14799
14800 ::fidl_next::Decode::decode(table.as_mut(), decoder_, ())?;
14801
14802 Ok(())
14803 }
14804 }
14805
14806 impl<'de> ::fidl_next::IntoNatural for TableUnionWithVectorStructSandwichStruct<'de> {
14807 type Natural = crate::natural::TableUnionWithVectorStructSandwichStruct;
14808 }
14809
14810 #[repr(C)]
14812 pub struct TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14813 pub(crate) table: ::fidl_next::wire::Table<'de>,
14814 }
14815
14816 impl<'de> Drop for TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14817 fn drop(&mut self) {
14818 let _ = self.table.get(1).map(|envelope| unsafe {
14819 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
14820 });
14821 }
14822 }
14823
14824 impl ::fidl_next::Constrained for TableWithUnknownEnvelopesAfterKnownEnvelopes<'_> {
14825 type Constraint = ();
14826
14827 fn validate(
14828 _: ::fidl_next::Slot<'_, Self>,
14829 _: Self::Constraint,
14830 ) -> Result<(), ::fidl_next::ValidationError> {
14831 Ok(())
14832 }
14833 }
14834
14835 unsafe impl ::fidl_next::Wire for TableWithUnknownEnvelopesAfterKnownEnvelopes<'static> {
14836 type Narrowed<'de> = TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>;
14837
14838 #[inline]
14839 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14840 ::fidl_next::munge!(let Self { table } = out);
14841 ::fidl_next::wire::Table::zero_padding(table);
14842 }
14843 }
14844
14845 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
14846 for TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>
14847 where
14848 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14849 ___D: ::fidl_next::fuchsia::HandleDecoder,
14850 {
14851 fn decode(
14852 slot: ::fidl_next::Slot<'_, Self>,
14853 decoder: &mut ___D,
14854 _: (),
14855 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14856 ::fidl_next::munge!(let Self { table } = slot);
14857
14858 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14859 match ordinal {
14860 0 => unsafe { ::core::hint::unreachable_unchecked() },
14861
14862 1 => {
14863 ::fidl_next::wire::Envelope::decode_as::<
14864 ___D,
14865 ::fidl_next::wire::fuchsia::Event,
14866 >(slot.as_mut(), decoder, ())?;
14867
14868 Ok(())
14869 }
14870
14871 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14872 }
14873 })
14874 }
14875 }
14876
14877 impl<'de> TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14878 pub fn a(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
14879 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14880 }
14881
14882 pub fn take_a(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
14883 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14884 }
14885 }
14886
14887 impl<'de> ::core::fmt::Debug for TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14888 fn fmt(
14889 &self,
14890 f: &mut ::core::fmt::Formatter<'_>,
14891 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14892 f.debug_struct("TableWithUnknownEnvelopesAfterKnownEnvelopes")
14893 .field("a", &self.a())
14894 .finish()
14895 }
14896 }
14897
14898 impl<'de> ::fidl_next::IntoNatural for TableWithUnknownEnvelopesAfterKnownEnvelopes<'de> {
14899 type Natural = crate::natural::TableWithUnknownEnvelopesAfterKnownEnvelopes;
14900 }
14901
14902 #[derive(Debug)]
14904 #[repr(C)]
14905 pub struct TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de> {
14906 pub t: crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'de>,
14907 }
14908
14909 static_assertions::const_assert_eq!(
14910 std::mem::size_of::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'_>>(),
14911 16
14912 );
14913 static_assertions::const_assert_eq!(
14914 std::mem::align_of::<TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'_>>(),
14915 8
14916 );
14917
14918 static_assertions::const_assert_eq!(
14919 std::mem::offset_of!(TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'_>, t),
14920 0
14921 );
14922
14923 impl ::fidl_next::Constrained for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'_> {
14924 type Constraint = ();
14925
14926 fn validate(
14927 _: ::fidl_next::Slot<'_, Self>,
14928 _: Self::Constraint,
14929 ) -> Result<(), ::fidl_next::ValidationError> {
14930 Ok(())
14931 }
14932 }
14933
14934 unsafe impl ::fidl_next::Wire for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static> {
14935 type Narrowed<'de> = TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de>;
14936
14937 #[inline]
14938 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14939 ::fidl_next::munge! {
14940 let Self {
14941 t,
14942
14943 } = &mut *out_;
14944 }
14945
14946 ::fidl_next::Wire::zero_padding(t);
14947 }
14948 }
14949
14950 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
14951 for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de>
14952 where
14953 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14954 ___D: ::fidl_next::Decoder<'de>,
14955 ___D: ::fidl_next::fuchsia::HandleDecoder,
14956 {
14957 fn decode(
14958 slot_: ::fidl_next::Slot<'_, Self>,
14959 decoder_: &mut ___D,
14960 _: (),
14961 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14962 ::fidl_next::munge! {
14963 let Self {
14964 mut t,
14965
14966 } = slot_;
14967 }
14968
14969 let _field = t.as_mut();
14970
14971 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
14972
14973 Ok(())
14974 }
14975 }
14976
14977 impl<'de> ::fidl_next::IntoNatural for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'de> {
14978 type Natural = crate::natural::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct;
14979 }
14980
14981 #[repr(C)]
14983 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
14984 pub(crate) table: ::fidl_next::wire::Table<'de>,
14985 }
14986
14987 impl<'de> Drop for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
14988 fn drop(&mut self) {
14989 let _ = self.table.get(2).map(|envelope| unsafe {
14990 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
14991 });
14992 }
14993 }
14994
14995 impl ::fidl_next::Constrained for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'_> {
14996 type Constraint = ();
14997
14998 fn validate(
14999 _: ::fidl_next::Slot<'_, Self>,
15000 _: Self::Constraint,
15001 ) -> Result<(), ::fidl_next::ValidationError> {
15002 Ok(())
15003 }
15004 }
15005
15006 unsafe impl ::fidl_next::Wire for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static> {
15007 type Narrowed<'de> = TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>;
15008
15009 #[inline]
15010 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15011 ::fidl_next::munge!(let Self { table } = out);
15012 ::fidl_next::wire::Table::zero_padding(table);
15013 }
15014 }
15015
15016 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15017 for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>
15018 where
15019 ___D: ::fidl_next::Decoder<'de> + ?Sized,
15020 ___D: ::fidl_next::fuchsia::HandleDecoder,
15021 {
15022 fn decode(
15023 slot: ::fidl_next::Slot<'_, Self>,
15024 decoder: &mut ___D,
15025 _: (),
15026 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15027 ::fidl_next::munge!(let Self { table } = slot);
15028
15029 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15030 match ordinal {
15031 0 => unsafe { ::core::hint::unreachable_unchecked() },
15032
15033 2 => {
15034 ::fidl_next::wire::Envelope::decode_as::<
15035 ___D,
15036 ::fidl_next::wire::fuchsia::Event,
15037 >(slot.as_mut(), decoder, ())?;
15038
15039 Ok(())
15040 }
15041
15042 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15043 }
15044 })
15045 }
15046 }
15047
15048 impl<'de> TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
15049 pub fn b(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
15050 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15051 }
15052
15053 pub fn take_b(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
15054 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
15055 }
15056 }
15057
15058 impl<'de> ::core::fmt::Debug for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
15059 fn fmt(
15060 &self,
15061 f: &mut ::core::fmt::Formatter<'_>,
15062 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15063 f.debug_struct("TableWithUnknownEnvelopesBeforeKnownEnvelopes")
15064 .field("b", &self.b())
15065 .finish()
15066 }
15067 }
15068
15069 impl<'de> ::fidl_next::IntoNatural for TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de> {
15070 type Natural = crate::natural::TableWithUnknownEnvelopesBeforeKnownEnvelopes;
15071 }
15072
15073 #[derive(Debug)]
15075 #[repr(C)]
15076 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de> {
15077 pub t: crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'de>,
15078 }
15079
15080 static_assertions::const_assert_eq!(
15081 std::mem::size_of::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'_>>(),
15082 16
15083 );
15084 static_assertions::const_assert_eq!(
15085 std::mem::align_of::<TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'_>>(),
15086 8
15087 );
15088
15089 static_assertions::const_assert_eq!(
15090 std::mem::offset_of!(TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'_>, t),
15091 0
15092 );
15093
15094 impl ::fidl_next::Constrained for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'_> {
15095 type Constraint = ();
15096
15097 fn validate(
15098 _: ::fidl_next::Slot<'_, Self>,
15099 _: Self::Constraint,
15100 ) -> Result<(), ::fidl_next::ValidationError> {
15101 Ok(())
15102 }
15103 }
15104
15105 unsafe impl ::fidl_next::Wire for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static> {
15106 type Narrowed<'de> = TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de>;
15107
15108 #[inline]
15109 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15110 ::fidl_next::munge! {
15111 let Self {
15112 t,
15113
15114 } = &mut *out_;
15115 }
15116
15117 ::fidl_next::Wire::zero_padding(t);
15118 }
15119 }
15120
15121 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
15122 for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de>
15123 where
15124 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15125 ___D: ::fidl_next::Decoder<'de>,
15126 ___D: ::fidl_next::fuchsia::HandleDecoder,
15127 {
15128 fn decode(
15129 slot_: ::fidl_next::Slot<'_, Self>,
15130 decoder_: &mut ___D,
15131 _: (),
15132 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15133 ::fidl_next::munge! {
15134 let Self {
15135 mut t,
15136
15137 } = slot_;
15138 }
15139
15140 let _field = t.as_mut();
15141
15142 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
15143
15144 Ok(())
15145 }
15146 }
15147
15148 impl<'de> ::fidl_next::IntoNatural for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'de> {
15149 type Natural = crate::natural::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct;
15150 }
15151
15152 #[derive(Debug)]
15154 #[repr(C)]
15155 pub struct TestFlexibleResourceXUnionInStruct<'de> {
15156 pub xu: crate::wire::SampleResourceXUnion<'de>,
15157 }
15158
15159 static_assertions::const_assert_eq!(
15160 std::mem::size_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
15161 16
15162 );
15163 static_assertions::const_assert_eq!(
15164 std::mem::align_of::<TestFlexibleResourceXUnionInStruct<'_>>(),
15165 8
15166 );
15167
15168 static_assertions::const_assert_eq!(
15169 std::mem::offset_of!(TestFlexibleResourceXUnionInStruct<'_>, xu),
15170 0
15171 );
15172
15173 impl ::fidl_next::Constrained for TestFlexibleResourceXUnionInStruct<'_> {
15174 type Constraint = ();
15175
15176 fn validate(
15177 _: ::fidl_next::Slot<'_, Self>,
15178 _: Self::Constraint,
15179 ) -> Result<(), ::fidl_next::ValidationError> {
15180 Ok(())
15181 }
15182 }
15183
15184 unsafe impl ::fidl_next::Wire for TestFlexibleResourceXUnionInStruct<'static> {
15185 type Narrowed<'de> = TestFlexibleResourceXUnionInStruct<'de>;
15186
15187 #[inline]
15188 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15189 ::fidl_next::munge! {
15190 let Self {
15191 xu,
15192
15193 } = &mut *out_;
15194 }
15195
15196 ::fidl_next::Wire::zero_padding(xu);
15197 }
15198 }
15199
15200 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestFlexibleResourceXUnionInStruct<'de>
15201 where
15202 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15203 ___D: ::fidl_next::Decoder<'de>,
15204 ___D: ::fidl_next::fuchsia::HandleDecoder,
15205 {
15206 fn decode(
15207 slot_: ::fidl_next::Slot<'_, Self>,
15208 decoder_: &mut ___D,
15209 _: (),
15210 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15211 ::fidl_next::munge! {
15212 let Self {
15213 mut xu,
15214
15215 } = slot_;
15216 }
15217
15218 let _field = xu.as_mut();
15219
15220 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
15221
15222 Ok(())
15223 }
15224 }
15225
15226 impl<'de> ::fidl_next::IntoNatural for TestFlexibleResourceXUnionInStruct<'de> {
15227 type Natural = crate::natural::TestFlexibleResourceXUnionInStruct;
15228 }
15229
15230 #[derive(Debug)]
15232 #[repr(C)]
15233 pub struct TestOptionalFlexibleResourceXUnionInStruct<'de> {
15234 pub xu: crate::wire_optional::SampleResourceXUnion<'de>,
15235 }
15236
15237 static_assertions::const_assert_eq!(
15238 std::mem::size_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
15239 16
15240 );
15241 static_assertions::const_assert_eq!(
15242 std::mem::align_of::<TestOptionalFlexibleResourceXUnionInStruct<'_>>(),
15243 8
15244 );
15245
15246 static_assertions::const_assert_eq!(
15247 std::mem::offset_of!(TestOptionalFlexibleResourceXUnionInStruct<'_>, xu),
15248 0
15249 );
15250
15251 impl ::fidl_next::Constrained for TestOptionalFlexibleResourceXUnionInStruct<'_> {
15252 type Constraint = ();
15253
15254 fn validate(
15255 _: ::fidl_next::Slot<'_, Self>,
15256 _: Self::Constraint,
15257 ) -> Result<(), ::fidl_next::ValidationError> {
15258 Ok(())
15259 }
15260 }
15261
15262 unsafe impl ::fidl_next::Wire for TestOptionalFlexibleResourceXUnionInStruct<'static> {
15263 type Narrowed<'de> = TestOptionalFlexibleResourceXUnionInStruct<'de>;
15264
15265 #[inline]
15266 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15267 ::fidl_next::munge! {
15268 let Self {
15269 xu,
15270
15271 } = &mut *out_;
15272 }
15273
15274 ::fidl_next::Wire::zero_padding(xu);
15275 }
15276 }
15277
15278 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalFlexibleResourceXUnionInStruct<'de>
15279 where
15280 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15281 ___D: ::fidl_next::Decoder<'de>,
15282 ___D: ::fidl_next::fuchsia::HandleDecoder,
15283 {
15284 fn decode(
15285 slot_: ::fidl_next::Slot<'_, Self>,
15286 decoder_: &mut ___D,
15287 _: (),
15288 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15289 ::fidl_next::munge! {
15290 let Self {
15291 mut xu,
15292
15293 } = slot_;
15294 }
15295
15296 let _field = xu.as_mut();
15297
15298 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
15299
15300 Ok(())
15301 }
15302 }
15303
15304 impl<'de> ::fidl_next::IntoNatural for TestOptionalFlexibleResourceXUnionInStruct<'de> {
15305 type Natural = crate::natural::TestOptionalFlexibleResourceXUnionInStruct;
15306 }
15307
15308 #[derive(Debug)]
15310 #[repr(C)]
15311 pub struct TestOptionalStrictResourceXUnionInStruct<'de> {
15312 pub xu: crate::wire_optional::SampleStrictResourceXUnion<'de>,
15313 }
15314
15315 static_assertions::const_assert_eq!(
15316 std::mem::size_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
15317 16
15318 );
15319 static_assertions::const_assert_eq!(
15320 std::mem::align_of::<TestOptionalStrictResourceXUnionInStruct<'_>>(),
15321 8
15322 );
15323
15324 static_assertions::const_assert_eq!(
15325 std::mem::offset_of!(TestOptionalStrictResourceXUnionInStruct<'_>, xu),
15326 0
15327 );
15328
15329 impl ::fidl_next::Constrained for TestOptionalStrictResourceXUnionInStruct<'_> {
15330 type Constraint = ();
15331
15332 fn validate(
15333 _: ::fidl_next::Slot<'_, Self>,
15334 _: Self::Constraint,
15335 ) -> Result<(), ::fidl_next::ValidationError> {
15336 Ok(())
15337 }
15338 }
15339
15340 unsafe impl ::fidl_next::Wire for TestOptionalStrictResourceXUnionInStruct<'static> {
15341 type Narrowed<'de> = TestOptionalStrictResourceXUnionInStruct<'de>;
15342
15343 #[inline]
15344 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15345 ::fidl_next::munge! {
15346 let Self {
15347 xu,
15348
15349 } = &mut *out_;
15350 }
15351
15352 ::fidl_next::Wire::zero_padding(xu);
15353 }
15354 }
15355
15356 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestOptionalStrictResourceXUnionInStruct<'de>
15357 where
15358 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15359 ___D: ::fidl_next::Decoder<'de>,
15360 ___D: ::fidl_next::fuchsia::HandleDecoder,
15361 {
15362 fn decode(
15363 slot_: ::fidl_next::Slot<'_, Self>,
15364 decoder_: &mut ___D,
15365 _: (),
15366 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15367 ::fidl_next::munge! {
15368 let Self {
15369 mut xu,
15370
15371 } = slot_;
15372 }
15373
15374 let _field = xu.as_mut();
15375
15376 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
15377
15378 Ok(())
15379 }
15380 }
15381
15382 impl<'de> ::fidl_next::IntoNatural for TestOptionalStrictResourceXUnionInStruct<'de> {
15383 type Natural = crate::natural::TestOptionalStrictResourceXUnionInStruct;
15384 }
15385
15386 #[derive(Debug)]
15388 #[repr(C)]
15389 pub struct TestPackageResolverResolveRequest<'de> {
15390 pub package_url: ::fidl_next::wire::String<'de>,
15391
15392 pub selectors: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
15393
15394 pub update_policy: crate::wire::UpdatePolicy,
15395
15396 pub this_should_be_a_handle: ::fidl_next::wire::Uint32,
15397 }
15398
15399 static_assertions::const_assert_eq!(
15400 std::mem::size_of::<TestPackageResolverResolveRequest<'_>>(),
15401 40
15402 );
15403 static_assertions::const_assert_eq!(
15404 std::mem::align_of::<TestPackageResolverResolveRequest<'_>>(),
15405 8
15406 );
15407
15408 static_assertions::const_assert_eq!(
15409 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, package_url),
15410 0
15411 );
15412
15413 static_assertions::const_assert_eq!(
15414 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, selectors),
15415 16
15416 );
15417
15418 static_assertions::const_assert_eq!(
15419 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, update_policy),
15420 32
15421 );
15422
15423 static_assertions::const_assert_eq!(
15424 std::mem::offset_of!(TestPackageResolverResolveRequest<'_>, this_should_be_a_handle),
15425 36
15426 );
15427
15428 impl ::fidl_next::Constrained for TestPackageResolverResolveRequest<'_> {
15429 type Constraint = ();
15430
15431 fn validate(
15432 _: ::fidl_next::Slot<'_, Self>,
15433 _: Self::Constraint,
15434 ) -> Result<(), ::fidl_next::ValidationError> {
15435 Ok(())
15436 }
15437 }
15438
15439 unsafe impl ::fidl_next::Wire for TestPackageResolverResolveRequest<'static> {
15440 type Narrowed<'de> = TestPackageResolverResolveRequest<'de>;
15441
15442 #[inline]
15443 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15444 ::fidl_next::munge! {
15445 let Self {
15446 package_url,
15447 selectors,
15448 update_policy,
15449 this_should_be_a_handle,
15450
15451 } = &mut *out_;
15452 }
15453
15454 ::fidl_next::Wire::zero_padding(package_url);
15455
15456 ::fidl_next::Wire::zero_padding(selectors);
15457
15458 ::fidl_next::Wire::zero_padding(update_policy);
15459
15460 ::fidl_next::Wire::zero_padding(this_should_be_a_handle);
15461
15462 unsafe {
15463 out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 2);
15464 }
15465 }
15466 }
15467
15468 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestPackageResolverResolveRequest<'de>
15469 where
15470 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15471 ___D: ::fidl_next::Decoder<'de>,
15472 ___D: ::fidl_next::fuchsia::HandleDecoder,
15473 {
15474 fn decode(
15475 slot_: ::fidl_next::Slot<'_, Self>,
15476 decoder_: &mut ___D,
15477 _: (),
15478 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15479 if slot_.as_bytes()[34..36] != [0u8; 2] {
15480 return Err(::fidl_next::DecodeError::InvalidPadding);
15481 }
15482
15483 ::fidl_next::munge! {
15484 let Self {
15485 mut package_url,
15486 mut selectors,
15487 mut update_policy,
15488 mut this_should_be_a_handle,
15489
15490 } = slot_;
15491 }
15492
15493 let _field = package_url.as_mut();
15494 ::fidl_next::Constrained::validate(_field, 4294967295)?;
15495 ::fidl_next::Decode::decode(package_url.as_mut(), decoder_, 4294967295)?;
15496
15497 let _field = selectors.as_mut();
15498 ::fidl_next::Constrained::validate(_field, (4294967295, 4294967295))?;
15499 ::fidl_next::Decode::decode(selectors.as_mut(), decoder_, (4294967295, 4294967295))?;
15500
15501 let _field = update_policy.as_mut();
15502
15503 ::fidl_next::Decode::decode(update_policy.as_mut(), decoder_, ())?;
15504
15505 let _field = this_should_be_a_handle.as_mut();
15506
15507 ::fidl_next::Decode::decode(this_should_be_a_handle.as_mut(), decoder_, ())?;
15508
15509 Ok(())
15510 }
15511 }
15512
15513 impl<'de> ::fidl_next::IntoNatural for TestPackageResolverResolveRequest<'de> {
15514 type Natural = crate::natural::TestPackageResolverResolveRequest;
15515 }
15516
15517 #[derive(Debug)]
15519 #[repr(C)]
15520 pub struct TestStrictResourceXUnionInStruct<'de> {
15521 pub xu: crate::wire::SampleStrictResourceXUnion<'de>,
15522 }
15523
15524 static_assertions::const_assert_eq!(
15525 std::mem::size_of::<TestStrictResourceXUnionInStruct<'_>>(),
15526 16
15527 );
15528 static_assertions::const_assert_eq!(
15529 std::mem::align_of::<TestStrictResourceXUnionInStruct<'_>>(),
15530 8
15531 );
15532
15533 static_assertions::const_assert_eq!(
15534 std::mem::offset_of!(TestStrictResourceXUnionInStruct<'_>, xu),
15535 0
15536 );
15537
15538 impl ::fidl_next::Constrained for TestStrictResourceXUnionInStruct<'_> {
15539 type Constraint = ();
15540
15541 fn validate(
15542 _: ::fidl_next::Slot<'_, Self>,
15543 _: Self::Constraint,
15544 ) -> Result<(), ::fidl_next::ValidationError> {
15545 Ok(())
15546 }
15547 }
15548
15549 unsafe impl ::fidl_next::Wire for TestStrictResourceXUnionInStruct<'static> {
15550 type Narrowed<'de> = TestStrictResourceXUnionInStruct<'de>;
15551
15552 #[inline]
15553 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15554 ::fidl_next::munge! {
15555 let Self {
15556 xu,
15557
15558 } = &mut *out_;
15559 }
15560
15561 ::fidl_next::Wire::zero_padding(xu);
15562 }
15563 }
15564
15565 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TestStrictResourceXUnionInStruct<'de>
15566 where
15567 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15568 ___D: ::fidl_next::Decoder<'de>,
15569 ___D: ::fidl_next::fuchsia::HandleDecoder,
15570 {
15571 fn decode(
15572 slot_: ::fidl_next::Slot<'_, Self>,
15573 decoder_: &mut ___D,
15574 _: (),
15575 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15576 ::fidl_next::munge! {
15577 let Self {
15578 mut xu,
15579
15580 } = slot_;
15581 }
15582
15583 let _field = xu.as_mut();
15584
15585 ::fidl_next::Decode::decode(xu.as_mut(), decoder_, ())?;
15586
15587 Ok(())
15588 }
15589 }
15590
15591 impl<'de> ::fidl_next::IntoNatural for TestStrictResourceXUnionInStruct<'de> {
15592 type Natural = crate::natural::TestStrictResourceXUnionInStruct;
15593 }
15594
15595 #[derive(Debug)]
15597 #[repr(C)]
15598 pub struct UnboundedNonnullableVectorOfHandles<'de> {
15599 pub vh0: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15600 }
15601
15602 static_assertions::const_assert_eq!(
15603 std::mem::size_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
15604 16
15605 );
15606 static_assertions::const_assert_eq!(
15607 std::mem::align_of::<UnboundedNonnullableVectorOfHandles<'_>>(),
15608 8
15609 );
15610
15611 static_assertions::const_assert_eq!(
15612 std::mem::offset_of!(UnboundedNonnullableVectorOfHandles<'_>, vh0),
15613 0
15614 );
15615
15616 impl ::fidl_next::Constrained for UnboundedNonnullableVectorOfHandles<'_> {
15617 type Constraint = ();
15618
15619 fn validate(
15620 _: ::fidl_next::Slot<'_, Self>,
15621 _: Self::Constraint,
15622 ) -> Result<(), ::fidl_next::ValidationError> {
15623 Ok(())
15624 }
15625 }
15626
15627 unsafe impl ::fidl_next::Wire for UnboundedNonnullableVectorOfHandles<'static> {
15628 type Narrowed<'de> = UnboundedNonnullableVectorOfHandles<'de>;
15629
15630 #[inline]
15631 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15632 ::fidl_next::munge! {
15633 let Self {
15634 vh0,
15635
15636 } = &mut *out_;
15637 }
15638
15639 ::fidl_next::Wire::zero_padding(vh0);
15640 }
15641 }
15642
15643 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNonnullableVectorOfHandles<'de>
15644 where
15645 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15646 ___D: ::fidl_next::Decoder<'de>,
15647 ___D: ::fidl_next::fuchsia::HandleDecoder,
15648 {
15649 fn decode(
15650 slot_: ::fidl_next::Slot<'_, Self>,
15651 decoder_: &mut ___D,
15652 _: (),
15653 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15654 ::fidl_next::munge! {
15655 let Self {
15656 mut vh0,
15657
15658 } = slot_;
15659 }
15660
15661 let _field = vh0.as_mut();
15662 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15663 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
15664
15665 Ok(())
15666 }
15667 }
15668
15669 impl<'de> ::fidl_next::IntoNatural for UnboundedNonnullableVectorOfHandles<'de> {
15670 type Natural = crate::natural::UnboundedNonnullableVectorOfHandles;
15671 }
15672
15673 #[derive(Debug)]
15675 #[repr(C)]
15676 pub struct UnboundedNullableVectorOfHandles<'de> {
15677 pub vh0: ::fidl_next::wire::OptionalVector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
15678 }
15679
15680 static_assertions::const_assert_eq!(
15681 std::mem::size_of::<UnboundedNullableVectorOfHandles<'_>>(),
15682 16
15683 );
15684 static_assertions::const_assert_eq!(
15685 std::mem::align_of::<UnboundedNullableVectorOfHandles<'_>>(),
15686 8
15687 );
15688
15689 static_assertions::const_assert_eq!(
15690 std::mem::offset_of!(UnboundedNullableVectorOfHandles<'_>, vh0),
15691 0
15692 );
15693
15694 impl ::fidl_next::Constrained for UnboundedNullableVectorOfHandles<'_> {
15695 type Constraint = ();
15696
15697 fn validate(
15698 _: ::fidl_next::Slot<'_, Self>,
15699 _: Self::Constraint,
15700 ) -> Result<(), ::fidl_next::ValidationError> {
15701 Ok(())
15702 }
15703 }
15704
15705 unsafe impl ::fidl_next::Wire for UnboundedNullableVectorOfHandles<'static> {
15706 type Narrowed<'de> = UnboundedNullableVectorOfHandles<'de>;
15707
15708 #[inline]
15709 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15710 ::fidl_next::munge! {
15711 let Self {
15712 vh0,
15713
15714 } = &mut *out_;
15715 }
15716
15717 ::fidl_next::Wire::zero_padding(vh0);
15718 }
15719 }
15720
15721 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnboundedNullableVectorOfHandles<'de>
15722 where
15723 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15724 ___D: ::fidl_next::Decoder<'de>,
15725 ___D: ::fidl_next::fuchsia::HandleDecoder,
15726 {
15727 fn decode(
15728 slot_: ::fidl_next::Slot<'_, Self>,
15729 decoder_: &mut ___D,
15730 _: (),
15731 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15732 ::fidl_next::munge! {
15733 let Self {
15734 mut vh0,
15735
15736 } = slot_;
15737 }
15738
15739 let _field = vh0.as_mut();
15740 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
15741 ::fidl_next::Decode::decode(vh0.as_mut(), decoder_, (4294967295, ()))?;
15742
15743 Ok(())
15744 }
15745 }
15746
15747 impl<'de> ::fidl_next::IntoNatural for UnboundedNullableVectorOfHandles<'de> {
15748 type Natural = crate::natural::UnboundedNullableVectorOfHandles;
15749 }
15750
15751 #[repr(transparent)]
15753 pub struct UnionOfEndpointsUnion<'de> {
15754 pub(crate) raw: ::fidl_next::wire::Union,
15755 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15756 }
15757
15758 impl<'de> Drop for UnionOfEndpointsUnion<'de> {
15759 fn drop(&mut self) {
15760 match self.raw.ordinal() {
15761 1 => {
15762 let _ = unsafe {
15763 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
15764 crate::Protocol,
15765 ::fidl_next::wire::fuchsia::Channel,
15766 >>()
15767 };
15768 }
15769
15770 2 => {
15771 let _ = unsafe {
15772 self.raw.get().read_unchecked::<::fidl_next::ServerEnd<
15773 crate::Protocol,
15774 ::fidl_next::wire::fuchsia::Channel,
15775 >>()
15776 };
15777 }
15778
15779 _ => (),
15780 }
15781 }
15782 }
15783
15784 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
15785 type Constraint = ();
15786
15787 fn validate(
15788 _: ::fidl_next::Slot<'_, Self>,
15789 _: Self::Constraint,
15790 ) -> Result<(), ::fidl_next::ValidationError> {
15791 Ok(())
15792 }
15793 }
15794
15795 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
15796 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
15797
15798 #[inline]
15799 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15800 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15801 ::fidl_next::wire::Union::zero_padding(raw);
15802 }
15803 }
15804
15805 pub mod union_of_endpoints_union {
15806 pub enum Ref<'de> {
15807 ClientEnd(
15808 &'de ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15809 ),
15810
15811 ServerEnd(
15812 &'de ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15813 ),
15814
15815 UnknownOrdinal_(u64),
15816 }
15817
15818 pub enum Value {
15819 ClientEnd(::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>),
15820
15821 ServerEnd(::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>),
15822
15823 UnknownOrdinal_(u64),
15824 }
15825 }
15826
15827 impl<'de> UnionOfEndpointsUnion<'de> {
15828 pub fn as_ref(&self) -> crate::wire::union_of_endpoints_union::Ref<'_> {
15829 match self.raw.ordinal() {
15830 1 => crate::wire::union_of_endpoints_union::Ref::ClientEnd(unsafe {
15831 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15832 }),
15833
15834 2 => crate::wire::union_of_endpoints_union::Ref::ServerEnd(unsafe {
15835 self.raw.get().deref_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15836 }),
15837
15838 unknown => crate::wire::union_of_endpoints_union::Ref::UnknownOrdinal_(unknown),
15839 }
15840 }
15841
15842 pub fn into_inner(self) -> crate::wire::union_of_endpoints_union::Value {
15843 let this = ::core::mem::ManuallyDrop::new(self);
15844
15845 match this.raw.ordinal() {
15846 1 => crate::wire::union_of_endpoints_union::Value::ClientEnd(unsafe {
15847 this.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15848 }),
15849
15850 2 => crate::wire::union_of_endpoints_union::Value::ServerEnd(unsafe {
15851 this.raw.get().read_unchecked::<::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>>()
15852 }),
15853
15854 unknown => crate::wire::union_of_endpoints_union::Value::UnknownOrdinal_(unknown),
15855 }
15856 }
15857 }
15858
15859 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
15860 where
15861 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15862 ___D: ::fidl_next::Decoder<'de>,
15863 ___D: ::fidl_next::fuchsia::HandleDecoder,
15864 {
15865 fn decode(
15866 mut slot: ::fidl_next::Slot<'_, Self>,
15867 decoder: &mut ___D,
15868 _: (),
15869 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15870 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15871 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15872 1 => ::fidl_next::wire::Union::decode_as::<
15873 ___D,
15874 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15875 >(raw, decoder, ())?,
15876
15877 2 => ::fidl_next::wire::Union::decode_as::<
15878 ___D,
15879 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
15880 >(raw, decoder, ())?,
15881
15882 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
15883 }
15884
15885 Ok(())
15886 }
15887 }
15888
15889 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
15890 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15891 match self.raw.ordinal() {
15892 1 => unsafe {
15893 self.raw.get().deref_unchecked::<
15894 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
15895 >().fmt(f)
15896 },
15897 2 => unsafe {
15898 self.raw.get().deref_unchecked::<
15899 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>
15900 >().fmt(f)
15901 },
15902 _ => unsafe { ::core::hint::unreachable_unchecked() },
15903 }
15904 }
15905 }
15906
15907 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
15908 type Natural = crate::natural::UnionOfEndpointsUnion;
15909 }
15910
15911 #[derive(Debug)]
15913 #[repr(C)]
15914 pub struct UnionOfEndpoints<'de> {
15915 pub u: crate::wire::UnionOfEndpointsUnion<'de>,
15916 }
15917
15918 static_assertions::const_assert_eq!(std::mem::size_of::<UnionOfEndpoints<'_>>(), 16);
15919 static_assertions::const_assert_eq!(std::mem::align_of::<UnionOfEndpoints<'_>>(), 8);
15920
15921 static_assertions::const_assert_eq!(std::mem::offset_of!(UnionOfEndpoints<'_>, u), 0);
15922
15923 impl ::fidl_next::Constrained for UnionOfEndpoints<'_> {
15924 type Constraint = ();
15925
15926 fn validate(
15927 _: ::fidl_next::Slot<'_, Self>,
15928 _: Self::Constraint,
15929 ) -> Result<(), ::fidl_next::ValidationError> {
15930 Ok(())
15931 }
15932 }
15933
15934 unsafe impl ::fidl_next::Wire for UnionOfEndpoints<'static> {
15935 type Narrowed<'de> = UnionOfEndpoints<'de>;
15936
15937 #[inline]
15938 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15939 ::fidl_next::munge! {
15940 let Self {
15941 u,
15942
15943 } = &mut *out_;
15944 }
15945
15946 ::fidl_next::Wire::zero_padding(u);
15947 }
15948 }
15949
15950 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpoints<'de>
15951 where
15952 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15953 ___D: ::fidl_next::Decoder<'de>,
15954 ___D: ::fidl_next::fuchsia::HandleDecoder,
15955 {
15956 fn decode(
15957 slot_: ::fidl_next::Slot<'_, Self>,
15958 decoder_: &mut ___D,
15959 _: (),
15960 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15961 ::fidl_next::munge! {
15962 let Self {
15963 mut u,
15964
15965 } = slot_;
15966 }
15967
15968 let _field = u.as_mut();
15969
15970 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
15971
15972 Ok(())
15973 }
15974 }
15975
15976 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpoints<'de> {
15977 type Natural = crate::natural::UnionOfEndpoints;
15978 }
15979
15980 #[repr(transparent)]
15982 pub struct UnionOfHandle {
15983 pub(crate) raw: ::fidl_next::wire::Union,
15984 pub(crate) _phantom: ::core::marker::PhantomData<()>,
15985 }
15986
15987 impl Drop for UnionOfHandle {
15988 fn drop(&mut self) {
15989 match self.raw.ordinal() {
15990 1 => {
15991 let _ = unsafe {
15992 self.raw
15993 .get()
15994 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
15995 };
15996 }
15997
15998 _ => unsafe { ::core::hint::unreachable_unchecked() },
15999 }
16000 }
16001 }
16002
16003 impl ::fidl_next::Constrained for UnionOfHandle {
16004 type Constraint = ();
16005
16006 fn validate(
16007 _: ::fidl_next::Slot<'_, Self>,
16008 _: Self::Constraint,
16009 ) -> Result<(), ::fidl_next::ValidationError> {
16010 Ok(())
16011 }
16012 }
16013
16014 unsafe impl ::fidl_next::Wire for UnionOfHandle {
16015 type Narrowed<'de> = UnionOfHandle;
16016
16017 #[inline]
16018 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16019 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16020 ::fidl_next::wire::Union::zero_padding(raw);
16021 }
16022 }
16023
16024 pub mod union_of_handle {
16025 pub enum Ref<'de> {
16026 H(&'de ::fidl_next::wire::fuchsia::NullableHandle),
16027 }
16028
16029 pub enum Value {
16030 H(::fidl_next::wire::fuchsia::NullableHandle),
16031 }
16032 }
16033
16034 impl UnionOfHandle {
16035 pub fn as_ref(&self) -> crate::wire::union_of_handle::Ref<'_> {
16036 match self.raw.ordinal() {
16037 1 => crate::wire::union_of_handle::Ref::H(unsafe {
16038 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
16039 }),
16040
16041 _ => unsafe { ::core::hint::unreachable_unchecked() },
16042 }
16043 }
16044
16045 pub fn into_inner(self) -> crate::wire::union_of_handle::Value {
16046 let this = ::core::mem::ManuallyDrop::new(self);
16047
16048 match this.raw.ordinal() {
16049 1 => crate::wire::union_of_handle::Value::H(unsafe {
16050 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
16051 }),
16052
16053 _ => unsafe { ::core::hint::unreachable_unchecked() },
16054 }
16055 }
16056 }
16057
16058 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
16059 where
16060 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16061 ___D: ::fidl_next::fuchsia::HandleDecoder,
16062 {
16063 fn decode(
16064 mut slot: ::fidl_next::Slot<'_, Self>,
16065 decoder: &mut ___D,
16066 _: (),
16067 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16068 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16069 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16070 1 => ::fidl_next::wire::Union::decode_as_static::<
16071 ___D,
16072 ::fidl_next::wire::fuchsia::NullableHandle,
16073 >(raw, decoder, ())?,
16074
16075 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
16076 }
16077
16078 Ok(())
16079 }
16080 }
16081
16082 impl ::core::fmt::Debug for UnionOfHandle {
16083 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16084 match self.raw.ordinal() {
16085 1 => unsafe {
16086 self.raw
16087 .get()
16088 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
16089 .fmt(f)
16090 },
16091 _ => unsafe { ::core::hint::unreachable_unchecked() },
16092 }
16093 }
16094 }
16095
16096 impl ::fidl_next::IntoNatural for UnionOfHandle {
16097 type Natural = crate::natural::UnionOfHandle;
16098 }
16099
16100 #[derive(Debug)]
16102 #[repr(C)]
16103 pub struct VectorOfArrayOfEventInStructWithDefaultRights<'de> {
16104 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16105 }
16106
16107 static_assertions::const_assert_eq!(
16108 std::mem::size_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
16109 16
16110 );
16111 static_assertions::const_assert_eq!(
16112 std::mem::align_of::<VectorOfArrayOfEventInStructWithDefaultRights<'_>>(),
16113 8
16114 );
16115
16116 static_assertions::const_assert_eq!(
16117 std::mem::offset_of!(VectorOfArrayOfEventInStructWithDefaultRights<'_>, h),
16118 0
16119 );
16120
16121 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithDefaultRights<'_> {
16122 type Constraint = ();
16123
16124 fn validate(
16125 _: ::fidl_next::Slot<'_, Self>,
16126 _: Self::Constraint,
16127 ) -> Result<(), ::fidl_next::ValidationError> {
16128 Ok(())
16129 }
16130 }
16131
16132 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithDefaultRights<'static> {
16133 type Narrowed<'de> = VectorOfArrayOfEventInStructWithDefaultRights<'de>;
16134
16135 #[inline]
16136 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16137 ::fidl_next::munge! {
16138 let Self {
16139 h,
16140
16141 } = &mut *out_;
16142 }
16143
16144 ::fidl_next::Wire::zero_padding(h);
16145 }
16146 }
16147
16148 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16149 for VectorOfArrayOfEventInStructWithDefaultRights<'de>
16150 where
16151 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16152 ___D: ::fidl_next::Decoder<'de>,
16153 ___D: ::fidl_next::fuchsia::HandleDecoder,
16154 {
16155 fn decode(
16156 slot_: ::fidl_next::Slot<'_, Self>,
16157 decoder_: &mut ___D,
16158 _: (),
16159 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16160 ::fidl_next::munge! {
16161 let Self {
16162 mut h,
16163
16164 } = slot_;
16165 }
16166
16167 let _field = h.as_mut();
16168 ::fidl_next::Constrained::validate(_field, (1, ()))?;
16169 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
16170
16171 let h = unsafe { h.deref_unchecked() };
16172
16173 if h.len() > 1 {
16174 return Err(::fidl_next::DecodeError::VectorTooLong {
16175 size: h.len() as u64,
16176 limit: 1,
16177 });
16178 }
16179
16180 Ok(())
16181 }
16182 }
16183
16184 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithDefaultRights<'de> {
16185 type Natural = crate::natural::VectorOfArrayOfEventInStructWithDefaultRights;
16186 }
16187
16188 #[derive(Debug)]
16190 #[repr(C)]
16191 pub struct VectorOfArrayOfEventInStructWithReducedRights<'de> {
16192 pub h: ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16193 }
16194
16195 static_assertions::const_assert_eq!(
16196 std::mem::size_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
16197 16
16198 );
16199 static_assertions::const_assert_eq!(
16200 std::mem::align_of::<VectorOfArrayOfEventInStructWithReducedRights<'_>>(),
16201 8
16202 );
16203
16204 static_assertions::const_assert_eq!(
16205 std::mem::offset_of!(VectorOfArrayOfEventInStructWithReducedRights<'_>, h),
16206 0
16207 );
16208
16209 impl ::fidl_next::Constrained for VectorOfArrayOfEventInStructWithReducedRights<'_> {
16210 type Constraint = ();
16211
16212 fn validate(
16213 _: ::fidl_next::Slot<'_, Self>,
16214 _: Self::Constraint,
16215 ) -> Result<(), ::fidl_next::ValidationError> {
16216 Ok(())
16217 }
16218 }
16219
16220 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInStructWithReducedRights<'static> {
16221 type Narrowed<'de> = VectorOfArrayOfEventInStructWithReducedRights<'de>;
16222
16223 #[inline]
16224 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16225 ::fidl_next::munge! {
16226 let Self {
16227 h,
16228
16229 } = &mut *out_;
16230 }
16231
16232 ::fidl_next::Wire::zero_padding(h);
16233 }
16234 }
16235
16236 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16237 for VectorOfArrayOfEventInStructWithReducedRights<'de>
16238 where
16239 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16240 ___D: ::fidl_next::Decoder<'de>,
16241 ___D: ::fidl_next::fuchsia::HandleDecoder,
16242 {
16243 fn decode(
16244 slot_: ::fidl_next::Slot<'_, Self>,
16245 decoder_: &mut ___D,
16246 _: (),
16247 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16248 ::fidl_next::munge! {
16249 let Self {
16250 mut h,
16251
16252 } = slot_;
16253 }
16254
16255 let _field = h.as_mut();
16256 ::fidl_next::Constrained::validate(_field, (1, ()))?;
16257 ::fidl_next::Decode::decode(h.as_mut(), decoder_, (1, ()))?;
16258
16259 let h = unsafe { h.deref_unchecked() };
16260
16261 if h.len() > 1 {
16262 return Err(::fidl_next::DecodeError::VectorTooLong {
16263 size: h.len() as u64,
16264 limit: 1,
16265 });
16266 }
16267
16268 Ok(())
16269 }
16270 }
16271
16272 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInStructWithReducedRights<'de> {
16273 type Natural = crate::natural::VectorOfArrayOfEventInStructWithReducedRights;
16274 }
16275
16276 #[repr(C)]
16278 pub struct VectorOfArrayOfEventInTableWithReducedRights<'de> {
16279 pub(crate) table: ::fidl_next::wire::Table<'de>,
16280 }
16281
16282 impl<'de> Drop for VectorOfArrayOfEventInTableWithReducedRights<'de> {
16283 fn drop(&mut self) {
16284 let _ = self.table.get(1)
16285 .map(|envelope| unsafe {
16286 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
16287 });
16288 }
16289 }
16290
16291 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRights<'_> {
16292 type Constraint = ();
16293
16294 fn validate(
16295 _: ::fidl_next::Slot<'_, Self>,
16296 _: Self::Constraint,
16297 ) -> Result<(), ::fidl_next::ValidationError> {
16298 Ok(())
16299 }
16300 }
16301
16302 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRights<'static> {
16303 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRights<'de>;
16304
16305 #[inline]
16306 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16307 ::fidl_next::munge!(let Self { table } = out);
16308 ::fidl_next::wire::Table::zero_padding(table);
16309 }
16310 }
16311
16312 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16313 for VectorOfArrayOfEventInTableWithReducedRights<'de>
16314 where
16315 ___D: ::fidl_next::Decoder<'de> + ?Sized,
16316 ___D: ::fidl_next::fuchsia::HandleDecoder,
16317 {
16318 fn decode(
16319 slot: ::fidl_next::Slot<'_, Self>,
16320 decoder: &mut ___D,
16321 _: (),
16322 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16323 ::fidl_next::munge!(let Self { table } = slot);
16324
16325 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16326 match ordinal {
16327 0 => unsafe { ::core::hint::unreachable_unchecked() },
16328
16329 1 => {
16330 ::fidl_next::wire::Envelope::decode_as::<
16331 ___D,
16332 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16333 >(slot.as_mut(), decoder, (1, ()))?;
16334
16335 let value = unsafe {
16336 slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
16337 '_,
16338 [::fidl_next::wire::fuchsia::Event; 1],
16339 >>()
16340 };
16341
16342 if value.len() > 1 {
16343 return Err(::fidl_next::DecodeError::VectorTooLong {
16344 size: value.len() as u64,
16345 limit: 1,
16346 });
16347 }
16348
16349 Ok(())
16350 }
16351
16352 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16353 }
16354 })
16355 }
16356 }
16357
16358 impl<'de> VectorOfArrayOfEventInTableWithReducedRights<'de> {
16359 pub fn h(
16360 &self,
16361 ) -> ::core::option::Option<
16362 &::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16363 > {
16364 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16365 }
16366
16367 pub fn take_h(
16368 &mut self,
16369 ) -> ::core::option::Option<
16370 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16371 > {
16372 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16373 }
16374 }
16375
16376 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInTableWithReducedRights<'de> {
16377 fn fmt(
16378 &self,
16379 f: &mut ::core::fmt::Formatter<'_>,
16380 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16381 f.debug_struct("VectorOfArrayOfEventInTableWithReducedRights")
16382 .field("h", &self.h())
16383 .finish()
16384 }
16385 }
16386
16387 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRights<'de> {
16388 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRights;
16389 }
16390
16391 #[derive(Debug)]
16393 #[repr(C)]
16394 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
16395 pub t: crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'de>,
16396 }
16397
16398 static_assertions::const_assert_eq!(
16399 std::mem::size_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
16400 16
16401 );
16402 static_assertions::const_assert_eq!(
16403 std::mem::align_of::<VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>>(),
16404 8
16405 );
16406
16407 static_assertions::const_assert_eq!(
16408 std::mem::offset_of!(VectorOfArrayOfEventInTableWithReducedRightsStruct<'_>, t),
16409 0
16410 );
16411
16412 impl ::fidl_next::Constrained for VectorOfArrayOfEventInTableWithReducedRightsStruct<'_> {
16413 type Constraint = ();
16414
16415 fn validate(
16416 _: ::fidl_next::Slot<'_, Self>,
16417 _: Self::Constraint,
16418 ) -> Result<(), ::fidl_next::ValidationError> {
16419 Ok(())
16420 }
16421 }
16422
16423 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInTableWithReducedRightsStruct<'static> {
16424 type Narrowed<'de> = VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>;
16425
16426 #[inline]
16427 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16428 ::fidl_next::munge! {
16429 let Self {
16430 t,
16431
16432 } = &mut *out_;
16433 }
16434
16435 ::fidl_next::Wire::zero_padding(t);
16436 }
16437 }
16438
16439 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16440 for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de>
16441 where
16442 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16443 ___D: ::fidl_next::Decoder<'de>,
16444 ___D: ::fidl_next::fuchsia::HandleDecoder,
16445 {
16446 fn decode(
16447 slot_: ::fidl_next::Slot<'_, Self>,
16448 decoder_: &mut ___D,
16449 _: (),
16450 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16451 ::fidl_next::munge! {
16452 let Self {
16453 mut t,
16454
16455 } = slot_;
16456 }
16457
16458 let _field = t.as_mut();
16459
16460 ::fidl_next::Decode::decode(t.as_mut(), decoder_, ())?;
16461
16462 Ok(())
16463 }
16464 }
16465
16466 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInTableWithReducedRightsStruct<'de> {
16467 type Natural = crate::natural::VectorOfArrayOfEventInTableWithReducedRightsStruct;
16468 }
16469
16470 #[repr(transparent)]
16472 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16473 pub(crate) raw: ::fidl_next::wire::Union,
16474 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16475 }
16476
16477 impl<'de> Drop for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16478 fn drop(&mut self) {
16479 match self.raw.ordinal() {
16480 1 => {
16481 let _ = unsafe {
16482 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
16483 };
16484 }
16485
16486 _ => unsafe { ::core::hint::unreachable_unchecked() },
16487 }
16488 }
16489 }
16490
16491 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
16492 type Constraint = ();
16493
16494 fn validate(
16495 _: ::fidl_next::Slot<'_, Self>,
16496 _: Self::Constraint,
16497 ) -> Result<(), ::fidl_next::ValidationError> {
16498 Ok(())
16499 }
16500 }
16501
16502 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
16503 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
16504
16505 #[inline]
16506 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16507 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16508 ::fidl_next::wire::Union::zero_padding(raw);
16509 }
16510 }
16511
16512 pub mod vector_of_array_of_event_in_union_with_reduced_rights {
16513 pub enum Ref<'de> {
16514 H(&'de ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>),
16515 }
16516
16517 pub enum Value<'de> {
16518 H(::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>),
16519 }
16520 }
16521
16522 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16523 pub fn as_ref(
16524 &self,
16525 ) -> crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref<'_> {
16526 match self.raw.ordinal() {
16527 1 => crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Ref::H(
16528 unsafe {
16529 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>>()
16530 },
16531 ),
16532
16533 _ => unsafe { ::core::hint::unreachable_unchecked() },
16534 }
16535 }
16536
16537 pub fn into_inner(
16538 self,
16539 ) -> crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Value<'de>
16540 {
16541 let this = ::core::mem::ManuallyDrop::new(self);
16542
16543 match this.raw.ordinal() {
16544 1 => crate::wire::vector_of_array_of_event_in_union_with_reduced_rights::Value::H(
16545 unsafe {
16546 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>>()
16547 },
16548 ),
16549
16550 _ => unsafe { ::core::hint::unreachable_unchecked() },
16551 }
16552 }
16553 }
16554
16555 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16556 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
16557 where
16558 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16559 ___D: ::fidl_next::Decoder<'de>,
16560 ___D: ::fidl_next::fuchsia::HandleDecoder,
16561 {
16562 fn decode(
16563 mut slot: ::fidl_next::Slot<'_, Self>,
16564 decoder: &mut ___D,
16565 _: (),
16566 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16567 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16568 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16569 1 => ::fidl_next::wire::Union::decode_as::<
16570 ___D,
16571 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
16572 >(raw, decoder, (1, ()))?,
16573
16574 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
16575 }
16576
16577 Ok(())
16578 }
16579 }
16580
16581 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16582 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16583 match self.raw.ordinal() {
16584 1 => unsafe {
16585 self.raw.get().deref_unchecked::<
16586 ::fidl_next::wire::Vector<'_, [::fidl_next::wire::fuchsia::Event; 1]>
16587 >().fmt(f)
16588 },
16589 _ => unsafe { ::core::hint::unreachable_unchecked() },
16590 }
16591 }
16592 }
16593
16594 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
16595 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRights;
16596 }
16597
16598 #[derive(Debug)]
16600 #[repr(C)]
16601 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
16602 pub u: crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>,
16603 }
16604
16605 static_assertions::const_assert_eq!(
16606 std::mem::size_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
16607 16
16608 );
16609 static_assertions::const_assert_eq!(
16610 std::mem::align_of::<VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>>(),
16611 8
16612 );
16613
16614 static_assertions::const_assert_eq!(
16615 std::mem::offset_of!(VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_>, u),
16616 0
16617 );
16618
16619 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'_> {
16620 type Constraint = ();
16621
16622 fn validate(
16623 _: ::fidl_next::Slot<'_, Self>,
16624 _: Self::Constraint,
16625 ) -> Result<(), ::fidl_next::ValidationError> {
16626 Ok(())
16627 }
16628 }
16629
16630 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static> {
16631 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>;
16632
16633 #[inline]
16634 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16635 ::fidl_next::munge! {
16636 let Self {
16637 u,
16638
16639 } = &mut *out_;
16640 }
16641
16642 ::fidl_next::Wire::zero_padding(u);
16643 }
16644 }
16645
16646 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16647 for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de>
16648 where
16649 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16650 ___D: ::fidl_next::Decoder<'de>,
16651 ___D: ::fidl_next::fuchsia::HandleDecoder,
16652 {
16653 fn decode(
16654 slot_: ::fidl_next::Slot<'_, Self>,
16655 decoder_: &mut ___D,
16656 _: (),
16657 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16658 ::fidl_next::munge! {
16659 let Self {
16660 mut u,
16661
16662 } = slot_;
16663 }
16664
16665 let _field = u.as_mut();
16666
16667 ::fidl_next::Decode::decode(u.as_mut(), decoder_, ())?;
16668
16669 Ok(())
16670 }
16671 }
16672
16673 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRightsStruct<'de> {
16674 type Natural = crate::natural::VectorOfArrayOfEventInUnionWithReducedRightsStruct;
16675 }
16676
16677 #[derive(Debug)]
16679 #[repr(C)]
16680 pub struct VectorOfHandles<'de> {
16681 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
16682 }
16683
16684 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfHandles<'_>>(), 16);
16685 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfHandles<'_>>(), 8);
16686
16687 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfHandles<'_>, v), 0);
16688
16689 impl ::fidl_next::Constrained for VectorOfHandles<'_> {
16690 type Constraint = ();
16691
16692 fn validate(
16693 _: ::fidl_next::Slot<'_, Self>,
16694 _: Self::Constraint,
16695 ) -> Result<(), ::fidl_next::ValidationError> {
16696 Ok(())
16697 }
16698 }
16699
16700 unsafe impl ::fidl_next::Wire for VectorOfHandles<'static> {
16701 type Narrowed<'de> = VectorOfHandles<'de>;
16702
16703 #[inline]
16704 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16705 ::fidl_next::munge! {
16706 let Self {
16707 v,
16708
16709 } = &mut *out_;
16710 }
16711
16712 ::fidl_next::Wire::zero_padding(v);
16713 }
16714 }
16715
16716 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfHandles<'de>
16717 where
16718 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16719 ___D: ::fidl_next::Decoder<'de>,
16720 ___D: ::fidl_next::fuchsia::HandleDecoder,
16721 {
16722 fn decode(
16723 slot_: ::fidl_next::Slot<'_, Self>,
16724 decoder_: &mut ___D,
16725 _: (),
16726 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16727 ::fidl_next::munge! {
16728 let Self {
16729 mut v,
16730
16731 } = slot_;
16732 }
16733
16734 let _field = v.as_mut();
16735 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
16736 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
16737
16738 Ok(())
16739 }
16740 }
16741
16742 impl<'de> ::fidl_next::IntoNatural for VectorOfHandles<'de> {
16743 type Natural = crate::natural::VectorOfHandles;
16744 }
16745
16746 #[derive(Debug)]
16748 #[repr(C)]
16749 pub struct VectorOfOptionalHandles<'de> {
16750 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::OptionalNullableHandle>,
16751 }
16752
16753 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfOptionalHandles<'_>>(), 16);
16754 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfOptionalHandles<'_>>(), 8);
16755
16756 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfOptionalHandles<'_>, v), 0);
16757
16758 impl ::fidl_next::Constrained for VectorOfOptionalHandles<'_> {
16759 type Constraint = ();
16760
16761 fn validate(
16762 _: ::fidl_next::Slot<'_, Self>,
16763 _: Self::Constraint,
16764 ) -> Result<(), ::fidl_next::ValidationError> {
16765 Ok(())
16766 }
16767 }
16768
16769 unsafe impl ::fidl_next::Wire for VectorOfOptionalHandles<'static> {
16770 type Narrowed<'de> = VectorOfOptionalHandles<'de>;
16771
16772 #[inline]
16773 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16774 ::fidl_next::munge! {
16775 let Self {
16776 v,
16777
16778 } = &mut *out_;
16779 }
16780
16781 ::fidl_next::Wire::zero_padding(v);
16782 }
16783 }
16784
16785 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfOptionalHandles<'de>
16786 where
16787 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16788 ___D: ::fidl_next::Decoder<'de>,
16789 ___D: ::fidl_next::fuchsia::HandleDecoder,
16790 {
16791 fn decode(
16792 slot_: ::fidl_next::Slot<'_, Self>,
16793 decoder_: &mut ___D,
16794 _: (),
16795 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16796 ::fidl_next::munge! {
16797 let Self {
16798 mut v,
16799
16800 } = slot_;
16801 }
16802
16803 let _field = v.as_mut();
16804 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
16805 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (4294967295, ()))?;
16806
16807 Ok(())
16808 }
16809 }
16810
16811 impl<'de> ::fidl_next::IntoNatural for VectorOfOptionalHandles<'de> {
16812 type Natural = crate::natural::VectorOfOptionalHandles;
16813 }
16814
16815 #[derive(Debug)]
16817 #[repr(C)]
16818 pub struct VectorOfUpTo2Handles<'de> {
16819 pub v: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
16820 }
16821
16822 static_assertions::const_assert_eq!(std::mem::size_of::<VectorOfUpTo2Handles<'_>>(), 16);
16823 static_assertions::const_assert_eq!(std::mem::align_of::<VectorOfUpTo2Handles<'_>>(), 8);
16824
16825 static_assertions::const_assert_eq!(std::mem::offset_of!(VectorOfUpTo2Handles<'_>, v), 0);
16826
16827 impl ::fidl_next::Constrained for VectorOfUpTo2Handles<'_> {
16828 type Constraint = ();
16829
16830 fn validate(
16831 _: ::fidl_next::Slot<'_, Self>,
16832 _: Self::Constraint,
16833 ) -> Result<(), ::fidl_next::ValidationError> {
16834 Ok(())
16835 }
16836 }
16837
16838 unsafe impl ::fidl_next::Wire for VectorOfUpTo2Handles<'static> {
16839 type Narrowed<'de> = VectorOfUpTo2Handles<'de>;
16840
16841 #[inline]
16842 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16843 ::fidl_next::munge! {
16844 let Self {
16845 v,
16846
16847 } = &mut *out_;
16848 }
16849
16850 ::fidl_next::Wire::zero_padding(v);
16851 }
16852 }
16853
16854 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VectorOfUpTo2Handles<'de>
16855 where
16856 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16857 ___D: ::fidl_next::Decoder<'de>,
16858 ___D: ::fidl_next::fuchsia::HandleDecoder,
16859 {
16860 fn decode(
16861 slot_: ::fidl_next::Slot<'_, Self>,
16862 decoder_: &mut ___D,
16863 _: (),
16864 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16865 ::fidl_next::munge! {
16866 let Self {
16867 mut v,
16868
16869 } = slot_;
16870 }
16871
16872 let _field = v.as_mut();
16873 ::fidl_next::Constrained::validate(_field, (2, ()))?;
16874 ::fidl_next::Decode::decode(v.as_mut(), decoder_, (2, ()))?;
16875
16876 let v = unsafe { v.deref_unchecked() };
16877
16878 if v.len() > 2 {
16879 return Err(::fidl_next::DecodeError::VectorTooLong {
16880 size: v.len() as u64,
16881 limit: 2,
16882 });
16883 }
16884
16885 Ok(())
16886 }
16887 }
16888
16889 impl<'de> ::fidl_next::IntoNatural for VectorOfUpTo2Handles<'de> {
16890 type Natural = crate::natural::VectorOfUpTo2Handles;
16891 }
16892}
16893
16894pub mod wire_optional {
16895
16896 pub use fidl_next_common_test_conformance::wire_optional::*;
16897
16898 #[repr(transparent)]
16899 pub struct ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16900 pub(crate) raw: ::fidl_next::wire::Union,
16901 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16902 }
16903
16904 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithDefaultRights<'_> {
16905 type Constraint = ();
16906
16907 fn validate(
16908 _: ::fidl_next::Slot<'_, Self>,
16909 _: Self::Constraint,
16910 ) -> Result<(), ::fidl_next::ValidationError> {
16911 Ok(())
16912 }
16913 }
16914
16915 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithDefaultRights<'static> {
16916 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithDefaultRights<'de>;
16917
16918 #[inline]
16919 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16920 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16921 ::fidl_next::wire::Union::zero_padding(raw);
16922 }
16923 }
16924
16925 impl<'de> ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16926 pub fn is_some(&self) -> bool {
16927 self.raw.is_some()
16928 }
16929
16930 pub fn is_none(&self) -> bool {
16931 self.raw.is_none()
16932 }
16933
16934 pub fn as_ref(
16935 &self,
16936 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
16937 {
16938 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16939 }
16940
16941 pub fn into_option(
16942 self,
16943 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'de>>
16944 {
16945 if self.is_some() {
16946 Some(crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights {
16947 raw: self.raw,
16948 _phantom: ::core::marker::PhantomData,
16949 })
16950 } else {
16951 None
16952 }
16953 }
16954 }
16955
16956 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
16957 for ArrayOfVectorOfEventInUnionWithDefaultRights<'de>
16958 where
16959 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16960 ___D: ::fidl_next::Decoder<'de>,
16961 ___D: ::fidl_next::fuchsia::HandleDecoder,
16962 {
16963 fn decode(
16964 mut slot: ::fidl_next::Slot<'_, Self>,
16965 decoder: &mut ___D,
16966 _: (),
16967 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16968 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16969 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16970 1 => ::fidl_next::wire::Union::decode_as::<
16971 ___D,
16972 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
16973 >(raw, decoder, (1, ()))?,
16974
16975 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16976 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16977 }
16978
16979 Ok(())
16980 }
16981 }
16982
16983 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16984 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16985 self.as_ref().fmt(f)
16986 }
16987 }
16988
16989 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithDefaultRights<'de> {
16990 type Natural =
16991 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithDefaultRights>;
16992 }
16993
16994 #[repr(transparent)]
16995 pub struct ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
16996 pub(crate) raw: ::fidl_next::wire::Union,
16997 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16998 }
16999
17000 impl ::fidl_next::Constrained for ArrayOfVectorOfEventInUnionWithReducedRights<'_> {
17001 type Constraint = ();
17002
17003 fn validate(
17004 _: ::fidl_next::Slot<'_, Self>,
17005 _: Self::Constraint,
17006 ) -> Result<(), ::fidl_next::ValidationError> {
17007 Ok(())
17008 }
17009 }
17010
17011 unsafe impl ::fidl_next::Wire for ArrayOfVectorOfEventInUnionWithReducedRights<'static> {
17012 type Narrowed<'de> = ArrayOfVectorOfEventInUnionWithReducedRights<'de>;
17013
17014 #[inline]
17015 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17016 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17017 ::fidl_next::wire::Union::zero_padding(raw);
17018 }
17019 }
17020
17021 impl<'de> ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
17022 pub fn is_some(&self) -> bool {
17023 self.raw.is_some()
17024 }
17025
17026 pub fn is_none(&self) -> bool {
17027 self.raw.is_none()
17028 }
17029
17030 pub fn as_ref(
17031 &self,
17032 ) -> ::core::option::Option<&crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
17033 {
17034 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17035 }
17036
17037 pub fn into_option(
17038 self,
17039 ) -> ::core::option::Option<crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'de>>
17040 {
17041 if self.is_some() {
17042 Some(crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights {
17043 raw: self.raw,
17044 _phantom: ::core::marker::PhantomData,
17045 })
17046 } else {
17047 None
17048 }
17049 }
17050 }
17051
17052 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
17053 for ArrayOfVectorOfEventInUnionWithReducedRights<'de>
17054 where
17055 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17056 ___D: ::fidl_next::Decoder<'de>,
17057 ___D: ::fidl_next::fuchsia::HandleDecoder,
17058 {
17059 fn decode(
17060 mut slot: ::fidl_next::Slot<'_, Self>,
17061 decoder: &mut ___D,
17062 _: (),
17063 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17064 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17065 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17066 1 => ::fidl_next::wire::Union::decode_as::<
17067 ___D,
17068 [::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Event>; 1],
17069 >(raw, decoder, (1, ()))?,
17070
17071 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17072 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17073 }
17074
17075 Ok(())
17076 }
17077 }
17078
17079 impl<'de> ::core::fmt::Debug for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
17080 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17081 self.as_ref().fmt(f)
17082 }
17083 }
17084
17085 impl<'de> ::fidl_next::IntoNatural for ArrayOfVectorOfEventInUnionWithReducedRights<'de> {
17086 type Natural =
17087 ::core::option::Option<crate::natural::ArrayOfVectorOfEventInUnionWithReducedRights>;
17088 }
17089
17090 #[repr(transparent)]
17091 pub struct EnvelopeInliningTestUnion<'de> {
17092 pub(crate) raw: ::fidl_next::wire::Union,
17093 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17094 }
17095
17096 impl ::fidl_next::Constrained for EnvelopeInliningTestUnion<'_> {
17097 type Constraint = ();
17098
17099 fn validate(
17100 _: ::fidl_next::Slot<'_, Self>,
17101 _: Self::Constraint,
17102 ) -> Result<(), ::fidl_next::ValidationError> {
17103 Ok(())
17104 }
17105 }
17106
17107 unsafe impl ::fidl_next::Wire for EnvelopeInliningTestUnion<'static> {
17108 type Narrowed<'de> = EnvelopeInliningTestUnion<'de>;
17109
17110 #[inline]
17111 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17112 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17113 ::fidl_next::wire::Union::zero_padding(raw);
17114 }
17115 }
17116
17117 impl<'de> EnvelopeInliningTestUnion<'de> {
17118 pub fn is_some(&self) -> bool {
17119 self.raw.is_some()
17120 }
17121
17122 pub fn is_none(&self) -> bool {
17123 self.raw.is_none()
17124 }
17125
17126 pub fn as_ref(
17127 &self,
17128 ) -> ::core::option::Option<&crate::wire::EnvelopeInliningTestUnion<'de>> {
17129 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17130 }
17131
17132 pub fn into_option(
17133 self,
17134 ) -> ::core::option::Option<crate::wire::EnvelopeInliningTestUnion<'de>> {
17135 if self.is_some() {
17136 Some(crate::wire::EnvelopeInliningTestUnion {
17137 raw: self.raw,
17138 _phantom: ::core::marker::PhantomData,
17139 })
17140 } else {
17141 None
17142 }
17143 }
17144 }
17145
17146 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EnvelopeInliningTestUnion<'de>
17147 where
17148 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17149 ___D: ::fidl_next::Decoder<'de>,
17150 ___D: ::fidl_next::fuchsia::HandleDecoder,
17151 {
17152 fn decode(
17153 mut slot: ::fidl_next::Slot<'_, Self>,
17154 decoder: &mut ___D,
17155 _: (),
17156 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17157 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17158 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17159 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
17160 raw,
17161 decoder,
17162 (),
17163 )?,
17164
17165 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
17166 raw,
17167 decoder,
17168 (),
17169 )?,
17170
17171 3 => ::fidl_next::wire::Union::decode_as::<
17172 ___D,
17173 ::fidl_next::wire::fuchsia::NullableHandle,
17174 >(raw, decoder, ())?,
17175
17176 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17177 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17178 }
17179
17180 Ok(())
17181 }
17182 }
17183
17184 impl<'de> ::core::fmt::Debug for EnvelopeInliningTestUnion<'de> {
17185 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17186 self.as_ref().fmt(f)
17187 }
17188 }
17189
17190 impl<'de> ::fidl_next::IntoNatural for EnvelopeInliningTestUnion<'de> {
17191 type Natural = ::core::option::Option<crate::natural::EnvelopeInliningTestUnion>;
17192 }
17193
17194 #[repr(transparent)]
17195 pub struct SampleResourceXUnion<'de> {
17196 pub(crate) raw: ::fidl_next::wire::Union,
17197 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17198 }
17199
17200 impl ::fidl_next::Constrained for SampleResourceXUnion<'_> {
17201 type Constraint = ();
17202
17203 fn validate(
17204 _: ::fidl_next::Slot<'_, Self>,
17205 _: Self::Constraint,
17206 ) -> Result<(), ::fidl_next::ValidationError> {
17207 Ok(())
17208 }
17209 }
17210
17211 unsafe impl ::fidl_next::Wire for SampleResourceXUnion<'static> {
17212 type Narrowed<'de> = SampleResourceXUnion<'de>;
17213
17214 #[inline]
17215 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17216 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17217 ::fidl_next::wire::Union::zero_padding(raw);
17218 }
17219 }
17220
17221 impl<'de> SampleResourceXUnion<'de> {
17222 pub fn is_some(&self) -> bool {
17223 self.raw.is_some()
17224 }
17225
17226 pub fn is_none(&self) -> bool {
17227 self.raw.is_none()
17228 }
17229
17230 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SampleResourceXUnion<'de>> {
17231 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17232 }
17233
17234 pub fn into_option(self) -> ::core::option::Option<crate::wire::SampleResourceXUnion<'de>> {
17235 if self.is_some() {
17236 Some(crate::wire::SampleResourceXUnion {
17237 raw: self.raw,
17238 _phantom: ::core::marker::PhantomData,
17239 })
17240 } else {
17241 None
17242 }
17243 }
17244 }
17245
17246 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleResourceXUnion<'de>
17247 where
17248 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17249 ___D: ::fidl_next::Decoder<'de>,
17250 ___D: ::fidl_next::fuchsia::HandleDecoder,
17251 {
17252 fn decode(
17253 mut slot: ::fidl_next::Slot<'_, Self>,
17254 decoder: &mut ___D,
17255 _: (),
17256 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17257 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17258 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17259 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
17260 raw,
17261 decoder,
17262 (),
17263 )?,
17264
17265 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
17266 raw,
17267 decoder,
17268 (),
17269 )?,
17270
17271 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
17272 raw,
17273 decoder,
17274 (),
17275 )?,
17276
17277 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17278 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17279 }
17280
17281 Ok(())
17282 }
17283 }
17284
17285 impl<'de> ::core::fmt::Debug for SampleResourceXUnion<'de> {
17286 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17287 self.as_ref().fmt(f)
17288 }
17289 }
17290
17291 impl<'de> ::fidl_next::IntoNatural for SampleResourceXUnion<'de> {
17292 type Natural = ::core::option::Option<crate::natural::SampleResourceXUnion>;
17293 }
17294
17295 #[repr(transparent)]
17296 pub struct SampleStrictResourceXUnion<'de> {
17297 pub(crate) raw: ::fidl_next::wire::Union,
17298 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17299 }
17300
17301 impl ::fidl_next::Constrained for SampleStrictResourceXUnion<'_> {
17302 type Constraint = ();
17303
17304 fn validate(
17305 _: ::fidl_next::Slot<'_, Self>,
17306 _: Self::Constraint,
17307 ) -> Result<(), ::fidl_next::ValidationError> {
17308 Ok(())
17309 }
17310 }
17311
17312 unsafe impl ::fidl_next::Wire for SampleStrictResourceXUnion<'static> {
17313 type Narrowed<'de> = SampleStrictResourceXUnion<'de>;
17314
17315 #[inline]
17316 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17317 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17318 ::fidl_next::wire::Union::zero_padding(raw);
17319 }
17320 }
17321
17322 impl<'de> SampleStrictResourceXUnion<'de> {
17323 pub fn is_some(&self) -> bool {
17324 self.raw.is_some()
17325 }
17326
17327 pub fn is_none(&self) -> bool {
17328 self.raw.is_none()
17329 }
17330
17331 pub fn as_ref(
17332 &self,
17333 ) -> ::core::option::Option<&crate::wire::SampleStrictResourceXUnion<'de>> {
17334 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17335 }
17336
17337 pub fn into_option(
17338 self,
17339 ) -> ::core::option::Option<crate::wire::SampleStrictResourceXUnion<'de>> {
17340 if self.is_some() {
17341 Some(crate::wire::SampleStrictResourceXUnion {
17342 raw: self.raw,
17343 _phantom: ::core::marker::PhantomData,
17344 })
17345 } else {
17346 None
17347 }
17348 }
17349 }
17350
17351 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleStrictResourceXUnion<'de>
17352 where
17353 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17354 ___D: ::fidl_next::Decoder<'de>,
17355 ___D: ::fidl_next::fuchsia::HandleDecoder,
17356 {
17357 fn decode(
17358 mut slot: ::fidl_next::Slot<'_, Self>,
17359 decoder: &mut ___D,
17360 _: (),
17361 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17362 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17363 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17364 1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint32>(
17365 raw,
17366 decoder,
17367 (),
17368 )?,
17369
17370 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleUnion<'de>>(
17371 raw,
17372 decoder,
17373 (),
17374 )?,
17375
17376 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SimpleTable<'de>>(
17377 raw,
17378 decoder,
17379 (),
17380 )?,
17381
17382 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17383 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17384 }
17385
17386 Ok(())
17387 }
17388 }
17389
17390 impl<'de> ::core::fmt::Debug for SampleStrictResourceXUnion<'de> {
17391 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17392 self.as_ref().fmt(f)
17393 }
17394 }
17395
17396 impl<'de> ::fidl_next::IntoNatural for SampleStrictResourceXUnion<'de> {
17397 type Natural = ::core::option::Option<crate::natural::SampleStrictResourceXUnion>;
17398 }
17399
17400 #[repr(transparent)]
17401 pub struct UnionWithVector<'de> {
17402 pub(crate) raw: ::fidl_next::wire::Union,
17403 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17404 }
17405
17406 impl ::fidl_next::Constrained for UnionWithVector<'_> {
17407 type Constraint = ();
17408
17409 fn validate(
17410 _: ::fidl_next::Slot<'_, Self>,
17411 _: Self::Constraint,
17412 ) -> Result<(), ::fidl_next::ValidationError> {
17413 Ok(())
17414 }
17415 }
17416
17417 unsafe impl ::fidl_next::Wire for UnionWithVector<'static> {
17418 type Narrowed<'de> = UnionWithVector<'de>;
17419
17420 #[inline]
17421 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17422 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17423 ::fidl_next::wire::Union::zero_padding(raw);
17424 }
17425 }
17426
17427 impl<'de> UnionWithVector<'de> {
17428 pub fn is_some(&self) -> bool {
17429 self.raw.is_some()
17430 }
17431
17432 pub fn is_none(&self) -> bool {
17433 self.raw.is_none()
17434 }
17435
17436 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionWithVector<'de>> {
17437 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17438 }
17439
17440 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionWithVector<'de>> {
17441 if self.is_some() {
17442 Some(crate::wire::UnionWithVector {
17443 raw: self.raw,
17444 _phantom: ::core::marker::PhantomData,
17445 })
17446 } else {
17447 None
17448 }
17449 }
17450 }
17451
17452 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionWithVector<'de>
17453 where
17454 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17455 ___D: ::fidl_next::Decoder<'de>,
17456 ___D: ::fidl_next::fuchsia::HandleDecoder,
17457 {
17458 fn decode(
17459 mut slot: ::fidl_next::Slot<'_, Self>,
17460 decoder: &mut ___D,
17461 _: (),
17462 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17463 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17464 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17465 1 => ::fidl_next::wire::Union::decode_as::<___D, u8>(raw, decoder, ())?,
17466
17467 2 => {
17468 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
17469 raw,
17470 decoder,
17471 (4294967295, ()),
17472 )?
17473 }
17474
17475 3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
17476 raw, decoder, 4294967295,
17477 )?,
17478
17479 4 => ::fidl_next::wire::Union::decode_as::<
17480 ___D,
17481 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align1>,
17482 >(raw, decoder, (4294967295, ()))?,
17483
17484 5 => ::fidl_next::wire::Union::decode_as::<
17485 ___D,
17486 ::fidl_next::wire::Vector<'de, crate::wire::StructSize3Align2>,
17487 >(raw, decoder, (4294967295, ()))?,
17488
17489 6 => ::fidl_next::wire::Union::decode_as::<
17490 ___D,
17491 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::NullableHandle>,
17492 >(raw, decoder, (4294967295, ()))?,
17493
17494 7 => ::fidl_next::wire::Union::decode_as::<
17495 ___D,
17496 [crate::wire::StructSize3Align1; 2],
17497 >(raw, decoder, ())?,
17498
17499 8 => ::fidl_next::wire::Union::decode_as::<
17500 ___D,
17501 [crate::wire::StructSize3Align2; 2],
17502 >(raw, decoder, ())?,
17503
17504 9 => ::fidl_next::wire::Union::decode_as::<
17505 ___D,
17506 ::fidl_next::wire::Vector<'de, crate::wire::UnionSize8Align4>,
17507 >(raw, decoder, (4294967295, ()))?,
17508
17509 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17510 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17511 }
17512
17513 Ok(())
17514 }
17515 }
17516
17517 impl<'de> ::core::fmt::Debug for UnionWithVector<'de> {
17518 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17519 self.as_ref().fmt(f)
17520 }
17521 }
17522
17523 impl<'de> ::fidl_next::IntoNatural for UnionWithVector<'de> {
17524 type Natural = ::core::option::Option<crate::natural::UnionWithVector>;
17525 }
17526
17527 #[repr(transparent)]
17528 pub struct UnionOfEndpointsUnion<'de> {
17529 pub(crate) raw: ::fidl_next::wire::Union,
17530 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17531 }
17532
17533 impl ::fidl_next::Constrained for UnionOfEndpointsUnion<'_> {
17534 type Constraint = ();
17535
17536 fn validate(
17537 _: ::fidl_next::Slot<'_, Self>,
17538 _: Self::Constraint,
17539 ) -> Result<(), ::fidl_next::ValidationError> {
17540 Ok(())
17541 }
17542 }
17543
17544 unsafe impl ::fidl_next::Wire for UnionOfEndpointsUnion<'static> {
17545 type Narrowed<'de> = UnionOfEndpointsUnion<'de>;
17546
17547 #[inline]
17548 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17549 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17550 ::fidl_next::wire::Union::zero_padding(raw);
17551 }
17552 }
17553
17554 impl<'de> UnionOfEndpointsUnion<'de> {
17555 pub fn is_some(&self) -> bool {
17556 self.raw.is_some()
17557 }
17558
17559 pub fn is_none(&self) -> bool {
17560 self.raw.is_none()
17561 }
17562
17563 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfEndpointsUnion<'de>> {
17564 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17565 }
17566
17567 pub fn into_option(
17568 self,
17569 ) -> ::core::option::Option<crate::wire::UnionOfEndpointsUnion<'de>> {
17570 if self.is_some() {
17571 Some(crate::wire::UnionOfEndpointsUnion {
17572 raw: self.raw,
17573 _phantom: ::core::marker::PhantomData,
17574 })
17575 } else {
17576 None
17577 }
17578 }
17579 }
17580
17581 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnionOfEndpointsUnion<'de>
17582 where
17583 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17584 ___D: ::fidl_next::Decoder<'de>,
17585 ___D: ::fidl_next::fuchsia::HandleDecoder,
17586 {
17587 fn decode(
17588 mut slot: ::fidl_next::Slot<'_, Self>,
17589 decoder: &mut ___D,
17590 _: (),
17591 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17592 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17593 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17594 1 => ::fidl_next::wire::Union::decode_as::<
17595 ___D,
17596 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
17597 >(raw, decoder, ())?,
17598
17599 2 => ::fidl_next::wire::Union::decode_as::<
17600 ___D,
17601 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
17602 >(raw, decoder, ())?,
17603
17604 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17605 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17606 }
17607
17608 Ok(())
17609 }
17610 }
17611
17612 impl<'de> ::core::fmt::Debug for UnionOfEndpointsUnion<'de> {
17613 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17614 self.as_ref().fmt(f)
17615 }
17616 }
17617
17618 impl<'de> ::fidl_next::IntoNatural for UnionOfEndpointsUnion<'de> {
17619 type Natural = ::core::option::Option<crate::natural::UnionOfEndpointsUnion>;
17620 }
17621
17622 #[repr(transparent)]
17623 pub struct UnionOfHandle {
17624 pub(crate) raw: ::fidl_next::wire::Union,
17625 pub(crate) _phantom: ::core::marker::PhantomData<()>,
17626 }
17627
17628 impl ::fidl_next::Constrained for UnionOfHandle {
17629 type Constraint = ();
17630
17631 fn validate(
17632 _: ::fidl_next::Slot<'_, Self>,
17633 _: Self::Constraint,
17634 ) -> Result<(), ::fidl_next::ValidationError> {
17635 Ok(())
17636 }
17637 }
17638
17639 unsafe impl ::fidl_next::Wire for UnionOfHandle {
17640 type Narrowed<'de> = UnionOfHandle;
17641
17642 #[inline]
17643 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17644 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17645 ::fidl_next::wire::Union::zero_padding(raw);
17646 }
17647 }
17648
17649 impl UnionOfHandle {
17650 pub fn is_some(&self) -> bool {
17651 self.raw.is_some()
17652 }
17653
17654 pub fn is_none(&self) -> bool {
17655 self.raw.is_none()
17656 }
17657
17658 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::UnionOfHandle> {
17659 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17660 }
17661
17662 pub fn into_option(self) -> ::core::option::Option<crate::wire::UnionOfHandle> {
17663 if self.is_some() {
17664 Some(crate::wire::UnionOfHandle {
17665 raw: self.raw,
17666 _phantom: ::core::marker::PhantomData,
17667 })
17668 } else {
17669 None
17670 }
17671 }
17672 }
17673
17674 unsafe impl<___D> ::fidl_next::Decode<___D> for UnionOfHandle
17675 where
17676 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17677 ___D: ::fidl_next::fuchsia::HandleDecoder,
17678 {
17679 fn decode(
17680 mut slot: ::fidl_next::Slot<'_, Self>,
17681 decoder: &mut ___D,
17682 _: (),
17683 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17684 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17685 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17686 1 => ::fidl_next::wire::Union::decode_as_static::<
17687 ___D,
17688 ::fidl_next::wire::fuchsia::NullableHandle,
17689 >(raw, decoder, ())?,
17690
17691 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17692 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
17693 }
17694
17695 Ok(())
17696 }
17697 }
17698
17699 impl ::core::fmt::Debug for UnionOfHandle {
17700 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17701 self.as_ref().fmt(f)
17702 }
17703 }
17704
17705 impl ::fidl_next::IntoNatural for UnionOfHandle {
17706 type Natural = ::core::option::Option<crate::natural::UnionOfHandle>;
17707 }
17708
17709 #[repr(transparent)]
17710 pub struct VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17711 pub(crate) raw: ::fidl_next::wire::Union,
17712 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
17713 }
17714
17715 impl ::fidl_next::Constrained for VectorOfArrayOfEventInUnionWithReducedRights<'_> {
17716 type Constraint = ();
17717
17718 fn validate(
17719 _: ::fidl_next::Slot<'_, Self>,
17720 _: Self::Constraint,
17721 ) -> Result<(), ::fidl_next::ValidationError> {
17722 Ok(())
17723 }
17724 }
17725
17726 unsafe impl ::fidl_next::Wire for VectorOfArrayOfEventInUnionWithReducedRights<'static> {
17727 type Narrowed<'de> = VectorOfArrayOfEventInUnionWithReducedRights<'de>;
17728
17729 #[inline]
17730 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
17731 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
17732 ::fidl_next::wire::Union::zero_padding(raw);
17733 }
17734 }
17735
17736 impl<'de> VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17737 pub fn is_some(&self) -> bool {
17738 self.raw.is_some()
17739 }
17740
17741 pub fn is_none(&self) -> bool {
17742 self.raw.is_none()
17743 }
17744
17745 pub fn as_ref(
17746 &self,
17747 ) -> ::core::option::Option<&crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
17748 {
17749 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
17750 }
17751
17752 pub fn into_option(
17753 self,
17754 ) -> ::core::option::Option<crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'de>>
17755 {
17756 if self.is_some() {
17757 Some(crate::wire::VectorOfArrayOfEventInUnionWithReducedRights {
17758 raw: self.raw,
17759 _phantom: ::core::marker::PhantomData,
17760 })
17761 } else {
17762 None
17763 }
17764 }
17765 }
17766
17767 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
17768 for VectorOfArrayOfEventInUnionWithReducedRights<'de>
17769 where
17770 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17771 ___D: ::fidl_next::Decoder<'de>,
17772 ___D: ::fidl_next::fuchsia::HandleDecoder,
17773 {
17774 fn decode(
17775 mut slot: ::fidl_next::Slot<'_, Self>,
17776 decoder: &mut ___D,
17777 _: (),
17778 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17779 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
17780 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
17781 1 => ::fidl_next::wire::Union::decode_as::<
17782 ___D,
17783 ::fidl_next::wire::Vector<'de, [::fidl_next::wire::fuchsia::Event; 1]>,
17784 >(raw, decoder, (1, ()))?,
17785
17786 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
17787 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
17788 }
17789
17790 Ok(())
17791 }
17792 }
17793
17794 impl<'de> ::core::fmt::Debug for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17795 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17796 self.as_ref().fmt(f)
17797 }
17798 }
17799
17800 impl<'de> ::fidl_next::IntoNatural for VectorOfArrayOfEventInUnionWithReducedRights<'de> {
17801 type Natural =
17802 ::core::option::Option<crate::natural::VectorOfArrayOfEventInUnionWithReducedRights>;
17803 }
17804}
17805
17806pub mod generic {
17807
17808 pub use fidl_next_common_test_conformance::generic::*;
17809
17810 pub struct AlternatingHandlesAndFailures<T0, T1, T2, T3, T4> {
17812 pub h1: T0,
17813
17814 pub failure_trigger1: T1,
17815
17816 pub h2: T2,
17817
17818 pub failure_trigger2: T3,
17819
17820 pub h3: T4,
17821 }
17822
17823 unsafe impl<___E, T0, T1, T2, T3, T4>
17824 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
17825 for AlternatingHandlesAndFailures<T0, T1, T2, T3, T4>
17826 where
17827 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17828 ___E: ::fidl_next::Encoder,
17829 ___E: ::fidl_next::fuchsia::HandleEncoder,
17830 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17831 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17832 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17833 T3: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17834 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17835 {
17836 #[inline]
17837 fn encode(
17838 self,
17839 encoder_: &mut ___E,
17840 out_: &mut ::core::mem::MaybeUninit<
17841 crate::wire::AlternatingHandlesAndFailures<'static>,
17842 >,
17843 _: (),
17844 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17845 ::fidl_next::munge! {
17846 let crate::wire::AlternatingHandlesAndFailures {
17847 h1,
17848 failure_trigger1,
17849 h2,
17850 failure_trigger2,
17851 h3,
17852
17853 } = out_;
17854 }
17855
17856 ::fidl_next::Encode::encode(self.h1, encoder_, h1, ())?;
17857
17858 ::fidl_next::Encode::encode(self.failure_trigger1, encoder_, failure_trigger1, 1)?;
17859
17860 ::fidl_next::Encode::encode(self.h2, encoder_, h2, ())?;
17861
17862 ::fidl_next::Encode::encode(self.failure_trigger2, encoder_, failure_trigger2, 1)?;
17863
17864 ::fidl_next::Encode::encode(self.h3, encoder_, h3, ())?;
17865
17866 Ok(())
17867 }
17868 }
17869
17870 unsafe impl<'a, ___E, T0, T1, T2, T3, T4>
17871 ::fidl_next::Encode<crate::wire::AlternatingHandlesAndFailures<'static>, ___E>
17872 for &'a AlternatingHandlesAndFailures<T0, T1, T2, T3, T4>
17873 where
17874 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17875 ___E: ::fidl_next::Encoder,
17876 ___E: ::fidl_next::fuchsia::HandleEncoder,
17877 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17878 &'a T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17879 &'a T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17880 &'a T3: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
17881 &'a T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
17882 {
17883 #[inline]
17884 fn encode(
17885 self,
17886 encoder_: &mut ___E,
17887 out_: &mut ::core::mem::MaybeUninit<
17888 crate::wire::AlternatingHandlesAndFailures<'static>,
17889 >,
17890 _: (),
17891 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17892 ::fidl_next::munge! {
17893 let crate::wire::AlternatingHandlesAndFailures {
17894 h1,
17895 failure_trigger1,
17896 h2,
17897 failure_trigger2,
17898 h3,
17899
17900 } = out_;
17901 }
17902
17903 ::fidl_next::Encode::encode(&self.h1, encoder_, h1, ())?;
17904
17905 ::fidl_next::Encode::encode(&self.failure_trigger1, encoder_, failure_trigger1, 1)?;
17906
17907 ::fidl_next::Encode::encode(&self.h2, encoder_, h2, ())?;
17908
17909 ::fidl_next::Encode::encode(&self.failure_trigger2, encoder_, failure_trigger2, 1)?;
17910
17911 ::fidl_next::Encode::encode(&self.h3, encoder_, h3, ())?;
17912
17913 Ok(())
17914 }
17915 }
17916
17917 pub struct ArrayOfArrayOfNonnullableHandles<T0> {
17919 pub handles: T0,
17920 }
17921
17922 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
17923 for ArrayOfArrayOfNonnullableHandles<T0>
17924 where
17925 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17926 ___E: ::fidl_next::fuchsia::HandleEncoder,
17927 T0: ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>,
17928 {
17929 #[inline]
17930 fn encode(
17931 self,
17932 encoder_: &mut ___E,
17933 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
17934 _: (),
17935 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17936 ::fidl_next::munge! {
17937 let crate::wire::ArrayOfArrayOfNonnullableHandles {
17938 handles,
17939
17940 } = out_;
17941 }
17942
17943 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
17944
17945 Ok(())
17946 }
17947 }
17948
17949 unsafe impl<'a, ___E, T0>
17950 ::fidl_next::Encode<crate::wire::ArrayOfArrayOfNonnullableHandles, ___E>
17951 for &'a ArrayOfArrayOfNonnullableHandles<T0>
17952 where
17953 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17954 ___E: ::fidl_next::fuchsia::HandleEncoder,
17955 &'a T0: ::fidl_next::Encode<[[::fidl_next::wire::fuchsia::NullableHandle; 3]; 4], ___E>,
17956 {
17957 #[inline]
17958 fn encode(
17959 self,
17960 encoder_: &mut ___E,
17961 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfArrayOfNonnullableHandles>,
17962 _: (),
17963 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17964 ::fidl_next::munge! {
17965 let crate::wire::ArrayOfArrayOfNonnullableHandles {
17966 handles,
17967
17968 } = out_;
17969 }
17970
17971 ::fidl_next::Encode::encode(&self.handles, encoder_, handles, ())?;
17972
17973 Ok(())
17974 }
17975 }
17976
17977 pub struct ArrayOfHandles<T0> {
17979 pub a: T0,
17980 }
17981
17982 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E> for ArrayOfHandles<T0>
17983 where
17984 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17985 ___E: ::fidl_next::fuchsia::HandleEncoder,
17986 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 3], ___E>,
17987 {
17988 #[inline]
17989 fn encode(
17990 self,
17991 encoder_: &mut ___E,
17992 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
17993 _: (),
17994 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17995 ::fidl_next::munge! {
17996 let crate::wire::ArrayOfHandles {
17997 a,
17998
17999 } = out_;
18000 }
18001
18002 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
18003
18004 Ok(())
18005 }
18006 }
18007
18008 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfHandles, ___E>
18009 for &'a ArrayOfHandles<T0>
18010 where
18011 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18012 ___E: ::fidl_next::fuchsia::HandleEncoder,
18013 &'a T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 3], ___E>,
18014 {
18015 #[inline]
18016 fn encode(
18017 self,
18018 encoder_: &mut ___E,
18019 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfHandles>,
18020 _: (),
18021 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18022 ::fidl_next::munge! {
18023 let crate::wire::ArrayOfHandles {
18024 a,
18025
18026 } = out_;
18027 }
18028
18029 ::fidl_next::Encode::encode(&self.a, encoder_, a, ())?;
18030
18031 Ok(())
18032 }
18033 }
18034
18035 pub struct ArrayOfNonnullableHandles<T0> {
18037 pub handles: T0,
18038 }
18039
18040 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
18041 for ArrayOfNonnullableHandles<T0>
18042 where
18043 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18044 ___E: ::fidl_next::fuchsia::HandleEncoder,
18045 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
18046 {
18047 #[inline]
18048 fn encode(
18049 self,
18050 encoder_: &mut ___E,
18051 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
18052 _: (),
18053 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18054 ::fidl_next::munge! {
18055 let crate::wire::ArrayOfNonnullableHandles {
18056 handles,
18057
18058 } = out_;
18059 }
18060
18061 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
18062
18063 Ok(())
18064 }
18065 }
18066
18067 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNonnullableHandles, ___E>
18068 for &'a ArrayOfNonnullableHandles<T0>
18069 where
18070 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18071 ___E: ::fidl_next::fuchsia::HandleEncoder,
18072 &'a T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
18073 {
18074 #[inline]
18075 fn encode(
18076 self,
18077 encoder_: &mut ___E,
18078 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNonnullableHandles>,
18079 _: (),
18080 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18081 ::fidl_next::munge! {
18082 let crate::wire::ArrayOfNonnullableHandles {
18083 handles,
18084
18085 } = out_;
18086 }
18087
18088 ::fidl_next::Encode::encode(&self.handles, encoder_, handles, ())?;
18089
18090 Ok(())
18091 }
18092 }
18093
18094 pub struct ArrayOfNullableHandles<T0> {
18096 pub handles: T0,
18097 }
18098
18099 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
18100 for ArrayOfNullableHandles<T0>
18101 where
18102 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18103 ___E: ::fidl_next::fuchsia::HandleEncoder,
18104 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>,
18105 {
18106 #[inline]
18107 fn encode(
18108 self,
18109 encoder_: &mut ___E,
18110 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
18111 _: (),
18112 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18113 ::fidl_next::munge! {
18114 let crate::wire::ArrayOfNullableHandles {
18115 handles,
18116
18117 } = out_;
18118 }
18119
18120 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
18121
18122 Ok(())
18123 }
18124 }
18125
18126 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfNullableHandles, ___E>
18127 for &'a ArrayOfNullableHandles<T0>
18128 where
18129 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18130 ___E: ::fidl_next::fuchsia::HandleEncoder,
18131 &'a T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 5], ___E>,
18132 {
18133 #[inline]
18134 fn encode(
18135 self,
18136 encoder_: &mut ___E,
18137 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfNullableHandles>,
18138 _: (),
18139 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18140 ::fidl_next::munge! {
18141 let crate::wire::ArrayOfNullableHandles {
18142 handles,
18143
18144 } = out_;
18145 }
18146
18147 ::fidl_next::Encode::encode(&self.handles, encoder_, handles, ())?;
18148
18149 Ok(())
18150 }
18151 }
18152
18153 pub struct ArrayOfOptionalHandles<T0> {
18155 pub a: T0,
18156 }
18157
18158 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
18159 for ArrayOfOptionalHandles<T0>
18160 where
18161 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18162 ___E: ::fidl_next::fuchsia::HandleEncoder,
18163 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>,
18164 {
18165 #[inline]
18166 fn encode(
18167 self,
18168 encoder_: &mut ___E,
18169 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
18170 _: (),
18171 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18172 ::fidl_next::munge! {
18173 let crate::wire::ArrayOfOptionalHandles {
18174 a,
18175
18176 } = out_;
18177 }
18178
18179 ::fidl_next::Encode::encode(self.a, encoder_, a, ())?;
18180
18181 Ok(())
18182 }
18183 }
18184
18185 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ArrayOfOptionalHandles, ___E>
18186 for &'a ArrayOfOptionalHandles<T0>
18187 where
18188 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18189 ___E: ::fidl_next::fuchsia::HandleEncoder,
18190 &'a T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::OptionalNullableHandle; 3], ___E>,
18191 {
18192 #[inline]
18193 fn encode(
18194 self,
18195 encoder_: &mut ___E,
18196 out_: &mut ::core::mem::MaybeUninit<crate::wire::ArrayOfOptionalHandles>,
18197 _: (),
18198 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18199 ::fidl_next::munge! {
18200 let crate::wire::ArrayOfOptionalHandles {
18201 a,
18202
18203 } = out_;
18204 }
18205
18206 ::fidl_next::Encode::encode(&self.a, encoder_, a, ())?;
18207
18208 Ok(())
18209 }
18210 }
18211
18212 pub struct ArrayOfVectorOfEventInStructWithDefaultRights<T0> {
18214 pub h: T0,
18215 }
18216
18217 unsafe impl<___E, T0>
18218 ::fidl_next::Encode<
18219 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
18220 ___E,
18221 > for ArrayOfVectorOfEventInStructWithDefaultRights<T0>
18222 where
18223 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18224 ___E: ::fidl_next::Encoder,
18225 ___E: ::fidl_next::fuchsia::HandleEncoder,
18226 T0: ::fidl_next::Encode<
18227 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
18228 ___E,
18229 >,
18230 {
18231 #[inline]
18232 fn encode(
18233 self,
18234 encoder_: &mut ___E,
18235 out_: &mut ::core::mem::MaybeUninit<
18236 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
18237 >,
18238 _: (),
18239 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18240 ::fidl_next::munge! {
18241 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
18242 h,
18243
18244 } = out_;
18245 }
18246
18247 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
18248
18249 Ok(())
18250 }
18251 }
18252
18253 unsafe impl<'a, ___E, T0>
18254 ::fidl_next::Encode<
18255 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
18256 ___E,
18257 > for &'a ArrayOfVectorOfEventInStructWithDefaultRights<T0>
18258 where
18259 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18260 ___E: ::fidl_next::Encoder,
18261 ___E: ::fidl_next::fuchsia::HandleEncoder,
18262 &'a T0: ::fidl_next::Encode<
18263 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
18264 ___E,
18265 >,
18266 {
18267 #[inline]
18268 fn encode(
18269 self,
18270 encoder_: &mut ___E,
18271 out_: &mut ::core::mem::MaybeUninit<
18272 crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights<'static>,
18273 >,
18274 _: (),
18275 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18276 ::fidl_next::munge! {
18277 let crate::wire::ArrayOfVectorOfEventInStructWithDefaultRights {
18278 h,
18279
18280 } = out_;
18281 }
18282
18283 ::fidl_next::Encode::encode(&self.h, encoder_, h, (1, ()))?;
18284
18285 Ok(())
18286 }
18287 }
18288
18289 pub struct ArrayOfVectorOfEventInStructWithReducedRights<T0> {
18291 pub h: T0,
18292 }
18293
18294 unsafe impl<___E, T0>
18295 ::fidl_next::Encode<
18296 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
18297 ___E,
18298 > for ArrayOfVectorOfEventInStructWithReducedRights<T0>
18299 where
18300 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18301 ___E: ::fidl_next::Encoder,
18302 ___E: ::fidl_next::fuchsia::HandleEncoder,
18303 T0: ::fidl_next::Encode<
18304 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
18305 ___E,
18306 >,
18307 {
18308 #[inline]
18309 fn encode(
18310 self,
18311 encoder_: &mut ___E,
18312 out_: &mut ::core::mem::MaybeUninit<
18313 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
18314 >,
18315 _: (),
18316 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18317 ::fidl_next::munge! {
18318 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
18319 h,
18320
18321 } = out_;
18322 }
18323
18324 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
18325
18326 Ok(())
18327 }
18328 }
18329
18330 unsafe impl<'a, ___E, T0>
18331 ::fidl_next::Encode<
18332 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
18333 ___E,
18334 > for &'a ArrayOfVectorOfEventInStructWithReducedRights<T0>
18335 where
18336 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18337 ___E: ::fidl_next::Encoder,
18338 ___E: ::fidl_next::fuchsia::HandleEncoder,
18339 &'a T0: ::fidl_next::Encode<
18340 [::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Event>; 1],
18341 ___E,
18342 >,
18343 {
18344 #[inline]
18345 fn encode(
18346 self,
18347 encoder_: &mut ___E,
18348 out_: &mut ::core::mem::MaybeUninit<
18349 crate::wire::ArrayOfVectorOfEventInStructWithReducedRights<'static>,
18350 >,
18351 _: (),
18352 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18353 ::fidl_next::munge! {
18354 let crate::wire::ArrayOfVectorOfEventInStructWithReducedRights {
18355 h,
18356
18357 } = out_;
18358 }
18359
18360 ::fidl_next::Encode::encode(&self.h, encoder_, h, (1, ()))?;
18361
18362 Ok(())
18363 }
18364 }
18365
18366 pub struct ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0> {
18368 pub t: T0,
18369 }
18370
18371 unsafe impl<___E, T0>
18372 ::fidl_next::Encode<
18373 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
18374 ___E,
18375 > for ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0>
18376 where
18377 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18378 ___E: ::fidl_next::Encoder,
18379 ___E: ::fidl_next::fuchsia::HandleEncoder,
18380 T0: ::fidl_next::Encode<
18381 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
18382 ___E,
18383 >,
18384 {
18385 #[inline]
18386 fn encode(
18387 self,
18388 encoder_: &mut ___E,
18389 out_: &mut ::core::mem::MaybeUninit<
18390 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
18391 >,
18392 _: (),
18393 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18394 ::fidl_next::munge! {
18395 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
18396 t,
18397
18398 } = out_;
18399 }
18400
18401 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18402
18403 Ok(())
18404 }
18405 }
18406
18407 unsafe impl<'a, ___E, T0>
18408 ::fidl_next::Encode<
18409 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
18410 ___E,
18411 > for &'a ArrayOfVectorOfEventInTableWithDefaultRightsStruct<T0>
18412 where
18413 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18414 ___E: ::fidl_next::Encoder,
18415 ___E: ::fidl_next::fuchsia::HandleEncoder,
18416 &'a T0: ::fidl_next::Encode<
18417 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRights<'static>,
18418 ___E,
18419 >,
18420 {
18421 #[inline]
18422 fn encode(
18423 self,
18424 encoder_: &mut ___E,
18425 out_: &mut ::core::mem::MaybeUninit<
18426 crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct<'static>,
18427 >,
18428 _: (),
18429 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18430 ::fidl_next::munge! {
18431 let crate::wire::ArrayOfVectorOfEventInTableWithDefaultRightsStruct {
18432 t,
18433
18434 } = out_;
18435 }
18436
18437 ::fidl_next::Encode::encode(&self.t, encoder_, t, ())?;
18438
18439 Ok(())
18440 }
18441 }
18442
18443 pub struct ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0> {
18445 pub t: T0,
18446 }
18447
18448 unsafe impl<___E, T0>
18449 ::fidl_next::Encode<
18450 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
18451 ___E,
18452 > for ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0>
18453 where
18454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18455 ___E: ::fidl_next::Encoder,
18456 ___E: ::fidl_next::fuchsia::HandleEncoder,
18457 T0: ::fidl_next::Encode<
18458 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
18459 ___E,
18460 >,
18461 {
18462 #[inline]
18463 fn encode(
18464 self,
18465 encoder_: &mut ___E,
18466 out_: &mut ::core::mem::MaybeUninit<
18467 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
18468 >,
18469 _: (),
18470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18471 ::fidl_next::munge! {
18472 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
18473 t,
18474
18475 } = out_;
18476 }
18477
18478 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
18479
18480 Ok(())
18481 }
18482 }
18483
18484 unsafe impl<'a, ___E, T0>
18485 ::fidl_next::Encode<
18486 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
18487 ___E,
18488 > for &'a ArrayOfVectorOfEventInTableWithReducedRightsStruct<T0>
18489 where
18490 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18491 ___E: ::fidl_next::Encoder,
18492 ___E: ::fidl_next::fuchsia::HandleEncoder,
18493 &'a T0: ::fidl_next::Encode<
18494 crate::wire::ArrayOfVectorOfEventInTableWithReducedRights<'static>,
18495 ___E,
18496 >,
18497 {
18498 #[inline]
18499 fn encode(
18500 self,
18501 encoder_: &mut ___E,
18502 out_: &mut ::core::mem::MaybeUninit<
18503 crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct<'static>,
18504 >,
18505 _: (),
18506 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18507 ::fidl_next::munge! {
18508 let crate::wire::ArrayOfVectorOfEventInTableWithReducedRightsStruct {
18509 t,
18510
18511 } = out_;
18512 }
18513
18514 ::fidl_next::Encode::encode(&self.t, encoder_, t, ())?;
18515
18516 Ok(())
18517 }
18518 }
18519
18520 pub struct ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0> {
18522 pub u: T0,
18523 }
18524
18525 unsafe impl<___E, T0>
18526 ::fidl_next::Encode<
18527 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
18528 ___E,
18529 > for ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0>
18530 where
18531 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18532 ___E: ::fidl_next::Encoder,
18533 ___E: ::fidl_next::fuchsia::HandleEncoder,
18534 T0: ::fidl_next::Encode<
18535 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
18536 ___E,
18537 >,
18538 {
18539 #[inline]
18540 fn encode(
18541 self,
18542 encoder_: &mut ___E,
18543 out_: &mut ::core::mem::MaybeUninit<
18544 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
18545 >,
18546 _: (),
18547 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18548 ::fidl_next::munge! {
18549 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
18550 u,
18551
18552 } = out_;
18553 }
18554
18555 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
18556
18557 Ok(())
18558 }
18559 }
18560
18561 unsafe impl<'a, ___E, T0>
18562 ::fidl_next::Encode<
18563 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
18564 ___E,
18565 > for &'a ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<T0>
18566 where
18567 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18568 ___E: ::fidl_next::Encoder,
18569 ___E: ::fidl_next::fuchsia::HandleEncoder,
18570 &'a T0: ::fidl_next::Encode<
18571 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRights<'static>,
18572 ___E,
18573 >,
18574 {
18575 #[inline]
18576 fn encode(
18577 self,
18578 encoder_: &mut ___E,
18579 out_: &mut ::core::mem::MaybeUninit<
18580 crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct<'static>,
18581 >,
18582 _: (),
18583 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18584 ::fidl_next::munge! {
18585 let crate::wire::ArrayOfVectorOfEventInUnionWithDefaultRightsStruct {
18586 u,
18587
18588 } = out_;
18589 }
18590
18591 ::fidl_next::Encode::encode(&self.u, encoder_, u, ())?;
18592
18593 Ok(())
18594 }
18595 }
18596
18597 pub struct ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0> {
18599 pub u: T0,
18600 }
18601
18602 unsafe impl<___E, T0>
18603 ::fidl_next::Encode<
18604 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
18605 ___E,
18606 > for ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0>
18607 where
18608 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18609 ___E: ::fidl_next::Encoder,
18610 ___E: ::fidl_next::fuchsia::HandleEncoder,
18611 T0: ::fidl_next::Encode<
18612 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
18613 ___E,
18614 >,
18615 {
18616 #[inline]
18617 fn encode(
18618 self,
18619 encoder_: &mut ___E,
18620 out_: &mut ::core::mem::MaybeUninit<
18621 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
18622 >,
18623 _: (),
18624 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18625 ::fidl_next::munge! {
18626 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
18627 u,
18628
18629 } = out_;
18630 }
18631
18632 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
18633
18634 Ok(())
18635 }
18636 }
18637
18638 unsafe impl<'a, ___E, T0>
18639 ::fidl_next::Encode<
18640 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
18641 ___E,
18642 > for &'a ArrayOfVectorOfEventInUnionWithReducedRightsStruct<T0>
18643 where
18644 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18645 ___E: ::fidl_next::Encoder,
18646 ___E: ::fidl_next::fuchsia::HandleEncoder,
18647 &'a T0: ::fidl_next::Encode<
18648 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRights<'static>,
18649 ___E,
18650 >,
18651 {
18652 #[inline]
18653 fn encode(
18654 self,
18655 encoder_: &mut ___E,
18656 out_: &mut ::core::mem::MaybeUninit<
18657 crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct<'static>,
18658 >,
18659 _: (),
18660 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18661 ::fidl_next::munge! {
18662 let crate::wire::ArrayOfVectorOfEventInUnionWithReducedRightsStruct {
18663 u,
18664
18665 } = out_;
18666 }
18667
18668 ::fidl_next::Encode::encode(&self.u, encoder_, u, ())?;
18669
18670 Ok(())
18671 }
18672 }
18673
18674 pub struct Bounded32NonnullableVectorOfHandles<T0> {
18676 pub vh0: T0,
18677 }
18678
18679 unsafe impl<___E, T0>
18680 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
18681 for Bounded32NonnullableVectorOfHandles<T0>
18682 where
18683 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18684 ___E: ::fidl_next::Encoder,
18685 ___E: ::fidl_next::fuchsia::HandleEncoder,
18686 T0: ::fidl_next::Encode<
18687 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18688 ___E,
18689 >,
18690 {
18691 #[inline]
18692 fn encode(
18693 self,
18694 encoder_: &mut ___E,
18695 out_: &mut ::core::mem::MaybeUninit<
18696 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
18697 >,
18698 _: (),
18699 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18700 ::fidl_next::munge! {
18701 let crate::wire::Bounded32NonnullableVectorOfHandles {
18702 vh0,
18703
18704 } = out_;
18705 }
18706
18707 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
18708
18709 Ok(())
18710 }
18711 }
18712
18713 unsafe impl<'a, ___E, T0>
18714 ::fidl_next::Encode<crate::wire::Bounded32NonnullableVectorOfHandles<'static>, ___E>
18715 for &'a Bounded32NonnullableVectorOfHandles<T0>
18716 where
18717 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18718 ___E: ::fidl_next::Encoder,
18719 ___E: ::fidl_next::fuchsia::HandleEncoder,
18720 &'a T0: ::fidl_next::Encode<
18721 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
18722 ___E,
18723 >,
18724 {
18725 #[inline]
18726 fn encode(
18727 self,
18728 encoder_: &mut ___E,
18729 out_: &mut ::core::mem::MaybeUninit<
18730 crate::wire::Bounded32NonnullableVectorOfHandles<'static>,
18731 >,
18732 _: (),
18733 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18734 ::fidl_next::munge! {
18735 let crate::wire::Bounded32NonnullableVectorOfHandles {
18736 vh0,
18737
18738 } = out_;
18739 }
18740
18741 ::fidl_next::Encode::encode(&self.vh0, encoder_, vh0, (32, ()))?;
18742
18743 Ok(())
18744 }
18745 }
18746
18747 pub struct Bounded32NullableVectorOfHandles<T0> {
18749 pub vh0: T0,
18750 }
18751
18752 unsafe impl<___E, T0>
18753 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
18754 for Bounded32NullableVectorOfHandles<T0>
18755 where
18756 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18757 ___E: ::fidl_next::Encoder,
18758 ___E: ::fidl_next::fuchsia::HandleEncoder,
18759 T0: ::fidl_next::Encode<
18760 ::fidl_next::wire::OptionalVector<
18761 'static,
18762 ::fidl_next::wire::fuchsia::NullableHandle,
18763 >,
18764 ___E,
18765 >,
18766 {
18767 #[inline]
18768 fn encode(
18769 self,
18770 encoder_: &mut ___E,
18771 out_: &mut ::core::mem::MaybeUninit<
18772 crate::wire::Bounded32NullableVectorOfHandles<'static>,
18773 >,
18774 _: (),
18775 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18776 ::fidl_next::munge! {
18777 let crate::wire::Bounded32NullableVectorOfHandles {
18778 vh0,
18779
18780 } = out_;
18781 }
18782
18783 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (32, ()))?;
18784
18785 Ok(())
18786 }
18787 }
18788
18789 unsafe impl<'a, ___E, T0>
18790 ::fidl_next::Encode<crate::wire::Bounded32NullableVectorOfHandles<'static>, ___E>
18791 for &'a Bounded32NullableVectorOfHandles<T0>
18792 where
18793 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18794 ___E: ::fidl_next::Encoder,
18795 ___E: ::fidl_next::fuchsia::HandleEncoder,
18796 &'a T0: ::fidl_next::Encode<
18797 ::fidl_next::wire::OptionalVector<
18798 'static,
18799 ::fidl_next::wire::fuchsia::NullableHandle,
18800 >,
18801 ___E,
18802 >,
18803 {
18804 #[inline]
18805 fn encode(
18806 self,
18807 encoder_: &mut ___E,
18808 out_: &mut ::core::mem::MaybeUninit<
18809 crate::wire::Bounded32NullableVectorOfHandles<'static>,
18810 >,
18811 _: (),
18812 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18813 ::fidl_next::munge! {
18814 let crate::wire::Bounded32NullableVectorOfHandles {
18815 vh0,
18816
18817 } = out_;
18818 }
18819
18820 ::fidl_next::Encode::encode(&self.vh0, encoder_, vh0, (32, ()))?;
18821
18822 Ok(())
18823 }
18824 }
18825
18826 pub struct BoxOfSingleHandle<T0> {
18828 pub b: T0,
18829 }
18830
18831 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
18832 for BoxOfSingleHandle<T0>
18833 where
18834 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18835 ___E: ::fidl_next::Encoder,
18836 ___E: ::fidl_next::fuchsia::HandleEncoder,
18837 T0: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>,
18838 {
18839 #[inline]
18840 fn encode(
18841 self,
18842 encoder_: &mut ___E,
18843 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
18844 _: (),
18845 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18846 ::fidl_next::munge! {
18847 let crate::wire::BoxOfSingleHandle {
18848 b,
18849
18850 } = out_;
18851 }
18852
18853 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
18854
18855 Ok(())
18856 }
18857 }
18858
18859 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleHandle<'static>, ___E>
18860 for &'a BoxOfSingleHandle<T0>
18861 where
18862 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18863 ___E: ::fidl_next::Encoder,
18864 ___E: ::fidl_next::fuchsia::HandleEncoder,
18865 &'a T0:
18866 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::SingleHandle>, ___E>,
18867 {
18868 #[inline]
18869 fn encode(
18870 self,
18871 encoder_: &mut ___E,
18872 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleHandle<'static>>,
18873 _: (),
18874 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18875 ::fidl_next::munge! {
18876 let crate::wire::BoxOfSingleHandle {
18877 b,
18878
18879 } = out_;
18880 }
18881
18882 ::fidl_next::Encode::encode(&self.b, encoder_, b, ())?;
18883
18884 Ok(())
18885 }
18886 }
18887
18888 pub struct BoxOfSingleOptionalHandle<T0> {
18890 pub b: T0,
18891 }
18892
18893 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
18894 for BoxOfSingleOptionalHandle<T0>
18895 where
18896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18897 ___E: ::fidl_next::Encoder,
18898 ___E: ::fidl_next::fuchsia::HandleEncoder,
18899 T0: ::fidl_next::Encode<
18900 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
18901 ___E,
18902 >,
18903 {
18904 #[inline]
18905 fn encode(
18906 self,
18907 encoder_: &mut ___E,
18908 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
18909 _: (),
18910 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18911 ::fidl_next::munge! {
18912 let crate::wire::BoxOfSingleOptionalHandle {
18913 b,
18914
18915 } = out_;
18916 }
18917
18918 ::fidl_next::Encode::encode(self.b, encoder_, b, ())?;
18919
18920 Ok(())
18921 }
18922 }
18923
18924 unsafe impl<'a, ___E, T0>
18925 ::fidl_next::Encode<crate::wire::BoxOfSingleOptionalHandle<'static>, ___E>
18926 for &'a BoxOfSingleOptionalHandle<T0>
18927 where
18928 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18929 ___E: ::fidl_next::Encoder,
18930 ___E: ::fidl_next::fuchsia::HandleEncoder,
18931 &'a T0: ::fidl_next::Encode<
18932 ::fidl_next::wire::Box<'static, crate::wire::SingleOptionalHandle>,
18933 ___E,
18934 >,
18935 {
18936 #[inline]
18937 fn encode(
18938 self,
18939 encoder_: &mut ___E,
18940 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoxOfSingleOptionalHandle<'static>>,
18941 _: (),
18942 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18943 ::fidl_next::munge! {
18944 let crate::wire::BoxOfSingleOptionalHandle {
18945 b,
18946
18947 } = out_;
18948 }
18949
18950 ::fidl_next::Encode::encode(&self.b, encoder_, b, ())?;
18951
18952 Ok(())
18953 }
18954 }
18955
18956 pub struct LaunchInfo<T0, T1, T2, T3, T4, T5, T6> {
18958 pub url: T0,
18959
18960 pub arguments: T1,
18961
18962 pub out: T2,
18963
18964 pub err: T3,
18965
18966 pub directory_request: T4,
18967
18968 pub flat_namespace: T5,
18969
18970 pub additional_services: T6,
18971 }
18972
18973 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
18974 ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>
18975 for LaunchInfo<T0, T1, T2, T3, T4, T5, T6>
18976 where
18977 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18978 ___E: ::fidl_next::Encoder,
18979 ___E: ::fidl_next::fuchsia::HandleEncoder,
18980 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
18981 T1: ::fidl_next::Encode<
18982 ::fidl_next::wire::OptionalVector<'static, ::fidl_next::wire::String<'static>>,
18983 ___E,
18984 >,
18985 T2: ::fidl_next::Encode<
18986 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
18987 ___E,
18988 >,
18989 T3: ::fidl_next::Encode<
18990 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
18991 ___E,
18992 >,
18993 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
18994 T5: ::fidl_next::Encode<
18995 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
18996 ___E,
18997 >,
18998 T6: ::fidl_next::Encode<
18999 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
19000 ___E,
19001 >,
19002 {
19003 #[inline]
19004 fn encode(
19005 self,
19006 encoder_: &mut ___E,
19007 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
19008 _: (),
19009 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19010 ::fidl_next::munge! {
19011 let crate::wire::LaunchInfo {
19012 url,
19013 arguments,
19014 out,
19015 err,
19016 directory_request,
19017 flat_namespace,
19018 additional_services,
19019
19020 } = out_;
19021 }
19022
19023 ::fidl_next::Encode::encode(self.url, encoder_, url, 200)?;
19024
19025 ::fidl_next::Encode::encode(
19026 self.arguments,
19027 encoder_,
19028 arguments,
19029 (4294967295, 4294967295),
19030 )?;
19031
19032 ::fidl_next::Encode::encode(self.out, encoder_, out, ())?;
19033
19034 ::fidl_next::Encode::encode(self.err, encoder_, err, ())?;
19035
19036 ::fidl_next::Encode::encode(self.directory_request, encoder_, directory_request, ())?;
19037
19038 ::fidl_next::Encode::encode(self.flat_namespace, encoder_, flat_namespace, ())?;
19039
19040 ::fidl_next::Encode::encode(
19041 self.additional_services,
19042 encoder_,
19043 additional_services,
19044 (),
19045 )?;
19046
19047 Ok(())
19048 }
19049 }
19050
19051 unsafe impl<'a, ___E, T0, T1, T2, T3, T4, T5, T6>
19052 ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>
19053 for &'a LaunchInfo<T0, T1, T2, T3, T4, T5, T6>
19054 where
19055 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19056 ___E: ::fidl_next::Encoder,
19057 ___E: ::fidl_next::fuchsia::HandleEncoder,
19058 &'a T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19059 &'a T1: ::fidl_next::Encode<
19060 ::fidl_next::wire::OptionalVector<'static, ::fidl_next::wire::String<'static>>,
19061 ___E,
19062 >,
19063 &'a T2: ::fidl_next::Encode<
19064 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
19065 ___E,
19066 >,
19067 &'a T3: ::fidl_next::Encode<
19068 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
19069 ___E,
19070 >,
19071 &'a T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
19072 &'a T5: ::fidl_next::Encode<
19073 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
19074 ___E,
19075 >,
19076 &'a T6: ::fidl_next::Encode<
19077 ::fidl_next::wire::Box<'static, crate::wire::TransformerEmptyStruct>,
19078 ___E,
19079 >,
19080 {
19081 #[inline]
19082 fn encode(
19083 self,
19084 encoder_: &mut ___E,
19085 out_: &mut ::core::mem::MaybeUninit<crate::wire::LaunchInfo<'static>>,
19086 _: (),
19087 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19088 ::fidl_next::munge! {
19089 let crate::wire::LaunchInfo {
19090 url,
19091 arguments,
19092 out,
19093 err,
19094 directory_request,
19095 flat_namespace,
19096 additional_services,
19097
19098 } = out_;
19099 }
19100
19101 ::fidl_next::Encode::encode(&self.url, encoder_, url, 200)?;
19102
19103 ::fidl_next::Encode::encode(
19104 &self.arguments,
19105 encoder_,
19106 arguments,
19107 (4294967295, 4294967295),
19108 )?;
19109
19110 ::fidl_next::Encode::encode(&self.out, encoder_, out, ())?;
19111
19112 ::fidl_next::Encode::encode(&self.err, encoder_, err, ())?;
19113
19114 ::fidl_next::Encode::encode(&self.directory_request, encoder_, directory_request, ())?;
19115
19116 ::fidl_next::Encode::encode(&self.flat_namespace, encoder_, flat_namespace, ())?;
19117
19118 ::fidl_next::Encode::encode(
19119 &self.additional_services,
19120 encoder_,
19121 additional_services,
19122 (),
19123 )?;
19124
19125 Ok(())
19126 }
19127 }
19128
19129 pub struct CreateComponentRequest<T0, T1> {
19131 pub launch_info: T0,
19132
19133 pub controller: T1,
19134 }
19135
19136 unsafe impl<___E, T0, T1>
19137 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
19138 for CreateComponentRequest<T0, T1>
19139 where
19140 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19141 ___E: ::fidl_next::Encoder,
19142 ___E: ::fidl_next::fuchsia::HandleEncoder,
19143 T0: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
19144 T1: ::fidl_next::Encode<
19145 ::fidl_next::ServerEnd<
19146 crate::ComponentController,
19147 ::fidl_next::wire::fuchsia::OptionalChannel,
19148 >,
19149 ___E,
19150 >,
19151 {
19152 #[inline]
19153 fn encode(
19154 self,
19155 encoder_: &mut ___E,
19156 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
19157 _: (),
19158 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19159 ::fidl_next::munge! {
19160 let crate::wire::CreateComponentRequest {
19161 launch_info,
19162 controller,
19163
19164 } = out_;
19165 }
19166
19167 ::fidl_next::Encode::encode(self.launch_info, encoder_, launch_info, ())?;
19168
19169 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
19170
19171 Ok(())
19172 }
19173 }
19174
19175 unsafe impl<'a, ___E, T0, T1>
19176 ::fidl_next::Encode<crate::wire::CreateComponentRequest<'static>, ___E>
19177 for &'a CreateComponentRequest<T0, T1>
19178 where
19179 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19180 ___E: ::fidl_next::Encoder,
19181 ___E: ::fidl_next::fuchsia::HandleEncoder,
19182 &'a T0: ::fidl_next::Encode<crate::wire::LaunchInfo<'static>, ___E>,
19183 &'a T1: ::fidl_next::Encode<
19184 ::fidl_next::ServerEnd<
19185 crate::ComponentController,
19186 ::fidl_next::wire::fuchsia::OptionalChannel,
19187 >,
19188 ___E,
19189 >,
19190 {
19191 #[inline]
19192 fn encode(
19193 self,
19194 encoder_: &mut ___E,
19195 out_: &mut ::core::mem::MaybeUninit<crate::wire::CreateComponentRequest<'static>>,
19196 _: (),
19197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19198 ::fidl_next::munge! {
19199 let crate::wire::CreateComponentRequest {
19200 launch_info,
19201 controller,
19202
19203 } = out_;
19204 }
19205
19206 ::fidl_next::Encode::encode(&self.launch_info, encoder_, launch_info, ())?;
19207
19208 ::fidl_next::Encode::encode(&self.controller, encoder_, controller, ())?;
19209
19210 Ok(())
19211 }
19212 }
19213
19214 pub struct EmptyResourceTableStruct<T0> {
19216 pub table: T0,
19217 }
19218
19219 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
19220 for EmptyResourceTableStruct<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::EmptyResourceTable<'static>, ___E>,
19226 {
19227 #[inline]
19228 fn encode(
19229 self,
19230 encoder_: &mut ___E,
19231 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
19232 _: (),
19233 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19234 ::fidl_next::munge! {
19235 let crate::wire::EmptyResourceTableStruct {
19236 table,
19237
19238 } = out_;
19239 }
19240
19241 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
19242
19243 Ok(())
19244 }
19245 }
19246
19247 unsafe impl<'a, ___E, T0>
19248 ::fidl_next::Encode<crate::wire::EmptyResourceTableStruct<'static>, ___E>
19249 for &'a EmptyResourceTableStruct<T0>
19250 where
19251 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19252 ___E: ::fidl_next::Encoder,
19253 ___E: ::fidl_next::fuchsia::HandleEncoder,
19254 &'a T0: ::fidl_next::Encode<crate::wire::EmptyResourceTable<'static>, ___E>,
19255 {
19256 #[inline]
19257 fn encode(
19258 self,
19259 encoder_: &mut ___E,
19260 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyResourceTableStruct<'static>>,
19261 _: (),
19262 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19263 ::fidl_next::munge! {
19264 let crate::wire::EmptyResourceTableStruct {
19265 table,
19266
19267 } = out_;
19268 }
19269
19270 ::fidl_next::Encode::encode(&self.table, encoder_, table, ())?;
19271
19272 Ok(())
19273 }
19274 }
19275
19276 pub struct EnvelopeInliningTestUnionStruct<T0> {
19278 pub u: T0,
19279 }
19280
19281 unsafe impl<___E, T0>
19282 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
19283 for EnvelopeInliningTestUnionStruct<T0>
19284 where
19285 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19286 ___E: ::fidl_next::Encoder,
19287 ___E: ::fidl_next::fuchsia::HandleEncoder,
19288 T0: ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
19289 {
19290 #[inline]
19291 fn encode(
19292 self,
19293 encoder_: &mut ___E,
19294 out_: &mut ::core::mem::MaybeUninit<
19295 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
19296 >,
19297 _: (),
19298 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19299 ::fidl_next::munge! {
19300 let crate::wire::EnvelopeInliningTestUnionStruct {
19301 u,
19302
19303 } = out_;
19304 }
19305
19306 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
19307
19308 Ok(())
19309 }
19310 }
19311
19312 unsafe impl<'a, ___E, T0>
19313 ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnionStruct<'static>, ___E>
19314 for &'a EnvelopeInliningTestUnionStruct<T0>
19315 where
19316 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19317 ___E: ::fidl_next::Encoder,
19318 ___E: ::fidl_next::fuchsia::HandleEncoder,
19319 &'a T0: ::fidl_next::Encode<crate::wire::EnvelopeInliningTestUnion<'static>, ___E>,
19320 {
19321 #[inline]
19322 fn encode(
19323 self,
19324 encoder_: &mut ___E,
19325 out_: &mut ::core::mem::MaybeUninit<
19326 crate::wire::EnvelopeInliningTestUnionStruct<'static>,
19327 >,
19328 _: (),
19329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19330 ::fidl_next::munge! {
19331 let crate::wire::EnvelopeInliningTestUnionStruct {
19332 u,
19333
19334 } = out_;
19335 }
19336
19337 ::fidl_next::Encode::encode(&self.u, encoder_, u, ())?;
19338
19339 Ok(())
19340 }
19341 }
19342
19343 pub struct EventWithDefaultRights<T0> {
19345 pub h: T0,
19346 }
19347
19348 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
19349 for EventWithDefaultRights<T0>
19350 where
19351 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19352 ___E: ::fidl_next::fuchsia::HandleEncoder,
19353 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
19354 {
19355 #[inline]
19356 fn encode(
19357 self,
19358 encoder_: &mut ___E,
19359 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
19360 _: (),
19361 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19362 ::fidl_next::munge! {
19363 let crate::wire::EventWithDefaultRights {
19364 h,
19365
19366 } = out_;
19367 }
19368
19369 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
19370
19371 Ok(())
19372 }
19373 }
19374
19375 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::EventWithDefaultRights, ___E>
19376 for &'a EventWithDefaultRights<T0>
19377 where
19378 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19379 ___E: ::fidl_next::fuchsia::HandleEncoder,
19380 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
19381 {
19382 #[inline]
19383 fn encode(
19384 self,
19385 encoder_: &mut ___E,
19386 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithDefaultRights>,
19387 _: (),
19388 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19389 ::fidl_next::munge! {
19390 let crate::wire::EventWithDefaultRights {
19391 h,
19392
19393 } = out_;
19394 }
19395
19396 ::fidl_next::Encode::encode(&self.h, encoder_, h, ())?;
19397
19398 Ok(())
19399 }
19400 }
19401
19402 pub struct EventWithReducedRights<T0> {
19404 pub h: T0,
19405 }
19406
19407 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
19408 for EventWithReducedRights<T0>
19409 where
19410 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19411 ___E: ::fidl_next::fuchsia::HandleEncoder,
19412 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
19413 {
19414 #[inline]
19415 fn encode(
19416 self,
19417 encoder_: &mut ___E,
19418 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
19419 _: (),
19420 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19421 ::fidl_next::munge! {
19422 let crate::wire::EventWithReducedRights {
19423 h,
19424
19425 } = out_;
19426 }
19427
19428 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
19429
19430 Ok(())
19431 }
19432 }
19433
19434 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::EventWithReducedRights, ___E>
19435 for &'a EventWithReducedRights<T0>
19436 where
19437 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19438 ___E: ::fidl_next::fuchsia::HandleEncoder,
19439 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
19440 {
19441 #[inline]
19442 fn encode(
19443 self,
19444 encoder_: &mut ___E,
19445 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventWithReducedRights>,
19446 _: (),
19447 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19448 ::fidl_next::munge! {
19449 let crate::wire::EventWithReducedRights {
19450 h,
19451
19452 } = out_;
19453 }
19454
19455 ::fidl_next::Encode::encode(&self.h, encoder_, h, ())?;
19456
19457 Ok(())
19458 }
19459 }
19460
19461 pub struct FidlvizDemo<
19463 T0,
19464 T1,
19465 T2,
19466 T3,
19467 T4,
19468 T5,
19469 T6,
19470 T7,
19471 T8,
19472 T9,
19473 T10,
19474 T11,
19475 T12,
19476 T13,
19477 T14,
19478 T15,
19479 T16,
19480 T17,
19481 T18,
19482 T19,
19483 T20,
19484 T21,
19485 T22,
19486 T23,
19487 T24,
19488 T25,
19489 T26,
19490 T27,
19491 T28,
19492 T29,
19493 T30,
19494 > {
19495 pub f1: T0,
19496
19497 pub f2: T1,
19498
19499 pub f3: T2,
19500
19501 pub f4: T3,
19502
19503 pub f5: T4,
19504
19505 pub f6: T5,
19506
19507 pub f7: T6,
19508
19509 pub f8: T7,
19510
19511 pub f9: T8,
19512
19513 pub f10: T9,
19514
19515 pub f11: T10,
19516
19517 pub f12: T11,
19518
19519 pub f13: T12,
19520
19521 pub f14: T13,
19522
19523 pub f15: T14,
19524
19525 pub f16: T15,
19526
19527 pub f17: T16,
19528
19529 pub f18: T17,
19530
19531 pub f19: T18,
19532
19533 pub f20: T19,
19534
19535 pub f21: T20,
19536
19537 pub f22: T21,
19538
19539 pub f23: T22,
19540
19541 pub f24: T23,
19542
19543 pub f25: T24,
19544
19545 pub f26: T25,
19546
19547 pub f27: T26,
19548
19549 pub f28: T27,
19550
19551 pub f29: T28,
19552
19553 pub f30: T29,
19554
19555 pub f31: T30,
19556 }
19557
19558 unsafe impl<
19559 ___E,
19560 T0,
19561 T1,
19562 T2,
19563 T3,
19564 T4,
19565 T5,
19566 T6,
19567 T7,
19568 T8,
19569 T9,
19570 T10,
19571 T11,
19572 T12,
19573 T13,
19574 T14,
19575 T15,
19576 T16,
19577 T17,
19578 T18,
19579 T19,
19580 T20,
19581 T21,
19582 T22,
19583 T23,
19584 T24,
19585 T25,
19586 T26,
19587 T27,
19588 T28,
19589 T29,
19590 T30,
19591 > ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>
19592 for FidlvizDemo<
19593 T0,
19594 T1,
19595 T2,
19596 T3,
19597 T4,
19598 T5,
19599 T6,
19600 T7,
19601 T8,
19602 T9,
19603 T10,
19604 T11,
19605 T12,
19606 T13,
19607 T14,
19608 T15,
19609 T16,
19610 T17,
19611 T18,
19612 T19,
19613 T20,
19614 T21,
19615 T22,
19616 T23,
19617 T24,
19618 T25,
19619 T26,
19620 T27,
19621 T28,
19622 T29,
19623 T30,
19624 >
19625 where
19626 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19627 ___E: ::fidl_next::Encoder,
19628 ___E: ::fidl_next::fuchsia::HandleEncoder,
19629 T0: ::fidl_next::Encode<u8, ___E>,
19630 T1: ::fidl_next::Encode<i8, ___E>,
19631 T2: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
19632 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19633 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
19634 T5: ::fidl_next::Encode<u8, ___E>,
19635 T6: ::fidl_next::Encode<u8, ___E>,
19636 T7: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
19637 T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
19638 T9: ::fidl_next::Encode<::fidl_next::wire::Float64, ___E>,
19639 T10: ::fidl_next::Encode<bool, ___E>,
19640 T11: ::fidl_next::Encode<bool, ___E>,
19641 T12: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19642 T13: ::fidl_next::Encode<::fidl_next::wire::OptionalString<'static>, ___E>,
19643 T14: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19644 T15: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
19645 T16: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
19646 T17: ::fidl_next::Encode<[u8; 3], ___E>,
19647 T18: ::fidl_next::Encode<
19648 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Float64>,
19649 ___E,
19650 >,
19651 T19: ::fidl_next::Encode<::fidl_next::wire::OptionalVector<'static, u8>, ___E>,
19652 T20: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
19653 T21: ::fidl_next::Encode<crate::wire::FidlvizBits, ___E>,
19654 T22: ::fidl_next::Encode<crate::wire::FidlvizEnum, ___E>,
19655 T23: ::fidl_next::Encode<crate::wire::FidlvizStruct1, ___E>,
19656 T24: ::fidl_next::Encode<crate::wire::FidlvizStruct2, ___E>,
19657 T25:
19658 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct1>, ___E>,
19659 T26:
19660 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct2>, ___E>,
19661 T27: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
19662 T28: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
19663 T29: ::fidl_next::Encode<crate::wire_optional::FidlvizUnion<'static>, ___E>,
19664 T30: ::fidl_next::Encode<crate::wire::FidlvizUnion<'static>, ___E>,
19665 {
19666 #[inline]
19667 fn encode(
19668 self,
19669 encoder_: &mut ___E,
19670 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
19671 _: (),
19672 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19673 ::fidl_next::munge! {
19674 let crate::wire::FidlvizDemo {
19675 f1,
19676 f2,
19677 f3,
19678 f4,
19679 f5,
19680 f6,
19681 f7,
19682 f8,
19683 f9,
19684 f10,
19685 f11,
19686 f12,
19687 f13,
19688 f14,
19689 f15,
19690 f16,
19691 f17,
19692 f18,
19693 f19,
19694 f20,
19695 f21,
19696 f22,
19697 f23,
19698 f24,
19699 f25,
19700 f26,
19701 f27,
19702 f28,
19703 f29,
19704 f30,
19705 f31,
19706
19707 } = out_;
19708 }
19709
19710 ::fidl_next::Encode::encode(self.f1, encoder_, f1, ())?;
19711
19712 ::fidl_next::Encode::encode(self.f2, encoder_, f2, ())?;
19713
19714 ::fidl_next::Encode::encode(self.f3, encoder_, f3, ())?;
19715
19716 ::fidl_next::Encode::encode(self.f4, encoder_, f4, ())?;
19717
19718 ::fidl_next::Encode::encode(self.f5, encoder_, f5, ())?;
19719
19720 ::fidl_next::Encode::encode(self.f6, encoder_, f6, ())?;
19721
19722 ::fidl_next::Encode::encode(self.f7, encoder_, f7, ())?;
19723
19724 ::fidl_next::Encode::encode(self.f8, encoder_, f8, ())?;
19725
19726 ::fidl_next::Encode::encode(self.f9, encoder_, f9, ())?;
19727
19728 ::fidl_next::Encode::encode(self.f10, encoder_, f10, ())?;
19729
19730 ::fidl_next::Encode::encode(self.f11, encoder_, f11, ())?;
19731
19732 ::fidl_next::Encode::encode(self.f12, encoder_, f12, ())?;
19733
19734 ::fidl_next::Encode::encode(self.f13, encoder_, f13, 4294967295)?;
19735
19736 ::fidl_next::Encode::encode(self.f14, encoder_, f14, 4294967295)?;
19737
19738 ::fidl_next::Encode::encode(self.f15, encoder_, f15, 4294967295)?;
19739
19740 ::fidl_next::Encode::encode(self.f16, encoder_, f16, ())?;
19741
19742 ::fidl_next::Encode::encode(self.f17, encoder_, f17, ())?;
19743
19744 ::fidl_next::Encode::encode(self.f18, encoder_, f18, ())?;
19745
19746 ::fidl_next::Encode::encode(self.f19, encoder_, f19, (4294967295, ()))?;
19747
19748 ::fidl_next::Encode::encode(self.f20, encoder_, f20, (4294967295, ()))?;
19749
19750 ::fidl_next::Encode::encode(self.f21, encoder_, f21, (4294967295, ()))?;
19751
19752 ::fidl_next::Encode::encode(self.f22, encoder_, f22, ())?;
19753
19754 ::fidl_next::Encode::encode(self.f23, encoder_, f23, ())?;
19755
19756 ::fidl_next::Encode::encode(self.f24, encoder_, f24, ())?;
19757
19758 ::fidl_next::Encode::encode(self.f25, encoder_, f25, ())?;
19759
19760 ::fidl_next::Encode::encode(self.f26, encoder_, f26, ())?;
19761
19762 ::fidl_next::Encode::encode(self.f27, encoder_, f27, ())?;
19763
19764 ::fidl_next::Encode::encode(self.f28, encoder_, f28, ())?;
19765
19766 ::fidl_next::Encode::encode(self.f29, encoder_, f29, ())?;
19767
19768 ::fidl_next::Encode::encode(self.f30, encoder_, f30, ())?;
19769
19770 ::fidl_next::Encode::encode(self.f31, encoder_, f31, ())?;
19771
19772 Ok(())
19773 }
19774 }
19775
19776 unsafe impl<
19777 'a,
19778 ___E,
19779 T0,
19780 T1,
19781 T2,
19782 T3,
19783 T4,
19784 T5,
19785 T6,
19786 T7,
19787 T8,
19788 T9,
19789 T10,
19790 T11,
19791 T12,
19792 T13,
19793 T14,
19794 T15,
19795 T16,
19796 T17,
19797 T18,
19798 T19,
19799 T20,
19800 T21,
19801 T22,
19802 T23,
19803 T24,
19804 T25,
19805 T26,
19806 T27,
19807 T28,
19808 T29,
19809 T30,
19810 > ::fidl_next::Encode<crate::wire::FidlvizDemo<'static>, ___E>
19811 for &'a FidlvizDemo<
19812 T0,
19813 T1,
19814 T2,
19815 T3,
19816 T4,
19817 T5,
19818 T6,
19819 T7,
19820 T8,
19821 T9,
19822 T10,
19823 T11,
19824 T12,
19825 T13,
19826 T14,
19827 T15,
19828 T16,
19829 T17,
19830 T18,
19831 T19,
19832 T20,
19833 T21,
19834 T22,
19835 T23,
19836 T24,
19837 T25,
19838 T26,
19839 T27,
19840 T28,
19841 T29,
19842 T30,
19843 >
19844 where
19845 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19846 ___E: ::fidl_next::Encoder,
19847 ___E: ::fidl_next::fuchsia::HandleEncoder,
19848 &'a T0: ::fidl_next::Encode<u8, ___E>,
19849 &'a T1: ::fidl_next::Encode<i8, ___E>,
19850 &'a T2: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
19851 &'a T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
19852 &'a T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
19853 &'a T5: ::fidl_next::Encode<u8, ___E>,
19854 &'a T6: ::fidl_next::Encode<u8, ___E>,
19855 &'a T7: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
19856 &'a T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
19857 &'a T9: ::fidl_next::Encode<::fidl_next::wire::Float64, ___E>,
19858 &'a T10: ::fidl_next::Encode<bool, ___E>,
19859 &'a T11: ::fidl_next::Encode<bool, ___E>,
19860 &'a T12: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19861 &'a T13: ::fidl_next::Encode<::fidl_next::wire::OptionalString<'static>, ___E>,
19862 &'a T14: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
19863 &'a T15: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
19864 &'a T16: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
19865 &'a T17: ::fidl_next::Encode<[u8; 3], ___E>,
19866 &'a T18: ::fidl_next::Encode<
19867 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Float64>,
19868 ___E,
19869 >,
19870 &'a T19: ::fidl_next::Encode<::fidl_next::wire::OptionalVector<'static, u8>, ___E>,
19871 &'a T20: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
19872 &'a T21: ::fidl_next::Encode<crate::wire::FidlvizBits, ___E>,
19873 &'a T22: ::fidl_next::Encode<crate::wire::FidlvizEnum, ___E>,
19874 &'a T23: ::fidl_next::Encode<crate::wire::FidlvizStruct1, ___E>,
19875 &'a T24: ::fidl_next::Encode<crate::wire::FidlvizStruct2, ___E>,
19876 &'a T25:
19877 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct1>, ___E>,
19878 &'a T26:
19879 ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FidlvizStruct2>, ___E>,
19880 &'a T27: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
19881 &'a T28: ::fidl_next::Encode<crate::wire::FidlvizTable<'static>, ___E>,
19882 &'a T29: ::fidl_next::Encode<crate::wire_optional::FidlvizUnion<'static>, ___E>,
19883 &'a T30: ::fidl_next::Encode<crate::wire::FidlvizUnion<'static>, ___E>,
19884 {
19885 #[inline]
19886 fn encode(
19887 self,
19888 encoder_: &mut ___E,
19889 out_: &mut ::core::mem::MaybeUninit<crate::wire::FidlvizDemo<'static>>,
19890 _: (),
19891 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19892 ::fidl_next::munge! {
19893 let crate::wire::FidlvizDemo {
19894 f1,
19895 f2,
19896 f3,
19897 f4,
19898 f5,
19899 f6,
19900 f7,
19901 f8,
19902 f9,
19903 f10,
19904 f11,
19905 f12,
19906 f13,
19907 f14,
19908 f15,
19909 f16,
19910 f17,
19911 f18,
19912 f19,
19913 f20,
19914 f21,
19915 f22,
19916 f23,
19917 f24,
19918 f25,
19919 f26,
19920 f27,
19921 f28,
19922 f29,
19923 f30,
19924 f31,
19925
19926 } = out_;
19927 }
19928
19929 ::fidl_next::Encode::encode(&self.f1, encoder_, f1, ())?;
19930
19931 ::fidl_next::Encode::encode(&self.f2, encoder_, f2, ())?;
19932
19933 ::fidl_next::Encode::encode(&self.f3, encoder_, f3, ())?;
19934
19935 ::fidl_next::Encode::encode(&self.f4, encoder_, f4, ())?;
19936
19937 ::fidl_next::Encode::encode(&self.f5, encoder_, f5, ())?;
19938
19939 ::fidl_next::Encode::encode(&self.f6, encoder_, f6, ())?;
19940
19941 ::fidl_next::Encode::encode(&self.f7, encoder_, f7, ())?;
19942
19943 ::fidl_next::Encode::encode(&self.f8, encoder_, f8, ())?;
19944
19945 ::fidl_next::Encode::encode(&self.f9, encoder_, f9, ())?;
19946
19947 ::fidl_next::Encode::encode(&self.f10, encoder_, f10, ())?;
19948
19949 ::fidl_next::Encode::encode(&self.f11, encoder_, f11, ())?;
19950
19951 ::fidl_next::Encode::encode(&self.f12, encoder_, f12, ())?;
19952
19953 ::fidl_next::Encode::encode(&self.f13, encoder_, f13, 4294967295)?;
19954
19955 ::fidl_next::Encode::encode(&self.f14, encoder_, f14, 4294967295)?;
19956
19957 ::fidl_next::Encode::encode(&self.f15, encoder_, f15, 4294967295)?;
19958
19959 ::fidl_next::Encode::encode(&self.f16, encoder_, f16, ())?;
19960
19961 ::fidl_next::Encode::encode(&self.f17, encoder_, f17, ())?;
19962
19963 ::fidl_next::Encode::encode(&self.f18, encoder_, f18, ())?;
19964
19965 ::fidl_next::Encode::encode(&self.f19, encoder_, f19, (4294967295, ()))?;
19966
19967 ::fidl_next::Encode::encode(&self.f20, encoder_, f20, (4294967295, ()))?;
19968
19969 ::fidl_next::Encode::encode(&self.f21, encoder_, f21, (4294967295, ()))?;
19970
19971 ::fidl_next::Encode::encode(&self.f22, encoder_, f22, ())?;
19972
19973 ::fidl_next::Encode::encode(&self.f23, encoder_, f23, ())?;
19974
19975 ::fidl_next::Encode::encode(&self.f24, encoder_, f24, ())?;
19976
19977 ::fidl_next::Encode::encode(&self.f25, encoder_, f25, ())?;
19978
19979 ::fidl_next::Encode::encode(&self.f26, encoder_, f26, ())?;
19980
19981 ::fidl_next::Encode::encode(&self.f27, encoder_, f27, ())?;
19982
19983 ::fidl_next::Encode::encode(&self.f28, encoder_, f28, ())?;
19984
19985 ::fidl_next::Encode::encode(&self.f29, encoder_, f29, ())?;
19986
19987 ::fidl_next::Encode::encode(&self.f30, encoder_, f30, ())?;
19988
19989 ::fidl_next::Encode::encode(&self.f31, encoder_, f31, ())?;
19990
19991 Ok(())
19992 }
19993 }
19994
19995 pub struct GoldenHandleBasicRightsStruct<T0> {
19997 pub v: T0,
19998 }
19999
20000 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
20001 for GoldenHandleBasicRightsStruct<T0>
20002 where
20003 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20004 ___E: ::fidl_next::fuchsia::HandleEncoder,
20005 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
20006 {
20007 #[inline]
20008 fn encode(
20009 self,
20010 encoder_: &mut ___E,
20011 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
20012 _: (),
20013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20014 ::fidl_next::munge! {
20015 let crate::wire::GoldenHandleBasicRightsStruct {
20016 v,
20017
20018 } = out_;
20019 }
20020
20021 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
20022
20023 Ok(())
20024 }
20025 }
20026
20027 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::GoldenHandleBasicRightsStruct, ___E>
20028 for &'a GoldenHandleBasicRightsStruct<T0>
20029 where
20030 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20031 ___E: ::fidl_next::fuchsia::HandleEncoder,
20032 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
20033 {
20034 #[inline]
20035 fn encode(
20036 self,
20037 encoder_: &mut ___E,
20038 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenHandleBasicRightsStruct>,
20039 _: (),
20040 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20041 ::fidl_next::munge! {
20042 let crate::wire::GoldenHandleBasicRightsStruct {
20043 v,
20044
20045 } = out_;
20046 }
20047
20048 ::fidl_next::Encode::encode(&self.v, encoder_, v, ())?;
20049
20050 Ok(())
20051 }
20052 }
20053
20054 pub struct GoldenNullableHandleStruct<T0> {
20056 pub v: T0,
20057 }
20058
20059 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
20060 for GoldenNullableHandleStruct<T0>
20061 where
20062 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20063 ___E: ::fidl_next::fuchsia::HandleEncoder,
20064 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
20065 {
20066 #[inline]
20067 fn encode(
20068 self,
20069 encoder_: &mut ___E,
20070 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
20071 _: (),
20072 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20073 ::fidl_next::munge! {
20074 let crate::wire::GoldenNullableHandleStruct {
20075 v,
20076
20077 } = out_;
20078 }
20079
20080 ::fidl_next::Encode::encode(self.v, encoder_, v, ())?;
20081
20082 Ok(())
20083 }
20084 }
20085
20086 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::GoldenNullableHandleStruct, ___E>
20087 for &'a GoldenNullableHandleStruct<T0>
20088 where
20089 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20090 ___E: ::fidl_next::fuchsia::HandleEncoder,
20091 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
20092 {
20093 #[inline]
20094 fn encode(
20095 self,
20096 encoder_: &mut ___E,
20097 out_: &mut ::core::mem::MaybeUninit<crate::wire::GoldenNullableHandleStruct>,
20098 _: (),
20099 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20100 ::fidl_next::munge! {
20101 let crate::wire::GoldenNullableHandleStruct {
20102 v,
20103
20104 } = out_;
20105 }
20106
20107 ::fidl_next::Encode::encode(&self.v, encoder_, v, ())?;
20108
20109 Ok(())
20110 }
20111 }
20112
20113 pub struct MultipleBoundedNonnullableVectorsOfHandles<T0, T1> {
20115 pub vh0: T0,
20116
20117 pub vh1: T1,
20118 }
20119
20120 unsafe impl<___E, T0, T1>
20121 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
20122 for MultipleBoundedNonnullableVectorsOfHandles<T0, T1>
20123 where
20124 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20125 ___E: ::fidl_next::Encoder,
20126 ___E: ::fidl_next::fuchsia::HandleEncoder,
20127 T0: ::fidl_next::Encode<
20128 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
20129 ___E,
20130 >,
20131 T1: ::fidl_next::Encode<
20132 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
20133 ___E,
20134 >,
20135 {
20136 #[inline]
20137 fn encode(
20138 self,
20139 encoder_: &mut ___E,
20140 out_: &mut ::core::mem::MaybeUninit<
20141 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
20142 >,
20143 _: (),
20144 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20145 ::fidl_next::munge! {
20146 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
20147 vh0,
20148 vh1,
20149
20150 } = out_;
20151 }
20152
20153 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
20154
20155 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
20156
20157 Ok(())
20158 }
20159 }
20160
20161 unsafe impl<'a, ___E, T0, T1>
20162 ::fidl_next::Encode<crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>, ___E>
20163 for &'a MultipleBoundedNonnullableVectorsOfHandles<T0, T1>
20164 where
20165 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20166 ___E: ::fidl_next::Encoder,
20167 ___E: ::fidl_next::fuchsia::HandleEncoder,
20168 &'a T0: ::fidl_next::Encode<
20169 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
20170 ___E,
20171 >,
20172 &'a T1: ::fidl_next::Encode<
20173 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
20174 ___E,
20175 >,
20176 {
20177 #[inline]
20178 fn encode(
20179 self,
20180 encoder_: &mut ___E,
20181 out_: &mut ::core::mem::MaybeUninit<
20182 crate::wire::MultipleBoundedNonnullableVectorsOfHandles<'static>,
20183 >,
20184 _: (),
20185 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20186 ::fidl_next::munge! {
20187 let crate::wire::MultipleBoundedNonnullableVectorsOfHandles {
20188 vh0,
20189 vh1,
20190
20191 } = out_;
20192 }
20193
20194 ::fidl_next::Encode::encode(&self.vh0, encoder_, vh0, (2, ()))?;
20195
20196 ::fidl_next::Encode::encode(&self.vh1, encoder_, vh1, (32, ()))?;
20197
20198 Ok(())
20199 }
20200 }
20201
20202 pub struct MultipleBoundedNullableVectorsOfHandles<T0, T1> {
20204 pub vh0: T0,
20205
20206 pub vh1: T1,
20207 }
20208
20209 unsafe impl<___E, T0, T1>
20210 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
20211 for MultipleBoundedNullableVectorsOfHandles<T0, T1>
20212 where
20213 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20214 ___E: ::fidl_next::Encoder,
20215 ___E: ::fidl_next::fuchsia::HandleEncoder,
20216 T0: ::fidl_next::Encode<
20217 ::fidl_next::wire::OptionalVector<
20218 'static,
20219 ::fidl_next::wire::fuchsia::NullableHandle,
20220 >,
20221 ___E,
20222 >,
20223 T1: ::fidl_next::Encode<
20224 ::fidl_next::wire::OptionalVector<
20225 'static,
20226 ::fidl_next::wire::fuchsia::NullableHandle,
20227 >,
20228 ___E,
20229 >,
20230 {
20231 #[inline]
20232 fn encode(
20233 self,
20234 encoder_: &mut ___E,
20235 out_: &mut ::core::mem::MaybeUninit<
20236 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
20237 >,
20238 _: (),
20239 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20240 ::fidl_next::munge! {
20241 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
20242 vh0,
20243 vh1,
20244
20245 } = out_;
20246 }
20247
20248 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (2, ()))?;
20249
20250 ::fidl_next::Encode::encode(self.vh1, encoder_, vh1, (32, ()))?;
20251
20252 Ok(())
20253 }
20254 }
20255
20256 unsafe impl<'a, ___E, T0, T1>
20257 ::fidl_next::Encode<crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>, ___E>
20258 for &'a MultipleBoundedNullableVectorsOfHandles<T0, T1>
20259 where
20260 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20261 ___E: ::fidl_next::Encoder,
20262 ___E: ::fidl_next::fuchsia::HandleEncoder,
20263 &'a T0: ::fidl_next::Encode<
20264 ::fidl_next::wire::OptionalVector<
20265 'static,
20266 ::fidl_next::wire::fuchsia::NullableHandle,
20267 >,
20268 ___E,
20269 >,
20270 &'a T1: ::fidl_next::Encode<
20271 ::fidl_next::wire::OptionalVector<
20272 'static,
20273 ::fidl_next::wire::fuchsia::NullableHandle,
20274 >,
20275 ___E,
20276 >,
20277 {
20278 #[inline]
20279 fn encode(
20280 self,
20281 encoder_: &mut ___E,
20282 out_: &mut ::core::mem::MaybeUninit<
20283 crate::wire::MultipleBoundedNullableVectorsOfHandles<'static>,
20284 >,
20285 _: (),
20286 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20287 ::fidl_next::munge! {
20288 let crate::wire::MultipleBoundedNullableVectorsOfHandles {
20289 vh0,
20290 vh1,
20291
20292 } = out_;
20293 }
20294
20295 ::fidl_next::Encode::encode(&self.vh0, encoder_, vh0, (2, ()))?;
20296
20297 ::fidl_next::Encode::encode(&self.vh1, encoder_, vh1, (32, ()))?;
20298
20299 Ok(())
20300 }
20301 }
20302
20303 pub struct MultipleHandleSubtypes<T0, T1, T2> {
20305 pub untyped: T0,
20306
20307 pub event: T1,
20308
20309 pub channel: T2,
20310 }
20311
20312 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
20313 for MultipleHandleSubtypes<T0, T1, T2>
20314 where
20315 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20316 ___E: ::fidl_next::fuchsia::HandleEncoder,
20317 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
20318 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
20319 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
20320 {
20321 #[inline]
20322 fn encode(
20323 self,
20324 encoder_: &mut ___E,
20325 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
20326 _: (),
20327 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20328 ::fidl_next::munge! {
20329 let crate::wire::MultipleHandleSubtypes {
20330 untyped,
20331 event,
20332 channel,
20333
20334 } = out_;
20335 }
20336
20337 ::fidl_next::Encode::encode(self.untyped, encoder_, untyped, ())?;
20338
20339 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
20340
20341 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
20342
20343 Ok(())
20344 }
20345 }
20346
20347 unsafe impl<'a, ___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::MultipleHandleSubtypes, ___E>
20348 for &'a MultipleHandleSubtypes<T0, T1, T2>
20349 where
20350 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20351 ___E: ::fidl_next::fuchsia::HandleEncoder,
20352 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
20353 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
20354 &'a T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
20355 {
20356 #[inline]
20357 fn encode(
20358 self,
20359 encoder_: &mut ___E,
20360 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleHandleSubtypes>,
20361 _: (),
20362 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20363 ::fidl_next::munge! {
20364 let crate::wire::MultipleHandleSubtypes {
20365 untyped,
20366 event,
20367 channel,
20368
20369 } = out_;
20370 }
20371
20372 ::fidl_next::Encode::encode(&self.untyped, encoder_, untyped, ())?;
20373
20374 ::fidl_next::Encode::encode(&self.event, encoder_, event, ())?;
20375
20376 ::fidl_next::Encode::encode(&self.channel, encoder_, channel, ())?;
20377
20378 Ok(())
20379 }
20380 }
20381
20382 pub struct MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5> {
20384 pub data0: T0,
20385
20386 pub handle0: T1,
20387
20388 pub data1: T2,
20389
20390 pub handle1: T3,
20391
20392 pub handle2: T4,
20393
20394 pub data2: T5,
20395 }
20396
20397 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
20398 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
20399 for MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5>
20400 where
20401 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20402 ___E: ::fidl_next::fuchsia::HandleEncoder,
20403 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20404 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
20405 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20406 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
20407 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
20408 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20409 {
20410 #[inline]
20411 fn encode(
20412 self,
20413 encoder_: &mut ___E,
20414 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
20415 _: (),
20416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20417 ::fidl_next::munge! {
20418 let crate::wire::MultipleNonnullableHandles {
20419 data0,
20420 handle0,
20421 data1,
20422 handle1,
20423 handle2,
20424 data2,
20425
20426 } = out_;
20427 }
20428
20429 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
20430
20431 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
20432
20433 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
20434
20435 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
20436
20437 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
20438
20439 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
20440
20441 Ok(())
20442 }
20443 }
20444
20445 unsafe impl<'a, ___E, T0, T1, T2, T3, T4, T5>
20446 ::fidl_next::Encode<crate::wire::MultipleNonnullableHandles, ___E>
20447 for &'a MultipleNonnullableHandles<T0, T1, T2, T3, T4, T5>
20448 where
20449 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20450 ___E: ::fidl_next::fuchsia::HandleEncoder,
20451 &'a T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20452 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
20453 &'a T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20454 &'a T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
20455 &'a T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
20456 &'a T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20457 {
20458 #[inline]
20459 fn encode(
20460 self,
20461 encoder_: &mut ___E,
20462 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNonnullableHandles>,
20463 _: (),
20464 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20465 ::fidl_next::munge! {
20466 let crate::wire::MultipleNonnullableHandles {
20467 data0,
20468 handle0,
20469 data1,
20470 handle1,
20471 handle2,
20472 data2,
20473
20474 } = out_;
20475 }
20476
20477 ::fidl_next::Encode::encode(&self.data0, encoder_, data0, ())?;
20478
20479 ::fidl_next::Encode::encode(&self.handle0, encoder_, handle0, ())?;
20480
20481 ::fidl_next::Encode::encode(&self.data1, encoder_, data1, ())?;
20482
20483 ::fidl_next::Encode::encode(&self.handle1, encoder_, handle1, ())?;
20484
20485 ::fidl_next::Encode::encode(&self.handle2, encoder_, handle2, ())?;
20486
20487 ::fidl_next::Encode::encode(&self.data2, encoder_, data2, ())?;
20488
20489 Ok(())
20490 }
20491 }
20492
20493 pub struct MultipleNullableHandles<T0, T1, T2, T3, T4, T5> {
20495 pub data0: T0,
20496
20497 pub handle0: T1,
20498
20499 pub data1: T2,
20500
20501 pub handle1: T3,
20502
20503 pub handle2: T4,
20504
20505 pub data2: T5,
20506 }
20507
20508 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
20509 ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
20510 for MultipleNullableHandles<T0, T1, T2, T3, T4, T5>
20511 where
20512 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20513 ___E: ::fidl_next::fuchsia::HandleEncoder,
20514 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20515 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
20516 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20517 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
20518 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
20519 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20520 {
20521 #[inline]
20522 fn encode(
20523 self,
20524 encoder_: &mut ___E,
20525 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
20526 _: (),
20527 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20528 ::fidl_next::munge! {
20529 let crate::wire::MultipleNullableHandles {
20530 data0,
20531 handle0,
20532 data1,
20533 handle1,
20534 handle2,
20535 data2,
20536
20537 } = out_;
20538 }
20539
20540 ::fidl_next::Encode::encode(self.data0, encoder_, data0, ())?;
20541
20542 ::fidl_next::Encode::encode(self.handle0, encoder_, handle0, ())?;
20543
20544 ::fidl_next::Encode::encode(self.data1, encoder_, data1, ())?;
20545
20546 ::fidl_next::Encode::encode(self.handle1, encoder_, handle1, ())?;
20547
20548 ::fidl_next::Encode::encode(self.handle2, encoder_, handle2, ())?;
20549
20550 ::fidl_next::Encode::encode(self.data2, encoder_, data2, ())?;
20551
20552 Ok(())
20553 }
20554 }
20555
20556 unsafe impl<'a, ___E, T0, T1, T2, T3, T4, T5>
20557 ::fidl_next::Encode<crate::wire::MultipleNullableHandles, ___E>
20558 for &'a MultipleNullableHandles<T0, T1, T2, T3, T4, T5>
20559 where
20560 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20561 ___E: ::fidl_next::fuchsia::HandleEncoder,
20562 &'a T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20563 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
20564 &'a T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20565 &'a T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalChannel, ___E>,
20566 &'a T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
20567 &'a T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20568 {
20569 #[inline]
20570 fn encode(
20571 self,
20572 encoder_: &mut ___E,
20573 out_: &mut ::core::mem::MaybeUninit<crate::wire::MultipleNullableHandles>,
20574 _: (),
20575 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20576 ::fidl_next::munge! {
20577 let crate::wire::MultipleNullableHandles {
20578 data0,
20579 handle0,
20580 data1,
20581 handle1,
20582 handle2,
20583 data2,
20584
20585 } = out_;
20586 }
20587
20588 ::fidl_next::Encode::encode(&self.data0, encoder_, data0, ())?;
20589
20590 ::fidl_next::Encode::encode(&self.handle0, encoder_, handle0, ())?;
20591
20592 ::fidl_next::Encode::encode(&self.data1, encoder_, data1, ())?;
20593
20594 ::fidl_next::Encode::encode(&self.handle1, encoder_, handle1, ())?;
20595
20596 ::fidl_next::Encode::encode(&self.handle2, encoder_, handle2, ())?;
20597
20598 ::fidl_next::Encode::encode(&self.data2, encoder_, data2, ())?;
20599
20600 Ok(())
20601 }
20602 }
20603
20604 pub struct NonnullableHandle<T0> {
20606 pub h: T0,
20607 }
20608
20609 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>
20610 for NonnullableHandle<T0>
20611 where
20612 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20613 ___E: ::fidl_next::fuchsia::HandleEncoder,
20614 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
20615 {
20616 #[inline]
20617 fn encode(
20618 self,
20619 encoder_: &mut ___E,
20620 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
20621 _: (),
20622 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20623 ::fidl_next::munge! {
20624 let crate::wire::NonnullableHandle {
20625 h,
20626
20627 } = out_;
20628 }
20629
20630 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
20631
20632 Ok(())
20633 }
20634 }
20635
20636 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandle, ___E>
20637 for &'a NonnullableHandle<T0>
20638 where
20639 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20640 ___E: ::fidl_next::fuchsia::HandleEncoder,
20641 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
20642 {
20643 #[inline]
20644 fn encode(
20645 self,
20646 encoder_: &mut ___E,
20647 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandle>,
20648 _: (),
20649 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20650 ::fidl_next::munge! {
20651 let crate::wire::NonnullableHandle {
20652 h,
20653
20654 } = out_;
20655 }
20656
20657 ::fidl_next::Encode::encode(&self.h, encoder_, h, ())?;
20658
20659 Ok(())
20660 }
20661 }
20662
20663 pub struct NonnullableHandleArray<T0> {
20665 pub handles: T0,
20666 }
20667
20668 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
20669 for NonnullableHandleArray<T0>
20670 where
20671 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20672 ___E: ::fidl_next::fuchsia::HandleEncoder,
20673 T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
20674 {
20675 #[inline]
20676 fn encode(
20677 self,
20678 encoder_: &mut ___E,
20679 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
20680 _: (),
20681 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20682 ::fidl_next::munge! {
20683 let crate::wire::NonnullableHandleArray {
20684 handles,
20685
20686 } = out_;
20687 }
20688
20689 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
20690
20691 Ok(())
20692 }
20693 }
20694
20695 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::NonnullableHandleArray, ___E>
20696 for &'a NonnullableHandleArray<T0>
20697 where
20698 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20699 ___E: ::fidl_next::fuchsia::HandleEncoder,
20700 &'a T0: ::fidl_next::Encode<[::fidl_next::wire::fuchsia::NullableHandle; 4], ___E>,
20701 {
20702 #[inline]
20703 fn encode(
20704 self,
20705 encoder_: &mut ___E,
20706 out_: &mut ::core::mem::MaybeUninit<crate::wire::NonnullableHandleArray>,
20707 _: (),
20708 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20709 ::fidl_next::munge! {
20710 let crate::wire::NonnullableHandleArray {
20711 handles,
20712
20713 } = out_;
20714 }
20715
20716 ::fidl_next::Encode::encode(&self.handles, encoder_, handles, ())?;
20717
20718 Ok(())
20719 }
20720 }
20721
20722 pub struct NullableHandle<T0> {
20724 pub h: T0,
20725 }
20726
20727 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NullableHandle, ___E> for NullableHandle<T0>
20728 where
20729 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20730 ___E: ::fidl_next::fuchsia::HandleEncoder,
20731 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
20732 {
20733 #[inline]
20734 fn encode(
20735 self,
20736 encoder_: &mut ___E,
20737 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
20738 _: (),
20739 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20740 ::fidl_next::munge! {
20741 let crate::wire::NullableHandle {
20742 h,
20743
20744 } = out_;
20745 }
20746
20747 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
20748
20749 Ok(())
20750 }
20751 }
20752
20753 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::NullableHandle, ___E>
20754 for &'a NullableHandle<T0>
20755 where
20756 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20757 ___E: ::fidl_next::fuchsia::HandleEncoder,
20758 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
20759 {
20760 #[inline]
20761 fn encode(
20762 self,
20763 encoder_: &mut ___E,
20764 out_: &mut ::core::mem::MaybeUninit<crate::wire::NullableHandle>,
20765 _: (),
20766 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20767 ::fidl_next::munge! {
20768 let crate::wire::NullableHandle {
20769 h,
20770
20771 } = out_;
20772 }
20773
20774 ::fidl_next::Encode::encode(&self.h, encoder_, h, ())?;
20775
20776 Ok(())
20777 }
20778 }
20779
20780 pub struct OutOfLineArrayOfNonnullableHandles<T0> {
20782 pub handles: T0,
20783 }
20784
20785 unsafe impl<___E, T0>
20786 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
20787 for OutOfLineArrayOfNonnullableHandles<T0>
20788 where
20789 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20790 ___E: ::fidl_next::Encoder,
20791 ___E: ::fidl_next::fuchsia::HandleEncoder,
20792 T0: ::fidl_next::Encode<
20793 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
20794 ___E,
20795 >,
20796 {
20797 #[inline]
20798 fn encode(
20799 self,
20800 encoder_: &mut ___E,
20801 out_: &mut ::core::mem::MaybeUninit<
20802 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
20803 >,
20804 _: (),
20805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20806 ::fidl_next::munge! {
20807 let crate::wire::OutOfLineArrayOfNonnullableHandles {
20808 handles,
20809
20810 } = out_;
20811 }
20812
20813 ::fidl_next::Encode::encode(self.handles, encoder_, handles, ())?;
20814
20815 Ok(())
20816 }
20817 }
20818
20819 unsafe impl<'a, ___E, T0>
20820 ::fidl_next::Encode<crate::wire::OutOfLineArrayOfNonnullableHandles<'static>, ___E>
20821 for &'a OutOfLineArrayOfNonnullableHandles<T0>
20822 where
20823 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20824 ___E: ::fidl_next::Encoder,
20825 ___E: ::fidl_next::fuchsia::HandleEncoder,
20826 &'a T0: ::fidl_next::Encode<
20827 ::fidl_next::wire::Box<'static, crate::wire::NonnullableHandleArray>,
20828 ___E,
20829 >,
20830 {
20831 #[inline]
20832 fn encode(
20833 self,
20834 encoder_: &mut ___E,
20835 out_: &mut ::core::mem::MaybeUninit<
20836 crate::wire::OutOfLineArrayOfNonnullableHandles<'static>,
20837 >,
20838 _: (),
20839 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20840 ::fidl_next::munge! {
20841 let crate::wire::OutOfLineArrayOfNonnullableHandles {
20842 handles,
20843
20844 } = out_;
20845 }
20846
20847 ::fidl_next::Encode::encode(&self.handles, encoder_, handles, ())?;
20848
20849 Ok(())
20850 }
20851 }
20852
20853 pub struct Sandwich6<T0, T1, T2> {
20855 pub before: T0,
20856
20857 pub the_union: T1,
20858
20859 pub after: T2,
20860 }
20861
20862 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>
20863 for Sandwich6<T0, T1, T2>
20864 where
20865 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20866 ___E: ::fidl_next::Encoder,
20867 ___E: ::fidl_next::fuchsia::HandleEncoder,
20868 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20869 T1: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
20870 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20871 {
20872 #[inline]
20873 fn encode(
20874 self,
20875 encoder_: &mut ___E,
20876 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
20877 _: (),
20878 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20879 ::fidl_next::munge! {
20880 let crate::wire::Sandwich6 {
20881 before,
20882 the_union,
20883 after,
20884
20885 } = out_;
20886 }
20887
20888 ::fidl_next::Encode::encode(self.before, encoder_, before, ())?;
20889
20890 ::fidl_next::Encode::encode(self.the_union, encoder_, the_union, ())?;
20891
20892 ::fidl_next::Encode::encode(self.after, encoder_, after, ())?;
20893
20894 Ok(())
20895 }
20896 }
20897
20898 unsafe impl<'a, ___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Sandwich6<'static>, ___E>
20899 for &'a Sandwich6<T0, T1, T2>
20900 where
20901 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20902 ___E: ::fidl_next::Encoder,
20903 ___E: ::fidl_next::fuchsia::HandleEncoder,
20904 &'a T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20905 &'a T1: ::fidl_next::Encode<crate::wire::UnionWithVector<'static>, ___E>,
20906 &'a T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20907 {
20908 #[inline]
20909 fn encode(
20910 self,
20911 encoder_: &mut ___E,
20912 out_: &mut ::core::mem::MaybeUninit<crate::wire::Sandwich6<'static>>,
20913 _: (),
20914 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20915 ::fidl_next::munge! {
20916 let crate::wire::Sandwich6 {
20917 before,
20918 the_union,
20919 after,
20920
20921 } = out_;
20922 }
20923
20924 ::fidl_next::Encode::encode(&self.before, encoder_, before, ())?;
20925
20926 ::fidl_next::Encode::encode(&self.the_union, encoder_, the_union, ())?;
20927
20928 ::fidl_next::Encode::encode(&self.after, encoder_, after, ())?;
20929
20930 Ok(())
20931 }
20932 }
20933
20934 pub struct ShortStringThenHandle<T0, T1> {
20936 pub s: T0,
20937
20938 pub h: T1,
20939 }
20940
20941 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
20942 for ShortStringThenHandle<T0, T1>
20943 where
20944 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20945 ___E: ::fidl_next::Encoder,
20946 ___E: ::fidl_next::fuchsia::HandleEncoder,
20947 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
20948 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
20949 {
20950 #[inline]
20951 fn encode(
20952 self,
20953 encoder_: &mut ___E,
20954 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
20955 _: (),
20956 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20957 ::fidl_next::munge! {
20958 let crate::wire::ShortStringThenHandle {
20959 s,
20960 h,
20961
20962 } = out_;
20963 }
20964
20965 ::fidl_next::Encode::encode(self.s, encoder_, s, 1)?;
20966
20967 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
20968
20969 Ok(())
20970 }
20971 }
20972
20973 unsafe impl<'a, ___E, T0, T1>
20974 ::fidl_next::Encode<crate::wire::ShortStringThenHandle<'static>, ___E>
20975 for &'a ShortStringThenHandle<T0, T1>
20976 where
20977 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20978 ___E: ::fidl_next::Encoder,
20979 ___E: ::fidl_next::fuchsia::HandleEncoder,
20980 &'a T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
20981 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
20982 {
20983 #[inline]
20984 fn encode(
20985 self,
20986 encoder_: &mut ___E,
20987 out_: &mut ::core::mem::MaybeUninit<crate::wire::ShortStringThenHandle<'static>>,
20988 _: (),
20989 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20990 ::fidl_next::munge! {
20991 let crate::wire::ShortStringThenHandle {
20992 s,
20993 h,
20994
20995 } = out_;
20996 }
20997
20998 ::fidl_next::Encode::encode(&self.s, encoder_, s, 1)?;
20999
21000 ::fidl_next::Encode::encode(&self.h, encoder_, h, ())?;
21001
21002 Ok(())
21003 }
21004 }
21005
21006 pub struct SingleHandle<T0> {
21008 pub h: T0,
21009 }
21010
21011 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleHandle, ___E> for SingleHandle<T0>
21012 where
21013 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21014 ___E: ::fidl_next::fuchsia::HandleEncoder,
21015 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
21016 {
21017 #[inline]
21018 fn encode(
21019 self,
21020 encoder_: &mut ___E,
21021 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
21022 _: (),
21023 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21024 ::fidl_next::munge! {
21025 let crate::wire::SingleHandle {
21026 h,
21027
21028 } = out_;
21029 }
21030
21031 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
21032
21033 Ok(())
21034 }
21035 }
21036
21037 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::SingleHandle, ___E>
21038 for &'a SingleHandle<T0>
21039 where
21040 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21041 ___E: ::fidl_next::fuchsia::HandleEncoder,
21042 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
21043 {
21044 #[inline]
21045 fn encode(
21046 self,
21047 encoder_: &mut ___E,
21048 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleHandle>,
21049 _: (),
21050 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21051 ::fidl_next::munge! {
21052 let crate::wire::SingleHandle {
21053 h,
21054
21055 } = out_;
21056 }
21057
21058 ::fidl_next::Encode::encode(&self.h, encoder_, h, ())?;
21059
21060 Ok(())
21061 }
21062 }
21063
21064 pub struct SingleOptionalHandle<T0> {
21066 pub h: T0,
21067 }
21068
21069 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
21070 for SingleOptionalHandle<T0>
21071 where
21072 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21073 ___E: ::fidl_next::fuchsia::HandleEncoder,
21074 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
21075 {
21076 #[inline]
21077 fn encode(
21078 self,
21079 encoder_: &mut ___E,
21080 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
21081 _: (),
21082 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21083 ::fidl_next::munge! {
21084 let crate::wire::SingleOptionalHandle {
21085 h,
21086
21087 } = out_;
21088 }
21089
21090 ::fidl_next::Encode::encode(self.h, encoder_, h, ())?;
21091
21092 Ok(())
21093 }
21094 }
21095
21096 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::SingleOptionalHandle, ___E>
21097 for &'a SingleOptionalHandle<T0>
21098 where
21099 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21100 ___E: ::fidl_next::fuchsia::HandleEncoder,
21101 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
21102 {
21103 #[inline]
21104 fn encode(
21105 self,
21106 encoder_: &mut ___E,
21107 out_: &mut ::core::mem::MaybeUninit<crate::wire::SingleOptionalHandle>,
21108 _: (),
21109 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21110 ::fidl_next::munge! {
21111 let crate::wire::SingleOptionalHandle {
21112 h,
21113
21114 } = out_;
21115 }
21116
21117 ::fidl_next::Encode::encode(&self.h, encoder_, h, ())?;
21118
21119 Ok(())
21120 }
21121 }
21122
21123 pub struct StructOfEndpoints<T0, T1, T2, T3> {
21125 pub client_end: T0,
21126
21127 pub optional_client_end: T1,
21128
21129 pub server_end: T2,
21130
21131 pub optional_server_end: T3,
21132 }
21133
21134 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>
21135 for StructOfEndpoints<T0, T1, T2, T3>
21136 where
21137 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21138 ___E: ::fidl_next::fuchsia::HandleEncoder,
21139 T0: ::fidl_next::Encode<
21140 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
21141 ___E,
21142 >,
21143 T1: ::fidl_next::Encode<
21144 ::fidl_next::ClientEnd<
21145 crate::Protocol,
21146 ::fidl_next::wire::fuchsia::OptionalChannel,
21147 >,
21148 ___E,
21149 >,
21150 T2: ::fidl_next::Encode<
21151 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
21152 ___E,
21153 >,
21154 T3: ::fidl_next::Encode<
21155 ::fidl_next::ServerEnd<
21156 crate::Protocol,
21157 ::fidl_next::wire::fuchsia::OptionalChannel,
21158 >,
21159 ___E,
21160 >,
21161 {
21162 #[inline]
21163 fn encode(
21164 self,
21165 encoder_: &mut ___E,
21166 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
21167 _: (),
21168 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21169 ::fidl_next::munge! {
21170 let crate::wire::StructOfEndpoints {
21171 client_end,
21172 optional_client_end,
21173 server_end,
21174 optional_server_end,
21175
21176 } = out_;
21177 }
21178
21179 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
21180
21181 ::fidl_next::Encode::encode(
21182 self.optional_client_end,
21183 encoder_,
21184 optional_client_end,
21185 (),
21186 )?;
21187
21188 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
21189
21190 ::fidl_next::Encode::encode(
21191 self.optional_server_end,
21192 encoder_,
21193 optional_server_end,
21194 (),
21195 )?;
21196
21197 Ok(())
21198 }
21199 }
21200
21201 unsafe impl<'a, ___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::StructOfEndpoints, ___E>
21202 for &'a StructOfEndpoints<T0, T1, T2, T3>
21203 where
21204 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21205 ___E: ::fidl_next::fuchsia::HandleEncoder,
21206 &'a T0: ::fidl_next::Encode<
21207 ::fidl_next::ClientEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
21208 ___E,
21209 >,
21210 &'a T1: ::fidl_next::Encode<
21211 ::fidl_next::ClientEnd<
21212 crate::Protocol,
21213 ::fidl_next::wire::fuchsia::OptionalChannel,
21214 >,
21215 ___E,
21216 >,
21217 &'a T2: ::fidl_next::Encode<
21218 ::fidl_next::ServerEnd<crate::Protocol, ::fidl_next::wire::fuchsia::Channel>,
21219 ___E,
21220 >,
21221 &'a T3: ::fidl_next::Encode<
21222 ::fidl_next::ServerEnd<
21223 crate::Protocol,
21224 ::fidl_next::wire::fuchsia::OptionalChannel,
21225 >,
21226 ___E,
21227 >,
21228 {
21229 #[inline]
21230 fn encode(
21231 self,
21232 encoder_: &mut ___E,
21233 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfEndpoints>,
21234 _: (),
21235 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21236 ::fidl_next::munge! {
21237 let crate::wire::StructOfEndpoints {
21238 client_end,
21239 optional_client_end,
21240 server_end,
21241 optional_server_end,
21242
21243 } = out_;
21244 }
21245
21246 ::fidl_next::Encode::encode(&self.client_end, encoder_, client_end, ())?;
21247
21248 ::fidl_next::Encode::encode(
21249 &self.optional_client_end,
21250 encoder_,
21251 optional_client_end,
21252 (),
21253 )?;
21254
21255 ::fidl_next::Encode::encode(&self.server_end, encoder_, server_end, ())?;
21256
21257 ::fidl_next::Encode::encode(
21258 &self.optional_server_end,
21259 encoder_,
21260 optional_server_end,
21261 (),
21262 )?;
21263
21264 Ok(())
21265 }
21266 }
21267
21268 pub struct StructOfOptionalUnionOfHandle<T0> {
21270 pub u: T0,
21271 }
21272
21273 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
21274 for StructOfOptionalUnionOfHandle<T0>
21275 where
21276 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21277 ___E: ::fidl_next::fuchsia::HandleEncoder,
21278 T0: ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>,
21279 {
21280 #[inline]
21281 fn encode(
21282 self,
21283 encoder_: &mut ___E,
21284 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
21285 _: (),
21286 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21287 ::fidl_next::munge! {
21288 let crate::wire::StructOfOptionalUnionOfHandle {
21289 u,
21290
21291 } = out_;
21292 }
21293
21294 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
21295
21296 Ok(())
21297 }
21298 }
21299
21300 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::StructOfOptionalUnionOfHandle, ___E>
21301 for &'a StructOfOptionalUnionOfHandle<T0>
21302 where
21303 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21304 ___E: ::fidl_next::fuchsia::HandleEncoder,
21305 &'a T0: ::fidl_next::Encode<crate::wire_optional::UnionOfHandle, ___E>,
21306 {
21307 #[inline]
21308 fn encode(
21309 self,
21310 encoder_: &mut ___E,
21311 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfOptionalUnionOfHandle>,
21312 _: (),
21313 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21314 ::fidl_next::munge! {
21315 let crate::wire::StructOfOptionalUnionOfHandle {
21316 u,
21317
21318 } = out_;
21319 }
21320
21321 ::fidl_next::Encode::encode(&self.u, encoder_, u, ())?;
21322
21323 Ok(())
21324 }
21325 }
21326
21327 pub struct StructOfSimpleResourceTable<T0> {
21329 pub table: T0,
21330 }
21331
21332 unsafe impl<___E, T0>
21333 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
21334 for StructOfSimpleResourceTable<T0>
21335 where
21336 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21337 ___E: ::fidl_next::Encoder,
21338 ___E: ::fidl_next::fuchsia::HandleEncoder,
21339 T0: ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>,
21340 {
21341 #[inline]
21342 fn encode(
21343 self,
21344 encoder_: &mut ___E,
21345 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
21346 _: (),
21347 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21348 ::fidl_next::munge! {
21349 let crate::wire::StructOfSimpleResourceTable {
21350 table,
21351
21352 } = out_;
21353 }
21354
21355 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
21356
21357 Ok(())
21358 }
21359 }
21360
21361 unsafe impl<'a, ___E, T0>
21362 ::fidl_next::Encode<crate::wire::StructOfSimpleResourceTable<'static>, ___E>
21363 for &'a StructOfSimpleResourceTable<T0>
21364 where
21365 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21366 ___E: ::fidl_next::Encoder,
21367 ___E: ::fidl_next::fuchsia::HandleEncoder,
21368 &'a T0: ::fidl_next::Encode<crate::wire::SimpleResourceTable<'static>, ___E>,
21369 {
21370 #[inline]
21371 fn encode(
21372 self,
21373 encoder_: &mut ___E,
21374 out_: &mut ::core::mem::MaybeUninit<crate::wire::StructOfSimpleResourceTable<'static>>,
21375 _: (),
21376 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21377 ::fidl_next::munge! {
21378 let crate::wire::StructOfSimpleResourceTable {
21379 table,
21380
21381 } = out_;
21382 }
21383
21384 ::fidl_next::Encode::encode(&self.table, encoder_, table, ())?;
21385
21386 Ok(())
21387 }
21388 }
21389
21390 pub struct TableFieldInlinedHandleStruct<T0> {
21392 pub t: T0,
21393 }
21394
21395 unsafe impl<___E, T0>
21396 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
21397 for TableFieldInlinedHandleStruct<T0>
21398 where
21399 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21400 ___E: ::fidl_next::Encoder,
21401 ___E: ::fidl_next::fuchsia::HandleEncoder,
21402 T0: ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>,
21403 {
21404 #[inline]
21405 fn encode(
21406 self,
21407 encoder_: &mut ___E,
21408 out_: &mut ::core::mem::MaybeUninit<
21409 crate::wire::TableFieldInlinedHandleStruct<'static>,
21410 >,
21411 _: (),
21412 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21413 ::fidl_next::munge! {
21414 let crate::wire::TableFieldInlinedHandleStruct {
21415 t,
21416
21417 } = out_;
21418 }
21419
21420 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
21421
21422 Ok(())
21423 }
21424 }
21425
21426 unsafe impl<'a, ___E, T0>
21427 ::fidl_next::Encode<crate::wire::TableFieldInlinedHandleStruct<'static>, ___E>
21428 for &'a TableFieldInlinedHandleStruct<T0>
21429 where
21430 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21431 ___E: ::fidl_next::Encoder,
21432 ___E: ::fidl_next::fuchsia::HandleEncoder,
21433 &'a T0: ::fidl_next::Encode<crate::wire::TableFieldInlinedHandle<'static>, ___E>,
21434 {
21435 #[inline]
21436 fn encode(
21437 self,
21438 encoder_: &mut ___E,
21439 out_: &mut ::core::mem::MaybeUninit<
21440 crate::wire::TableFieldInlinedHandleStruct<'static>,
21441 >,
21442 _: (),
21443 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21444 ::fidl_next::munge! {
21445 let crate::wire::TableFieldInlinedHandleStruct {
21446 t,
21447
21448 } = out_;
21449 }
21450
21451 ::fidl_next::Encode::encode(&self.t, encoder_, t, ())?;
21452
21453 Ok(())
21454 }
21455 }
21456
21457 pub struct TableFieldUnknownResourceStruct<T0> {
21459 pub t: T0,
21460 }
21461
21462 unsafe impl<___E, T0>
21463 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
21464 for TableFieldUnknownResourceStruct<T0>
21465 where
21466 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21467 ___E: ::fidl_next::Encoder,
21468 ___E: ::fidl_next::fuchsia::HandleEncoder,
21469 T0: ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>,
21470 {
21471 #[inline]
21472 fn encode(
21473 self,
21474 encoder_: &mut ___E,
21475 out_: &mut ::core::mem::MaybeUninit<
21476 crate::wire::TableFieldUnknownResourceStruct<'static>,
21477 >,
21478 _: (),
21479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21480 ::fidl_next::munge! {
21481 let crate::wire::TableFieldUnknownResourceStruct {
21482 t,
21483
21484 } = out_;
21485 }
21486
21487 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
21488
21489 Ok(())
21490 }
21491 }
21492
21493 unsafe impl<'a, ___E, T0>
21494 ::fidl_next::Encode<crate::wire::TableFieldUnknownResourceStruct<'static>, ___E>
21495 for &'a TableFieldUnknownResourceStruct<T0>
21496 where
21497 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21498 ___E: ::fidl_next::Encoder,
21499 ___E: ::fidl_next::fuchsia::HandleEncoder,
21500 &'a T0: ::fidl_next::Encode<crate::wire::TableFieldUnknownResource<'static>, ___E>,
21501 {
21502 #[inline]
21503 fn encode(
21504 self,
21505 encoder_: &mut ___E,
21506 out_: &mut ::core::mem::MaybeUninit<
21507 crate::wire::TableFieldUnknownResourceStruct<'static>,
21508 >,
21509 _: (),
21510 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21511 ::fidl_next::munge! {
21512 let crate::wire::TableFieldUnknownResourceStruct {
21513 t,
21514
21515 } = out_;
21516 }
21517
21518 ::fidl_next::Encode::encode(&self.t, encoder_, t, ())?;
21519
21520 Ok(())
21521 }
21522 }
21523
21524 pub struct TableOfEndpoints<T0> {
21526 pub t: T0,
21527 }
21528
21529 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
21530 for TableOfEndpoints<T0>
21531 where
21532 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21533 ___E: ::fidl_next::Encoder,
21534 ___E: ::fidl_next::fuchsia::HandleEncoder,
21535 T0: ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>,
21536 {
21537 #[inline]
21538 fn encode(
21539 self,
21540 encoder_: &mut ___E,
21541 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
21542 _: (),
21543 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21544 ::fidl_next::munge! {
21545 let crate::wire::TableOfEndpoints {
21546 t,
21547
21548 } = out_;
21549 }
21550
21551 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
21552
21553 Ok(())
21554 }
21555 }
21556
21557 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::TableOfEndpoints<'static>, ___E>
21558 for &'a TableOfEndpoints<T0>
21559 where
21560 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21561 ___E: ::fidl_next::Encoder,
21562 ___E: ::fidl_next::fuchsia::HandleEncoder,
21563 &'a T0: ::fidl_next::Encode<crate::wire::TableOfEndpointsTable<'static>, ___E>,
21564 {
21565 #[inline]
21566 fn encode(
21567 self,
21568 encoder_: &mut ___E,
21569 out_: &mut ::core::mem::MaybeUninit<crate::wire::TableOfEndpoints<'static>>,
21570 _: (),
21571 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21572 ::fidl_next::munge! {
21573 let crate::wire::TableOfEndpoints {
21574 t,
21575
21576 } = out_;
21577 }
21578
21579 ::fidl_next::Encode::encode(&self.t, encoder_, t, ())?;
21580
21581 Ok(())
21582 }
21583 }
21584
21585 pub struct TableUnionWithVectorReservedSandwichStruct<T0> {
21587 pub table: T0,
21588 }
21589
21590 unsafe impl<___E, T0>
21591 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
21592 for TableUnionWithVectorReservedSandwichStruct<T0>
21593 where
21594 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21595 ___E: ::fidl_next::Encoder,
21596 ___E: ::fidl_next::fuchsia::HandleEncoder,
21597 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>,
21598 {
21599 #[inline]
21600 fn encode(
21601 self,
21602 encoder_: &mut ___E,
21603 out_: &mut ::core::mem::MaybeUninit<
21604 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
21605 >,
21606 _: (),
21607 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21608 ::fidl_next::munge! {
21609 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
21610 table,
21611
21612 } = out_;
21613 }
21614
21615 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
21616
21617 Ok(())
21618 }
21619 }
21620
21621 unsafe impl<'a, ___E, T0>
21622 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>, ___E>
21623 for &'a TableUnionWithVectorReservedSandwichStruct<T0>
21624 where
21625 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21626 ___E: ::fidl_next::Encoder,
21627 ___E: ::fidl_next::fuchsia::HandleEncoder,
21628 &'a T0:
21629 ::fidl_next::Encode<crate::wire::TableUnionWithVectorReservedSandwich<'static>, ___E>,
21630 {
21631 #[inline]
21632 fn encode(
21633 self,
21634 encoder_: &mut ___E,
21635 out_: &mut ::core::mem::MaybeUninit<
21636 crate::wire::TableUnionWithVectorReservedSandwichStruct<'static>,
21637 >,
21638 _: (),
21639 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21640 ::fidl_next::munge! {
21641 let crate::wire::TableUnionWithVectorReservedSandwichStruct {
21642 table,
21643
21644 } = out_;
21645 }
21646
21647 ::fidl_next::Encode::encode(&self.table, encoder_, table, ())?;
21648
21649 Ok(())
21650 }
21651 }
21652
21653 pub struct TableUnionWithVectorStructSandwichStruct<T0> {
21655 pub table: T0,
21656 }
21657
21658 unsafe impl<___E, T0>
21659 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
21660 for TableUnionWithVectorStructSandwichStruct<T0>
21661 where
21662 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21663 ___E: ::fidl_next::Encoder,
21664 ___E: ::fidl_next::fuchsia::HandleEncoder,
21665 T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>,
21666 {
21667 #[inline]
21668 fn encode(
21669 self,
21670 encoder_: &mut ___E,
21671 out_: &mut ::core::mem::MaybeUninit<
21672 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
21673 >,
21674 _: (),
21675 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21676 ::fidl_next::munge! {
21677 let crate::wire::TableUnionWithVectorStructSandwichStruct {
21678 table,
21679
21680 } = out_;
21681 }
21682
21683 ::fidl_next::Encode::encode(self.table, encoder_, table, ())?;
21684
21685 Ok(())
21686 }
21687 }
21688
21689 unsafe impl<'a, ___E, T0>
21690 ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwichStruct<'static>, ___E>
21691 for &'a TableUnionWithVectorStructSandwichStruct<T0>
21692 where
21693 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21694 ___E: ::fidl_next::Encoder,
21695 ___E: ::fidl_next::fuchsia::HandleEncoder,
21696 &'a T0: ::fidl_next::Encode<crate::wire::TableUnionWithVectorStructSandwich<'static>, ___E>,
21697 {
21698 #[inline]
21699 fn encode(
21700 self,
21701 encoder_: &mut ___E,
21702 out_: &mut ::core::mem::MaybeUninit<
21703 crate::wire::TableUnionWithVectorStructSandwichStruct<'static>,
21704 >,
21705 _: (),
21706 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21707 ::fidl_next::munge! {
21708 let crate::wire::TableUnionWithVectorStructSandwichStruct {
21709 table,
21710
21711 } = out_;
21712 }
21713
21714 ::fidl_next::Encode::encode(&self.table, encoder_, table, ())?;
21715
21716 Ok(())
21717 }
21718 }
21719
21720 pub struct TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<T0> {
21722 pub t: T0,
21723 }
21724
21725 unsafe impl<___E, T0>
21726 ::fidl_next::Encode<
21727 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
21728 ___E,
21729 > for TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<T0>
21730 where
21731 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21732 ___E: ::fidl_next::Encoder,
21733 ___E: ::fidl_next::fuchsia::HandleEncoder,
21734 T0: ::fidl_next::Encode<
21735 crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'static>,
21736 ___E,
21737 >,
21738 {
21739 #[inline]
21740 fn encode(
21741 self,
21742 encoder_: &mut ___E,
21743 out_: &mut ::core::mem::MaybeUninit<
21744 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
21745 >,
21746 _: (),
21747 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21748 ::fidl_next::munge! {
21749 let crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
21750 t,
21751
21752 } = out_;
21753 }
21754
21755 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
21756
21757 Ok(())
21758 }
21759 }
21760
21761 unsafe impl<'a, ___E, T0>
21762 ::fidl_next::Encode<
21763 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
21764 ___E,
21765 > for &'a TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<T0>
21766 where
21767 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21768 ___E: ::fidl_next::Encoder,
21769 ___E: ::fidl_next::fuchsia::HandleEncoder,
21770 &'a T0: ::fidl_next::Encode<
21771 crate::wire::TableWithUnknownEnvelopesAfterKnownEnvelopes<'static>,
21772 ___E,
21773 >,
21774 {
21775 #[inline]
21776 fn encode(
21777 self,
21778 encoder_: &mut ___E,
21779 out_: &mut ::core::mem::MaybeUninit<
21780 crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct<'static>,
21781 >,
21782 _: (),
21783 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21784 ::fidl_next::munge! {
21785 let crate::wire::TableWithUnknownEnveloepsAfterKnownEnvelopesStruct {
21786 t,
21787
21788 } = out_;
21789 }
21790
21791 ::fidl_next::Encode::encode(&self.t, encoder_, t, ())?;
21792
21793 Ok(())
21794 }
21795 }
21796
21797 pub struct TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<T0> {
21799 pub t: T0,
21800 }
21801
21802 unsafe impl<___E, T0>
21803 ::fidl_next::Encode<
21804 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
21805 ___E,
21806 > for TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<T0>
21807 where
21808 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21809 ___E: ::fidl_next::Encoder,
21810 ___E: ::fidl_next::fuchsia::HandleEncoder,
21811 T0: ::fidl_next::Encode<
21812 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static>,
21813 ___E,
21814 >,
21815 {
21816 #[inline]
21817 fn encode(
21818 self,
21819 encoder_: &mut ___E,
21820 out_: &mut ::core::mem::MaybeUninit<
21821 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
21822 >,
21823 _: (),
21824 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21825 ::fidl_next::munge! {
21826 let crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
21827 t,
21828
21829 } = out_;
21830 }
21831
21832 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
21833
21834 Ok(())
21835 }
21836 }
21837
21838 unsafe impl<'a, ___E, T0>
21839 ::fidl_next::Encode<
21840 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
21841 ___E,
21842 > for &'a TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<T0>
21843 where
21844 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21845 ___E: ::fidl_next::Encoder,
21846 ___E: ::fidl_next::fuchsia::HandleEncoder,
21847 &'a T0: ::fidl_next::Encode<
21848 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopes<'static>,
21849 ___E,
21850 >,
21851 {
21852 #[inline]
21853 fn encode(
21854 self,
21855 encoder_: &mut ___E,
21856 out_: &mut ::core::mem::MaybeUninit<
21857 crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct<'static>,
21858 >,
21859 _: (),
21860 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21861 ::fidl_next::munge! {
21862 let crate::wire::TableWithUnknownEnvelopesBeforeKnownEnvelopesStruct {
21863 t,
21864
21865 } = out_;
21866 }
21867
21868 ::fidl_next::Encode::encode(&self.t, encoder_, t, ())?;
21869
21870 Ok(())
21871 }
21872 }
21873
21874 pub struct TestFlexibleResourceXUnionInStruct<T0> {
21876 pub xu: T0,
21877 }
21878
21879 unsafe impl<___E, T0>
21880 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
21881 for TestFlexibleResourceXUnionInStruct<T0>
21882 where
21883 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21884 ___E: ::fidl_next::Encoder,
21885 ___E: ::fidl_next::fuchsia::HandleEncoder,
21886 T0: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
21887 {
21888 #[inline]
21889 fn encode(
21890 self,
21891 encoder_: &mut ___E,
21892 out_: &mut ::core::mem::MaybeUninit<
21893 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
21894 >,
21895 _: (),
21896 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21897 ::fidl_next::munge! {
21898 let crate::wire::TestFlexibleResourceXUnionInStruct {
21899 xu,
21900
21901 } = out_;
21902 }
21903
21904 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
21905
21906 Ok(())
21907 }
21908 }
21909
21910 unsafe impl<'a, ___E, T0>
21911 ::fidl_next::Encode<crate::wire::TestFlexibleResourceXUnionInStruct<'static>, ___E>
21912 for &'a TestFlexibleResourceXUnionInStruct<T0>
21913 where
21914 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21915 ___E: ::fidl_next::Encoder,
21916 ___E: ::fidl_next::fuchsia::HandleEncoder,
21917 &'a T0: ::fidl_next::Encode<crate::wire::SampleResourceXUnion<'static>, ___E>,
21918 {
21919 #[inline]
21920 fn encode(
21921 self,
21922 encoder_: &mut ___E,
21923 out_: &mut ::core::mem::MaybeUninit<
21924 crate::wire::TestFlexibleResourceXUnionInStruct<'static>,
21925 >,
21926 _: (),
21927 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21928 ::fidl_next::munge! {
21929 let crate::wire::TestFlexibleResourceXUnionInStruct {
21930 xu,
21931
21932 } = out_;
21933 }
21934
21935 ::fidl_next::Encode::encode(&self.xu, encoder_, xu, ())?;
21936
21937 Ok(())
21938 }
21939 }
21940
21941 pub struct TestOptionalFlexibleResourceXUnionInStruct<T0> {
21943 pub xu: T0,
21944 }
21945
21946 unsafe impl<___E, T0>
21947 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
21948 for TestOptionalFlexibleResourceXUnionInStruct<T0>
21949 where
21950 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21951 ___E: ::fidl_next::Encoder,
21952 ___E: ::fidl_next::fuchsia::HandleEncoder,
21953 T0: ::fidl_next::Encode<crate::wire_optional::SampleResourceXUnion<'static>, ___E>,
21954 {
21955 #[inline]
21956 fn encode(
21957 self,
21958 encoder_: &mut ___E,
21959 out_: &mut ::core::mem::MaybeUninit<
21960 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
21961 >,
21962 _: (),
21963 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21964 ::fidl_next::munge! {
21965 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
21966 xu,
21967
21968 } = out_;
21969 }
21970
21971 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
21972
21973 Ok(())
21974 }
21975 }
21976
21977 unsafe impl<'a, ___E, T0>
21978 ::fidl_next::Encode<crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>, ___E>
21979 for &'a TestOptionalFlexibleResourceXUnionInStruct<T0>
21980 where
21981 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21982 ___E: ::fidl_next::Encoder,
21983 ___E: ::fidl_next::fuchsia::HandleEncoder,
21984 &'a T0: ::fidl_next::Encode<crate::wire_optional::SampleResourceXUnion<'static>, ___E>,
21985 {
21986 #[inline]
21987 fn encode(
21988 self,
21989 encoder_: &mut ___E,
21990 out_: &mut ::core::mem::MaybeUninit<
21991 crate::wire::TestOptionalFlexibleResourceXUnionInStruct<'static>,
21992 >,
21993 _: (),
21994 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21995 ::fidl_next::munge! {
21996 let crate::wire::TestOptionalFlexibleResourceXUnionInStruct {
21997 xu,
21998
21999 } = out_;
22000 }
22001
22002 ::fidl_next::Encode::encode(&self.xu, encoder_, xu, ())?;
22003
22004 Ok(())
22005 }
22006 }
22007
22008 pub struct TestOptionalStrictResourceXUnionInStruct<T0> {
22010 pub xu: T0,
22011 }
22012
22013 unsafe impl<___E, T0>
22014 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
22015 for TestOptionalStrictResourceXUnionInStruct<T0>
22016 where
22017 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22018 ___E: ::fidl_next::Encoder,
22019 ___E: ::fidl_next::fuchsia::HandleEncoder,
22020 T0: ::fidl_next::Encode<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>,
22021 {
22022 #[inline]
22023 fn encode(
22024 self,
22025 encoder_: &mut ___E,
22026 out_: &mut ::core::mem::MaybeUninit<
22027 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
22028 >,
22029 _: (),
22030 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22031 ::fidl_next::munge! {
22032 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
22033 xu,
22034
22035 } = out_;
22036 }
22037
22038 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
22039
22040 Ok(())
22041 }
22042 }
22043
22044 unsafe impl<'a, ___E, T0>
22045 ::fidl_next::Encode<crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>, ___E>
22046 for &'a TestOptionalStrictResourceXUnionInStruct<T0>
22047 where
22048 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22049 ___E: ::fidl_next::Encoder,
22050 ___E: ::fidl_next::fuchsia::HandleEncoder,
22051 &'a T0:
22052 ::fidl_next::Encode<crate::wire_optional::SampleStrictResourceXUnion<'static>, ___E>,
22053 {
22054 #[inline]
22055 fn encode(
22056 self,
22057 encoder_: &mut ___E,
22058 out_: &mut ::core::mem::MaybeUninit<
22059 crate::wire::TestOptionalStrictResourceXUnionInStruct<'static>,
22060 >,
22061 _: (),
22062 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22063 ::fidl_next::munge! {
22064 let crate::wire::TestOptionalStrictResourceXUnionInStruct {
22065 xu,
22066
22067 } = out_;
22068 }
22069
22070 ::fidl_next::Encode::encode(&self.xu, encoder_, xu, ())?;
22071
22072 Ok(())
22073 }
22074 }
22075
22076 pub struct TestPackageResolverResolveRequest<T0, T1, T2, T3> {
22078 pub package_url: T0,
22079
22080 pub selectors: T1,
22081
22082 pub update_policy: T2,
22083
22084 pub this_should_be_a_handle: T3,
22085 }
22086
22087 unsafe impl<___E, T0, T1, T2, T3>
22088 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
22089 for TestPackageResolverResolveRequest<T0, T1, T2, T3>
22090 where
22091 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22092 ___E: ::fidl_next::Encoder,
22093 ___E: ::fidl_next::fuchsia::HandleEncoder,
22094 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
22095 T1: ::fidl_next::Encode<
22096 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
22097 ___E,
22098 >,
22099 T2: ::fidl_next::Encode<crate::wire::UpdatePolicy, ___E>,
22100 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
22101 {
22102 #[inline]
22103 fn encode(
22104 self,
22105 encoder_: &mut ___E,
22106 out_: &mut ::core::mem::MaybeUninit<
22107 crate::wire::TestPackageResolverResolveRequest<'static>,
22108 >,
22109 _: (),
22110 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22111 ::fidl_next::munge! {
22112 let crate::wire::TestPackageResolverResolveRequest {
22113 package_url,
22114 selectors,
22115 update_policy,
22116 this_should_be_a_handle,
22117
22118 } = out_;
22119 }
22120
22121 ::fidl_next::Encode::encode(self.package_url, encoder_, package_url, 4294967295)?;
22122
22123 ::fidl_next::Encode::encode(
22124 self.selectors,
22125 encoder_,
22126 selectors,
22127 (4294967295, 4294967295),
22128 )?;
22129
22130 ::fidl_next::Encode::encode(self.update_policy, encoder_, update_policy, ())?;
22131
22132 ::fidl_next::Encode::encode(
22133 self.this_should_be_a_handle,
22134 encoder_,
22135 this_should_be_a_handle,
22136 (),
22137 )?;
22138
22139 Ok(())
22140 }
22141 }
22142
22143 unsafe impl<'a, ___E, T0, T1, T2, T3>
22144 ::fidl_next::Encode<crate::wire::TestPackageResolverResolveRequest<'static>, ___E>
22145 for &'a TestPackageResolverResolveRequest<T0, T1, T2, T3>
22146 where
22147 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22148 ___E: ::fidl_next::Encoder,
22149 ___E: ::fidl_next::fuchsia::HandleEncoder,
22150 &'a T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
22151 &'a T1: ::fidl_next::Encode<
22152 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
22153 ___E,
22154 >,
22155 &'a T2: ::fidl_next::Encode<crate::wire::UpdatePolicy, ___E>,
22156 &'a T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
22157 {
22158 #[inline]
22159 fn encode(
22160 self,
22161 encoder_: &mut ___E,
22162 out_: &mut ::core::mem::MaybeUninit<
22163 crate::wire::TestPackageResolverResolveRequest<'static>,
22164 >,
22165 _: (),
22166 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22167 ::fidl_next::munge! {
22168 let crate::wire::TestPackageResolverResolveRequest {
22169 package_url,
22170 selectors,
22171 update_policy,
22172 this_should_be_a_handle,
22173
22174 } = out_;
22175 }
22176
22177 ::fidl_next::Encode::encode(&self.package_url, encoder_, package_url, 4294967295)?;
22178
22179 ::fidl_next::Encode::encode(
22180 &self.selectors,
22181 encoder_,
22182 selectors,
22183 (4294967295, 4294967295),
22184 )?;
22185
22186 ::fidl_next::Encode::encode(&self.update_policy, encoder_, update_policy, ())?;
22187
22188 ::fidl_next::Encode::encode(
22189 &self.this_should_be_a_handle,
22190 encoder_,
22191 this_should_be_a_handle,
22192 (),
22193 )?;
22194
22195 Ok(())
22196 }
22197 }
22198
22199 pub struct TestStrictResourceXUnionInStruct<T0> {
22201 pub xu: T0,
22202 }
22203
22204 unsafe impl<___E, T0>
22205 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
22206 for TestStrictResourceXUnionInStruct<T0>
22207 where
22208 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22209 ___E: ::fidl_next::Encoder,
22210 ___E: ::fidl_next::fuchsia::HandleEncoder,
22211 T0: ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
22212 {
22213 #[inline]
22214 fn encode(
22215 self,
22216 encoder_: &mut ___E,
22217 out_: &mut ::core::mem::MaybeUninit<
22218 crate::wire::TestStrictResourceXUnionInStruct<'static>,
22219 >,
22220 _: (),
22221 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22222 ::fidl_next::munge! {
22223 let crate::wire::TestStrictResourceXUnionInStruct {
22224 xu,
22225
22226 } = out_;
22227 }
22228
22229 ::fidl_next::Encode::encode(self.xu, encoder_, xu, ())?;
22230
22231 Ok(())
22232 }
22233 }
22234
22235 unsafe impl<'a, ___E, T0>
22236 ::fidl_next::Encode<crate::wire::TestStrictResourceXUnionInStruct<'static>, ___E>
22237 for &'a TestStrictResourceXUnionInStruct<T0>
22238 where
22239 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22240 ___E: ::fidl_next::Encoder,
22241 ___E: ::fidl_next::fuchsia::HandleEncoder,
22242 &'a T0: ::fidl_next::Encode<crate::wire::SampleStrictResourceXUnion<'static>, ___E>,
22243 {
22244 #[inline]
22245 fn encode(
22246 self,
22247 encoder_: &mut ___E,
22248 out_: &mut ::core::mem::MaybeUninit<
22249 crate::wire::TestStrictResourceXUnionInStruct<'static>,
22250 >,
22251 _: (),
22252 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22253 ::fidl_next::munge! {
22254 let crate::wire::TestStrictResourceXUnionInStruct {
22255 xu,
22256
22257 } = out_;
22258 }
22259
22260 ::fidl_next::Encode::encode(&self.xu, encoder_, xu, ())?;
22261
22262 Ok(())
22263 }
22264 }
22265
22266 pub struct UnboundedNonnullableVectorOfHandles<T0> {
22268 pub vh0: T0,
22269 }
22270
22271 unsafe impl<___E, T0>
22272 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
22273 for UnboundedNonnullableVectorOfHandles<T0>
22274 where
22275 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22276 ___E: ::fidl_next::Encoder,
22277 ___E: ::fidl_next::fuchsia::HandleEncoder,
22278 T0: ::fidl_next::Encode<
22279 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
22280 ___E,
22281 >,
22282 {
22283 #[inline]
22284 fn encode(
22285 self,
22286 encoder_: &mut ___E,
22287 out_: &mut ::core::mem::MaybeUninit<
22288 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
22289 >,
22290 _: (),
22291 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22292 ::fidl_next::munge! {
22293 let crate::wire::UnboundedNonnullableVectorOfHandles {
22294 vh0,
22295
22296 } = out_;
22297 }
22298
22299 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
22300
22301 Ok(())
22302 }
22303 }
22304
22305 unsafe impl<'a, ___E, T0>
22306 ::fidl_next::Encode<crate::wire::UnboundedNonnullableVectorOfHandles<'static>, ___E>
22307 for &'a UnboundedNonnullableVectorOfHandles<T0>
22308 where
22309 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22310 ___E: ::fidl_next::Encoder,
22311 ___E: ::fidl_next::fuchsia::HandleEncoder,
22312 &'a T0: ::fidl_next::Encode<
22313 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
22314 ___E,
22315 >,
22316 {
22317 #[inline]
22318 fn encode(
22319 self,
22320 encoder_: &mut ___E,
22321 out_: &mut ::core::mem::MaybeUninit<
22322 crate::wire::UnboundedNonnullableVectorOfHandles<'static>,
22323 >,
22324 _: (),
22325 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22326 ::fidl_next::munge! {
22327 let crate::wire::UnboundedNonnullableVectorOfHandles {
22328 vh0,
22329
22330 } = out_;
22331 }
22332
22333 ::fidl_next::Encode::encode(&self.vh0, encoder_, vh0, (4294967295, ()))?;
22334
22335 Ok(())
22336 }
22337 }
22338
22339 pub struct UnboundedNullableVectorOfHandles<T0> {
22341 pub vh0: T0,
22342 }
22343
22344 unsafe impl<___E, T0>
22345 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
22346 for UnboundedNullableVectorOfHandles<T0>
22347 where
22348 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22349 ___E: ::fidl_next::Encoder,
22350 ___E: ::fidl_next::fuchsia::HandleEncoder,
22351 T0: ::fidl_next::Encode<
22352 ::fidl_next::wire::OptionalVector<
22353 'static,
22354 ::fidl_next::wire::fuchsia::NullableHandle,
22355 >,
22356 ___E,
22357 >,
22358 {
22359 #[inline]
22360 fn encode(
22361 self,
22362 encoder_: &mut ___E,
22363 out_: &mut ::core::mem::MaybeUninit<
22364 crate::wire::UnboundedNullableVectorOfHandles<'static>,
22365 >,
22366 _: (),
22367 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22368 ::fidl_next::munge! {
22369 let crate::wire::UnboundedNullableVectorOfHandles {
22370 vh0,
22371
22372 } = out_;
22373 }
22374
22375 ::fidl_next::Encode::encode(self.vh0, encoder_, vh0, (4294967295, ()))?;
22376
22377 Ok(())
22378 }
22379 }
22380
22381 unsafe impl<'a, ___E, T0>
22382 ::fidl_next::Encode<crate::wire::UnboundedNullableVectorOfHandles<'static>, ___E>
22383 for &'a UnboundedNullableVectorOfHandles<T0>
22384 where
22385 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22386 ___E: ::fidl_next::Encoder,
22387 ___E: ::fidl_next::fuchsia::HandleEncoder,
22388 &'a T0: ::fidl_next::Encode<
22389 ::fidl_next::wire::OptionalVector<
22390 'static,
22391 ::fidl_next::wire::fuchsia::NullableHandle,
22392 >,
22393 ___E,
22394 >,
22395 {
22396 #[inline]
22397 fn encode(
22398 self,
22399 encoder_: &mut ___E,
22400 out_: &mut ::core::mem::MaybeUninit<
22401 crate::wire::UnboundedNullableVectorOfHandles<'static>,
22402 >,
22403 _: (),
22404 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22405 ::fidl_next::munge! {
22406 let crate::wire::UnboundedNullableVectorOfHandles {
22407 vh0,
22408
22409 } = out_;
22410 }
22411
22412 ::fidl_next::Encode::encode(&self.vh0, encoder_, vh0, (4294967295, ()))?;
22413
22414 Ok(())
22415 }
22416 }
22417
22418 pub struct UnionOfEndpoints<T0> {
22420 pub u: T0,
22421 }
22422
22423 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
22424 for UnionOfEndpoints<T0>
22425 where
22426 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22427 ___E: ::fidl_next::Encoder,
22428 ___E: ::fidl_next::fuchsia::HandleEncoder,
22429 T0: ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
22430 {
22431 #[inline]
22432 fn encode(
22433 self,
22434 encoder_: &mut ___E,
22435 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
22436 _: (),
22437 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22438 ::fidl_next::munge! {
22439 let crate::wire::UnionOfEndpoints {
22440 u,
22441
22442 } = out_;
22443 }
22444
22445 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
22446
22447 Ok(())
22448 }
22449 }
22450
22451 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::UnionOfEndpoints<'static>, ___E>
22452 for &'a UnionOfEndpoints<T0>
22453 where
22454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22455 ___E: ::fidl_next::Encoder,
22456 ___E: ::fidl_next::fuchsia::HandleEncoder,
22457 &'a T0: ::fidl_next::Encode<crate::wire::UnionOfEndpointsUnion<'static>, ___E>,
22458 {
22459 #[inline]
22460 fn encode(
22461 self,
22462 encoder_: &mut ___E,
22463 out_: &mut ::core::mem::MaybeUninit<crate::wire::UnionOfEndpoints<'static>>,
22464 _: (),
22465 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22466 ::fidl_next::munge! {
22467 let crate::wire::UnionOfEndpoints {
22468 u,
22469
22470 } = out_;
22471 }
22472
22473 ::fidl_next::Encode::encode(&self.u, encoder_, u, ())?;
22474
22475 Ok(())
22476 }
22477 }
22478
22479 pub struct VectorOfArrayOfEventInStructWithDefaultRights<T0> {
22481 pub h: T0,
22482 }
22483
22484 unsafe impl<___E, T0>
22485 ::fidl_next::Encode<
22486 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
22487 ___E,
22488 > for VectorOfArrayOfEventInStructWithDefaultRights<T0>
22489 where
22490 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22491 ___E: ::fidl_next::Encoder,
22492 ___E: ::fidl_next::fuchsia::HandleEncoder,
22493 T0: ::fidl_next::Encode<
22494 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
22495 ___E,
22496 >,
22497 {
22498 #[inline]
22499 fn encode(
22500 self,
22501 encoder_: &mut ___E,
22502 out_: &mut ::core::mem::MaybeUninit<
22503 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
22504 >,
22505 _: (),
22506 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22507 ::fidl_next::munge! {
22508 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
22509 h,
22510
22511 } = out_;
22512 }
22513
22514 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
22515
22516 Ok(())
22517 }
22518 }
22519
22520 unsafe impl<'a, ___E, T0>
22521 ::fidl_next::Encode<
22522 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
22523 ___E,
22524 > for &'a VectorOfArrayOfEventInStructWithDefaultRights<T0>
22525 where
22526 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22527 ___E: ::fidl_next::Encoder,
22528 ___E: ::fidl_next::fuchsia::HandleEncoder,
22529 &'a T0: ::fidl_next::Encode<
22530 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
22531 ___E,
22532 >,
22533 {
22534 #[inline]
22535 fn encode(
22536 self,
22537 encoder_: &mut ___E,
22538 out_: &mut ::core::mem::MaybeUninit<
22539 crate::wire::VectorOfArrayOfEventInStructWithDefaultRights<'static>,
22540 >,
22541 _: (),
22542 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22543 ::fidl_next::munge! {
22544 let crate::wire::VectorOfArrayOfEventInStructWithDefaultRights {
22545 h,
22546
22547 } = out_;
22548 }
22549
22550 ::fidl_next::Encode::encode(&self.h, encoder_, h, (1, ()))?;
22551
22552 Ok(())
22553 }
22554 }
22555
22556 pub struct VectorOfArrayOfEventInStructWithReducedRights<T0> {
22558 pub h: T0,
22559 }
22560
22561 unsafe impl<___E, T0>
22562 ::fidl_next::Encode<
22563 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
22564 ___E,
22565 > for VectorOfArrayOfEventInStructWithReducedRights<T0>
22566 where
22567 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22568 ___E: ::fidl_next::Encoder,
22569 ___E: ::fidl_next::fuchsia::HandleEncoder,
22570 T0: ::fidl_next::Encode<
22571 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
22572 ___E,
22573 >,
22574 {
22575 #[inline]
22576 fn encode(
22577 self,
22578 encoder_: &mut ___E,
22579 out_: &mut ::core::mem::MaybeUninit<
22580 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
22581 >,
22582 _: (),
22583 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22584 ::fidl_next::munge! {
22585 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
22586 h,
22587
22588 } = out_;
22589 }
22590
22591 ::fidl_next::Encode::encode(self.h, encoder_, h, (1, ()))?;
22592
22593 Ok(())
22594 }
22595 }
22596
22597 unsafe impl<'a, ___E, T0>
22598 ::fidl_next::Encode<
22599 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
22600 ___E,
22601 > for &'a VectorOfArrayOfEventInStructWithReducedRights<T0>
22602 where
22603 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22604 ___E: ::fidl_next::Encoder,
22605 ___E: ::fidl_next::fuchsia::HandleEncoder,
22606 &'a T0: ::fidl_next::Encode<
22607 ::fidl_next::wire::Vector<'static, [::fidl_next::wire::fuchsia::Event; 1]>,
22608 ___E,
22609 >,
22610 {
22611 #[inline]
22612 fn encode(
22613 self,
22614 encoder_: &mut ___E,
22615 out_: &mut ::core::mem::MaybeUninit<
22616 crate::wire::VectorOfArrayOfEventInStructWithReducedRights<'static>,
22617 >,
22618 _: (),
22619 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22620 ::fidl_next::munge! {
22621 let crate::wire::VectorOfArrayOfEventInStructWithReducedRights {
22622 h,
22623
22624 } = out_;
22625 }
22626
22627 ::fidl_next::Encode::encode(&self.h, encoder_, h, (1, ()))?;
22628
22629 Ok(())
22630 }
22631 }
22632
22633 pub struct VectorOfArrayOfEventInTableWithReducedRightsStruct<T0> {
22635 pub t: T0,
22636 }
22637
22638 unsafe impl<___E, T0>
22639 ::fidl_next::Encode<
22640 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
22641 ___E,
22642 > for VectorOfArrayOfEventInTableWithReducedRightsStruct<T0>
22643 where
22644 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22645 ___E: ::fidl_next::Encoder,
22646 ___E: ::fidl_next::fuchsia::HandleEncoder,
22647 T0: ::fidl_next::Encode<
22648 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
22649 ___E,
22650 >,
22651 {
22652 #[inline]
22653 fn encode(
22654 self,
22655 encoder_: &mut ___E,
22656 out_: &mut ::core::mem::MaybeUninit<
22657 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
22658 >,
22659 _: (),
22660 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22661 ::fidl_next::munge! {
22662 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
22663 t,
22664
22665 } = out_;
22666 }
22667
22668 ::fidl_next::Encode::encode(self.t, encoder_, t, ())?;
22669
22670 Ok(())
22671 }
22672 }
22673
22674 unsafe impl<'a, ___E, T0>
22675 ::fidl_next::Encode<
22676 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
22677 ___E,
22678 > for &'a VectorOfArrayOfEventInTableWithReducedRightsStruct<T0>
22679 where
22680 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22681 ___E: ::fidl_next::Encoder,
22682 ___E: ::fidl_next::fuchsia::HandleEncoder,
22683 &'a T0: ::fidl_next::Encode<
22684 crate::wire::VectorOfArrayOfEventInTableWithReducedRights<'static>,
22685 ___E,
22686 >,
22687 {
22688 #[inline]
22689 fn encode(
22690 self,
22691 encoder_: &mut ___E,
22692 out_: &mut ::core::mem::MaybeUninit<
22693 crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct<'static>,
22694 >,
22695 _: (),
22696 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22697 ::fidl_next::munge! {
22698 let crate::wire::VectorOfArrayOfEventInTableWithReducedRightsStruct {
22699 t,
22700
22701 } = out_;
22702 }
22703
22704 ::fidl_next::Encode::encode(&self.t, encoder_, t, ())?;
22705
22706 Ok(())
22707 }
22708 }
22709
22710 pub struct VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0> {
22712 pub u: T0,
22713 }
22714
22715 unsafe impl<___E, T0>
22716 ::fidl_next::Encode<
22717 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
22718 ___E,
22719 > for VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0>
22720 where
22721 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22722 ___E: ::fidl_next::Encoder,
22723 ___E: ::fidl_next::fuchsia::HandleEncoder,
22724 T0: ::fidl_next::Encode<
22725 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
22726 ___E,
22727 >,
22728 {
22729 #[inline]
22730 fn encode(
22731 self,
22732 encoder_: &mut ___E,
22733 out_: &mut ::core::mem::MaybeUninit<
22734 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
22735 >,
22736 _: (),
22737 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22738 ::fidl_next::munge! {
22739 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
22740 u,
22741
22742 } = out_;
22743 }
22744
22745 ::fidl_next::Encode::encode(self.u, encoder_, u, ())?;
22746
22747 Ok(())
22748 }
22749 }
22750
22751 unsafe impl<'a, ___E, T0>
22752 ::fidl_next::Encode<
22753 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
22754 ___E,
22755 > for &'a VectorOfArrayOfEventInUnionWithReducedRightsStruct<T0>
22756 where
22757 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22758 ___E: ::fidl_next::Encoder,
22759 ___E: ::fidl_next::fuchsia::HandleEncoder,
22760 &'a T0: ::fidl_next::Encode<
22761 crate::wire::VectorOfArrayOfEventInUnionWithReducedRights<'static>,
22762 ___E,
22763 >,
22764 {
22765 #[inline]
22766 fn encode(
22767 self,
22768 encoder_: &mut ___E,
22769 out_: &mut ::core::mem::MaybeUninit<
22770 crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct<'static>,
22771 >,
22772 _: (),
22773 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22774 ::fidl_next::munge! {
22775 let crate::wire::VectorOfArrayOfEventInUnionWithReducedRightsStruct {
22776 u,
22777
22778 } = out_;
22779 }
22780
22781 ::fidl_next::Encode::encode(&self.u, encoder_, u, ())?;
22782
22783 Ok(())
22784 }
22785 }
22786
22787 pub struct VectorOfHandles<T0> {
22789 pub v: T0,
22790 }
22791
22792 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
22793 for VectorOfHandles<T0>
22794 where
22795 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22796 ___E: ::fidl_next::Encoder,
22797 ___E: ::fidl_next::fuchsia::HandleEncoder,
22798 T0: ::fidl_next::Encode<
22799 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
22800 ___E,
22801 >,
22802 {
22803 #[inline]
22804 fn encode(
22805 self,
22806 encoder_: &mut ___E,
22807 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
22808 _: (),
22809 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22810 ::fidl_next::munge! {
22811 let crate::wire::VectorOfHandles {
22812 v,
22813
22814 } = out_;
22815 }
22816
22817 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
22818
22819 Ok(())
22820 }
22821 }
22822
22823 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::VectorOfHandles<'static>, ___E>
22824 for &'a VectorOfHandles<T0>
22825 where
22826 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22827 ___E: ::fidl_next::Encoder,
22828 ___E: ::fidl_next::fuchsia::HandleEncoder,
22829 &'a T0: ::fidl_next::Encode<
22830 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
22831 ___E,
22832 >,
22833 {
22834 #[inline]
22835 fn encode(
22836 self,
22837 encoder_: &mut ___E,
22838 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfHandles<'static>>,
22839 _: (),
22840 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22841 ::fidl_next::munge! {
22842 let crate::wire::VectorOfHandles {
22843 v,
22844
22845 } = out_;
22846 }
22847
22848 ::fidl_next::Encode::encode(&self.v, encoder_, v, (4294967295, ()))?;
22849
22850 Ok(())
22851 }
22852 }
22853
22854 pub struct VectorOfOptionalHandles<T0> {
22856 pub v: T0,
22857 }
22858
22859 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
22860 for VectorOfOptionalHandles<T0>
22861 where
22862 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22863 ___E: ::fidl_next::Encoder,
22864 ___E: ::fidl_next::fuchsia::HandleEncoder,
22865 T0: ::fidl_next::Encode<
22866 ::fidl_next::wire::Vector<
22867 'static,
22868 ::fidl_next::wire::fuchsia::OptionalNullableHandle,
22869 >,
22870 ___E,
22871 >,
22872 {
22873 #[inline]
22874 fn encode(
22875 self,
22876 encoder_: &mut ___E,
22877 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
22878 _: (),
22879 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22880 ::fidl_next::munge! {
22881 let crate::wire::VectorOfOptionalHandles {
22882 v,
22883
22884 } = out_;
22885 }
22886
22887 ::fidl_next::Encode::encode(self.v, encoder_, v, (4294967295, ()))?;
22888
22889 Ok(())
22890 }
22891 }
22892
22893 unsafe impl<'a, ___E, T0>
22894 ::fidl_next::Encode<crate::wire::VectorOfOptionalHandles<'static>, ___E>
22895 for &'a VectorOfOptionalHandles<T0>
22896 where
22897 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22898 ___E: ::fidl_next::Encoder,
22899 ___E: ::fidl_next::fuchsia::HandleEncoder,
22900 &'a T0: ::fidl_next::Encode<
22901 ::fidl_next::wire::Vector<
22902 'static,
22903 ::fidl_next::wire::fuchsia::OptionalNullableHandle,
22904 >,
22905 ___E,
22906 >,
22907 {
22908 #[inline]
22909 fn encode(
22910 self,
22911 encoder_: &mut ___E,
22912 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfOptionalHandles<'static>>,
22913 _: (),
22914 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22915 ::fidl_next::munge! {
22916 let crate::wire::VectorOfOptionalHandles {
22917 v,
22918
22919 } = out_;
22920 }
22921
22922 ::fidl_next::Encode::encode(&self.v, encoder_, v, (4294967295, ()))?;
22923
22924 Ok(())
22925 }
22926 }
22927
22928 pub struct VectorOfUpTo2Handles<T0> {
22930 pub v: T0,
22931 }
22932
22933 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
22934 for VectorOfUpTo2Handles<T0>
22935 where
22936 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22937 ___E: ::fidl_next::Encoder,
22938 ___E: ::fidl_next::fuchsia::HandleEncoder,
22939 T0: ::fidl_next::Encode<
22940 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
22941 ___E,
22942 >,
22943 {
22944 #[inline]
22945 fn encode(
22946 self,
22947 encoder_: &mut ___E,
22948 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
22949 _: (),
22950 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22951 ::fidl_next::munge! {
22952 let crate::wire::VectorOfUpTo2Handles {
22953 v,
22954
22955 } = out_;
22956 }
22957
22958 ::fidl_next::Encode::encode(self.v, encoder_, v, (2, ()))?;
22959
22960 Ok(())
22961 }
22962 }
22963
22964 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::VectorOfUpTo2Handles<'static>, ___E>
22965 for &'a VectorOfUpTo2Handles<T0>
22966 where
22967 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22968 ___E: ::fidl_next::Encoder,
22969 ___E: ::fidl_next::fuchsia::HandleEncoder,
22970 &'a T0: ::fidl_next::Encode<
22971 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::NullableHandle>,
22972 ___E,
22973 >,
22974 {
22975 #[inline]
22976 fn encode(
22977 self,
22978 encoder_: &mut ___E,
22979 out_: &mut ::core::mem::MaybeUninit<crate::wire::VectorOfUpTo2Handles<'static>>,
22980 _: (),
22981 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
22982 ::fidl_next::munge! {
22983 let crate::wire::VectorOfUpTo2Handles {
22984 v,
22985
22986 } = out_;
22987 }
22988
22989 ::fidl_next::Encode::encode(&self.v, encoder_, v, (2, ()))?;
22990
22991 Ok(())
22992 }
22993 }
22994}
22995
22996pub use self::natural::*;
22997
22998pub use fidl_next_common_test_conformance::*;