Skip to main content

fidl_next_common_fuchsia_examples/
fidl_next_common_fuchsia_examples.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    pub type AvailableFromApiLevelNext = i32;
8
9    pub type AvailableUntilApiLevelNext = i32;
10
11    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
12    pub struct Color {
13        pub id: u32,
14
15        pub name: ::std::string::String,
16    }
17
18    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Color<'static>, ___E> for Color
19    where
20        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21        ___E: ::fidl_next::Encoder,
22    {
23        #[inline]
24        fn encode(
25            self,
26            encoder_: &mut ___E,
27            out_: &mut ::core::mem::MaybeUninit<crate::wire::Color<'static>>,
28            _: (),
29        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
30            ::fidl_next::munge! {
31                let crate::wire::Color {
32                    id,
33                    name,
34
35                } = out_;
36            }
37
38            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
39
40            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
41
42            ::fidl_next::Encode::encode(self.name, encoder_, name, 32)?;
43
44            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
45            ::fidl_next::Constrained::validate(_field, 32)?;
46
47            Ok(())
48        }
49    }
50
51    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Color<'static>, ___E> for &'a Color
52    where
53        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
54        ___E: ::fidl_next::Encoder,
55    {
56        #[inline]
57        fn encode(
58            self,
59            encoder_: &mut ___E,
60            out_: &mut ::core::mem::MaybeUninit<crate::wire::Color<'static>>,
61            _: (),
62        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
63            ::fidl_next::munge! {
64                let crate::wire::Color {
65                    id,
66                    name,
67
68                } = out_;
69            }
70
71            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
72
73            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
74
75            ::fidl_next::Encode::encode(&self.name, encoder_, name, 32)?;
76
77            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
78            ::fidl_next::Constrained::validate(_field, 32)?;
79
80            Ok(())
81        }
82    }
83
84    unsafe impl<___E>
85        ::fidl_next::EncodeOption<
86            ::fidl_next::wire::Box<'static, crate::wire::Color<'static>>,
87            ___E,
88        > for Color
89    where
90        ___E: ::fidl_next::Encoder + ?Sized,
91        Color: ::fidl_next::Encode<crate::wire::Color<'static>, ___E>,
92    {
93        #[inline]
94        fn encode_option(
95            this: ::core::option::Option<Self>,
96            encoder: &mut ___E,
97            out: &mut ::core::mem::MaybeUninit<
98                ::fidl_next::wire::Box<'static, crate::wire::Color<'static>>,
99            >,
100            _: (),
101        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
102            if let Some(inner) = this {
103                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
104                ::fidl_next::wire::Box::encode_present(out);
105            } else {
106                ::fidl_next::wire::Box::encode_absent(out);
107            }
108
109            Ok(())
110        }
111    }
112
113    unsafe impl<'a, ___E>
114        ::fidl_next::EncodeOption<
115            ::fidl_next::wire::Box<'static, crate::wire::Color<'static>>,
116            ___E,
117        > for &'a Color
118    where
119        ___E: ::fidl_next::Encoder + ?Sized,
120        &'a Color: ::fidl_next::Encode<crate::wire::Color<'static>, ___E>,
121    {
122        #[inline]
123        fn encode_option(
124            this: ::core::option::Option<Self>,
125            encoder: &mut ___E,
126            out: &mut ::core::mem::MaybeUninit<
127                ::fidl_next::wire::Box<'static, crate::wire::Color<'static>>,
128            >,
129            _: (),
130        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
131            if let Some(inner) = this {
132                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
133                ::fidl_next::wire::Box::encode_present(out);
134            } else {
135                ::fidl_next::wire::Box::encode_absent(out);
136            }
137
138            Ok(())
139        }
140    }
141
142    impl<'de> ::fidl_next::FromWire<crate::wire::Color<'de>> for Color {
143        #[inline]
144        fn from_wire(wire: crate::wire::Color<'de>) -> Self {
145            Self {
146                id: ::fidl_next::FromWire::from_wire(wire.id),
147
148                name: ::fidl_next::FromWire::from_wire(wire.name),
149            }
150        }
151    }
152
153    impl<'de> ::fidl_next::FromWireRef<crate::wire::Color<'de>> for Color {
154        #[inline]
155        fn from_wire_ref(wire: &crate::wire::Color<'de>) -> Self {
156            Self {
157                id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
158
159                name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
160            }
161        }
162    }
163
164    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
165    pub struct EchoEchoStringRequest {
166        pub value: ::std::string::String,
167    }
168
169    unsafe impl<___E> ::fidl_next::Encode<crate::wire::EchoEchoStringRequest<'static>, ___E>
170        for EchoEchoStringRequest
171    where
172        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
173        ___E: ::fidl_next::Encoder,
174    {
175        #[inline]
176        fn encode(
177            self,
178            encoder_: &mut ___E,
179            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoEchoStringRequest<'static>>,
180            _: (),
181        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
182            ::fidl_next::munge! {
183                let crate::wire::EchoEchoStringRequest {
184                    value,
185
186                } = out_;
187            }
188
189            ::fidl_next::Encode::encode(self.value, encoder_, value, 32)?;
190
191            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
192            ::fidl_next::Constrained::validate(_field, 32)?;
193
194            Ok(())
195        }
196    }
197
198    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::EchoEchoStringRequest<'static>, ___E>
199        for &'a EchoEchoStringRequest
200    where
201        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
202        ___E: ::fidl_next::Encoder,
203    {
204        #[inline]
205        fn encode(
206            self,
207            encoder_: &mut ___E,
208            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoEchoStringRequest<'static>>,
209            _: (),
210        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
211            ::fidl_next::munge! {
212                let crate::wire::EchoEchoStringRequest {
213                    value,
214
215                } = out_;
216            }
217
218            ::fidl_next::Encode::encode(&self.value, encoder_, value, 32)?;
219
220            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
221            ::fidl_next::Constrained::validate(_field, 32)?;
222
223            Ok(())
224        }
225    }
226
227    unsafe impl<___E>
228        ::fidl_next::EncodeOption<
229            ::fidl_next::wire::Box<'static, crate::wire::EchoEchoStringRequest<'static>>,
230            ___E,
231        > for EchoEchoStringRequest
232    where
233        ___E: ::fidl_next::Encoder + ?Sized,
234        EchoEchoStringRequest:
235            ::fidl_next::Encode<crate::wire::EchoEchoStringRequest<'static>, ___E>,
236    {
237        #[inline]
238        fn encode_option(
239            this: ::core::option::Option<Self>,
240            encoder: &mut ___E,
241            out: &mut ::core::mem::MaybeUninit<
242                ::fidl_next::wire::Box<'static, crate::wire::EchoEchoStringRequest<'static>>,
243            >,
244            _: (),
245        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
246            if let Some(inner) = this {
247                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
248                ::fidl_next::wire::Box::encode_present(out);
249            } else {
250                ::fidl_next::wire::Box::encode_absent(out);
251            }
252
253            Ok(())
254        }
255    }
256
257    unsafe impl<'a, ___E>
258        ::fidl_next::EncodeOption<
259            ::fidl_next::wire::Box<'static, crate::wire::EchoEchoStringRequest<'static>>,
260            ___E,
261        > for &'a EchoEchoStringRequest
262    where
263        ___E: ::fidl_next::Encoder + ?Sized,
264        &'a EchoEchoStringRequest:
265            ::fidl_next::Encode<crate::wire::EchoEchoStringRequest<'static>, ___E>,
266    {
267        #[inline]
268        fn encode_option(
269            this: ::core::option::Option<Self>,
270            encoder: &mut ___E,
271            out: &mut ::core::mem::MaybeUninit<
272                ::fidl_next::wire::Box<'static, crate::wire::EchoEchoStringRequest<'static>>,
273            >,
274            _: (),
275        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
276            if let Some(inner) = this {
277                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
278                ::fidl_next::wire::Box::encode_present(out);
279            } else {
280                ::fidl_next::wire::Box::encode_absent(out);
281            }
282
283            Ok(())
284        }
285    }
286
287    impl<'de> ::fidl_next::FromWire<crate::wire::EchoEchoStringRequest<'de>> for EchoEchoStringRequest {
288        #[inline]
289        fn from_wire(wire: crate::wire::EchoEchoStringRequest<'de>) -> Self {
290            Self { value: ::fidl_next::FromWire::from_wire(wire.value) }
291        }
292    }
293
294    impl<'de> ::fidl_next::FromWireRef<crate::wire::EchoEchoStringRequest<'de>>
295        for EchoEchoStringRequest
296    {
297        #[inline]
298        fn from_wire_ref(wire: &crate::wire::EchoEchoStringRequest<'de>) -> Self {
299            Self { value: ::fidl_next::FromWireRef::from_wire_ref(&wire.value) }
300        }
301    }
302
303    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
304    pub struct EchoEchoStringResponse {
305        pub response: ::std::string::String,
306    }
307
308    unsafe impl<___E> ::fidl_next::Encode<crate::wire::EchoEchoStringResponse<'static>, ___E>
309        for EchoEchoStringResponse
310    where
311        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
312        ___E: ::fidl_next::Encoder,
313    {
314        #[inline]
315        fn encode(
316            self,
317            encoder_: &mut ___E,
318            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoEchoStringResponse<'static>>,
319            _: (),
320        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
321            ::fidl_next::munge! {
322                let crate::wire::EchoEchoStringResponse {
323                    response,
324
325                } = out_;
326            }
327
328            ::fidl_next::Encode::encode(self.response, encoder_, response, 32)?;
329
330            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
331            ::fidl_next::Constrained::validate(_field, 32)?;
332
333            Ok(())
334        }
335    }
336
337    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::EchoEchoStringResponse<'static>, ___E>
338        for &'a EchoEchoStringResponse
339    where
340        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
341        ___E: ::fidl_next::Encoder,
342    {
343        #[inline]
344        fn encode(
345            self,
346            encoder_: &mut ___E,
347            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoEchoStringResponse<'static>>,
348            _: (),
349        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
350            ::fidl_next::munge! {
351                let crate::wire::EchoEchoStringResponse {
352                    response,
353
354                } = out_;
355            }
356
357            ::fidl_next::Encode::encode(&self.response, encoder_, response, 32)?;
358
359            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
360            ::fidl_next::Constrained::validate(_field, 32)?;
361
362            Ok(())
363        }
364    }
365
366    unsafe impl<___E>
367        ::fidl_next::EncodeOption<
368            ::fidl_next::wire::Box<'static, crate::wire::EchoEchoStringResponse<'static>>,
369            ___E,
370        > for EchoEchoStringResponse
371    where
372        ___E: ::fidl_next::Encoder + ?Sized,
373        EchoEchoStringResponse:
374            ::fidl_next::Encode<crate::wire::EchoEchoStringResponse<'static>, ___E>,
375    {
376        #[inline]
377        fn encode_option(
378            this: ::core::option::Option<Self>,
379            encoder: &mut ___E,
380            out: &mut ::core::mem::MaybeUninit<
381                ::fidl_next::wire::Box<'static, crate::wire::EchoEchoStringResponse<'static>>,
382            >,
383            _: (),
384        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
385            if let Some(inner) = this {
386                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
387                ::fidl_next::wire::Box::encode_present(out);
388            } else {
389                ::fidl_next::wire::Box::encode_absent(out);
390            }
391
392            Ok(())
393        }
394    }
395
396    unsafe impl<'a, ___E>
397        ::fidl_next::EncodeOption<
398            ::fidl_next::wire::Box<'static, crate::wire::EchoEchoStringResponse<'static>>,
399            ___E,
400        > for &'a EchoEchoStringResponse
401    where
402        ___E: ::fidl_next::Encoder + ?Sized,
403        &'a EchoEchoStringResponse:
404            ::fidl_next::Encode<crate::wire::EchoEchoStringResponse<'static>, ___E>,
405    {
406        #[inline]
407        fn encode_option(
408            this: ::core::option::Option<Self>,
409            encoder: &mut ___E,
410            out: &mut ::core::mem::MaybeUninit<
411                ::fidl_next::wire::Box<'static, crate::wire::EchoEchoStringResponse<'static>>,
412            >,
413            _: (),
414        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
415            if let Some(inner) = this {
416                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
417                ::fidl_next::wire::Box::encode_present(out);
418            } else {
419                ::fidl_next::wire::Box::encode_absent(out);
420            }
421
422            Ok(())
423        }
424    }
425
426    impl<'de> ::fidl_next::FromWire<crate::wire::EchoEchoStringResponse<'de>>
427        for EchoEchoStringResponse
428    {
429        #[inline]
430        fn from_wire(wire: crate::wire::EchoEchoStringResponse<'de>) -> Self {
431            Self { response: ::fidl_next::FromWire::from_wire(wire.response) }
432        }
433    }
434
435    impl<'de> ::fidl_next::FromWireRef<crate::wire::EchoEchoStringResponse<'de>>
436        for EchoEchoStringResponse
437    {
438        #[inline]
439        fn from_wire_ref(wire: &crate::wire::EchoEchoStringResponse<'de>) -> Self {
440            Self { response: ::fidl_next::FromWireRef::from_wire_ref(&wire.response) }
441        }
442    }
443
444    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
445    pub struct EchoSendStringRequest {
446        pub value: ::std::string::String,
447    }
448
449    unsafe impl<___E> ::fidl_next::Encode<crate::wire::EchoSendStringRequest<'static>, ___E>
450        for EchoSendStringRequest
451    where
452        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
453        ___E: ::fidl_next::Encoder,
454    {
455        #[inline]
456        fn encode(
457            self,
458            encoder_: &mut ___E,
459            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoSendStringRequest<'static>>,
460            _: (),
461        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
462            ::fidl_next::munge! {
463                let crate::wire::EchoSendStringRequest {
464                    value,
465
466                } = out_;
467            }
468
469            ::fidl_next::Encode::encode(self.value, encoder_, value, 32)?;
470
471            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
472            ::fidl_next::Constrained::validate(_field, 32)?;
473
474            Ok(())
475        }
476    }
477
478    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::EchoSendStringRequest<'static>, ___E>
479        for &'a EchoSendStringRequest
480    where
481        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
482        ___E: ::fidl_next::Encoder,
483    {
484        #[inline]
485        fn encode(
486            self,
487            encoder_: &mut ___E,
488            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoSendStringRequest<'static>>,
489            _: (),
490        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
491            ::fidl_next::munge! {
492                let crate::wire::EchoSendStringRequest {
493                    value,
494
495                } = out_;
496            }
497
498            ::fidl_next::Encode::encode(&self.value, encoder_, value, 32)?;
499
500            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
501            ::fidl_next::Constrained::validate(_field, 32)?;
502
503            Ok(())
504        }
505    }
506
507    unsafe impl<___E>
508        ::fidl_next::EncodeOption<
509            ::fidl_next::wire::Box<'static, crate::wire::EchoSendStringRequest<'static>>,
510            ___E,
511        > for EchoSendStringRequest
512    where
513        ___E: ::fidl_next::Encoder + ?Sized,
514        EchoSendStringRequest:
515            ::fidl_next::Encode<crate::wire::EchoSendStringRequest<'static>, ___E>,
516    {
517        #[inline]
518        fn encode_option(
519            this: ::core::option::Option<Self>,
520            encoder: &mut ___E,
521            out: &mut ::core::mem::MaybeUninit<
522                ::fidl_next::wire::Box<'static, crate::wire::EchoSendStringRequest<'static>>,
523            >,
524            _: (),
525        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
526            if let Some(inner) = this {
527                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
528                ::fidl_next::wire::Box::encode_present(out);
529            } else {
530                ::fidl_next::wire::Box::encode_absent(out);
531            }
532
533            Ok(())
534        }
535    }
536
537    unsafe impl<'a, ___E>
538        ::fidl_next::EncodeOption<
539            ::fidl_next::wire::Box<'static, crate::wire::EchoSendStringRequest<'static>>,
540            ___E,
541        > for &'a EchoSendStringRequest
542    where
543        ___E: ::fidl_next::Encoder + ?Sized,
544        &'a EchoSendStringRequest:
545            ::fidl_next::Encode<crate::wire::EchoSendStringRequest<'static>, ___E>,
546    {
547        #[inline]
548        fn encode_option(
549            this: ::core::option::Option<Self>,
550            encoder: &mut ___E,
551            out: &mut ::core::mem::MaybeUninit<
552                ::fidl_next::wire::Box<'static, crate::wire::EchoSendStringRequest<'static>>,
553            >,
554            _: (),
555        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
556            if let Some(inner) = this {
557                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
558                ::fidl_next::wire::Box::encode_present(out);
559            } else {
560                ::fidl_next::wire::Box::encode_absent(out);
561            }
562
563            Ok(())
564        }
565    }
566
567    impl<'de> ::fidl_next::FromWire<crate::wire::EchoSendStringRequest<'de>> for EchoSendStringRequest {
568        #[inline]
569        fn from_wire(wire: crate::wire::EchoSendStringRequest<'de>) -> Self {
570            Self { value: ::fidl_next::FromWire::from_wire(wire.value) }
571        }
572    }
573
574    impl<'de> ::fidl_next::FromWireRef<crate::wire::EchoSendStringRequest<'de>>
575        for EchoSendStringRequest
576    {
577        #[inline]
578        fn from_wire_ref(wire: &crate::wire::EchoSendStringRequest<'de>) -> Self {
579            Self { value: ::fidl_next::FromWireRef::from_wire_ref(&wire.value) }
580        }
581    }
582
583    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
584    pub struct EchoOnStringRequest {
585        pub response: ::std::string::String,
586    }
587
588    unsafe impl<___E> ::fidl_next::Encode<crate::wire::EchoOnStringRequest<'static>, ___E>
589        for EchoOnStringRequest
590    where
591        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
592        ___E: ::fidl_next::Encoder,
593    {
594        #[inline]
595        fn encode(
596            self,
597            encoder_: &mut ___E,
598            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoOnStringRequest<'static>>,
599            _: (),
600        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
601            ::fidl_next::munge! {
602                let crate::wire::EchoOnStringRequest {
603                    response,
604
605                } = out_;
606            }
607
608            ::fidl_next::Encode::encode(self.response, encoder_, response, 32)?;
609
610            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
611            ::fidl_next::Constrained::validate(_field, 32)?;
612
613            Ok(())
614        }
615    }
616
617    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::EchoOnStringRequest<'static>, ___E>
618        for &'a EchoOnStringRequest
619    where
620        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
621        ___E: ::fidl_next::Encoder,
622    {
623        #[inline]
624        fn encode(
625            self,
626            encoder_: &mut ___E,
627            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoOnStringRequest<'static>>,
628            _: (),
629        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
630            ::fidl_next::munge! {
631                let crate::wire::EchoOnStringRequest {
632                    response,
633
634                } = out_;
635            }
636
637            ::fidl_next::Encode::encode(&self.response, encoder_, response, 32)?;
638
639            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
640            ::fidl_next::Constrained::validate(_field, 32)?;
641
642            Ok(())
643        }
644    }
645
646    unsafe impl<___E>
647        ::fidl_next::EncodeOption<
648            ::fidl_next::wire::Box<'static, crate::wire::EchoOnStringRequest<'static>>,
649            ___E,
650        > for EchoOnStringRequest
651    where
652        ___E: ::fidl_next::Encoder + ?Sized,
653        EchoOnStringRequest: ::fidl_next::Encode<crate::wire::EchoOnStringRequest<'static>, ___E>,
654    {
655        #[inline]
656        fn encode_option(
657            this: ::core::option::Option<Self>,
658            encoder: &mut ___E,
659            out: &mut ::core::mem::MaybeUninit<
660                ::fidl_next::wire::Box<'static, crate::wire::EchoOnStringRequest<'static>>,
661            >,
662            _: (),
663        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
664            if let Some(inner) = this {
665                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
666                ::fidl_next::wire::Box::encode_present(out);
667            } else {
668                ::fidl_next::wire::Box::encode_absent(out);
669            }
670
671            Ok(())
672        }
673    }
674
675    unsafe impl<'a, ___E>
676        ::fidl_next::EncodeOption<
677            ::fidl_next::wire::Box<'static, crate::wire::EchoOnStringRequest<'static>>,
678            ___E,
679        > for &'a EchoOnStringRequest
680    where
681        ___E: ::fidl_next::Encoder + ?Sized,
682        &'a EchoOnStringRequest:
683            ::fidl_next::Encode<crate::wire::EchoOnStringRequest<'static>, ___E>,
684    {
685        #[inline]
686        fn encode_option(
687            this: ::core::option::Option<Self>,
688            encoder: &mut ___E,
689            out: &mut ::core::mem::MaybeUninit<
690                ::fidl_next::wire::Box<'static, crate::wire::EchoOnStringRequest<'static>>,
691            >,
692            _: (),
693        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
694            if let Some(inner) = this {
695                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
696                ::fidl_next::wire::Box::encode_present(out);
697            } else {
698                ::fidl_next::wire::Box::encode_absent(out);
699            }
700
701            Ok(())
702        }
703    }
704
705    impl<'de> ::fidl_next::FromWire<crate::wire::EchoOnStringRequest<'de>> for EchoOnStringRequest {
706        #[inline]
707        fn from_wire(wire: crate::wire::EchoOnStringRequest<'de>) -> Self {
708            Self { response: ::fidl_next::FromWire::from_wire(wire.response) }
709        }
710    }
711
712    impl<'de> ::fidl_next::FromWireRef<crate::wire::EchoOnStringRequest<'de>> for EchoOnStringRequest {
713        #[inline]
714        fn from_wire_ref(wire: &crate::wire::EchoOnStringRequest<'de>) -> Self {
715            Self { response: ::fidl_next::FromWireRef::from_wire_ref(&wire.response) }
716        }
717    }
718
719    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
720    pub struct EchoLauncherGetEchoRequest {
721        pub echo_prefix: ::std::string::String,
722    }
723
724    unsafe impl<___E> ::fidl_next::Encode<crate::wire::EchoLauncherGetEchoRequest<'static>, ___E>
725        for EchoLauncherGetEchoRequest
726    where
727        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
728        ___E: ::fidl_next::Encoder,
729    {
730        #[inline]
731        fn encode(
732            self,
733            encoder_: &mut ___E,
734            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoLauncherGetEchoRequest<'static>>,
735            _: (),
736        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
737            ::fidl_next::munge! {
738                let crate::wire::EchoLauncherGetEchoRequest {
739                    echo_prefix,
740
741                } = out_;
742            }
743
744            ::fidl_next::Encode::encode(self.echo_prefix, encoder_, echo_prefix, 32)?;
745
746            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(echo_prefix.as_mut_ptr()) };
747            ::fidl_next::Constrained::validate(_field, 32)?;
748
749            Ok(())
750        }
751    }
752
753    unsafe impl<'a, ___E>
754        ::fidl_next::Encode<crate::wire::EchoLauncherGetEchoRequest<'static>, ___E>
755        for &'a EchoLauncherGetEchoRequest
756    where
757        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
758        ___E: ::fidl_next::Encoder,
759    {
760        #[inline]
761        fn encode(
762            self,
763            encoder_: &mut ___E,
764            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoLauncherGetEchoRequest<'static>>,
765            _: (),
766        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
767            ::fidl_next::munge! {
768                let crate::wire::EchoLauncherGetEchoRequest {
769                    echo_prefix,
770
771                } = out_;
772            }
773
774            ::fidl_next::Encode::encode(&self.echo_prefix, encoder_, echo_prefix, 32)?;
775
776            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(echo_prefix.as_mut_ptr()) };
777            ::fidl_next::Constrained::validate(_field, 32)?;
778
779            Ok(())
780        }
781    }
782
783    unsafe impl<___E>
784        ::fidl_next::EncodeOption<
785            ::fidl_next::wire::Box<'static, crate::wire::EchoLauncherGetEchoRequest<'static>>,
786            ___E,
787        > for EchoLauncherGetEchoRequest
788    where
789        ___E: ::fidl_next::Encoder + ?Sized,
790        EchoLauncherGetEchoRequest:
791            ::fidl_next::Encode<crate::wire::EchoLauncherGetEchoRequest<'static>, ___E>,
792    {
793        #[inline]
794        fn encode_option(
795            this: ::core::option::Option<Self>,
796            encoder: &mut ___E,
797            out: &mut ::core::mem::MaybeUninit<
798                ::fidl_next::wire::Box<'static, crate::wire::EchoLauncherGetEchoRequest<'static>>,
799            >,
800            _: (),
801        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
802            if let Some(inner) = this {
803                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
804                ::fidl_next::wire::Box::encode_present(out);
805            } else {
806                ::fidl_next::wire::Box::encode_absent(out);
807            }
808
809            Ok(())
810        }
811    }
812
813    unsafe impl<'a, ___E>
814        ::fidl_next::EncodeOption<
815            ::fidl_next::wire::Box<'static, crate::wire::EchoLauncherGetEchoRequest<'static>>,
816            ___E,
817        > for &'a EchoLauncherGetEchoRequest
818    where
819        ___E: ::fidl_next::Encoder + ?Sized,
820        &'a EchoLauncherGetEchoRequest:
821            ::fidl_next::Encode<crate::wire::EchoLauncherGetEchoRequest<'static>, ___E>,
822    {
823        #[inline]
824        fn encode_option(
825            this: ::core::option::Option<Self>,
826            encoder: &mut ___E,
827            out: &mut ::core::mem::MaybeUninit<
828                ::fidl_next::wire::Box<'static, crate::wire::EchoLauncherGetEchoRequest<'static>>,
829            >,
830            _: (),
831        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
832            if let Some(inner) = this {
833                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
834                ::fidl_next::wire::Box::encode_present(out);
835            } else {
836                ::fidl_next::wire::Box::encode_absent(out);
837            }
838
839            Ok(())
840        }
841    }
842
843    impl<'de> ::fidl_next::FromWire<crate::wire::EchoLauncherGetEchoRequest<'de>>
844        for EchoLauncherGetEchoRequest
845    {
846        #[inline]
847        fn from_wire(wire: crate::wire::EchoLauncherGetEchoRequest<'de>) -> Self {
848            Self { echo_prefix: ::fidl_next::FromWire::from_wire(wire.echo_prefix) }
849        }
850    }
851
852    impl<'de> ::fidl_next::FromWireRef<crate::wire::EchoLauncherGetEchoRequest<'de>>
853        for EchoLauncherGetEchoRequest
854    {
855        #[inline]
856        fn from_wire_ref(wire: &crate::wire::EchoLauncherGetEchoRequest<'de>) -> Self {
857            Self { echo_prefix: ::fidl_next::FromWireRef::from_wire_ref(&wire.echo_prefix) }
858        }
859    }
860
861    ::fidl_next::bitflags::bitflags! {
862        #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct FileMode: u16 {
863            const READ = 1;
864            const WRITE = 2;
865            const EXECUTE = 4;
866
867        }
868    }
869
870    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileMode, ___E> for FileMode
871    where
872        ___E: ?Sized,
873    {
874        #[inline]
875        fn encode(
876            self,
877            encoder: &mut ___E,
878            out: &mut ::core::mem::MaybeUninit<crate::wire::FileMode>,
879            _: (),
880        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
881            ::fidl_next::Encode::encode(&self, encoder, out, ())
882        }
883    }
884
885    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileMode, ___E> for &'a FileMode
886    where
887        ___E: ?Sized,
888    {
889        #[inline]
890        fn encode(
891            self,
892            _: &mut ___E,
893            out: &mut ::core::mem::MaybeUninit<crate::wire::FileMode>,
894            _: (),
895        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
896            ::fidl_next::munge!(let crate::wire::FileMode { value } = out);
897
898            if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
899                return Err(::fidl_next::EncodeError::InvalidStrictBits);
900            }
901
902            let _ = value.write(::fidl_next::wire::Uint16::from(self.bits()));
903            Ok(())
904        }
905    }
906
907    impl ::core::convert::From<crate::wire::FileMode> for FileMode {
908        fn from(wire: crate::wire::FileMode) -> Self {
909            Self::from_bits_retain(u16::from(wire.value))
910        }
911    }
912
913    impl ::fidl_next::FromWire<crate::wire::FileMode> for FileMode {
914        #[inline]
915        fn from_wire(wire: crate::wire::FileMode) -> Self {
916            Self::from(wire)
917        }
918    }
919
920    impl ::fidl_next::FromWireRef<crate::wire::FileMode> for FileMode {
921        #[inline]
922        fn from_wire_ref(wire: &crate::wire::FileMode) -> Self {
923            Self::from(*wire)
924        }
925    }
926
927    ::fidl_next::bitflags::bitflags! {
928        #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct FlexibleFileMode: u16 {
929            const READ = 1;
930            const WRITE = 2;
931            const EXECUTE = 4;
932            const _ = !0;
933        }
934    }
935
936    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FlexibleFileMode, ___E> for FlexibleFileMode
937    where
938        ___E: ?Sized,
939    {
940        #[inline]
941        fn encode(
942            self,
943            encoder: &mut ___E,
944            out: &mut ::core::mem::MaybeUninit<crate::wire::FlexibleFileMode>,
945            _: (),
946        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
947            ::fidl_next::Encode::encode(&self, encoder, out, ())
948        }
949    }
950
951    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FlexibleFileMode, ___E>
952        for &'a FlexibleFileMode
953    where
954        ___E: ?Sized,
955    {
956        #[inline]
957        fn encode(
958            self,
959            _: &mut ___E,
960            out: &mut ::core::mem::MaybeUninit<crate::wire::FlexibleFileMode>,
961            _: (),
962        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
963            ::fidl_next::munge!(let crate::wire::FlexibleFileMode { value } = out);
964
965            let _ = value.write(::fidl_next::wire::Uint16::from(self.bits()));
966            Ok(())
967        }
968    }
969
970    impl ::core::convert::From<crate::wire::FlexibleFileMode> for FlexibleFileMode {
971        fn from(wire: crate::wire::FlexibleFileMode) -> Self {
972            Self::from_bits_retain(u16::from(wire.value))
973        }
974    }
975
976    impl ::fidl_next::FromWire<crate::wire::FlexibleFileMode> for FlexibleFileMode {
977        #[inline]
978        fn from_wire(wire: crate::wire::FlexibleFileMode) -> Self {
979            Self::from(wire)
980        }
981    }
982
983    impl ::fidl_next::FromWireRef<crate::wire::FlexibleFileMode> for FlexibleFileMode {
984        #[inline]
985        fn from_wire_ref(wire: &crate::wire::FlexibleFileMode) -> Self {
986            Self::from(*wire)
987        }
988    }
989
990    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
991    pub enum FlexibleJsonValue {
992        IntValue(i32),
993
994        StringValue(::std::string::String),
995
996        UnknownOrdinal_(u64),
997    }
998
999    impl FlexibleJsonValue {
1000        pub fn is_unknown(&self) -> bool {
1001            #[allow(unreachable_patterns)]
1002            match self {
1003                Self::UnknownOrdinal_(_) => true,
1004                _ => false,
1005            }
1006        }
1007    }
1008
1009    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FlexibleJsonValue<'static>, ___E>
1010        for FlexibleJsonValue
1011    where
1012        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1013        ___E: ::fidl_next::Encoder,
1014    {
1015        #[inline]
1016        fn encode(
1017            self,
1018            encoder: &mut ___E,
1019            out: &mut ::core::mem::MaybeUninit<crate::wire::FlexibleJsonValue<'static>>,
1020            _: (),
1021        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1022            ::fidl_next::munge!(let crate::wire::FlexibleJsonValue { raw, _phantom: _ } = out);
1023
1024            match self {
1025                Self::IntValue(value) => ::fidl_next::wire::Union::encode_as::<
1026                    ___E,
1027                    ::fidl_next::wire::Int32,
1028                >(value, 1, encoder, raw, ())?,
1029
1030                Self::StringValue(value) => ::fidl_next::wire::Union::encode_as::<
1031                    ___E,
1032                    ::fidl_next::wire::String<'static>,
1033                >(value, 2, encoder, raw, 32)?,
1034
1035                Self::UnknownOrdinal_(ordinal) => {
1036                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1037                }
1038            }
1039
1040            Ok(())
1041        }
1042    }
1043
1044    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FlexibleJsonValue<'static>, ___E>
1045        for &'a FlexibleJsonValue
1046    where
1047        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1048        ___E: ::fidl_next::Encoder,
1049    {
1050        #[inline]
1051        fn encode(
1052            self,
1053            encoder: &mut ___E,
1054            out: &mut ::core::mem::MaybeUninit<crate::wire::FlexibleJsonValue<'static>>,
1055            _: (),
1056        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1057            ::fidl_next::munge!(let crate::wire::FlexibleJsonValue { raw, _phantom: _ } = out);
1058
1059            match self {
1060                FlexibleJsonValue::IntValue(value) => ::fidl_next::wire::Union::encode_as::<
1061                    ___E,
1062                    ::fidl_next::wire::Int32,
1063                >(value, 1, encoder, raw, ())?,
1064
1065                FlexibleJsonValue::StringValue(value) => {
1066                    ::fidl_next::wire::Union::encode_as::<___E, ::fidl_next::wire::String<'static>>(
1067                        value, 2, encoder, raw, 32,
1068                    )?
1069                }
1070
1071                FlexibleJsonValue::UnknownOrdinal_(ordinal) => {
1072                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
1073                }
1074            }
1075
1076            Ok(())
1077        }
1078    }
1079
1080    unsafe impl<___E>
1081        ::fidl_next::EncodeOption<crate::wire_optional::FlexibleJsonValue<'static>, ___E>
1082        for FlexibleJsonValue
1083    where
1084        ___E: ?Sized,
1085        FlexibleJsonValue: ::fidl_next::Encode<crate::wire::FlexibleJsonValue<'static>, ___E>,
1086    {
1087        #[inline]
1088        fn encode_option(
1089            this: ::core::option::Option<Self>,
1090            encoder: &mut ___E,
1091            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::FlexibleJsonValue<'static>>,
1092            _: (),
1093        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1094            ::fidl_next::munge!(let crate::wire_optional::FlexibleJsonValue { raw, _phantom: _ } = &mut *out);
1095
1096            if let Some(inner) = this {
1097                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1098                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1099            } else {
1100                ::fidl_next::wire::Union::encode_absent(raw);
1101            }
1102
1103            Ok(())
1104        }
1105    }
1106
1107    unsafe impl<'a, ___E>
1108        ::fidl_next::EncodeOption<crate::wire_optional::FlexibleJsonValue<'static>, ___E>
1109        for &'a FlexibleJsonValue
1110    where
1111        ___E: ?Sized,
1112        &'a FlexibleJsonValue: ::fidl_next::Encode<crate::wire::FlexibleJsonValue<'static>, ___E>,
1113    {
1114        #[inline]
1115        fn encode_option(
1116            this: ::core::option::Option<Self>,
1117            encoder: &mut ___E,
1118            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::FlexibleJsonValue<'static>>,
1119            _: (),
1120        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1121            ::fidl_next::munge!(let crate::wire_optional::FlexibleJsonValue { raw, _phantom: _ } = &mut *out);
1122
1123            if let Some(inner) = this {
1124                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1125                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1126            } else {
1127                ::fidl_next::wire::Union::encode_absent(raw);
1128            }
1129
1130            Ok(())
1131        }
1132    }
1133
1134    impl<'de> ::fidl_next::FromWire<crate::wire::FlexibleJsonValue<'de>> for FlexibleJsonValue {
1135        #[inline]
1136        fn from_wire(wire: crate::wire::FlexibleJsonValue<'de>) -> Self {
1137            let wire = ::core::mem::ManuallyDrop::new(wire);
1138            match wire.raw.ordinal() {
1139                1 => Self::IntValue(::fidl_next::FromWire::from_wire(unsafe {
1140                    wire.raw.get().read_unchecked::<::fidl_next::wire::Int32>()
1141                })),
1142
1143                2 => Self::StringValue(::fidl_next::FromWire::from_wire(unsafe {
1144                    wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
1145                })),
1146
1147                ord => return Self::UnknownOrdinal_(ord as u64),
1148            }
1149        }
1150    }
1151
1152    impl<'de> ::fidl_next::FromWireRef<crate::wire::FlexibleJsonValue<'de>> for FlexibleJsonValue {
1153        #[inline]
1154        fn from_wire_ref(wire: &crate::wire::FlexibleJsonValue<'de>) -> Self {
1155            match wire.raw.ordinal() {
1156                1 => Self::IntValue(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1157                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Int32>()
1158                })),
1159
1160                2 => Self::StringValue(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1161                    wire.raw.get().deref_unchecked::<::fidl_next::wire::String<'de>>()
1162                })),
1163
1164                ord => return Self::UnknownOrdinal_(ord as u64),
1165            }
1166        }
1167    }
1168
1169    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::FlexibleJsonValue<'de>>
1170        for FlexibleJsonValue
1171    {
1172        #[inline]
1173        fn from_wire_option(
1174            wire: crate::wire_optional::FlexibleJsonValue<'de>,
1175        ) -> ::core::option::Option<Self> {
1176            if let Some(inner) = wire.into_option() {
1177                Some(::fidl_next::FromWire::from_wire(inner))
1178            } else {
1179                None
1180            }
1181        }
1182    }
1183
1184    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::FlexibleJsonValue<'de>>
1185        for Box<FlexibleJsonValue>
1186    {
1187        #[inline]
1188        fn from_wire_option(
1189            wire: crate::wire_optional::FlexibleJsonValue<'de>,
1190        ) -> ::core::option::Option<Self> {
1191            <FlexibleJsonValue as ::fidl_next::FromWireOption<
1192                crate::wire_optional::FlexibleJsonValue<'de>,
1193            >>::from_wire_option(wire)
1194            .map(Box::new)
1195        }
1196    }
1197
1198    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::FlexibleJsonValue<'de>>
1199        for Box<FlexibleJsonValue>
1200    {
1201        #[inline]
1202        fn from_wire_option_ref(
1203            wire: &crate::wire_optional::FlexibleJsonValue<'de>,
1204        ) -> ::core::option::Option<Self> {
1205            if let Some(inner) = wire.as_ref() {
1206                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
1207            } else {
1208                None
1209            }
1210        }
1211    }
1212
1213    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1214    #[repr(u32)]
1215    pub enum FlexibleLocationType {
1216        Museum = 1,
1217        Airport = 2,
1218        Restaurant = 3,
1219        UnknownOrdinal_(u32) = 4,
1220    }
1221    impl ::std::convert::From<u32> for FlexibleLocationType {
1222        fn from(value: u32) -> Self {
1223            match value {
1224                1 => Self::Museum,
1225                2 => Self::Airport,
1226                3 => Self::Restaurant,
1227
1228                _ => Self::UnknownOrdinal_(value),
1229            }
1230        }
1231    }
1232
1233    impl ::std::convert::From<FlexibleLocationType> for u32 {
1234        fn from(value: FlexibleLocationType) -> Self {
1235            match value {
1236                FlexibleLocationType::Museum => 1,
1237                FlexibleLocationType::Airport => 2,
1238                FlexibleLocationType::Restaurant => 3,
1239
1240                FlexibleLocationType::UnknownOrdinal_(value) => value,
1241            }
1242        }
1243    }
1244
1245    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FlexibleLocationType, ___E>
1246        for FlexibleLocationType
1247    where
1248        ___E: ?Sized,
1249    {
1250        #[inline]
1251        fn encode(
1252            self,
1253            encoder: &mut ___E,
1254            out: &mut ::core::mem::MaybeUninit<crate::wire::FlexibleLocationType>,
1255            _: (),
1256        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1257            ::fidl_next::Encode::encode(&self, encoder, out, ())
1258        }
1259    }
1260
1261    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FlexibleLocationType, ___E>
1262        for &'a FlexibleLocationType
1263    where
1264        ___E: ?Sized,
1265    {
1266        #[inline]
1267        fn encode(
1268            self,
1269            encoder: &mut ___E,
1270            out: &mut ::core::mem::MaybeUninit<crate::wire::FlexibleLocationType>,
1271            _: (),
1272        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1273            ::fidl_next::munge!(let crate::wire::FlexibleLocationType { value } = out);
1274            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1275                FlexibleLocationType::Museum => 1,
1276
1277                FlexibleLocationType::Airport => 2,
1278
1279                FlexibleLocationType::Restaurant => 3,
1280
1281                FlexibleLocationType::UnknownOrdinal_(value) => value,
1282            }));
1283
1284            Ok(())
1285        }
1286    }
1287
1288    impl ::core::convert::From<crate::wire::FlexibleLocationType> for FlexibleLocationType {
1289        fn from(wire: crate::wire::FlexibleLocationType) -> Self {
1290            match u32::from(wire.value) {
1291                1 => Self::Museum,
1292
1293                2 => Self::Airport,
1294
1295                3 => Self::Restaurant,
1296
1297                value => Self::UnknownOrdinal_(value),
1298            }
1299        }
1300    }
1301
1302    impl ::fidl_next::FromWire<crate::wire::FlexibleLocationType> for FlexibleLocationType {
1303        #[inline]
1304        fn from_wire(wire: crate::wire::FlexibleLocationType) -> Self {
1305            Self::from(wire)
1306        }
1307    }
1308
1309    impl ::fidl_next::FromWireRef<crate::wire::FlexibleLocationType> for FlexibleLocationType {
1310        #[inline]
1311        fn from_wire_ref(wire: &crate::wire::FlexibleLocationType) -> Self {
1312            Self::from(*wire)
1313        }
1314    }
1315
1316    pub type GameState = ();
1317
1318    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1319    pub enum JsonValue {
1320        IntValue(i32),
1321
1322        StringValue(::std::string::String),
1323    }
1324
1325    unsafe impl<___E> ::fidl_next::Encode<crate::wire::JsonValue<'static>, ___E> for JsonValue
1326    where
1327        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1328        ___E: ::fidl_next::Encoder,
1329    {
1330        #[inline]
1331        fn encode(
1332            self,
1333            encoder: &mut ___E,
1334            out: &mut ::core::mem::MaybeUninit<crate::wire::JsonValue<'static>>,
1335            _: (),
1336        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1337            ::fidl_next::munge!(let crate::wire::JsonValue { raw, _phantom: _ } = out);
1338
1339            match self {
1340                Self::IntValue(value) => ::fidl_next::wire::Union::encode_as::<
1341                    ___E,
1342                    ::fidl_next::wire::Int32,
1343                >(value, 1, encoder, raw, ())?,
1344
1345                Self::StringValue(value) => ::fidl_next::wire::Union::encode_as::<
1346                    ___E,
1347                    ::fidl_next::wire::String<'static>,
1348                >(value, 2, encoder, raw, 32)?,
1349            }
1350
1351            Ok(())
1352        }
1353    }
1354
1355    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::JsonValue<'static>, ___E> for &'a JsonValue
1356    where
1357        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1358        ___E: ::fidl_next::Encoder,
1359    {
1360        #[inline]
1361        fn encode(
1362            self,
1363            encoder: &mut ___E,
1364            out: &mut ::core::mem::MaybeUninit<crate::wire::JsonValue<'static>>,
1365            _: (),
1366        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1367            ::fidl_next::munge!(let crate::wire::JsonValue { raw, _phantom: _ } = out);
1368
1369            match self {
1370                JsonValue::IntValue(value) => ::fidl_next::wire::Union::encode_as::<
1371                    ___E,
1372                    ::fidl_next::wire::Int32,
1373                >(value, 1, encoder, raw, ())?,
1374
1375                JsonValue::StringValue(value) => ::fidl_next::wire::Union::encode_as::<
1376                    ___E,
1377                    ::fidl_next::wire::String<'static>,
1378                >(value, 2, encoder, raw, 32)?,
1379            }
1380
1381            Ok(())
1382        }
1383    }
1384
1385    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::JsonValue<'static>, ___E>
1386        for JsonValue
1387    where
1388        ___E: ?Sized,
1389        JsonValue: ::fidl_next::Encode<crate::wire::JsonValue<'static>, ___E>,
1390    {
1391        #[inline]
1392        fn encode_option(
1393            this: ::core::option::Option<Self>,
1394            encoder: &mut ___E,
1395            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::JsonValue<'static>>,
1396            _: (),
1397        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1398            ::fidl_next::munge!(let crate::wire_optional::JsonValue { raw, _phantom: _ } = &mut *out);
1399
1400            if let Some(inner) = this {
1401                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1402                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1403            } else {
1404                ::fidl_next::wire::Union::encode_absent(raw);
1405            }
1406
1407            Ok(())
1408        }
1409    }
1410
1411    unsafe impl<'a, ___E> ::fidl_next::EncodeOption<crate::wire_optional::JsonValue<'static>, ___E>
1412        for &'a JsonValue
1413    where
1414        ___E: ?Sized,
1415        &'a JsonValue: ::fidl_next::Encode<crate::wire::JsonValue<'static>, ___E>,
1416    {
1417        #[inline]
1418        fn encode_option(
1419            this: ::core::option::Option<Self>,
1420            encoder: &mut ___E,
1421            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::JsonValue<'static>>,
1422            _: (),
1423        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1424            ::fidl_next::munge!(let crate::wire_optional::JsonValue { raw, _phantom: _ } = &mut *out);
1425
1426            if let Some(inner) = this {
1427                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1428                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1429            } else {
1430                ::fidl_next::wire::Union::encode_absent(raw);
1431            }
1432
1433            Ok(())
1434        }
1435    }
1436
1437    impl<'de> ::fidl_next::FromWire<crate::wire::JsonValue<'de>> for JsonValue {
1438        #[inline]
1439        fn from_wire(wire: crate::wire::JsonValue<'de>) -> Self {
1440            let wire = ::core::mem::ManuallyDrop::new(wire);
1441            match wire.raw.ordinal() {
1442                1 => Self::IntValue(::fidl_next::FromWire::from_wire(unsafe {
1443                    wire.raw.get().read_unchecked::<::fidl_next::wire::Int32>()
1444                })),
1445
1446                2 => Self::StringValue(::fidl_next::FromWire::from_wire(unsafe {
1447                    wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
1448                })),
1449
1450                _ => unsafe { ::core::hint::unreachable_unchecked() },
1451            }
1452        }
1453    }
1454
1455    impl<'de> ::fidl_next::FromWireRef<crate::wire::JsonValue<'de>> for JsonValue {
1456        #[inline]
1457        fn from_wire_ref(wire: &crate::wire::JsonValue<'de>) -> Self {
1458            match wire.raw.ordinal() {
1459                1 => Self::IntValue(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1460                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Int32>()
1461                })),
1462
1463                2 => Self::StringValue(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1464                    wire.raw.get().deref_unchecked::<::fidl_next::wire::String<'de>>()
1465                })),
1466
1467                _ => unsafe { ::core::hint::unreachable_unchecked() },
1468            }
1469        }
1470    }
1471
1472    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::JsonValue<'de>> for JsonValue {
1473        #[inline]
1474        fn from_wire_option(
1475            wire: crate::wire_optional::JsonValue<'de>,
1476        ) -> ::core::option::Option<Self> {
1477            if let Some(inner) = wire.into_option() {
1478                Some(::fidl_next::FromWire::from_wire(inner))
1479            } else {
1480                None
1481            }
1482        }
1483    }
1484
1485    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::JsonValue<'de>> for Box<JsonValue> {
1486        #[inline]
1487        fn from_wire_option(
1488            wire: crate::wire_optional::JsonValue<'de>,
1489        ) -> ::core::option::Option<Self> {
1490            <
1491            JsonValue as ::fidl_next::FromWireOption<crate::wire_optional::JsonValue<'de>>
1492        >::from_wire_option(wire).map(Box::new)
1493        }
1494    }
1495
1496    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::JsonValue<'de>> for Box<JsonValue> {
1497        #[inline]
1498        fn from_wire_option_ref(
1499            wire: &crate::wire_optional::JsonValue<'de>,
1500        ) -> ::core::option::Option<Self> {
1501            if let Some(inner) = wire.as_ref() {
1502                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
1503            } else {
1504                None
1505            }
1506        }
1507    }
1508
1509    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1510    #[repr(u32)]
1511    pub enum LocationType {
1512        Museum = 1,
1513        Airport = 2,
1514        Restaurant = 3,
1515    }
1516    impl ::core::convert::TryFrom<u32> for LocationType {
1517        type Error = ::fidl_next::UnknownStrictEnumMemberError;
1518        fn try_from(
1519            value: u32,
1520        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1521            match value {
1522                1 => Ok(Self::Museum),
1523                2 => Ok(Self::Airport),
1524                3 => Ok(Self::Restaurant),
1525
1526                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1527            }
1528        }
1529    }
1530
1531    impl ::std::convert::From<LocationType> for u32 {
1532        fn from(value: LocationType) -> Self {
1533            match value {
1534                LocationType::Museum => 1,
1535                LocationType::Airport => 2,
1536                LocationType::Restaurant => 3,
1537            }
1538        }
1539    }
1540
1541    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LocationType, ___E> for LocationType
1542    where
1543        ___E: ?Sized,
1544    {
1545        #[inline]
1546        fn encode(
1547            self,
1548            encoder: &mut ___E,
1549            out: &mut ::core::mem::MaybeUninit<crate::wire::LocationType>,
1550            _: (),
1551        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1552            ::fidl_next::Encode::encode(&self, encoder, out, ())
1553        }
1554    }
1555
1556    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LocationType, ___E> for &'a LocationType
1557    where
1558        ___E: ?Sized,
1559    {
1560        #[inline]
1561        fn encode(
1562            self,
1563            encoder: &mut ___E,
1564            out: &mut ::core::mem::MaybeUninit<crate::wire::LocationType>,
1565            _: (),
1566        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1567            ::fidl_next::munge!(let crate::wire::LocationType { value } = out);
1568            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1569                LocationType::Museum => 1,
1570
1571                LocationType::Airport => 2,
1572
1573                LocationType::Restaurant => 3,
1574            }));
1575
1576            Ok(())
1577        }
1578    }
1579
1580    impl ::core::convert::From<crate::wire::LocationType> for LocationType {
1581        fn from(wire: crate::wire::LocationType) -> Self {
1582            match u32::from(wire.value) {
1583                1 => Self::Museum,
1584
1585                2 => Self::Airport,
1586
1587                3 => Self::Restaurant,
1588
1589                _ => unsafe { ::core::hint::unreachable_unchecked() },
1590            }
1591        }
1592    }
1593
1594    impl ::fidl_next::FromWire<crate::wire::LocationType> for LocationType {
1595        #[inline]
1596        fn from_wire(wire: crate::wire::LocationType) -> Self {
1597            Self::from(wire)
1598        }
1599    }
1600
1601    impl ::fidl_next::FromWireRef<crate::wire::LocationType> for LocationType {
1602        #[inline]
1603        fn from_wire_ref(wire: &crate::wire::LocationType) -> Self {
1604            Self::from(*wire)
1605        }
1606    }
1607
1608    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1609    #[repr(C)]
1610    pub struct TicTacToeStartGameRequest {
1611        pub start_first: bool,
1612    }
1613
1614    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TicTacToeStartGameRequest, ___E>
1615        for TicTacToeStartGameRequest
1616    where
1617        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1618    {
1619        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1620            Self,
1621            crate::wire::TicTacToeStartGameRequest,
1622        > = unsafe {
1623            ::fidl_next::CopyOptimization::enable_if(
1624                true && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled(),
1625            )
1626        };
1627
1628        #[inline]
1629        fn encode(
1630            self,
1631            encoder_: &mut ___E,
1632            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeStartGameRequest>,
1633            _: (),
1634        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1635            ::fidl_next::munge! {
1636                let crate::wire::TicTacToeStartGameRequest {
1637                    start_first,
1638
1639                } = out_;
1640            }
1641
1642            ::fidl_next::Encode::encode(self.start_first, encoder_, start_first, ())?;
1643
1644            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_first.as_mut_ptr()) };
1645
1646            Ok(())
1647        }
1648    }
1649
1650    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TicTacToeStartGameRequest, ___E>
1651        for &'a TicTacToeStartGameRequest
1652    where
1653        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1654    {
1655        #[inline]
1656        fn encode(
1657            self,
1658            encoder_: &mut ___E,
1659            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeStartGameRequest>,
1660            _: (),
1661        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1662            ::fidl_next::munge! {
1663                let crate::wire::TicTacToeStartGameRequest {
1664                    start_first,
1665
1666                } = out_;
1667            }
1668
1669            ::fidl_next::Encode::encode(&self.start_first, encoder_, start_first, ())?;
1670
1671            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_first.as_mut_ptr()) };
1672
1673            Ok(())
1674        }
1675    }
1676
1677    unsafe impl<___E>
1678        ::fidl_next::EncodeOption<
1679            ::fidl_next::wire::Box<'static, crate::wire::TicTacToeStartGameRequest>,
1680            ___E,
1681        > for TicTacToeStartGameRequest
1682    where
1683        ___E: ::fidl_next::Encoder + ?Sized,
1684        TicTacToeStartGameRequest:
1685            ::fidl_next::Encode<crate::wire::TicTacToeStartGameRequest, ___E>,
1686    {
1687        #[inline]
1688        fn encode_option(
1689            this: ::core::option::Option<Self>,
1690            encoder: &mut ___E,
1691            out: &mut ::core::mem::MaybeUninit<
1692                ::fidl_next::wire::Box<'static, crate::wire::TicTacToeStartGameRequest>,
1693            >,
1694            _: (),
1695        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1696            if let Some(inner) = this {
1697                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1698                ::fidl_next::wire::Box::encode_present(out);
1699            } else {
1700                ::fidl_next::wire::Box::encode_absent(out);
1701            }
1702
1703            Ok(())
1704        }
1705    }
1706
1707    unsafe impl<'a, ___E>
1708        ::fidl_next::EncodeOption<
1709            ::fidl_next::wire::Box<'static, crate::wire::TicTacToeStartGameRequest>,
1710            ___E,
1711        > for &'a TicTacToeStartGameRequest
1712    where
1713        ___E: ::fidl_next::Encoder + ?Sized,
1714        &'a TicTacToeStartGameRequest:
1715            ::fidl_next::Encode<crate::wire::TicTacToeStartGameRequest, ___E>,
1716    {
1717        #[inline]
1718        fn encode_option(
1719            this: ::core::option::Option<Self>,
1720            encoder: &mut ___E,
1721            out: &mut ::core::mem::MaybeUninit<
1722                ::fidl_next::wire::Box<'static, crate::wire::TicTacToeStartGameRequest>,
1723            >,
1724            _: (),
1725        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1726            if let Some(inner) = this {
1727                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1728                ::fidl_next::wire::Box::encode_present(out);
1729            } else {
1730                ::fidl_next::wire::Box::encode_absent(out);
1731            }
1732
1733            Ok(())
1734        }
1735    }
1736
1737    impl ::fidl_next::FromWire<crate::wire::TicTacToeStartGameRequest> for TicTacToeStartGameRequest {
1738        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1739            crate::wire::TicTacToeStartGameRequest,
1740            Self,
1741        > = unsafe {
1742            ::fidl_next::CopyOptimization::enable_if(
1743                true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
1744            )
1745        };
1746
1747        #[inline]
1748        fn from_wire(wire: crate::wire::TicTacToeStartGameRequest) -> Self {
1749            Self { start_first: ::fidl_next::FromWire::from_wire(wire.start_first) }
1750        }
1751    }
1752
1753    impl ::fidl_next::FromWireRef<crate::wire::TicTacToeStartGameRequest>
1754        for TicTacToeStartGameRequest
1755    {
1756        #[inline]
1757        fn from_wire_ref(wire: &crate::wire::TicTacToeStartGameRequest) -> Self {
1758            Self { start_first: ::fidl_next::FromWireRef::from_wire_ref(&wire.start_first) }
1759        }
1760    }
1761
1762    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1763    #[repr(C)]
1764    pub struct TicTacToeMakeMoveRequest {
1765        pub row: u8,
1766
1767        pub col: u8,
1768    }
1769
1770    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveRequest, ___E>
1771        for TicTacToeMakeMoveRequest
1772    where
1773        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1774    {
1775        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1776            Self,
1777            crate::wire::TicTacToeMakeMoveRequest,
1778        > = unsafe {
1779            ::fidl_next::CopyOptimization::enable_if(
1780                true && <u8 as ::fidl_next::Encode<u8, ___E>>::COPY_OPTIMIZATION.is_enabled()
1781                    && <u8 as ::fidl_next::Encode<u8, ___E>>::COPY_OPTIMIZATION.is_enabled(),
1782            )
1783        };
1784
1785        #[inline]
1786        fn encode(
1787            self,
1788            encoder_: &mut ___E,
1789            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeMakeMoveRequest>,
1790            _: (),
1791        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1792            ::fidl_next::munge! {
1793                let crate::wire::TicTacToeMakeMoveRequest {
1794                    row,
1795                    col,
1796
1797                } = out_;
1798            }
1799
1800            ::fidl_next::Encode::encode(self.row, encoder_, row, ())?;
1801
1802            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(row.as_mut_ptr()) };
1803
1804            ::fidl_next::Encode::encode(self.col, encoder_, col, ())?;
1805
1806            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(col.as_mut_ptr()) };
1807
1808            Ok(())
1809        }
1810    }
1811
1812    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveRequest, ___E>
1813        for &'a TicTacToeMakeMoveRequest
1814    where
1815        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1816    {
1817        #[inline]
1818        fn encode(
1819            self,
1820            encoder_: &mut ___E,
1821            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeMakeMoveRequest>,
1822            _: (),
1823        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1824            ::fidl_next::munge! {
1825                let crate::wire::TicTacToeMakeMoveRequest {
1826                    row,
1827                    col,
1828
1829                } = out_;
1830            }
1831
1832            ::fidl_next::Encode::encode(&self.row, encoder_, row, ())?;
1833
1834            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(row.as_mut_ptr()) };
1835
1836            ::fidl_next::Encode::encode(&self.col, encoder_, col, ())?;
1837
1838            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(col.as_mut_ptr()) };
1839
1840            Ok(())
1841        }
1842    }
1843
1844    unsafe impl<___E>
1845        ::fidl_next::EncodeOption<
1846            ::fidl_next::wire::Box<'static, crate::wire::TicTacToeMakeMoveRequest>,
1847            ___E,
1848        > for TicTacToeMakeMoveRequest
1849    where
1850        ___E: ::fidl_next::Encoder + ?Sized,
1851        TicTacToeMakeMoveRequest: ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveRequest, ___E>,
1852    {
1853        #[inline]
1854        fn encode_option(
1855            this: ::core::option::Option<Self>,
1856            encoder: &mut ___E,
1857            out: &mut ::core::mem::MaybeUninit<
1858                ::fidl_next::wire::Box<'static, crate::wire::TicTacToeMakeMoveRequest>,
1859            >,
1860            _: (),
1861        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1862            if let Some(inner) = this {
1863                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1864                ::fidl_next::wire::Box::encode_present(out);
1865            } else {
1866                ::fidl_next::wire::Box::encode_absent(out);
1867            }
1868
1869            Ok(())
1870        }
1871    }
1872
1873    unsafe impl<'a, ___E>
1874        ::fidl_next::EncodeOption<
1875            ::fidl_next::wire::Box<'static, crate::wire::TicTacToeMakeMoveRequest>,
1876            ___E,
1877        > for &'a TicTacToeMakeMoveRequest
1878    where
1879        ___E: ::fidl_next::Encoder + ?Sized,
1880        &'a TicTacToeMakeMoveRequest:
1881            ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveRequest, ___E>,
1882    {
1883        #[inline]
1884        fn encode_option(
1885            this: ::core::option::Option<Self>,
1886            encoder: &mut ___E,
1887            out: &mut ::core::mem::MaybeUninit<
1888                ::fidl_next::wire::Box<'static, crate::wire::TicTacToeMakeMoveRequest>,
1889            >,
1890            _: (),
1891        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1892            if let Some(inner) = this {
1893                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1894                ::fidl_next::wire::Box::encode_present(out);
1895            } else {
1896                ::fidl_next::wire::Box::encode_absent(out);
1897            }
1898
1899            Ok(())
1900        }
1901    }
1902
1903    impl ::fidl_next::FromWire<crate::wire::TicTacToeMakeMoveRequest> for TicTacToeMakeMoveRequest {
1904        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1905            crate::wire::TicTacToeMakeMoveRequest,
1906            Self,
1907        > = unsafe {
1908            ::fidl_next::CopyOptimization::enable_if(
1909                true && <u8 as ::fidl_next::FromWire<u8>>::COPY_OPTIMIZATION.is_enabled()
1910                    && <u8 as ::fidl_next::FromWire<u8>>::COPY_OPTIMIZATION.is_enabled(),
1911            )
1912        };
1913
1914        #[inline]
1915        fn from_wire(wire: crate::wire::TicTacToeMakeMoveRequest) -> Self {
1916            Self {
1917                row: ::fidl_next::FromWire::from_wire(wire.row),
1918
1919                col: ::fidl_next::FromWire::from_wire(wire.col),
1920            }
1921        }
1922    }
1923
1924    impl ::fidl_next::FromWireRef<crate::wire::TicTacToeMakeMoveRequest> for TicTacToeMakeMoveRequest {
1925        #[inline]
1926        fn from_wire_ref(wire: &crate::wire::TicTacToeMakeMoveRequest) -> Self {
1927            Self {
1928                row: ::fidl_next::FromWireRef::from_wire_ref(&wire.row),
1929
1930                col: ::fidl_next::FromWireRef::from_wire_ref(&wire.col),
1931            }
1932        }
1933    }
1934
1935    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1936    pub struct TicTacToeMakeMoveResponse {
1937        pub success: bool,
1938
1939        pub new_state: ::core::option::Option<::std::boxed::Box<crate::natural::GameState>>,
1940    }
1941
1942    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveResponse<'static>, ___E>
1943        for TicTacToeMakeMoveResponse
1944    where
1945        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1946        ___E: ::fidl_next::Encoder,
1947    {
1948        #[inline]
1949        fn encode(
1950            self,
1951            encoder_: &mut ___E,
1952            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeMakeMoveResponse<'static>>,
1953            _: (),
1954        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1955            ::fidl_next::munge! {
1956                let crate::wire::TicTacToeMakeMoveResponse {
1957                    success,
1958                    new_state,
1959
1960                } = out_;
1961            }
1962
1963            ::fidl_next::Encode::encode(self.success, encoder_, success, ())?;
1964
1965            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(success.as_mut_ptr()) };
1966
1967            ::fidl_next::Encode::encode(self.new_state, encoder_, new_state, ())?;
1968
1969            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(new_state.as_mut_ptr()) };
1970
1971            Ok(())
1972        }
1973    }
1974
1975    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveResponse<'static>, ___E>
1976        for &'a TicTacToeMakeMoveResponse
1977    where
1978        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1979        ___E: ::fidl_next::Encoder,
1980    {
1981        #[inline]
1982        fn encode(
1983            self,
1984            encoder_: &mut ___E,
1985            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeMakeMoveResponse<'static>>,
1986            _: (),
1987        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1988            ::fidl_next::munge! {
1989                let crate::wire::TicTacToeMakeMoveResponse {
1990                    success,
1991                    new_state,
1992
1993                } = out_;
1994            }
1995
1996            ::fidl_next::Encode::encode(&self.success, encoder_, success, ())?;
1997
1998            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(success.as_mut_ptr()) };
1999
2000            ::fidl_next::Encode::encode(&self.new_state, encoder_, new_state, ())?;
2001
2002            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(new_state.as_mut_ptr()) };
2003
2004            Ok(())
2005        }
2006    }
2007
2008    unsafe impl<___E>
2009        ::fidl_next::EncodeOption<
2010            ::fidl_next::wire::Box<'static, crate::wire::TicTacToeMakeMoveResponse<'static>>,
2011            ___E,
2012        > for TicTacToeMakeMoveResponse
2013    where
2014        ___E: ::fidl_next::Encoder + ?Sized,
2015        TicTacToeMakeMoveResponse:
2016            ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveResponse<'static>, ___E>,
2017    {
2018        #[inline]
2019        fn encode_option(
2020            this: ::core::option::Option<Self>,
2021            encoder: &mut ___E,
2022            out: &mut ::core::mem::MaybeUninit<
2023                ::fidl_next::wire::Box<'static, crate::wire::TicTacToeMakeMoveResponse<'static>>,
2024            >,
2025            _: (),
2026        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2027            if let Some(inner) = this {
2028                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2029                ::fidl_next::wire::Box::encode_present(out);
2030            } else {
2031                ::fidl_next::wire::Box::encode_absent(out);
2032            }
2033
2034            Ok(())
2035        }
2036    }
2037
2038    unsafe impl<'a, ___E>
2039        ::fidl_next::EncodeOption<
2040            ::fidl_next::wire::Box<'static, crate::wire::TicTacToeMakeMoveResponse<'static>>,
2041            ___E,
2042        > for &'a TicTacToeMakeMoveResponse
2043    where
2044        ___E: ::fidl_next::Encoder + ?Sized,
2045        &'a TicTacToeMakeMoveResponse:
2046            ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveResponse<'static>, ___E>,
2047    {
2048        #[inline]
2049        fn encode_option(
2050            this: ::core::option::Option<Self>,
2051            encoder: &mut ___E,
2052            out: &mut ::core::mem::MaybeUninit<
2053                ::fidl_next::wire::Box<'static, crate::wire::TicTacToeMakeMoveResponse<'static>>,
2054            >,
2055            _: (),
2056        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2057            if let Some(inner) = this {
2058                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2059                ::fidl_next::wire::Box::encode_present(out);
2060            } else {
2061                ::fidl_next::wire::Box::encode_absent(out);
2062            }
2063
2064            Ok(())
2065        }
2066    }
2067
2068    impl<'de> ::fidl_next::FromWire<crate::wire::TicTacToeMakeMoveResponse<'de>>
2069        for TicTacToeMakeMoveResponse
2070    {
2071        #[inline]
2072        fn from_wire(wire: crate::wire::TicTacToeMakeMoveResponse<'de>) -> Self {
2073            Self {
2074                success: ::fidl_next::FromWire::from_wire(wire.success),
2075
2076                new_state: ::fidl_next::FromWire::from_wire(wire.new_state),
2077            }
2078        }
2079    }
2080
2081    impl<'de> ::fidl_next::FromWireRef<crate::wire::TicTacToeMakeMoveResponse<'de>>
2082        for TicTacToeMakeMoveResponse
2083    {
2084        #[inline]
2085        fn from_wire_ref(wire: &crate::wire::TicTacToeMakeMoveResponse<'de>) -> Self {
2086            Self {
2087                success: ::fidl_next::FromWireRef::from_wire_ref(&wire.success),
2088
2089                new_state: ::fidl_next::FromWireRef::from_wire_ref(&wire.new_state),
2090            }
2091        }
2092    }
2093
2094    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2095    #[repr(C)]
2096    pub struct TicTacToeOnOpponentMoveRequest {
2097        pub new_state: crate::natural::GameState,
2098    }
2099
2100    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TicTacToeOnOpponentMoveRequest, ___E>
2101        for TicTacToeOnOpponentMoveRequest
2102    where
2103        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2104    {
2105        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2106            Self,
2107            crate::wire::TicTacToeOnOpponentMoveRequest,
2108        > = unsafe {
2109            ::fidl_next::CopyOptimization::enable_if(
2110                true && <crate::natural::GameState as ::fidl_next::Encode<
2111                    crate::wire::GameState,
2112                    ___E,
2113                >>::COPY_OPTIMIZATION
2114                    .is_enabled(),
2115            )
2116        };
2117
2118        #[inline]
2119        fn encode(
2120            self,
2121            encoder_: &mut ___E,
2122            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeOnOpponentMoveRequest>,
2123            _: (),
2124        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2125            ::fidl_next::munge! {
2126                let crate::wire::TicTacToeOnOpponentMoveRequest {
2127                    new_state,
2128
2129                } = out_;
2130            }
2131
2132            ::fidl_next::Encode::encode(self.new_state, encoder_, new_state, ())?;
2133
2134            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(new_state.as_mut_ptr()) };
2135
2136            Ok(())
2137        }
2138    }
2139
2140    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TicTacToeOnOpponentMoveRequest, ___E>
2141        for &'a TicTacToeOnOpponentMoveRequest
2142    where
2143        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2144    {
2145        #[inline]
2146        fn encode(
2147            self,
2148            encoder_: &mut ___E,
2149            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeOnOpponentMoveRequest>,
2150            _: (),
2151        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2152            ::fidl_next::munge! {
2153                let crate::wire::TicTacToeOnOpponentMoveRequest {
2154                    new_state,
2155
2156                } = out_;
2157            }
2158
2159            ::fidl_next::Encode::encode(&self.new_state, encoder_, new_state, ())?;
2160
2161            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(new_state.as_mut_ptr()) };
2162
2163            Ok(())
2164        }
2165    }
2166
2167    unsafe impl<___E>
2168        ::fidl_next::EncodeOption<
2169            ::fidl_next::wire::Box<'static, crate::wire::TicTacToeOnOpponentMoveRequest>,
2170            ___E,
2171        > for TicTacToeOnOpponentMoveRequest
2172    where
2173        ___E: ::fidl_next::Encoder + ?Sized,
2174        TicTacToeOnOpponentMoveRequest:
2175            ::fidl_next::Encode<crate::wire::TicTacToeOnOpponentMoveRequest, ___E>,
2176    {
2177        #[inline]
2178        fn encode_option(
2179            this: ::core::option::Option<Self>,
2180            encoder: &mut ___E,
2181            out: &mut ::core::mem::MaybeUninit<
2182                ::fidl_next::wire::Box<'static, crate::wire::TicTacToeOnOpponentMoveRequest>,
2183            >,
2184            _: (),
2185        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2186            if let Some(inner) = this {
2187                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2188                ::fidl_next::wire::Box::encode_present(out);
2189            } else {
2190                ::fidl_next::wire::Box::encode_absent(out);
2191            }
2192
2193            Ok(())
2194        }
2195    }
2196
2197    unsafe impl<'a, ___E>
2198        ::fidl_next::EncodeOption<
2199            ::fidl_next::wire::Box<'static, crate::wire::TicTacToeOnOpponentMoveRequest>,
2200            ___E,
2201        > for &'a TicTacToeOnOpponentMoveRequest
2202    where
2203        ___E: ::fidl_next::Encoder + ?Sized,
2204        &'a TicTacToeOnOpponentMoveRequest:
2205            ::fidl_next::Encode<crate::wire::TicTacToeOnOpponentMoveRequest, ___E>,
2206    {
2207        #[inline]
2208        fn encode_option(
2209            this: ::core::option::Option<Self>,
2210            encoder: &mut ___E,
2211            out: &mut ::core::mem::MaybeUninit<
2212                ::fidl_next::wire::Box<'static, crate::wire::TicTacToeOnOpponentMoveRequest>,
2213            >,
2214            _: (),
2215        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2216            if let Some(inner) = this {
2217                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2218                ::fidl_next::wire::Box::encode_present(out);
2219            } else {
2220                ::fidl_next::wire::Box::encode_absent(out);
2221            }
2222
2223            Ok(())
2224        }
2225    }
2226
2227    impl ::fidl_next::FromWire<crate::wire::TicTacToeOnOpponentMoveRequest>
2228        for TicTacToeOnOpponentMoveRequest
2229    {
2230        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2231            crate::wire::TicTacToeOnOpponentMoveRequest,
2232            Self,
2233        > = unsafe {
2234            ::fidl_next::CopyOptimization::enable_if(
2235                true && <crate::natural::GameState as ::fidl_next::FromWire<
2236                    crate::wire::GameState,
2237                >>::COPY_OPTIMIZATION
2238                    .is_enabled(),
2239            )
2240        };
2241
2242        #[inline]
2243        fn from_wire(wire: crate::wire::TicTacToeOnOpponentMoveRequest) -> Self {
2244            Self { new_state: ::fidl_next::FromWire::from_wire(wire.new_state) }
2245        }
2246    }
2247
2248    impl ::fidl_next::FromWireRef<crate::wire::TicTacToeOnOpponentMoveRequest>
2249        for TicTacToeOnOpponentMoveRequest
2250    {
2251        #[inline]
2252        fn from_wire_ref(wire: &crate::wire::TicTacToeOnOpponentMoveRequest) -> Self {
2253            Self { new_state: ::fidl_next::FromWireRef::from_wire_ref(&wire.new_state) }
2254        }
2255    }
2256
2257    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2258    pub struct User {
2259        pub age: ::core::option::Option<u8>,
2260
2261        pub name: ::core::option::Option<::std::string::String>,
2262    }
2263
2264    impl User {
2265        fn __max_ordinal(&self) -> usize {
2266            if self.name.is_some() {
2267                return 2;
2268            }
2269
2270            if self.age.is_some() {
2271                return 1;
2272            }
2273
2274            0
2275        }
2276    }
2277
2278    unsafe impl<___E> ::fidl_next::Encode<crate::wire::User<'static>, ___E> for User
2279    where
2280        ___E: ::fidl_next::Encoder + ?Sized,
2281    {
2282        #[inline]
2283        fn encode(
2284            mut self,
2285            encoder: &mut ___E,
2286            out: &mut ::core::mem::MaybeUninit<crate::wire::User<'static>>,
2287            _: (),
2288        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2289            ::fidl_next::munge!(let crate::wire::User { table } = out);
2290
2291            let max_ord = self.__max_ordinal();
2292
2293            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2294            ::fidl_next::Wire::zero_padding(&mut out);
2295
2296            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2297                ::fidl_next::wire::Envelope,
2298            >(encoder, max_ord);
2299
2300            for i in 1..=max_ord {
2301                match i {
2302                    2 => {
2303                        if let Some(value) = self.name.take() {
2304                            ::fidl_next::wire::Envelope::encode_value::<
2305                                ::fidl_next::wire::String<'static>,
2306                                ___E,
2307                            >(
2308                                value, preallocated.encoder, &mut out, 32
2309                            )?;
2310                        } else {
2311                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2312                        }
2313                    }
2314
2315                    1 => {
2316                        if let Some(value) = self.age.take() {
2317                            ::fidl_next::wire::Envelope::encode_value::<u8, ___E>(
2318                                value,
2319                                preallocated.encoder,
2320                                &mut out,
2321                                (),
2322                            )?;
2323                        } else {
2324                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2325                        }
2326                    }
2327
2328                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2329                }
2330                unsafe {
2331                    preallocated.write_next(out.assume_init_ref());
2332                }
2333            }
2334
2335            ::fidl_next::wire::Table::encode_len(table, max_ord);
2336
2337            Ok(())
2338        }
2339    }
2340
2341    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::User<'static>, ___E> for &'a User
2342    where
2343        ___E: ::fidl_next::Encoder + ?Sized,
2344    {
2345        #[inline]
2346        fn encode(
2347            self,
2348            encoder: &mut ___E,
2349            out: &mut ::core::mem::MaybeUninit<crate::wire::User<'static>>,
2350            _: (),
2351        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2352            ::fidl_next::munge!(let crate::wire::User { table } = out);
2353
2354            let max_ord = self.__max_ordinal();
2355
2356            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2357            ::fidl_next::Wire::zero_padding(&mut out);
2358
2359            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2360                ::fidl_next::wire::Envelope,
2361            >(encoder, max_ord);
2362
2363            for i in 1..=max_ord {
2364                match i {
2365                    2 => {
2366                        if let Some(value) = &self.name {
2367                            ::fidl_next::wire::Envelope::encode_value::<
2368                                ::fidl_next::wire::String<'static>,
2369                                ___E,
2370                            >(
2371                                value, preallocated.encoder, &mut out, 32
2372                            )?;
2373                        } else {
2374                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2375                        }
2376                    }
2377
2378                    1 => {
2379                        if let Some(value) = &self.age {
2380                            ::fidl_next::wire::Envelope::encode_value::<u8, ___E>(
2381                                value,
2382                                preallocated.encoder,
2383                                &mut out,
2384                                (),
2385                            )?;
2386                        } else {
2387                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2388                        }
2389                    }
2390
2391                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2392                }
2393                unsafe {
2394                    preallocated.write_next(out.assume_init_ref());
2395                }
2396            }
2397
2398            ::fidl_next::wire::Table::encode_len(table, max_ord);
2399
2400            Ok(())
2401        }
2402    }
2403
2404    impl<'de> ::fidl_next::FromWire<crate::wire::User<'de>> for User {
2405        #[inline]
2406        fn from_wire(wire_: crate::wire::User<'de>) -> Self {
2407            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2408
2409            let age = wire_.table.get(1);
2410
2411            let name = wire_.table.get(2);
2412
2413            Self {
2414                age: age.map(|envelope| {
2415                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<u8>() })
2416                }),
2417
2418                name: name.map(|envelope| {
2419                    ::fidl_next::FromWire::from_wire(unsafe {
2420                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2421                    })
2422                }),
2423            }
2424        }
2425    }
2426
2427    impl<'de> ::fidl_next::FromWireRef<crate::wire::User<'de>> for User {
2428        #[inline]
2429        fn from_wire_ref(wire: &crate::wire::User<'de>) -> Self {
2430            Self {
2431                age: wire.table.get(1).map(|envelope| {
2432                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2433                        envelope.deref_unchecked::<u8>()
2434                    })
2435                }),
2436
2437                name: wire.table.get(2).map(|envelope| {
2438                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2439                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
2440                    })
2441                }),
2442            }
2443        }
2444    }
2445}
2446
2447pub mod wire {
2448
2449    /// The wire type corresponding to [`AvailableFromApiLevelNext`](crate::natural::AvailableFromApiLevelNext).
2450    pub type AvailableFromApiLevelNext = ::fidl_next::wire::Int32;
2451
2452    /// The wire type corresponding to [`AvailableUntilApiLevelNext`](crate::natural::AvailableUntilApiLevelNext).
2453    pub type AvailableUntilApiLevelNext = ::fidl_next::wire::Int32;
2454
2455    /// The wire type corresponding to [`Color`].
2456    #[derive(Debug)]
2457    #[repr(C)]
2458    pub struct Color<'de> {
2459        pub id: ::fidl_next::wire::Uint32,
2460
2461        pub name: ::fidl_next::wire::String<'de>,
2462    }
2463
2464    static_assertions::const_assert_eq!(std::mem::size_of::<Color<'_>>(), 24);
2465    static_assertions::const_assert_eq!(std::mem::align_of::<Color<'_>>(), 8);
2466
2467    static_assertions::const_assert_eq!(std::mem::offset_of!(Color<'_>, id), 0);
2468
2469    static_assertions::const_assert_eq!(std::mem::offset_of!(Color<'_>, name), 8);
2470
2471    impl ::fidl_next::Constrained for Color<'_> {
2472        type Constraint = ();
2473
2474        fn validate(
2475            _: ::fidl_next::Slot<'_, Self>,
2476            _: Self::Constraint,
2477        ) -> Result<(), ::fidl_next::ValidationError> {
2478            Ok(())
2479        }
2480    }
2481
2482    unsafe impl ::fidl_next::Wire for Color<'static> {
2483        type Narrowed<'de> = Color<'de>;
2484
2485        #[inline]
2486        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2487            ::fidl_next::munge! {
2488                let Self {
2489                    id,
2490                    name,
2491
2492                } = &mut *out_;
2493            }
2494
2495            ::fidl_next::Wire::zero_padding(id);
2496
2497            ::fidl_next::Wire::zero_padding(name);
2498
2499            unsafe {
2500                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2501            }
2502        }
2503    }
2504
2505    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Color<'de>
2506    where
2507        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2508        ___D: ::fidl_next::Decoder<'de>,
2509    {
2510        fn decode(
2511            slot_: ::fidl_next::Slot<'_, Self>,
2512            decoder_: &mut ___D,
2513            _: (),
2514        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2515            if slot_.as_bytes()[4..8] != [0u8; 4] {
2516                return Err(::fidl_next::DecodeError::InvalidPadding);
2517            }
2518
2519            ::fidl_next::munge! {
2520                let Self {
2521                    mut id,
2522                    mut name,
2523
2524                } = slot_;
2525            }
2526
2527            let _field = id.as_mut();
2528
2529            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
2530
2531            let _field = name.as_mut();
2532            ::fidl_next::Constrained::validate(_field, 32)?;
2533            ::fidl_next::Decode::decode(name.as_mut(), decoder_, 32)?;
2534
2535            let name = unsafe { name.deref_unchecked() };
2536
2537            if name.len() > 32 {
2538                return Err(::fidl_next::DecodeError::VectorTooLong {
2539                    size: name.len() as u64,
2540                    limit: 32,
2541                });
2542            }
2543
2544            Ok(())
2545        }
2546    }
2547
2548    impl<'de> ::fidl_next::IntoNatural for Color<'de> {
2549        type Natural = crate::natural::Color;
2550    }
2551
2552    /// The wire type corresponding to [`EchoEchoStringRequest`].
2553    #[derive(Debug)]
2554    #[repr(C)]
2555    pub struct EchoEchoStringRequest<'de> {
2556        pub value: ::fidl_next::wire::String<'de>,
2557    }
2558
2559    static_assertions::const_assert_eq!(std::mem::size_of::<EchoEchoStringRequest<'_>>(), 16);
2560    static_assertions::const_assert_eq!(std::mem::align_of::<EchoEchoStringRequest<'_>>(), 8);
2561
2562    static_assertions::const_assert_eq!(std::mem::offset_of!(EchoEchoStringRequest<'_>, value), 0);
2563
2564    impl ::fidl_next::Constrained for EchoEchoStringRequest<'_> {
2565        type Constraint = ();
2566
2567        fn validate(
2568            _: ::fidl_next::Slot<'_, Self>,
2569            _: Self::Constraint,
2570        ) -> Result<(), ::fidl_next::ValidationError> {
2571            Ok(())
2572        }
2573    }
2574
2575    unsafe impl ::fidl_next::Wire for EchoEchoStringRequest<'static> {
2576        type Narrowed<'de> = EchoEchoStringRequest<'de>;
2577
2578        #[inline]
2579        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2580            ::fidl_next::munge! {
2581                let Self {
2582                    value,
2583
2584                } = &mut *out_;
2585            }
2586
2587            ::fidl_next::Wire::zero_padding(value);
2588        }
2589    }
2590
2591    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EchoEchoStringRequest<'de>
2592    where
2593        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2594        ___D: ::fidl_next::Decoder<'de>,
2595    {
2596        fn decode(
2597            slot_: ::fidl_next::Slot<'_, Self>,
2598            decoder_: &mut ___D,
2599            _: (),
2600        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2601            ::fidl_next::munge! {
2602                let Self {
2603                    mut value,
2604
2605                } = slot_;
2606            }
2607
2608            let _field = value.as_mut();
2609            ::fidl_next::Constrained::validate(_field, 32)?;
2610            ::fidl_next::Decode::decode(value.as_mut(), decoder_, 32)?;
2611
2612            let value = unsafe { value.deref_unchecked() };
2613
2614            if value.len() > 32 {
2615                return Err(::fidl_next::DecodeError::VectorTooLong {
2616                    size: value.len() as u64,
2617                    limit: 32,
2618                });
2619            }
2620
2621            Ok(())
2622        }
2623    }
2624
2625    impl<'de> ::fidl_next::IntoNatural for EchoEchoStringRequest<'de> {
2626        type Natural = crate::natural::EchoEchoStringRequest;
2627    }
2628
2629    /// The wire type corresponding to [`EchoEchoStringResponse`].
2630    #[derive(Debug)]
2631    #[repr(C)]
2632    pub struct EchoEchoStringResponse<'de> {
2633        pub response: ::fidl_next::wire::String<'de>,
2634    }
2635
2636    static_assertions::const_assert_eq!(std::mem::size_of::<EchoEchoStringResponse<'_>>(), 16);
2637    static_assertions::const_assert_eq!(std::mem::align_of::<EchoEchoStringResponse<'_>>(), 8);
2638
2639    static_assertions::const_assert_eq!(
2640        std::mem::offset_of!(EchoEchoStringResponse<'_>, response),
2641        0
2642    );
2643
2644    impl ::fidl_next::Constrained for EchoEchoStringResponse<'_> {
2645        type Constraint = ();
2646
2647        fn validate(
2648            _: ::fidl_next::Slot<'_, Self>,
2649            _: Self::Constraint,
2650        ) -> Result<(), ::fidl_next::ValidationError> {
2651            Ok(())
2652        }
2653    }
2654
2655    unsafe impl ::fidl_next::Wire for EchoEchoStringResponse<'static> {
2656        type Narrowed<'de> = EchoEchoStringResponse<'de>;
2657
2658        #[inline]
2659        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2660            ::fidl_next::munge! {
2661                let Self {
2662                    response,
2663
2664                } = &mut *out_;
2665            }
2666
2667            ::fidl_next::Wire::zero_padding(response);
2668        }
2669    }
2670
2671    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EchoEchoStringResponse<'de>
2672    where
2673        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2674        ___D: ::fidl_next::Decoder<'de>,
2675    {
2676        fn decode(
2677            slot_: ::fidl_next::Slot<'_, Self>,
2678            decoder_: &mut ___D,
2679            _: (),
2680        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2681            ::fidl_next::munge! {
2682                let Self {
2683                    mut response,
2684
2685                } = slot_;
2686            }
2687
2688            let _field = response.as_mut();
2689            ::fidl_next::Constrained::validate(_field, 32)?;
2690            ::fidl_next::Decode::decode(response.as_mut(), decoder_, 32)?;
2691
2692            let response = unsafe { response.deref_unchecked() };
2693
2694            if response.len() > 32 {
2695                return Err(::fidl_next::DecodeError::VectorTooLong {
2696                    size: response.len() as u64,
2697                    limit: 32,
2698                });
2699            }
2700
2701            Ok(())
2702        }
2703    }
2704
2705    impl<'de> ::fidl_next::IntoNatural for EchoEchoStringResponse<'de> {
2706        type Natural = crate::natural::EchoEchoStringResponse;
2707    }
2708
2709    /// The wire type corresponding to [`EchoSendStringRequest`].
2710    #[derive(Debug)]
2711    #[repr(C)]
2712    pub struct EchoSendStringRequest<'de> {
2713        pub value: ::fidl_next::wire::String<'de>,
2714    }
2715
2716    static_assertions::const_assert_eq!(std::mem::size_of::<EchoSendStringRequest<'_>>(), 16);
2717    static_assertions::const_assert_eq!(std::mem::align_of::<EchoSendStringRequest<'_>>(), 8);
2718
2719    static_assertions::const_assert_eq!(std::mem::offset_of!(EchoSendStringRequest<'_>, value), 0);
2720
2721    impl ::fidl_next::Constrained for EchoSendStringRequest<'_> {
2722        type Constraint = ();
2723
2724        fn validate(
2725            _: ::fidl_next::Slot<'_, Self>,
2726            _: Self::Constraint,
2727        ) -> Result<(), ::fidl_next::ValidationError> {
2728            Ok(())
2729        }
2730    }
2731
2732    unsafe impl ::fidl_next::Wire for EchoSendStringRequest<'static> {
2733        type Narrowed<'de> = EchoSendStringRequest<'de>;
2734
2735        #[inline]
2736        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2737            ::fidl_next::munge! {
2738                let Self {
2739                    value,
2740
2741                } = &mut *out_;
2742            }
2743
2744            ::fidl_next::Wire::zero_padding(value);
2745        }
2746    }
2747
2748    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EchoSendStringRequest<'de>
2749    where
2750        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2751        ___D: ::fidl_next::Decoder<'de>,
2752    {
2753        fn decode(
2754            slot_: ::fidl_next::Slot<'_, Self>,
2755            decoder_: &mut ___D,
2756            _: (),
2757        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2758            ::fidl_next::munge! {
2759                let Self {
2760                    mut value,
2761
2762                } = slot_;
2763            }
2764
2765            let _field = value.as_mut();
2766            ::fidl_next::Constrained::validate(_field, 32)?;
2767            ::fidl_next::Decode::decode(value.as_mut(), decoder_, 32)?;
2768
2769            let value = unsafe { value.deref_unchecked() };
2770
2771            if value.len() > 32 {
2772                return Err(::fidl_next::DecodeError::VectorTooLong {
2773                    size: value.len() as u64,
2774                    limit: 32,
2775                });
2776            }
2777
2778            Ok(())
2779        }
2780    }
2781
2782    impl<'de> ::fidl_next::IntoNatural for EchoSendStringRequest<'de> {
2783        type Natural = crate::natural::EchoSendStringRequest;
2784    }
2785
2786    /// The wire type corresponding to [`EchoOnStringRequest`].
2787    #[derive(Debug)]
2788    #[repr(C)]
2789    pub struct EchoOnStringRequest<'de> {
2790        pub response: ::fidl_next::wire::String<'de>,
2791    }
2792
2793    static_assertions::const_assert_eq!(std::mem::size_of::<EchoOnStringRequest<'_>>(), 16);
2794    static_assertions::const_assert_eq!(std::mem::align_of::<EchoOnStringRequest<'_>>(), 8);
2795
2796    static_assertions::const_assert_eq!(std::mem::offset_of!(EchoOnStringRequest<'_>, response), 0);
2797
2798    impl ::fidl_next::Constrained for EchoOnStringRequest<'_> {
2799        type Constraint = ();
2800
2801        fn validate(
2802            _: ::fidl_next::Slot<'_, Self>,
2803            _: Self::Constraint,
2804        ) -> Result<(), ::fidl_next::ValidationError> {
2805            Ok(())
2806        }
2807    }
2808
2809    unsafe impl ::fidl_next::Wire for EchoOnStringRequest<'static> {
2810        type Narrowed<'de> = EchoOnStringRequest<'de>;
2811
2812        #[inline]
2813        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2814            ::fidl_next::munge! {
2815                let Self {
2816                    response,
2817
2818                } = &mut *out_;
2819            }
2820
2821            ::fidl_next::Wire::zero_padding(response);
2822        }
2823    }
2824
2825    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EchoOnStringRequest<'de>
2826    where
2827        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2828        ___D: ::fidl_next::Decoder<'de>,
2829    {
2830        fn decode(
2831            slot_: ::fidl_next::Slot<'_, Self>,
2832            decoder_: &mut ___D,
2833            _: (),
2834        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2835            ::fidl_next::munge! {
2836                let Self {
2837                    mut response,
2838
2839                } = slot_;
2840            }
2841
2842            let _field = response.as_mut();
2843            ::fidl_next::Constrained::validate(_field, 32)?;
2844            ::fidl_next::Decode::decode(response.as_mut(), decoder_, 32)?;
2845
2846            let response = unsafe { response.deref_unchecked() };
2847
2848            if response.len() > 32 {
2849                return Err(::fidl_next::DecodeError::VectorTooLong {
2850                    size: response.len() as u64,
2851                    limit: 32,
2852                });
2853            }
2854
2855            Ok(())
2856        }
2857    }
2858
2859    impl<'de> ::fidl_next::IntoNatural for EchoOnStringRequest<'de> {
2860        type Natural = crate::natural::EchoOnStringRequest;
2861    }
2862
2863    /// The wire type corresponding to [`EchoLauncherGetEchoRequest`].
2864    #[derive(Debug)]
2865    #[repr(C)]
2866    pub struct EchoLauncherGetEchoRequest<'de> {
2867        pub echo_prefix: ::fidl_next::wire::String<'de>,
2868    }
2869
2870    static_assertions::const_assert_eq!(std::mem::size_of::<EchoLauncherGetEchoRequest<'_>>(), 16);
2871    static_assertions::const_assert_eq!(std::mem::align_of::<EchoLauncherGetEchoRequest<'_>>(), 8);
2872
2873    static_assertions::const_assert_eq!(
2874        std::mem::offset_of!(EchoLauncherGetEchoRequest<'_>, echo_prefix),
2875        0
2876    );
2877
2878    impl ::fidl_next::Constrained for EchoLauncherGetEchoRequest<'_> {
2879        type Constraint = ();
2880
2881        fn validate(
2882            _: ::fidl_next::Slot<'_, Self>,
2883            _: Self::Constraint,
2884        ) -> Result<(), ::fidl_next::ValidationError> {
2885            Ok(())
2886        }
2887    }
2888
2889    unsafe impl ::fidl_next::Wire for EchoLauncherGetEchoRequest<'static> {
2890        type Narrowed<'de> = EchoLauncherGetEchoRequest<'de>;
2891
2892        #[inline]
2893        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2894            ::fidl_next::munge! {
2895                let Self {
2896                    echo_prefix,
2897
2898                } = &mut *out_;
2899            }
2900
2901            ::fidl_next::Wire::zero_padding(echo_prefix);
2902        }
2903    }
2904
2905    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EchoLauncherGetEchoRequest<'de>
2906    where
2907        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2908        ___D: ::fidl_next::Decoder<'de>,
2909    {
2910        fn decode(
2911            slot_: ::fidl_next::Slot<'_, Self>,
2912            decoder_: &mut ___D,
2913            _: (),
2914        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2915            ::fidl_next::munge! {
2916                let Self {
2917                    mut echo_prefix,
2918
2919                } = slot_;
2920            }
2921
2922            let _field = echo_prefix.as_mut();
2923            ::fidl_next::Constrained::validate(_field, 32)?;
2924            ::fidl_next::Decode::decode(echo_prefix.as_mut(), decoder_, 32)?;
2925
2926            let echo_prefix = unsafe { echo_prefix.deref_unchecked() };
2927
2928            if echo_prefix.len() > 32 {
2929                return Err(::fidl_next::DecodeError::VectorTooLong {
2930                    size: echo_prefix.len() as u64,
2931                    limit: 32,
2932                });
2933            }
2934
2935            Ok(())
2936        }
2937    }
2938
2939    impl<'de> ::fidl_next::IntoNatural for EchoLauncherGetEchoRequest<'de> {
2940        type Natural = crate::natural::EchoLauncherGetEchoRequest;
2941    }
2942
2943    /// The wire type corresponding to [`FileMode`](crate::natural::FileMode).
2944    #[derive(Clone, Copy, Debug)]
2945    #[repr(transparent)]
2946    pub struct FileMode {
2947        pub(crate) value: ::fidl_next::wire::Uint16,
2948    }
2949
2950    impl ::fidl_next::Constrained for FileMode {
2951        type Constraint = ();
2952
2953        fn validate(
2954            _: ::fidl_next::Slot<'_, Self>,
2955            _: Self::Constraint,
2956        ) -> Result<(), ::fidl_next::ValidationError> {
2957            Ok(())
2958        }
2959    }
2960
2961    unsafe impl ::fidl_next::Wire for FileMode {
2962        type Narrowed<'de> = Self;
2963
2964        #[inline]
2965        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2966            // Wire bits have no padding
2967        }
2968    }
2969
2970    unsafe impl<___D> ::fidl_next::Decode<___D> for FileMode
2971    where
2972        ___D: ?Sized,
2973    {
2974        fn decode(
2975            slot: ::fidl_next::Slot<'_, Self>,
2976            _: &mut ___D,
2977            _: (),
2978        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2979            ::fidl_next::munge!(let Self { value } = slot);
2980            let set = u16::from(*value);
2981            if set & !crate::natural::FileMode::all().bits() != 0 {
2982                return Err(::fidl_next::DecodeError::InvalidBits {
2983                    expected: crate::natural::FileMode::all().bits() as usize,
2984                    actual: set as usize,
2985                });
2986            }
2987
2988            Ok(())
2989        }
2990    }
2991
2992    impl ::core::convert::From<crate::natural::FileMode> for FileMode {
2993        fn from(natural: crate::natural::FileMode) -> Self {
2994            Self { value: ::fidl_next::wire::Uint16::from(natural.bits()) }
2995        }
2996    }
2997
2998    impl ::fidl_next::IntoNatural for FileMode {
2999        type Natural = crate::natural::FileMode;
3000    }
3001
3002    /// The wire type corresponding to [`FlexibleFileMode`](crate::natural::FlexibleFileMode).
3003    #[derive(Clone, Copy, Debug)]
3004    #[repr(transparent)]
3005    pub struct FlexibleFileMode {
3006        pub(crate) value: ::fidl_next::wire::Uint16,
3007    }
3008
3009    impl ::fidl_next::Constrained for FlexibleFileMode {
3010        type Constraint = ();
3011
3012        fn validate(
3013            _: ::fidl_next::Slot<'_, Self>,
3014            _: Self::Constraint,
3015        ) -> Result<(), ::fidl_next::ValidationError> {
3016            Ok(())
3017        }
3018    }
3019
3020    unsafe impl ::fidl_next::Wire for FlexibleFileMode {
3021        type Narrowed<'de> = Self;
3022
3023        #[inline]
3024        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3025            // Wire bits have no padding
3026        }
3027    }
3028
3029    unsafe impl<___D> ::fidl_next::Decode<___D> for FlexibleFileMode
3030    where
3031        ___D: ?Sized,
3032    {
3033        fn decode(
3034            slot: ::fidl_next::Slot<'_, Self>,
3035            _: &mut ___D,
3036            _: (),
3037        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3038            Ok(())
3039        }
3040    }
3041
3042    impl ::core::convert::From<crate::natural::FlexibleFileMode> for FlexibleFileMode {
3043        fn from(natural: crate::natural::FlexibleFileMode) -> Self {
3044            Self { value: ::fidl_next::wire::Uint16::from(natural.bits()) }
3045        }
3046    }
3047
3048    impl ::fidl_next::IntoNatural for FlexibleFileMode {
3049        type Natural = crate::natural::FlexibleFileMode;
3050    }
3051
3052    /// The wire type corresponding to [`FlexibleJsonValue`].
3053    #[repr(transparent)]
3054    pub struct FlexibleJsonValue<'de> {
3055        pub(crate) raw: ::fidl_next::wire::Union,
3056        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3057    }
3058
3059    impl<'de> Drop for FlexibleJsonValue<'de> {
3060        fn drop(&mut self) {
3061            match self.raw.ordinal() {
3062                1 => {
3063                    let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Int32>() };
3064                }
3065
3066                2 => {
3067                    let _ = unsafe {
3068                        self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
3069                    };
3070                }
3071
3072                _ => (),
3073            }
3074        }
3075    }
3076
3077    impl ::fidl_next::Constrained for FlexibleJsonValue<'_> {
3078        type Constraint = ();
3079
3080        fn validate(
3081            _: ::fidl_next::Slot<'_, Self>,
3082            _: Self::Constraint,
3083        ) -> Result<(), ::fidl_next::ValidationError> {
3084            Ok(())
3085        }
3086    }
3087
3088    unsafe impl ::fidl_next::Wire for FlexibleJsonValue<'static> {
3089        type Narrowed<'de> = FlexibleJsonValue<'de>;
3090
3091        #[inline]
3092        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3093            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3094            ::fidl_next::wire::Union::zero_padding(raw);
3095        }
3096    }
3097
3098    pub mod flexible_json_value {
3099        pub enum Ref<'de> {
3100            IntValue(&'de ::fidl_next::wire::Int32),
3101
3102            StringValue(&'de ::fidl_next::wire::String<'de>),
3103
3104            UnknownOrdinal_(u64),
3105        }
3106
3107        pub enum Value<'de> {
3108            IntValue(::fidl_next::wire::Int32),
3109
3110            StringValue(::fidl_next::wire::String<'de>),
3111
3112            UnknownOrdinal_(u64),
3113        }
3114    }
3115
3116    impl<'de> FlexibleJsonValue<'de> {
3117        pub fn as_ref(&self) -> crate::wire::flexible_json_value::Ref<'_> {
3118            match self.raw.ordinal() {
3119                1 => crate::wire::flexible_json_value::Ref::IntValue(unsafe {
3120                    self.raw.get().deref_unchecked::<::fidl_next::wire::Int32>()
3121                }),
3122
3123                2 => crate::wire::flexible_json_value::Ref::StringValue(unsafe {
3124                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
3125                }),
3126
3127                unknown => crate::wire::flexible_json_value::Ref::UnknownOrdinal_(unknown),
3128            }
3129        }
3130
3131        pub fn into_inner(self) -> crate::wire::flexible_json_value::Value<'de> {
3132            let this = ::core::mem::ManuallyDrop::new(self);
3133
3134            match this.raw.ordinal() {
3135                1 => crate::wire::flexible_json_value::Value::IntValue(unsafe {
3136                    this.raw.get().read_unchecked::<::fidl_next::wire::Int32>()
3137                }),
3138
3139                2 => crate::wire::flexible_json_value::Value::StringValue(unsafe {
3140                    this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
3141                }),
3142
3143                unknown => crate::wire::flexible_json_value::Value::UnknownOrdinal_(unknown),
3144            }
3145        }
3146    }
3147
3148    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FlexibleJsonValue<'de>
3149    where
3150        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3151        ___D: ::fidl_next::Decoder<'de>,
3152    {
3153        fn decode(
3154            mut slot: ::fidl_next::Slot<'_, Self>,
3155            decoder: &mut ___D,
3156            _: (),
3157        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3158            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3159            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3160                1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Int32>(
3161                    raw,
3162                    decoder,
3163                    (),
3164                )?,
3165
3166                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
3167                    raw, decoder, 32,
3168                )?,
3169
3170                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3171            }
3172
3173            Ok(())
3174        }
3175    }
3176
3177    impl<'de> ::core::fmt::Debug for FlexibleJsonValue<'de> {
3178        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3179            match self.raw.ordinal() {
3180                1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::wire::Int32>().fmt(f) },
3181                2 => unsafe {
3182                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
3183                },
3184                _ => unsafe { ::core::hint::unreachable_unchecked() },
3185            }
3186        }
3187    }
3188
3189    impl<'de> ::fidl_next::IntoNatural for FlexibleJsonValue<'de> {
3190        type Natural = crate::natural::FlexibleJsonValue;
3191    }
3192
3193    /// The wire type corresponding to [`FlexibleLocationType`].
3194    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3195    #[repr(transparent)]
3196    pub struct FlexibleLocationType {
3197        pub(crate) value: ::fidl_next::wire::Uint32,
3198    }
3199
3200    impl ::fidl_next::Constrained for FlexibleLocationType {
3201        type Constraint = ();
3202
3203        fn validate(
3204            _: ::fidl_next::Slot<'_, Self>,
3205            _: Self::Constraint,
3206        ) -> Result<(), ::fidl_next::ValidationError> {
3207            Ok(())
3208        }
3209    }
3210
3211    unsafe impl ::fidl_next::Wire for FlexibleLocationType {
3212        type Narrowed<'de> = Self;
3213
3214        #[inline]
3215        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3216            // Wire enums have no padding
3217        }
3218    }
3219
3220    impl FlexibleLocationType {
3221        pub const MUSEUM: FlexibleLocationType =
3222            FlexibleLocationType { value: ::fidl_next::wire::Uint32(1) };
3223
3224        pub const AIRPORT: FlexibleLocationType =
3225            FlexibleLocationType { value: ::fidl_next::wire::Uint32(2) };
3226
3227        pub const RESTAURANT: FlexibleLocationType =
3228            FlexibleLocationType { value: ::fidl_next::wire::Uint32(3) };
3229    }
3230
3231    unsafe impl<___D> ::fidl_next::Decode<___D> for FlexibleLocationType
3232    where
3233        ___D: ?Sized,
3234    {
3235        fn decode(
3236            slot: ::fidl_next::Slot<'_, Self>,
3237            _: &mut ___D,
3238            _: (),
3239        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3240            Ok(())
3241        }
3242    }
3243
3244    impl ::core::convert::From<crate::natural::FlexibleLocationType> for FlexibleLocationType {
3245        fn from(natural: crate::natural::FlexibleLocationType) -> Self {
3246            match natural {
3247                crate::natural::FlexibleLocationType::Museum => FlexibleLocationType::MUSEUM,
3248
3249                crate::natural::FlexibleLocationType::Airport => FlexibleLocationType::AIRPORT,
3250
3251                crate::natural::FlexibleLocationType::Restaurant => {
3252                    FlexibleLocationType::RESTAURANT
3253                }
3254
3255                crate::natural::FlexibleLocationType::UnknownOrdinal_(value) => {
3256                    FlexibleLocationType { value: ::fidl_next::wire::Uint32::from(value) }
3257                }
3258            }
3259        }
3260    }
3261
3262    impl ::fidl_next::IntoNatural for FlexibleLocationType {
3263        type Natural = crate::natural::FlexibleLocationType;
3264    }
3265
3266    /// The wire type corresponding to [`GameState`].
3267    pub type GameState = ::fidl_next::wire::Unit;
3268
3269    /// The wire type corresponding to [`JsonValue`].
3270    #[repr(transparent)]
3271    pub struct JsonValue<'de> {
3272        pub(crate) raw: ::fidl_next::wire::Union,
3273        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3274    }
3275
3276    impl<'de> Drop for JsonValue<'de> {
3277        fn drop(&mut self) {
3278            match self.raw.ordinal() {
3279                1 => {
3280                    let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Int32>() };
3281                }
3282
3283                2 => {
3284                    let _ = unsafe {
3285                        self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
3286                    };
3287                }
3288
3289                _ => unsafe { ::core::hint::unreachable_unchecked() },
3290            }
3291        }
3292    }
3293
3294    impl ::fidl_next::Constrained for JsonValue<'_> {
3295        type Constraint = ();
3296
3297        fn validate(
3298            _: ::fidl_next::Slot<'_, Self>,
3299            _: Self::Constraint,
3300        ) -> Result<(), ::fidl_next::ValidationError> {
3301            Ok(())
3302        }
3303    }
3304
3305    unsafe impl ::fidl_next::Wire for JsonValue<'static> {
3306        type Narrowed<'de> = JsonValue<'de>;
3307
3308        #[inline]
3309        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3310            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3311            ::fidl_next::wire::Union::zero_padding(raw);
3312        }
3313    }
3314
3315    pub mod json_value {
3316        pub enum Ref<'de> {
3317            IntValue(&'de ::fidl_next::wire::Int32),
3318
3319            StringValue(&'de ::fidl_next::wire::String<'de>),
3320        }
3321
3322        pub enum Value<'de> {
3323            IntValue(::fidl_next::wire::Int32),
3324
3325            StringValue(::fidl_next::wire::String<'de>),
3326        }
3327    }
3328
3329    impl<'de> JsonValue<'de> {
3330        pub fn as_ref(&self) -> crate::wire::json_value::Ref<'_> {
3331            match self.raw.ordinal() {
3332                1 => crate::wire::json_value::Ref::IntValue(unsafe {
3333                    self.raw.get().deref_unchecked::<::fidl_next::wire::Int32>()
3334                }),
3335
3336                2 => crate::wire::json_value::Ref::StringValue(unsafe {
3337                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
3338                }),
3339
3340                _ => unsafe { ::core::hint::unreachable_unchecked() },
3341            }
3342        }
3343
3344        pub fn into_inner(self) -> crate::wire::json_value::Value<'de> {
3345            let this = ::core::mem::ManuallyDrop::new(self);
3346
3347            match this.raw.ordinal() {
3348                1 => crate::wire::json_value::Value::IntValue(unsafe {
3349                    this.raw.get().read_unchecked::<::fidl_next::wire::Int32>()
3350                }),
3351
3352                2 => crate::wire::json_value::Value::StringValue(unsafe {
3353                    this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
3354                }),
3355
3356                _ => unsafe { ::core::hint::unreachable_unchecked() },
3357            }
3358        }
3359    }
3360
3361    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for JsonValue<'de>
3362    where
3363        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3364        ___D: ::fidl_next::Decoder<'de>,
3365    {
3366        fn decode(
3367            mut slot: ::fidl_next::Slot<'_, Self>,
3368            decoder: &mut ___D,
3369            _: (),
3370        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3371            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3372            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3373                1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Int32>(
3374                    raw,
3375                    decoder,
3376                    (),
3377                )?,
3378
3379                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
3380                    raw, decoder, 32,
3381                )?,
3382
3383                ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
3384            }
3385
3386            Ok(())
3387        }
3388    }
3389
3390    impl<'de> ::core::fmt::Debug for JsonValue<'de> {
3391        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3392            match self.raw.ordinal() {
3393                1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::wire::Int32>().fmt(f) },
3394                2 => unsafe {
3395                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
3396                },
3397                _ => unsafe { ::core::hint::unreachable_unchecked() },
3398            }
3399        }
3400    }
3401
3402    impl<'de> ::fidl_next::IntoNatural for JsonValue<'de> {
3403        type Natural = crate::natural::JsonValue;
3404    }
3405
3406    /// The wire type corresponding to [`LocationType`].
3407    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3408    #[repr(transparent)]
3409    pub struct LocationType {
3410        pub(crate) value: ::fidl_next::wire::Uint32,
3411    }
3412
3413    impl ::fidl_next::Constrained for LocationType {
3414        type Constraint = ();
3415
3416        fn validate(
3417            _: ::fidl_next::Slot<'_, Self>,
3418            _: Self::Constraint,
3419        ) -> Result<(), ::fidl_next::ValidationError> {
3420            Ok(())
3421        }
3422    }
3423
3424    unsafe impl ::fidl_next::Wire for LocationType {
3425        type Narrowed<'de> = Self;
3426
3427        #[inline]
3428        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3429            // Wire enums have no padding
3430        }
3431    }
3432
3433    impl LocationType {
3434        pub const MUSEUM: LocationType = LocationType { value: ::fidl_next::wire::Uint32(1) };
3435
3436        pub const AIRPORT: LocationType = LocationType { value: ::fidl_next::wire::Uint32(2) };
3437
3438        pub const RESTAURANT: LocationType = LocationType { value: ::fidl_next::wire::Uint32(3) };
3439    }
3440
3441    unsafe impl<___D> ::fidl_next::Decode<___D> for LocationType
3442    where
3443        ___D: ?Sized,
3444    {
3445        fn decode(
3446            slot: ::fidl_next::Slot<'_, Self>,
3447            _: &mut ___D,
3448            _: (),
3449        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3450            ::fidl_next::munge!(let Self { value } = slot);
3451
3452            match u32::from(*value) {
3453                1 | 2 | 3 => (),
3454                unknown => {
3455                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
3456                }
3457            }
3458
3459            Ok(())
3460        }
3461    }
3462
3463    impl ::core::convert::From<crate::natural::LocationType> for LocationType {
3464        fn from(natural: crate::natural::LocationType) -> Self {
3465            match natural {
3466                crate::natural::LocationType::Museum => LocationType::MUSEUM,
3467
3468                crate::natural::LocationType::Airport => LocationType::AIRPORT,
3469
3470                crate::natural::LocationType::Restaurant => LocationType::RESTAURANT,
3471            }
3472        }
3473    }
3474
3475    impl ::fidl_next::IntoNatural for LocationType {
3476        type Natural = crate::natural::LocationType;
3477    }
3478
3479    /// The wire type corresponding to [`TicTacToeStartGameRequest`].
3480    #[derive(Clone, Debug)]
3481    #[repr(C)]
3482    pub struct TicTacToeStartGameRequest {
3483        pub start_first: bool,
3484    }
3485
3486    static_assertions::const_assert_eq!(std::mem::size_of::<TicTacToeStartGameRequest>(), 1);
3487    static_assertions::const_assert_eq!(std::mem::align_of::<TicTacToeStartGameRequest>(), 1);
3488
3489    static_assertions::const_assert_eq!(
3490        std::mem::offset_of!(TicTacToeStartGameRequest, start_first),
3491        0
3492    );
3493
3494    impl ::fidl_next::Constrained for TicTacToeStartGameRequest {
3495        type Constraint = ();
3496
3497        fn validate(
3498            _: ::fidl_next::Slot<'_, Self>,
3499            _: Self::Constraint,
3500        ) -> Result<(), ::fidl_next::ValidationError> {
3501            Ok(())
3502        }
3503    }
3504
3505    unsafe impl ::fidl_next::Wire for TicTacToeStartGameRequest {
3506        type Narrowed<'de> = TicTacToeStartGameRequest;
3507
3508        #[inline]
3509        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3510            ::fidl_next::munge! {
3511                let Self {
3512                    start_first,
3513
3514                } = &mut *out_;
3515            }
3516
3517            ::fidl_next::Wire::zero_padding(start_first);
3518        }
3519    }
3520
3521    unsafe impl<___D> ::fidl_next::Decode<___D> for TicTacToeStartGameRequest
3522    where
3523        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3524    {
3525        fn decode(
3526            slot_: ::fidl_next::Slot<'_, Self>,
3527            decoder_: &mut ___D,
3528            _: (),
3529        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3530            ::fidl_next::munge! {
3531                let Self {
3532                    mut start_first,
3533
3534                } = slot_;
3535            }
3536
3537            let _field = start_first.as_mut();
3538
3539            ::fidl_next::Decode::decode(start_first.as_mut(), decoder_, ())?;
3540
3541            Ok(())
3542        }
3543    }
3544
3545    impl ::fidl_next::IntoNatural for TicTacToeStartGameRequest {
3546        type Natural = crate::natural::TicTacToeStartGameRequest;
3547    }
3548
3549    /// The wire type corresponding to [`TicTacToeMakeMoveRequest`].
3550    #[derive(Clone, Debug)]
3551    #[repr(C)]
3552    pub struct TicTacToeMakeMoveRequest {
3553        pub row: u8,
3554
3555        pub col: u8,
3556    }
3557
3558    static_assertions::const_assert_eq!(std::mem::size_of::<TicTacToeMakeMoveRequest>(), 2);
3559    static_assertions::const_assert_eq!(std::mem::align_of::<TicTacToeMakeMoveRequest>(), 1);
3560
3561    static_assertions::const_assert_eq!(std::mem::offset_of!(TicTacToeMakeMoveRequest, row), 0);
3562
3563    static_assertions::const_assert_eq!(std::mem::offset_of!(TicTacToeMakeMoveRequest, col), 1);
3564
3565    impl ::fidl_next::Constrained for TicTacToeMakeMoveRequest {
3566        type Constraint = ();
3567
3568        fn validate(
3569            _: ::fidl_next::Slot<'_, Self>,
3570            _: Self::Constraint,
3571        ) -> Result<(), ::fidl_next::ValidationError> {
3572            Ok(())
3573        }
3574    }
3575
3576    unsafe impl ::fidl_next::Wire for TicTacToeMakeMoveRequest {
3577        type Narrowed<'de> = TicTacToeMakeMoveRequest;
3578
3579        #[inline]
3580        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3581            ::fidl_next::munge! {
3582                let Self {
3583                    row,
3584                    col,
3585
3586                } = &mut *out_;
3587            }
3588
3589            ::fidl_next::Wire::zero_padding(row);
3590
3591            ::fidl_next::Wire::zero_padding(col);
3592        }
3593    }
3594
3595    unsafe impl<___D> ::fidl_next::Decode<___D> for TicTacToeMakeMoveRequest
3596    where
3597        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3598    {
3599        fn decode(
3600            slot_: ::fidl_next::Slot<'_, Self>,
3601            decoder_: &mut ___D,
3602            _: (),
3603        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3604            ::fidl_next::munge! {
3605                let Self {
3606                    mut row,
3607                    mut col,
3608
3609                } = slot_;
3610            }
3611
3612            let _field = row.as_mut();
3613
3614            ::fidl_next::Decode::decode(row.as_mut(), decoder_, ())?;
3615
3616            let _field = col.as_mut();
3617
3618            ::fidl_next::Decode::decode(col.as_mut(), decoder_, ())?;
3619
3620            Ok(())
3621        }
3622    }
3623
3624    impl ::fidl_next::IntoNatural for TicTacToeMakeMoveRequest {
3625        type Natural = crate::natural::TicTacToeMakeMoveRequest;
3626    }
3627
3628    /// The wire type corresponding to [`TicTacToeMakeMoveResponse`].
3629    #[derive(Debug)]
3630    #[repr(C)]
3631    pub struct TicTacToeMakeMoveResponse<'de> {
3632        pub success: bool,
3633
3634        pub new_state: ::fidl_next::wire::Box<'de, crate::wire::GameState>,
3635    }
3636
3637    static_assertions::const_assert_eq!(std::mem::size_of::<TicTacToeMakeMoveResponse<'_>>(), 16);
3638    static_assertions::const_assert_eq!(std::mem::align_of::<TicTacToeMakeMoveResponse<'_>>(), 8);
3639
3640    static_assertions::const_assert_eq!(
3641        std::mem::offset_of!(TicTacToeMakeMoveResponse<'_>, success),
3642        0
3643    );
3644
3645    static_assertions::const_assert_eq!(
3646        std::mem::offset_of!(TicTacToeMakeMoveResponse<'_>, new_state),
3647        8
3648    );
3649
3650    impl ::fidl_next::Constrained for TicTacToeMakeMoveResponse<'_> {
3651        type Constraint = ();
3652
3653        fn validate(
3654            _: ::fidl_next::Slot<'_, Self>,
3655            _: Self::Constraint,
3656        ) -> Result<(), ::fidl_next::ValidationError> {
3657            Ok(())
3658        }
3659    }
3660
3661    unsafe impl ::fidl_next::Wire for TicTacToeMakeMoveResponse<'static> {
3662        type Narrowed<'de> = TicTacToeMakeMoveResponse<'de>;
3663
3664        #[inline]
3665        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3666            ::fidl_next::munge! {
3667                let Self {
3668                    success,
3669                    new_state,
3670
3671                } = &mut *out_;
3672            }
3673
3674            ::fidl_next::Wire::zero_padding(success);
3675
3676            ::fidl_next::Wire::zero_padding(new_state);
3677
3678            unsafe {
3679                out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 7);
3680            }
3681        }
3682    }
3683
3684    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TicTacToeMakeMoveResponse<'de>
3685    where
3686        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3687        ___D: ::fidl_next::Decoder<'de>,
3688    {
3689        fn decode(
3690            slot_: ::fidl_next::Slot<'_, Self>,
3691            decoder_: &mut ___D,
3692            _: (),
3693        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3694            if slot_.as_bytes()[1..8] != [0u8; 7] {
3695                return Err(::fidl_next::DecodeError::InvalidPadding);
3696            }
3697
3698            ::fidl_next::munge! {
3699                let Self {
3700                    mut success,
3701                    mut new_state,
3702
3703                } = slot_;
3704            }
3705
3706            let _field = success.as_mut();
3707
3708            ::fidl_next::Decode::decode(success.as_mut(), decoder_, ())?;
3709
3710            let _field = new_state.as_mut();
3711
3712            ::fidl_next::Decode::decode(new_state.as_mut(), decoder_, ())?;
3713
3714            Ok(())
3715        }
3716    }
3717
3718    impl<'de> ::fidl_next::IntoNatural for TicTacToeMakeMoveResponse<'de> {
3719        type Natural = crate::natural::TicTacToeMakeMoveResponse;
3720    }
3721
3722    /// The wire type corresponding to [`TicTacToeOnOpponentMoveRequest`].
3723    #[derive(Clone, Debug)]
3724    #[repr(C)]
3725    pub struct TicTacToeOnOpponentMoveRequest {
3726        pub new_state: crate::wire::GameState,
3727    }
3728
3729    static_assertions::const_assert_eq!(std::mem::size_of::<TicTacToeOnOpponentMoveRequest>(), 1);
3730    static_assertions::const_assert_eq!(std::mem::align_of::<TicTacToeOnOpponentMoveRequest>(), 1);
3731
3732    static_assertions::const_assert_eq!(
3733        std::mem::offset_of!(TicTacToeOnOpponentMoveRequest, new_state),
3734        0
3735    );
3736
3737    impl ::fidl_next::Constrained for TicTacToeOnOpponentMoveRequest {
3738        type Constraint = ();
3739
3740        fn validate(
3741            _: ::fidl_next::Slot<'_, Self>,
3742            _: Self::Constraint,
3743        ) -> Result<(), ::fidl_next::ValidationError> {
3744            Ok(())
3745        }
3746    }
3747
3748    unsafe impl ::fidl_next::Wire for TicTacToeOnOpponentMoveRequest {
3749        type Narrowed<'de> = TicTacToeOnOpponentMoveRequest;
3750
3751        #[inline]
3752        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3753            ::fidl_next::munge! {
3754                let Self {
3755                    new_state,
3756
3757                } = &mut *out_;
3758            }
3759
3760            ::fidl_next::Wire::zero_padding(new_state);
3761        }
3762    }
3763
3764    unsafe impl<___D> ::fidl_next::Decode<___D> for TicTacToeOnOpponentMoveRequest
3765    where
3766        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3767    {
3768        fn decode(
3769            slot_: ::fidl_next::Slot<'_, Self>,
3770            decoder_: &mut ___D,
3771            _: (),
3772        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3773            ::fidl_next::munge! {
3774                let Self {
3775                    mut new_state,
3776
3777                } = slot_;
3778            }
3779
3780            let _field = new_state.as_mut();
3781
3782            ::fidl_next::Decode::decode(new_state.as_mut(), decoder_, ())?;
3783
3784            Ok(())
3785        }
3786    }
3787
3788    impl ::fidl_next::IntoNatural for TicTacToeOnOpponentMoveRequest {
3789        type Natural = crate::natural::TicTacToeOnOpponentMoveRequest;
3790    }
3791
3792    /// The wire type corresponding to [`User`].
3793    #[repr(C)]
3794    pub struct User<'de> {
3795        pub(crate) table: ::fidl_next::wire::Table<'de>,
3796    }
3797
3798    impl<'de> Drop for User<'de> {
3799        fn drop(&mut self) {
3800            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<u8>() });
3801
3802            let _ = self.table.get(2).map(|envelope| unsafe {
3803                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3804            });
3805        }
3806    }
3807
3808    impl ::fidl_next::Constrained for User<'_> {
3809        type Constraint = ();
3810
3811        fn validate(
3812            _: ::fidl_next::Slot<'_, Self>,
3813            _: Self::Constraint,
3814        ) -> Result<(), ::fidl_next::ValidationError> {
3815            Ok(())
3816        }
3817    }
3818
3819    unsafe impl ::fidl_next::Wire for User<'static> {
3820        type Narrowed<'de> = User<'de>;
3821
3822        #[inline]
3823        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3824            ::fidl_next::munge!(let Self { table } = out);
3825            ::fidl_next::wire::Table::zero_padding(table);
3826        }
3827    }
3828
3829    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for User<'de>
3830    where
3831        ___D: ::fidl_next::Decoder<'de> + ?Sized,
3832    {
3833        fn decode(
3834            slot: ::fidl_next::Slot<'_, Self>,
3835            decoder: &mut ___D,
3836            _: (),
3837        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3838            ::fidl_next::munge!(let Self { table } = slot);
3839
3840            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3841                match ordinal {
3842                    0 => unsafe { ::core::hint::unreachable_unchecked() },
3843
3844                    1 => {
3845                        ::fidl_next::wire::Envelope::decode_as::<___D, u8>(
3846                            slot.as_mut(),
3847                            decoder,
3848                            (),
3849                        )?;
3850
3851                        Ok(())
3852                    }
3853
3854                    2 => {
3855                        ::fidl_next::wire::Envelope::decode_as::<
3856                            ___D,
3857                            ::fidl_next::wire::String<'de>,
3858                        >(slot.as_mut(), decoder, 32)?;
3859
3860                        let value = unsafe {
3861                            slot.deref_unchecked()
3862                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3863                        };
3864
3865                        if value.len() > 32 {
3866                            return Err(::fidl_next::DecodeError::VectorTooLong {
3867                                size: value.len() as u64,
3868                                limit: 32,
3869                            });
3870                        }
3871
3872                        Ok(())
3873                    }
3874
3875                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3876                }
3877            })
3878        }
3879    }
3880
3881    impl<'de> User<'de> {
3882        pub fn age(&self) -> ::core::option::Option<&u8> {
3883            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3884        }
3885
3886        pub fn take_age(&mut self) -> ::core::option::Option<u8> {
3887            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3888        }
3889
3890        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3891            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3892        }
3893
3894        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3895            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3896        }
3897    }
3898
3899    impl<'de> ::core::fmt::Debug for User<'de> {
3900        fn fmt(
3901            &self,
3902            f: &mut ::core::fmt::Formatter<'_>,
3903        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3904            f.debug_struct("User").field("age", &self.age()).field("name", &self.name()).finish()
3905        }
3906    }
3907
3908    impl<'de> ::fidl_next::IntoNatural for User<'de> {
3909        type Natural = crate::natural::User;
3910    }
3911}
3912
3913pub mod wire_optional {
3914
3915    #[repr(transparent)]
3916    pub struct FlexibleJsonValue<'de> {
3917        pub(crate) raw: ::fidl_next::wire::Union,
3918        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3919    }
3920
3921    impl ::fidl_next::Constrained for FlexibleJsonValue<'_> {
3922        type Constraint = ();
3923
3924        fn validate(
3925            _: ::fidl_next::Slot<'_, Self>,
3926            _: Self::Constraint,
3927        ) -> Result<(), ::fidl_next::ValidationError> {
3928            Ok(())
3929        }
3930    }
3931
3932    unsafe impl ::fidl_next::Wire for FlexibleJsonValue<'static> {
3933        type Narrowed<'de> = FlexibleJsonValue<'de>;
3934
3935        #[inline]
3936        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3937            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3938            ::fidl_next::wire::Union::zero_padding(raw);
3939        }
3940    }
3941
3942    impl<'de> FlexibleJsonValue<'de> {
3943        pub fn is_some(&self) -> bool {
3944            self.raw.is_some()
3945        }
3946
3947        pub fn is_none(&self) -> bool {
3948            self.raw.is_none()
3949        }
3950
3951        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::FlexibleJsonValue<'de>> {
3952            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3953        }
3954
3955        pub fn into_option(self) -> ::core::option::Option<crate::wire::FlexibleJsonValue<'de>> {
3956            if self.is_some() {
3957                Some(crate::wire::FlexibleJsonValue {
3958                    raw: self.raw,
3959                    _phantom: ::core::marker::PhantomData,
3960                })
3961            } else {
3962                None
3963            }
3964        }
3965    }
3966
3967    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FlexibleJsonValue<'de>
3968    where
3969        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3970        ___D: ::fidl_next::Decoder<'de>,
3971    {
3972        fn decode(
3973            mut slot: ::fidl_next::Slot<'_, Self>,
3974            decoder: &mut ___D,
3975            _: (),
3976        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3977            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3978            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3979                1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Int32>(
3980                    raw,
3981                    decoder,
3982                    (),
3983                )?,
3984
3985                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
3986                    raw, decoder, 32,
3987                )?,
3988
3989                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
3990                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3991            }
3992
3993            Ok(())
3994        }
3995    }
3996
3997    impl<'de> ::core::fmt::Debug for FlexibleJsonValue<'de> {
3998        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3999            self.as_ref().fmt(f)
4000        }
4001    }
4002
4003    impl<'de> ::fidl_next::IntoNatural for FlexibleJsonValue<'de> {
4004        type Natural = ::core::option::Option<crate::natural::FlexibleJsonValue>;
4005    }
4006
4007    #[repr(transparent)]
4008    pub struct JsonValue<'de> {
4009        pub(crate) raw: ::fidl_next::wire::Union,
4010        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4011    }
4012
4013    impl ::fidl_next::Constrained for JsonValue<'_> {
4014        type Constraint = ();
4015
4016        fn validate(
4017            _: ::fidl_next::Slot<'_, Self>,
4018            _: Self::Constraint,
4019        ) -> Result<(), ::fidl_next::ValidationError> {
4020            Ok(())
4021        }
4022    }
4023
4024    unsafe impl ::fidl_next::Wire for JsonValue<'static> {
4025        type Narrowed<'de> = JsonValue<'de>;
4026
4027        #[inline]
4028        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4029            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4030            ::fidl_next::wire::Union::zero_padding(raw);
4031        }
4032    }
4033
4034    impl<'de> JsonValue<'de> {
4035        pub fn is_some(&self) -> bool {
4036            self.raw.is_some()
4037        }
4038
4039        pub fn is_none(&self) -> bool {
4040            self.raw.is_none()
4041        }
4042
4043        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::JsonValue<'de>> {
4044            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4045        }
4046
4047        pub fn into_option(self) -> ::core::option::Option<crate::wire::JsonValue<'de>> {
4048            if self.is_some() {
4049                Some(crate::wire::JsonValue {
4050                    raw: self.raw,
4051                    _phantom: ::core::marker::PhantomData,
4052                })
4053            } else {
4054                None
4055            }
4056        }
4057    }
4058
4059    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for JsonValue<'de>
4060    where
4061        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4062        ___D: ::fidl_next::Decoder<'de>,
4063    {
4064        fn decode(
4065            mut slot: ::fidl_next::Slot<'_, Self>,
4066            decoder: &mut ___D,
4067            _: (),
4068        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4069            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4070            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4071                1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Int32>(
4072                    raw,
4073                    decoder,
4074                    (),
4075                )?,
4076
4077                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
4078                    raw, decoder, 32,
4079                )?,
4080
4081                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4082                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4083            }
4084
4085            Ok(())
4086        }
4087    }
4088
4089    impl<'de> ::core::fmt::Debug for JsonValue<'de> {
4090        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4091            self.as_ref().fmt(f)
4092        }
4093    }
4094
4095    impl<'de> ::fidl_next::IntoNatural for JsonValue<'de> {
4096        type Natural = ::core::option::Option<crate::natural::JsonValue>;
4097    }
4098}
4099
4100pub mod generic {
4101
4102    /// The generic type corresponding to [`Color`].
4103    pub struct Color<T0, T1> {
4104        pub id: T0,
4105
4106        pub name: T1,
4107    }
4108
4109    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Color<'static>, ___E> for Color<T0, T1>
4110    where
4111        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4112        ___E: ::fidl_next::Encoder,
4113        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
4114        T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4115    {
4116        #[inline]
4117        fn encode(
4118            self,
4119            encoder_: &mut ___E,
4120            out_: &mut ::core::mem::MaybeUninit<crate::wire::Color<'static>>,
4121            _: (),
4122        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4123            ::fidl_next::munge! {
4124                let crate::wire::Color {
4125                    id,
4126                    name,
4127
4128                } = out_;
4129            }
4130
4131            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4132
4133            ::fidl_next::Encode::encode(self.name, encoder_, name, 32)?;
4134
4135            Ok(())
4136        }
4137    }
4138
4139    /// The generic type corresponding to [`EchoEchoStringRequest`].
4140    pub struct EchoEchoStringRequest<T0> {
4141        pub value: T0,
4142    }
4143
4144    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EchoEchoStringRequest<'static>, ___E>
4145        for EchoEchoStringRequest<T0>
4146    where
4147        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4148        ___E: ::fidl_next::Encoder,
4149        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4150    {
4151        #[inline]
4152        fn encode(
4153            self,
4154            encoder_: &mut ___E,
4155            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoEchoStringRequest<'static>>,
4156            _: (),
4157        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4158            ::fidl_next::munge! {
4159                let crate::wire::EchoEchoStringRequest {
4160                    value,
4161
4162                } = out_;
4163            }
4164
4165            ::fidl_next::Encode::encode(self.value, encoder_, value, 32)?;
4166
4167            Ok(())
4168        }
4169    }
4170
4171    /// The generic type corresponding to [`EchoEchoStringResponse`].
4172    pub struct EchoEchoStringResponse<T0> {
4173        pub response: T0,
4174    }
4175
4176    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EchoEchoStringResponse<'static>, ___E>
4177        for EchoEchoStringResponse<T0>
4178    where
4179        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4180        ___E: ::fidl_next::Encoder,
4181        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4182    {
4183        #[inline]
4184        fn encode(
4185            self,
4186            encoder_: &mut ___E,
4187            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoEchoStringResponse<'static>>,
4188            _: (),
4189        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4190            ::fidl_next::munge! {
4191                let crate::wire::EchoEchoStringResponse {
4192                    response,
4193
4194                } = out_;
4195            }
4196
4197            ::fidl_next::Encode::encode(self.response, encoder_, response, 32)?;
4198
4199            Ok(())
4200        }
4201    }
4202
4203    /// The generic type corresponding to [`EchoSendStringRequest`].
4204    pub struct EchoSendStringRequest<T0> {
4205        pub value: T0,
4206    }
4207
4208    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EchoSendStringRequest<'static>, ___E>
4209        for EchoSendStringRequest<T0>
4210    where
4211        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4212        ___E: ::fidl_next::Encoder,
4213        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4214    {
4215        #[inline]
4216        fn encode(
4217            self,
4218            encoder_: &mut ___E,
4219            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoSendStringRequest<'static>>,
4220            _: (),
4221        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4222            ::fidl_next::munge! {
4223                let crate::wire::EchoSendStringRequest {
4224                    value,
4225
4226                } = out_;
4227            }
4228
4229            ::fidl_next::Encode::encode(self.value, encoder_, value, 32)?;
4230
4231            Ok(())
4232        }
4233    }
4234
4235    /// The generic type corresponding to [`EchoOnStringRequest`].
4236    pub struct EchoOnStringRequest<T0> {
4237        pub response: T0,
4238    }
4239
4240    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::EchoOnStringRequest<'static>, ___E>
4241        for EchoOnStringRequest<T0>
4242    where
4243        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4244        ___E: ::fidl_next::Encoder,
4245        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4246    {
4247        #[inline]
4248        fn encode(
4249            self,
4250            encoder_: &mut ___E,
4251            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoOnStringRequest<'static>>,
4252            _: (),
4253        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4254            ::fidl_next::munge! {
4255                let crate::wire::EchoOnStringRequest {
4256                    response,
4257
4258                } = out_;
4259            }
4260
4261            ::fidl_next::Encode::encode(self.response, encoder_, response, 32)?;
4262
4263            Ok(())
4264        }
4265    }
4266
4267    /// The generic type corresponding to [`EchoLauncherGetEchoRequest`].
4268    pub struct EchoLauncherGetEchoRequest<T0> {
4269        pub echo_prefix: T0,
4270    }
4271
4272    unsafe impl<___E, T0>
4273        ::fidl_next::Encode<crate::wire::EchoLauncherGetEchoRequest<'static>, ___E>
4274        for EchoLauncherGetEchoRequest<T0>
4275    where
4276        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4277        ___E: ::fidl_next::Encoder,
4278        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4279    {
4280        #[inline]
4281        fn encode(
4282            self,
4283            encoder_: &mut ___E,
4284            out_: &mut ::core::mem::MaybeUninit<crate::wire::EchoLauncherGetEchoRequest<'static>>,
4285            _: (),
4286        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4287            ::fidl_next::munge! {
4288                let crate::wire::EchoLauncherGetEchoRequest {
4289                    echo_prefix,
4290
4291                } = out_;
4292            }
4293
4294            ::fidl_next::Encode::encode(self.echo_prefix, encoder_, echo_prefix, 32)?;
4295
4296            Ok(())
4297        }
4298    }
4299
4300    /// The generic type corresponding to [`GameState`].
4301    pub type GameState = ();
4302
4303    /// The generic type corresponding to [`TicTacToeStartGameRequest`].
4304    pub struct TicTacToeStartGameRequest<T0> {
4305        pub start_first: T0,
4306    }
4307
4308    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TicTacToeStartGameRequest, ___E>
4309        for TicTacToeStartGameRequest<T0>
4310    where
4311        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4312        T0: ::fidl_next::Encode<bool, ___E>,
4313    {
4314        #[inline]
4315        fn encode(
4316            self,
4317            encoder_: &mut ___E,
4318            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeStartGameRequest>,
4319            _: (),
4320        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4321            ::fidl_next::munge! {
4322                let crate::wire::TicTacToeStartGameRequest {
4323                    start_first,
4324
4325                } = out_;
4326            }
4327
4328            ::fidl_next::Encode::encode(self.start_first, encoder_, start_first, ())?;
4329
4330            Ok(())
4331        }
4332    }
4333
4334    /// The generic type corresponding to [`TicTacToeMakeMoveRequest`].
4335    pub struct TicTacToeMakeMoveRequest<T0, T1> {
4336        pub row: T0,
4337
4338        pub col: T1,
4339    }
4340
4341    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveRequest, ___E>
4342        for TicTacToeMakeMoveRequest<T0, T1>
4343    where
4344        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4345        T0: ::fidl_next::Encode<u8, ___E>,
4346        T1: ::fidl_next::Encode<u8, ___E>,
4347    {
4348        #[inline]
4349        fn encode(
4350            self,
4351            encoder_: &mut ___E,
4352            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeMakeMoveRequest>,
4353            _: (),
4354        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4355            ::fidl_next::munge! {
4356                let crate::wire::TicTacToeMakeMoveRequest {
4357                    row,
4358                    col,
4359
4360                } = out_;
4361            }
4362
4363            ::fidl_next::Encode::encode(self.row, encoder_, row, ())?;
4364
4365            ::fidl_next::Encode::encode(self.col, encoder_, col, ())?;
4366
4367            Ok(())
4368        }
4369    }
4370
4371    /// The generic type corresponding to [`TicTacToeMakeMoveResponse`].
4372    pub struct TicTacToeMakeMoveResponse<T0, T1> {
4373        pub success: T0,
4374
4375        pub new_state: T1,
4376    }
4377
4378    unsafe impl<___E, T0, T1>
4379        ::fidl_next::Encode<crate::wire::TicTacToeMakeMoveResponse<'static>, ___E>
4380        for TicTacToeMakeMoveResponse<T0, T1>
4381    where
4382        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4383        ___E: ::fidl_next::Encoder,
4384        T0: ::fidl_next::Encode<bool, ___E>,
4385        T1: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::GameState>, ___E>,
4386    {
4387        #[inline]
4388        fn encode(
4389            self,
4390            encoder_: &mut ___E,
4391            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeMakeMoveResponse<'static>>,
4392            _: (),
4393        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4394            ::fidl_next::munge! {
4395                let crate::wire::TicTacToeMakeMoveResponse {
4396                    success,
4397                    new_state,
4398
4399                } = out_;
4400            }
4401
4402            ::fidl_next::Encode::encode(self.success, encoder_, success, ())?;
4403
4404            ::fidl_next::Encode::encode(self.new_state, encoder_, new_state, ())?;
4405
4406            Ok(())
4407        }
4408    }
4409
4410    /// The generic type corresponding to [`TicTacToeOnOpponentMoveRequest`].
4411    pub struct TicTacToeOnOpponentMoveRequest<T0> {
4412        pub new_state: T0,
4413    }
4414
4415    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TicTacToeOnOpponentMoveRequest, ___E>
4416        for TicTacToeOnOpponentMoveRequest<T0>
4417    where
4418        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4419        T0: ::fidl_next::Encode<crate::wire::GameState, ___E>,
4420    {
4421        #[inline]
4422        fn encode(
4423            self,
4424            encoder_: &mut ___E,
4425            out_: &mut ::core::mem::MaybeUninit<crate::wire::TicTacToeOnOpponentMoveRequest>,
4426            _: (),
4427        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4428            ::fidl_next::munge! {
4429                let crate::wire::TicTacToeOnOpponentMoveRequest {
4430                    new_state,
4431
4432                } = out_;
4433            }
4434
4435            ::fidl_next::Encode::encode(self.new_state, encoder_, new_state, ())?;
4436
4437            Ok(())
4438        }
4439    }
4440}
4441
4442pub use self::natural::*;
4443
4444pub const BOARD_SIZE: u8 = 9 as u8;
4445
4446pub const MAX_STRING_LENGTH: u64 = 32 as u64;
4447
4448/// The type corresponding to the Echo protocol.
4449#[derive(PartialEq, Debug)]
4450pub struct Echo;
4451
4452impl ::fidl_next::Discoverable for Echo {
4453    const PROTOCOL_NAME: &'static str = "fuchsia.examples.Echo";
4454}
4455
4456#[cfg(target_os = "fuchsia")]
4457impl ::fidl_next::HasTransport for Echo {
4458    type Transport = ::fidl_next::fuchsia::zx::Channel;
4459}
4460
4461pub mod echo {
4462    pub mod prelude {
4463        pub use crate::{
4464            Echo, EchoClientHandler, EchoLocalClientHandler, EchoLocalServerHandler,
4465            EchoServerHandler, echo,
4466        };
4467
4468        pub use crate::natural::EchoEchoStringRequest;
4469
4470        pub use crate::natural::EchoEchoStringResponse;
4471
4472        pub use crate::natural::EchoOnStringRequest;
4473
4474        pub use crate::natural::EchoSendStringRequest;
4475    }
4476
4477    pub struct EchoString;
4478
4479    impl ::fidl_next::Method for EchoString {
4480        const ORDINAL: u64 = 8482573115503257110;
4481        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4482            ::fidl_next::protocol::Flexibility::Strict;
4483
4484        type Protocol = crate::Echo;
4485
4486        type Request = crate::wire::EchoEchoStringRequest<'static>;
4487    }
4488
4489    impl ::fidl_next::TwoWayMethod for EchoString {
4490        type Response = ::fidl_next::wire::Strict<crate::wire::EchoEchoStringResponse<'static>>;
4491    }
4492
4493    impl<___R> ::fidl_next::Respond<___R> for EchoString {
4494        type Output = ::fidl_next::Strict<crate::generic::EchoEchoStringResponse<___R>>;
4495
4496        fn respond(response: ___R) -> Self::Output {
4497            ::fidl_next::Strict(crate::generic::EchoEchoStringResponse { response: response })
4498        }
4499    }
4500
4501    pub struct SendString;
4502
4503    impl ::fidl_next::Method for SendString {
4504        const ORDINAL: u64 = 6693688511394337905;
4505        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4506            ::fidl_next::protocol::Flexibility::Strict;
4507
4508        type Protocol = crate::Echo;
4509
4510        type Request = crate::wire::EchoSendStringRequest<'static>;
4511    }
4512
4513    pub struct OnString;
4514
4515    impl ::fidl_next::Method for OnString {
4516        const ORDINAL: u64 = 1382143211280629483;
4517        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4518            ::fidl_next::protocol::Flexibility::Strict;
4519
4520        type Protocol = crate::Echo;
4521
4522        type Request = crate::wire::EchoOnStringRequest<'static>;
4523    }
4524
4525    mod ___detail {
4526        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Echo
4527        where
4528            ___T: ::fidl_next::Transport,
4529        {
4530            type Client = EchoClient<___T>;
4531            type Server = EchoServer<___T>;
4532        }
4533
4534        /// The client for the `Echo` protocol.
4535        #[repr(transparent)]
4536        pub struct EchoClient<___T: ::fidl_next::Transport> {
4537            #[allow(dead_code)]
4538            client: ::fidl_next::protocol::Client<___T>,
4539        }
4540
4541        impl<___T> EchoClient<___T>
4542        where
4543            ___T: ::fidl_next::Transport,
4544        {
4545            pub fn echo_string(
4546                &self,
4547
4548                value: impl ::fidl_next::Encode<
4549                    ::fidl_next::wire::String<'static>,
4550                    <___T as ::fidl_next::Transport>::SendBuffer,
4551                >,
4552            ) -> ::fidl_next::TwoWayFuture<'_, super::EchoString, ___T>
4553            where
4554                <___T as ::fidl_next::Transport>::SendBuffer:
4555                    ::fidl_next::encoder::InternalHandleEncoder,
4556                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4557            {
4558                self.echo_string_with(crate::generic::EchoEchoStringRequest { value })
4559            }
4560
4561            pub fn echo_string_with<___R>(
4562                &self,
4563                request: ___R,
4564            ) -> ::fidl_next::TwoWayFuture<'_, super::EchoString, ___T>
4565            where
4566                ___R: ::fidl_next::Encode<
4567                        crate::wire::EchoEchoStringRequest<'static>,
4568                        <___T as ::fidl_next::Transport>::SendBuffer,
4569                    >,
4570            {
4571                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4572                    8482573115503257110,
4573                    <super::EchoString as ::fidl_next::Method>::FLEXIBILITY,
4574                    request,
4575                ))
4576            }
4577
4578            pub fn send_string(
4579                &self,
4580
4581                value: impl ::fidl_next::Encode<
4582                    ::fidl_next::wire::String<'static>,
4583                    <___T as ::fidl_next::Transport>::SendBuffer,
4584                >,
4585            ) -> ::fidl_next::SendFuture<'_, ___T>
4586            where
4587                <___T as ::fidl_next::Transport>::SendBuffer:
4588                    ::fidl_next::encoder::InternalHandleEncoder,
4589                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4590            {
4591                self.send_string_with(crate::generic::EchoSendStringRequest { value })
4592            }
4593
4594            pub fn send_string_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
4595            where
4596                ___R: ::fidl_next::Encode<
4597                        crate::wire::EchoSendStringRequest<'static>,
4598                        <___T as ::fidl_next::Transport>::SendBuffer,
4599                    >,
4600            {
4601                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
4602                    6693688511394337905,
4603                    <super::SendString as ::fidl_next::Method>::FLEXIBILITY,
4604                    request,
4605                ))
4606            }
4607        }
4608
4609        /// The server for the `Echo` protocol.
4610        #[repr(transparent)]
4611        pub struct EchoServer<___T: ::fidl_next::Transport> {
4612            server: ::fidl_next::protocol::Server<___T>,
4613        }
4614
4615        impl<___T> EchoServer<___T>
4616        where
4617            ___T: ::fidl_next::Transport,
4618        {
4619            pub fn on_string(
4620                &self,
4621
4622                response: impl ::fidl_next::Encode<
4623                    ::fidl_next::wire::String<'static>,
4624                    <___T as ::fidl_next::Transport>::SendBuffer,
4625                >,
4626            ) -> ::fidl_next::SendFuture<'_, ___T>
4627            where
4628                <___T as ::fidl_next::Transport>::SendBuffer:
4629                    ::fidl_next::encoder::InternalHandleEncoder,
4630                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4631            {
4632                self.on_string_with(crate::generic::EchoOnStringRequest { response })
4633            }
4634
4635            pub fn on_string_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
4636            where
4637                ___R: ::fidl_next::Encode<
4638                        <super::OnString as ::fidl_next::Method>::Request,
4639                        <___T as ::fidl_next::Transport>::SendBuffer,
4640                    >,
4641            {
4642                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
4643                    1382143211280629483,
4644                    <super::OnString as ::fidl_next::Method>::FLEXIBILITY,
4645                    request,
4646                ))
4647            }
4648        }
4649    }
4650}
4651
4652#[diagnostic::on_unimplemented(
4653    note = "If {Self} implements the non-local EchoClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4654)]
4655
4656/// A client handler for the Echo protocol.
4657///
4658/// See [`Echo`] for more details.
4659pub trait EchoLocalClientHandler<
4660    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4661    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4662>
4663{
4664    fn on_string(
4665        &mut self,
4666
4667        request: ::fidl_next::Request<echo::OnString, ___T>,
4668    ) -> impl ::core::future::Future<Output = ()>;
4669}
4670
4671impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Echo
4672where
4673    ___H: EchoLocalClientHandler<___T>,
4674    ___T: ::fidl_next::Transport,
4675    for<'de> crate::wire::EchoOnStringRequest<'de>: ::fidl_next::Decode<
4676            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4677            Constraint = (),
4678        >,
4679{
4680    async fn on_event(
4681        handler: &mut ___H,
4682        mut message: ::fidl_next::Message<___T>,
4683    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4684        match *message.header().ordinal {
4685            1382143211280629483 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4686                Ok(decoded) => {
4687                    handler.on_string(::fidl_next::Request::from_decoded(decoded)).await;
4688                    Ok(())
4689                }
4690                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4691                    ordinal: 1382143211280629483,
4692                    error,
4693                }),
4694            },
4695
4696            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4697        }
4698    }
4699}
4700
4701#[diagnostic::on_unimplemented(
4702    note = "If {Self} implements the non-local EchoServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4703)]
4704
4705/// A server handler for the Echo protocol.
4706///
4707/// See [`Echo`] for more details.
4708pub trait EchoLocalServerHandler<
4709    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4710    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4711>
4712{
4713    fn echo_string(
4714        &mut self,
4715
4716        request: ::fidl_next::Request<echo::EchoString, ___T>,
4717
4718        responder: ::fidl_next::Responder<echo::EchoString, ___T>,
4719    ) -> impl ::core::future::Future<Output = ()>;
4720
4721    fn send_string(
4722        &mut self,
4723
4724        request: ::fidl_next::Request<echo::SendString, ___T>,
4725    ) -> impl ::core::future::Future<Output = ()>;
4726}
4727
4728impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Echo
4729where
4730    ___H: EchoLocalServerHandler<___T>,
4731    ___T: ::fidl_next::Transport,
4732    for<'de> crate::wire::EchoEchoStringRequest<'de>: ::fidl_next::Decode<
4733            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4734            Constraint = (),
4735        >,
4736    for<'de> crate::wire::EchoSendStringRequest<'de>: ::fidl_next::Decode<
4737            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4738            Constraint = (),
4739        >,
4740{
4741    async fn on_one_way(
4742        handler: &mut ___H,
4743        mut message: ::fidl_next::Message<___T>,
4744    ) -> ::core::result::Result<
4745        (),
4746        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4747    > {
4748        match *message.header().ordinal {
4749            6693688511394337905 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4750                Ok(decoded) => {
4751                    handler.send_string(::fidl_next::Request::from_decoded(decoded)).await;
4752                    Ok(())
4753                }
4754                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4755                    ordinal: 6693688511394337905,
4756                    error,
4757                }),
4758            },
4759
4760            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4761        }
4762    }
4763
4764    async fn on_two_way(
4765        handler: &mut ___H,
4766        mut message: ::fidl_next::Message<___T>,
4767        responder: ::fidl_next::protocol::Responder<___T>,
4768    ) -> ::core::result::Result<
4769        (),
4770        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4771    > {
4772        match *message.header().ordinal {
4773            8482573115503257110 => {
4774                let responder = ::fidl_next::Responder::from_untyped(responder);
4775
4776                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4777                    Ok(decoded) => {
4778                        handler
4779                            .echo_string(::fidl_next::Request::from_decoded(decoded), responder)
4780                            .await;
4781                        Ok(())
4782                    }
4783                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4784                        ordinal: 8482573115503257110,
4785                        error,
4786                    }),
4787                }
4788            }
4789
4790            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4791        }
4792    }
4793}
4794
4795/// A client handler for the Echo protocol.
4796///
4797/// See [`Echo`] for more details.
4798pub trait EchoClientHandler<
4799    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4800    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4801>
4802{
4803    fn on_string(
4804        &mut self,
4805
4806        request: ::fidl_next::Request<echo::OnString, ___T>,
4807    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4808}
4809
4810impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Echo
4811where
4812    ___H: EchoClientHandler<___T> + ::core::marker::Send,
4813    ___T: ::fidl_next::Transport,
4814    for<'de> crate::wire::EchoOnStringRequest<'de>: ::fidl_next::Decode<
4815            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4816            Constraint = (),
4817        >,
4818{
4819    async fn on_event(
4820        handler: &mut ___H,
4821        mut message: ::fidl_next::Message<___T>,
4822    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4823        match *message.header().ordinal {
4824            1382143211280629483 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4825                Ok(decoded) => {
4826                    handler.on_string(::fidl_next::Request::from_decoded(decoded)).await;
4827                    Ok(())
4828                }
4829                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4830                    ordinal: 1382143211280629483,
4831                    error,
4832                }),
4833            },
4834
4835            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4836        }
4837    }
4838}
4839
4840/// A server handler for the Echo protocol.
4841///
4842/// See [`Echo`] for more details.
4843pub trait EchoServerHandler<
4844    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4845    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4846>
4847{
4848    fn echo_string(
4849        &mut self,
4850
4851        request: ::fidl_next::Request<echo::EchoString, ___T>,
4852
4853        responder: ::fidl_next::Responder<echo::EchoString, ___T>,
4854    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4855
4856    fn send_string(
4857        &mut self,
4858
4859        request: ::fidl_next::Request<echo::SendString, ___T>,
4860    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4861}
4862
4863impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Echo
4864where
4865    ___H: EchoServerHandler<___T> + ::core::marker::Send,
4866    ___T: ::fidl_next::Transport,
4867    for<'de> crate::wire::EchoEchoStringRequest<'de>: ::fidl_next::Decode<
4868            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4869            Constraint = (),
4870        >,
4871    for<'de> crate::wire::EchoSendStringRequest<'de>: ::fidl_next::Decode<
4872            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4873            Constraint = (),
4874        >,
4875{
4876    async fn on_one_way(
4877        handler: &mut ___H,
4878        mut message: ::fidl_next::Message<___T>,
4879    ) -> ::core::result::Result<
4880        (),
4881        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4882    > {
4883        match *message.header().ordinal {
4884            6693688511394337905 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4885                Ok(decoded) => {
4886                    handler.send_string(::fidl_next::Request::from_decoded(decoded)).await;
4887                    Ok(())
4888                }
4889                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4890                    ordinal: 6693688511394337905,
4891                    error,
4892                }),
4893            },
4894
4895            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4896        }
4897    }
4898
4899    async fn on_two_way(
4900        handler: &mut ___H,
4901        mut message: ::fidl_next::Message<___T>,
4902        responder: ::fidl_next::protocol::Responder<___T>,
4903    ) -> ::core::result::Result<
4904        (),
4905        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4906    > {
4907        match *message.header().ordinal {
4908            8482573115503257110 => {
4909                let responder = ::fidl_next::Responder::from_untyped(responder);
4910
4911                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4912                    Ok(decoded) => {
4913                        handler
4914                            .echo_string(::fidl_next::Request::from_decoded(decoded), responder)
4915                            .await;
4916                        Ok(())
4917                    }
4918                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4919                        ordinal: 8482573115503257110,
4920                        error,
4921                    }),
4922                }
4923            }
4924
4925            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4926        }
4927    }
4928}
4929
4930impl<___T> EchoClientHandler<___T> for ::fidl_next::IgnoreEvents
4931where
4932    ___T: ::fidl_next::Transport,
4933{
4934    async fn on_string(&mut self, _: ::fidl_next::Request<echo::OnString, ___T>) {}
4935}
4936
4937impl<___H, ___T> EchoLocalClientHandler<___T> for ::fidl_next::Local<___H>
4938where
4939    ___H: EchoClientHandler<___T>,
4940    ___T: ::fidl_next::Transport,
4941{
4942    async fn on_string(&mut self, request: ::fidl_next::Request<echo::OnString, ___T>) {
4943        ___H::on_string(&mut self.0, request).await
4944    }
4945}
4946
4947impl<___H, ___T> EchoLocalServerHandler<___T> for ::fidl_next::Local<___H>
4948where
4949    ___H: EchoServerHandler<___T>,
4950    ___T: ::fidl_next::Transport,
4951{
4952    async fn echo_string(
4953        &mut self,
4954
4955        request: ::fidl_next::Request<echo::EchoString, ___T>,
4956
4957        responder: ::fidl_next::Responder<echo::EchoString, ___T>,
4958    ) {
4959        ___H::echo_string(&mut self.0, request, responder).await
4960    }
4961
4962    async fn send_string(&mut self, request: ::fidl_next::Request<echo::SendString, ___T>) {
4963        ___H::send_string(&mut self.0, request).await
4964    }
4965}
4966
4967pub const NAME: &str = "Tic-Tac-Toe";
4968
4969/// The type corresponding to the TicTacToe protocol.
4970#[derive(PartialEq, Debug)]
4971pub struct TicTacToe;
4972
4973#[cfg(target_os = "fuchsia")]
4974impl ::fidl_next::HasTransport for TicTacToe {
4975    type Transport = ::fidl_next::fuchsia::zx::Channel;
4976}
4977
4978pub mod tic_tac_toe {
4979    pub mod prelude {
4980        pub use crate::{
4981            TicTacToe, TicTacToeClientHandler, TicTacToeLocalClientHandler,
4982            TicTacToeLocalServerHandler, TicTacToeServerHandler, tic_tac_toe,
4983        };
4984
4985        pub use crate::natural::TicTacToeMakeMoveRequest;
4986
4987        pub use crate::natural::TicTacToeMakeMoveResponse;
4988
4989        pub use crate::natural::TicTacToeOnOpponentMoveRequest;
4990
4991        pub use crate::natural::TicTacToeStartGameRequest;
4992    }
4993
4994    pub struct StartGame;
4995
4996    impl ::fidl_next::Method for StartGame {
4997        const ORDINAL: u64 = 1597785876893992537;
4998        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4999            ::fidl_next::protocol::Flexibility::Strict;
5000
5001        type Protocol = crate::TicTacToe;
5002
5003        type Request = crate::wire::TicTacToeStartGameRequest;
5004    }
5005
5006    pub struct MakeMove;
5007
5008    impl ::fidl_next::Method for MakeMove {
5009        const ORDINAL: u64 = 9215857243616535889;
5010        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5011            ::fidl_next::protocol::Flexibility::Strict;
5012
5013        type Protocol = crate::TicTacToe;
5014
5015        type Request = crate::wire::TicTacToeMakeMoveRequest;
5016    }
5017
5018    impl ::fidl_next::TwoWayMethod for MakeMove {
5019        type Response = ::fidl_next::wire::Strict<crate::wire::TicTacToeMakeMoveResponse<'static>>;
5020    }
5021
5022    impl<___R> ::fidl_next::Respond<___R> for MakeMove {
5023        type Output = ::fidl_next::Strict<___R>;
5024
5025        fn respond(response: ___R) -> Self::Output {
5026            ::fidl_next::Strict(response)
5027        }
5028    }
5029
5030    pub struct OnOpponentMove;
5031
5032    impl ::fidl_next::Method for OnOpponentMove {
5033        const ORDINAL: u64 = 6020456714778822440;
5034        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5035            ::fidl_next::protocol::Flexibility::Strict;
5036
5037        type Protocol = crate::TicTacToe;
5038
5039        type Request = crate::wire::TicTacToeOnOpponentMoveRequest;
5040    }
5041
5042    mod ___detail {
5043        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::TicTacToe
5044        where
5045            ___T: ::fidl_next::Transport,
5046        {
5047            type Client = TicTacToeClient<___T>;
5048            type Server = TicTacToeServer<___T>;
5049        }
5050
5051        /// The client for the `TicTacToe` protocol.
5052        #[repr(transparent)]
5053        pub struct TicTacToeClient<___T: ::fidl_next::Transport> {
5054            #[allow(dead_code)]
5055            client: ::fidl_next::protocol::Client<___T>,
5056        }
5057
5058        impl<___T> TicTacToeClient<___T>
5059        where
5060            ___T: ::fidl_next::Transport,
5061        {
5062            pub fn start_game(
5063                &self,
5064
5065                start_first: impl ::fidl_next::Encode<
5066                    bool,
5067                    <___T as ::fidl_next::Transport>::SendBuffer,
5068                >,
5069            ) -> ::fidl_next::SendFuture<'_, ___T>
5070            where
5071                <___T as ::fidl_next::Transport>::SendBuffer:
5072                    ::fidl_next::encoder::InternalHandleEncoder,
5073            {
5074                self.start_game_with(crate::generic::TicTacToeStartGameRequest { start_first })
5075            }
5076
5077            pub fn start_game_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
5078            where
5079                ___R: ::fidl_next::Encode<
5080                        crate::wire::TicTacToeStartGameRequest,
5081                        <___T as ::fidl_next::Transport>::SendBuffer,
5082                    >,
5083            {
5084                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5085                    1597785876893992537,
5086                    <super::StartGame as ::fidl_next::Method>::FLEXIBILITY,
5087                    request,
5088                ))
5089            }
5090
5091            pub fn make_move(
5092                &self,
5093
5094                row: impl ::fidl_next::Encode<u8, <___T as ::fidl_next::Transport>::SendBuffer>,
5095
5096                col: impl ::fidl_next::Encode<u8, <___T as ::fidl_next::Transport>::SendBuffer>,
5097            ) -> ::fidl_next::TwoWayFuture<'_, super::MakeMove, ___T>
5098            where
5099                <___T as ::fidl_next::Transport>::SendBuffer:
5100                    ::fidl_next::encoder::InternalHandleEncoder,
5101            {
5102                self.make_move_with(crate::generic::TicTacToeMakeMoveRequest { row, col })
5103            }
5104
5105            pub fn make_move_with<___R>(
5106                &self,
5107                request: ___R,
5108            ) -> ::fidl_next::TwoWayFuture<'_, super::MakeMove, ___T>
5109            where
5110                ___R: ::fidl_next::Encode<
5111                        crate::wire::TicTacToeMakeMoveRequest,
5112                        <___T as ::fidl_next::Transport>::SendBuffer,
5113                    >,
5114            {
5115                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5116                    9215857243616535889,
5117                    <super::MakeMove as ::fidl_next::Method>::FLEXIBILITY,
5118                    request,
5119                ))
5120            }
5121        }
5122
5123        /// The server for the `TicTacToe` protocol.
5124        #[repr(transparent)]
5125        pub struct TicTacToeServer<___T: ::fidl_next::Transport> {
5126            server: ::fidl_next::protocol::Server<___T>,
5127        }
5128
5129        impl<___T> TicTacToeServer<___T>
5130        where
5131            ___T: ::fidl_next::Transport,
5132        {
5133            pub fn on_opponent_move(
5134                &self,
5135
5136                new_state: impl ::fidl_next::Encode<
5137                    crate::wire::GameState,
5138                    <___T as ::fidl_next::Transport>::SendBuffer,
5139                >,
5140            ) -> ::fidl_next::SendFuture<'_, ___T>
5141            where
5142                <___T as ::fidl_next::Transport>::SendBuffer:
5143                    ::fidl_next::encoder::InternalHandleEncoder,
5144            {
5145                self.on_opponent_move_with(crate::generic::TicTacToeOnOpponentMoveRequest {
5146                    new_state,
5147                })
5148            }
5149
5150            pub fn on_opponent_move_with<___R>(
5151                &self,
5152                request: ___R,
5153            ) -> ::fidl_next::SendFuture<'_, ___T>
5154            where
5155                ___R: ::fidl_next::Encode<
5156                        <super::OnOpponentMove as ::fidl_next::Method>::Request,
5157                        <___T as ::fidl_next::Transport>::SendBuffer,
5158                    >,
5159            {
5160                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
5161                    6020456714778822440,
5162                    <super::OnOpponentMove as ::fidl_next::Method>::FLEXIBILITY,
5163                    request,
5164                ))
5165            }
5166        }
5167    }
5168}
5169
5170#[diagnostic::on_unimplemented(
5171    note = "If {Self} implements the non-local TicTacToeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5172)]
5173
5174/// A client handler for the TicTacToe protocol.
5175///
5176/// See [`TicTacToe`] for more details.
5177pub trait TicTacToeLocalClientHandler<
5178    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5179    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5180>
5181{
5182    fn on_opponent_move(
5183        &mut self,
5184
5185        request: ::fidl_next::Request<tic_tac_toe::OnOpponentMove, ___T>,
5186    ) -> impl ::core::future::Future<Output = ()>;
5187}
5188
5189impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for TicTacToe
5190where
5191    ___H: TicTacToeLocalClientHandler<___T>,
5192    ___T: ::fidl_next::Transport,
5193    for<'de> crate::wire::TicTacToeOnOpponentMoveRequest: ::fidl_next::Decode<
5194            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5195            Constraint = (),
5196        >,
5197{
5198    async fn on_event(
5199        handler: &mut ___H,
5200        mut message: ::fidl_next::Message<___T>,
5201    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5202        match *message.header().ordinal {
5203            6020456714778822440 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5204                Ok(decoded) => {
5205                    handler.on_opponent_move(::fidl_next::Request::from_decoded(decoded)).await;
5206                    Ok(())
5207                }
5208                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5209                    ordinal: 6020456714778822440,
5210                    error,
5211                }),
5212            },
5213
5214            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5215        }
5216    }
5217}
5218
5219#[diagnostic::on_unimplemented(
5220    note = "If {Self} implements the non-local TicTacToeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5221)]
5222
5223/// A server handler for the TicTacToe protocol.
5224///
5225/// See [`TicTacToe`] for more details.
5226pub trait TicTacToeLocalServerHandler<
5227    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5228    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5229>
5230{
5231    fn start_game(
5232        &mut self,
5233
5234        request: ::fidl_next::Request<tic_tac_toe::StartGame, ___T>,
5235    ) -> impl ::core::future::Future<Output = ()>;
5236
5237    fn make_move(
5238        &mut self,
5239
5240        request: ::fidl_next::Request<tic_tac_toe::MakeMove, ___T>,
5241
5242        responder: ::fidl_next::Responder<tic_tac_toe::MakeMove, ___T>,
5243    ) -> impl ::core::future::Future<Output = ()>;
5244}
5245
5246impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for TicTacToe
5247where
5248    ___H: TicTacToeLocalServerHandler<___T>,
5249    ___T: ::fidl_next::Transport,
5250    for<'de> crate::wire::TicTacToeStartGameRequest: ::fidl_next::Decode<
5251            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5252            Constraint = (),
5253        >,
5254    for<'de> crate::wire::TicTacToeMakeMoveRequest: ::fidl_next::Decode<
5255            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5256            Constraint = (),
5257        >,
5258{
5259    async fn on_one_way(
5260        handler: &mut ___H,
5261        mut message: ::fidl_next::Message<___T>,
5262    ) -> ::core::result::Result<
5263        (),
5264        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5265    > {
5266        match *message.header().ordinal {
5267            1597785876893992537 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5268                Ok(decoded) => {
5269                    handler.start_game(::fidl_next::Request::from_decoded(decoded)).await;
5270                    Ok(())
5271                }
5272                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5273                    ordinal: 1597785876893992537,
5274                    error,
5275                }),
5276            },
5277
5278            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5279        }
5280    }
5281
5282    async fn on_two_way(
5283        handler: &mut ___H,
5284        mut message: ::fidl_next::Message<___T>,
5285        responder: ::fidl_next::protocol::Responder<___T>,
5286    ) -> ::core::result::Result<
5287        (),
5288        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5289    > {
5290        match *message.header().ordinal {
5291            9215857243616535889 => {
5292                let responder = ::fidl_next::Responder::from_untyped(responder);
5293
5294                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5295                    Ok(decoded) => {
5296                        handler
5297                            .make_move(::fidl_next::Request::from_decoded(decoded), responder)
5298                            .await;
5299                        Ok(())
5300                    }
5301                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5302                        ordinal: 9215857243616535889,
5303                        error,
5304                    }),
5305                }
5306            }
5307
5308            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5309        }
5310    }
5311}
5312
5313/// A client handler for the TicTacToe protocol.
5314///
5315/// See [`TicTacToe`] for more details.
5316pub trait TicTacToeClientHandler<
5317    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5318    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5319>
5320{
5321    fn on_opponent_move(
5322        &mut self,
5323
5324        request: ::fidl_next::Request<tic_tac_toe::OnOpponentMove, ___T>,
5325    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5326}
5327
5328impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for TicTacToe
5329where
5330    ___H: TicTacToeClientHandler<___T> + ::core::marker::Send,
5331    ___T: ::fidl_next::Transport,
5332    for<'de> crate::wire::TicTacToeOnOpponentMoveRequest: ::fidl_next::Decode<
5333            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5334            Constraint = (),
5335        >,
5336{
5337    async fn on_event(
5338        handler: &mut ___H,
5339        mut message: ::fidl_next::Message<___T>,
5340    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5341        match *message.header().ordinal {
5342            6020456714778822440 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5343                Ok(decoded) => {
5344                    handler.on_opponent_move(::fidl_next::Request::from_decoded(decoded)).await;
5345                    Ok(())
5346                }
5347                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5348                    ordinal: 6020456714778822440,
5349                    error,
5350                }),
5351            },
5352
5353            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5354        }
5355    }
5356}
5357
5358/// A server handler for the TicTacToe protocol.
5359///
5360/// See [`TicTacToe`] for more details.
5361pub trait TicTacToeServerHandler<
5362    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5363    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5364>
5365{
5366    fn start_game(
5367        &mut self,
5368
5369        request: ::fidl_next::Request<tic_tac_toe::StartGame, ___T>,
5370    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5371
5372    fn make_move(
5373        &mut self,
5374
5375        request: ::fidl_next::Request<tic_tac_toe::MakeMove, ___T>,
5376
5377        responder: ::fidl_next::Responder<tic_tac_toe::MakeMove, ___T>,
5378    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5379}
5380
5381impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for TicTacToe
5382where
5383    ___H: TicTacToeServerHandler<___T> + ::core::marker::Send,
5384    ___T: ::fidl_next::Transport,
5385    for<'de> crate::wire::TicTacToeStartGameRequest: ::fidl_next::Decode<
5386            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5387            Constraint = (),
5388        >,
5389    for<'de> crate::wire::TicTacToeMakeMoveRequest: ::fidl_next::Decode<
5390            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5391            Constraint = (),
5392        >,
5393{
5394    async fn on_one_way(
5395        handler: &mut ___H,
5396        mut message: ::fidl_next::Message<___T>,
5397    ) -> ::core::result::Result<
5398        (),
5399        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5400    > {
5401        match *message.header().ordinal {
5402            1597785876893992537 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5403                Ok(decoded) => {
5404                    handler.start_game(::fidl_next::Request::from_decoded(decoded)).await;
5405                    Ok(())
5406                }
5407                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5408                    ordinal: 1597785876893992537,
5409                    error,
5410                }),
5411            },
5412
5413            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5414        }
5415    }
5416
5417    async fn on_two_way(
5418        handler: &mut ___H,
5419        mut message: ::fidl_next::Message<___T>,
5420        responder: ::fidl_next::protocol::Responder<___T>,
5421    ) -> ::core::result::Result<
5422        (),
5423        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5424    > {
5425        match *message.header().ordinal {
5426            9215857243616535889 => {
5427                let responder = ::fidl_next::Responder::from_untyped(responder);
5428
5429                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5430                    Ok(decoded) => {
5431                        handler
5432                            .make_move(::fidl_next::Request::from_decoded(decoded), responder)
5433                            .await;
5434                        Ok(())
5435                    }
5436                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5437                        ordinal: 9215857243616535889,
5438                        error,
5439                    }),
5440                }
5441            }
5442
5443            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5444        }
5445    }
5446}
5447
5448impl<___T> TicTacToeClientHandler<___T> for ::fidl_next::IgnoreEvents
5449where
5450    ___T: ::fidl_next::Transport,
5451{
5452    async fn on_opponent_move(
5453        &mut self,
5454
5455        _: ::fidl_next::Request<tic_tac_toe::OnOpponentMove, ___T>,
5456    ) {
5457    }
5458}
5459
5460impl<___H, ___T> TicTacToeLocalClientHandler<___T> for ::fidl_next::Local<___H>
5461where
5462    ___H: TicTacToeClientHandler<___T>,
5463    ___T: ::fidl_next::Transport,
5464{
5465    async fn on_opponent_move(
5466        &mut self,
5467
5468        request: ::fidl_next::Request<tic_tac_toe::OnOpponentMove, ___T>,
5469    ) {
5470        ___H::on_opponent_move(&mut self.0, request).await
5471    }
5472}
5473
5474impl<___H, ___T> TicTacToeLocalServerHandler<___T> for ::fidl_next::Local<___H>
5475where
5476    ___H: TicTacToeServerHandler<___T>,
5477    ___T: ::fidl_next::Transport,
5478{
5479    async fn start_game(&mut self, request: ::fidl_next::Request<tic_tac_toe::StartGame, ___T>) {
5480        ___H::start_game(&mut self.0, request).await
5481    }
5482
5483    async fn make_move(
5484        &mut self,
5485
5486        request: ::fidl_next::Request<tic_tac_toe::MakeMove, ___T>,
5487
5488        responder: ::fidl_next::Responder<tic_tac_toe::MakeMove, ___T>,
5489    ) {
5490        ___H::make_move(&mut self.0, request, responder).await
5491    }
5492}