Skip to main content

fidl_next_common_fuchsia_ui_input/
fidl_next_common_fuchsia_ui_input.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    #[doc = " Describes the type of change that occurred to an input device.\n"]
8    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9    #[repr(u32)]
10    pub enum Action {
11        Added = 1,
12        Updated = 2,
13        Removed = 3,
14        UnknownOrdinal_(u32) = 4,
15    }
16    impl ::std::convert::From<u32> for Action {
17        fn from(value: u32) -> Self {
18            match value {
19                1 => Self::Added,
20                2 => Self::Updated,
21                3 => Self::Removed,
22
23                _ => Self::UnknownOrdinal_(value),
24            }
25        }
26    }
27
28    impl ::std::convert::From<Action> for u32 {
29        fn from(value: Action) -> Self {
30            match value {
31                Action::Added => 1,
32                Action::Updated => 2,
33                Action::Removed => 3,
34
35                Action::UnknownOrdinal_(value) => value,
36            }
37        }
38    }
39
40    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Action, ___E> for Action
41    where
42        ___E: ?Sized,
43    {
44        #[inline]
45        fn encode(
46            self,
47            encoder: &mut ___E,
48            out: &mut ::core::mem::MaybeUninit<crate::wire::Action>,
49            _: (),
50        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
51            ::fidl_next::Encode::encode(&self, encoder, out, ())
52        }
53    }
54
55    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Action, ___E> for &'a Action
56    where
57        ___E: ?Sized,
58    {
59        #[inline]
60        fn encode(
61            self,
62            encoder: &mut ___E,
63            out: &mut ::core::mem::MaybeUninit<crate::wire::Action>,
64            _: (),
65        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
66            ::fidl_next::munge!(let crate::wire::Action { value } = out);
67            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
68                Action::Added => 1,
69
70                Action::Updated => 2,
71
72                Action::Removed => 3,
73
74                Action::UnknownOrdinal_(value) => value,
75            }));
76
77            Ok(())
78        }
79    }
80
81    impl ::core::convert::From<crate::wire::Action> for Action {
82        fn from(wire: crate::wire::Action) -> Self {
83            match u32::from(wire.value) {
84                1 => Self::Added,
85
86                2 => Self::Updated,
87
88                3 => Self::Removed,
89
90                value => Self::UnknownOrdinal_(value),
91            }
92        }
93    }
94
95    impl ::fidl_next::FromWire<crate::wire::Action> for Action {
96        #[inline]
97        fn from_wire(wire: crate::wire::Action) -> Self {
98            Self::from(wire)
99        }
100    }
101
102    impl ::fidl_next::FromWireRef<crate::wire::Action> for Action {
103        #[inline]
104        fn from_wire_ref(wire: &crate::wire::Action) -> Self {
105            Self::from(*wire)
106        }
107    }
108
109    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
110    #[repr(C)]
111    pub struct Range {
112        pub min: i32,
113
114        pub max: i32,
115    }
116
117    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Range, ___E> for Range
118    where
119        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
120    {
121        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Range> = unsafe {
122            ::fidl_next::CopyOptimization::enable_if(
123            true
124
125                && <
126                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
127                >::COPY_OPTIMIZATION.is_enabled()
128
129                && <
130                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
131                >::COPY_OPTIMIZATION.is_enabled()
132
133        )
134        };
135
136        #[inline]
137        fn encode(
138            self,
139            encoder_: &mut ___E,
140            out_: &mut ::core::mem::MaybeUninit<crate::wire::Range>,
141            _: (),
142        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
143            ::fidl_next::munge! {
144                let crate::wire::Range {
145                    min,
146                    max,
147
148                } = out_;
149            }
150
151            ::fidl_next::Encode::encode(self.min, encoder_, min, ())?;
152
153            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(min.as_mut_ptr()) };
154
155            ::fidl_next::Encode::encode(self.max, encoder_, max, ())?;
156
157            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max.as_mut_ptr()) };
158
159            Ok(())
160        }
161    }
162
163    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Range, ___E> for &'a Range
164    where
165        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
166    {
167        #[inline]
168        fn encode(
169            self,
170            encoder_: &mut ___E,
171            out_: &mut ::core::mem::MaybeUninit<crate::wire::Range>,
172            _: (),
173        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
174            ::fidl_next::munge! {
175                let crate::wire::Range {
176                    min,
177                    max,
178
179                } = out_;
180            }
181
182            ::fidl_next::Encode::encode(&self.min, encoder_, min, ())?;
183
184            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(min.as_mut_ptr()) };
185
186            ::fidl_next::Encode::encode(&self.max, encoder_, max, ())?;
187
188            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max.as_mut_ptr()) };
189
190            Ok(())
191        }
192    }
193
194    unsafe impl<___E>
195        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Range>, ___E>
196        for Range
197    where
198        ___E: ::fidl_next::Encoder + ?Sized,
199        Range: ::fidl_next::Encode<crate::wire::Range, ___E>,
200    {
201        #[inline]
202        fn encode_option(
203            this: ::core::option::Option<Self>,
204            encoder: &mut ___E,
205            out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Range>>,
206            _: (),
207        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
208            if let Some(inner) = this {
209                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
210                ::fidl_next::wire::Box::encode_present(out);
211            } else {
212                ::fidl_next::wire::Box::encode_absent(out);
213            }
214
215            Ok(())
216        }
217    }
218
219    unsafe impl<'a, ___E>
220        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Range>, ___E>
221        for &'a Range
222    where
223        ___E: ::fidl_next::Encoder + ?Sized,
224        &'a Range: ::fidl_next::Encode<crate::wire::Range, ___E>,
225    {
226        #[inline]
227        fn encode_option(
228            this: ::core::option::Option<Self>,
229            encoder: &mut ___E,
230            out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Range>>,
231            _: (),
232        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
233            if let Some(inner) = this {
234                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
235                ::fidl_next::wire::Box::encode_present(out);
236            } else {
237                ::fidl_next::wire::Box::encode_absent(out);
238            }
239
240            Ok(())
241        }
242    }
243
244    impl ::fidl_next::FromWire<crate::wire::Range> for Range {
245        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Range, Self> = unsafe {
246            ::fidl_next::CopyOptimization::enable_if(
247                true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
248                    .is_enabled()
249                    && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
250                        .is_enabled(),
251            )
252        };
253
254        #[inline]
255        fn from_wire(wire: crate::wire::Range) -> Self {
256            Self {
257                min: ::fidl_next::FromWire::from_wire(wire.min),
258
259                max: ::fidl_next::FromWire::from_wire(wire.max),
260            }
261        }
262    }
263
264    impl ::fidl_next::FromWireRef<crate::wire::Range> for Range {
265        #[inline]
266        fn from_wire_ref(wire: &crate::wire::Range) -> Self {
267            Self {
268                min: ::fidl_next::FromWireRef::from_wire_ref(&wire.min),
269
270                max: ::fidl_next::FromWireRef::from_wire_ref(&wire.max),
271            }
272        }
273    }
274
275    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
276    #[repr(u32)]
277    pub enum AxisScale {
278        Linear = 0,
279        Logarithmic = 1,
280        UnknownOrdinal_(u32) = 2,
281    }
282    impl ::std::convert::From<u32> for AxisScale {
283        fn from(value: u32) -> Self {
284            match value {
285                0 => Self::Linear,
286                1 => Self::Logarithmic,
287
288                _ => Self::UnknownOrdinal_(value),
289            }
290        }
291    }
292
293    impl ::std::convert::From<AxisScale> for u32 {
294        fn from(value: AxisScale) -> Self {
295            match value {
296                AxisScale::Linear => 0,
297                AxisScale::Logarithmic => 1,
298
299                AxisScale::UnknownOrdinal_(value) => value,
300            }
301        }
302    }
303
304    unsafe impl<___E> ::fidl_next::Encode<crate::wire::AxisScale, ___E> for AxisScale
305    where
306        ___E: ?Sized,
307    {
308        #[inline]
309        fn encode(
310            self,
311            encoder: &mut ___E,
312            out: &mut ::core::mem::MaybeUninit<crate::wire::AxisScale>,
313            _: (),
314        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
315            ::fidl_next::Encode::encode(&self, encoder, out, ())
316        }
317    }
318
319    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AxisScale, ___E> for &'a AxisScale
320    where
321        ___E: ?Sized,
322    {
323        #[inline]
324        fn encode(
325            self,
326            encoder: &mut ___E,
327            out: &mut ::core::mem::MaybeUninit<crate::wire::AxisScale>,
328            _: (),
329        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
330            ::fidl_next::munge!(let crate::wire::AxisScale { value } = out);
331            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
332                AxisScale::Linear => 0,
333
334                AxisScale::Logarithmic => 1,
335
336                AxisScale::UnknownOrdinal_(value) => value,
337            }));
338
339            Ok(())
340        }
341    }
342
343    impl ::core::convert::From<crate::wire::AxisScale> for AxisScale {
344        fn from(wire: crate::wire::AxisScale) -> Self {
345            match u32::from(wire.value) {
346                0 => Self::Linear,
347
348                1 => Self::Logarithmic,
349
350                value => Self::UnknownOrdinal_(value),
351            }
352        }
353    }
354
355    impl ::fidl_next::FromWire<crate::wire::AxisScale> for AxisScale {
356        #[inline]
357        fn from_wire(wire: crate::wire::AxisScale) -> Self {
358            Self::from(wire)
359        }
360    }
361
362    impl ::fidl_next::FromWireRef<crate::wire::AxisScale> for AxisScale {
363        #[inline]
364        fn from_wire_ref(wire: &crate::wire::AxisScale) -> Self {
365            Self::from(*wire)
366        }
367    }
368
369    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
370    #[repr(C)]
371    pub struct Axis {
372        pub range: crate::natural::Range,
373
374        pub resolution: i32,
375
376        pub scale: crate::natural::AxisScale,
377    }
378
379    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Axis, ___E> for Axis
380    where
381        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
382    {
383        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Axis> = unsafe {
384            ::fidl_next::CopyOptimization::enable_if(
385            true
386
387                && <
388                    crate::natural::Range as ::fidl_next::Encode<crate::wire::Range, ___E>
389                >::COPY_OPTIMIZATION.is_enabled()
390
391                && <
392                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
393                >::COPY_OPTIMIZATION.is_enabled()
394
395                && <
396                    crate::natural::AxisScale as ::fidl_next::Encode<crate::wire::AxisScale, ___E>
397                >::COPY_OPTIMIZATION.is_enabled()
398
399        )
400        };
401
402        #[inline]
403        fn encode(
404            self,
405            encoder_: &mut ___E,
406            out_: &mut ::core::mem::MaybeUninit<crate::wire::Axis>,
407            _: (),
408        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
409            ::fidl_next::munge! {
410                let crate::wire::Axis {
411                    range,
412                    resolution,
413                    scale,
414
415                } = out_;
416            }
417
418            ::fidl_next::Encode::encode(self.range, encoder_, range, ())?;
419
420            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(range.as_mut_ptr()) };
421
422            ::fidl_next::Encode::encode(self.resolution, encoder_, resolution, ())?;
423
424            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(resolution.as_mut_ptr()) };
425
426            ::fidl_next::Encode::encode(self.scale, encoder_, scale, ())?;
427
428            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(scale.as_mut_ptr()) };
429
430            Ok(())
431        }
432    }
433
434    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Axis, ___E> for &'a Axis
435    where
436        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
437    {
438        #[inline]
439        fn encode(
440            self,
441            encoder_: &mut ___E,
442            out_: &mut ::core::mem::MaybeUninit<crate::wire::Axis>,
443            _: (),
444        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
445            ::fidl_next::munge! {
446                let crate::wire::Axis {
447                    range,
448                    resolution,
449                    scale,
450
451                } = out_;
452            }
453
454            ::fidl_next::Encode::encode(&self.range, encoder_, range, ())?;
455
456            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(range.as_mut_ptr()) };
457
458            ::fidl_next::Encode::encode(&self.resolution, encoder_, resolution, ())?;
459
460            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(resolution.as_mut_ptr()) };
461
462            ::fidl_next::Encode::encode(&self.scale, encoder_, scale, ())?;
463
464            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(scale.as_mut_ptr()) };
465
466            Ok(())
467        }
468    }
469
470    unsafe impl<___E>
471        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Axis>, ___E> for Axis
472    where
473        ___E: ::fidl_next::Encoder + ?Sized,
474        Axis: ::fidl_next::Encode<crate::wire::Axis, ___E>,
475    {
476        #[inline]
477        fn encode_option(
478            this: ::core::option::Option<Self>,
479            encoder: &mut ___E,
480            out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Axis>>,
481            _: (),
482        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
483            if let Some(inner) = this {
484                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
485                ::fidl_next::wire::Box::encode_present(out);
486            } else {
487                ::fidl_next::wire::Box::encode_absent(out);
488            }
489
490            Ok(())
491        }
492    }
493
494    unsafe impl<'a, ___E>
495        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Axis>, ___E>
496        for &'a Axis
497    where
498        ___E: ::fidl_next::Encoder + ?Sized,
499        &'a Axis: ::fidl_next::Encode<crate::wire::Axis, ___E>,
500    {
501        #[inline]
502        fn encode_option(
503            this: ::core::option::Option<Self>,
504            encoder: &mut ___E,
505            out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Axis>>,
506            _: (),
507        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
508            if let Some(inner) = this {
509                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
510                ::fidl_next::wire::Box::encode_present(out);
511            } else {
512                ::fidl_next::wire::Box::encode_absent(out);
513            }
514
515            Ok(())
516        }
517    }
518
519    impl ::fidl_next::FromWire<crate::wire::Axis> for Axis {
520        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Axis, Self> = unsafe {
521            ::fidl_next::CopyOptimization::enable_if(
522            true
523
524                && <
525                    crate::natural::Range as ::fidl_next::FromWire<crate::wire::Range>
526                >::COPY_OPTIMIZATION.is_enabled()
527
528                && <
529                    i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>
530                >::COPY_OPTIMIZATION.is_enabled()
531
532                && <
533                    crate::natural::AxisScale as ::fidl_next::FromWire<crate::wire::AxisScale>
534                >::COPY_OPTIMIZATION.is_enabled()
535
536        )
537        };
538
539        #[inline]
540        fn from_wire(wire: crate::wire::Axis) -> Self {
541            Self {
542                range: ::fidl_next::FromWire::from_wire(wire.range),
543
544                resolution: ::fidl_next::FromWire::from_wire(wire.resolution),
545
546                scale: ::fidl_next::FromWire::from_wire(wire.scale),
547            }
548        }
549    }
550
551    impl ::fidl_next::FromWireRef<crate::wire::Axis> for Axis {
552        #[inline]
553        fn from_wire_ref(wire: &crate::wire::Axis) -> Self {
554            Self {
555                range: ::fidl_next::FromWireRef::from_wire_ref(&wire.range),
556
557                resolution: ::fidl_next::FromWireRef::from_wire_ref(&wire.resolution),
558
559                scale: ::fidl_next::FromWireRef::from_wire_ref(&wire.scale),
560            }
561        }
562    }
563
564    #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
565    #[repr(C)]
566    pub struct RangeF {
567        pub min: f32,
568
569        pub max: f32,
570    }
571
572    unsafe impl<___E> ::fidl_next::Encode<crate::wire::RangeF, ___E> for RangeF
573    where
574        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
575    {
576        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::RangeF> = unsafe {
577            ::fidl_next::CopyOptimization::enable_if(
578            true
579
580                && <
581                    f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
582                >::COPY_OPTIMIZATION.is_enabled()
583
584                && <
585                    f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
586                >::COPY_OPTIMIZATION.is_enabled()
587
588        )
589        };
590
591        #[inline]
592        fn encode(
593            self,
594            encoder_: &mut ___E,
595            out_: &mut ::core::mem::MaybeUninit<crate::wire::RangeF>,
596            _: (),
597        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
598            ::fidl_next::munge! {
599                let crate::wire::RangeF {
600                    min,
601                    max,
602
603                } = out_;
604            }
605
606            ::fidl_next::Encode::encode(self.min, encoder_, min, ())?;
607
608            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(min.as_mut_ptr()) };
609
610            ::fidl_next::Encode::encode(self.max, encoder_, max, ())?;
611
612            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max.as_mut_ptr()) };
613
614            Ok(())
615        }
616    }
617
618    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RangeF, ___E> for &'a RangeF
619    where
620        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
621    {
622        #[inline]
623        fn encode(
624            self,
625            encoder_: &mut ___E,
626            out_: &mut ::core::mem::MaybeUninit<crate::wire::RangeF>,
627            _: (),
628        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
629            ::fidl_next::munge! {
630                let crate::wire::RangeF {
631                    min,
632                    max,
633
634                } = out_;
635            }
636
637            ::fidl_next::Encode::encode(&self.min, encoder_, min, ())?;
638
639            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(min.as_mut_ptr()) };
640
641            ::fidl_next::Encode::encode(&self.max, encoder_, max, ())?;
642
643            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max.as_mut_ptr()) };
644
645            Ok(())
646        }
647    }
648
649    unsafe impl<___E>
650        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RangeF>, ___E>
651        for RangeF
652    where
653        ___E: ::fidl_next::Encoder + ?Sized,
654        RangeF: ::fidl_next::Encode<crate::wire::RangeF, ___E>,
655    {
656        #[inline]
657        fn encode_option(
658            this: ::core::option::Option<Self>,
659            encoder: &mut ___E,
660            out: &mut ::core::mem::MaybeUninit<
661                ::fidl_next::wire::Box<'static, crate::wire::RangeF>,
662            >,
663            _: (),
664        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
665            if let Some(inner) = this {
666                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
667                ::fidl_next::wire::Box::encode_present(out);
668            } else {
669                ::fidl_next::wire::Box::encode_absent(out);
670            }
671
672            Ok(())
673        }
674    }
675
676    unsafe impl<'a, ___E>
677        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RangeF>, ___E>
678        for &'a RangeF
679    where
680        ___E: ::fidl_next::Encoder + ?Sized,
681        &'a RangeF: ::fidl_next::Encode<crate::wire::RangeF, ___E>,
682    {
683        #[inline]
684        fn encode_option(
685            this: ::core::option::Option<Self>,
686            encoder: &mut ___E,
687            out: &mut ::core::mem::MaybeUninit<
688                ::fidl_next::wire::Box<'static, crate::wire::RangeF>,
689            >,
690            _: (),
691        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
692            if let Some(inner) = this {
693                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
694                ::fidl_next::wire::Box::encode_present(out);
695            } else {
696                ::fidl_next::wire::Box::encode_absent(out);
697            }
698
699            Ok(())
700        }
701    }
702
703    impl ::fidl_next::FromWire<crate::wire::RangeF> for RangeF {
704        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::RangeF, Self> = unsafe {
705            ::fidl_next::CopyOptimization::enable_if(
706            true
707
708                && <
709                    f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
710                >::COPY_OPTIMIZATION.is_enabled()
711
712                && <
713                    f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
714                >::COPY_OPTIMIZATION.is_enabled()
715
716        )
717        };
718
719        #[inline]
720        fn from_wire(wire: crate::wire::RangeF) -> Self {
721            Self {
722                min: ::fidl_next::FromWire::from_wire(wire.min),
723
724                max: ::fidl_next::FromWire::from_wire(wire.max),
725            }
726        }
727    }
728
729    impl ::fidl_next::FromWireRef<crate::wire::RangeF> for RangeF {
730        #[inline]
731        fn from_wire_ref(wire: &crate::wire::RangeF) -> Self {
732            Self {
733                min: ::fidl_next::FromWireRef::from_wire_ref(&wire.min),
734
735                max: ::fidl_next::FromWireRef::from_wire_ref(&wire.max),
736            }
737        }
738    }
739
740    #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
741    #[repr(C)]
742    pub struct AxisF {
743        pub range: crate::natural::RangeF,
744
745        pub resolution: f32,
746
747        pub scale: crate::natural::AxisScale,
748    }
749
750    unsafe impl<___E> ::fidl_next::Encode<crate::wire::AxisF, ___E> for AxisF
751    where
752        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
753    {
754        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::AxisF> = unsafe {
755            ::fidl_next::CopyOptimization::enable_if(
756            true
757
758                && <
759                    crate::natural::RangeF as ::fidl_next::Encode<crate::wire::RangeF, ___E>
760                >::COPY_OPTIMIZATION.is_enabled()
761
762                && <
763                    f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
764                >::COPY_OPTIMIZATION.is_enabled()
765
766                && <
767                    crate::natural::AxisScale as ::fidl_next::Encode<crate::wire::AxisScale, ___E>
768                >::COPY_OPTIMIZATION.is_enabled()
769
770        )
771        };
772
773        #[inline]
774        fn encode(
775            self,
776            encoder_: &mut ___E,
777            out_: &mut ::core::mem::MaybeUninit<crate::wire::AxisF>,
778            _: (),
779        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
780            ::fidl_next::munge! {
781                let crate::wire::AxisF {
782                    range,
783                    resolution,
784                    scale,
785
786                } = out_;
787            }
788
789            ::fidl_next::Encode::encode(self.range, encoder_, range, ())?;
790
791            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(range.as_mut_ptr()) };
792
793            ::fidl_next::Encode::encode(self.resolution, encoder_, resolution, ())?;
794
795            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(resolution.as_mut_ptr()) };
796
797            ::fidl_next::Encode::encode(self.scale, encoder_, scale, ())?;
798
799            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(scale.as_mut_ptr()) };
800
801            Ok(())
802        }
803    }
804
805    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AxisF, ___E> for &'a AxisF
806    where
807        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
808    {
809        #[inline]
810        fn encode(
811            self,
812            encoder_: &mut ___E,
813            out_: &mut ::core::mem::MaybeUninit<crate::wire::AxisF>,
814            _: (),
815        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
816            ::fidl_next::munge! {
817                let crate::wire::AxisF {
818                    range,
819                    resolution,
820                    scale,
821
822                } = out_;
823            }
824
825            ::fidl_next::Encode::encode(&self.range, encoder_, range, ())?;
826
827            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(range.as_mut_ptr()) };
828
829            ::fidl_next::Encode::encode(&self.resolution, encoder_, resolution, ())?;
830
831            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(resolution.as_mut_ptr()) };
832
833            ::fidl_next::Encode::encode(&self.scale, encoder_, scale, ())?;
834
835            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(scale.as_mut_ptr()) };
836
837            Ok(())
838        }
839    }
840
841    unsafe impl<___E>
842        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::AxisF>, ___E>
843        for AxisF
844    where
845        ___E: ::fidl_next::Encoder + ?Sized,
846        AxisF: ::fidl_next::Encode<crate::wire::AxisF, ___E>,
847    {
848        #[inline]
849        fn encode_option(
850            this: ::core::option::Option<Self>,
851            encoder: &mut ___E,
852            out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::AxisF>>,
853            _: (),
854        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
855            if let Some(inner) = this {
856                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
857                ::fidl_next::wire::Box::encode_present(out);
858            } else {
859                ::fidl_next::wire::Box::encode_absent(out);
860            }
861
862            Ok(())
863        }
864    }
865
866    unsafe impl<'a, ___E>
867        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::AxisF>, ___E>
868        for &'a AxisF
869    where
870        ___E: ::fidl_next::Encoder + ?Sized,
871        &'a AxisF: ::fidl_next::Encode<crate::wire::AxisF, ___E>,
872    {
873        #[inline]
874        fn encode_option(
875            this: ::core::option::Option<Self>,
876            encoder: &mut ___E,
877            out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::AxisF>>,
878            _: (),
879        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
880            if let Some(inner) = this {
881                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
882                ::fidl_next::wire::Box::encode_present(out);
883            } else {
884                ::fidl_next::wire::Box::encode_absent(out);
885            }
886
887            Ok(())
888        }
889    }
890
891    impl ::fidl_next::FromWire<crate::wire::AxisF> for AxisF {
892        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::AxisF, Self> = unsafe {
893            ::fidl_next::CopyOptimization::enable_if(
894            true
895
896                && <
897                    crate::natural::RangeF as ::fidl_next::FromWire<crate::wire::RangeF>
898                >::COPY_OPTIMIZATION.is_enabled()
899
900                && <
901                    f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
902                >::COPY_OPTIMIZATION.is_enabled()
903
904                && <
905                    crate::natural::AxisScale as ::fidl_next::FromWire<crate::wire::AxisScale>
906                >::COPY_OPTIMIZATION.is_enabled()
907
908        )
909        };
910
911        #[inline]
912        fn from_wire(wire: crate::wire::AxisF) -> Self {
913            Self {
914                range: ::fidl_next::FromWire::from_wire(wire.range),
915
916                resolution: ::fidl_next::FromWire::from_wire(wire.resolution),
917
918                scale: ::fidl_next::FromWire::from_wire(wire.scale),
919            }
920        }
921    }
922
923    impl ::fidl_next::FromWireRef<crate::wire::AxisF> for AxisF {
924        #[inline]
925        fn from_wire_ref(wire: &crate::wire::AxisF) -> Self {
926            Self {
927                range: ::fidl_next::FromWireRef::from_wire_ref(&wire.range),
928
929                resolution: ::fidl_next::FromWireRef::from_wire_ref(&wire.resolution),
930
931                scale: ::fidl_next::FromWireRef::from_wire_ref(&wire.scale),
932            }
933        }
934    }
935
936    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
937    #[repr(u32)]
938    pub enum PointerEventType {
939        Touch = 0,
940        Stylus = 1,
941        InvertedStylus = 2,
942        Mouse = 3,
943    }
944    impl ::core::convert::TryFrom<u32> for PointerEventType {
945        type Error = ::fidl_next::UnknownStrictEnumMemberError;
946        fn try_from(
947            value: u32,
948        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
949            match value {
950                0 => Ok(Self::Touch),
951                1 => Ok(Self::Stylus),
952                2 => Ok(Self::InvertedStylus),
953                3 => Ok(Self::Mouse),
954
955                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
956            }
957        }
958    }
959
960    impl ::std::convert::From<PointerEventType> for u32 {
961        fn from(value: PointerEventType) -> Self {
962            match value {
963                PointerEventType::Touch => 0,
964                PointerEventType::Stylus => 1,
965                PointerEventType::InvertedStylus => 2,
966                PointerEventType::Mouse => 3,
967            }
968        }
969    }
970
971    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PointerEventType, ___E> for PointerEventType
972    where
973        ___E: ?Sized,
974    {
975        #[inline]
976        fn encode(
977            self,
978            encoder: &mut ___E,
979            out: &mut ::core::mem::MaybeUninit<crate::wire::PointerEventType>,
980            _: (),
981        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
982            ::fidl_next::Encode::encode(&self, encoder, out, ())
983        }
984    }
985
986    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PointerEventType, ___E>
987        for &'a PointerEventType
988    where
989        ___E: ?Sized,
990    {
991        #[inline]
992        fn encode(
993            self,
994            encoder: &mut ___E,
995            out: &mut ::core::mem::MaybeUninit<crate::wire::PointerEventType>,
996            _: (),
997        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
998            ::fidl_next::munge!(let crate::wire::PointerEventType { value } = out);
999            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1000                PointerEventType::Touch => 0,
1001
1002                PointerEventType::Stylus => 1,
1003
1004                PointerEventType::InvertedStylus => 2,
1005
1006                PointerEventType::Mouse => 3,
1007            }));
1008
1009            Ok(())
1010        }
1011    }
1012
1013    impl ::core::convert::From<crate::wire::PointerEventType> for PointerEventType {
1014        fn from(wire: crate::wire::PointerEventType) -> Self {
1015            match u32::from(wire.value) {
1016                0 => Self::Touch,
1017
1018                1 => Self::Stylus,
1019
1020                2 => Self::InvertedStylus,
1021
1022                3 => Self::Mouse,
1023
1024                _ => unsafe { ::core::hint::unreachable_unchecked() },
1025            }
1026        }
1027    }
1028
1029    impl ::fidl_next::FromWire<crate::wire::PointerEventType> for PointerEventType {
1030        #[inline]
1031        fn from_wire(wire: crate::wire::PointerEventType) -> Self {
1032            Self::from(wire)
1033        }
1034    }
1035
1036    impl ::fidl_next::FromWireRef<crate::wire::PointerEventType> for PointerEventType {
1037        #[inline]
1038        fn from_wire_ref(wire: &crate::wire::PointerEventType) -> Self {
1039            Self::from(*wire)
1040        }
1041    }
1042
1043    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1044    #[repr(u32)]
1045    pub enum PointerEventPhase {
1046        Add = 0,
1047        Hover = 1,
1048        Down = 2,
1049        Move = 3,
1050        Up = 4,
1051        Remove = 5,
1052        Cancel = 6,
1053    }
1054    impl ::core::convert::TryFrom<u32> for PointerEventPhase {
1055        type Error = ::fidl_next::UnknownStrictEnumMemberError;
1056        fn try_from(
1057            value: u32,
1058        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1059            match value {
1060                0 => Ok(Self::Add),
1061                1 => Ok(Self::Hover),
1062                2 => Ok(Self::Down),
1063                3 => Ok(Self::Move),
1064                4 => Ok(Self::Up),
1065                5 => Ok(Self::Remove),
1066                6 => Ok(Self::Cancel),
1067
1068                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1069            }
1070        }
1071    }
1072
1073    impl ::std::convert::From<PointerEventPhase> for u32 {
1074        fn from(value: PointerEventPhase) -> Self {
1075            match value {
1076                PointerEventPhase::Add => 0,
1077                PointerEventPhase::Hover => 1,
1078                PointerEventPhase::Down => 2,
1079                PointerEventPhase::Move => 3,
1080                PointerEventPhase::Up => 4,
1081                PointerEventPhase::Remove => 5,
1082                PointerEventPhase::Cancel => 6,
1083            }
1084        }
1085    }
1086
1087    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PointerEventPhase, ___E> for PointerEventPhase
1088    where
1089        ___E: ?Sized,
1090    {
1091        #[inline]
1092        fn encode(
1093            self,
1094            encoder: &mut ___E,
1095            out: &mut ::core::mem::MaybeUninit<crate::wire::PointerEventPhase>,
1096            _: (),
1097        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1098            ::fidl_next::Encode::encode(&self, encoder, out, ())
1099        }
1100    }
1101
1102    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PointerEventPhase, ___E>
1103        for &'a PointerEventPhase
1104    where
1105        ___E: ?Sized,
1106    {
1107        #[inline]
1108        fn encode(
1109            self,
1110            encoder: &mut ___E,
1111            out: &mut ::core::mem::MaybeUninit<crate::wire::PointerEventPhase>,
1112            _: (),
1113        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1114            ::fidl_next::munge!(let crate::wire::PointerEventPhase { value } = out);
1115            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1116                PointerEventPhase::Add => 0,
1117
1118                PointerEventPhase::Hover => 1,
1119
1120                PointerEventPhase::Down => 2,
1121
1122                PointerEventPhase::Move => 3,
1123
1124                PointerEventPhase::Up => 4,
1125
1126                PointerEventPhase::Remove => 5,
1127
1128                PointerEventPhase::Cancel => 6,
1129            }));
1130
1131            Ok(())
1132        }
1133    }
1134
1135    impl ::core::convert::From<crate::wire::PointerEventPhase> for PointerEventPhase {
1136        fn from(wire: crate::wire::PointerEventPhase) -> Self {
1137            match u32::from(wire.value) {
1138                0 => Self::Add,
1139
1140                1 => Self::Hover,
1141
1142                2 => Self::Down,
1143
1144                3 => Self::Move,
1145
1146                4 => Self::Up,
1147
1148                5 => Self::Remove,
1149
1150                6 => Self::Cancel,
1151
1152                _ => unsafe { ::core::hint::unreachable_unchecked() },
1153            }
1154        }
1155    }
1156
1157    impl ::fidl_next::FromWire<crate::wire::PointerEventPhase> for PointerEventPhase {
1158        #[inline]
1159        fn from_wire(wire: crate::wire::PointerEventPhase) -> Self {
1160            Self::from(wire)
1161        }
1162    }
1163
1164    impl ::fidl_next::FromWireRef<crate::wire::PointerEventPhase> for PointerEventPhase {
1165        #[inline]
1166        fn from_wire_ref(wire: &crate::wire::PointerEventPhase) -> Self {
1167            Self::from(*wire)
1168        }
1169    }
1170
1171    #[doc = " Pointers represent raw data about the user\'s interaction with the screen.\n\n The state transitions should be as follows:\n ADD (-> HOVER) -> DOWN -> MOVE -> UP (-> HOVER) -> REMOVE\n\n At any point after the initial ADD, a transition to CANCEL is also possible.\n"]
1172    #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
1173    pub struct PointerEvent {
1174        pub event_time: u64,
1175
1176        pub device_id: u32,
1177
1178        pub pointer_id: u32,
1179
1180        pub type_: crate::natural::PointerEventType,
1181
1182        pub phase: crate::natural::PointerEventPhase,
1183
1184        pub x: f32,
1185
1186        pub y: f32,
1187
1188        pub radius_major: f32,
1189
1190        pub radius_minor: f32,
1191
1192        pub buttons: u32,
1193    }
1194
1195    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PointerEvent, ___E> for PointerEvent
1196    where
1197        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1198    {
1199        #[inline]
1200        fn encode(
1201            self,
1202            encoder_: &mut ___E,
1203            out_: &mut ::core::mem::MaybeUninit<crate::wire::PointerEvent>,
1204            _: (),
1205        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1206            ::fidl_next::munge! {
1207                let crate::wire::PointerEvent {
1208                    event_time,
1209                    device_id,
1210                    pointer_id,
1211                    type_,
1212                    phase,
1213                    x,
1214                    y,
1215                    radius_major,
1216                    radius_minor,
1217                    buttons,
1218
1219                } = out_;
1220            }
1221
1222            ::fidl_next::Encode::encode(self.event_time, encoder_, event_time, ())?;
1223
1224            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event_time.as_mut_ptr()) };
1225
1226            ::fidl_next::Encode::encode(self.device_id, encoder_, device_id, ())?;
1227
1228            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(device_id.as_mut_ptr()) };
1229
1230            ::fidl_next::Encode::encode(self.pointer_id, encoder_, pointer_id, ())?;
1231
1232            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pointer_id.as_mut_ptr()) };
1233
1234            ::fidl_next::Encode::encode(self.type_, encoder_, type_, ())?;
1235
1236            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(type_.as_mut_ptr()) };
1237
1238            ::fidl_next::Encode::encode(self.phase, encoder_, phase, ())?;
1239
1240            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(phase.as_mut_ptr()) };
1241
1242            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
1243
1244            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
1245
1246            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
1247
1248            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
1249
1250            ::fidl_next::Encode::encode(self.radius_major, encoder_, radius_major, ())?;
1251
1252            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(radius_major.as_mut_ptr()) };
1253
1254            ::fidl_next::Encode::encode(self.radius_minor, encoder_, radius_minor, ())?;
1255
1256            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(radius_minor.as_mut_ptr()) };
1257
1258            ::fidl_next::Encode::encode(self.buttons, encoder_, buttons, ())?;
1259
1260            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buttons.as_mut_ptr()) };
1261
1262            Ok(())
1263        }
1264    }
1265
1266    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PointerEvent, ___E> for &'a PointerEvent
1267    where
1268        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1269    {
1270        #[inline]
1271        fn encode(
1272            self,
1273            encoder_: &mut ___E,
1274            out_: &mut ::core::mem::MaybeUninit<crate::wire::PointerEvent>,
1275            _: (),
1276        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1277            ::fidl_next::munge! {
1278                let crate::wire::PointerEvent {
1279                    event_time,
1280                    device_id,
1281                    pointer_id,
1282                    type_,
1283                    phase,
1284                    x,
1285                    y,
1286                    radius_major,
1287                    radius_minor,
1288                    buttons,
1289
1290                } = out_;
1291            }
1292
1293            ::fidl_next::Encode::encode(&self.event_time, encoder_, event_time, ())?;
1294
1295            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event_time.as_mut_ptr()) };
1296
1297            ::fidl_next::Encode::encode(&self.device_id, encoder_, device_id, ())?;
1298
1299            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(device_id.as_mut_ptr()) };
1300
1301            ::fidl_next::Encode::encode(&self.pointer_id, encoder_, pointer_id, ())?;
1302
1303            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pointer_id.as_mut_ptr()) };
1304
1305            ::fidl_next::Encode::encode(&self.type_, encoder_, type_, ())?;
1306
1307            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(type_.as_mut_ptr()) };
1308
1309            ::fidl_next::Encode::encode(&self.phase, encoder_, phase, ())?;
1310
1311            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(phase.as_mut_ptr()) };
1312
1313            ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
1314
1315            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
1316
1317            ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
1318
1319            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
1320
1321            ::fidl_next::Encode::encode(&self.radius_major, encoder_, radius_major, ())?;
1322
1323            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(radius_major.as_mut_ptr()) };
1324
1325            ::fidl_next::Encode::encode(&self.radius_minor, encoder_, radius_minor, ())?;
1326
1327            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(radius_minor.as_mut_ptr()) };
1328
1329            ::fidl_next::Encode::encode(&self.buttons, encoder_, buttons, ())?;
1330
1331            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buttons.as_mut_ptr()) };
1332
1333            Ok(())
1334        }
1335    }
1336
1337    unsafe impl<___E>
1338        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::PointerEvent>, ___E>
1339        for PointerEvent
1340    where
1341        ___E: ::fidl_next::Encoder + ?Sized,
1342        PointerEvent: ::fidl_next::Encode<crate::wire::PointerEvent, ___E>,
1343    {
1344        #[inline]
1345        fn encode_option(
1346            this: ::core::option::Option<Self>,
1347            encoder: &mut ___E,
1348            out: &mut ::core::mem::MaybeUninit<
1349                ::fidl_next::wire::Box<'static, crate::wire::PointerEvent>,
1350            >,
1351            _: (),
1352        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1353            if let Some(inner) = this {
1354                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1355                ::fidl_next::wire::Box::encode_present(out);
1356            } else {
1357                ::fidl_next::wire::Box::encode_absent(out);
1358            }
1359
1360            Ok(())
1361        }
1362    }
1363
1364    unsafe impl<'a, ___E>
1365        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::PointerEvent>, ___E>
1366        for &'a PointerEvent
1367    where
1368        ___E: ::fidl_next::Encoder + ?Sized,
1369        &'a PointerEvent: ::fidl_next::Encode<crate::wire::PointerEvent, ___E>,
1370    {
1371        #[inline]
1372        fn encode_option(
1373            this: ::core::option::Option<Self>,
1374            encoder: &mut ___E,
1375            out: &mut ::core::mem::MaybeUninit<
1376                ::fidl_next::wire::Box<'static, crate::wire::PointerEvent>,
1377            >,
1378            _: (),
1379        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1380            if let Some(inner) = this {
1381                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1382                ::fidl_next::wire::Box::encode_present(out);
1383            } else {
1384                ::fidl_next::wire::Box::encode_absent(out);
1385            }
1386
1387            Ok(())
1388        }
1389    }
1390
1391    impl ::fidl_next::FromWire<crate::wire::PointerEvent> for PointerEvent {
1392        #[inline]
1393        fn from_wire(wire: crate::wire::PointerEvent) -> Self {
1394            Self {
1395                event_time: ::fidl_next::FromWire::from_wire(wire.event_time),
1396
1397                device_id: ::fidl_next::FromWire::from_wire(wire.device_id),
1398
1399                pointer_id: ::fidl_next::FromWire::from_wire(wire.pointer_id),
1400
1401                type_: ::fidl_next::FromWire::from_wire(wire.type_),
1402
1403                phase: ::fidl_next::FromWire::from_wire(wire.phase),
1404
1405                x: ::fidl_next::FromWire::from_wire(wire.x),
1406
1407                y: ::fidl_next::FromWire::from_wire(wire.y),
1408
1409                radius_major: ::fidl_next::FromWire::from_wire(wire.radius_major),
1410
1411                radius_minor: ::fidl_next::FromWire::from_wire(wire.radius_minor),
1412
1413                buttons: ::fidl_next::FromWire::from_wire(wire.buttons),
1414            }
1415        }
1416    }
1417
1418    impl ::fidl_next::FromWireRef<crate::wire::PointerEvent> for PointerEvent {
1419        #[inline]
1420        fn from_wire_ref(wire: &crate::wire::PointerEvent) -> Self {
1421            Self {
1422                event_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.event_time),
1423
1424                device_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.device_id),
1425
1426                pointer_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.pointer_id),
1427
1428                type_: ::fidl_next::FromWireRef::from_wire_ref(&wire.type_),
1429
1430                phase: ::fidl_next::FromWireRef::from_wire_ref(&wire.phase),
1431
1432                x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
1433
1434                y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
1435
1436                radius_major: ::fidl_next::FromWireRef::from_wire_ref(&wire.radius_major),
1437
1438                radius_minor: ::fidl_next::FromWireRef::from_wire_ref(&wire.radius_minor),
1439
1440                buttons: ::fidl_next::FromWireRef::from_wire_ref(&wire.buttons),
1441            }
1442        }
1443    }
1444
1445    #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
1446    pub struct SendPointerInputCmd {
1447        pub compositor_id: u32,
1448
1449        pub pointer_event: crate::natural::PointerEvent,
1450    }
1451
1452    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SendPointerInputCmd, ___E>
1453        for SendPointerInputCmd
1454    where
1455        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1456    {
1457        #[inline]
1458        fn encode(
1459            self,
1460            encoder_: &mut ___E,
1461            out_: &mut ::core::mem::MaybeUninit<crate::wire::SendPointerInputCmd>,
1462            _: (),
1463        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1464            ::fidl_next::munge! {
1465                let crate::wire::SendPointerInputCmd {
1466                    compositor_id,
1467                    pointer_event,
1468
1469                } = out_;
1470            }
1471
1472            ::fidl_next::Encode::encode(self.compositor_id, encoder_, compositor_id, ())?;
1473
1474            let mut _field =
1475                unsafe { ::fidl_next::Slot::new_unchecked(compositor_id.as_mut_ptr()) };
1476
1477            ::fidl_next::Encode::encode(self.pointer_event, encoder_, pointer_event, ())?;
1478
1479            let mut _field =
1480                unsafe { ::fidl_next::Slot::new_unchecked(pointer_event.as_mut_ptr()) };
1481
1482            Ok(())
1483        }
1484    }
1485
1486    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SendPointerInputCmd, ___E>
1487        for &'a SendPointerInputCmd
1488    where
1489        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1490    {
1491        #[inline]
1492        fn encode(
1493            self,
1494            encoder_: &mut ___E,
1495            out_: &mut ::core::mem::MaybeUninit<crate::wire::SendPointerInputCmd>,
1496            _: (),
1497        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1498            ::fidl_next::munge! {
1499                let crate::wire::SendPointerInputCmd {
1500                    compositor_id,
1501                    pointer_event,
1502
1503                } = out_;
1504            }
1505
1506            ::fidl_next::Encode::encode(&self.compositor_id, encoder_, compositor_id, ())?;
1507
1508            let mut _field =
1509                unsafe { ::fidl_next::Slot::new_unchecked(compositor_id.as_mut_ptr()) };
1510
1511            ::fidl_next::Encode::encode(&self.pointer_event, encoder_, pointer_event, ())?;
1512
1513            let mut _field =
1514                unsafe { ::fidl_next::Slot::new_unchecked(pointer_event.as_mut_ptr()) };
1515
1516            Ok(())
1517        }
1518    }
1519
1520    unsafe impl<___E>
1521        ::fidl_next::EncodeOption<
1522            ::fidl_next::wire::Box<'static, crate::wire::SendPointerInputCmd>,
1523            ___E,
1524        > for SendPointerInputCmd
1525    where
1526        ___E: ::fidl_next::Encoder + ?Sized,
1527        SendPointerInputCmd: ::fidl_next::Encode<crate::wire::SendPointerInputCmd, ___E>,
1528    {
1529        #[inline]
1530        fn encode_option(
1531            this: ::core::option::Option<Self>,
1532            encoder: &mut ___E,
1533            out: &mut ::core::mem::MaybeUninit<
1534                ::fidl_next::wire::Box<'static, crate::wire::SendPointerInputCmd>,
1535            >,
1536            _: (),
1537        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1538            if let Some(inner) = this {
1539                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1540                ::fidl_next::wire::Box::encode_present(out);
1541            } else {
1542                ::fidl_next::wire::Box::encode_absent(out);
1543            }
1544
1545            Ok(())
1546        }
1547    }
1548
1549    unsafe impl<'a, ___E>
1550        ::fidl_next::EncodeOption<
1551            ::fidl_next::wire::Box<'static, crate::wire::SendPointerInputCmd>,
1552            ___E,
1553        > for &'a SendPointerInputCmd
1554    where
1555        ___E: ::fidl_next::Encoder + ?Sized,
1556        &'a SendPointerInputCmd: ::fidl_next::Encode<crate::wire::SendPointerInputCmd, ___E>,
1557    {
1558        #[inline]
1559        fn encode_option(
1560            this: ::core::option::Option<Self>,
1561            encoder: &mut ___E,
1562            out: &mut ::core::mem::MaybeUninit<
1563                ::fidl_next::wire::Box<'static, crate::wire::SendPointerInputCmd>,
1564            >,
1565            _: (),
1566        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1567            if let Some(inner) = this {
1568                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1569                ::fidl_next::wire::Box::encode_present(out);
1570            } else {
1571                ::fidl_next::wire::Box::encode_absent(out);
1572            }
1573
1574            Ok(())
1575        }
1576    }
1577
1578    impl ::fidl_next::FromWire<crate::wire::SendPointerInputCmd> for SendPointerInputCmd {
1579        #[inline]
1580        fn from_wire(wire: crate::wire::SendPointerInputCmd) -> Self {
1581            Self {
1582                compositor_id: ::fidl_next::FromWire::from_wire(wire.compositor_id),
1583
1584                pointer_event: ::fidl_next::FromWire::from_wire(wire.pointer_event),
1585            }
1586        }
1587    }
1588
1589    impl ::fidl_next::FromWireRef<crate::wire::SendPointerInputCmd> for SendPointerInputCmd {
1590        #[inline]
1591        fn from_wire_ref(wire: &crate::wire::SendPointerInputCmd) -> Self {
1592            Self {
1593                compositor_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.compositor_id),
1594
1595                pointer_event: ::fidl_next::FromWireRef::from_wire_ref(&wire.pointer_event),
1596            }
1597        }
1598    }
1599
1600    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1601    #[repr(C)]
1602    pub struct SetHardKeyboardDeliveryCmd {
1603        pub delivery_request: bool,
1604    }
1605
1606    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SetHardKeyboardDeliveryCmd, ___E>
1607        for SetHardKeyboardDeliveryCmd
1608    where
1609        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1610    {
1611        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1612            Self,
1613            crate::wire::SetHardKeyboardDeliveryCmd,
1614        > = unsafe {
1615            ::fidl_next::CopyOptimization::enable_if(
1616                true && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled(),
1617            )
1618        };
1619
1620        #[inline]
1621        fn encode(
1622            self,
1623            encoder_: &mut ___E,
1624            out_: &mut ::core::mem::MaybeUninit<crate::wire::SetHardKeyboardDeliveryCmd>,
1625            _: (),
1626        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1627            ::fidl_next::munge! {
1628                let crate::wire::SetHardKeyboardDeliveryCmd {
1629                    delivery_request,
1630
1631                } = out_;
1632            }
1633
1634            ::fidl_next::Encode::encode(self.delivery_request, encoder_, delivery_request, ())?;
1635
1636            let mut _field =
1637                unsafe { ::fidl_next::Slot::new_unchecked(delivery_request.as_mut_ptr()) };
1638
1639            Ok(())
1640        }
1641    }
1642
1643    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SetHardKeyboardDeliveryCmd, ___E>
1644        for &'a SetHardKeyboardDeliveryCmd
1645    where
1646        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1647    {
1648        #[inline]
1649        fn encode(
1650            self,
1651            encoder_: &mut ___E,
1652            out_: &mut ::core::mem::MaybeUninit<crate::wire::SetHardKeyboardDeliveryCmd>,
1653            _: (),
1654        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1655            ::fidl_next::munge! {
1656                let crate::wire::SetHardKeyboardDeliveryCmd {
1657                    delivery_request,
1658
1659                } = out_;
1660            }
1661
1662            ::fidl_next::Encode::encode(&self.delivery_request, encoder_, delivery_request, ())?;
1663
1664            let mut _field =
1665                unsafe { ::fidl_next::Slot::new_unchecked(delivery_request.as_mut_ptr()) };
1666
1667            Ok(())
1668        }
1669    }
1670
1671    unsafe impl<___E>
1672        ::fidl_next::EncodeOption<
1673            ::fidl_next::wire::Box<'static, crate::wire::SetHardKeyboardDeliveryCmd>,
1674            ___E,
1675        > for SetHardKeyboardDeliveryCmd
1676    where
1677        ___E: ::fidl_next::Encoder + ?Sized,
1678        SetHardKeyboardDeliveryCmd:
1679            ::fidl_next::Encode<crate::wire::SetHardKeyboardDeliveryCmd, ___E>,
1680    {
1681        #[inline]
1682        fn encode_option(
1683            this: ::core::option::Option<Self>,
1684            encoder: &mut ___E,
1685            out: &mut ::core::mem::MaybeUninit<
1686                ::fidl_next::wire::Box<'static, crate::wire::SetHardKeyboardDeliveryCmd>,
1687            >,
1688            _: (),
1689        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1690            if let Some(inner) = this {
1691                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1692                ::fidl_next::wire::Box::encode_present(out);
1693            } else {
1694                ::fidl_next::wire::Box::encode_absent(out);
1695            }
1696
1697            Ok(())
1698        }
1699    }
1700
1701    unsafe impl<'a, ___E>
1702        ::fidl_next::EncodeOption<
1703            ::fidl_next::wire::Box<'static, crate::wire::SetHardKeyboardDeliveryCmd>,
1704            ___E,
1705        > for &'a SetHardKeyboardDeliveryCmd
1706    where
1707        ___E: ::fidl_next::Encoder + ?Sized,
1708        &'a SetHardKeyboardDeliveryCmd:
1709            ::fidl_next::Encode<crate::wire::SetHardKeyboardDeliveryCmd, ___E>,
1710    {
1711        #[inline]
1712        fn encode_option(
1713            this: ::core::option::Option<Self>,
1714            encoder: &mut ___E,
1715            out: &mut ::core::mem::MaybeUninit<
1716                ::fidl_next::wire::Box<'static, crate::wire::SetHardKeyboardDeliveryCmd>,
1717            >,
1718            _: (),
1719        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1720            if let Some(inner) = this {
1721                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1722                ::fidl_next::wire::Box::encode_present(out);
1723            } else {
1724                ::fidl_next::wire::Box::encode_absent(out);
1725            }
1726
1727            Ok(())
1728        }
1729    }
1730
1731    impl ::fidl_next::FromWire<crate::wire::SetHardKeyboardDeliveryCmd> for SetHardKeyboardDeliveryCmd {
1732        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1733            crate::wire::SetHardKeyboardDeliveryCmd,
1734            Self,
1735        > = unsafe {
1736            ::fidl_next::CopyOptimization::enable_if(
1737                true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
1738            )
1739        };
1740
1741        #[inline]
1742        fn from_wire(wire: crate::wire::SetHardKeyboardDeliveryCmd) -> Self {
1743            Self { delivery_request: ::fidl_next::FromWire::from_wire(wire.delivery_request) }
1744        }
1745    }
1746
1747    impl ::fidl_next::FromWireRef<crate::wire::SetHardKeyboardDeliveryCmd>
1748        for SetHardKeyboardDeliveryCmd
1749    {
1750        #[inline]
1751        fn from_wire_ref(wire: &crate::wire::SetHardKeyboardDeliveryCmd) -> Self {
1752            Self {
1753                delivery_request: ::fidl_next::FromWireRef::from_wire_ref(&wire.delivery_request),
1754            }
1755        }
1756    }
1757
1758    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1759    #[repr(C)]
1760    pub struct SetParallelDispatchCmd {
1761        pub parallel_dispatch: bool,
1762    }
1763
1764    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SetParallelDispatchCmd, ___E>
1765        for SetParallelDispatchCmd
1766    where
1767        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1768    {
1769        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1770            Self,
1771            crate::wire::SetParallelDispatchCmd,
1772        > = unsafe {
1773            ::fidl_next::CopyOptimization::enable_if(
1774                true && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled(),
1775            )
1776        };
1777
1778        #[inline]
1779        fn encode(
1780            self,
1781            encoder_: &mut ___E,
1782            out_: &mut ::core::mem::MaybeUninit<crate::wire::SetParallelDispatchCmd>,
1783            _: (),
1784        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1785            ::fidl_next::munge! {
1786                let crate::wire::SetParallelDispatchCmd {
1787                    parallel_dispatch,
1788
1789                } = out_;
1790            }
1791
1792            ::fidl_next::Encode::encode(self.parallel_dispatch, encoder_, parallel_dispatch, ())?;
1793
1794            let mut _field =
1795                unsafe { ::fidl_next::Slot::new_unchecked(parallel_dispatch.as_mut_ptr()) };
1796
1797            Ok(())
1798        }
1799    }
1800
1801    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SetParallelDispatchCmd, ___E>
1802        for &'a SetParallelDispatchCmd
1803    where
1804        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1805    {
1806        #[inline]
1807        fn encode(
1808            self,
1809            encoder_: &mut ___E,
1810            out_: &mut ::core::mem::MaybeUninit<crate::wire::SetParallelDispatchCmd>,
1811            _: (),
1812        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1813            ::fidl_next::munge! {
1814                let crate::wire::SetParallelDispatchCmd {
1815                    parallel_dispatch,
1816
1817                } = out_;
1818            }
1819
1820            ::fidl_next::Encode::encode(&self.parallel_dispatch, encoder_, parallel_dispatch, ())?;
1821
1822            let mut _field =
1823                unsafe { ::fidl_next::Slot::new_unchecked(parallel_dispatch.as_mut_ptr()) };
1824
1825            Ok(())
1826        }
1827    }
1828
1829    unsafe impl<___E>
1830        ::fidl_next::EncodeOption<
1831            ::fidl_next::wire::Box<'static, crate::wire::SetParallelDispatchCmd>,
1832            ___E,
1833        > for SetParallelDispatchCmd
1834    where
1835        ___E: ::fidl_next::Encoder + ?Sized,
1836        SetParallelDispatchCmd: ::fidl_next::Encode<crate::wire::SetParallelDispatchCmd, ___E>,
1837    {
1838        #[inline]
1839        fn encode_option(
1840            this: ::core::option::Option<Self>,
1841            encoder: &mut ___E,
1842            out: &mut ::core::mem::MaybeUninit<
1843                ::fidl_next::wire::Box<'static, crate::wire::SetParallelDispatchCmd>,
1844            >,
1845            _: (),
1846        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1847            if let Some(inner) = this {
1848                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1849                ::fidl_next::wire::Box::encode_present(out);
1850            } else {
1851                ::fidl_next::wire::Box::encode_absent(out);
1852            }
1853
1854            Ok(())
1855        }
1856    }
1857
1858    unsafe impl<'a, ___E>
1859        ::fidl_next::EncodeOption<
1860            ::fidl_next::wire::Box<'static, crate::wire::SetParallelDispatchCmd>,
1861            ___E,
1862        > for &'a SetParallelDispatchCmd
1863    where
1864        ___E: ::fidl_next::Encoder + ?Sized,
1865        &'a SetParallelDispatchCmd: ::fidl_next::Encode<crate::wire::SetParallelDispatchCmd, ___E>,
1866    {
1867        #[inline]
1868        fn encode_option(
1869            this: ::core::option::Option<Self>,
1870            encoder: &mut ___E,
1871            out: &mut ::core::mem::MaybeUninit<
1872                ::fidl_next::wire::Box<'static, crate::wire::SetParallelDispatchCmd>,
1873            >,
1874            _: (),
1875        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1876            if let Some(inner) = this {
1877                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1878                ::fidl_next::wire::Box::encode_present(out);
1879            } else {
1880                ::fidl_next::wire::Box::encode_absent(out);
1881            }
1882
1883            Ok(())
1884        }
1885    }
1886
1887    impl ::fidl_next::FromWire<crate::wire::SetParallelDispatchCmd> for SetParallelDispatchCmd {
1888        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1889            crate::wire::SetParallelDispatchCmd,
1890            Self,
1891        > = unsafe {
1892            ::fidl_next::CopyOptimization::enable_if(
1893                true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
1894            )
1895        };
1896
1897        #[inline]
1898        fn from_wire(wire: crate::wire::SetParallelDispatchCmd) -> Self {
1899            Self { parallel_dispatch: ::fidl_next::FromWire::from_wire(wire.parallel_dispatch) }
1900        }
1901    }
1902
1903    impl ::fidl_next::FromWireRef<crate::wire::SetParallelDispatchCmd> for SetParallelDispatchCmd {
1904        #[inline]
1905        fn from_wire_ref(wire: &crate::wire::SetParallelDispatchCmd) -> Self {
1906            Self {
1907                parallel_dispatch: ::fidl_next::FromWireRef::from_wire_ref(&wire.parallel_dispatch),
1908            }
1909        }
1910    }
1911
1912    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1913    #[repr(u32)]
1914    pub enum KeyboardEventPhase {
1915        Pressed = 0,
1916        Released = 1,
1917        Cancelled = 2,
1918        Repeat = 3,
1919        UnknownOrdinal_(u32) = 4,
1920    }
1921    impl ::std::convert::From<u32> for KeyboardEventPhase {
1922        fn from(value: u32) -> Self {
1923            match value {
1924                0 => Self::Pressed,
1925                1 => Self::Released,
1926                2 => Self::Cancelled,
1927                3 => Self::Repeat,
1928
1929                _ => Self::UnknownOrdinal_(value),
1930            }
1931        }
1932    }
1933
1934    impl ::std::convert::From<KeyboardEventPhase> for u32 {
1935        fn from(value: KeyboardEventPhase) -> Self {
1936            match value {
1937                KeyboardEventPhase::Pressed => 0,
1938                KeyboardEventPhase::Released => 1,
1939                KeyboardEventPhase::Cancelled => 2,
1940                KeyboardEventPhase::Repeat => 3,
1941
1942                KeyboardEventPhase::UnknownOrdinal_(value) => value,
1943            }
1944        }
1945    }
1946
1947    unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeyboardEventPhase, ___E> for KeyboardEventPhase
1948    where
1949        ___E: ?Sized,
1950    {
1951        #[inline]
1952        fn encode(
1953            self,
1954            encoder: &mut ___E,
1955            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardEventPhase>,
1956            _: (),
1957        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1958            ::fidl_next::Encode::encode(&self, encoder, out, ())
1959        }
1960    }
1961
1962    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::KeyboardEventPhase, ___E>
1963        for &'a KeyboardEventPhase
1964    where
1965        ___E: ?Sized,
1966    {
1967        #[inline]
1968        fn encode(
1969            self,
1970            encoder: &mut ___E,
1971            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardEventPhase>,
1972            _: (),
1973        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1974            ::fidl_next::munge!(let crate::wire::KeyboardEventPhase { value } = out);
1975            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1976                KeyboardEventPhase::Pressed => 0,
1977
1978                KeyboardEventPhase::Released => 1,
1979
1980                KeyboardEventPhase::Cancelled => 2,
1981
1982                KeyboardEventPhase::Repeat => 3,
1983
1984                KeyboardEventPhase::UnknownOrdinal_(value) => value,
1985            }));
1986
1987            Ok(())
1988        }
1989    }
1990
1991    impl ::core::convert::From<crate::wire::KeyboardEventPhase> for KeyboardEventPhase {
1992        fn from(wire: crate::wire::KeyboardEventPhase) -> Self {
1993            match u32::from(wire.value) {
1994                0 => Self::Pressed,
1995
1996                1 => Self::Released,
1997
1998                2 => Self::Cancelled,
1999
2000                3 => Self::Repeat,
2001
2002                value => Self::UnknownOrdinal_(value),
2003            }
2004        }
2005    }
2006
2007    impl ::fidl_next::FromWire<crate::wire::KeyboardEventPhase> for KeyboardEventPhase {
2008        #[inline]
2009        fn from_wire(wire: crate::wire::KeyboardEventPhase) -> Self {
2010            Self::from(wire)
2011        }
2012    }
2013
2014    impl ::fidl_next::FromWireRef<crate::wire::KeyboardEventPhase> for KeyboardEventPhase {
2015        #[inline]
2016        fn from_wire_ref(wire: &crate::wire::KeyboardEventPhase) -> Self {
2017            Self::from(*wire)
2018        }
2019    }
2020
2021    #[doc = " `KeyboardEvent` represents event generated by a user\'s interaction with a\n keyboard.\n\n Those events are triggered by distinct pressed state changes of the keys.\n\n The state transitions should be as follows:\n PRESSED -> (REPEAT ->) RELEASED\n or\n PRESSED -> (REPEAT ->) CANCELLED\n\n The input system will repeat those events automatically when a code_point is\n available.\n\n DEPRECATED: Will be removed in favor of `fuchsia.ui.input.KeyEvent`.\n"]
2022    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2023    pub struct KeyboardEvent {
2024        pub event_time: u64,
2025
2026        pub device_id: u32,
2027
2028        pub phase: crate::natural::KeyboardEventPhase,
2029
2030        pub hid_usage: u32,
2031
2032        pub code_point: u32,
2033
2034        pub modifiers: u32,
2035    }
2036
2037    unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeyboardEvent, ___E> for KeyboardEvent
2038    where
2039        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2040    {
2041        #[inline]
2042        fn encode(
2043            self,
2044            encoder_: &mut ___E,
2045            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardEvent>,
2046            _: (),
2047        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2048            ::fidl_next::munge! {
2049                let crate::wire::KeyboardEvent {
2050                    event_time,
2051                    device_id,
2052                    phase,
2053                    hid_usage,
2054                    code_point,
2055                    modifiers,
2056
2057                } = out_;
2058            }
2059
2060            ::fidl_next::Encode::encode(self.event_time, encoder_, event_time, ())?;
2061
2062            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event_time.as_mut_ptr()) };
2063
2064            ::fidl_next::Encode::encode(self.device_id, encoder_, device_id, ())?;
2065
2066            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(device_id.as_mut_ptr()) };
2067
2068            ::fidl_next::Encode::encode(self.phase, encoder_, phase, ())?;
2069
2070            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(phase.as_mut_ptr()) };
2071
2072            ::fidl_next::Encode::encode(self.hid_usage, encoder_, hid_usage, ())?;
2073
2074            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(hid_usage.as_mut_ptr()) };
2075
2076            ::fidl_next::Encode::encode(self.code_point, encoder_, code_point, ())?;
2077
2078            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(code_point.as_mut_ptr()) };
2079
2080            ::fidl_next::Encode::encode(self.modifiers, encoder_, modifiers, ())?;
2081
2082            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(modifiers.as_mut_ptr()) };
2083
2084            Ok(())
2085        }
2086    }
2087
2088    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::KeyboardEvent, ___E> for &'a KeyboardEvent
2089    where
2090        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2091    {
2092        #[inline]
2093        fn encode(
2094            self,
2095            encoder_: &mut ___E,
2096            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardEvent>,
2097            _: (),
2098        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2099            ::fidl_next::munge! {
2100                let crate::wire::KeyboardEvent {
2101                    event_time,
2102                    device_id,
2103                    phase,
2104                    hid_usage,
2105                    code_point,
2106                    modifiers,
2107
2108                } = out_;
2109            }
2110
2111            ::fidl_next::Encode::encode(&self.event_time, encoder_, event_time, ())?;
2112
2113            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event_time.as_mut_ptr()) };
2114
2115            ::fidl_next::Encode::encode(&self.device_id, encoder_, device_id, ())?;
2116
2117            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(device_id.as_mut_ptr()) };
2118
2119            ::fidl_next::Encode::encode(&self.phase, encoder_, phase, ())?;
2120
2121            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(phase.as_mut_ptr()) };
2122
2123            ::fidl_next::Encode::encode(&self.hid_usage, encoder_, hid_usage, ())?;
2124
2125            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(hid_usage.as_mut_ptr()) };
2126
2127            ::fidl_next::Encode::encode(&self.code_point, encoder_, code_point, ())?;
2128
2129            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(code_point.as_mut_ptr()) };
2130
2131            ::fidl_next::Encode::encode(&self.modifiers, encoder_, modifiers, ())?;
2132
2133            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(modifiers.as_mut_ptr()) };
2134
2135            Ok(())
2136        }
2137    }
2138
2139    unsafe impl<___E>
2140        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::KeyboardEvent>, ___E>
2141        for KeyboardEvent
2142    where
2143        ___E: ::fidl_next::Encoder + ?Sized,
2144        KeyboardEvent: ::fidl_next::Encode<crate::wire::KeyboardEvent, ___E>,
2145    {
2146        #[inline]
2147        fn encode_option(
2148            this: ::core::option::Option<Self>,
2149            encoder: &mut ___E,
2150            out: &mut ::core::mem::MaybeUninit<
2151                ::fidl_next::wire::Box<'static, crate::wire::KeyboardEvent>,
2152            >,
2153            _: (),
2154        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2155            if let Some(inner) = this {
2156                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2157                ::fidl_next::wire::Box::encode_present(out);
2158            } else {
2159                ::fidl_next::wire::Box::encode_absent(out);
2160            }
2161
2162            Ok(())
2163        }
2164    }
2165
2166    unsafe impl<'a, ___E>
2167        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::KeyboardEvent>, ___E>
2168        for &'a KeyboardEvent
2169    where
2170        ___E: ::fidl_next::Encoder + ?Sized,
2171        &'a KeyboardEvent: ::fidl_next::Encode<crate::wire::KeyboardEvent, ___E>,
2172    {
2173        #[inline]
2174        fn encode_option(
2175            this: ::core::option::Option<Self>,
2176            encoder: &mut ___E,
2177            out: &mut ::core::mem::MaybeUninit<
2178                ::fidl_next::wire::Box<'static, crate::wire::KeyboardEvent>,
2179            >,
2180            _: (),
2181        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2182            if let Some(inner) = this {
2183                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2184                ::fidl_next::wire::Box::encode_present(out);
2185            } else {
2186                ::fidl_next::wire::Box::encode_absent(out);
2187            }
2188
2189            Ok(())
2190        }
2191    }
2192
2193    impl ::fidl_next::FromWire<crate::wire::KeyboardEvent> for KeyboardEvent {
2194        #[inline]
2195        fn from_wire(wire: crate::wire::KeyboardEvent) -> Self {
2196            Self {
2197                event_time: ::fidl_next::FromWire::from_wire(wire.event_time),
2198
2199                device_id: ::fidl_next::FromWire::from_wire(wire.device_id),
2200
2201                phase: ::fidl_next::FromWire::from_wire(wire.phase),
2202
2203                hid_usage: ::fidl_next::FromWire::from_wire(wire.hid_usage),
2204
2205                code_point: ::fidl_next::FromWire::from_wire(wire.code_point),
2206
2207                modifiers: ::fidl_next::FromWire::from_wire(wire.modifiers),
2208            }
2209        }
2210    }
2211
2212    impl ::fidl_next::FromWireRef<crate::wire::KeyboardEvent> for KeyboardEvent {
2213        #[inline]
2214        fn from_wire_ref(wire: &crate::wire::KeyboardEvent) -> Self {
2215            Self {
2216                event_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.event_time),
2217
2218                device_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.device_id),
2219
2220                phase: ::fidl_next::FromWireRef::from_wire_ref(&wire.phase),
2221
2222                hid_usage: ::fidl_next::FromWireRef::from_wire_ref(&wire.hid_usage),
2223
2224                code_point: ::fidl_next::FromWireRef::from_wire_ref(&wire.code_point),
2225
2226                modifiers: ::fidl_next::FromWireRef::from_wire_ref(&wire.modifiers),
2227            }
2228        }
2229    }
2230
2231    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2232    pub struct SendKeyboardInputCmd {
2233        pub compositor_id: u32,
2234
2235        pub keyboard_event: crate::natural::KeyboardEvent,
2236    }
2237
2238    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SendKeyboardInputCmd, ___E>
2239        for SendKeyboardInputCmd
2240    where
2241        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2242    {
2243        #[inline]
2244        fn encode(
2245            self,
2246            encoder_: &mut ___E,
2247            out_: &mut ::core::mem::MaybeUninit<crate::wire::SendKeyboardInputCmd>,
2248            _: (),
2249        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2250            ::fidl_next::munge! {
2251                let crate::wire::SendKeyboardInputCmd {
2252                    compositor_id,
2253                    keyboard_event,
2254
2255                } = out_;
2256            }
2257
2258            ::fidl_next::Encode::encode(self.compositor_id, encoder_, compositor_id, ())?;
2259
2260            let mut _field =
2261                unsafe { ::fidl_next::Slot::new_unchecked(compositor_id.as_mut_ptr()) };
2262
2263            ::fidl_next::Encode::encode(self.keyboard_event, encoder_, keyboard_event, ())?;
2264
2265            let mut _field =
2266                unsafe { ::fidl_next::Slot::new_unchecked(keyboard_event.as_mut_ptr()) };
2267
2268            Ok(())
2269        }
2270    }
2271
2272    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SendKeyboardInputCmd, ___E>
2273        for &'a SendKeyboardInputCmd
2274    where
2275        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2276    {
2277        #[inline]
2278        fn encode(
2279            self,
2280            encoder_: &mut ___E,
2281            out_: &mut ::core::mem::MaybeUninit<crate::wire::SendKeyboardInputCmd>,
2282            _: (),
2283        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2284            ::fidl_next::munge! {
2285                let crate::wire::SendKeyboardInputCmd {
2286                    compositor_id,
2287                    keyboard_event,
2288
2289                } = out_;
2290            }
2291
2292            ::fidl_next::Encode::encode(&self.compositor_id, encoder_, compositor_id, ())?;
2293
2294            let mut _field =
2295                unsafe { ::fidl_next::Slot::new_unchecked(compositor_id.as_mut_ptr()) };
2296
2297            ::fidl_next::Encode::encode(&self.keyboard_event, encoder_, keyboard_event, ())?;
2298
2299            let mut _field =
2300                unsafe { ::fidl_next::Slot::new_unchecked(keyboard_event.as_mut_ptr()) };
2301
2302            Ok(())
2303        }
2304    }
2305
2306    unsafe impl<___E>
2307        ::fidl_next::EncodeOption<
2308            ::fidl_next::wire::Box<'static, crate::wire::SendKeyboardInputCmd>,
2309            ___E,
2310        > for SendKeyboardInputCmd
2311    where
2312        ___E: ::fidl_next::Encoder + ?Sized,
2313        SendKeyboardInputCmd: ::fidl_next::Encode<crate::wire::SendKeyboardInputCmd, ___E>,
2314    {
2315        #[inline]
2316        fn encode_option(
2317            this: ::core::option::Option<Self>,
2318            encoder: &mut ___E,
2319            out: &mut ::core::mem::MaybeUninit<
2320                ::fidl_next::wire::Box<'static, crate::wire::SendKeyboardInputCmd>,
2321            >,
2322            _: (),
2323        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2324            if let Some(inner) = this {
2325                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2326                ::fidl_next::wire::Box::encode_present(out);
2327            } else {
2328                ::fidl_next::wire::Box::encode_absent(out);
2329            }
2330
2331            Ok(())
2332        }
2333    }
2334
2335    unsafe impl<'a, ___E>
2336        ::fidl_next::EncodeOption<
2337            ::fidl_next::wire::Box<'static, crate::wire::SendKeyboardInputCmd>,
2338            ___E,
2339        > for &'a SendKeyboardInputCmd
2340    where
2341        ___E: ::fidl_next::Encoder + ?Sized,
2342        &'a SendKeyboardInputCmd: ::fidl_next::Encode<crate::wire::SendKeyboardInputCmd, ___E>,
2343    {
2344        #[inline]
2345        fn encode_option(
2346            this: ::core::option::Option<Self>,
2347            encoder: &mut ___E,
2348            out: &mut ::core::mem::MaybeUninit<
2349                ::fidl_next::wire::Box<'static, crate::wire::SendKeyboardInputCmd>,
2350            >,
2351            _: (),
2352        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2353            if let Some(inner) = this {
2354                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2355                ::fidl_next::wire::Box::encode_present(out);
2356            } else {
2357                ::fidl_next::wire::Box::encode_absent(out);
2358            }
2359
2360            Ok(())
2361        }
2362    }
2363
2364    impl ::fidl_next::FromWire<crate::wire::SendKeyboardInputCmd> for SendKeyboardInputCmd {
2365        #[inline]
2366        fn from_wire(wire: crate::wire::SendKeyboardInputCmd) -> Self {
2367            Self {
2368                compositor_id: ::fidl_next::FromWire::from_wire(wire.compositor_id),
2369
2370                keyboard_event: ::fidl_next::FromWire::from_wire(wire.keyboard_event),
2371            }
2372        }
2373    }
2374
2375    impl ::fidl_next::FromWireRef<crate::wire::SendKeyboardInputCmd> for SendKeyboardInputCmd {
2376        #[inline]
2377        fn from_wire_ref(wire: &crate::wire::SendKeyboardInputCmd) -> Self {
2378            Self {
2379                compositor_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.compositor_id),
2380
2381                keyboard_event: ::fidl_next::FromWireRef::from_wire_ref(&wire.keyboard_event),
2382            }
2383        }
2384    }
2385
2386    #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
2387    pub enum Command {
2388        SendKeyboardInput(crate::natural::SendKeyboardInputCmd),
2389
2390        SendPointerInput(crate::natural::SendPointerInputCmd),
2391
2392        SetHardKeyboardDelivery(crate::natural::SetHardKeyboardDeliveryCmd),
2393
2394        SetParallelDispatch(crate::natural::SetParallelDispatchCmd),
2395    }
2396
2397    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Command<'static>, ___E> for Command
2398    where
2399        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2400        ___E: ::fidl_next::Encoder,
2401    {
2402        #[inline]
2403        fn encode(
2404            self,
2405            encoder: &mut ___E,
2406            out: &mut ::core::mem::MaybeUninit<crate::wire::Command<'static>>,
2407            _: (),
2408        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2409            ::fidl_next::munge!(let crate::wire::Command { raw, _phantom: _ } = out);
2410
2411            match self {
2412                Self::SendKeyboardInput(value) => ::fidl_next::wire::Union::encode_as::<
2413                    ___E,
2414                    crate::wire::SendKeyboardInputCmd,
2415                >(value, 1, encoder, raw, ())?,
2416
2417                Self::SendPointerInput(value) => ::fidl_next::wire::Union::encode_as::<
2418                    ___E,
2419                    crate::wire::SendPointerInputCmd,
2420                >(value, 2, encoder, raw, ())?,
2421
2422                Self::SetHardKeyboardDelivery(value) => {
2423                    ::fidl_next::wire::Union::encode_as::<
2424                        ___E,
2425                        crate::wire::SetHardKeyboardDeliveryCmd,
2426                    >(value, 3, encoder, raw, ())?
2427                }
2428
2429                Self::SetParallelDispatch(value) => ::fidl_next::wire::Union::encode_as::<
2430                    ___E,
2431                    crate::wire::SetParallelDispatchCmd,
2432                >(value, 4, encoder, raw, ())?,
2433            }
2434
2435            Ok(())
2436        }
2437    }
2438
2439    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Command<'static>, ___E> for &'a Command
2440    where
2441        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2442        ___E: ::fidl_next::Encoder,
2443    {
2444        #[inline]
2445        fn encode(
2446            self,
2447            encoder: &mut ___E,
2448            out: &mut ::core::mem::MaybeUninit<crate::wire::Command<'static>>,
2449            _: (),
2450        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2451            ::fidl_next::munge!(let crate::wire::Command { raw, _phantom: _ } = out);
2452
2453            match self {
2454                Command::SendKeyboardInput(value) => ::fidl_next::wire::Union::encode_as::<
2455                    ___E,
2456                    crate::wire::SendKeyboardInputCmd,
2457                >(value, 1, encoder, raw, ())?,
2458
2459                Command::SendPointerInput(value) => ::fidl_next::wire::Union::encode_as::<
2460                    ___E,
2461                    crate::wire::SendPointerInputCmd,
2462                >(value, 2, encoder, raw, ())?,
2463
2464                Command::SetHardKeyboardDelivery(value) => {
2465                    ::fidl_next::wire::Union::encode_as::<
2466                        ___E,
2467                        crate::wire::SetHardKeyboardDeliveryCmd,
2468                    >(value, 3, encoder, raw, ())?
2469                }
2470
2471                Command::SetParallelDispatch(value) => ::fidl_next::wire::Union::encode_as::<
2472                    ___E,
2473                    crate::wire::SetParallelDispatchCmd,
2474                >(
2475                    value, 4, encoder, raw, ()
2476                )?,
2477            }
2478
2479            Ok(())
2480        }
2481    }
2482
2483    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Command<'static>, ___E>
2484        for Command
2485    where
2486        ___E: ?Sized,
2487        Command: ::fidl_next::Encode<crate::wire::Command<'static>, ___E>,
2488    {
2489        #[inline]
2490        fn encode_option(
2491            this: ::core::option::Option<Self>,
2492            encoder: &mut ___E,
2493            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Command<'static>>,
2494            _: (),
2495        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2496            ::fidl_next::munge!(let crate::wire_optional::Command { raw, _phantom: _ } = &mut *out);
2497
2498            if let Some(inner) = this {
2499                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2500                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2501            } else {
2502                ::fidl_next::wire::Union::encode_absent(raw);
2503            }
2504
2505            Ok(())
2506        }
2507    }
2508
2509    unsafe impl<'a, ___E> ::fidl_next::EncodeOption<crate::wire_optional::Command<'static>, ___E>
2510        for &'a Command
2511    where
2512        ___E: ?Sized,
2513        &'a Command: ::fidl_next::Encode<crate::wire::Command<'static>, ___E>,
2514    {
2515        #[inline]
2516        fn encode_option(
2517            this: ::core::option::Option<Self>,
2518            encoder: &mut ___E,
2519            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Command<'static>>,
2520            _: (),
2521        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2522            ::fidl_next::munge!(let crate::wire_optional::Command { raw, _phantom: _ } = &mut *out);
2523
2524            if let Some(inner) = this {
2525                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2526                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2527            } else {
2528                ::fidl_next::wire::Union::encode_absent(raw);
2529            }
2530
2531            Ok(())
2532        }
2533    }
2534
2535    impl<'de> ::fidl_next::FromWire<crate::wire::Command<'de>> for Command {
2536        #[inline]
2537        fn from_wire(wire: crate::wire::Command<'de>) -> Self {
2538            let wire = ::core::mem::ManuallyDrop::new(wire);
2539            match wire.raw.ordinal() {
2540                1 => Self::SendKeyboardInput(::fidl_next::FromWire::from_wire(unsafe {
2541                    wire.raw.get().read_unchecked::<crate::wire::SendKeyboardInputCmd>()
2542                })),
2543
2544                2 => Self::SendPointerInput(::fidl_next::FromWire::from_wire(unsafe {
2545                    wire.raw.get().read_unchecked::<crate::wire::SendPointerInputCmd>()
2546                })),
2547
2548                3 => Self::SetHardKeyboardDelivery(::fidl_next::FromWire::from_wire(unsafe {
2549                    wire.raw.get().read_unchecked::<crate::wire::SetHardKeyboardDeliveryCmd>()
2550                })),
2551
2552                4 => Self::SetParallelDispatch(::fidl_next::FromWire::from_wire(unsafe {
2553                    wire.raw.get().read_unchecked::<crate::wire::SetParallelDispatchCmd>()
2554                })),
2555
2556                _ => unsafe { ::core::hint::unreachable_unchecked() },
2557            }
2558        }
2559    }
2560
2561    impl<'de> ::fidl_next::FromWireRef<crate::wire::Command<'de>> for Command {
2562        #[inline]
2563        fn from_wire_ref(wire: &crate::wire::Command<'de>) -> Self {
2564            match wire.raw.ordinal() {
2565                1 => Self::SendKeyboardInput(::fidl_next::FromWireRef::from_wire_ref(unsafe {
2566                    wire.raw.get().deref_unchecked::<crate::wire::SendKeyboardInputCmd>()
2567                })),
2568
2569                2 => Self::SendPointerInput(::fidl_next::FromWireRef::from_wire_ref(unsafe {
2570                    wire.raw.get().deref_unchecked::<crate::wire::SendPointerInputCmd>()
2571                })),
2572
2573                3 => {
2574                    Self::SetHardKeyboardDelivery(::fidl_next::FromWireRef::from_wire_ref(unsafe {
2575                        wire.raw.get().deref_unchecked::<crate::wire::SetHardKeyboardDeliveryCmd>()
2576                    }))
2577                }
2578
2579                4 => Self::SetParallelDispatch(::fidl_next::FromWireRef::from_wire_ref(unsafe {
2580                    wire.raw.get().deref_unchecked::<crate::wire::SetParallelDispatchCmd>()
2581                })),
2582
2583                _ => unsafe { ::core::hint::unreachable_unchecked() },
2584            }
2585        }
2586    }
2587
2588    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Command<'de>> for Command {
2589        #[inline]
2590        fn from_wire_option(
2591            wire: crate::wire_optional::Command<'de>,
2592        ) -> ::core::option::Option<Self> {
2593            if let Some(inner) = wire.into_option() {
2594                Some(::fidl_next::FromWire::from_wire(inner))
2595            } else {
2596                None
2597            }
2598        }
2599    }
2600
2601    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Command<'de>> for Box<Command> {
2602        #[inline]
2603        fn from_wire_option(
2604            wire: crate::wire_optional::Command<'de>,
2605        ) -> ::core::option::Option<Self> {
2606            <
2607            Command as ::fidl_next::FromWireOption<crate::wire_optional::Command<'de>>
2608        >::from_wire_option(wire).map(Box::new)
2609        }
2610    }
2611
2612    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::Command<'de>> for Box<Command> {
2613        #[inline]
2614        fn from_wire_option_ref(
2615            wire: &crate::wire_optional::Command<'de>,
2616        ) -> ::core::option::Option<Self> {
2617            if let Some(inner) = wire.as_ref() {
2618                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
2619            } else {
2620                None
2621            }
2622        }
2623    }
2624
2625    #[doc = " Describes the format of the input report that will be sent from the\n ConsumerControl device to the host.\n"]
2626    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2627    pub struct ConsumerControlInputDescriptor {
2628        pub buttons: ::core::option::Option<
2629            ::std::vec::Vec<::fidl_next_common_fuchsia_input::natural::ConsumerControlButton>,
2630        >,
2631    }
2632
2633    impl ConsumerControlInputDescriptor {
2634        fn __max_ordinal(&self) -> usize {
2635            if self.buttons.is_some() {
2636                return 1;
2637            }
2638
2639            0
2640        }
2641    }
2642
2643    unsafe impl<___E>
2644        ::fidl_next::Encode<crate::wire::ConsumerControlInputDescriptor<'static>, ___E>
2645        for ConsumerControlInputDescriptor
2646    where
2647        ___E: ::fidl_next::Encoder + ?Sized,
2648    {
2649        #[inline]
2650        fn encode(
2651            mut self,
2652            encoder: &mut ___E,
2653            out: &mut ::core::mem::MaybeUninit<
2654                crate::wire::ConsumerControlInputDescriptor<'static>,
2655            >,
2656            _: (),
2657        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2658            ::fidl_next::munge!(let crate::wire::ConsumerControlInputDescriptor { table } = out);
2659
2660            let max_ord = self.__max_ordinal();
2661
2662            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2663            ::fidl_next::Wire::zero_padding(&mut out);
2664
2665            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2666                ::fidl_next::wire::Envelope,
2667            >(encoder, max_ord);
2668
2669            for i in 1..=max_ord {
2670                match i {
2671                    1 => {
2672                        if let Some(value) = self.buttons.take() {
2673                            ::fidl_next::wire::Envelope::encode_value::<
2674                                ::fidl_next::wire::Vector<
2675                                    'static,
2676                                    ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
2677                                >,
2678                                ___E,
2679                            >(
2680                                value, preallocated.encoder, &mut out, (255, ())
2681                            )?;
2682                        } else {
2683                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2684                        }
2685                    }
2686
2687                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2688                }
2689                unsafe {
2690                    preallocated.write_next(out.assume_init_ref());
2691                }
2692            }
2693
2694            ::fidl_next::wire::Table::encode_len(table, max_ord);
2695
2696            Ok(())
2697        }
2698    }
2699
2700    unsafe impl<'a, ___E>
2701        ::fidl_next::Encode<crate::wire::ConsumerControlInputDescriptor<'static>, ___E>
2702        for &'a ConsumerControlInputDescriptor
2703    where
2704        ___E: ::fidl_next::Encoder + ?Sized,
2705    {
2706        #[inline]
2707        fn encode(
2708            self,
2709            encoder: &mut ___E,
2710            out: &mut ::core::mem::MaybeUninit<
2711                crate::wire::ConsumerControlInputDescriptor<'static>,
2712            >,
2713            _: (),
2714        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2715            ::fidl_next::munge!(let crate::wire::ConsumerControlInputDescriptor { table } = out);
2716
2717            let max_ord = self.__max_ordinal();
2718
2719            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2720            ::fidl_next::Wire::zero_padding(&mut out);
2721
2722            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2723                ::fidl_next::wire::Envelope,
2724            >(encoder, max_ord);
2725
2726            for i in 1..=max_ord {
2727                match i {
2728                    1 => {
2729                        if let Some(value) = &self.buttons {
2730                            ::fidl_next::wire::Envelope::encode_value::<
2731                                ::fidl_next::wire::Vector<
2732                                    'static,
2733                                    ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
2734                                >,
2735                                ___E,
2736                            >(
2737                                value, preallocated.encoder, &mut out, (255, ())
2738                            )?;
2739                        } else {
2740                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2741                        }
2742                    }
2743
2744                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2745                }
2746                unsafe {
2747                    preallocated.write_next(out.assume_init_ref());
2748                }
2749            }
2750
2751            ::fidl_next::wire::Table::encode_len(table, max_ord);
2752
2753            Ok(())
2754        }
2755    }
2756
2757    impl<'de> ::fidl_next::FromWire<crate::wire::ConsumerControlInputDescriptor<'de>>
2758        for ConsumerControlInputDescriptor
2759    {
2760        #[inline]
2761        fn from_wire(wire_: crate::wire::ConsumerControlInputDescriptor<'de>) -> Self {
2762            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2763
2764            let buttons = wire_.table.get(1);
2765
2766            Self {
2767                buttons: buttons.map(|envelope| {
2768                    ::fidl_next::FromWire::from_wire(unsafe {
2769                        envelope.read_unchecked::<::fidl_next::wire::Vector<
2770                            'de,
2771                            ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
2772                        >>()
2773                    })
2774                }),
2775            }
2776        }
2777    }
2778
2779    impl<'de> ::fidl_next::FromWireRef<crate::wire::ConsumerControlInputDescriptor<'de>>
2780        for ConsumerControlInputDescriptor
2781    {
2782        #[inline]
2783        fn from_wire_ref(wire: &crate::wire::ConsumerControlInputDescriptor<'de>) -> Self {
2784            Self {
2785                buttons: wire.table.get(1).map(|envelope| {
2786                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2787                        envelope.deref_unchecked::<::fidl_next::wire::Vector<
2788                            'de,
2789                            ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
2790                        >>()
2791                    })
2792                }),
2793            }
2794        }
2795    }
2796
2797    #[doc = " A Fuchsia ConsumerControl represents a device that changes values on the host.\n"]
2798    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2799    pub struct ConsumerControlDescriptor {
2800        pub input: ::core::option::Option<crate::natural::ConsumerControlInputDescriptor>,
2801    }
2802
2803    impl ConsumerControlDescriptor {
2804        fn __max_ordinal(&self) -> usize {
2805            if self.input.is_some() {
2806                return 1;
2807            }
2808
2809            0
2810        }
2811    }
2812
2813    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ConsumerControlDescriptor<'static>, ___E>
2814        for ConsumerControlDescriptor
2815    where
2816        ___E: ::fidl_next::Encoder + ?Sized,
2817    {
2818        #[inline]
2819        fn encode(
2820            mut self,
2821            encoder: &mut ___E,
2822            out: &mut ::core::mem::MaybeUninit<crate::wire::ConsumerControlDescriptor<'static>>,
2823            _: (),
2824        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2825            ::fidl_next::munge!(let crate::wire::ConsumerControlDescriptor { table } = out);
2826
2827            let max_ord = self.__max_ordinal();
2828
2829            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2830            ::fidl_next::Wire::zero_padding(&mut out);
2831
2832            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2833                ::fidl_next::wire::Envelope,
2834            >(encoder, max_ord);
2835
2836            for i in 1..=max_ord {
2837                match i {
2838                    1 => {
2839                        if let Some(value) = self.input.take() {
2840                            ::fidl_next::wire::Envelope::encode_value::<
2841                                crate::wire::ConsumerControlInputDescriptor<'static>,
2842                                ___E,
2843                            >(
2844                                value, preallocated.encoder, &mut out, ()
2845                            )?;
2846                        } else {
2847                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2848                        }
2849                    }
2850
2851                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2852                }
2853                unsafe {
2854                    preallocated.write_next(out.assume_init_ref());
2855                }
2856            }
2857
2858            ::fidl_next::wire::Table::encode_len(table, max_ord);
2859
2860            Ok(())
2861        }
2862    }
2863
2864    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ConsumerControlDescriptor<'static>, ___E>
2865        for &'a ConsumerControlDescriptor
2866    where
2867        ___E: ::fidl_next::Encoder + ?Sized,
2868    {
2869        #[inline]
2870        fn encode(
2871            self,
2872            encoder: &mut ___E,
2873            out: &mut ::core::mem::MaybeUninit<crate::wire::ConsumerControlDescriptor<'static>>,
2874            _: (),
2875        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2876            ::fidl_next::munge!(let crate::wire::ConsumerControlDescriptor { table } = out);
2877
2878            let max_ord = self.__max_ordinal();
2879
2880            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2881            ::fidl_next::Wire::zero_padding(&mut out);
2882
2883            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2884                ::fidl_next::wire::Envelope,
2885            >(encoder, max_ord);
2886
2887            for i in 1..=max_ord {
2888                match i {
2889                    1 => {
2890                        if let Some(value) = &self.input {
2891                            ::fidl_next::wire::Envelope::encode_value::<
2892                                crate::wire::ConsumerControlInputDescriptor<'static>,
2893                                ___E,
2894                            >(
2895                                value, preallocated.encoder, &mut out, ()
2896                            )?;
2897                        } else {
2898                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2899                        }
2900                    }
2901
2902                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2903                }
2904                unsafe {
2905                    preallocated.write_next(out.assume_init_ref());
2906                }
2907            }
2908
2909            ::fidl_next::wire::Table::encode_len(table, max_ord);
2910
2911            Ok(())
2912        }
2913    }
2914
2915    impl<'de> ::fidl_next::FromWire<crate::wire::ConsumerControlDescriptor<'de>>
2916        for ConsumerControlDescriptor
2917    {
2918        #[inline]
2919        fn from_wire(wire_: crate::wire::ConsumerControlDescriptor<'de>) -> Self {
2920            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2921
2922            let input = wire_.table.get(1);
2923
2924            Self {
2925                input: input.map(|envelope| {
2926                    ::fidl_next::FromWire::from_wire(unsafe {
2927                        envelope
2928                            .read_unchecked::<crate::wire::ConsumerControlInputDescriptor<'de>>()
2929                    })
2930                }),
2931            }
2932        }
2933    }
2934
2935    impl<'de> ::fidl_next::FromWireRef<crate::wire::ConsumerControlDescriptor<'de>>
2936        for ConsumerControlDescriptor
2937    {
2938        #[inline]
2939        fn from_wire_ref(wire: &crate::wire::ConsumerControlDescriptor<'de>) -> Self {
2940            Self {
2941                input: wire.table.get(1).map(|envelope| {
2942                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2943                        envelope
2944                            .deref_unchecked::<crate::wire::ConsumerControlInputDescriptor<'de>>()
2945                    })
2946                }),
2947            }
2948        }
2949    }
2950
2951    #[doc = " `ContactInputDescriptor` describes the fields associated with a touch on a touch device.\n"]
2952    #[derive(Debug, Default, Clone, PartialEq)]
2953    pub struct ContactInputDescriptor {
2954        pub position_x: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
2955
2956        pub position_y: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
2957
2958        pub pressure: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
2959
2960        pub contact_width: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
2961
2962        pub contact_height: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
2963    }
2964
2965    impl ContactInputDescriptor {
2966        fn __max_ordinal(&self) -> usize {
2967            if self.contact_height.is_some() {
2968                return 5;
2969            }
2970
2971            if self.contact_width.is_some() {
2972                return 4;
2973            }
2974
2975            if self.pressure.is_some() {
2976                return 3;
2977            }
2978
2979            if self.position_y.is_some() {
2980                return 2;
2981            }
2982
2983            if self.position_x.is_some() {
2984                return 1;
2985            }
2986
2987            0
2988        }
2989    }
2990
2991    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ContactInputDescriptor<'static>, ___E>
2992        for ContactInputDescriptor
2993    where
2994        ___E: ::fidl_next::Encoder + ?Sized,
2995    {
2996        #[inline]
2997        fn encode(
2998            mut self,
2999            encoder: &mut ___E,
3000            out: &mut ::core::mem::MaybeUninit<crate::wire::ContactInputDescriptor<'static>>,
3001            _: (),
3002        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3003            ::fidl_next::munge!(let crate::wire::ContactInputDescriptor { table } = out);
3004
3005            let max_ord = self.__max_ordinal();
3006
3007            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3008            ::fidl_next::Wire::zero_padding(&mut out);
3009
3010            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3011                ::fidl_next::wire::Envelope,
3012            >(encoder, max_ord);
3013
3014            for i in 1..=max_ord {
3015                match i {
3016                    5 => {
3017                        if let Some(value) = self.contact_height.take() {
3018                            ::fidl_next::wire::Envelope::encode_value::<
3019                                ::fidl_next_common_fuchsia_input::wire::Axis,
3020                                ___E,
3021                            >(
3022                                value, preallocated.encoder, &mut out, ()
3023                            )?;
3024                        } else {
3025                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3026                        }
3027                    }
3028
3029                    4 => {
3030                        if let Some(value) = self.contact_width.take() {
3031                            ::fidl_next::wire::Envelope::encode_value::<
3032                                ::fidl_next_common_fuchsia_input::wire::Axis,
3033                                ___E,
3034                            >(
3035                                value, preallocated.encoder, &mut out, ()
3036                            )?;
3037                        } else {
3038                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3039                        }
3040                    }
3041
3042                    3 => {
3043                        if let Some(value) = self.pressure.take() {
3044                            ::fidl_next::wire::Envelope::encode_value::<
3045                                ::fidl_next_common_fuchsia_input::wire::Axis,
3046                                ___E,
3047                            >(
3048                                value, preallocated.encoder, &mut out, ()
3049                            )?;
3050                        } else {
3051                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3052                        }
3053                    }
3054
3055                    2 => {
3056                        if let Some(value) = self.position_y.take() {
3057                            ::fidl_next::wire::Envelope::encode_value::<
3058                                ::fidl_next_common_fuchsia_input::wire::Axis,
3059                                ___E,
3060                            >(
3061                                value, preallocated.encoder, &mut out, ()
3062                            )?;
3063                        } else {
3064                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3065                        }
3066                    }
3067
3068                    1 => {
3069                        if let Some(value) = self.position_x.take() {
3070                            ::fidl_next::wire::Envelope::encode_value::<
3071                                ::fidl_next_common_fuchsia_input::wire::Axis,
3072                                ___E,
3073                            >(
3074                                value, preallocated.encoder, &mut out, ()
3075                            )?;
3076                        } else {
3077                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3078                        }
3079                    }
3080
3081                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3082                }
3083                unsafe {
3084                    preallocated.write_next(out.assume_init_ref());
3085                }
3086            }
3087
3088            ::fidl_next::wire::Table::encode_len(table, max_ord);
3089
3090            Ok(())
3091        }
3092    }
3093
3094    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ContactInputDescriptor<'static>, ___E>
3095        for &'a ContactInputDescriptor
3096    where
3097        ___E: ::fidl_next::Encoder + ?Sized,
3098    {
3099        #[inline]
3100        fn encode(
3101            self,
3102            encoder: &mut ___E,
3103            out: &mut ::core::mem::MaybeUninit<crate::wire::ContactInputDescriptor<'static>>,
3104            _: (),
3105        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3106            ::fidl_next::munge!(let crate::wire::ContactInputDescriptor { table } = out);
3107
3108            let max_ord = self.__max_ordinal();
3109
3110            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3111            ::fidl_next::Wire::zero_padding(&mut out);
3112
3113            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3114                ::fidl_next::wire::Envelope,
3115            >(encoder, max_ord);
3116
3117            for i in 1..=max_ord {
3118                match i {
3119                    5 => {
3120                        if let Some(value) = &self.contact_height {
3121                            ::fidl_next::wire::Envelope::encode_value::<
3122                                ::fidl_next_common_fuchsia_input::wire::Axis,
3123                                ___E,
3124                            >(
3125                                value, preallocated.encoder, &mut out, ()
3126                            )?;
3127                        } else {
3128                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3129                        }
3130                    }
3131
3132                    4 => {
3133                        if let Some(value) = &self.contact_width {
3134                            ::fidl_next::wire::Envelope::encode_value::<
3135                                ::fidl_next_common_fuchsia_input::wire::Axis,
3136                                ___E,
3137                            >(
3138                                value, preallocated.encoder, &mut out, ()
3139                            )?;
3140                        } else {
3141                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3142                        }
3143                    }
3144
3145                    3 => {
3146                        if let Some(value) = &self.pressure {
3147                            ::fidl_next::wire::Envelope::encode_value::<
3148                                ::fidl_next_common_fuchsia_input::wire::Axis,
3149                                ___E,
3150                            >(
3151                                value, preallocated.encoder, &mut out, ()
3152                            )?;
3153                        } else {
3154                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3155                        }
3156                    }
3157
3158                    2 => {
3159                        if let Some(value) = &self.position_y {
3160                            ::fidl_next::wire::Envelope::encode_value::<
3161                                ::fidl_next_common_fuchsia_input::wire::Axis,
3162                                ___E,
3163                            >(
3164                                value, preallocated.encoder, &mut out, ()
3165                            )?;
3166                        } else {
3167                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3168                        }
3169                    }
3170
3171                    1 => {
3172                        if let Some(value) = &self.position_x {
3173                            ::fidl_next::wire::Envelope::encode_value::<
3174                                ::fidl_next_common_fuchsia_input::wire::Axis,
3175                                ___E,
3176                            >(
3177                                value, preallocated.encoder, &mut out, ()
3178                            )?;
3179                        } else {
3180                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3181                        }
3182                    }
3183
3184                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3185                }
3186                unsafe {
3187                    preallocated.write_next(out.assume_init_ref());
3188                }
3189            }
3190
3191            ::fidl_next::wire::Table::encode_len(table, max_ord);
3192
3193            Ok(())
3194        }
3195    }
3196
3197    impl<'de> ::fidl_next::FromWire<crate::wire::ContactInputDescriptor<'de>>
3198        for ContactInputDescriptor
3199    {
3200        #[inline]
3201        fn from_wire(wire_: crate::wire::ContactInputDescriptor<'de>) -> Self {
3202            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3203
3204            let position_x = wire_.table.get(1);
3205
3206            let position_y = wire_.table.get(2);
3207
3208            let pressure = wire_.table.get(3);
3209
3210            let contact_width = wire_.table.get(4);
3211
3212            let contact_height = wire_.table.get(5);
3213
3214            Self {
3215                position_x: position_x.map(|envelope| {
3216                    ::fidl_next::FromWire::from_wire(unsafe {
3217                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3218                    })
3219                }),
3220
3221                position_y: position_y.map(|envelope| {
3222                    ::fidl_next::FromWire::from_wire(unsafe {
3223                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3224                    })
3225                }),
3226
3227                pressure: pressure.map(|envelope| {
3228                    ::fidl_next::FromWire::from_wire(unsafe {
3229                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3230                    })
3231                }),
3232
3233                contact_width: contact_width.map(|envelope| {
3234                    ::fidl_next::FromWire::from_wire(unsafe {
3235                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3236                    })
3237                }),
3238
3239                contact_height: contact_height.map(|envelope| {
3240                    ::fidl_next::FromWire::from_wire(unsafe {
3241                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3242                    })
3243                }),
3244            }
3245        }
3246    }
3247
3248    impl<'de> ::fidl_next::FromWireRef<crate::wire::ContactInputDescriptor<'de>>
3249        for ContactInputDescriptor
3250    {
3251        #[inline]
3252        fn from_wire_ref(wire: &crate::wire::ContactInputDescriptor<'de>) -> Self {
3253            Self {
3254                position_x: wire.table.get(1).map(|envelope| {
3255                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3256                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3257                    })
3258                }),
3259
3260                position_y: wire.table.get(2).map(|envelope| {
3261                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3262                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3263                    })
3264                }),
3265
3266                pressure: wire.table.get(3).map(|envelope| {
3267                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3268                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3269                    })
3270                }),
3271
3272                contact_width: wire.table.get(4).map(|envelope| {
3273                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3274                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3275                    })
3276                }),
3277
3278                contact_height: wire.table.get(5).map(|envelope| {
3279                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3280                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
3281                    })
3282                }),
3283            }
3284        }
3285    }
3286
3287    #[doc = " DeviceInformation provides more information about the device and lets a\n client distinguish between devices (e.g between two touchscreens that come\n from different vendors).\n"]
3288    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3289    pub struct DeviceInformation {
3290        pub vendor_id: ::core::option::Option<u32>,
3291
3292        pub product_id: ::core::option::Option<u32>,
3293
3294        pub version: ::core::option::Option<u32>,
3295
3296        pub polling_rate: ::core::option::Option<i64>,
3297
3298        pub manufacturer_name: ::core::option::Option<::std::string::String>,
3299
3300        pub product_name: ::core::option::Option<::std::string::String>,
3301
3302        pub serial_number: ::core::option::Option<::std::string::String>,
3303    }
3304
3305    impl DeviceInformation {
3306        fn __max_ordinal(&self) -> usize {
3307            if self.serial_number.is_some() {
3308                return 7;
3309            }
3310
3311            if self.product_name.is_some() {
3312                return 6;
3313            }
3314
3315            if self.manufacturer_name.is_some() {
3316                return 5;
3317            }
3318
3319            if self.polling_rate.is_some() {
3320                return 4;
3321            }
3322
3323            if self.version.is_some() {
3324                return 3;
3325            }
3326
3327            if self.product_id.is_some() {
3328                return 2;
3329            }
3330
3331            if self.vendor_id.is_some() {
3332                return 1;
3333            }
3334
3335            0
3336        }
3337    }
3338
3339    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceInformation<'static>, ___E>
3340        for DeviceInformation
3341    where
3342        ___E: ::fidl_next::Encoder + ?Sized,
3343    {
3344        #[inline]
3345        fn encode(
3346            mut self,
3347            encoder: &mut ___E,
3348            out: &mut ::core::mem::MaybeUninit<crate::wire::DeviceInformation<'static>>,
3349            _: (),
3350        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3351            ::fidl_next::munge!(let crate::wire::DeviceInformation { table } = out);
3352
3353            let max_ord = self.__max_ordinal();
3354
3355            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3356            ::fidl_next::Wire::zero_padding(&mut out);
3357
3358            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3359                ::fidl_next::wire::Envelope,
3360            >(encoder, max_ord);
3361
3362            for i in 1..=max_ord {
3363                match i {
3364                    7 => {
3365                        if let Some(value) = self.serial_number.take() {
3366                            ::fidl_next::wire::Envelope::encode_value::<
3367                                ::fidl_next::wire::String<'static>,
3368                                ___E,
3369                            >(
3370                                value, preallocated.encoder, &mut out, 256
3371                            )?;
3372                        } else {
3373                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3374                        }
3375                    }
3376
3377                    6 => {
3378                        if let Some(value) = self.product_name.take() {
3379                            ::fidl_next::wire::Envelope::encode_value::<
3380                                ::fidl_next::wire::String<'static>,
3381                                ___E,
3382                            >(
3383                                value, preallocated.encoder, &mut out, 256
3384                            )?;
3385                        } else {
3386                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3387                        }
3388                    }
3389
3390                    5 => {
3391                        if let Some(value) = self.manufacturer_name.take() {
3392                            ::fidl_next::wire::Envelope::encode_value::<
3393                                ::fidl_next::wire::String<'static>,
3394                                ___E,
3395                            >(
3396                                value, preallocated.encoder, &mut out, 256
3397                            )?;
3398                        } else {
3399                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3400                        }
3401                    }
3402
3403                    4 => {
3404                        if let Some(value) = self.polling_rate.take() {
3405                            ::fidl_next::wire::Envelope::encode_value::<
3406                                ::fidl_next::wire::Int64,
3407                                ___E,
3408                            >(
3409                                value, preallocated.encoder, &mut out, ()
3410                            )?;
3411                        } else {
3412                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3413                        }
3414                    }
3415
3416                    3 => {
3417                        if let Some(value) = self.version.take() {
3418                            ::fidl_next::wire::Envelope::encode_value::<
3419                                ::fidl_next::wire::Uint32,
3420                                ___E,
3421                            >(
3422                                value, preallocated.encoder, &mut out, ()
3423                            )?;
3424                        } else {
3425                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3426                        }
3427                    }
3428
3429                    2 => {
3430                        if let Some(value) = self.product_id.take() {
3431                            ::fidl_next::wire::Envelope::encode_value::<
3432                                ::fidl_next::wire::Uint32,
3433                                ___E,
3434                            >(
3435                                value, preallocated.encoder, &mut out, ()
3436                            )?;
3437                        } else {
3438                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3439                        }
3440                    }
3441
3442                    1 => {
3443                        if let Some(value) = self.vendor_id.take() {
3444                            ::fidl_next::wire::Envelope::encode_value::<
3445                                ::fidl_next::wire::Uint32,
3446                                ___E,
3447                            >(
3448                                value, preallocated.encoder, &mut out, ()
3449                            )?;
3450                        } else {
3451                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3452                        }
3453                    }
3454
3455                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3456                }
3457                unsafe {
3458                    preallocated.write_next(out.assume_init_ref());
3459                }
3460            }
3461
3462            ::fidl_next::wire::Table::encode_len(table, max_ord);
3463
3464            Ok(())
3465        }
3466    }
3467
3468    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceInformation<'static>, ___E>
3469        for &'a DeviceInformation
3470    where
3471        ___E: ::fidl_next::Encoder + ?Sized,
3472    {
3473        #[inline]
3474        fn encode(
3475            self,
3476            encoder: &mut ___E,
3477            out: &mut ::core::mem::MaybeUninit<crate::wire::DeviceInformation<'static>>,
3478            _: (),
3479        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3480            ::fidl_next::munge!(let crate::wire::DeviceInformation { table } = out);
3481
3482            let max_ord = self.__max_ordinal();
3483
3484            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3485            ::fidl_next::Wire::zero_padding(&mut out);
3486
3487            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3488                ::fidl_next::wire::Envelope,
3489            >(encoder, max_ord);
3490
3491            for i in 1..=max_ord {
3492                match i {
3493                    7 => {
3494                        if let Some(value) = &self.serial_number {
3495                            ::fidl_next::wire::Envelope::encode_value::<
3496                                ::fidl_next::wire::String<'static>,
3497                                ___E,
3498                            >(
3499                                value, preallocated.encoder, &mut out, 256
3500                            )?;
3501                        } else {
3502                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3503                        }
3504                    }
3505
3506                    6 => {
3507                        if let Some(value) = &self.product_name {
3508                            ::fidl_next::wire::Envelope::encode_value::<
3509                                ::fidl_next::wire::String<'static>,
3510                                ___E,
3511                            >(
3512                                value, preallocated.encoder, &mut out, 256
3513                            )?;
3514                        } else {
3515                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3516                        }
3517                    }
3518
3519                    5 => {
3520                        if let Some(value) = &self.manufacturer_name {
3521                            ::fidl_next::wire::Envelope::encode_value::<
3522                                ::fidl_next::wire::String<'static>,
3523                                ___E,
3524                            >(
3525                                value, preallocated.encoder, &mut out, 256
3526                            )?;
3527                        } else {
3528                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3529                        }
3530                    }
3531
3532                    4 => {
3533                        if let Some(value) = &self.polling_rate {
3534                            ::fidl_next::wire::Envelope::encode_value::<
3535                                ::fidl_next::wire::Int64,
3536                                ___E,
3537                            >(
3538                                value, preallocated.encoder, &mut out, ()
3539                            )?;
3540                        } else {
3541                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3542                        }
3543                    }
3544
3545                    3 => {
3546                        if let Some(value) = &self.version {
3547                            ::fidl_next::wire::Envelope::encode_value::<
3548                                ::fidl_next::wire::Uint32,
3549                                ___E,
3550                            >(
3551                                value, preallocated.encoder, &mut out, ()
3552                            )?;
3553                        } else {
3554                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3555                        }
3556                    }
3557
3558                    2 => {
3559                        if let Some(value) = &self.product_id {
3560                            ::fidl_next::wire::Envelope::encode_value::<
3561                                ::fidl_next::wire::Uint32,
3562                                ___E,
3563                            >(
3564                                value, preallocated.encoder, &mut out, ()
3565                            )?;
3566                        } else {
3567                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3568                        }
3569                    }
3570
3571                    1 => {
3572                        if let Some(value) = &self.vendor_id {
3573                            ::fidl_next::wire::Envelope::encode_value::<
3574                                ::fidl_next::wire::Uint32,
3575                                ___E,
3576                            >(
3577                                value, preallocated.encoder, &mut out, ()
3578                            )?;
3579                        } else {
3580                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3581                        }
3582                    }
3583
3584                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3585                }
3586                unsafe {
3587                    preallocated.write_next(out.assume_init_ref());
3588                }
3589            }
3590
3591            ::fidl_next::wire::Table::encode_len(table, max_ord);
3592
3593            Ok(())
3594        }
3595    }
3596
3597    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceInformation<'de>> for DeviceInformation {
3598        #[inline]
3599        fn from_wire(wire_: crate::wire::DeviceInformation<'de>) -> Self {
3600            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3601
3602            let vendor_id = wire_.table.get(1);
3603
3604            let product_id = wire_.table.get(2);
3605
3606            let version = wire_.table.get(3);
3607
3608            let polling_rate = wire_.table.get(4);
3609
3610            let manufacturer_name = wire_.table.get(5);
3611
3612            let product_name = wire_.table.get(6);
3613
3614            let serial_number = wire_.table.get(7);
3615
3616            Self {
3617                vendor_id: vendor_id.map(|envelope| {
3618                    ::fidl_next::FromWire::from_wire(unsafe {
3619                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3620                    })
3621                }),
3622
3623                product_id: product_id.map(|envelope| {
3624                    ::fidl_next::FromWire::from_wire(unsafe {
3625                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3626                    })
3627                }),
3628
3629                version: version.map(|envelope| {
3630                    ::fidl_next::FromWire::from_wire(unsafe {
3631                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3632                    })
3633                }),
3634
3635                polling_rate: polling_rate.map(|envelope| {
3636                    ::fidl_next::FromWire::from_wire(unsafe {
3637                        envelope.read_unchecked::<::fidl_next::wire::Int64>()
3638                    })
3639                }),
3640
3641                manufacturer_name: manufacturer_name.map(|envelope| {
3642                    ::fidl_next::FromWire::from_wire(unsafe {
3643                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3644                    })
3645                }),
3646
3647                product_name: product_name.map(|envelope| {
3648                    ::fidl_next::FromWire::from_wire(unsafe {
3649                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3650                    })
3651                }),
3652
3653                serial_number: serial_number.map(|envelope| {
3654                    ::fidl_next::FromWire::from_wire(unsafe {
3655                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3656                    })
3657                }),
3658            }
3659        }
3660    }
3661
3662    impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceInformation<'de>> for DeviceInformation {
3663        #[inline]
3664        fn from_wire_ref(wire: &crate::wire::DeviceInformation<'de>) -> Self {
3665            Self {
3666                vendor_id: wire.table.get(1).map(|envelope| {
3667                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3668                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3669                    })
3670                }),
3671
3672                product_id: wire.table.get(2).map(|envelope| {
3673                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3674                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3675                    })
3676                }),
3677
3678                version: wire.table.get(3).map(|envelope| {
3679                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3680                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3681                    })
3682                }),
3683
3684                polling_rate: wire.table.get(4).map(|envelope| {
3685                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3686                        envelope.deref_unchecked::<::fidl_next::wire::Int64>()
3687                    })
3688                }),
3689
3690                manufacturer_name: wire.table.get(5).map(|envelope| {
3691                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3692                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
3693                    })
3694                }),
3695
3696                product_name: wire.table.get(6).map(|envelope| {
3697                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3698                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
3699                    })
3700                }),
3701
3702                serial_number: wire.table.get(7).map(|envelope| {
3703                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3704                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
3705                    })
3706                }),
3707            }
3708        }
3709    }
3710
3711    #[doc = " Describes the format of the input report that will be sent from the mouse\n to the device.\n"]
3712    #[derive(Debug, Default, Clone, PartialEq)]
3713    pub struct MouseInputDescriptor {
3714        pub movement_x: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
3715
3716        pub movement_y: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
3717
3718        pub scroll_v: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
3719
3720        pub scroll_h: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
3721
3722        pub buttons: ::core::option::Option<::std::vec::Vec<u8>>,
3723
3724        pub position_x: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
3725
3726        pub position_y: ::core::option::Option<::fidl_next_common_fuchsia_input::natural::Axis>,
3727    }
3728
3729    impl MouseInputDescriptor {
3730        fn __max_ordinal(&self) -> usize {
3731            if self.position_y.is_some() {
3732                return 7;
3733            }
3734
3735            if self.position_x.is_some() {
3736                return 6;
3737            }
3738
3739            if self.buttons.is_some() {
3740                return 5;
3741            }
3742
3743            if self.scroll_h.is_some() {
3744                return 4;
3745            }
3746
3747            if self.scroll_v.is_some() {
3748                return 3;
3749            }
3750
3751            if self.movement_y.is_some() {
3752                return 2;
3753            }
3754
3755            if self.movement_x.is_some() {
3756                return 1;
3757            }
3758
3759            0
3760        }
3761    }
3762
3763    unsafe impl<___E> ::fidl_next::Encode<crate::wire::MouseInputDescriptor<'static>, ___E>
3764        for MouseInputDescriptor
3765    where
3766        ___E: ::fidl_next::Encoder + ?Sized,
3767    {
3768        #[inline]
3769        fn encode(
3770            mut self,
3771            encoder: &mut ___E,
3772            out: &mut ::core::mem::MaybeUninit<crate::wire::MouseInputDescriptor<'static>>,
3773            _: (),
3774        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3775            ::fidl_next::munge!(let crate::wire::MouseInputDescriptor { table } = out);
3776
3777            let max_ord = self.__max_ordinal();
3778
3779            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3780            ::fidl_next::Wire::zero_padding(&mut out);
3781
3782            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3783                ::fidl_next::wire::Envelope,
3784            >(encoder, max_ord);
3785
3786            for i in 1..=max_ord {
3787                match i {
3788                    7 => {
3789                        if let Some(value) = self.position_y.take() {
3790                            ::fidl_next::wire::Envelope::encode_value::<
3791                                ::fidl_next_common_fuchsia_input::wire::Axis,
3792                                ___E,
3793                            >(
3794                                value, preallocated.encoder, &mut out, ()
3795                            )?;
3796                        } else {
3797                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3798                        }
3799                    }
3800
3801                    6 => {
3802                        if let Some(value) = self.position_x.take() {
3803                            ::fidl_next::wire::Envelope::encode_value::<
3804                                ::fidl_next_common_fuchsia_input::wire::Axis,
3805                                ___E,
3806                            >(
3807                                value, preallocated.encoder, &mut out, ()
3808                            )?;
3809                        } else {
3810                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3811                        }
3812                    }
3813
3814                    5 => {
3815                        if let Some(value) = self.buttons.take() {
3816                            ::fidl_next::wire::Envelope::encode_value::<
3817                                ::fidl_next::wire::Vector<'static, u8>,
3818                                ___E,
3819                            >(
3820                                value, preallocated.encoder, &mut out, (32, ())
3821                            )?;
3822                        } else {
3823                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3824                        }
3825                    }
3826
3827                    4 => {
3828                        if let Some(value) = self.scroll_h.take() {
3829                            ::fidl_next::wire::Envelope::encode_value::<
3830                                ::fidl_next_common_fuchsia_input::wire::Axis,
3831                                ___E,
3832                            >(
3833                                value, preallocated.encoder, &mut out, ()
3834                            )?;
3835                        } else {
3836                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3837                        }
3838                    }
3839
3840                    3 => {
3841                        if let Some(value) = self.scroll_v.take() {
3842                            ::fidl_next::wire::Envelope::encode_value::<
3843                                ::fidl_next_common_fuchsia_input::wire::Axis,
3844                                ___E,
3845                            >(
3846                                value, preallocated.encoder, &mut out, ()
3847                            )?;
3848                        } else {
3849                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3850                        }
3851                    }
3852
3853                    2 => {
3854                        if let Some(value) = self.movement_y.take() {
3855                            ::fidl_next::wire::Envelope::encode_value::<
3856                                ::fidl_next_common_fuchsia_input::wire::Axis,
3857                                ___E,
3858                            >(
3859                                value, preallocated.encoder, &mut out, ()
3860                            )?;
3861                        } else {
3862                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3863                        }
3864                    }
3865
3866                    1 => {
3867                        if let Some(value) = self.movement_x.take() {
3868                            ::fidl_next::wire::Envelope::encode_value::<
3869                                ::fidl_next_common_fuchsia_input::wire::Axis,
3870                                ___E,
3871                            >(
3872                                value, preallocated.encoder, &mut out, ()
3873                            )?;
3874                        } else {
3875                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3876                        }
3877                    }
3878
3879                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3880                }
3881                unsafe {
3882                    preallocated.write_next(out.assume_init_ref());
3883                }
3884            }
3885
3886            ::fidl_next::wire::Table::encode_len(table, max_ord);
3887
3888            Ok(())
3889        }
3890    }
3891
3892    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MouseInputDescriptor<'static>, ___E>
3893        for &'a MouseInputDescriptor
3894    where
3895        ___E: ::fidl_next::Encoder + ?Sized,
3896    {
3897        #[inline]
3898        fn encode(
3899            self,
3900            encoder: &mut ___E,
3901            out: &mut ::core::mem::MaybeUninit<crate::wire::MouseInputDescriptor<'static>>,
3902            _: (),
3903        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3904            ::fidl_next::munge!(let crate::wire::MouseInputDescriptor { table } = out);
3905
3906            let max_ord = self.__max_ordinal();
3907
3908            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3909            ::fidl_next::Wire::zero_padding(&mut out);
3910
3911            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3912                ::fidl_next::wire::Envelope,
3913            >(encoder, max_ord);
3914
3915            for i in 1..=max_ord {
3916                match i {
3917                    7 => {
3918                        if let Some(value) = &self.position_y {
3919                            ::fidl_next::wire::Envelope::encode_value::<
3920                                ::fidl_next_common_fuchsia_input::wire::Axis,
3921                                ___E,
3922                            >(
3923                                value, preallocated.encoder, &mut out, ()
3924                            )?;
3925                        } else {
3926                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3927                        }
3928                    }
3929
3930                    6 => {
3931                        if let Some(value) = &self.position_x {
3932                            ::fidl_next::wire::Envelope::encode_value::<
3933                                ::fidl_next_common_fuchsia_input::wire::Axis,
3934                                ___E,
3935                            >(
3936                                value, preallocated.encoder, &mut out, ()
3937                            )?;
3938                        } else {
3939                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3940                        }
3941                    }
3942
3943                    5 => {
3944                        if let Some(value) = &self.buttons {
3945                            ::fidl_next::wire::Envelope::encode_value::<
3946                                ::fidl_next::wire::Vector<'static, u8>,
3947                                ___E,
3948                            >(
3949                                value, preallocated.encoder, &mut out, (32, ())
3950                            )?;
3951                        } else {
3952                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3953                        }
3954                    }
3955
3956                    4 => {
3957                        if let Some(value) = &self.scroll_h {
3958                            ::fidl_next::wire::Envelope::encode_value::<
3959                                ::fidl_next_common_fuchsia_input::wire::Axis,
3960                                ___E,
3961                            >(
3962                                value, preallocated.encoder, &mut out, ()
3963                            )?;
3964                        } else {
3965                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3966                        }
3967                    }
3968
3969                    3 => {
3970                        if let Some(value) = &self.scroll_v {
3971                            ::fidl_next::wire::Envelope::encode_value::<
3972                                ::fidl_next_common_fuchsia_input::wire::Axis,
3973                                ___E,
3974                            >(
3975                                value, preallocated.encoder, &mut out, ()
3976                            )?;
3977                        } else {
3978                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3979                        }
3980                    }
3981
3982                    2 => {
3983                        if let Some(value) = &self.movement_y {
3984                            ::fidl_next::wire::Envelope::encode_value::<
3985                                ::fidl_next_common_fuchsia_input::wire::Axis,
3986                                ___E,
3987                            >(
3988                                value, preallocated.encoder, &mut out, ()
3989                            )?;
3990                        } else {
3991                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3992                        }
3993                    }
3994
3995                    1 => {
3996                        if let Some(value) = &self.movement_x {
3997                            ::fidl_next::wire::Envelope::encode_value::<
3998                                ::fidl_next_common_fuchsia_input::wire::Axis,
3999                                ___E,
4000                            >(
4001                                value, preallocated.encoder, &mut out, ()
4002                            )?;
4003                        } else {
4004                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4005                        }
4006                    }
4007
4008                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4009                }
4010                unsafe {
4011                    preallocated.write_next(out.assume_init_ref());
4012                }
4013            }
4014
4015            ::fidl_next::wire::Table::encode_len(table, max_ord);
4016
4017            Ok(())
4018        }
4019    }
4020
4021    impl<'de> ::fidl_next::FromWire<crate::wire::MouseInputDescriptor<'de>> for MouseInputDescriptor {
4022        #[inline]
4023        fn from_wire(wire_: crate::wire::MouseInputDescriptor<'de>) -> Self {
4024            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4025
4026            let movement_x = wire_.table.get(1);
4027
4028            let movement_y = wire_.table.get(2);
4029
4030            let scroll_v = wire_.table.get(3);
4031
4032            let scroll_h = wire_.table.get(4);
4033
4034            let buttons = wire_.table.get(5);
4035
4036            let position_x = wire_.table.get(6);
4037
4038            let position_y = wire_.table.get(7);
4039
4040            Self {
4041                movement_x: movement_x.map(|envelope| {
4042                    ::fidl_next::FromWire::from_wire(unsafe {
4043                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4044                    })
4045                }),
4046
4047                movement_y: movement_y.map(|envelope| {
4048                    ::fidl_next::FromWire::from_wire(unsafe {
4049                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4050                    })
4051                }),
4052
4053                scroll_v: scroll_v.map(|envelope| {
4054                    ::fidl_next::FromWire::from_wire(unsafe {
4055                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4056                    })
4057                }),
4058
4059                scroll_h: scroll_h.map(|envelope| {
4060                    ::fidl_next::FromWire::from_wire(unsafe {
4061                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4062                    })
4063                }),
4064
4065                buttons: buttons.map(|envelope| {
4066                    ::fidl_next::FromWire::from_wire(unsafe {
4067                        envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4068                    })
4069                }),
4070
4071                position_x: position_x.map(|envelope| {
4072                    ::fidl_next::FromWire::from_wire(unsafe {
4073                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4074                    })
4075                }),
4076
4077                position_y: position_y.map(|envelope| {
4078                    ::fidl_next::FromWire::from_wire(unsafe {
4079                        envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4080                    })
4081                }),
4082            }
4083        }
4084    }
4085
4086    impl<'de> ::fidl_next::FromWireRef<crate::wire::MouseInputDescriptor<'de>>
4087        for MouseInputDescriptor
4088    {
4089        #[inline]
4090        fn from_wire_ref(wire: &crate::wire::MouseInputDescriptor<'de>) -> Self {
4091            Self {
4092                movement_x: wire.table.get(1).map(|envelope| {
4093                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4094                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4095                    })
4096                }),
4097
4098                movement_y: wire.table.get(2).map(|envelope| {
4099                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4100                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4101                    })
4102                }),
4103
4104                scroll_v: wire.table.get(3).map(|envelope| {
4105                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4106                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4107                    })
4108                }),
4109
4110                scroll_h: wire.table.get(4).map(|envelope| {
4111                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4112                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4113                    })
4114                }),
4115
4116                buttons: wire.table.get(5).map(|envelope| {
4117                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4118                        envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4119                    })
4120                }),
4121
4122                position_x: wire.table.get(6).map(|envelope| {
4123                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4124                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4125                    })
4126                }),
4127
4128                position_y: wire.table.get(7).map(|envelope| {
4129                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4130                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
4131                    })
4132                }),
4133            }
4134        }
4135    }
4136
4137    #[doc = " The capabilities of a mouse device.\n"]
4138    #[derive(Debug, Default, Clone, PartialEq)]
4139    pub struct MouseDescriptor {
4140        pub input: ::core::option::Option<crate::natural::MouseInputDescriptor>,
4141    }
4142
4143    impl MouseDescriptor {
4144        fn __max_ordinal(&self) -> usize {
4145            if self.input.is_some() {
4146                return 1;
4147            }
4148
4149            0
4150        }
4151    }
4152
4153    unsafe impl<___E> ::fidl_next::Encode<crate::wire::MouseDescriptor<'static>, ___E>
4154        for MouseDescriptor
4155    where
4156        ___E: ::fidl_next::Encoder + ?Sized,
4157    {
4158        #[inline]
4159        fn encode(
4160            mut self,
4161            encoder: &mut ___E,
4162            out: &mut ::core::mem::MaybeUninit<crate::wire::MouseDescriptor<'static>>,
4163            _: (),
4164        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4165            ::fidl_next::munge!(let crate::wire::MouseDescriptor { table } = out);
4166
4167            let max_ord = self.__max_ordinal();
4168
4169            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4170            ::fidl_next::Wire::zero_padding(&mut out);
4171
4172            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4173                ::fidl_next::wire::Envelope,
4174            >(encoder, max_ord);
4175
4176            for i in 1..=max_ord {
4177                match i {
4178                    1 => {
4179                        if let Some(value) = self.input.take() {
4180                            ::fidl_next::wire::Envelope::encode_value::<
4181                                crate::wire::MouseInputDescriptor<'static>,
4182                                ___E,
4183                            >(
4184                                value, preallocated.encoder, &mut out, ()
4185                            )?;
4186                        } else {
4187                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4188                        }
4189                    }
4190
4191                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4192                }
4193                unsafe {
4194                    preallocated.write_next(out.assume_init_ref());
4195                }
4196            }
4197
4198            ::fidl_next::wire::Table::encode_len(table, max_ord);
4199
4200            Ok(())
4201        }
4202    }
4203
4204    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MouseDescriptor<'static>, ___E>
4205        for &'a MouseDescriptor
4206    where
4207        ___E: ::fidl_next::Encoder + ?Sized,
4208    {
4209        #[inline]
4210        fn encode(
4211            self,
4212            encoder: &mut ___E,
4213            out: &mut ::core::mem::MaybeUninit<crate::wire::MouseDescriptor<'static>>,
4214            _: (),
4215        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4216            ::fidl_next::munge!(let crate::wire::MouseDescriptor { table } = out);
4217
4218            let max_ord = self.__max_ordinal();
4219
4220            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4221            ::fidl_next::Wire::zero_padding(&mut out);
4222
4223            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4224                ::fidl_next::wire::Envelope,
4225            >(encoder, max_ord);
4226
4227            for i in 1..=max_ord {
4228                match i {
4229                    1 => {
4230                        if let Some(value) = &self.input {
4231                            ::fidl_next::wire::Envelope::encode_value::<
4232                                crate::wire::MouseInputDescriptor<'static>,
4233                                ___E,
4234                            >(
4235                                value, preallocated.encoder, &mut out, ()
4236                            )?;
4237                        } else {
4238                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4239                        }
4240                    }
4241
4242                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4243                }
4244                unsafe {
4245                    preallocated.write_next(out.assume_init_ref());
4246                }
4247            }
4248
4249            ::fidl_next::wire::Table::encode_len(table, max_ord);
4250
4251            Ok(())
4252        }
4253    }
4254
4255    impl<'de> ::fidl_next::FromWire<crate::wire::MouseDescriptor<'de>> for MouseDescriptor {
4256        #[inline]
4257        fn from_wire(wire_: crate::wire::MouseDescriptor<'de>) -> Self {
4258            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4259
4260            let input = wire_.table.get(1);
4261
4262            Self {
4263                input: input.map(|envelope| {
4264                    ::fidl_next::FromWire::from_wire(unsafe {
4265                        envelope.read_unchecked::<crate::wire::MouseInputDescriptor<'de>>()
4266                    })
4267                }),
4268            }
4269        }
4270    }
4271
4272    impl<'de> ::fidl_next::FromWireRef<crate::wire::MouseDescriptor<'de>> for MouseDescriptor {
4273        #[inline]
4274        fn from_wire_ref(wire: &crate::wire::MouseDescriptor<'de>) -> Self {
4275            Self {
4276                input: wire.table.get(1).map(|envelope| {
4277                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4278                        envelope.deref_unchecked::<crate::wire::MouseInputDescriptor<'de>>()
4279                    })
4280                }),
4281            }
4282        }
4283    }
4284
4285    #[doc = " Each sensor value has a corresponding SensorType, which explains what the\n value is measuring in the world.\n"]
4286    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4287    #[repr(u32)]
4288    pub enum SensorType {
4289        AccelerometerX = 1,
4290        AccelerometerY = 2,
4291        AccelerometerZ = 3,
4292        MagnetometerX = 4,
4293        MagnetometerY = 5,
4294        MagnetometerZ = 6,
4295        GyroscopeX = 7,
4296        GyroscopeY = 8,
4297        GyroscopeZ = 9,
4298        LightIlluminance = 10,
4299        LightRed = 11,
4300        LightGreen = 12,
4301        LightBlue = 13,
4302        UnknownOrdinal_(u32) = 14,
4303    }
4304    impl ::std::convert::From<u32> for SensorType {
4305        fn from(value: u32) -> Self {
4306            match value {
4307                1 => Self::AccelerometerX,
4308                2 => Self::AccelerometerY,
4309                3 => Self::AccelerometerZ,
4310                4 => Self::MagnetometerX,
4311                5 => Self::MagnetometerY,
4312                6 => Self::MagnetometerZ,
4313                7 => Self::GyroscopeX,
4314                8 => Self::GyroscopeY,
4315                9 => Self::GyroscopeZ,
4316                10 => Self::LightIlluminance,
4317                11 => Self::LightRed,
4318                12 => Self::LightGreen,
4319                13 => Self::LightBlue,
4320
4321                _ => Self::UnknownOrdinal_(value),
4322            }
4323        }
4324    }
4325
4326    impl ::std::convert::From<SensorType> for u32 {
4327        fn from(value: SensorType) -> Self {
4328            match value {
4329                SensorType::AccelerometerX => 1,
4330                SensorType::AccelerometerY => 2,
4331                SensorType::AccelerometerZ => 3,
4332                SensorType::MagnetometerX => 4,
4333                SensorType::MagnetometerY => 5,
4334                SensorType::MagnetometerZ => 6,
4335                SensorType::GyroscopeX => 7,
4336                SensorType::GyroscopeY => 8,
4337                SensorType::GyroscopeZ => 9,
4338                SensorType::LightIlluminance => 10,
4339                SensorType::LightRed => 11,
4340                SensorType::LightGreen => 12,
4341                SensorType::LightBlue => 13,
4342
4343                SensorType::UnknownOrdinal_(value) => value,
4344            }
4345        }
4346    }
4347
4348    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SensorType, ___E> for SensorType
4349    where
4350        ___E: ?Sized,
4351    {
4352        #[inline]
4353        fn encode(
4354            self,
4355            encoder: &mut ___E,
4356            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorType>,
4357            _: (),
4358        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4359            ::fidl_next::Encode::encode(&self, encoder, out, ())
4360        }
4361    }
4362
4363    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SensorType, ___E> for &'a SensorType
4364    where
4365        ___E: ?Sized,
4366    {
4367        #[inline]
4368        fn encode(
4369            self,
4370            encoder: &mut ___E,
4371            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorType>,
4372            _: (),
4373        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4374            ::fidl_next::munge!(let crate::wire::SensorType { value } = out);
4375            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
4376                SensorType::AccelerometerX => 1,
4377
4378                SensorType::AccelerometerY => 2,
4379
4380                SensorType::AccelerometerZ => 3,
4381
4382                SensorType::MagnetometerX => 4,
4383
4384                SensorType::MagnetometerY => 5,
4385
4386                SensorType::MagnetometerZ => 6,
4387
4388                SensorType::GyroscopeX => 7,
4389
4390                SensorType::GyroscopeY => 8,
4391
4392                SensorType::GyroscopeZ => 9,
4393
4394                SensorType::LightIlluminance => 10,
4395
4396                SensorType::LightRed => 11,
4397
4398                SensorType::LightGreen => 12,
4399
4400                SensorType::LightBlue => 13,
4401
4402                SensorType::UnknownOrdinal_(value) => value,
4403            }));
4404
4405            Ok(())
4406        }
4407    }
4408
4409    impl ::core::convert::From<crate::wire::SensorType> for SensorType {
4410        fn from(wire: crate::wire::SensorType) -> Self {
4411            match u32::from(wire.value) {
4412                1 => Self::AccelerometerX,
4413
4414                2 => Self::AccelerometerY,
4415
4416                3 => Self::AccelerometerZ,
4417
4418                4 => Self::MagnetometerX,
4419
4420                5 => Self::MagnetometerY,
4421
4422                6 => Self::MagnetometerZ,
4423
4424                7 => Self::GyroscopeX,
4425
4426                8 => Self::GyroscopeY,
4427
4428                9 => Self::GyroscopeZ,
4429
4430                10 => Self::LightIlluminance,
4431
4432                11 => Self::LightRed,
4433
4434                12 => Self::LightGreen,
4435
4436                13 => Self::LightBlue,
4437
4438                value => Self::UnknownOrdinal_(value),
4439            }
4440        }
4441    }
4442
4443    impl ::fidl_next::FromWire<crate::wire::SensorType> for SensorType {
4444        #[inline]
4445        fn from_wire(wire: crate::wire::SensorType) -> Self {
4446            Self::from(wire)
4447        }
4448    }
4449
4450    impl ::fidl_next::FromWireRef<crate::wire::SensorType> for SensorType {
4451        #[inline]
4452        fn from_wire_ref(wire: &crate::wire::SensorType) -> Self {
4453            Self::from(*wire)
4454        }
4455    }
4456
4457    #[doc = " A `SensorAxis` is a normal `Axis` with an additional `SensorType` to describe what the\n axis is measuring.\n"]
4458    #[derive(Debug, Clone, PartialEq)]
4459    pub struct SensorAxis {
4460        pub axis: ::fidl_next_common_fuchsia_input::natural::Axis,
4461
4462        pub type_: crate::natural::SensorType,
4463    }
4464
4465    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SensorAxis, ___E> for SensorAxis
4466    where
4467        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4468    {
4469        #[inline]
4470        fn encode(
4471            self,
4472            encoder_: &mut ___E,
4473            out_: &mut ::core::mem::MaybeUninit<crate::wire::SensorAxis>,
4474            _: (),
4475        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4476            ::fidl_next::munge! {
4477                let crate::wire::SensorAxis {
4478                    axis,
4479                    type_,
4480
4481                } = out_;
4482            }
4483
4484            ::fidl_next::Encode::encode(self.axis, encoder_, axis, ())?;
4485
4486            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(axis.as_mut_ptr()) };
4487
4488            ::fidl_next::Encode::encode(self.type_, encoder_, type_, ())?;
4489
4490            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(type_.as_mut_ptr()) };
4491
4492            Ok(())
4493        }
4494    }
4495
4496    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SensorAxis, ___E> for &'a SensorAxis
4497    where
4498        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4499    {
4500        #[inline]
4501        fn encode(
4502            self,
4503            encoder_: &mut ___E,
4504            out_: &mut ::core::mem::MaybeUninit<crate::wire::SensorAxis>,
4505            _: (),
4506        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4507            ::fidl_next::munge! {
4508                let crate::wire::SensorAxis {
4509                    axis,
4510                    type_,
4511
4512                } = out_;
4513            }
4514
4515            ::fidl_next::Encode::encode(&self.axis, encoder_, axis, ())?;
4516
4517            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(axis.as_mut_ptr()) };
4518
4519            ::fidl_next::Encode::encode(&self.type_, encoder_, type_, ())?;
4520
4521            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(type_.as_mut_ptr()) };
4522
4523            Ok(())
4524        }
4525    }
4526
4527    unsafe impl<___E>
4528        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SensorAxis>, ___E>
4529        for SensorAxis
4530    where
4531        ___E: ::fidl_next::Encoder + ?Sized,
4532        SensorAxis: ::fidl_next::Encode<crate::wire::SensorAxis, ___E>,
4533    {
4534        #[inline]
4535        fn encode_option(
4536            this: ::core::option::Option<Self>,
4537            encoder: &mut ___E,
4538            out: &mut ::core::mem::MaybeUninit<
4539                ::fidl_next::wire::Box<'static, crate::wire::SensorAxis>,
4540            >,
4541            _: (),
4542        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4543            if let Some(inner) = this {
4544                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4545                ::fidl_next::wire::Box::encode_present(out);
4546            } else {
4547                ::fidl_next::wire::Box::encode_absent(out);
4548            }
4549
4550            Ok(())
4551        }
4552    }
4553
4554    unsafe impl<'a, ___E>
4555        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SensorAxis>, ___E>
4556        for &'a SensorAxis
4557    where
4558        ___E: ::fidl_next::Encoder + ?Sized,
4559        &'a SensorAxis: ::fidl_next::Encode<crate::wire::SensorAxis, ___E>,
4560    {
4561        #[inline]
4562        fn encode_option(
4563            this: ::core::option::Option<Self>,
4564            encoder: &mut ___E,
4565            out: &mut ::core::mem::MaybeUninit<
4566                ::fidl_next::wire::Box<'static, crate::wire::SensorAxis>,
4567            >,
4568            _: (),
4569        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4570            if let Some(inner) = this {
4571                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4572                ::fidl_next::wire::Box::encode_present(out);
4573            } else {
4574                ::fidl_next::wire::Box::encode_absent(out);
4575            }
4576
4577            Ok(())
4578        }
4579    }
4580
4581    impl ::fidl_next::FromWire<crate::wire::SensorAxis> for SensorAxis {
4582        #[inline]
4583        fn from_wire(wire: crate::wire::SensorAxis) -> Self {
4584            Self {
4585                axis: ::fidl_next::FromWire::from_wire(wire.axis),
4586
4587                type_: ::fidl_next::FromWire::from_wire(wire.type_),
4588            }
4589        }
4590    }
4591
4592    impl ::fidl_next::FromWireRef<crate::wire::SensorAxis> for SensorAxis {
4593        #[inline]
4594        fn from_wire_ref(wire: &crate::wire::SensorAxis) -> Self {
4595            Self {
4596                axis: ::fidl_next::FromWireRef::from_wire_ref(&wire.axis),
4597
4598                type_: ::fidl_next::FromWireRef::from_wire_ref(&wire.type_),
4599            }
4600        }
4601    }
4602
4603    #[doc = " Describes the format of the input report that will be sent from the sensor\n to the device.\n"]
4604    #[derive(Debug, Default, Clone, PartialEq)]
4605    pub struct SensorInputDescriptor {
4606        pub values: ::core::option::Option<::std::vec::Vec<crate::natural::SensorAxis>>,
4607    }
4608
4609    impl SensorInputDescriptor {
4610        fn __max_ordinal(&self) -> usize {
4611            if self.values.is_some() {
4612                return 1;
4613            }
4614
4615            0
4616        }
4617    }
4618
4619    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SensorInputDescriptor<'static>, ___E>
4620        for SensorInputDescriptor
4621    where
4622        ___E: ::fidl_next::Encoder + ?Sized,
4623    {
4624        #[inline]
4625        fn encode(
4626            mut self,
4627            encoder: &mut ___E,
4628            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorInputDescriptor<'static>>,
4629            _: (),
4630        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4631            ::fidl_next::munge!(let crate::wire::SensorInputDescriptor { table } = out);
4632
4633            let max_ord = self.__max_ordinal();
4634
4635            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4636            ::fidl_next::Wire::zero_padding(&mut out);
4637
4638            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4639                ::fidl_next::wire::Envelope,
4640            >(encoder, max_ord);
4641
4642            for i in 1..=max_ord {
4643                match i {
4644                    1 => {
4645                        if let Some(value) = self.values.take() {
4646                            ::fidl_next::wire::Envelope::encode_value::<
4647                                ::fidl_next::wire::Vector<'static, crate::wire::SensorAxis>,
4648                                ___E,
4649                            >(
4650                                value, preallocated.encoder, &mut out, (100, ())
4651                            )?;
4652                        } else {
4653                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4654                        }
4655                    }
4656
4657                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4658                }
4659                unsafe {
4660                    preallocated.write_next(out.assume_init_ref());
4661                }
4662            }
4663
4664            ::fidl_next::wire::Table::encode_len(table, max_ord);
4665
4666            Ok(())
4667        }
4668    }
4669
4670    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SensorInputDescriptor<'static>, ___E>
4671        for &'a SensorInputDescriptor
4672    where
4673        ___E: ::fidl_next::Encoder + ?Sized,
4674    {
4675        #[inline]
4676        fn encode(
4677            self,
4678            encoder: &mut ___E,
4679            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorInputDescriptor<'static>>,
4680            _: (),
4681        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4682            ::fidl_next::munge!(let crate::wire::SensorInputDescriptor { table } = out);
4683
4684            let max_ord = self.__max_ordinal();
4685
4686            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4687            ::fidl_next::Wire::zero_padding(&mut out);
4688
4689            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4690                ::fidl_next::wire::Envelope,
4691            >(encoder, max_ord);
4692
4693            for i in 1..=max_ord {
4694                match i {
4695                    1 => {
4696                        if let Some(value) = &self.values {
4697                            ::fidl_next::wire::Envelope::encode_value::<
4698                                ::fidl_next::wire::Vector<'static, crate::wire::SensorAxis>,
4699                                ___E,
4700                            >(
4701                                value, preallocated.encoder, &mut out, (100, ())
4702                            )?;
4703                        } else {
4704                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4705                        }
4706                    }
4707
4708                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4709                }
4710                unsafe {
4711                    preallocated.write_next(out.assume_init_ref());
4712                }
4713            }
4714
4715            ::fidl_next::wire::Table::encode_len(table, max_ord);
4716
4717            Ok(())
4718        }
4719    }
4720
4721    impl<'de> ::fidl_next::FromWire<crate::wire::SensorInputDescriptor<'de>> for SensorInputDescriptor {
4722        #[inline]
4723        fn from_wire(wire_: crate::wire::SensorInputDescriptor<'de>) -> Self {
4724            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4725
4726            let values = wire_.table.get(1);
4727
4728            Self {
4729
4730
4731                values: values.map(|envelope| ::fidl_next::FromWire::from_wire(
4732                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SensorAxis>>() }
4733                )),
4734
4735        }
4736        }
4737    }
4738
4739    impl<'de> ::fidl_next::FromWireRef<crate::wire::SensorInputDescriptor<'de>>
4740        for SensorInputDescriptor
4741    {
4742        #[inline]
4743        fn from_wire_ref(wire: &crate::wire::SensorInputDescriptor<'de>) -> Self {
4744            Self {
4745
4746
4747                values: wire.table.get(1)
4748                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4749                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SensorAxis>>() }
4750                    )),
4751
4752        }
4753        }
4754    }
4755
4756    #[doc = " The capabilities of a sensor device.\n"]
4757    #[derive(Debug, Default, Clone, PartialEq)]
4758    pub struct SensorDescriptor {
4759        pub input: ::core::option::Option<crate::natural::SensorInputDescriptor>,
4760    }
4761
4762    impl SensorDescriptor {
4763        fn __max_ordinal(&self) -> usize {
4764            if self.input.is_some() {
4765                return 1;
4766            }
4767
4768            0
4769        }
4770    }
4771
4772    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SensorDescriptor<'static>, ___E>
4773        for SensorDescriptor
4774    where
4775        ___E: ::fidl_next::Encoder + ?Sized,
4776    {
4777        #[inline]
4778        fn encode(
4779            mut self,
4780            encoder: &mut ___E,
4781            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorDescriptor<'static>>,
4782            _: (),
4783        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4784            ::fidl_next::munge!(let crate::wire::SensorDescriptor { table } = out);
4785
4786            let max_ord = self.__max_ordinal();
4787
4788            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4789            ::fidl_next::Wire::zero_padding(&mut out);
4790
4791            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4792                ::fidl_next::wire::Envelope,
4793            >(encoder, max_ord);
4794
4795            for i in 1..=max_ord {
4796                match i {
4797                    1 => {
4798                        if let Some(value) = self.input.take() {
4799                            ::fidl_next::wire::Envelope::encode_value::<
4800                                crate::wire::SensorInputDescriptor<'static>,
4801                                ___E,
4802                            >(
4803                                value, preallocated.encoder, &mut out, ()
4804                            )?;
4805                        } else {
4806                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4807                        }
4808                    }
4809
4810                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4811                }
4812                unsafe {
4813                    preallocated.write_next(out.assume_init_ref());
4814                }
4815            }
4816
4817            ::fidl_next::wire::Table::encode_len(table, max_ord);
4818
4819            Ok(())
4820        }
4821    }
4822
4823    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SensorDescriptor<'static>, ___E>
4824        for &'a SensorDescriptor
4825    where
4826        ___E: ::fidl_next::Encoder + ?Sized,
4827    {
4828        #[inline]
4829        fn encode(
4830            self,
4831            encoder: &mut ___E,
4832            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorDescriptor<'static>>,
4833            _: (),
4834        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4835            ::fidl_next::munge!(let crate::wire::SensorDescriptor { table } = out);
4836
4837            let max_ord = self.__max_ordinal();
4838
4839            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4840            ::fidl_next::Wire::zero_padding(&mut out);
4841
4842            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4843                ::fidl_next::wire::Envelope,
4844            >(encoder, max_ord);
4845
4846            for i in 1..=max_ord {
4847                match i {
4848                    1 => {
4849                        if let Some(value) = &self.input {
4850                            ::fidl_next::wire::Envelope::encode_value::<
4851                                crate::wire::SensorInputDescriptor<'static>,
4852                                ___E,
4853                            >(
4854                                value, preallocated.encoder, &mut out, ()
4855                            )?;
4856                        } else {
4857                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4858                        }
4859                    }
4860
4861                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4862                }
4863                unsafe {
4864                    preallocated.write_next(out.assume_init_ref());
4865                }
4866            }
4867
4868            ::fidl_next::wire::Table::encode_len(table, max_ord);
4869
4870            Ok(())
4871        }
4872    }
4873
4874    impl<'de> ::fidl_next::FromWire<crate::wire::SensorDescriptor<'de>> for SensorDescriptor {
4875        #[inline]
4876        fn from_wire(wire_: crate::wire::SensorDescriptor<'de>) -> Self {
4877            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4878
4879            let input = wire_.table.get(1);
4880
4881            Self {
4882                input: input.map(|envelope| {
4883                    ::fidl_next::FromWire::from_wire(unsafe {
4884                        envelope.read_unchecked::<crate::wire::SensorInputDescriptor<'de>>()
4885                    })
4886                }),
4887            }
4888        }
4889    }
4890
4891    impl<'de> ::fidl_next::FromWireRef<crate::wire::SensorDescriptor<'de>> for SensorDescriptor {
4892        #[inline]
4893        fn from_wire_ref(wire: &crate::wire::SensorDescriptor<'de>) -> Self {
4894            Self {
4895                input: wire.table.get(1).map(|envelope| {
4896                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4897                        envelope.deref_unchecked::<crate::wire::SensorInputDescriptor<'de>>()
4898                    })
4899                }),
4900            }
4901        }
4902    }
4903
4904    #[doc = " The device type from which the touch originated.\n"]
4905    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4906    #[repr(u32)]
4907    pub enum TouchType {
4908        Touchscreen = 1,
4909        Touchpad = 2,
4910        UnknownOrdinal_(u32) = 3,
4911    }
4912    impl ::std::convert::From<u32> for TouchType {
4913        fn from(value: u32) -> Self {
4914            match value {
4915                1 => Self::Touchscreen,
4916                2 => Self::Touchpad,
4917
4918                _ => Self::UnknownOrdinal_(value),
4919            }
4920        }
4921    }
4922
4923    impl ::std::convert::From<TouchType> for u32 {
4924        fn from(value: TouchType) -> Self {
4925            match value {
4926                TouchType::Touchscreen => 1,
4927                TouchType::Touchpad => 2,
4928
4929                TouchType::UnknownOrdinal_(value) => value,
4930            }
4931        }
4932    }
4933
4934    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchType, ___E> for TouchType
4935    where
4936        ___E: ?Sized,
4937    {
4938        #[inline]
4939        fn encode(
4940            self,
4941            encoder: &mut ___E,
4942            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchType>,
4943            _: (),
4944        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4945            ::fidl_next::Encode::encode(&self, encoder, out, ())
4946        }
4947    }
4948
4949    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TouchType, ___E> for &'a TouchType
4950    where
4951        ___E: ?Sized,
4952    {
4953        #[inline]
4954        fn encode(
4955            self,
4956            encoder: &mut ___E,
4957            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchType>,
4958            _: (),
4959        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4960            ::fidl_next::munge!(let crate::wire::TouchType { value } = out);
4961            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
4962                TouchType::Touchscreen => 1,
4963
4964                TouchType::Touchpad => 2,
4965
4966                TouchType::UnknownOrdinal_(value) => value,
4967            }));
4968
4969            Ok(())
4970        }
4971    }
4972
4973    impl ::core::convert::From<crate::wire::TouchType> for TouchType {
4974        fn from(wire: crate::wire::TouchType) -> Self {
4975            match u32::from(wire.value) {
4976                1 => Self::Touchscreen,
4977
4978                2 => Self::Touchpad,
4979
4980                value => Self::UnknownOrdinal_(value),
4981            }
4982        }
4983    }
4984
4985    impl ::fidl_next::FromWire<crate::wire::TouchType> for TouchType {
4986        #[inline]
4987        fn from_wire(wire: crate::wire::TouchType) -> Self {
4988            Self::from(wire)
4989        }
4990    }
4991
4992    impl ::fidl_next::FromWireRef<crate::wire::TouchType> for TouchType {
4993        #[inline]
4994        fn from_wire_ref(wire: &crate::wire::TouchType) -> Self {
4995            Self::from(*wire)
4996        }
4997    }
4998
4999    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5000    #[repr(u32)]
5001    pub enum TouchButton {
5002        Palm = 1,
5003        SwipeUp = 2,
5004        SwipeLeft = 3,
5005        SwipeRight = 4,
5006        SwipeDown = 5,
5007        UnknownOrdinal_(u32) = 6,
5008    }
5009    impl ::std::convert::From<u32> for TouchButton {
5010        fn from(value: u32) -> Self {
5011            match value {
5012                1 => Self::Palm,
5013                2 => Self::SwipeUp,
5014                3 => Self::SwipeLeft,
5015                4 => Self::SwipeRight,
5016                5 => Self::SwipeDown,
5017
5018                _ => Self::UnknownOrdinal_(value),
5019            }
5020        }
5021    }
5022
5023    impl ::std::convert::From<TouchButton> for u32 {
5024        fn from(value: TouchButton) -> Self {
5025            match value {
5026                TouchButton::Palm => 1,
5027                TouchButton::SwipeUp => 2,
5028                TouchButton::SwipeLeft => 3,
5029                TouchButton::SwipeRight => 4,
5030                TouchButton::SwipeDown => 5,
5031
5032                TouchButton::UnknownOrdinal_(value) => value,
5033            }
5034        }
5035    }
5036
5037    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchButton, ___E> for TouchButton
5038    where
5039        ___E: ?Sized,
5040    {
5041        #[inline]
5042        fn encode(
5043            self,
5044            encoder: &mut ___E,
5045            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchButton>,
5046            _: (),
5047        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5048            ::fidl_next::Encode::encode(&self, encoder, out, ())
5049        }
5050    }
5051
5052    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TouchButton, ___E> for &'a TouchButton
5053    where
5054        ___E: ?Sized,
5055    {
5056        #[inline]
5057        fn encode(
5058            self,
5059            encoder: &mut ___E,
5060            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchButton>,
5061            _: (),
5062        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5063            ::fidl_next::munge!(let crate::wire::TouchButton { value } = out);
5064            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
5065                TouchButton::Palm => 1,
5066
5067                TouchButton::SwipeUp => 2,
5068
5069                TouchButton::SwipeLeft => 3,
5070
5071                TouchButton::SwipeRight => 4,
5072
5073                TouchButton::SwipeDown => 5,
5074
5075                TouchButton::UnknownOrdinal_(value) => value,
5076            }));
5077
5078            Ok(())
5079        }
5080    }
5081
5082    impl ::core::convert::From<crate::wire::TouchButton> for TouchButton {
5083        fn from(wire: crate::wire::TouchButton) -> Self {
5084            match u32::from(wire.value) {
5085                1 => Self::Palm,
5086
5087                2 => Self::SwipeUp,
5088
5089                3 => Self::SwipeLeft,
5090
5091                4 => Self::SwipeRight,
5092
5093                5 => Self::SwipeDown,
5094
5095                value => Self::UnknownOrdinal_(value),
5096            }
5097        }
5098    }
5099
5100    impl ::fidl_next::FromWire<crate::wire::TouchButton> for TouchButton {
5101        #[inline]
5102        fn from_wire(wire: crate::wire::TouchButton) -> Self {
5103            Self::from(wire)
5104        }
5105    }
5106
5107    impl ::fidl_next::FromWireRef<crate::wire::TouchButton> for TouchButton {
5108        #[inline]
5109        fn from_wire_ref(wire: &crate::wire::TouchButton) -> Self {
5110            Self::from(*wire)
5111        }
5112    }
5113
5114    #[doc = " Describes the format of the input report that will be sent from the touch device\n to the host.\n"]
5115    #[derive(Debug, Default, Clone, PartialEq)]
5116    pub struct TouchInputDescriptor {
5117        pub contacts:
5118            ::core::option::Option<::std::vec::Vec<crate::natural::ContactInputDescriptor>>,
5119
5120        pub max_contacts: ::core::option::Option<u32>,
5121
5122        pub touch_type: ::core::option::Option<crate::natural::TouchType>,
5123
5124        pub buttons: ::core::option::Option<::std::vec::Vec<crate::natural::TouchButton>>,
5125    }
5126
5127    impl TouchInputDescriptor {
5128        fn __max_ordinal(&self) -> usize {
5129            if self.buttons.is_some() {
5130                return 4;
5131            }
5132
5133            if self.touch_type.is_some() {
5134                return 3;
5135            }
5136
5137            if self.max_contacts.is_some() {
5138                return 2;
5139            }
5140
5141            if self.contacts.is_some() {
5142                return 1;
5143            }
5144
5145            0
5146        }
5147    }
5148
5149    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchInputDescriptor<'static>, ___E>
5150        for TouchInputDescriptor
5151    where
5152        ___E: ::fidl_next::Encoder + ?Sized,
5153    {
5154        #[inline]
5155        fn encode(
5156            mut self,
5157            encoder: &mut ___E,
5158            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchInputDescriptor<'static>>,
5159            _: (),
5160        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5161            ::fidl_next::munge!(let crate::wire::TouchInputDescriptor { table } = out);
5162
5163            let max_ord = self.__max_ordinal();
5164
5165            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5166            ::fidl_next::Wire::zero_padding(&mut out);
5167
5168            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5169                ::fidl_next::wire::Envelope,
5170            >(encoder, max_ord);
5171
5172            for i in 1..=max_ord {
5173                match i {
5174                    4 => {
5175                        if let Some(value) = self.buttons.take() {
5176                            ::fidl_next::wire::Envelope::encode_value::<
5177                                ::fidl_next::wire::Vector<'static, crate::wire::TouchButton>,
5178                                ___E,
5179                            >(
5180                                value, preallocated.encoder, &mut out, (10, ())
5181                            )?;
5182                        } else {
5183                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5184                        }
5185                    }
5186
5187                    3 => {
5188                        if let Some(value) = self.touch_type.take() {
5189                            ::fidl_next::wire::Envelope::encode_value::<
5190                                crate::wire::TouchType,
5191                                ___E,
5192                            >(
5193                                value, preallocated.encoder, &mut out, ()
5194                            )?;
5195                        } else {
5196                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5197                        }
5198                    }
5199
5200                    2 => {
5201                        if let Some(value) = self.max_contacts.take() {
5202                            ::fidl_next::wire::Envelope::encode_value::<
5203                                ::fidl_next::wire::Uint32,
5204                                ___E,
5205                            >(
5206                                value, preallocated.encoder, &mut out, ()
5207                            )?;
5208                        } else {
5209                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5210                        }
5211                    }
5212
5213                    1 => {
5214                        if let Some(value) = self.contacts.take() {
5215                            ::fidl_next::wire::Envelope::encode_value::<
5216                                ::fidl_next::wire::Vector<
5217                                    'static,
5218                                    crate::wire::ContactInputDescriptor<'static>,
5219                                >,
5220                                ___E,
5221                            >(
5222                                value, preallocated.encoder, &mut out, (10, ())
5223                            )?;
5224                        } else {
5225                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5226                        }
5227                    }
5228
5229                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5230                }
5231                unsafe {
5232                    preallocated.write_next(out.assume_init_ref());
5233                }
5234            }
5235
5236            ::fidl_next::wire::Table::encode_len(table, max_ord);
5237
5238            Ok(())
5239        }
5240    }
5241
5242    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TouchInputDescriptor<'static>, ___E>
5243        for &'a TouchInputDescriptor
5244    where
5245        ___E: ::fidl_next::Encoder + ?Sized,
5246    {
5247        #[inline]
5248        fn encode(
5249            self,
5250            encoder: &mut ___E,
5251            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchInputDescriptor<'static>>,
5252            _: (),
5253        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5254            ::fidl_next::munge!(let crate::wire::TouchInputDescriptor { table } = out);
5255
5256            let max_ord = self.__max_ordinal();
5257
5258            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5259            ::fidl_next::Wire::zero_padding(&mut out);
5260
5261            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5262                ::fidl_next::wire::Envelope,
5263            >(encoder, max_ord);
5264
5265            for i in 1..=max_ord {
5266                match i {
5267                    4 => {
5268                        if let Some(value) = &self.buttons {
5269                            ::fidl_next::wire::Envelope::encode_value::<
5270                                ::fidl_next::wire::Vector<'static, crate::wire::TouchButton>,
5271                                ___E,
5272                            >(
5273                                value, preallocated.encoder, &mut out, (10, ())
5274                            )?;
5275                        } else {
5276                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5277                        }
5278                    }
5279
5280                    3 => {
5281                        if let Some(value) = &self.touch_type {
5282                            ::fidl_next::wire::Envelope::encode_value::<
5283                                crate::wire::TouchType,
5284                                ___E,
5285                            >(
5286                                value, preallocated.encoder, &mut out, ()
5287                            )?;
5288                        } else {
5289                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5290                        }
5291                    }
5292
5293                    2 => {
5294                        if let Some(value) = &self.max_contacts {
5295                            ::fidl_next::wire::Envelope::encode_value::<
5296                                ::fidl_next::wire::Uint32,
5297                                ___E,
5298                            >(
5299                                value, preallocated.encoder, &mut out, ()
5300                            )?;
5301                        } else {
5302                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5303                        }
5304                    }
5305
5306                    1 => {
5307                        if let Some(value) = &self.contacts {
5308                            ::fidl_next::wire::Envelope::encode_value::<
5309                                ::fidl_next::wire::Vector<
5310                                    'static,
5311                                    crate::wire::ContactInputDescriptor<'static>,
5312                                >,
5313                                ___E,
5314                            >(
5315                                value, preallocated.encoder, &mut out, (10, ())
5316                            )?;
5317                        } else {
5318                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5319                        }
5320                    }
5321
5322                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5323                }
5324                unsafe {
5325                    preallocated.write_next(out.assume_init_ref());
5326                }
5327            }
5328
5329            ::fidl_next::wire::Table::encode_len(table, max_ord);
5330
5331            Ok(())
5332        }
5333    }
5334
5335    impl<'de> ::fidl_next::FromWire<crate::wire::TouchInputDescriptor<'de>> for TouchInputDescriptor {
5336        #[inline]
5337        fn from_wire(wire_: crate::wire::TouchInputDescriptor<'de>) -> Self {
5338            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5339
5340            let contacts = wire_.table.get(1);
5341
5342            let max_contacts = wire_.table.get(2);
5343
5344            let touch_type = wire_.table.get(3);
5345
5346            let buttons = wire_.table.get(4);
5347
5348            Self {
5349
5350
5351                contacts: contacts.map(|envelope| ::fidl_next::FromWire::from_wire(
5352                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ContactInputDescriptor<'de>>>() }
5353                )),
5354
5355
5356                max_contacts: max_contacts.map(|envelope| ::fidl_next::FromWire::from_wire(
5357                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
5358                )),
5359
5360
5361                touch_type: touch_type.map(|envelope| ::fidl_next::FromWire::from_wire(
5362                    unsafe { envelope.read_unchecked::<crate::wire::TouchType>() }
5363                )),
5364
5365
5366                buttons: buttons.map(|envelope| ::fidl_next::FromWire::from_wire(
5367                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>() }
5368                )),
5369
5370        }
5371        }
5372    }
5373
5374    impl<'de> ::fidl_next::FromWireRef<crate::wire::TouchInputDescriptor<'de>>
5375        for TouchInputDescriptor
5376    {
5377        #[inline]
5378        fn from_wire_ref(wire: &crate::wire::TouchInputDescriptor<'de>) -> Self {
5379            Self {
5380
5381
5382                contacts: wire.table.get(1)
5383                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5384                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ContactInputDescriptor<'de>>>() }
5385                    )),
5386
5387
5388                max_contacts: wire.table.get(2)
5389                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5390                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
5391                    )),
5392
5393
5394                touch_type: wire.table.get(3)
5395                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5396                        unsafe { envelope.deref_unchecked::<crate::wire::TouchType>() }
5397                    )),
5398
5399
5400                buttons: wire.table.get(4)
5401                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5402                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>() }
5403                    )),
5404
5405        }
5406        }
5407    }
5408
5409    #[doc = " Describes the format of the touchpad configuration\'s feature report.\n"]
5410    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5411    pub struct TouchFeatureDescriptor {
5412        pub supports_input_mode: ::core::option::Option<bool>,
5413
5414        pub supports_selective_reporting: ::core::option::Option<bool>,
5415    }
5416
5417    impl TouchFeatureDescriptor {
5418        fn __max_ordinal(&self) -> usize {
5419            if self.supports_selective_reporting.is_some() {
5420                return 2;
5421            }
5422
5423            if self.supports_input_mode.is_some() {
5424                return 1;
5425            }
5426
5427            0
5428        }
5429    }
5430
5431    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchFeatureDescriptor<'static>, ___E>
5432        for TouchFeatureDescriptor
5433    where
5434        ___E: ::fidl_next::Encoder + ?Sized,
5435    {
5436        #[inline]
5437        fn encode(
5438            mut self,
5439            encoder: &mut ___E,
5440            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchFeatureDescriptor<'static>>,
5441            _: (),
5442        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5443            ::fidl_next::munge!(let crate::wire::TouchFeatureDescriptor { table } = out);
5444
5445            let max_ord = self.__max_ordinal();
5446
5447            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5448            ::fidl_next::Wire::zero_padding(&mut out);
5449
5450            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5451                ::fidl_next::wire::Envelope,
5452            >(encoder, max_ord);
5453
5454            for i in 1..=max_ord {
5455                match i {
5456                    2 => {
5457                        if let Some(value) = self.supports_selective_reporting.take() {
5458                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5459                                value,
5460                                preallocated.encoder,
5461                                &mut out,
5462                                (),
5463                            )?;
5464                        } else {
5465                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5466                        }
5467                    }
5468
5469                    1 => {
5470                        if let Some(value) = self.supports_input_mode.take() {
5471                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5472                                value,
5473                                preallocated.encoder,
5474                                &mut out,
5475                                (),
5476                            )?;
5477                        } else {
5478                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5479                        }
5480                    }
5481
5482                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5483                }
5484                unsafe {
5485                    preallocated.write_next(out.assume_init_ref());
5486                }
5487            }
5488
5489            ::fidl_next::wire::Table::encode_len(table, max_ord);
5490
5491            Ok(())
5492        }
5493    }
5494
5495    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TouchFeatureDescriptor<'static>, ___E>
5496        for &'a TouchFeatureDescriptor
5497    where
5498        ___E: ::fidl_next::Encoder + ?Sized,
5499    {
5500        #[inline]
5501        fn encode(
5502            self,
5503            encoder: &mut ___E,
5504            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchFeatureDescriptor<'static>>,
5505            _: (),
5506        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5507            ::fidl_next::munge!(let crate::wire::TouchFeatureDescriptor { table } = out);
5508
5509            let max_ord = self.__max_ordinal();
5510
5511            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5512            ::fidl_next::Wire::zero_padding(&mut out);
5513
5514            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5515                ::fidl_next::wire::Envelope,
5516            >(encoder, max_ord);
5517
5518            for i in 1..=max_ord {
5519                match i {
5520                    2 => {
5521                        if let Some(value) = &self.supports_selective_reporting {
5522                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5523                                value,
5524                                preallocated.encoder,
5525                                &mut out,
5526                                (),
5527                            )?;
5528                        } else {
5529                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5530                        }
5531                    }
5532
5533                    1 => {
5534                        if let Some(value) = &self.supports_input_mode {
5535                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5536                                value,
5537                                preallocated.encoder,
5538                                &mut out,
5539                                (),
5540                            )?;
5541                        } else {
5542                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5543                        }
5544                    }
5545
5546                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5547                }
5548                unsafe {
5549                    preallocated.write_next(out.assume_init_ref());
5550                }
5551            }
5552
5553            ::fidl_next::wire::Table::encode_len(table, max_ord);
5554
5555            Ok(())
5556        }
5557    }
5558
5559    impl<'de> ::fidl_next::FromWire<crate::wire::TouchFeatureDescriptor<'de>>
5560        for TouchFeatureDescriptor
5561    {
5562        #[inline]
5563        fn from_wire(wire_: crate::wire::TouchFeatureDescriptor<'de>) -> Self {
5564            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5565
5566            let supports_input_mode = wire_.table.get(1);
5567
5568            let supports_selective_reporting = wire_.table.get(2);
5569
5570            Self {
5571                supports_input_mode: supports_input_mode.map(|envelope| {
5572                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
5573                }),
5574
5575                supports_selective_reporting: supports_selective_reporting.map(|envelope| {
5576                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
5577                }),
5578            }
5579        }
5580    }
5581
5582    impl<'de> ::fidl_next::FromWireRef<crate::wire::TouchFeatureDescriptor<'de>>
5583        for TouchFeatureDescriptor
5584    {
5585        #[inline]
5586        fn from_wire_ref(wire: &crate::wire::TouchFeatureDescriptor<'de>) -> Self {
5587            Self {
5588                supports_input_mode: wire.table.get(1).map(|envelope| {
5589                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5590                        envelope.deref_unchecked::<bool>()
5591                    })
5592                }),
5593
5594                supports_selective_reporting: wire.table.get(2).map(|envelope| {
5595                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5596                        envelope.deref_unchecked::<bool>()
5597                    })
5598                }),
5599            }
5600        }
5601    }
5602
5603    #[doc = " The capabilities of a touch device.\n"]
5604    #[derive(Debug, Default, Clone, PartialEq)]
5605    pub struct TouchDescriptor {
5606        pub input: ::core::option::Option<crate::natural::TouchInputDescriptor>,
5607
5608        pub feature: ::core::option::Option<crate::natural::TouchFeatureDescriptor>,
5609    }
5610
5611    impl TouchDescriptor {
5612        fn __max_ordinal(&self) -> usize {
5613            if self.feature.is_some() {
5614                return 2;
5615            }
5616
5617            if self.input.is_some() {
5618                return 1;
5619            }
5620
5621            0
5622        }
5623    }
5624
5625    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchDescriptor<'static>, ___E>
5626        for TouchDescriptor
5627    where
5628        ___E: ::fidl_next::Encoder + ?Sized,
5629    {
5630        #[inline]
5631        fn encode(
5632            mut self,
5633            encoder: &mut ___E,
5634            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchDescriptor<'static>>,
5635            _: (),
5636        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5637            ::fidl_next::munge!(let crate::wire::TouchDescriptor { table } = out);
5638
5639            let max_ord = self.__max_ordinal();
5640
5641            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5642            ::fidl_next::Wire::zero_padding(&mut out);
5643
5644            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5645                ::fidl_next::wire::Envelope,
5646            >(encoder, max_ord);
5647
5648            for i in 1..=max_ord {
5649                match i {
5650                    2 => {
5651                        if let Some(value) = self.feature.take() {
5652                            ::fidl_next::wire::Envelope::encode_value::<
5653                                crate::wire::TouchFeatureDescriptor<'static>,
5654                                ___E,
5655                            >(
5656                                value, preallocated.encoder, &mut out, ()
5657                            )?;
5658                        } else {
5659                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5660                        }
5661                    }
5662
5663                    1 => {
5664                        if let Some(value) = self.input.take() {
5665                            ::fidl_next::wire::Envelope::encode_value::<
5666                                crate::wire::TouchInputDescriptor<'static>,
5667                                ___E,
5668                            >(
5669                                value, preallocated.encoder, &mut out, ()
5670                            )?;
5671                        } else {
5672                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5673                        }
5674                    }
5675
5676                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5677                }
5678                unsafe {
5679                    preallocated.write_next(out.assume_init_ref());
5680                }
5681            }
5682
5683            ::fidl_next::wire::Table::encode_len(table, max_ord);
5684
5685            Ok(())
5686        }
5687    }
5688
5689    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TouchDescriptor<'static>, ___E>
5690        for &'a TouchDescriptor
5691    where
5692        ___E: ::fidl_next::Encoder + ?Sized,
5693    {
5694        #[inline]
5695        fn encode(
5696            self,
5697            encoder: &mut ___E,
5698            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchDescriptor<'static>>,
5699            _: (),
5700        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5701            ::fidl_next::munge!(let crate::wire::TouchDescriptor { table } = out);
5702
5703            let max_ord = self.__max_ordinal();
5704
5705            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5706            ::fidl_next::Wire::zero_padding(&mut out);
5707
5708            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5709                ::fidl_next::wire::Envelope,
5710            >(encoder, max_ord);
5711
5712            for i in 1..=max_ord {
5713                match i {
5714                    2 => {
5715                        if let Some(value) = &self.feature {
5716                            ::fidl_next::wire::Envelope::encode_value::<
5717                                crate::wire::TouchFeatureDescriptor<'static>,
5718                                ___E,
5719                            >(
5720                                value, preallocated.encoder, &mut out, ()
5721                            )?;
5722                        } else {
5723                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5724                        }
5725                    }
5726
5727                    1 => {
5728                        if let Some(value) = &self.input {
5729                            ::fidl_next::wire::Envelope::encode_value::<
5730                                crate::wire::TouchInputDescriptor<'static>,
5731                                ___E,
5732                            >(
5733                                value, preallocated.encoder, &mut out, ()
5734                            )?;
5735                        } else {
5736                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5737                        }
5738                    }
5739
5740                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5741                }
5742                unsafe {
5743                    preallocated.write_next(out.assume_init_ref());
5744                }
5745            }
5746
5747            ::fidl_next::wire::Table::encode_len(table, max_ord);
5748
5749            Ok(())
5750        }
5751    }
5752
5753    impl<'de> ::fidl_next::FromWire<crate::wire::TouchDescriptor<'de>> for TouchDescriptor {
5754        #[inline]
5755        fn from_wire(wire_: crate::wire::TouchDescriptor<'de>) -> Self {
5756            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5757
5758            let input = wire_.table.get(1);
5759
5760            let feature = wire_.table.get(2);
5761
5762            Self {
5763                input: input.map(|envelope| {
5764                    ::fidl_next::FromWire::from_wire(unsafe {
5765                        envelope.read_unchecked::<crate::wire::TouchInputDescriptor<'de>>()
5766                    })
5767                }),
5768
5769                feature: feature.map(|envelope| {
5770                    ::fidl_next::FromWire::from_wire(unsafe {
5771                        envelope.read_unchecked::<crate::wire::TouchFeatureDescriptor<'de>>()
5772                    })
5773                }),
5774            }
5775        }
5776    }
5777
5778    impl<'de> ::fidl_next::FromWireRef<crate::wire::TouchDescriptor<'de>> for TouchDescriptor {
5779        #[inline]
5780        fn from_wire_ref(wire: &crate::wire::TouchDescriptor<'de>) -> Self {
5781            Self {
5782                input: wire.table.get(1).map(|envelope| {
5783                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5784                        envelope.deref_unchecked::<crate::wire::TouchInputDescriptor<'de>>()
5785                    })
5786                }),
5787
5788                feature: wire.table.get(2).map(|envelope| {
5789                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5790                        envelope.deref_unchecked::<crate::wire::TouchFeatureDescriptor<'de>>()
5791                    })
5792                }),
5793            }
5794        }
5795    }
5796
5797    #[doc = " Describes the format of the input report that will be sent from the keyboard\n to the device.\n"]
5798    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5799    pub struct KeyboardInputDescriptor {
5800        pub keys:
5801            ::core::option::Option<::std::vec::Vec<::fidl_next_common_fuchsia_input::natural::Key>>,
5802    }
5803
5804    impl KeyboardInputDescriptor {
5805        fn __max_ordinal(&self) -> usize {
5806            if self.keys.is_some() {
5807                return 1;
5808            }
5809
5810            0
5811        }
5812    }
5813
5814    unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeyboardInputDescriptor<'static>, ___E>
5815        for KeyboardInputDescriptor
5816    where
5817        ___E: ::fidl_next::Encoder + ?Sized,
5818    {
5819        #[inline]
5820        fn encode(
5821            mut self,
5822            encoder: &mut ___E,
5823            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardInputDescriptor<'static>>,
5824            _: (),
5825        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5826            ::fidl_next::munge!(let crate::wire::KeyboardInputDescriptor { table } = out);
5827
5828            let max_ord = self.__max_ordinal();
5829
5830            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5831            ::fidl_next::Wire::zero_padding(&mut out);
5832
5833            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5834                ::fidl_next::wire::Envelope,
5835            >(encoder, max_ord);
5836
5837            for i in 1..=max_ord {
5838                match i {
5839                    1 => {
5840                        if let Some(value) = self.keys.take() {
5841                            ::fidl_next::wire::Envelope::encode_value::<
5842                                ::fidl_next::wire::Vector<
5843                                    'static,
5844                                    ::fidl_next_common_fuchsia_input::wire::Key,
5845                                >,
5846                                ___E,
5847                            >(
5848                                value, preallocated.encoder, &mut out, (256, ())
5849                            )?;
5850                        } else {
5851                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5852                        }
5853                    }
5854
5855                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5856                }
5857                unsafe {
5858                    preallocated.write_next(out.assume_init_ref());
5859                }
5860            }
5861
5862            ::fidl_next::wire::Table::encode_len(table, max_ord);
5863
5864            Ok(())
5865        }
5866    }
5867
5868    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::KeyboardInputDescriptor<'static>, ___E>
5869        for &'a KeyboardInputDescriptor
5870    where
5871        ___E: ::fidl_next::Encoder + ?Sized,
5872    {
5873        #[inline]
5874        fn encode(
5875            self,
5876            encoder: &mut ___E,
5877            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardInputDescriptor<'static>>,
5878            _: (),
5879        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5880            ::fidl_next::munge!(let crate::wire::KeyboardInputDescriptor { table } = out);
5881
5882            let max_ord = self.__max_ordinal();
5883
5884            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5885            ::fidl_next::Wire::zero_padding(&mut out);
5886
5887            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5888                ::fidl_next::wire::Envelope,
5889            >(encoder, max_ord);
5890
5891            for i in 1..=max_ord {
5892                match i {
5893                    1 => {
5894                        if let Some(value) = &self.keys {
5895                            ::fidl_next::wire::Envelope::encode_value::<
5896                                ::fidl_next::wire::Vector<
5897                                    'static,
5898                                    ::fidl_next_common_fuchsia_input::wire::Key,
5899                                >,
5900                                ___E,
5901                            >(
5902                                value, preallocated.encoder, &mut out, (256, ())
5903                            )?;
5904                        } else {
5905                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5906                        }
5907                    }
5908
5909                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5910                }
5911                unsafe {
5912                    preallocated.write_next(out.assume_init_ref());
5913                }
5914            }
5915
5916            ::fidl_next::wire::Table::encode_len(table, max_ord);
5917
5918            Ok(())
5919        }
5920    }
5921
5922    impl<'de> ::fidl_next::FromWire<crate::wire::KeyboardInputDescriptor<'de>>
5923        for KeyboardInputDescriptor
5924    {
5925        #[inline]
5926        fn from_wire(wire_: crate::wire::KeyboardInputDescriptor<'de>) -> Self {
5927            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5928
5929            let keys = wire_.table.get(1);
5930
5931            Self {
5932                keys: keys.map(|envelope| {
5933                    ::fidl_next::FromWire::from_wire(unsafe {
5934                        envelope.read_unchecked::<::fidl_next::wire::Vector<
5935                            'de,
5936                            ::fidl_next_common_fuchsia_input::wire::Key,
5937                        >>()
5938                    })
5939                }),
5940            }
5941        }
5942    }
5943
5944    impl<'de> ::fidl_next::FromWireRef<crate::wire::KeyboardInputDescriptor<'de>>
5945        for KeyboardInputDescriptor
5946    {
5947        #[inline]
5948        fn from_wire_ref(wire: &crate::wire::KeyboardInputDescriptor<'de>) -> Self {
5949            Self {
5950                keys: wire.table.get(1).map(|envelope| {
5951                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5952                        envelope.deref_unchecked::<::fidl_next::wire::Vector<
5953                            'de,
5954                            ::fidl_next_common_fuchsia_input::wire::Key,
5955                        >>()
5956                    })
5957                }),
5958            }
5959        }
5960    }
5961
5962    #[doc = " An LedType represents an LED on a device that can be turned on or off.\n"]
5963    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5964    #[repr(u32)]
5965    pub enum LedType {
5966        NumLock = 1,
5967        CapsLock = 2,
5968        ScrollLock = 3,
5969        Compose = 4,
5970        Kana = 5,
5971        UnknownOrdinal_(u32) = 6,
5972    }
5973    impl ::std::convert::From<u32> for LedType {
5974        fn from(value: u32) -> Self {
5975            match value {
5976                1 => Self::NumLock,
5977                2 => Self::CapsLock,
5978                3 => Self::ScrollLock,
5979                4 => Self::Compose,
5980                5 => Self::Kana,
5981
5982                _ => Self::UnknownOrdinal_(value),
5983            }
5984        }
5985    }
5986
5987    impl ::std::convert::From<LedType> for u32 {
5988        fn from(value: LedType) -> Self {
5989            match value {
5990                LedType::NumLock => 1,
5991                LedType::CapsLock => 2,
5992                LedType::ScrollLock => 3,
5993                LedType::Compose => 4,
5994                LedType::Kana => 5,
5995
5996                LedType::UnknownOrdinal_(value) => value,
5997            }
5998        }
5999    }
6000
6001    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LedType, ___E> for LedType
6002    where
6003        ___E: ?Sized,
6004    {
6005        #[inline]
6006        fn encode(
6007            self,
6008            encoder: &mut ___E,
6009            out: &mut ::core::mem::MaybeUninit<crate::wire::LedType>,
6010            _: (),
6011        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6012            ::fidl_next::Encode::encode(&self, encoder, out, ())
6013        }
6014    }
6015
6016    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LedType, ___E> for &'a LedType
6017    where
6018        ___E: ?Sized,
6019    {
6020        #[inline]
6021        fn encode(
6022            self,
6023            encoder: &mut ___E,
6024            out: &mut ::core::mem::MaybeUninit<crate::wire::LedType>,
6025            _: (),
6026        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6027            ::fidl_next::munge!(let crate::wire::LedType { value } = out);
6028            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
6029                LedType::NumLock => 1,
6030
6031                LedType::CapsLock => 2,
6032
6033                LedType::ScrollLock => 3,
6034
6035                LedType::Compose => 4,
6036
6037                LedType::Kana => 5,
6038
6039                LedType::UnknownOrdinal_(value) => value,
6040            }));
6041
6042            Ok(())
6043        }
6044    }
6045
6046    impl ::core::convert::From<crate::wire::LedType> for LedType {
6047        fn from(wire: crate::wire::LedType) -> Self {
6048            match u32::from(wire.value) {
6049                1 => Self::NumLock,
6050
6051                2 => Self::CapsLock,
6052
6053                3 => Self::ScrollLock,
6054
6055                4 => Self::Compose,
6056
6057                5 => Self::Kana,
6058
6059                value => Self::UnknownOrdinal_(value),
6060            }
6061        }
6062    }
6063
6064    impl ::fidl_next::FromWire<crate::wire::LedType> for LedType {
6065        #[inline]
6066        fn from_wire(wire: crate::wire::LedType) -> Self {
6067            Self::from(wire)
6068        }
6069    }
6070
6071    impl ::fidl_next::FromWireRef<crate::wire::LedType> for LedType {
6072        #[inline]
6073        fn from_wire_ref(wire: &crate::wire::LedType) -> Self {
6074            Self::from(*wire)
6075        }
6076    }
6077
6078    #[doc = " Describes the format of the output report that can be sent to the keyboard.\n"]
6079    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6080    pub struct KeyboardOutputDescriptor {
6081        pub leds: ::core::option::Option<::std::vec::Vec<crate::natural::LedType>>,
6082    }
6083
6084    impl KeyboardOutputDescriptor {
6085        fn __max_ordinal(&self) -> usize {
6086            if self.leds.is_some() {
6087                return 1;
6088            }
6089
6090            0
6091        }
6092    }
6093
6094    unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeyboardOutputDescriptor<'static>, ___E>
6095        for KeyboardOutputDescriptor
6096    where
6097        ___E: ::fidl_next::Encoder + ?Sized,
6098    {
6099        #[inline]
6100        fn encode(
6101            mut self,
6102            encoder: &mut ___E,
6103            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardOutputDescriptor<'static>>,
6104            _: (),
6105        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6106            ::fidl_next::munge!(let crate::wire::KeyboardOutputDescriptor { table } = out);
6107
6108            let max_ord = self.__max_ordinal();
6109
6110            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6111            ::fidl_next::Wire::zero_padding(&mut out);
6112
6113            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6114                ::fidl_next::wire::Envelope,
6115            >(encoder, max_ord);
6116
6117            for i in 1..=max_ord {
6118                match i {
6119                    1 => {
6120                        if let Some(value) = self.leds.take() {
6121                            ::fidl_next::wire::Envelope::encode_value::<
6122                                ::fidl_next::wire::Vector<'static, crate::wire::LedType>,
6123                                ___E,
6124                            >(
6125                                value, preallocated.encoder, &mut out, (256, ())
6126                            )?;
6127                        } else {
6128                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6129                        }
6130                    }
6131
6132                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6133                }
6134                unsafe {
6135                    preallocated.write_next(out.assume_init_ref());
6136                }
6137            }
6138
6139            ::fidl_next::wire::Table::encode_len(table, max_ord);
6140
6141            Ok(())
6142        }
6143    }
6144
6145    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::KeyboardOutputDescriptor<'static>, ___E>
6146        for &'a KeyboardOutputDescriptor
6147    where
6148        ___E: ::fidl_next::Encoder + ?Sized,
6149    {
6150        #[inline]
6151        fn encode(
6152            self,
6153            encoder: &mut ___E,
6154            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardOutputDescriptor<'static>>,
6155            _: (),
6156        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6157            ::fidl_next::munge!(let crate::wire::KeyboardOutputDescriptor { table } = out);
6158
6159            let max_ord = self.__max_ordinal();
6160
6161            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6162            ::fidl_next::Wire::zero_padding(&mut out);
6163
6164            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6165                ::fidl_next::wire::Envelope,
6166            >(encoder, max_ord);
6167
6168            for i in 1..=max_ord {
6169                match i {
6170                    1 => {
6171                        if let Some(value) = &self.leds {
6172                            ::fidl_next::wire::Envelope::encode_value::<
6173                                ::fidl_next::wire::Vector<'static, crate::wire::LedType>,
6174                                ___E,
6175                            >(
6176                                value, preallocated.encoder, &mut out, (256, ())
6177                            )?;
6178                        } else {
6179                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6180                        }
6181                    }
6182
6183                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6184                }
6185                unsafe {
6186                    preallocated.write_next(out.assume_init_ref());
6187                }
6188            }
6189
6190            ::fidl_next::wire::Table::encode_len(table, max_ord);
6191
6192            Ok(())
6193        }
6194    }
6195
6196    impl<'de> ::fidl_next::FromWire<crate::wire::KeyboardOutputDescriptor<'de>>
6197        for KeyboardOutputDescriptor
6198    {
6199        #[inline]
6200        fn from_wire(wire_: crate::wire::KeyboardOutputDescriptor<'de>) -> Self {
6201            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6202
6203            let leds = wire_.table.get(1);
6204
6205            Self {
6206                leds: leds.map(|envelope| {
6207                    ::fidl_next::FromWire::from_wire(unsafe {
6208                        envelope
6209                            .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::LedType>>(
6210                            )
6211                    })
6212                }),
6213            }
6214        }
6215    }
6216
6217    impl<'de> ::fidl_next::FromWireRef<crate::wire::KeyboardOutputDescriptor<'de>>
6218        for KeyboardOutputDescriptor
6219    {
6220        #[inline]
6221        fn from_wire_ref(wire: &crate::wire::KeyboardOutputDescriptor<'de>) -> Self {
6222            Self {
6223
6224
6225                leds: wire.table.get(1)
6226                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
6227                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::LedType>>() }
6228                    )),
6229
6230        }
6231        }
6232    }
6233
6234    #[doc = " The capabilities of a keyboard device.\n"]
6235    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6236    pub struct KeyboardDescriptor {
6237        pub input: ::core::option::Option<crate::natural::KeyboardInputDescriptor>,
6238
6239        pub output: ::core::option::Option<crate::natural::KeyboardOutputDescriptor>,
6240    }
6241
6242    impl KeyboardDescriptor {
6243        fn __max_ordinal(&self) -> usize {
6244            if self.output.is_some() {
6245                return 2;
6246            }
6247
6248            if self.input.is_some() {
6249                return 1;
6250            }
6251
6252            0
6253        }
6254    }
6255
6256    unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeyboardDescriptor<'static>, ___E>
6257        for KeyboardDescriptor
6258    where
6259        ___E: ::fidl_next::Encoder + ?Sized,
6260    {
6261        #[inline]
6262        fn encode(
6263            mut self,
6264            encoder: &mut ___E,
6265            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardDescriptor<'static>>,
6266            _: (),
6267        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6268            ::fidl_next::munge!(let crate::wire::KeyboardDescriptor { table } = out);
6269
6270            let max_ord = self.__max_ordinal();
6271
6272            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6273            ::fidl_next::Wire::zero_padding(&mut out);
6274
6275            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6276                ::fidl_next::wire::Envelope,
6277            >(encoder, max_ord);
6278
6279            for i in 1..=max_ord {
6280                match i {
6281                    2 => {
6282                        if let Some(value) = self.output.take() {
6283                            ::fidl_next::wire::Envelope::encode_value::<
6284                                crate::wire::KeyboardOutputDescriptor<'static>,
6285                                ___E,
6286                            >(
6287                                value, preallocated.encoder, &mut out, ()
6288                            )?;
6289                        } else {
6290                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6291                        }
6292                    }
6293
6294                    1 => {
6295                        if let Some(value) = self.input.take() {
6296                            ::fidl_next::wire::Envelope::encode_value::<
6297                                crate::wire::KeyboardInputDescriptor<'static>,
6298                                ___E,
6299                            >(
6300                                value, preallocated.encoder, &mut out, ()
6301                            )?;
6302                        } else {
6303                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6304                        }
6305                    }
6306
6307                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6308                }
6309                unsafe {
6310                    preallocated.write_next(out.assume_init_ref());
6311                }
6312            }
6313
6314            ::fidl_next::wire::Table::encode_len(table, max_ord);
6315
6316            Ok(())
6317        }
6318    }
6319
6320    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::KeyboardDescriptor<'static>, ___E>
6321        for &'a KeyboardDescriptor
6322    where
6323        ___E: ::fidl_next::Encoder + ?Sized,
6324    {
6325        #[inline]
6326        fn encode(
6327            self,
6328            encoder: &mut ___E,
6329            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardDescriptor<'static>>,
6330            _: (),
6331        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6332            ::fidl_next::munge!(let crate::wire::KeyboardDescriptor { table } = out);
6333
6334            let max_ord = self.__max_ordinal();
6335
6336            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6337            ::fidl_next::Wire::zero_padding(&mut out);
6338
6339            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6340                ::fidl_next::wire::Envelope,
6341            >(encoder, max_ord);
6342
6343            for i in 1..=max_ord {
6344                match i {
6345                    2 => {
6346                        if let Some(value) = &self.output {
6347                            ::fidl_next::wire::Envelope::encode_value::<
6348                                crate::wire::KeyboardOutputDescriptor<'static>,
6349                                ___E,
6350                            >(
6351                                value, preallocated.encoder, &mut out, ()
6352                            )?;
6353                        } else {
6354                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6355                        }
6356                    }
6357
6358                    1 => {
6359                        if let Some(value) = &self.input {
6360                            ::fidl_next::wire::Envelope::encode_value::<
6361                                crate::wire::KeyboardInputDescriptor<'static>,
6362                                ___E,
6363                            >(
6364                                value, preallocated.encoder, &mut out, ()
6365                            )?;
6366                        } else {
6367                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6368                        }
6369                    }
6370
6371                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6372                }
6373                unsafe {
6374                    preallocated.write_next(out.assume_init_ref());
6375                }
6376            }
6377
6378            ::fidl_next::wire::Table::encode_len(table, max_ord);
6379
6380            Ok(())
6381        }
6382    }
6383
6384    impl<'de> ::fidl_next::FromWire<crate::wire::KeyboardDescriptor<'de>> for KeyboardDescriptor {
6385        #[inline]
6386        fn from_wire(wire_: crate::wire::KeyboardDescriptor<'de>) -> Self {
6387            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6388
6389            let input = wire_.table.get(1);
6390
6391            let output = wire_.table.get(2);
6392
6393            Self {
6394                input: input.map(|envelope| {
6395                    ::fidl_next::FromWire::from_wire(unsafe {
6396                        envelope.read_unchecked::<crate::wire::KeyboardInputDescriptor<'de>>()
6397                    })
6398                }),
6399
6400                output: output.map(|envelope| {
6401                    ::fidl_next::FromWire::from_wire(unsafe {
6402                        envelope.read_unchecked::<crate::wire::KeyboardOutputDescriptor<'de>>()
6403                    })
6404                }),
6405            }
6406        }
6407    }
6408
6409    impl<'de> ::fidl_next::FromWireRef<crate::wire::KeyboardDescriptor<'de>> for KeyboardDescriptor {
6410        #[inline]
6411        fn from_wire_ref(wire: &crate::wire::KeyboardDescriptor<'de>) -> Self {
6412            Self {
6413                input: wire.table.get(1).map(|envelope| {
6414                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6415                        envelope.deref_unchecked::<crate::wire::KeyboardInputDescriptor<'de>>()
6416                    })
6417                }),
6418
6419                output: wire.table.get(2).map(|envelope| {
6420                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6421                        envelope.deref_unchecked::<crate::wire::KeyboardOutputDescriptor<'de>>()
6422                    })
6423                }),
6424            }
6425        }
6426    }
6427
6428    #[doc = " `DeviceDescriptor` describes a physical input device.\n"]
6429    #[derive(Debug, Default, Clone, PartialEq)]
6430    pub struct DeviceDescriptor {
6431        pub device_information: ::core::option::Option<crate::natural::DeviceInformation>,
6432
6433        pub mouse: ::core::option::Option<crate::natural::MouseDescriptor>,
6434
6435        pub sensor: ::core::option::Option<crate::natural::SensorDescriptor>,
6436
6437        pub touch: ::core::option::Option<crate::natural::TouchDescriptor>,
6438
6439        pub keyboard: ::core::option::Option<crate::natural::KeyboardDescriptor>,
6440
6441        pub consumer_control: ::core::option::Option<crate::natural::ConsumerControlDescriptor>,
6442    }
6443
6444    impl DeviceDescriptor {
6445        fn __max_ordinal(&self) -> usize {
6446            if self.consumer_control.is_some() {
6447                return 6;
6448            }
6449
6450            if self.keyboard.is_some() {
6451                return 5;
6452            }
6453
6454            if self.touch.is_some() {
6455                return 4;
6456            }
6457
6458            if self.sensor.is_some() {
6459                return 3;
6460            }
6461
6462            if self.mouse.is_some() {
6463                return 2;
6464            }
6465
6466            if self.device_information.is_some() {
6467                return 1;
6468            }
6469
6470            0
6471        }
6472    }
6473
6474    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceDescriptor<'static>, ___E>
6475        for DeviceDescriptor
6476    where
6477        ___E: ::fidl_next::Encoder + ?Sized,
6478    {
6479        #[inline]
6480        fn encode(
6481            mut self,
6482            encoder: &mut ___E,
6483            out: &mut ::core::mem::MaybeUninit<crate::wire::DeviceDescriptor<'static>>,
6484            _: (),
6485        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6486            ::fidl_next::munge!(let crate::wire::DeviceDescriptor { table } = out);
6487
6488            let max_ord = self.__max_ordinal();
6489
6490            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6491            ::fidl_next::Wire::zero_padding(&mut out);
6492
6493            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6494                ::fidl_next::wire::Envelope,
6495            >(encoder, max_ord);
6496
6497            for i in 1..=max_ord {
6498                match i {
6499                    6 => {
6500                        if let Some(value) = self.consumer_control.take() {
6501                            ::fidl_next::wire::Envelope::encode_value::<
6502                                crate::wire::ConsumerControlDescriptor<'static>,
6503                                ___E,
6504                            >(
6505                                value, preallocated.encoder, &mut out, ()
6506                            )?;
6507                        } else {
6508                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6509                        }
6510                    }
6511
6512                    5 => {
6513                        if let Some(value) = self.keyboard.take() {
6514                            ::fidl_next::wire::Envelope::encode_value::<
6515                                crate::wire::KeyboardDescriptor<'static>,
6516                                ___E,
6517                            >(
6518                                value, preallocated.encoder, &mut out, ()
6519                            )?;
6520                        } else {
6521                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6522                        }
6523                    }
6524
6525                    4 => {
6526                        if let Some(value) = self.touch.take() {
6527                            ::fidl_next::wire::Envelope::encode_value::<
6528                                crate::wire::TouchDescriptor<'static>,
6529                                ___E,
6530                            >(
6531                                value, preallocated.encoder, &mut out, ()
6532                            )?;
6533                        } else {
6534                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6535                        }
6536                    }
6537
6538                    3 => {
6539                        if let Some(value) = self.sensor.take() {
6540                            ::fidl_next::wire::Envelope::encode_value::<
6541                                crate::wire::SensorDescriptor<'static>,
6542                                ___E,
6543                            >(
6544                                value, preallocated.encoder, &mut out, ()
6545                            )?;
6546                        } else {
6547                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6548                        }
6549                    }
6550
6551                    2 => {
6552                        if let Some(value) = self.mouse.take() {
6553                            ::fidl_next::wire::Envelope::encode_value::<
6554                                crate::wire::MouseDescriptor<'static>,
6555                                ___E,
6556                            >(
6557                                value, preallocated.encoder, &mut out, ()
6558                            )?;
6559                        } else {
6560                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6561                        }
6562                    }
6563
6564                    1 => {
6565                        if let Some(value) = self.device_information.take() {
6566                            ::fidl_next::wire::Envelope::encode_value::<
6567                                crate::wire::DeviceInformation<'static>,
6568                                ___E,
6569                            >(
6570                                value, preallocated.encoder, &mut out, ()
6571                            )?;
6572                        } else {
6573                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6574                        }
6575                    }
6576
6577                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6578                }
6579                unsafe {
6580                    preallocated.write_next(out.assume_init_ref());
6581                }
6582            }
6583
6584            ::fidl_next::wire::Table::encode_len(table, max_ord);
6585
6586            Ok(())
6587        }
6588    }
6589
6590    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceDescriptor<'static>, ___E>
6591        for &'a DeviceDescriptor
6592    where
6593        ___E: ::fidl_next::Encoder + ?Sized,
6594    {
6595        #[inline]
6596        fn encode(
6597            self,
6598            encoder: &mut ___E,
6599            out: &mut ::core::mem::MaybeUninit<crate::wire::DeviceDescriptor<'static>>,
6600            _: (),
6601        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6602            ::fidl_next::munge!(let crate::wire::DeviceDescriptor { table } = out);
6603
6604            let max_ord = self.__max_ordinal();
6605
6606            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6607            ::fidl_next::Wire::zero_padding(&mut out);
6608
6609            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6610                ::fidl_next::wire::Envelope,
6611            >(encoder, max_ord);
6612
6613            for i in 1..=max_ord {
6614                match i {
6615                    6 => {
6616                        if let Some(value) = &self.consumer_control {
6617                            ::fidl_next::wire::Envelope::encode_value::<
6618                                crate::wire::ConsumerControlDescriptor<'static>,
6619                                ___E,
6620                            >(
6621                                value, preallocated.encoder, &mut out, ()
6622                            )?;
6623                        } else {
6624                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6625                        }
6626                    }
6627
6628                    5 => {
6629                        if let Some(value) = &self.keyboard {
6630                            ::fidl_next::wire::Envelope::encode_value::<
6631                                crate::wire::KeyboardDescriptor<'static>,
6632                                ___E,
6633                            >(
6634                                value, preallocated.encoder, &mut out, ()
6635                            )?;
6636                        } else {
6637                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6638                        }
6639                    }
6640
6641                    4 => {
6642                        if let Some(value) = &self.touch {
6643                            ::fidl_next::wire::Envelope::encode_value::<
6644                                crate::wire::TouchDescriptor<'static>,
6645                                ___E,
6646                            >(
6647                                value, preallocated.encoder, &mut out, ()
6648                            )?;
6649                        } else {
6650                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6651                        }
6652                    }
6653
6654                    3 => {
6655                        if let Some(value) = &self.sensor {
6656                            ::fidl_next::wire::Envelope::encode_value::<
6657                                crate::wire::SensorDescriptor<'static>,
6658                                ___E,
6659                            >(
6660                                value, preallocated.encoder, &mut out, ()
6661                            )?;
6662                        } else {
6663                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6664                        }
6665                    }
6666
6667                    2 => {
6668                        if let Some(value) = &self.mouse {
6669                            ::fidl_next::wire::Envelope::encode_value::<
6670                                crate::wire::MouseDescriptor<'static>,
6671                                ___E,
6672                            >(
6673                                value, preallocated.encoder, &mut out, ()
6674                            )?;
6675                        } else {
6676                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6677                        }
6678                    }
6679
6680                    1 => {
6681                        if let Some(value) = &self.device_information {
6682                            ::fidl_next::wire::Envelope::encode_value::<
6683                                crate::wire::DeviceInformation<'static>,
6684                                ___E,
6685                            >(
6686                                value, preallocated.encoder, &mut out, ()
6687                            )?;
6688                        } else {
6689                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6690                        }
6691                    }
6692
6693                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6694                }
6695                unsafe {
6696                    preallocated.write_next(out.assume_init_ref());
6697                }
6698            }
6699
6700            ::fidl_next::wire::Table::encode_len(table, max_ord);
6701
6702            Ok(())
6703        }
6704    }
6705
6706    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceDescriptor<'de>> for DeviceDescriptor {
6707        #[inline]
6708        fn from_wire(wire_: crate::wire::DeviceDescriptor<'de>) -> Self {
6709            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6710
6711            let device_information = wire_.table.get(1);
6712
6713            let mouse = wire_.table.get(2);
6714
6715            let sensor = wire_.table.get(3);
6716
6717            let touch = wire_.table.get(4);
6718
6719            let keyboard = wire_.table.get(5);
6720
6721            let consumer_control = wire_.table.get(6);
6722
6723            Self {
6724                device_information: device_information.map(|envelope| {
6725                    ::fidl_next::FromWire::from_wire(unsafe {
6726                        envelope.read_unchecked::<crate::wire::DeviceInformation<'de>>()
6727                    })
6728                }),
6729
6730                mouse: mouse.map(|envelope| {
6731                    ::fidl_next::FromWire::from_wire(unsafe {
6732                        envelope.read_unchecked::<crate::wire::MouseDescriptor<'de>>()
6733                    })
6734                }),
6735
6736                sensor: sensor.map(|envelope| {
6737                    ::fidl_next::FromWire::from_wire(unsafe {
6738                        envelope.read_unchecked::<crate::wire::SensorDescriptor<'de>>()
6739                    })
6740                }),
6741
6742                touch: touch.map(|envelope| {
6743                    ::fidl_next::FromWire::from_wire(unsafe {
6744                        envelope.read_unchecked::<crate::wire::TouchDescriptor<'de>>()
6745                    })
6746                }),
6747
6748                keyboard: keyboard.map(|envelope| {
6749                    ::fidl_next::FromWire::from_wire(unsafe {
6750                        envelope.read_unchecked::<crate::wire::KeyboardDescriptor<'de>>()
6751                    })
6752                }),
6753
6754                consumer_control: consumer_control.map(|envelope| {
6755                    ::fidl_next::FromWire::from_wire(unsafe {
6756                        envelope.read_unchecked::<crate::wire::ConsumerControlDescriptor<'de>>()
6757                    })
6758                }),
6759            }
6760        }
6761    }
6762
6763    impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceDescriptor<'de>> for DeviceDescriptor {
6764        #[inline]
6765        fn from_wire_ref(wire: &crate::wire::DeviceDescriptor<'de>) -> Self {
6766            Self {
6767                device_information: wire.table.get(1).map(|envelope| {
6768                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6769                        envelope.deref_unchecked::<crate::wire::DeviceInformation<'de>>()
6770                    })
6771                }),
6772
6773                mouse: wire.table.get(2).map(|envelope| {
6774                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6775                        envelope.deref_unchecked::<crate::wire::MouseDescriptor<'de>>()
6776                    })
6777                }),
6778
6779                sensor: wire.table.get(3).map(|envelope| {
6780                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6781                        envelope.deref_unchecked::<crate::wire::SensorDescriptor<'de>>()
6782                    })
6783                }),
6784
6785                touch: wire.table.get(4).map(|envelope| {
6786                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6787                        envelope.deref_unchecked::<crate::wire::TouchDescriptor<'de>>()
6788                    })
6789                }),
6790
6791                keyboard: wire.table.get(5).map(|envelope| {
6792                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6793                        envelope.deref_unchecked::<crate::wire::KeyboardDescriptor<'de>>()
6794                    })
6795                }),
6796
6797                consumer_control: wire.table.get(6).map(|envelope| {
6798                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6799                        envelope.deref_unchecked::<crate::wire::ConsumerControlDescriptor<'de>>()
6800                    })
6801                }),
6802            }
6803        }
6804    }
6805
6806    #[doc = " Represents an event associated with a change in the input devices.\n"]
6807    #[derive(Debug, Default, Clone, PartialEq)]
6808    pub struct DeviceEvent {
6809        pub action: ::core::option::Option<crate::natural::Action>,
6810
6811        pub device_id: ::core::option::Option<u32>,
6812
6813        pub descriptor: ::core::option::Option<crate::natural::DeviceDescriptor>,
6814    }
6815
6816    impl DeviceEvent {
6817        fn __max_ordinal(&self) -> usize {
6818            if self.descriptor.is_some() {
6819                return 3;
6820            }
6821
6822            if self.device_id.is_some() {
6823                return 2;
6824            }
6825
6826            if self.action.is_some() {
6827                return 1;
6828            }
6829
6830            0
6831        }
6832    }
6833
6834    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceEvent<'static>, ___E> for DeviceEvent
6835    where
6836        ___E: ::fidl_next::Encoder + ?Sized,
6837    {
6838        #[inline]
6839        fn encode(
6840            mut self,
6841            encoder: &mut ___E,
6842            out: &mut ::core::mem::MaybeUninit<crate::wire::DeviceEvent<'static>>,
6843            _: (),
6844        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6845            ::fidl_next::munge!(let crate::wire::DeviceEvent { table } = out);
6846
6847            let max_ord = self.__max_ordinal();
6848
6849            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6850            ::fidl_next::Wire::zero_padding(&mut out);
6851
6852            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6853                ::fidl_next::wire::Envelope,
6854            >(encoder, max_ord);
6855
6856            for i in 1..=max_ord {
6857                match i {
6858                    3 => {
6859                        if let Some(value) = self.descriptor.take() {
6860                            ::fidl_next::wire::Envelope::encode_value::<
6861                                crate::wire::DeviceDescriptor<'static>,
6862                                ___E,
6863                            >(
6864                                value, preallocated.encoder, &mut out, ()
6865                            )?;
6866                        } else {
6867                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6868                        }
6869                    }
6870
6871                    2 => {
6872                        if let Some(value) = self.device_id.take() {
6873                            ::fidl_next::wire::Envelope::encode_value::<
6874                                ::fidl_next::wire::Uint32,
6875                                ___E,
6876                            >(
6877                                value, preallocated.encoder, &mut out, ()
6878                            )?;
6879                        } else {
6880                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6881                        }
6882                    }
6883
6884                    1 => {
6885                        if let Some(value) = self.action.take() {
6886                            ::fidl_next::wire::Envelope::encode_value::<crate::wire::Action, ___E>(
6887                                value,
6888                                preallocated.encoder,
6889                                &mut out,
6890                                (),
6891                            )?;
6892                        } else {
6893                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6894                        }
6895                    }
6896
6897                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6898                }
6899                unsafe {
6900                    preallocated.write_next(out.assume_init_ref());
6901                }
6902            }
6903
6904            ::fidl_next::wire::Table::encode_len(table, max_ord);
6905
6906            Ok(())
6907        }
6908    }
6909
6910    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceEvent<'static>, ___E>
6911        for &'a DeviceEvent
6912    where
6913        ___E: ::fidl_next::Encoder + ?Sized,
6914    {
6915        #[inline]
6916        fn encode(
6917            self,
6918            encoder: &mut ___E,
6919            out: &mut ::core::mem::MaybeUninit<crate::wire::DeviceEvent<'static>>,
6920            _: (),
6921        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6922            ::fidl_next::munge!(let crate::wire::DeviceEvent { table } = out);
6923
6924            let max_ord = self.__max_ordinal();
6925
6926            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6927            ::fidl_next::Wire::zero_padding(&mut out);
6928
6929            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6930                ::fidl_next::wire::Envelope,
6931            >(encoder, max_ord);
6932
6933            for i in 1..=max_ord {
6934                match i {
6935                    3 => {
6936                        if let Some(value) = &self.descriptor {
6937                            ::fidl_next::wire::Envelope::encode_value::<
6938                                crate::wire::DeviceDescriptor<'static>,
6939                                ___E,
6940                            >(
6941                                value, preallocated.encoder, &mut out, ()
6942                            )?;
6943                        } else {
6944                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6945                        }
6946                    }
6947
6948                    2 => {
6949                        if let Some(value) = &self.device_id {
6950                            ::fidl_next::wire::Envelope::encode_value::<
6951                                ::fidl_next::wire::Uint32,
6952                                ___E,
6953                            >(
6954                                value, preallocated.encoder, &mut out, ()
6955                            )?;
6956                        } else {
6957                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6958                        }
6959                    }
6960
6961                    1 => {
6962                        if let Some(value) = &self.action {
6963                            ::fidl_next::wire::Envelope::encode_value::<crate::wire::Action, ___E>(
6964                                value,
6965                                preallocated.encoder,
6966                                &mut out,
6967                                (),
6968                            )?;
6969                        } else {
6970                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6971                        }
6972                    }
6973
6974                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6975                }
6976                unsafe {
6977                    preallocated.write_next(out.assume_init_ref());
6978                }
6979            }
6980
6981            ::fidl_next::wire::Table::encode_len(table, max_ord);
6982
6983            Ok(())
6984        }
6985    }
6986
6987    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceEvent<'de>> for DeviceEvent {
6988        #[inline]
6989        fn from_wire(wire_: crate::wire::DeviceEvent<'de>) -> Self {
6990            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6991
6992            let action = wire_.table.get(1);
6993
6994            let device_id = wire_.table.get(2);
6995
6996            let descriptor = wire_.table.get(3);
6997
6998            Self {
6999                action: action.map(|envelope| {
7000                    ::fidl_next::FromWire::from_wire(unsafe {
7001                        envelope.read_unchecked::<crate::wire::Action>()
7002                    })
7003                }),
7004
7005                device_id: device_id.map(|envelope| {
7006                    ::fidl_next::FromWire::from_wire(unsafe {
7007                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
7008                    })
7009                }),
7010
7011                descriptor: descriptor.map(|envelope| {
7012                    ::fidl_next::FromWire::from_wire(unsafe {
7013                        envelope.read_unchecked::<crate::wire::DeviceDescriptor<'de>>()
7014                    })
7015                }),
7016            }
7017        }
7018    }
7019
7020    impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceEvent<'de>> for DeviceEvent {
7021        #[inline]
7022        fn from_wire_ref(wire: &crate::wire::DeviceEvent<'de>) -> Self {
7023            Self {
7024                action: wire.table.get(1).map(|envelope| {
7025                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7026                        envelope.deref_unchecked::<crate::wire::Action>()
7027                    })
7028                }),
7029
7030                device_id: wire.table.get(2).map(|envelope| {
7031                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7032                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
7033                    })
7034                }),
7035
7036                descriptor: wire.table.get(3).map(|envelope| {
7037                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7038                        envelope.deref_unchecked::<crate::wire::DeviceDescriptor<'de>>()
7039                    })
7040                }),
7041            }
7042        }
7043    }
7044
7045    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7046    pub struct DeviceInfo {
7047        pub vendor_id: u32,
7048
7049        pub product_id: u32,
7050
7051        pub version: u32,
7052
7053        pub name: ::std::string::String,
7054    }
7055
7056    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceInfo<'static>, ___E> for DeviceInfo
7057    where
7058        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7059        ___E: ::fidl_next::Encoder,
7060    {
7061        #[inline]
7062        fn encode(
7063            self,
7064            encoder_: &mut ___E,
7065            out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceInfo<'static>>,
7066            _: (),
7067        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7068            ::fidl_next::munge! {
7069                let crate::wire::DeviceInfo {
7070                    vendor_id,
7071                    product_id,
7072                    version,
7073                    name,
7074
7075                } = out_;
7076            }
7077
7078            ::fidl_next::Encode::encode(self.vendor_id, encoder_, vendor_id, ())?;
7079
7080            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vendor_id.as_mut_ptr()) };
7081
7082            ::fidl_next::Encode::encode(self.product_id, encoder_, product_id, ())?;
7083
7084            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(product_id.as_mut_ptr()) };
7085
7086            ::fidl_next::Encode::encode(self.version, encoder_, version, ())?;
7087
7088            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(version.as_mut_ptr()) };
7089
7090            ::fidl_next::Encode::encode(self.name, encoder_, name, 4294967295)?;
7091
7092            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
7093            ::fidl_next::Constrained::validate(_field, 4294967295)?;
7094
7095            Ok(())
7096        }
7097    }
7098
7099    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceInfo<'static>, ___E> for &'a DeviceInfo
7100    where
7101        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7102        ___E: ::fidl_next::Encoder,
7103    {
7104        #[inline]
7105        fn encode(
7106            self,
7107            encoder_: &mut ___E,
7108            out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceInfo<'static>>,
7109            _: (),
7110        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7111            ::fidl_next::munge! {
7112                let crate::wire::DeviceInfo {
7113                    vendor_id,
7114                    product_id,
7115                    version,
7116                    name,
7117
7118                } = out_;
7119            }
7120
7121            ::fidl_next::Encode::encode(&self.vendor_id, encoder_, vendor_id, ())?;
7122
7123            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vendor_id.as_mut_ptr()) };
7124
7125            ::fidl_next::Encode::encode(&self.product_id, encoder_, product_id, ())?;
7126
7127            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(product_id.as_mut_ptr()) };
7128
7129            ::fidl_next::Encode::encode(&self.version, encoder_, version, ())?;
7130
7131            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(version.as_mut_ptr()) };
7132
7133            ::fidl_next::Encode::encode(&self.name, encoder_, name, 4294967295)?;
7134
7135            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
7136            ::fidl_next::Constrained::validate(_field, 4294967295)?;
7137
7138            Ok(())
7139        }
7140    }
7141
7142    unsafe impl<___E>
7143        ::fidl_next::EncodeOption<
7144            ::fidl_next::wire::Box<'static, crate::wire::DeviceInfo<'static>>,
7145            ___E,
7146        > for DeviceInfo
7147    where
7148        ___E: ::fidl_next::Encoder + ?Sized,
7149        DeviceInfo: ::fidl_next::Encode<crate::wire::DeviceInfo<'static>, ___E>,
7150    {
7151        #[inline]
7152        fn encode_option(
7153            this: ::core::option::Option<Self>,
7154            encoder: &mut ___E,
7155            out: &mut ::core::mem::MaybeUninit<
7156                ::fidl_next::wire::Box<'static, crate::wire::DeviceInfo<'static>>,
7157            >,
7158            _: (),
7159        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7160            if let Some(inner) = this {
7161                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7162                ::fidl_next::wire::Box::encode_present(out);
7163            } else {
7164                ::fidl_next::wire::Box::encode_absent(out);
7165            }
7166
7167            Ok(())
7168        }
7169    }
7170
7171    unsafe impl<'a, ___E>
7172        ::fidl_next::EncodeOption<
7173            ::fidl_next::wire::Box<'static, crate::wire::DeviceInfo<'static>>,
7174            ___E,
7175        > for &'a DeviceInfo
7176    where
7177        ___E: ::fidl_next::Encoder + ?Sized,
7178        &'a DeviceInfo: ::fidl_next::Encode<crate::wire::DeviceInfo<'static>, ___E>,
7179    {
7180        #[inline]
7181        fn encode_option(
7182            this: ::core::option::Option<Self>,
7183            encoder: &mut ___E,
7184            out: &mut ::core::mem::MaybeUninit<
7185                ::fidl_next::wire::Box<'static, crate::wire::DeviceInfo<'static>>,
7186            >,
7187            _: (),
7188        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7189            if let Some(inner) = this {
7190                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7191                ::fidl_next::wire::Box::encode_present(out);
7192            } else {
7193                ::fidl_next::wire::Box::encode_absent(out);
7194            }
7195
7196            Ok(())
7197        }
7198    }
7199
7200    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceInfo<'de>> for DeviceInfo {
7201        #[inline]
7202        fn from_wire(wire: crate::wire::DeviceInfo<'de>) -> Self {
7203            Self {
7204                vendor_id: ::fidl_next::FromWire::from_wire(wire.vendor_id),
7205
7206                product_id: ::fidl_next::FromWire::from_wire(wire.product_id),
7207
7208                version: ::fidl_next::FromWire::from_wire(wire.version),
7209
7210                name: ::fidl_next::FromWire::from_wire(wire.name),
7211            }
7212        }
7213    }
7214
7215    impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceInfo<'de>> for DeviceInfo {
7216        #[inline]
7217        fn from_wire_ref(wire: &crate::wire::DeviceInfo<'de>) -> Self {
7218            Self {
7219                vendor_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.vendor_id),
7220
7221                product_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.product_id),
7222
7223                version: ::fidl_next::FromWireRef::from_wire_ref(&wire.version),
7224
7225                name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
7226            }
7227        }
7228    }
7229
7230    #[derive(Debug, Clone, PartialEq)]
7231    pub struct DeviceIteratorGetNextResponse {
7232        pub devices: ::std::vec::Vec<crate::natural::DeviceEvent>,
7233    }
7234
7235    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceIteratorGetNextResponse<'static>, ___E>
7236        for DeviceIteratorGetNextResponse
7237    where
7238        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7239        ___E: ::fidl_next::Encoder,
7240    {
7241        #[inline]
7242        fn encode(
7243            self,
7244            encoder_: &mut ___E,
7245            out_: &mut ::core::mem::MaybeUninit<
7246                crate::wire::DeviceIteratorGetNextResponse<'static>,
7247            >,
7248            _: (),
7249        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7250            ::fidl_next::munge! {
7251                let crate::wire::DeviceIteratorGetNextResponse {
7252                    devices,
7253
7254                } = out_;
7255            }
7256
7257            ::fidl_next::Encode::encode(self.devices, encoder_, devices, (4294967295, ()))?;
7258
7259            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(devices.as_mut_ptr()) };
7260            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
7261
7262            Ok(())
7263        }
7264    }
7265
7266    unsafe impl<'a, ___E>
7267        ::fidl_next::Encode<crate::wire::DeviceIteratorGetNextResponse<'static>, ___E>
7268        for &'a DeviceIteratorGetNextResponse
7269    where
7270        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7271        ___E: ::fidl_next::Encoder,
7272    {
7273        #[inline]
7274        fn encode(
7275            self,
7276            encoder_: &mut ___E,
7277            out_: &mut ::core::mem::MaybeUninit<
7278                crate::wire::DeviceIteratorGetNextResponse<'static>,
7279            >,
7280            _: (),
7281        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7282            ::fidl_next::munge! {
7283                let crate::wire::DeviceIteratorGetNextResponse {
7284                    devices,
7285
7286                } = out_;
7287            }
7288
7289            ::fidl_next::Encode::encode(&self.devices, encoder_, devices, (4294967295, ()))?;
7290
7291            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(devices.as_mut_ptr()) };
7292            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
7293
7294            Ok(())
7295        }
7296    }
7297
7298    unsafe impl<___E>
7299        ::fidl_next::EncodeOption<
7300            ::fidl_next::wire::Box<'static, crate::wire::DeviceIteratorGetNextResponse<'static>>,
7301            ___E,
7302        > for DeviceIteratorGetNextResponse
7303    where
7304        ___E: ::fidl_next::Encoder + ?Sized,
7305        DeviceIteratorGetNextResponse:
7306            ::fidl_next::Encode<crate::wire::DeviceIteratorGetNextResponse<'static>, ___E>,
7307    {
7308        #[inline]
7309        fn encode_option(
7310            this: ::core::option::Option<Self>,
7311            encoder: &mut ___E,
7312            out: &mut ::core::mem::MaybeUninit<
7313                ::fidl_next::wire::Box<
7314                    'static,
7315                    crate::wire::DeviceIteratorGetNextResponse<'static>,
7316                >,
7317            >,
7318            _: (),
7319        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7320            if let Some(inner) = this {
7321                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7322                ::fidl_next::wire::Box::encode_present(out);
7323            } else {
7324                ::fidl_next::wire::Box::encode_absent(out);
7325            }
7326
7327            Ok(())
7328        }
7329    }
7330
7331    unsafe impl<'a, ___E>
7332        ::fidl_next::EncodeOption<
7333            ::fidl_next::wire::Box<'static, crate::wire::DeviceIteratorGetNextResponse<'static>>,
7334            ___E,
7335        > for &'a DeviceIteratorGetNextResponse
7336    where
7337        ___E: ::fidl_next::Encoder + ?Sized,
7338        &'a DeviceIteratorGetNextResponse:
7339            ::fidl_next::Encode<crate::wire::DeviceIteratorGetNextResponse<'static>, ___E>,
7340    {
7341        #[inline]
7342        fn encode_option(
7343            this: ::core::option::Option<Self>,
7344            encoder: &mut ___E,
7345            out: &mut ::core::mem::MaybeUninit<
7346                ::fidl_next::wire::Box<
7347                    'static,
7348                    crate::wire::DeviceIteratorGetNextResponse<'static>,
7349                >,
7350            >,
7351            _: (),
7352        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7353            if let Some(inner) = this {
7354                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7355                ::fidl_next::wire::Box::encode_present(out);
7356            } else {
7357                ::fidl_next::wire::Box::encode_absent(out);
7358            }
7359
7360            Ok(())
7361        }
7362    }
7363
7364    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceIteratorGetNextResponse<'de>>
7365        for DeviceIteratorGetNextResponse
7366    {
7367        #[inline]
7368        fn from_wire(wire: crate::wire::DeviceIteratorGetNextResponse<'de>) -> Self {
7369            Self { devices: ::fidl_next::FromWire::from_wire(wire.devices) }
7370        }
7371    }
7372
7373    impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceIteratorGetNextResponse<'de>>
7374        for DeviceIteratorGetNextResponse
7375    {
7376        #[inline]
7377        fn from_wire_ref(wire: &crate::wire::DeviceIteratorGetNextResponse<'de>) -> Self {
7378            Self { devices: ::fidl_next::FromWireRef::from_wire_ref(&wire.devices) }
7379        }
7380    }
7381
7382    #[derive(Debug, Clone, PartialEq)]
7383    pub struct DeviceListenerOnDeviceChangedRequest {
7384        pub event: crate::natural::DeviceEvent,
7385    }
7386
7387    unsafe impl<___E>
7388        ::fidl_next::Encode<crate::wire::DeviceListenerOnDeviceChangedRequest<'static>, ___E>
7389        for DeviceListenerOnDeviceChangedRequest
7390    where
7391        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7392        ___E: ::fidl_next::Encoder,
7393    {
7394        #[inline]
7395        fn encode(
7396            self,
7397            encoder_: &mut ___E,
7398            out_: &mut ::core::mem::MaybeUninit<
7399                crate::wire::DeviceListenerOnDeviceChangedRequest<'static>,
7400            >,
7401            _: (),
7402        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7403            ::fidl_next::munge! {
7404                let crate::wire::DeviceListenerOnDeviceChangedRequest {
7405                    event,
7406
7407                } = out_;
7408            }
7409
7410            ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
7411
7412            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
7413
7414            Ok(())
7415        }
7416    }
7417
7418    unsafe impl<'a, ___E>
7419        ::fidl_next::Encode<crate::wire::DeviceListenerOnDeviceChangedRequest<'static>, ___E>
7420        for &'a DeviceListenerOnDeviceChangedRequest
7421    where
7422        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7423        ___E: ::fidl_next::Encoder,
7424    {
7425        #[inline]
7426        fn encode(
7427            self,
7428            encoder_: &mut ___E,
7429            out_: &mut ::core::mem::MaybeUninit<
7430                crate::wire::DeviceListenerOnDeviceChangedRequest<'static>,
7431            >,
7432            _: (),
7433        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7434            ::fidl_next::munge! {
7435                let crate::wire::DeviceListenerOnDeviceChangedRequest {
7436                    event,
7437
7438                } = out_;
7439            }
7440
7441            ::fidl_next::Encode::encode(&self.event, encoder_, event, ())?;
7442
7443            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
7444
7445            Ok(())
7446        }
7447    }
7448
7449    unsafe impl<___E>
7450        ::fidl_next::EncodeOption<
7451            ::fidl_next::wire::Box<
7452                'static,
7453                crate::wire::DeviceListenerOnDeviceChangedRequest<'static>,
7454            >,
7455            ___E,
7456        > for DeviceListenerOnDeviceChangedRequest
7457    where
7458        ___E: ::fidl_next::Encoder + ?Sized,
7459        DeviceListenerOnDeviceChangedRequest:
7460            ::fidl_next::Encode<crate::wire::DeviceListenerOnDeviceChangedRequest<'static>, ___E>,
7461    {
7462        #[inline]
7463        fn encode_option(
7464            this: ::core::option::Option<Self>,
7465            encoder: &mut ___E,
7466            out: &mut ::core::mem::MaybeUninit<
7467                ::fidl_next::wire::Box<
7468                    'static,
7469                    crate::wire::DeviceListenerOnDeviceChangedRequest<'static>,
7470                >,
7471            >,
7472            _: (),
7473        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7474            if let Some(inner) = this {
7475                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7476                ::fidl_next::wire::Box::encode_present(out);
7477            } else {
7478                ::fidl_next::wire::Box::encode_absent(out);
7479            }
7480
7481            Ok(())
7482        }
7483    }
7484
7485    unsafe impl<'a, ___E>
7486        ::fidl_next::EncodeOption<
7487            ::fidl_next::wire::Box<
7488                'static,
7489                crate::wire::DeviceListenerOnDeviceChangedRequest<'static>,
7490            >,
7491            ___E,
7492        > for &'a DeviceListenerOnDeviceChangedRequest
7493    where
7494        ___E: ::fidl_next::Encoder + ?Sized,
7495        &'a DeviceListenerOnDeviceChangedRequest:
7496            ::fidl_next::Encode<crate::wire::DeviceListenerOnDeviceChangedRequest<'static>, ___E>,
7497    {
7498        #[inline]
7499        fn encode_option(
7500            this: ::core::option::Option<Self>,
7501            encoder: &mut ___E,
7502            out: &mut ::core::mem::MaybeUninit<
7503                ::fidl_next::wire::Box<
7504                    'static,
7505                    crate::wire::DeviceListenerOnDeviceChangedRequest<'static>,
7506                >,
7507            >,
7508            _: (),
7509        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7510            if let Some(inner) = this {
7511                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7512                ::fidl_next::wire::Box::encode_present(out);
7513            } else {
7514                ::fidl_next::wire::Box::encode_absent(out);
7515            }
7516
7517            Ok(())
7518        }
7519    }
7520
7521    impl<'de> ::fidl_next::FromWire<crate::wire::DeviceListenerOnDeviceChangedRequest<'de>>
7522        for DeviceListenerOnDeviceChangedRequest
7523    {
7524        #[inline]
7525        fn from_wire(wire: crate::wire::DeviceListenerOnDeviceChangedRequest<'de>) -> Self {
7526            Self { event: ::fidl_next::FromWire::from_wire(wire.event) }
7527        }
7528    }
7529
7530    impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceListenerOnDeviceChangedRequest<'de>>
7531        for DeviceListenerOnDeviceChangedRequest
7532    {
7533        #[inline]
7534        fn from_wire_ref(wire: &crate::wire::DeviceListenerOnDeviceChangedRequest<'de>) -> Self {
7535            Self { event: ::fidl_next::FromWireRef::from_wire_ref(&wire.event) }
7536        }
7537    }
7538
7539    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7540    pub struct FocusEvent {
7541        pub event_time: u64,
7542
7543        pub focused: bool,
7544    }
7545
7546    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FocusEvent, ___E> for FocusEvent
7547    where
7548        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7549    {
7550        #[inline]
7551        fn encode(
7552            self,
7553            encoder_: &mut ___E,
7554            out_: &mut ::core::mem::MaybeUninit<crate::wire::FocusEvent>,
7555            _: (),
7556        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7557            ::fidl_next::munge! {
7558                let crate::wire::FocusEvent {
7559                    event_time,
7560                    focused,
7561
7562                } = out_;
7563            }
7564
7565            ::fidl_next::Encode::encode(self.event_time, encoder_, event_time, ())?;
7566
7567            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event_time.as_mut_ptr()) };
7568
7569            ::fidl_next::Encode::encode(self.focused, encoder_, focused, ())?;
7570
7571            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(focused.as_mut_ptr()) };
7572
7573            Ok(())
7574        }
7575    }
7576
7577    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FocusEvent, ___E> for &'a FocusEvent
7578    where
7579        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7580    {
7581        #[inline]
7582        fn encode(
7583            self,
7584            encoder_: &mut ___E,
7585            out_: &mut ::core::mem::MaybeUninit<crate::wire::FocusEvent>,
7586            _: (),
7587        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7588            ::fidl_next::munge! {
7589                let crate::wire::FocusEvent {
7590                    event_time,
7591                    focused,
7592
7593                } = out_;
7594            }
7595
7596            ::fidl_next::Encode::encode(&self.event_time, encoder_, event_time, ())?;
7597
7598            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event_time.as_mut_ptr()) };
7599
7600            ::fidl_next::Encode::encode(&self.focused, encoder_, focused, ())?;
7601
7602            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(focused.as_mut_ptr()) };
7603
7604            Ok(())
7605        }
7606    }
7607
7608    unsafe impl<___E>
7609        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::FocusEvent>, ___E>
7610        for FocusEvent
7611    where
7612        ___E: ::fidl_next::Encoder + ?Sized,
7613        FocusEvent: ::fidl_next::Encode<crate::wire::FocusEvent, ___E>,
7614    {
7615        #[inline]
7616        fn encode_option(
7617            this: ::core::option::Option<Self>,
7618            encoder: &mut ___E,
7619            out: &mut ::core::mem::MaybeUninit<
7620                ::fidl_next::wire::Box<'static, crate::wire::FocusEvent>,
7621            >,
7622            _: (),
7623        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7624            if let Some(inner) = this {
7625                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7626                ::fidl_next::wire::Box::encode_present(out);
7627            } else {
7628                ::fidl_next::wire::Box::encode_absent(out);
7629            }
7630
7631            Ok(())
7632        }
7633    }
7634
7635    unsafe impl<'a, ___E>
7636        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::FocusEvent>, ___E>
7637        for &'a FocusEvent
7638    where
7639        ___E: ::fidl_next::Encoder + ?Sized,
7640        &'a FocusEvent: ::fidl_next::Encode<crate::wire::FocusEvent, ___E>,
7641    {
7642        #[inline]
7643        fn encode_option(
7644            this: ::core::option::Option<Self>,
7645            encoder: &mut ___E,
7646            out: &mut ::core::mem::MaybeUninit<
7647                ::fidl_next::wire::Box<'static, crate::wire::FocusEvent>,
7648            >,
7649            _: (),
7650        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7651            if let Some(inner) = this {
7652                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7653                ::fidl_next::wire::Box::encode_present(out);
7654            } else {
7655                ::fidl_next::wire::Box::encode_absent(out);
7656            }
7657
7658            Ok(())
7659        }
7660    }
7661
7662    impl ::fidl_next::FromWire<crate::wire::FocusEvent> for FocusEvent {
7663        #[inline]
7664        fn from_wire(wire: crate::wire::FocusEvent) -> Self {
7665            Self {
7666                event_time: ::fidl_next::FromWire::from_wire(wire.event_time),
7667
7668                focused: ::fidl_next::FromWire::from_wire(wire.focused),
7669            }
7670        }
7671    }
7672
7673    impl ::fidl_next::FromWireRef<crate::wire::FocusEvent> for FocusEvent {
7674        #[inline]
7675        fn from_wire_ref(wire: &crate::wire::FocusEvent) -> Self {
7676            Self {
7677                event_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.event_time),
7678
7679                focused: ::fidl_next::FromWireRef::from_wire_ref(&wire.focused),
7680            }
7681        }
7682    }
7683
7684    #[doc = " Whether a TextPosition is visually upstream or downstream of its offset.\n\n For example, when a text position exists at a line break, a single offset has\n two visual positions, one prior to the line break (at the end of the first\n line) and one after the line break (at the start of the second line). A text\n affinity disambiguates between those cases. (Something similar happens with\n between runs of bidirectional text.)\n\n We do not expect new values to be added to this enum.\n"]
7685    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7686    #[repr(u32)]
7687    pub enum TextAffinity {
7688        Upstream = 0,
7689        Downstream = 1,
7690    }
7691    impl ::core::convert::TryFrom<u32> for TextAffinity {
7692        type Error = ::fidl_next::UnknownStrictEnumMemberError;
7693        fn try_from(
7694            value: u32,
7695        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
7696            match value {
7697                0 => Ok(Self::Upstream),
7698                1 => Ok(Self::Downstream),
7699
7700                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
7701            }
7702        }
7703    }
7704
7705    impl ::std::convert::From<TextAffinity> for u32 {
7706        fn from(value: TextAffinity) -> Self {
7707            match value {
7708                TextAffinity::Upstream => 0,
7709                TextAffinity::Downstream => 1,
7710            }
7711        }
7712    }
7713
7714    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TextAffinity, ___E> for TextAffinity
7715    where
7716        ___E: ?Sized,
7717    {
7718        #[inline]
7719        fn encode(
7720            self,
7721            encoder: &mut ___E,
7722            out: &mut ::core::mem::MaybeUninit<crate::wire::TextAffinity>,
7723            _: (),
7724        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7725            ::fidl_next::Encode::encode(&self, encoder, out, ())
7726        }
7727    }
7728
7729    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TextAffinity, ___E> for &'a TextAffinity
7730    where
7731        ___E: ?Sized,
7732    {
7733        #[inline]
7734        fn encode(
7735            self,
7736            encoder: &mut ___E,
7737            out: &mut ::core::mem::MaybeUninit<crate::wire::TextAffinity>,
7738            _: (),
7739        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7740            ::fidl_next::munge!(let crate::wire::TextAffinity { value } = out);
7741            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
7742                TextAffinity::Upstream => 0,
7743
7744                TextAffinity::Downstream => 1,
7745            }));
7746
7747            Ok(())
7748        }
7749    }
7750
7751    impl ::core::convert::From<crate::wire::TextAffinity> for TextAffinity {
7752        fn from(wire: crate::wire::TextAffinity) -> Self {
7753            match u32::from(wire.value) {
7754                0 => Self::Upstream,
7755
7756                1 => Self::Downstream,
7757
7758                _ => unsafe { ::core::hint::unreachable_unchecked() },
7759            }
7760        }
7761    }
7762
7763    impl ::fidl_next::FromWire<crate::wire::TextAffinity> for TextAffinity {
7764        #[inline]
7765        fn from_wire(wire: crate::wire::TextAffinity) -> Self {
7766            Self::from(wire)
7767        }
7768    }
7769
7770    impl ::fidl_next::FromWireRef<crate::wire::TextAffinity> for TextAffinity {
7771        #[inline]
7772        fn from_wire_ref(wire: &crate::wire::TextAffinity) -> Self {
7773            Self::from(*wire)
7774        }
7775    }
7776
7777    #[doc = " A range of text that represents a selection. Although strings in FIDL\'s wire\n format are UTF-8 encoded, these indices are measured in UTF-16 code units\n for legacy reasons. These text input APIs will eventually be replaced by\n fuchsia.ui.text, which uses code points instead.\n\n Text selection is always directional. Direction should be determined by\n comparing base and extent.\n"]
7778    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7779    pub struct TextSelection {
7780        pub base: i64,
7781
7782        pub extent: i64,
7783
7784        pub affinity: crate::natural::TextAffinity,
7785    }
7786
7787    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TextSelection, ___E> for TextSelection
7788    where
7789        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7790    {
7791        #[inline]
7792        fn encode(
7793            self,
7794            encoder_: &mut ___E,
7795            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextSelection>,
7796            _: (),
7797        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7798            ::fidl_next::munge! {
7799                let crate::wire::TextSelection {
7800                    base,
7801                    extent,
7802                    affinity,
7803
7804                } = out_;
7805            }
7806
7807            ::fidl_next::Encode::encode(self.base, encoder_, base, ())?;
7808
7809            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(base.as_mut_ptr()) };
7810
7811            ::fidl_next::Encode::encode(self.extent, encoder_, extent, ())?;
7812
7813            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(extent.as_mut_ptr()) };
7814
7815            ::fidl_next::Encode::encode(self.affinity, encoder_, affinity, ())?;
7816
7817            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(affinity.as_mut_ptr()) };
7818
7819            Ok(())
7820        }
7821    }
7822
7823    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TextSelection, ___E> for &'a TextSelection
7824    where
7825        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7826    {
7827        #[inline]
7828        fn encode(
7829            self,
7830            encoder_: &mut ___E,
7831            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextSelection>,
7832            _: (),
7833        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7834            ::fidl_next::munge! {
7835                let crate::wire::TextSelection {
7836                    base,
7837                    extent,
7838                    affinity,
7839
7840                } = out_;
7841            }
7842
7843            ::fidl_next::Encode::encode(&self.base, encoder_, base, ())?;
7844
7845            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(base.as_mut_ptr()) };
7846
7847            ::fidl_next::Encode::encode(&self.extent, encoder_, extent, ())?;
7848
7849            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(extent.as_mut_ptr()) };
7850
7851            ::fidl_next::Encode::encode(&self.affinity, encoder_, affinity, ())?;
7852
7853            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(affinity.as_mut_ptr()) };
7854
7855            Ok(())
7856        }
7857    }
7858
7859    unsafe impl<___E>
7860        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::TextSelection>, ___E>
7861        for TextSelection
7862    where
7863        ___E: ::fidl_next::Encoder + ?Sized,
7864        TextSelection: ::fidl_next::Encode<crate::wire::TextSelection, ___E>,
7865    {
7866        #[inline]
7867        fn encode_option(
7868            this: ::core::option::Option<Self>,
7869            encoder: &mut ___E,
7870            out: &mut ::core::mem::MaybeUninit<
7871                ::fidl_next::wire::Box<'static, crate::wire::TextSelection>,
7872            >,
7873            _: (),
7874        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7875            if let Some(inner) = this {
7876                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7877                ::fidl_next::wire::Box::encode_present(out);
7878            } else {
7879                ::fidl_next::wire::Box::encode_absent(out);
7880            }
7881
7882            Ok(())
7883        }
7884    }
7885
7886    unsafe impl<'a, ___E>
7887        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::TextSelection>, ___E>
7888        for &'a TextSelection
7889    where
7890        ___E: ::fidl_next::Encoder + ?Sized,
7891        &'a TextSelection: ::fidl_next::Encode<crate::wire::TextSelection, ___E>,
7892    {
7893        #[inline]
7894        fn encode_option(
7895            this: ::core::option::Option<Self>,
7896            encoder: &mut ___E,
7897            out: &mut ::core::mem::MaybeUninit<
7898                ::fidl_next::wire::Box<'static, crate::wire::TextSelection>,
7899            >,
7900            _: (),
7901        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7902            if let Some(inner) = this {
7903                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7904                ::fidl_next::wire::Box::encode_present(out);
7905            } else {
7906                ::fidl_next::wire::Box::encode_absent(out);
7907            }
7908
7909            Ok(())
7910        }
7911    }
7912
7913    impl ::fidl_next::FromWire<crate::wire::TextSelection> for TextSelection {
7914        #[inline]
7915        fn from_wire(wire: crate::wire::TextSelection) -> Self {
7916            Self {
7917                base: ::fidl_next::FromWire::from_wire(wire.base),
7918
7919                extent: ::fidl_next::FromWire::from_wire(wire.extent),
7920
7921                affinity: ::fidl_next::FromWire::from_wire(wire.affinity),
7922            }
7923        }
7924    }
7925
7926    impl ::fidl_next::FromWireRef<crate::wire::TextSelection> for TextSelection {
7927        #[inline]
7928        fn from_wire_ref(wire: &crate::wire::TextSelection) -> Self {
7929            Self {
7930                base: ::fidl_next::FromWireRef::from_wire_ref(&wire.base),
7931
7932                extent: ::fidl_next::FromWireRef::from_wire_ref(&wire.extent),
7933
7934                affinity: ::fidl_next::FromWireRef::from_wire_ref(&wire.affinity),
7935            }
7936        }
7937    }
7938
7939    #[doc = " A range of characters in a string of text. Although strings in FIDL\'s wire\n format are UTF-8 encoded, these indices are measured in UTF-16 code units\n for legacy reasons. These text input APIs will eventually be replaced by\n fuchsia.ui.text, which uses code points instead.\n"]
7940    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7941    #[repr(C)]
7942    pub struct TextRange {
7943        pub start: i64,
7944
7945        pub end: i64,
7946    }
7947
7948    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TextRange, ___E> for TextRange
7949    where
7950        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7951    {
7952        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::TextRange> = unsafe {
7953            ::fidl_next::CopyOptimization::enable_if(
7954            true
7955
7956                && <
7957                    i64 as ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>
7958                >::COPY_OPTIMIZATION.is_enabled()
7959
7960                && <
7961                    i64 as ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>
7962                >::COPY_OPTIMIZATION.is_enabled()
7963
7964        )
7965        };
7966
7967        #[inline]
7968        fn encode(
7969            self,
7970            encoder_: &mut ___E,
7971            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextRange>,
7972            _: (),
7973        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7974            ::fidl_next::munge! {
7975                let crate::wire::TextRange {
7976                    start,
7977                    end,
7978
7979                } = out_;
7980            }
7981
7982            ::fidl_next::Encode::encode(self.start, encoder_, start, ())?;
7983
7984            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start.as_mut_ptr()) };
7985
7986            ::fidl_next::Encode::encode(self.end, encoder_, end, ())?;
7987
7988            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(end.as_mut_ptr()) };
7989
7990            Ok(())
7991        }
7992    }
7993
7994    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TextRange, ___E> for &'a TextRange
7995    where
7996        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7997    {
7998        #[inline]
7999        fn encode(
8000            self,
8001            encoder_: &mut ___E,
8002            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextRange>,
8003            _: (),
8004        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8005            ::fidl_next::munge! {
8006                let crate::wire::TextRange {
8007                    start,
8008                    end,
8009
8010                } = out_;
8011            }
8012
8013            ::fidl_next::Encode::encode(&self.start, encoder_, start, ())?;
8014
8015            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start.as_mut_ptr()) };
8016
8017            ::fidl_next::Encode::encode(&self.end, encoder_, end, ())?;
8018
8019            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(end.as_mut_ptr()) };
8020
8021            Ok(())
8022        }
8023    }
8024
8025    unsafe impl<___E>
8026        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::TextRange>, ___E>
8027        for TextRange
8028    where
8029        ___E: ::fidl_next::Encoder + ?Sized,
8030        TextRange: ::fidl_next::Encode<crate::wire::TextRange, ___E>,
8031    {
8032        #[inline]
8033        fn encode_option(
8034            this: ::core::option::Option<Self>,
8035            encoder: &mut ___E,
8036            out: &mut ::core::mem::MaybeUninit<
8037                ::fidl_next::wire::Box<'static, crate::wire::TextRange>,
8038            >,
8039            _: (),
8040        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8041            if let Some(inner) = this {
8042                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8043                ::fidl_next::wire::Box::encode_present(out);
8044            } else {
8045                ::fidl_next::wire::Box::encode_absent(out);
8046            }
8047
8048            Ok(())
8049        }
8050    }
8051
8052    unsafe impl<'a, ___E>
8053        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::TextRange>, ___E>
8054        for &'a TextRange
8055    where
8056        ___E: ::fidl_next::Encoder + ?Sized,
8057        &'a TextRange: ::fidl_next::Encode<crate::wire::TextRange, ___E>,
8058    {
8059        #[inline]
8060        fn encode_option(
8061            this: ::core::option::Option<Self>,
8062            encoder: &mut ___E,
8063            out: &mut ::core::mem::MaybeUninit<
8064                ::fidl_next::wire::Box<'static, crate::wire::TextRange>,
8065            >,
8066            _: (),
8067        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8068            if let Some(inner) = this {
8069                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8070                ::fidl_next::wire::Box::encode_present(out);
8071            } else {
8072                ::fidl_next::wire::Box::encode_absent(out);
8073            }
8074
8075            Ok(())
8076        }
8077    }
8078
8079    impl ::fidl_next::FromWire<crate::wire::TextRange> for TextRange {
8080        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::TextRange, Self> = unsafe {
8081            ::fidl_next::CopyOptimization::enable_if(
8082                true && <i64 as ::fidl_next::FromWire<::fidl_next::wire::Int64>>::COPY_OPTIMIZATION
8083                    .is_enabled()
8084                    && <i64 as ::fidl_next::FromWire<::fidl_next::wire::Int64>>::COPY_OPTIMIZATION
8085                        .is_enabled(),
8086            )
8087        };
8088
8089        #[inline]
8090        fn from_wire(wire: crate::wire::TextRange) -> Self {
8091            Self {
8092                start: ::fidl_next::FromWire::from_wire(wire.start),
8093
8094                end: ::fidl_next::FromWire::from_wire(wire.end),
8095            }
8096        }
8097    }
8098
8099    impl ::fidl_next::FromWireRef<crate::wire::TextRange> for TextRange {
8100        #[inline]
8101        fn from_wire_ref(wire: &crate::wire::TextRange) -> Self {
8102            Self {
8103                start: ::fidl_next::FromWireRef::from_wire_ref(&wire.start),
8104
8105                end: ::fidl_next::FromWireRef::from_wire_ref(&wire.end),
8106            }
8107        }
8108    }
8109
8110    #[doc = " The current text, selection, and composing state for editing a run of text.\n"]
8111    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8112    pub struct TextInputState {
8113        pub revision: u32,
8114
8115        pub text: ::std::string::String,
8116
8117        pub selection: crate::natural::TextSelection,
8118
8119        pub composing: crate::natural::TextRange,
8120    }
8121
8122    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TextInputState<'static>, ___E> for TextInputState
8123    where
8124        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8125        ___E: ::fidl_next::Encoder,
8126    {
8127        #[inline]
8128        fn encode(
8129            self,
8130            encoder_: &mut ___E,
8131            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextInputState<'static>>,
8132            _: (),
8133        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8134            ::fidl_next::munge! {
8135                let crate::wire::TextInputState {
8136                    revision,
8137                    text,
8138                    selection,
8139                    composing,
8140
8141                } = out_;
8142            }
8143
8144            ::fidl_next::Encode::encode(self.revision, encoder_, revision, ())?;
8145
8146            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(revision.as_mut_ptr()) };
8147
8148            ::fidl_next::Encode::encode(self.text, encoder_, text, 4294967295)?;
8149
8150            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(text.as_mut_ptr()) };
8151            ::fidl_next::Constrained::validate(_field, 4294967295)?;
8152
8153            ::fidl_next::Encode::encode(self.selection, encoder_, selection, ())?;
8154
8155            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(selection.as_mut_ptr()) };
8156
8157            ::fidl_next::Encode::encode(self.composing, encoder_, composing, ())?;
8158
8159            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(composing.as_mut_ptr()) };
8160
8161            Ok(())
8162        }
8163    }
8164
8165    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TextInputState<'static>, ___E>
8166        for &'a TextInputState
8167    where
8168        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8169        ___E: ::fidl_next::Encoder,
8170    {
8171        #[inline]
8172        fn encode(
8173            self,
8174            encoder_: &mut ___E,
8175            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextInputState<'static>>,
8176            _: (),
8177        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8178            ::fidl_next::munge! {
8179                let crate::wire::TextInputState {
8180                    revision,
8181                    text,
8182                    selection,
8183                    composing,
8184
8185                } = out_;
8186            }
8187
8188            ::fidl_next::Encode::encode(&self.revision, encoder_, revision, ())?;
8189
8190            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(revision.as_mut_ptr()) };
8191
8192            ::fidl_next::Encode::encode(&self.text, encoder_, text, 4294967295)?;
8193
8194            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(text.as_mut_ptr()) };
8195            ::fidl_next::Constrained::validate(_field, 4294967295)?;
8196
8197            ::fidl_next::Encode::encode(&self.selection, encoder_, selection, ())?;
8198
8199            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(selection.as_mut_ptr()) };
8200
8201            ::fidl_next::Encode::encode(&self.composing, encoder_, composing, ())?;
8202
8203            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(composing.as_mut_ptr()) };
8204
8205            Ok(())
8206        }
8207    }
8208
8209    unsafe impl<___E>
8210        ::fidl_next::EncodeOption<
8211            ::fidl_next::wire::Box<'static, crate::wire::TextInputState<'static>>,
8212            ___E,
8213        > for TextInputState
8214    where
8215        ___E: ::fidl_next::Encoder + ?Sized,
8216        TextInputState: ::fidl_next::Encode<crate::wire::TextInputState<'static>, ___E>,
8217    {
8218        #[inline]
8219        fn encode_option(
8220            this: ::core::option::Option<Self>,
8221            encoder: &mut ___E,
8222            out: &mut ::core::mem::MaybeUninit<
8223                ::fidl_next::wire::Box<'static, crate::wire::TextInputState<'static>>,
8224            >,
8225            _: (),
8226        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8227            if let Some(inner) = this {
8228                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8229                ::fidl_next::wire::Box::encode_present(out);
8230            } else {
8231                ::fidl_next::wire::Box::encode_absent(out);
8232            }
8233
8234            Ok(())
8235        }
8236    }
8237
8238    unsafe impl<'a, ___E>
8239        ::fidl_next::EncodeOption<
8240            ::fidl_next::wire::Box<'static, crate::wire::TextInputState<'static>>,
8241            ___E,
8242        > for &'a TextInputState
8243    where
8244        ___E: ::fidl_next::Encoder + ?Sized,
8245        &'a TextInputState: ::fidl_next::Encode<crate::wire::TextInputState<'static>, ___E>,
8246    {
8247        #[inline]
8248        fn encode_option(
8249            this: ::core::option::Option<Self>,
8250            encoder: &mut ___E,
8251            out: &mut ::core::mem::MaybeUninit<
8252                ::fidl_next::wire::Box<'static, crate::wire::TextInputState<'static>>,
8253            >,
8254            _: (),
8255        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8256            if let Some(inner) = this {
8257                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8258                ::fidl_next::wire::Box::encode_present(out);
8259            } else {
8260                ::fidl_next::wire::Box::encode_absent(out);
8261            }
8262
8263            Ok(())
8264        }
8265    }
8266
8267    impl<'de> ::fidl_next::FromWire<crate::wire::TextInputState<'de>> for TextInputState {
8268        #[inline]
8269        fn from_wire(wire: crate::wire::TextInputState<'de>) -> Self {
8270            Self {
8271                revision: ::fidl_next::FromWire::from_wire(wire.revision),
8272
8273                text: ::fidl_next::FromWire::from_wire(wire.text),
8274
8275                selection: ::fidl_next::FromWire::from_wire(wire.selection),
8276
8277                composing: ::fidl_next::FromWire::from_wire(wire.composing),
8278            }
8279        }
8280    }
8281
8282    impl<'de> ::fidl_next::FromWireRef<crate::wire::TextInputState<'de>> for TextInputState {
8283        #[inline]
8284        fn from_wire_ref(wire: &crate::wire::TextInputState<'de>) -> Self {
8285            Self {
8286                revision: ::fidl_next::FromWireRef::from_wire_ref(&wire.revision),
8287
8288                text: ::fidl_next::FromWireRef::from_wire_ref(&wire.text),
8289
8290                selection: ::fidl_next::FromWireRef::from_wire_ref(&wire.selection),
8291
8292                composing: ::fidl_next::FromWireRef::from_wire_ref(&wire.composing),
8293            }
8294        }
8295    }
8296
8297    #[doc = " Requests a specific keyboard type from the text editing subsystem.\n\n This is most relevant for virtual keyboards which have some leeway in how\n the keyboard is presented to the user, as well as which input is acceptable.\n\n For example, a `NUMBER` keyboard type may only allow decimal numbers to be\n entered.  In addition, a virtual keyboard might only show a numeric keypad\n for text entry.\n"]
8298    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8299    #[repr(u32)]
8300    pub enum KeyboardType {
8301        Text = 0,
8302        Number = 1,
8303        Phone = 2,
8304        Datetime = 3,
8305        Multiline = 4,
8306        UnknownOrdinal_(u32) = 5,
8307    }
8308    impl ::std::convert::From<u32> for KeyboardType {
8309        fn from(value: u32) -> Self {
8310            match value {
8311                0 => Self::Text,
8312                1 => Self::Number,
8313                2 => Self::Phone,
8314                3 => Self::Datetime,
8315                4 => Self::Multiline,
8316
8317                _ => Self::UnknownOrdinal_(value),
8318            }
8319        }
8320    }
8321
8322    impl ::std::convert::From<KeyboardType> for u32 {
8323        fn from(value: KeyboardType) -> Self {
8324            match value {
8325                KeyboardType::Text => 0,
8326                KeyboardType::Number => 1,
8327                KeyboardType::Phone => 2,
8328                KeyboardType::Datetime => 3,
8329                KeyboardType::Multiline => 4,
8330
8331                KeyboardType::UnknownOrdinal_(value) => value,
8332            }
8333        }
8334    }
8335
8336    unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeyboardType, ___E> for KeyboardType
8337    where
8338        ___E: ?Sized,
8339    {
8340        #[inline]
8341        fn encode(
8342            self,
8343            encoder: &mut ___E,
8344            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardType>,
8345            _: (),
8346        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8347            ::fidl_next::Encode::encode(&self, encoder, out, ())
8348        }
8349    }
8350
8351    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::KeyboardType, ___E> for &'a KeyboardType
8352    where
8353        ___E: ?Sized,
8354    {
8355        #[inline]
8356        fn encode(
8357            self,
8358            encoder: &mut ___E,
8359            out: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardType>,
8360            _: (),
8361        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8362            ::fidl_next::munge!(let crate::wire::KeyboardType { value } = out);
8363            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
8364                KeyboardType::Text => 0,
8365
8366                KeyboardType::Number => 1,
8367
8368                KeyboardType::Phone => 2,
8369
8370                KeyboardType::Datetime => 3,
8371
8372                KeyboardType::Multiline => 4,
8373
8374                KeyboardType::UnknownOrdinal_(value) => value,
8375            }));
8376
8377            Ok(())
8378        }
8379    }
8380
8381    impl ::core::convert::From<crate::wire::KeyboardType> for KeyboardType {
8382        fn from(wire: crate::wire::KeyboardType) -> Self {
8383            match u32::from(wire.value) {
8384                0 => Self::Text,
8385
8386                1 => Self::Number,
8387
8388                2 => Self::Phone,
8389
8390                3 => Self::Datetime,
8391
8392                4 => Self::Multiline,
8393
8394                value => Self::UnknownOrdinal_(value),
8395            }
8396        }
8397    }
8398
8399    impl ::fidl_next::FromWire<crate::wire::KeyboardType> for KeyboardType {
8400        #[inline]
8401        fn from_wire(wire: crate::wire::KeyboardType) -> Self {
8402            Self::from(wire)
8403        }
8404    }
8405
8406    impl ::fidl_next::FromWireRef<crate::wire::KeyboardType> for KeyboardType {
8407        #[inline]
8408        fn from_wire_ref(wire: &crate::wire::KeyboardType) -> Self {
8409            Self::from(*wire)
8410        }
8411    }
8412
8413    #[doc = " Determines what happens if the \"action\" key is pressed on the keyboard,\n typically would either be the \"Enter\" key on a physical keyboard, or an\n action button on a virtual keyboard, which is usually placed where Enter\n would be, but with a custom label.\n"]
8414    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8415    #[repr(u32)]
8416    pub enum InputMethodAction {
8417        Unspecified = 0,
8418        None = 1,
8419        Go = 2,
8420        Search = 3,
8421        Send = 4,
8422        Next = 5,
8423        Done = 6,
8424        Previous = 7,
8425        Newline = 8,
8426        UnknownOrdinal_(u32) = 9,
8427    }
8428    impl ::std::convert::From<u32> for InputMethodAction {
8429        fn from(value: u32) -> Self {
8430            match value {
8431                0 => Self::Unspecified,
8432                1 => Self::None,
8433                2 => Self::Go,
8434                3 => Self::Search,
8435                4 => Self::Send,
8436                5 => Self::Next,
8437                6 => Self::Done,
8438                7 => Self::Previous,
8439                8 => Self::Newline,
8440
8441                _ => Self::UnknownOrdinal_(value),
8442            }
8443        }
8444    }
8445
8446    impl ::std::convert::From<InputMethodAction> for u32 {
8447        fn from(value: InputMethodAction) -> Self {
8448            match value {
8449                InputMethodAction::Unspecified => 0,
8450                InputMethodAction::None => 1,
8451                InputMethodAction::Go => 2,
8452                InputMethodAction::Search => 3,
8453                InputMethodAction::Send => 4,
8454                InputMethodAction::Next => 5,
8455                InputMethodAction::Done => 6,
8456                InputMethodAction::Previous => 7,
8457                InputMethodAction::Newline => 8,
8458
8459                InputMethodAction::UnknownOrdinal_(value) => value,
8460            }
8461        }
8462    }
8463
8464    unsafe impl<___E> ::fidl_next::Encode<crate::wire::InputMethodAction, ___E> for InputMethodAction
8465    where
8466        ___E: ?Sized,
8467    {
8468        #[inline]
8469        fn encode(
8470            self,
8471            encoder: &mut ___E,
8472            out: &mut ::core::mem::MaybeUninit<crate::wire::InputMethodAction>,
8473            _: (),
8474        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8475            ::fidl_next::Encode::encode(&self, encoder, out, ())
8476        }
8477    }
8478
8479    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::InputMethodAction, ___E>
8480        for &'a InputMethodAction
8481    where
8482        ___E: ?Sized,
8483    {
8484        #[inline]
8485        fn encode(
8486            self,
8487            encoder: &mut ___E,
8488            out: &mut ::core::mem::MaybeUninit<crate::wire::InputMethodAction>,
8489            _: (),
8490        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8491            ::fidl_next::munge!(let crate::wire::InputMethodAction { value } = out);
8492            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
8493                InputMethodAction::Unspecified => 0,
8494
8495                InputMethodAction::None => 1,
8496
8497                InputMethodAction::Go => 2,
8498
8499                InputMethodAction::Search => 3,
8500
8501                InputMethodAction::Send => 4,
8502
8503                InputMethodAction::Next => 5,
8504
8505                InputMethodAction::Done => 6,
8506
8507                InputMethodAction::Previous => 7,
8508
8509                InputMethodAction::Newline => 8,
8510
8511                InputMethodAction::UnknownOrdinal_(value) => value,
8512            }));
8513
8514            Ok(())
8515        }
8516    }
8517
8518    impl ::core::convert::From<crate::wire::InputMethodAction> for InputMethodAction {
8519        fn from(wire: crate::wire::InputMethodAction) -> Self {
8520            match u32::from(wire.value) {
8521                0 => Self::Unspecified,
8522
8523                1 => Self::None,
8524
8525                2 => Self::Go,
8526
8527                3 => Self::Search,
8528
8529                4 => Self::Send,
8530
8531                5 => Self::Next,
8532
8533                6 => Self::Done,
8534
8535                7 => Self::Previous,
8536
8537                8 => Self::Newline,
8538
8539                value => Self::UnknownOrdinal_(value),
8540            }
8541        }
8542    }
8543
8544    impl ::fidl_next::FromWire<crate::wire::InputMethodAction> for InputMethodAction {
8545        #[inline]
8546        fn from_wire(wire: crate::wire::InputMethodAction) -> Self {
8547            Self::from(wire)
8548        }
8549    }
8550
8551    impl ::fidl_next::FromWireRef<crate::wire::InputMethodAction> for InputMethodAction {
8552        #[inline]
8553        fn from_wire_ref(wire: &crate::wire::InputMethodAction) -> Self {
8554            Self::from(*wire)
8555        }
8556    }
8557
8558    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8559    pub struct InputReport {
8560        pub event_time: u64,
8561
8562        pub keyboard: ::core::option::Option<::std::boxed::Box<crate::natural::KeyboardReport>>,
8563
8564        pub media_buttons:
8565            ::core::option::Option<::std::boxed::Box<crate::natural::MediaButtonsReport>>,
8566
8567        pub mouse: ::core::option::Option<::std::boxed::Box<crate::natural::MouseReport>>,
8568
8569        pub stylus: ::core::option::Option<::std::boxed::Box<crate::natural::StylusReport>>,
8570
8571        pub touchscreen:
8572            ::core::option::Option<::std::boxed::Box<crate::natural::TouchscreenReport>>,
8573
8574        pub sensor: ::core::option::Option<::std::boxed::Box<crate::natural::SensorReport>>,
8575
8576        pub trace_id: u64,
8577    }
8578
8579    unsafe impl<___E> ::fidl_next::Encode<crate::wire::InputReport<'static>, ___E> for InputReport
8580    where
8581        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8582        ___E: ::fidl_next::Encoder,
8583    {
8584        #[inline]
8585        fn encode(
8586            self,
8587            encoder_: &mut ___E,
8588            out_: &mut ::core::mem::MaybeUninit<crate::wire::InputReport<'static>>,
8589            _: (),
8590        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8591            ::fidl_next::munge! {
8592                let crate::wire::InputReport {
8593                    event_time,
8594                    keyboard,
8595                    media_buttons,
8596                    mouse,
8597                    stylus,
8598                    touchscreen,
8599                    sensor,
8600                    trace_id,
8601
8602                } = out_;
8603            }
8604
8605            ::fidl_next::Encode::encode(self.event_time, encoder_, event_time, ())?;
8606
8607            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event_time.as_mut_ptr()) };
8608
8609            ::fidl_next::Encode::encode(self.keyboard, encoder_, keyboard, ())?;
8610
8611            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(keyboard.as_mut_ptr()) };
8612
8613            ::fidl_next::Encode::encode(self.media_buttons, encoder_, media_buttons, ())?;
8614
8615            let mut _field =
8616                unsafe { ::fidl_next::Slot::new_unchecked(media_buttons.as_mut_ptr()) };
8617
8618            ::fidl_next::Encode::encode(self.mouse, encoder_, mouse, ())?;
8619
8620            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mouse.as_mut_ptr()) };
8621
8622            ::fidl_next::Encode::encode(self.stylus, encoder_, stylus, ())?;
8623
8624            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(stylus.as_mut_ptr()) };
8625
8626            ::fidl_next::Encode::encode(self.touchscreen, encoder_, touchscreen, ())?;
8627
8628            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(touchscreen.as_mut_ptr()) };
8629
8630            ::fidl_next::Encode::encode(self.sensor, encoder_, sensor, ())?;
8631
8632            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(sensor.as_mut_ptr()) };
8633
8634            ::fidl_next::Encode::encode(self.trace_id, encoder_, trace_id, ())?;
8635
8636            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(trace_id.as_mut_ptr()) };
8637
8638            Ok(())
8639        }
8640    }
8641
8642    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::InputReport<'static>, ___E>
8643        for &'a InputReport
8644    where
8645        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8646        ___E: ::fidl_next::Encoder,
8647    {
8648        #[inline]
8649        fn encode(
8650            self,
8651            encoder_: &mut ___E,
8652            out_: &mut ::core::mem::MaybeUninit<crate::wire::InputReport<'static>>,
8653            _: (),
8654        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8655            ::fidl_next::munge! {
8656                let crate::wire::InputReport {
8657                    event_time,
8658                    keyboard,
8659                    media_buttons,
8660                    mouse,
8661                    stylus,
8662                    touchscreen,
8663                    sensor,
8664                    trace_id,
8665
8666                } = out_;
8667            }
8668
8669            ::fidl_next::Encode::encode(&self.event_time, encoder_, event_time, ())?;
8670
8671            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event_time.as_mut_ptr()) };
8672
8673            ::fidl_next::Encode::encode(&self.keyboard, encoder_, keyboard, ())?;
8674
8675            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(keyboard.as_mut_ptr()) };
8676
8677            ::fidl_next::Encode::encode(&self.media_buttons, encoder_, media_buttons, ())?;
8678
8679            let mut _field =
8680                unsafe { ::fidl_next::Slot::new_unchecked(media_buttons.as_mut_ptr()) };
8681
8682            ::fidl_next::Encode::encode(&self.mouse, encoder_, mouse, ())?;
8683
8684            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mouse.as_mut_ptr()) };
8685
8686            ::fidl_next::Encode::encode(&self.stylus, encoder_, stylus, ())?;
8687
8688            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(stylus.as_mut_ptr()) };
8689
8690            ::fidl_next::Encode::encode(&self.touchscreen, encoder_, touchscreen, ())?;
8691
8692            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(touchscreen.as_mut_ptr()) };
8693
8694            ::fidl_next::Encode::encode(&self.sensor, encoder_, sensor, ())?;
8695
8696            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(sensor.as_mut_ptr()) };
8697
8698            ::fidl_next::Encode::encode(&self.trace_id, encoder_, trace_id, ())?;
8699
8700            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(trace_id.as_mut_ptr()) };
8701
8702            Ok(())
8703        }
8704    }
8705
8706    unsafe impl<___E>
8707        ::fidl_next::EncodeOption<
8708            ::fidl_next::wire::Box<'static, crate::wire::InputReport<'static>>,
8709            ___E,
8710        > for InputReport
8711    where
8712        ___E: ::fidl_next::Encoder + ?Sized,
8713        InputReport: ::fidl_next::Encode<crate::wire::InputReport<'static>, ___E>,
8714    {
8715        #[inline]
8716        fn encode_option(
8717            this: ::core::option::Option<Self>,
8718            encoder: &mut ___E,
8719            out: &mut ::core::mem::MaybeUninit<
8720                ::fidl_next::wire::Box<'static, crate::wire::InputReport<'static>>,
8721            >,
8722            _: (),
8723        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8724            if let Some(inner) = this {
8725                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8726                ::fidl_next::wire::Box::encode_present(out);
8727            } else {
8728                ::fidl_next::wire::Box::encode_absent(out);
8729            }
8730
8731            Ok(())
8732        }
8733    }
8734
8735    unsafe impl<'a, ___E>
8736        ::fidl_next::EncodeOption<
8737            ::fidl_next::wire::Box<'static, crate::wire::InputReport<'static>>,
8738            ___E,
8739        > for &'a InputReport
8740    where
8741        ___E: ::fidl_next::Encoder + ?Sized,
8742        &'a InputReport: ::fidl_next::Encode<crate::wire::InputReport<'static>, ___E>,
8743    {
8744        #[inline]
8745        fn encode_option(
8746            this: ::core::option::Option<Self>,
8747            encoder: &mut ___E,
8748            out: &mut ::core::mem::MaybeUninit<
8749                ::fidl_next::wire::Box<'static, crate::wire::InputReport<'static>>,
8750            >,
8751            _: (),
8752        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8753            if let Some(inner) = this {
8754                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8755                ::fidl_next::wire::Box::encode_present(out);
8756            } else {
8757                ::fidl_next::wire::Box::encode_absent(out);
8758            }
8759
8760            Ok(())
8761        }
8762    }
8763
8764    impl<'de> ::fidl_next::FromWire<crate::wire::InputReport<'de>> for InputReport {
8765        #[inline]
8766        fn from_wire(wire: crate::wire::InputReport<'de>) -> Self {
8767            Self {
8768                event_time: ::fidl_next::FromWire::from_wire(wire.event_time),
8769
8770                keyboard: ::fidl_next::FromWire::from_wire(wire.keyboard),
8771
8772                media_buttons: ::fidl_next::FromWire::from_wire(wire.media_buttons),
8773
8774                mouse: ::fidl_next::FromWire::from_wire(wire.mouse),
8775
8776                stylus: ::fidl_next::FromWire::from_wire(wire.stylus),
8777
8778                touchscreen: ::fidl_next::FromWire::from_wire(wire.touchscreen),
8779
8780                sensor: ::fidl_next::FromWire::from_wire(wire.sensor),
8781
8782                trace_id: ::fidl_next::FromWire::from_wire(wire.trace_id),
8783            }
8784        }
8785    }
8786
8787    impl<'de> ::fidl_next::FromWireRef<crate::wire::InputReport<'de>> for InputReport {
8788        #[inline]
8789        fn from_wire_ref(wire: &crate::wire::InputReport<'de>) -> Self {
8790            Self {
8791                event_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.event_time),
8792
8793                keyboard: ::fidl_next::FromWireRef::from_wire_ref(&wire.keyboard),
8794
8795                media_buttons: ::fidl_next::FromWireRef::from_wire_ref(&wire.media_buttons),
8796
8797                mouse: ::fidl_next::FromWireRef::from_wire_ref(&wire.mouse),
8798
8799                stylus: ::fidl_next::FromWireRef::from_wire_ref(&wire.stylus),
8800
8801                touchscreen: ::fidl_next::FromWireRef::from_wire_ref(&wire.touchscreen),
8802
8803                sensor: ::fidl_next::FromWireRef::from_wire_ref(&wire.sensor),
8804
8805                trace_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.trace_id),
8806            }
8807        }
8808    }
8809
8810    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8811    pub struct InputDeviceDispatchReportRequest {
8812        pub report: crate::natural::InputReport,
8813    }
8814
8815    unsafe impl<___E>
8816        ::fidl_next::Encode<crate::wire::InputDeviceDispatchReportRequest<'static>, ___E>
8817        for InputDeviceDispatchReportRequest
8818    where
8819        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8820        ___E: ::fidl_next::Encoder,
8821    {
8822        #[inline]
8823        fn encode(
8824            self,
8825            encoder_: &mut ___E,
8826            out_: &mut ::core::mem::MaybeUninit<
8827                crate::wire::InputDeviceDispatchReportRequest<'static>,
8828            >,
8829            _: (),
8830        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8831            ::fidl_next::munge! {
8832                let crate::wire::InputDeviceDispatchReportRequest {
8833                    report,
8834
8835                } = out_;
8836            }
8837
8838            ::fidl_next::Encode::encode(self.report, encoder_, report, ())?;
8839
8840            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(report.as_mut_ptr()) };
8841
8842            Ok(())
8843        }
8844    }
8845
8846    unsafe impl<'a, ___E>
8847        ::fidl_next::Encode<crate::wire::InputDeviceDispatchReportRequest<'static>, ___E>
8848        for &'a InputDeviceDispatchReportRequest
8849    where
8850        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8851        ___E: ::fidl_next::Encoder,
8852    {
8853        #[inline]
8854        fn encode(
8855            self,
8856            encoder_: &mut ___E,
8857            out_: &mut ::core::mem::MaybeUninit<
8858                crate::wire::InputDeviceDispatchReportRequest<'static>,
8859            >,
8860            _: (),
8861        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8862            ::fidl_next::munge! {
8863                let crate::wire::InputDeviceDispatchReportRequest {
8864                    report,
8865
8866                } = out_;
8867            }
8868
8869            ::fidl_next::Encode::encode(&self.report, encoder_, report, ())?;
8870
8871            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(report.as_mut_ptr()) };
8872
8873            Ok(())
8874        }
8875    }
8876
8877    unsafe impl<___E>
8878        ::fidl_next::EncodeOption<
8879            ::fidl_next::wire::Box<'static, crate::wire::InputDeviceDispatchReportRequest<'static>>,
8880            ___E,
8881        > for InputDeviceDispatchReportRequest
8882    where
8883        ___E: ::fidl_next::Encoder + ?Sized,
8884        InputDeviceDispatchReportRequest:
8885            ::fidl_next::Encode<crate::wire::InputDeviceDispatchReportRequest<'static>, ___E>,
8886    {
8887        #[inline]
8888        fn encode_option(
8889            this: ::core::option::Option<Self>,
8890            encoder: &mut ___E,
8891            out: &mut ::core::mem::MaybeUninit<
8892                ::fidl_next::wire::Box<
8893                    'static,
8894                    crate::wire::InputDeviceDispatchReportRequest<'static>,
8895                >,
8896            >,
8897            _: (),
8898        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8899            if let Some(inner) = this {
8900                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8901                ::fidl_next::wire::Box::encode_present(out);
8902            } else {
8903                ::fidl_next::wire::Box::encode_absent(out);
8904            }
8905
8906            Ok(())
8907        }
8908    }
8909
8910    unsafe impl<'a, ___E>
8911        ::fidl_next::EncodeOption<
8912            ::fidl_next::wire::Box<'static, crate::wire::InputDeviceDispatchReportRequest<'static>>,
8913            ___E,
8914        > for &'a InputDeviceDispatchReportRequest
8915    where
8916        ___E: ::fidl_next::Encoder + ?Sized,
8917        &'a InputDeviceDispatchReportRequest:
8918            ::fidl_next::Encode<crate::wire::InputDeviceDispatchReportRequest<'static>, ___E>,
8919    {
8920        #[inline]
8921        fn encode_option(
8922            this: ::core::option::Option<Self>,
8923            encoder: &mut ___E,
8924            out: &mut ::core::mem::MaybeUninit<
8925                ::fidl_next::wire::Box<
8926                    'static,
8927                    crate::wire::InputDeviceDispatchReportRequest<'static>,
8928                >,
8929            >,
8930            _: (),
8931        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8932            if let Some(inner) = this {
8933                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8934                ::fidl_next::wire::Box::encode_present(out);
8935            } else {
8936                ::fidl_next::wire::Box::encode_absent(out);
8937            }
8938
8939            Ok(())
8940        }
8941    }
8942
8943    impl<'de> ::fidl_next::FromWire<crate::wire::InputDeviceDispatchReportRequest<'de>>
8944        for InputDeviceDispatchReportRequest
8945    {
8946        #[inline]
8947        fn from_wire(wire: crate::wire::InputDeviceDispatchReportRequest<'de>) -> Self {
8948            Self { report: ::fidl_next::FromWire::from_wire(wire.report) }
8949        }
8950    }
8951
8952    impl<'de> ::fidl_next::FromWireRef<crate::wire::InputDeviceDispatchReportRequest<'de>>
8953        for InputDeviceDispatchReportRequest
8954    {
8955        #[inline]
8956        fn from_wire_ref(wire: &crate::wire::InputDeviceDispatchReportRequest<'de>) -> Self {
8957            Self { report: ::fidl_next::FromWireRef::from_wire_ref(&wire.report) }
8958        }
8959    }
8960
8961    #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
8962    pub enum InputEvent {
8963        Pointer(crate::natural::PointerEvent),
8964
8965        Keyboard(crate::natural::KeyboardEvent),
8966
8967        Focus(crate::natural::FocusEvent),
8968    }
8969
8970    unsafe impl<___E> ::fidl_next::Encode<crate::wire::InputEvent<'static>, ___E> for InputEvent
8971    where
8972        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8973        ___E: ::fidl_next::Encoder,
8974    {
8975        #[inline]
8976        fn encode(
8977            self,
8978            encoder: &mut ___E,
8979            out: &mut ::core::mem::MaybeUninit<crate::wire::InputEvent<'static>>,
8980            _: (),
8981        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8982            ::fidl_next::munge!(let crate::wire::InputEvent { raw, _phantom: _ } = out);
8983
8984            match self {
8985                Self::Pointer(value) => ::fidl_next::wire::Union::encode_as::<
8986                    ___E,
8987                    crate::wire::PointerEvent,
8988                >(value, 1, encoder, raw, ())?,
8989
8990                Self::Keyboard(value) => ::fidl_next::wire::Union::encode_as::<
8991                    ___E,
8992                    crate::wire::KeyboardEvent,
8993                >(value, 2, encoder, raw, ())?,
8994
8995                Self::Focus(value) => ::fidl_next::wire::Union::encode_as::<
8996                    ___E,
8997                    crate::wire::FocusEvent,
8998                >(value, 3, encoder, raw, ())?,
8999            }
9000
9001            Ok(())
9002        }
9003    }
9004
9005    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::InputEvent<'static>, ___E> for &'a InputEvent
9006    where
9007        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9008        ___E: ::fidl_next::Encoder,
9009    {
9010        #[inline]
9011        fn encode(
9012            self,
9013            encoder: &mut ___E,
9014            out: &mut ::core::mem::MaybeUninit<crate::wire::InputEvent<'static>>,
9015            _: (),
9016        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9017            ::fidl_next::munge!(let crate::wire::InputEvent { raw, _phantom: _ } = out);
9018
9019            match self {
9020                InputEvent::Pointer(value) => ::fidl_next::wire::Union::encode_as::<
9021                    ___E,
9022                    crate::wire::PointerEvent,
9023                >(value, 1, encoder, raw, ())?,
9024
9025                InputEvent::Keyboard(value) => ::fidl_next::wire::Union::encode_as::<
9026                    ___E,
9027                    crate::wire::KeyboardEvent,
9028                >(value, 2, encoder, raw, ())?,
9029
9030                InputEvent::Focus(value) => ::fidl_next::wire::Union::encode_as::<
9031                    ___E,
9032                    crate::wire::FocusEvent,
9033                >(value, 3, encoder, raw, ())?,
9034            }
9035
9036            Ok(())
9037        }
9038    }
9039
9040    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::InputEvent<'static>, ___E>
9041        for InputEvent
9042    where
9043        ___E: ?Sized,
9044        InputEvent: ::fidl_next::Encode<crate::wire::InputEvent<'static>, ___E>,
9045    {
9046        #[inline]
9047        fn encode_option(
9048            this: ::core::option::Option<Self>,
9049            encoder: &mut ___E,
9050            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::InputEvent<'static>>,
9051            _: (),
9052        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9053            ::fidl_next::munge!(let crate::wire_optional::InputEvent { raw, _phantom: _ } = &mut *out);
9054
9055            if let Some(inner) = this {
9056                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
9057                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
9058            } else {
9059                ::fidl_next::wire::Union::encode_absent(raw);
9060            }
9061
9062            Ok(())
9063        }
9064    }
9065
9066    unsafe impl<'a, ___E> ::fidl_next::EncodeOption<crate::wire_optional::InputEvent<'static>, ___E>
9067        for &'a InputEvent
9068    where
9069        ___E: ?Sized,
9070        &'a InputEvent: ::fidl_next::Encode<crate::wire::InputEvent<'static>, ___E>,
9071    {
9072        #[inline]
9073        fn encode_option(
9074            this: ::core::option::Option<Self>,
9075            encoder: &mut ___E,
9076            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::InputEvent<'static>>,
9077            _: (),
9078        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9079            ::fidl_next::munge!(let crate::wire_optional::InputEvent { raw, _phantom: _ } = &mut *out);
9080
9081            if let Some(inner) = this {
9082                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
9083                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
9084            } else {
9085                ::fidl_next::wire::Union::encode_absent(raw);
9086            }
9087
9088            Ok(())
9089        }
9090    }
9091
9092    impl<'de> ::fidl_next::FromWire<crate::wire::InputEvent<'de>> for InputEvent {
9093        #[inline]
9094        fn from_wire(wire: crate::wire::InputEvent<'de>) -> Self {
9095            let wire = ::core::mem::ManuallyDrop::new(wire);
9096            match wire.raw.ordinal() {
9097                1 => Self::Pointer(::fidl_next::FromWire::from_wire(unsafe {
9098                    wire.raw.get().read_unchecked::<crate::wire::PointerEvent>()
9099                })),
9100
9101                2 => Self::Keyboard(::fidl_next::FromWire::from_wire(unsafe {
9102                    wire.raw.get().read_unchecked::<crate::wire::KeyboardEvent>()
9103                })),
9104
9105                3 => Self::Focus(::fidl_next::FromWire::from_wire(unsafe {
9106                    wire.raw.get().read_unchecked::<crate::wire::FocusEvent>()
9107                })),
9108
9109                _ => unsafe { ::core::hint::unreachable_unchecked() },
9110            }
9111        }
9112    }
9113
9114    impl<'de> ::fidl_next::FromWireRef<crate::wire::InputEvent<'de>> for InputEvent {
9115        #[inline]
9116        fn from_wire_ref(wire: &crate::wire::InputEvent<'de>) -> Self {
9117            match wire.raw.ordinal() {
9118                1 => Self::Pointer(::fidl_next::FromWireRef::from_wire_ref(unsafe {
9119                    wire.raw.get().deref_unchecked::<crate::wire::PointerEvent>()
9120                })),
9121
9122                2 => Self::Keyboard(::fidl_next::FromWireRef::from_wire_ref(unsafe {
9123                    wire.raw.get().deref_unchecked::<crate::wire::KeyboardEvent>()
9124                })),
9125
9126                3 => Self::Focus(::fidl_next::FromWireRef::from_wire_ref(unsafe {
9127                    wire.raw.get().deref_unchecked::<crate::wire::FocusEvent>()
9128                })),
9129
9130                _ => unsafe { ::core::hint::unreachable_unchecked() },
9131            }
9132        }
9133    }
9134
9135    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::InputEvent<'de>> for InputEvent {
9136        #[inline]
9137        fn from_wire_option(
9138            wire: crate::wire_optional::InputEvent<'de>,
9139        ) -> ::core::option::Option<Self> {
9140            if let Some(inner) = wire.into_option() {
9141                Some(::fidl_next::FromWire::from_wire(inner))
9142            } else {
9143                None
9144            }
9145        }
9146    }
9147
9148    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::InputEvent<'de>> for Box<InputEvent> {
9149        #[inline]
9150        fn from_wire_option(
9151            wire: crate::wire_optional::InputEvent<'de>,
9152        ) -> ::core::option::Option<Self> {
9153            <
9154            InputEvent as ::fidl_next::FromWireOption<crate::wire_optional::InputEvent<'de>>
9155        >::from_wire_option(wire).map(Box::new)
9156        }
9157    }
9158
9159    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::InputEvent<'de>>
9160        for Box<InputEvent>
9161    {
9162        #[inline]
9163        fn from_wire_option_ref(
9164            wire: &crate::wire_optional::InputEvent<'de>,
9165        ) -> ::core::option::Option<Self> {
9166            if let Some(inner) = wire.as_ref() {
9167                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
9168            } else {
9169                None
9170            }
9171        }
9172    }
9173
9174    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9175    pub struct InputMethodEditorSetStateRequest {
9176        pub state: crate::natural::TextInputState,
9177    }
9178
9179    unsafe impl<___E>
9180        ::fidl_next::Encode<crate::wire::InputMethodEditorSetStateRequest<'static>, ___E>
9181        for InputMethodEditorSetStateRequest
9182    where
9183        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9184        ___E: ::fidl_next::Encoder,
9185    {
9186        #[inline]
9187        fn encode(
9188            self,
9189            encoder_: &mut ___E,
9190            out_: &mut ::core::mem::MaybeUninit<
9191                crate::wire::InputMethodEditorSetStateRequest<'static>,
9192            >,
9193            _: (),
9194        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9195            ::fidl_next::munge! {
9196                let crate::wire::InputMethodEditorSetStateRequest {
9197                    state,
9198
9199                } = out_;
9200            }
9201
9202            ::fidl_next::Encode::encode(self.state, encoder_, state, ())?;
9203
9204            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(state.as_mut_ptr()) };
9205
9206            Ok(())
9207        }
9208    }
9209
9210    unsafe impl<'a, ___E>
9211        ::fidl_next::Encode<crate::wire::InputMethodEditorSetStateRequest<'static>, ___E>
9212        for &'a InputMethodEditorSetStateRequest
9213    where
9214        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9215        ___E: ::fidl_next::Encoder,
9216    {
9217        #[inline]
9218        fn encode(
9219            self,
9220            encoder_: &mut ___E,
9221            out_: &mut ::core::mem::MaybeUninit<
9222                crate::wire::InputMethodEditorSetStateRequest<'static>,
9223            >,
9224            _: (),
9225        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9226            ::fidl_next::munge! {
9227                let crate::wire::InputMethodEditorSetStateRequest {
9228                    state,
9229
9230                } = out_;
9231            }
9232
9233            ::fidl_next::Encode::encode(&self.state, encoder_, state, ())?;
9234
9235            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(state.as_mut_ptr()) };
9236
9237            Ok(())
9238        }
9239    }
9240
9241    unsafe impl<___E>
9242        ::fidl_next::EncodeOption<
9243            ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorSetStateRequest<'static>>,
9244            ___E,
9245        > for InputMethodEditorSetStateRequest
9246    where
9247        ___E: ::fidl_next::Encoder + ?Sized,
9248        InputMethodEditorSetStateRequest:
9249            ::fidl_next::Encode<crate::wire::InputMethodEditorSetStateRequest<'static>, ___E>,
9250    {
9251        #[inline]
9252        fn encode_option(
9253            this: ::core::option::Option<Self>,
9254            encoder: &mut ___E,
9255            out: &mut ::core::mem::MaybeUninit<
9256                ::fidl_next::wire::Box<
9257                    'static,
9258                    crate::wire::InputMethodEditorSetStateRequest<'static>,
9259                >,
9260            >,
9261            _: (),
9262        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9263            if let Some(inner) = this {
9264                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9265                ::fidl_next::wire::Box::encode_present(out);
9266            } else {
9267                ::fidl_next::wire::Box::encode_absent(out);
9268            }
9269
9270            Ok(())
9271        }
9272    }
9273
9274    unsafe impl<'a, ___E>
9275        ::fidl_next::EncodeOption<
9276            ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorSetStateRequest<'static>>,
9277            ___E,
9278        > for &'a InputMethodEditorSetStateRequest
9279    where
9280        ___E: ::fidl_next::Encoder + ?Sized,
9281        &'a InputMethodEditorSetStateRequest:
9282            ::fidl_next::Encode<crate::wire::InputMethodEditorSetStateRequest<'static>, ___E>,
9283    {
9284        #[inline]
9285        fn encode_option(
9286            this: ::core::option::Option<Self>,
9287            encoder: &mut ___E,
9288            out: &mut ::core::mem::MaybeUninit<
9289                ::fidl_next::wire::Box<
9290                    'static,
9291                    crate::wire::InputMethodEditorSetStateRequest<'static>,
9292                >,
9293            >,
9294            _: (),
9295        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9296            if let Some(inner) = this {
9297                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9298                ::fidl_next::wire::Box::encode_present(out);
9299            } else {
9300                ::fidl_next::wire::Box::encode_absent(out);
9301            }
9302
9303            Ok(())
9304        }
9305    }
9306
9307    impl<'de> ::fidl_next::FromWire<crate::wire::InputMethodEditorSetStateRequest<'de>>
9308        for InputMethodEditorSetStateRequest
9309    {
9310        #[inline]
9311        fn from_wire(wire: crate::wire::InputMethodEditorSetStateRequest<'de>) -> Self {
9312            Self { state: ::fidl_next::FromWire::from_wire(wire.state) }
9313        }
9314    }
9315
9316    impl<'de> ::fidl_next::FromWireRef<crate::wire::InputMethodEditorSetStateRequest<'de>>
9317        for InputMethodEditorSetStateRequest
9318    {
9319        #[inline]
9320        fn from_wire_ref(wire: &crate::wire::InputMethodEditorSetStateRequest<'de>) -> Self {
9321            Self { state: ::fidl_next::FromWireRef::from_wire_ref(&wire.state) }
9322        }
9323    }
9324
9325    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9326    #[repr(C)]
9327    pub struct InputMethodEditorSetKeyboardTypeRequest {
9328        pub keyboard_type: crate::natural::KeyboardType,
9329    }
9330
9331    unsafe impl<___E>
9332        ::fidl_next::Encode<crate::wire::InputMethodEditorSetKeyboardTypeRequest, ___E>
9333        for InputMethodEditorSetKeyboardTypeRequest
9334    where
9335        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9336    {
9337        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9338            Self,
9339            crate::wire::InputMethodEditorSetKeyboardTypeRequest,
9340        > = unsafe {
9341            ::fidl_next::CopyOptimization::enable_if(
9342                true && <crate::natural::KeyboardType as ::fidl_next::Encode<
9343                    crate::wire::KeyboardType,
9344                    ___E,
9345                >>::COPY_OPTIMIZATION
9346                    .is_enabled(),
9347            )
9348        };
9349
9350        #[inline]
9351        fn encode(
9352            self,
9353            encoder_: &mut ___E,
9354            out_: &mut ::core::mem::MaybeUninit<
9355                crate::wire::InputMethodEditorSetKeyboardTypeRequest,
9356            >,
9357            _: (),
9358        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9359            ::fidl_next::munge! {
9360                let crate::wire::InputMethodEditorSetKeyboardTypeRequest {
9361                    keyboard_type,
9362
9363                } = out_;
9364            }
9365
9366            ::fidl_next::Encode::encode(self.keyboard_type, encoder_, keyboard_type, ())?;
9367
9368            let mut _field =
9369                unsafe { ::fidl_next::Slot::new_unchecked(keyboard_type.as_mut_ptr()) };
9370
9371            Ok(())
9372        }
9373    }
9374
9375    unsafe impl<'a, ___E>
9376        ::fidl_next::Encode<crate::wire::InputMethodEditorSetKeyboardTypeRequest, ___E>
9377        for &'a InputMethodEditorSetKeyboardTypeRequest
9378    where
9379        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9380    {
9381        #[inline]
9382        fn encode(
9383            self,
9384            encoder_: &mut ___E,
9385            out_: &mut ::core::mem::MaybeUninit<
9386                crate::wire::InputMethodEditorSetKeyboardTypeRequest,
9387            >,
9388            _: (),
9389        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9390            ::fidl_next::munge! {
9391                let crate::wire::InputMethodEditorSetKeyboardTypeRequest {
9392                    keyboard_type,
9393
9394                } = out_;
9395            }
9396
9397            ::fidl_next::Encode::encode(&self.keyboard_type, encoder_, keyboard_type, ())?;
9398
9399            let mut _field =
9400                unsafe { ::fidl_next::Slot::new_unchecked(keyboard_type.as_mut_ptr()) };
9401
9402            Ok(())
9403        }
9404    }
9405
9406    unsafe impl<___E>
9407        ::fidl_next::EncodeOption<
9408            ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorSetKeyboardTypeRequest>,
9409            ___E,
9410        > for InputMethodEditorSetKeyboardTypeRequest
9411    where
9412        ___E: ::fidl_next::Encoder + ?Sized,
9413        InputMethodEditorSetKeyboardTypeRequest:
9414            ::fidl_next::Encode<crate::wire::InputMethodEditorSetKeyboardTypeRequest, ___E>,
9415    {
9416        #[inline]
9417        fn encode_option(
9418            this: ::core::option::Option<Self>,
9419            encoder: &mut ___E,
9420            out: &mut ::core::mem::MaybeUninit<
9421                ::fidl_next::wire::Box<
9422                    'static,
9423                    crate::wire::InputMethodEditorSetKeyboardTypeRequest,
9424                >,
9425            >,
9426            _: (),
9427        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9428            if let Some(inner) = this {
9429                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9430                ::fidl_next::wire::Box::encode_present(out);
9431            } else {
9432                ::fidl_next::wire::Box::encode_absent(out);
9433            }
9434
9435            Ok(())
9436        }
9437    }
9438
9439    unsafe impl<'a, ___E>
9440        ::fidl_next::EncodeOption<
9441            ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorSetKeyboardTypeRequest>,
9442            ___E,
9443        > for &'a InputMethodEditorSetKeyboardTypeRequest
9444    where
9445        ___E: ::fidl_next::Encoder + ?Sized,
9446        &'a InputMethodEditorSetKeyboardTypeRequest:
9447            ::fidl_next::Encode<crate::wire::InputMethodEditorSetKeyboardTypeRequest, ___E>,
9448    {
9449        #[inline]
9450        fn encode_option(
9451            this: ::core::option::Option<Self>,
9452            encoder: &mut ___E,
9453            out: &mut ::core::mem::MaybeUninit<
9454                ::fidl_next::wire::Box<
9455                    'static,
9456                    crate::wire::InputMethodEditorSetKeyboardTypeRequest,
9457                >,
9458            >,
9459            _: (),
9460        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9461            if let Some(inner) = this {
9462                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9463                ::fidl_next::wire::Box::encode_present(out);
9464            } else {
9465                ::fidl_next::wire::Box::encode_absent(out);
9466            }
9467
9468            Ok(())
9469        }
9470    }
9471
9472    impl ::fidl_next::FromWire<crate::wire::InputMethodEditorSetKeyboardTypeRequest>
9473        for InputMethodEditorSetKeyboardTypeRequest
9474    {
9475        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9476            crate::wire::InputMethodEditorSetKeyboardTypeRequest,
9477            Self,
9478        > = unsafe {
9479            ::fidl_next::CopyOptimization::enable_if(
9480                true && <crate::natural::KeyboardType as ::fidl_next::FromWire<
9481                    crate::wire::KeyboardType,
9482                >>::COPY_OPTIMIZATION
9483                    .is_enabled(),
9484            )
9485        };
9486
9487        #[inline]
9488        fn from_wire(wire: crate::wire::InputMethodEditorSetKeyboardTypeRequest) -> Self {
9489            Self { keyboard_type: ::fidl_next::FromWire::from_wire(wire.keyboard_type) }
9490        }
9491    }
9492
9493    impl ::fidl_next::FromWireRef<crate::wire::InputMethodEditorSetKeyboardTypeRequest>
9494        for InputMethodEditorSetKeyboardTypeRequest
9495    {
9496        #[inline]
9497        fn from_wire_ref(wire: &crate::wire::InputMethodEditorSetKeyboardTypeRequest) -> Self {
9498            Self { keyboard_type: ::fidl_next::FromWireRef::from_wire_ref(&wire.keyboard_type) }
9499        }
9500    }
9501
9502    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9503    #[repr(C)]
9504    pub struct InputMethodEditorDispatchKey3Response {
9505        pub handled: bool,
9506    }
9507
9508    unsafe impl<___E> ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Response, ___E>
9509        for InputMethodEditorDispatchKey3Response
9510    where
9511        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9512    {
9513        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9514            Self,
9515            crate::wire::InputMethodEditorDispatchKey3Response,
9516        > = unsafe {
9517            ::fidl_next::CopyOptimization::enable_if(
9518                true && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled(),
9519            )
9520        };
9521
9522        #[inline]
9523        fn encode(
9524            self,
9525            encoder_: &mut ___E,
9526            out_: &mut ::core::mem::MaybeUninit<crate::wire::InputMethodEditorDispatchKey3Response>,
9527            _: (),
9528        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9529            ::fidl_next::munge! {
9530                let crate::wire::InputMethodEditorDispatchKey3Response {
9531                    handled,
9532
9533                } = out_;
9534            }
9535
9536            ::fidl_next::Encode::encode(self.handled, encoder_, handled, ())?;
9537
9538            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handled.as_mut_ptr()) };
9539
9540            Ok(())
9541        }
9542    }
9543
9544    unsafe impl<'a, ___E>
9545        ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Response, ___E>
9546        for &'a InputMethodEditorDispatchKey3Response
9547    where
9548        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9549    {
9550        #[inline]
9551        fn encode(
9552            self,
9553            encoder_: &mut ___E,
9554            out_: &mut ::core::mem::MaybeUninit<crate::wire::InputMethodEditorDispatchKey3Response>,
9555            _: (),
9556        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9557            ::fidl_next::munge! {
9558                let crate::wire::InputMethodEditorDispatchKey3Response {
9559                    handled,
9560
9561                } = out_;
9562            }
9563
9564            ::fidl_next::Encode::encode(&self.handled, encoder_, handled, ())?;
9565
9566            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(handled.as_mut_ptr()) };
9567
9568            Ok(())
9569        }
9570    }
9571
9572    unsafe impl<___E>
9573        ::fidl_next::EncodeOption<
9574            ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorDispatchKey3Response>,
9575            ___E,
9576        > for InputMethodEditorDispatchKey3Response
9577    where
9578        ___E: ::fidl_next::Encoder + ?Sized,
9579        InputMethodEditorDispatchKey3Response:
9580            ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Response, ___E>,
9581    {
9582        #[inline]
9583        fn encode_option(
9584            this: ::core::option::Option<Self>,
9585            encoder: &mut ___E,
9586            out: &mut ::core::mem::MaybeUninit<
9587                ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorDispatchKey3Response>,
9588            >,
9589            _: (),
9590        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9591            if let Some(inner) = this {
9592                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9593                ::fidl_next::wire::Box::encode_present(out);
9594            } else {
9595                ::fidl_next::wire::Box::encode_absent(out);
9596            }
9597
9598            Ok(())
9599        }
9600    }
9601
9602    unsafe impl<'a, ___E>
9603        ::fidl_next::EncodeOption<
9604            ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorDispatchKey3Response>,
9605            ___E,
9606        > for &'a InputMethodEditorDispatchKey3Response
9607    where
9608        ___E: ::fidl_next::Encoder + ?Sized,
9609        &'a InputMethodEditorDispatchKey3Response:
9610            ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Response, ___E>,
9611    {
9612        #[inline]
9613        fn encode_option(
9614            this: ::core::option::Option<Self>,
9615            encoder: &mut ___E,
9616            out: &mut ::core::mem::MaybeUninit<
9617                ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorDispatchKey3Response>,
9618            >,
9619            _: (),
9620        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9621            if let Some(inner) = this {
9622                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9623                ::fidl_next::wire::Box::encode_present(out);
9624            } else {
9625                ::fidl_next::wire::Box::encode_absent(out);
9626            }
9627
9628            Ok(())
9629        }
9630    }
9631
9632    impl ::fidl_next::FromWire<crate::wire::InputMethodEditorDispatchKey3Response>
9633        for InputMethodEditorDispatchKey3Response
9634    {
9635        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9636            crate::wire::InputMethodEditorDispatchKey3Response,
9637            Self,
9638        > = unsafe {
9639            ::fidl_next::CopyOptimization::enable_if(
9640                true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
9641            )
9642        };
9643
9644        #[inline]
9645        fn from_wire(wire: crate::wire::InputMethodEditorDispatchKey3Response) -> Self {
9646            Self { handled: ::fidl_next::FromWire::from_wire(wire.handled) }
9647        }
9648    }
9649
9650    impl ::fidl_next::FromWireRef<crate::wire::InputMethodEditorDispatchKey3Response>
9651        for InputMethodEditorDispatchKey3Response
9652    {
9653        #[inline]
9654        fn from_wire_ref(wire: &crate::wire::InputMethodEditorDispatchKey3Response) -> Self {
9655            Self { handled: ::fidl_next::FromWireRef::from_wire_ref(&wire.handled) }
9656        }
9657    }
9658
9659    #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
9660    pub struct InputMethodEditorInjectInputRequest {
9661        pub event: crate::natural::InputEvent,
9662    }
9663
9664    unsafe impl<___E>
9665        ::fidl_next::Encode<crate::wire::InputMethodEditorInjectInputRequest<'static>, ___E>
9666        for InputMethodEditorInjectInputRequest
9667    where
9668        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9669        ___E: ::fidl_next::Encoder,
9670    {
9671        #[inline]
9672        fn encode(
9673            self,
9674            encoder_: &mut ___E,
9675            out_: &mut ::core::mem::MaybeUninit<
9676                crate::wire::InputMethodEditorInjectInputRequest<'static>,
9677            >,
9678            _: (),
9679        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9680            ::fidl_next::munge! {
9681                let crate::wire::InputMethodEditorInjectInputRequest {
9682                    event,
9683
9684                } = out_;
9685            }
9686
9687            ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
9688
9689            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
9690
9691            Ok(())
9692        }
9693    }
9694
9695    unsafe impl<'a, ___E>
9696        ::fidl_next::Encode<crate::wire::InputMethodEditorInjectInputRequest<'static>, ___E>
9697        for &'a InputMethodEditorInjectInputRequest
9698    where
9699        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9700        ___E: ::fidl_next::Encoder,
9701    {
9702        #[inline]
9703        fn encode(
9704            self,
9705            encoder_: &mut ___E,
9706            out_: &mut ::core::mem::MaybeUninit<
9707                crate::wire::InputMethodEditorInjectInputRequest<'static>,
9708            >,
9709            _: (),
9710        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9711            ::fidl_next::munge! {
9712                let crate::wire::InputMethodEditorInjectInputRequest {
9713                    event,
9714
9715                } = out_;
9716            }
9717
9718            ::fidl_next::Encode::encode(&self.event, encoder_, event, ())?;
9719
9720            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
9721
9722            Ok(())
9723        }
9724    }
9725
9726    unsafe impl<___E>
9727        ::fidl_next::EncodeOption<
9728            ::fidl_next::wire::Box<
9729                'static,
9730                crate::wire::InputMethodEditorInjectInputRequest<'static>,
9731            >,
9732            ___E,
9733        > for InputMethodEditorInjectInputRequest
9734    where
9735        ___E: ::fidl_next::Encoder + ?Sized,
9736        InputMethodEditorInjectInputRequest:
9737            ::fidl_next::Encode<crate::wire::InputMethodEditorInjectInputRequest<'static>, ___E>,
9738    {
9739        #[inline]
9740        fn encode_option(
9741            this: ::core::option::Option<Self>,
9742            encoder: &mut ___E,
9743            out: &mut ::core::mem::MaybeUninit<
9744                ::fidl_next::wire::Box<
9745                    'static,
9746                    crate::wire::InputMethodEditorInjectInputRequest<'static>,
9747                >,
9748            >,
9749            _: (),
9750        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9751            if let Some(inner) = this {
9752                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9753                ::fidl_next::wire::Box::encode_present(out);
9754            } else {
9755                ::fidl_next::wire::Box::encode_absent(out);
9756            }
9757
9758            Ok(())
9759        }
9760    }
9761
9762    unsafe impl<'a, ___E>
9763        ::fidl_next::EncodeOption<
9764            ::fidl_next::wire::Box<
9765                'static,
9766                crate::wire::InputMethodEditorInjectInputRequest<'static>,
9767            >,
9768            ___E,
9769        > for &'a InputMethodEditorInjectInputRequest
9770    where
9771        ___E: ::fidl_next::Encoder + ?Sized,
9772        &'a InputMethodEditorInjectInputRequest:
9773            ::fidl_next::Encode<crate::wire::InputMethodEditorInjectInputRequest<'static>, ___E>,
9774    {
9775        #[inline]
9776        fn encode_option(
9777            this: ::core::option::Option<Self>,
9778            encoder: &mut ___E,
9779            out: &mut ::core::mem::MaybeUninit<
9780                ::fidl_next::wire::Box<
9781                    'static,
9782                    crate::wire::InputMethodEditorInjectInputRequest<'static>,
9783                >,
9784            >,
9785            _: (),
9786        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9787            if let Some(inner) = this {
9788                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9789                ::fidl_next::wire::Box::encode_present(out);
9790            } else {
9791                ::fidl_next::wire::Box::encode_absent(out);
9792            }
9793
9794            Ok(())
9795        }
9796    }
9797
9798    impl<'de> ::fidl_next::FromWire<crate::wire::InputMethodEditorInjectInputRequest<'de>>
9799        for InputMethodEditorInjectInputRequest
9800    {
9801        #[inline]
9802        fn from_wire(wire: crate::wire::InputMethodEditorInjectInputRequest<'de>) -> Self {
9803            Self { event: ::fidl_next::FromWire::from_wire(wire.event) }
9804        }
9805    }
9806
9807    impl<'de> ::fidl_next::FromWireRef<crate::wire::InputMethodEditorInjectInputRequest<'de>>
9808        for InputMethodEditorInjectInputRequest
9809    {
9810        #[inline]
9811        fn from_wire_ref(wire: &crate::wire::InputMethodEditorInjectInputRequest<'de>) -> Self {
9812            Self { event: ::fidl_next::FromWireRef::from_wire_ref(&wire.event) }
9813        }
9814    }
9815
9816    #[derive(Debug, Clone, PartialEq)]
9817    pub struct InputMethodEditorDispatchKey3Request {
9818        pub event: ::fidl_next_common_fuchsia_ui_input3::natural::KeyEvent,
9819    }
9820
9821    unsafe impl<___E>
9822        ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Request<'static>, ___E>
9823        for InputMethodEditorDispatchKey3Request
9824    where
9825        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9826        ___E: ::fidl_next::Encoder,
9827    {
9828        #[inline]
9829        fn encode(
9830            self,
9831            encoder_: &mut ___E,
9832            out_: &mut ::core::mem::MaybeUninit<
9833                crate::wire::InputMethodEditorDispatchKey3Request<'static>,
9834            >,
9835            _: (),
9836        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9837            ::fidl_next::munge! {
9838                let crate::wire::InputMethodEditorDispatchKey3Request {
9839                    event,
9840
9841                } = out_;
9842            }
9843
9844            ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
9845
9846            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
9847
9848            Ok(())
9849        }
9850    }
9851
9852    unsafe impl<'a, ___E>
9853        ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Request<'static>, ___E>
9854        for &'a InputMethodEditorDispatchKey3Request
9855    where
9856        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9857        ___E: ::fidl_next::Encoder,
9858    {
9859        #[inline]
9860        fn encode(
9861            self,
9862            encoder_: &mut ___E,
9863            out_: &mut ::core::mem::MaybeUninit<
9864                crate::wire::InputMethodEditorDispatchKey3Request<'static>,
9865            >,
9866            _: (),
9867        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9868            ::fidl_next::munge! {
9869                let crate::wire::InputMethodEditorDispatchKey3Request {
9870                    event,
9871
9872                } = out_;
9873            }
9874
9875            ::fidl_next::Encode::encode(&self.event, encoder_, event, ())?;
9876
9877            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
9878
9879            Ok(())
9880        }
9881    }
9882
9883    unsafe impl<___E>
9884        ::fidl_next::EncodeOption<
9885            ::fidl_next::wire::Box<
9886                'static,
9887                crate::wire::InputMethodEditorDispatchKey3Request<'static>,
9888            >,
9889            ___E,
9890        > for InputMethodEditorDispatchKey3Request
9891    where
9892        ___E: ::fidl_next::Encoder + ?Sized,
9893        InputMethodEditorDispatchKey3Request:
9894            ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Request<'static>, ___E>,
9895    {
9896        #[inline]
9897        fn encode_option(
9898            this: ::core::option::Option<Self>,
9899            encoder: &mut ___E,
9900            out: &mut ::core::mem::MaybeUninit<
9901                ::fidl_next::wire::Box<
9902                    'static,
9903                    crate::wire::InputMethodEditorDispatchKey3Request<'static>,
9904                >,
9905            >,
9906            _: (),
9907        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9908            if let Some(inner) = this {
9909                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9910                ::fidl_next::wire::Box::encode_present(out);
9911            } else {
9912                ::fidl_next::wire::Box::encode_absent(out);
9913            }
9914
9915            Ok(())
9916        }
9917    }
9918
9919    unsafe impl<'a, ___E>
9920        ::fidl_next::EncodeOption<
9921            ::fidl_next::wire::Box<
9922                'static,
9923                crate::wire::InputMethodEditorDispatchKey3Request<'static>,
9924            >,
9925            ___E,
9926        > for &'a InputMethodEditorDispatchKey3Request
9927    where
9928        ___E: ::fidl_next::Encoder + ?Sized,
9929        &'a InputMethodEditorDispatchKey3Request:
9930            ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Request<'static>, ___E>,
9931    {
9932        #[inline]
9933        fn encode_option(
9934            this: ::core::option::Option<Self>,
9935            encoder: &mut ___E,
9936            out: &mut ::core::mem::MaybeUninit<
9937                ::fidl_next::wire::Box<
9938                    'static,
9939                    crate::wire::InputMethodEditorDispatchKey3Request<'static>,
9940                >,
9941            >,
9942            _: (),
9943        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9944            if let Some(inner) = this {
9945                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9946                ::fidl_next::wire::Box::encode_present(out);
9947            } else {
9948                ::fidl_next::wire::Box::encode_absent(out);
9949            }
9950
9951            Ok(())
9952        }
9953    }
9954
9955    impl<'de> ::fidl_next::FromWire<crate::wire::InputMethodEditorDispatchKey3Request<'de>>
9956        for InputMethodEditorDispatchKey3Request
9957    {
9958        #[inline]
9959        fn from_wire(wire: crate::wire::InputMethodEditorDispatchKey3Request<'de>) -> Self {
9960            Self { event: ::fidl_next::FromWire::from_wire(wire.event) }
9961        }
9962    }
9963
9964    impl<'de> ::fidl_next::FromWireRef<crate::wire::InputMethodEditorDispatchKey3Request<'de>>
9965        for InputMethodEditorDispatchKey3Request
9966    {
9967        #[inline]
9968        fn from_wire_ref(wire: &crate::wire::InputMethodEditorDispatchKey3Request<'de>) -> Self {
9969            Self { event: ::fidl_next::FromWireRef::from_wire_ref(&wire.event) }
9970        }
9971    }
9972
9973    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9974    #[repr(C)]
9975    pub struct InputMethodEditorClientOnActionRequest {
9976        pub action: crate::natural::InputMethodAction,
9977    }
9978
9979    unsafe impl<___E> ::fidl_next::Encode<crate::wire::InputMethodEditorClientOnActionRequest, ___E>
9980        for InputMethodEditorClientOnActionRequest
9981    where
9982        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9983    {
9984        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9985            Self,
9986            crate::wire::InputMethodEditorClientOnActionRequest,
9987        > = unsafe {
9988            ::fidl_next::CopyOptimization::enable_if(
9989                true && <crate::natural::InputMethodAction as ::fidl_next::Encode<
9990                    crate::wire::InputMethodAction,
9991                    ___E,
9992                >>::COPY_OPTIMIZATION
9993                    .is_enabled(),
9994            )
9995        };
9996
9997        #[inline]
9998        fn encode(
9999            self,
10000            encoder_: &mut ___E,
10001            out_: &mut ::core::mem::MaybeUninit<
10002                crate::wire::InputMethodEditorClientOnActionRequest,
10003            >,
10004            _: (),
10005        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10006            ::fidl_next::munge! {
10007                let crate::wire::InputMethodEditorClientOnActionRequest {
10008                    action,
10009
10010                } = out_;
10011            }
10012
10013            ::fidl_next::Encode::encode(self.action, encoder_, action, ())?;
10014
10015            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(action.as_mut_ptr()) };
10016
10017            Ok(())
10018        }
10019    }
10020
10021    unsafe impl<'a, ___E>
10022        ::fidl_next::Encode<crate::wire::InputMethodEditorClientOnActionRequest, ___E>
10023        for &'a InputMethodEditorClientOnActionRequest
10024    where
10025        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10026    {
10027        #[inline]
10028        fn encode(
10029            self,
10030            encoder_: &mut ___E,
10031            out_: &mut ::core::mem::MaybeUninit<
10032                crate::wire::InputMethodEditorClientOnActionRequest,
10033            >,
10034            _: (),
10035        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10036            ::fidl_next::munge! {
10037                let crate::wire::InputMethodEditorClientOnActionRequest {
10038                    action,
10039
10040                } = out_;
10041            }
10042
10043            ::fidl_next::Encode::encode(&self.action, encoder_, action, ())?;
10044
10045            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(action.as_mut_ptr()) };
10046
10047            Ok(())
10048        }
10049    }
10050
10051    unsafe impl<___E>
10052        ::fidl_next::EncodeOption<
10053            ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorClientOnActionRequest>,
10054            ___E,
10055        > for InputMethodEditorClientOnActionRequest
10056    where
10057        ___E: ::fidl_next::Encoder + ?Sized,
10058        InputMethodEditorClientOnActionRequest:
10059            ::fidl_next::Encode<crate::wire::InputMethodEditorClientOnActionRequest, ___E>,
10060    {
10061        #[inline]
10062        fn encode_option(
10063            this: ::core::option::Option<Self>,
10064            encoder: &mut ___E,
10065            out: &mut ::core::mem::MaybeUninit<
10066                ::fidl_next::wire::Box<
10067                    'static,
10068                    crate::wire::InputMethodEditorClientOnActionRequest,
10069                >,
10070            >,
10071            _: (),
10072        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10073            if let Some(inner) = this {
10074                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10075                ::fidl_next::wire::Box::encode_present(out);
10076            } else {
10077                ::fidl_next::wire::Box::encode_absent(out);
10078            }
10079
10080            Ok(())
10081        }
10082    }
10083
10084    unsafe impl<'a, ___E>
10085        ::fidl_next::EncodeOption<
10086            ::fidl_next::wire::Box<'static, crate::wire::InputMethodEditorClientOnActionRequest>,
10087            ___E,
10088        > for &'a InputMethodEditorClientOnActionRequest
10089    where
10090        ___E: ::fidl_next::Encoder + ?Sized,
10091        &'a InputMethodEditorClientOnActionRequest:
10092            ::fidl_next::Encode<crate::wire::InputMethodEditorClientOnActionRequest, ___E>,
10093    {
10094        #[inline]
10095        fn encode_option(
10096            this: ::core::option::Option<Self>,
10097            encoder: &mut ___E,
10098            out: &mut ::core::mem::MaybeUninit<
10099                ::fidl_next::wire::Box<
10100                    'static,
10101                    crate::wire::InputMethodEditorClientOnActionRequest,
10102                >,
10103            >,
10104            _: (),
10105        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10106            if let Some(inner) = this {
10107                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10108                ::fidl_next::wire::Box::encode_present(out);
10109            } else {
10110                ::fidl_next::wire::Box::encode_absent(out);
10111            }
10112
10113            Ok(())
10114        }
10115    }
10116
10117    impl ::fidl_next::FromWire<crate::wire::InputMethodEditorClientOnActionRequest>
10118        for InputMethodEditorClientOnActionRequest
10119    {
10120        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10121            crate::wire::InputMethodEditorClientOnActionRequest,
10122            Self,
10123        > = unsafe {
10124            ::fidl_next::CopyOptimization::enable_if(
10125                true && <crate::natural::InputMethodAction as ::fidl_next::FromWire<
10126                    crate::wire::InputMethodAction,
10127                >>::COPY_OPTIMIZATION
10128                    .is_enabled(),
10129            )
10130        };
10131
10132        #[inline]
10133        fn from_wire(wire: crate::wire::InputMethodEditorClientOnActionRequest) -> Self {
10134            Self { action: ::fidl_next::FromWire::from_wire(wire.action) }
10135        }
10136    }
10137
10138    impl ::fidl_next::FromWireRef<crate::wire::InputMethodEditorClientOnActionRequest>
10139        for InputMethodEditorClientOnActionRequest
10140    {
10141        #[inline]
10142        fn from_wire_ref(wire: &crate::wire::InputMethodEditorClientOnActionRequest) -> Self {
10143            Self { action: ::fidl_next::FromWireRef::from_wire_ref(&wire.action) }
10144        }
10145    }
10146
10147    #[derive(Debug, Clone, PartialEq, PartialOrd)]
10148    pub struct InputMethodEditorClientDidUpdateStateRequest {
10149        pub state: crate::natural::TextInputState,
10150
10151        pub event: ::core::option::Option<::std::boxed::Box<crate::natural::InputEvent>>,
10152    }
10153
10154    unsafe impl<___E>
10155        ::fidl_next::Encode<
10156            crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10157            ___E,
10158        > for InputMethodEditorClientDidUpdateStateRequest
10159    where
10160        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10161        ___E: ::fidl_next::Encoder,
10162    {
10163        #[inline]
10164        fn encode(
10165            self,
10166            encoder_: &mut ___E,
10167            out_: &mut ::core::mem::MaybeUninit<
10168                crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10169            >,
10170            _: (),
10171        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10172            ::fidl_next::munge! {
10173                let crate::wire::InputMethodEditorClientDidUpdateStateRequest {
10174                    state,
10175                    event,
10176
10177                } = out_;
10178            }
10179
10180            ::fidl_next::Encode::encode(self.state, encoder_, state, ())?;
10181
10182            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(state.as_mut_ptr()) };
10183
10184            ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
10185
10186            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
10187
10188            Ok(())
10189        }
10190    }
10191
10192    unsafe impl<'a, ___E>
10193        ::fidl_next::Encode<
10194            crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10195            ___E,
10196        > for &'a InputMethodEditorClientDidUpdateStateRequest
10197    where
10198        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10199        ___E: ::fidl_next::Encoder,
10200    {
10201        #[inline]
10202        fn encode(
10203            self,
10204            encoder_: &mut ___E,
10205            out_: &mut ::core::mem::MaybeUninit<
10206                crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10207            >,
10208            _: (),
10209        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10210            ::fidl_next::munge! {
10211                let crate::wire::InputMethodEditorClientDidUpdateStateRequest {
10212                    state,
10213                    event,
10214
10215                } = out_;
10216            }
10217
10218            ::fidl_next::Encode::encode(&self.state, encoder_, state, ())?;
10219
10220            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(state.as_mut_ptr()) };
10221
10222            ::fidl_next::Encode::encode(&self.event, encoder_, event, ())?;
10223
10224            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
10225
10226            Ok(())
10227        }
10228    }
10229
10230    unsafe impl<___E>
10231        ::fidl_next::EncodeOption<
10232            ::fidl_next::wire::Box<
10233                'static,
10234                crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10235            >,
10236            ___E,
10237        > for InputMethodEditorClientDidUpdateStateRequest
10238    where
10239        ___E: ::fidl_next::Encoder + ?Sized,
10240        InputMethodEditorClientDidUpdateStateRequest: ::fidl_next::Encode<
10241                crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10242                ___E,
10243            >,
10244    {
10245        #[inline]
10246        fn encode_option(
10247            this: ::core::option::Option<Self>,
10248            encoder: &mut ___E,
10249            out: &mut ::core::mem::MaybeUninit<
10250                ::fidl_next::wire::Box<
10251                    'static,
10252                    crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10253                >,
10254            >,
10255            _: (),
10256        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10257            if let Some(inner) = this {
10258                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10259                ::fidl_next::wire::Box::encode_present(out);
10260            } else {
10261                ::fidl_next::wire::Box::encode_absent(out);
10262            }
10263
10264            Ok(())
10265        }
10266    }
10267
10268    unsafe impl<'a, ___E>
10269        ::fidl_next::EncodeOption<
10270            ::fidl_next::wire::Box<
10271                'static,
10272                crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10273            >,
10274            ___E,
10275        > for &'a InputMethodEditorClientDidUpdateStateRequest
10276    where
10277        ___E: ::fidl_next::Encoder + ?Sized,
10278        &'a InputMethodEditorClientDidUpdateStateRequest: ::fidl_next::Encode<
10279                crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10280                ___E,
10281            >,
10282    {
10283        #[inline]
10284        fn encode_option(
10285            this: ::core::option::Option<Self>,
10286            encoder: &mut ___E,
10287            out: &mut ::core::mem::MaybeUninit<
10288                ::fidl_next::wire::Box<
10289                    'static,
10290                    crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
10291                >,
10292            >,
10293            _: (),
10294        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10295            if let Some(inner) = this {
10296                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10297                ::fidl_next::wire::Box::encode_present(out);
10298            } else {
10299                ::fidl_next::wire::Box::encode_absent(out);
10300            }
10301
10302            Ok(())
10303        }
10304    }
10305
10306    impl<'de> ::fidl_next::FromWire<crate::wire::InputMethodEditorClientDidUpdateStateRequest<'de>>
10307        for InputMethodEditorClientDidUpdateStateRequest
10308    {
10309        #[inline]
10310        fn from_wire(wire: crate::wire::InputMethodEditorClientDidUpdateStateRequest<'de>) -> Self {
10311            Self {
10312                state: ::fidl_next::FromWire::from_wire(wire.state),
10313
10314                event: ::fidl_next::FromWire::from_wire(wire.event),
10315            }
10316        }
10317    }
10318
10319    impl<'de>
10320        ::fidl_next::FromWireRef<crate::wire::InputMethodEditorClientDidUpdateStateRequest<'de>>
10321        for InputMethodEditorClientDidUpdateStateRequest
10322    {
10323        #[inline]
10324        fn from_wire_ref(
10325            wire: &crate::wire::InputMethodEditorClientDidUpdateStateRequest<'de>,
10326        ) -> Self {
10327            Self {
10328                state: ::fidl_next::FromWireRef::from_wire_ref(&wire.state),
10329
10330                event: ::fidl_next::FromWireRef::from_wire_ref(&wire.event),
10331            }
10332        }
10333    }
10334
10335    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10336    pub struct KeyboardReport {
10337        pub pressed_keys: ::std::vec::Vec<u32>,
10338    }
10339
10340    unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeyboardReport<'static>, ___E> for KeyboardReport
10341    where
10342        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10343        ___E: ::fidl_next::Encoder,
10344    {
10345        #[inline]
10346        fn encode(
10347            self,
10348            encoder_: &mut ___E,
10349            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardReport<'static>>,
10350            _: (),
10351        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10352            ::fidl_next::munge! {
10353                let crate::wire::KeyboardReport {
10354                    pressed_keys,
10355
10356                } = out_;
10357            }
10358
10359            ::fidl_next::Encode::encode(
10360                self.pressed_keys,
10361                encoder_,
10362                pressed_keys,
10363                (4294967295, ()),
10364            )?;
10365
10366            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pressed_keys.as_mut_ptr()) };
10367            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
10368
10369            Ok(())
10370        }
10371    }
10372
10373    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::KeyboardReport<'static>, ___E>
10374        for &'a KeyboardReport
10375    where
10376        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10377        ___E: ::fidl_next::Encoder,
10378    {
10379        #[inline]
10380        fn encode(
10381            self,
10382            encoder_: &mut ___E,
10383            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardReport<'static>>,
10384            _: (),
10385        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10386            ::fidl_next::munge! {
10387                let crate::wire::KeyboardReport {
10388                    pressed_keys,
10389
10390                } = out_;
10391            }
10392
10393            ::fidl_next::Encode::encode(
10394                &self.pressed_keys,
10395                encoder_,
10396                pressed_keys,
10397                (4294967295, ()),
10398            )?;
10399
10400            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pressed_keys.as_mut_ptr()) };
10401            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
10402
10403            Ok(())
10404        }
10405    }
10406
10407    unsafe impl<___E>
10408        ::fidl_next::EncodeOption<
10409            ::fidl_next::wire::Box<'static, crate::wire::KeyboardReport<'static>>,
10410            ___E,
10411        > for KeyboardReport
10412    where
10413        ___E: ::fidl_next::Encoder + ?Sized,
10414        KeyboardReport: ::fidl_next::Encode<crate::wire::KeyboardReport<'static>, ___E>,
10415    {
10416        #[inline]
10417        fn encode_option(
10418            this: ::core::option::Option<Self>,
10419            encoder: &mut ___E,
10420            out: &mut ::core::mem::MaybeUninit<
10421                ::fidl_next::wire::Box<'static, crate::wire::KeyboardReport<'static>>,
10422            >,
10423            _: (),
10424        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10425            if let Some(inner) = this {
10426                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10427                ::fidl_next::wire::Box::encode_present(out);
10428            } else {
10429                ::fidl_next::wire::Box::encode_absent(out);
10430            }
10431
10432            Ok(())
10433        }
10434    }
10435
10436    unsafe impl<'a, ___E>
10437        ::fidl_next::EncodeOption<
10438            ::fidl_next::wire::Box<'static, crate::wire::KeyboardReport<'static>>,
10439            ___E,
10440        > for &'a KeyboardReport
10441    where
10442        ___E: ::fidl_next::Encoder + ?Sized,
10443        &'a KeyboardReport: ::fidl_next::Encode<crate::wire::KeyboardReport<'static>, ___E>,
10444    {
10445        #[inline]
10446        fn encode_option(
10447            this: ::core::option::Option<Self>,
10448            encoder: &mut ___E,
10449            out: &mut ::core::mem::MaybeUninit<
10450                ::fidl_next::wire::Box<'static, crate::wire::KeyboardReport<'static>>,
10451            >,
10452            _: (),
10453        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10454            if let Some(inner) = this {
10455                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10456                ::fidl_next::wire::Box::encode_present(out);
10457            } else {
10458                ::fidl_next::wire::Box::encode_absent(out);
10459            }
10460
10461            Ok(())
10462        }
10463    }
10464
10465    impl<'de> ::fidl_next::FromWire<crate::wire::KeyboardReport<'de>> for KeyboardReport {
10466        #[inline]
10467        fn from_wire(wire: crate::wire::KeyboardReport<'de>) -> Self {
10468            Self { pressed_keys: ::fidl_next::FromWire::from_wire(wire.pressed_keys) }
10469        }
10470    }
10471
10472    impl<'de> ::fidl_next::FromWireRef<crate::wire::KeyboardReport<'de>> for KeyboardReport {
10473        #[inline]
10474        fn from_wire_ref(wire: &crate::wire::KeyboardReport<'de>) -> Self {
10475            Self { pressed_keys: ::fidl_next::FromWireRef::from_wire_ref(&wire.pressed_keys) }
10476        }
10477    }
10478
10479    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10480    #[repr(C)]
10481    pub struct MediaButtonsDescriptor {
10482        pub buttons: u32,
10483    }
10484
10485    unsafe impl<___E> ::fidl_next::Encode<crate::wire::MediaButtonsDescriptor, ___E>
10486        for MediaButtonsDescriptor
10487    where
10488        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10489    {
10490        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10491            Self,
10492            crate::wire::MediaButtonsDescriptor,
10493        > = unsafe {
10494            ::fidl_next::CopyOptimization::enable_if(
10495            true
10496
10497                && <
10498                    u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
10499                >::COPY_OPTIMIZATION.is_enabled()
10500
10501        )
10502        };
10503
10504        #[inline]
10505        fn encode(
10506            self,
10507            encoder_: &mut ___E,
10508            out_: &mut ::core::mem::MaybeUninit<crate::wire::MediaButtonsDescriptor>,
10509            _: (),
10510        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10511            ::fidl_next::munge! {
10512                let crate::wire::MediaButtonsDescriptor {
10513                    buttons,
10514
10515                } = out_;
10516            }
10517
10518            ::fidl_next::Encode::encode(self.buttons, encoder_, buttons, ())?;
10519
10520            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buttons.as_mut_ptr()) };
10521
10522            Ok(())
10523        }
10524    }
10525
10526    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MediaButtonsDescriptor, ___E>
10527        for &'a MediaButtonsDescriptor
10528    where
10529        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10530    {
10531        #[inline]
10532        fn encode(
10533            self,
10534            encoder_: &mut ___E,
10535            out_: &mut ::core::mem::MaybeUninit<crate::wire::MediaButtonsDescriptor>,
10536            _: (),
10537        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10538            ::fidl_next::munge! {
10539                let crate::wire::MediaButtonsDescriptor {
10540                    buttons,
10541
10542                } = out_;
10543            }
10544
10545            ::fidl_next::Encode::encode(&self.buttons, encoder_, buttons, ())?;
10546
10547            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buttons.as_mut_ptr()) };
10548
10549            Ok(())
10550        }
10551    }
10552
10553    unsafe impl<___E>
10554        ::fidl_next::EncodeOption<
10555            ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsDescriptor>,
10556            ___E,
10557        > for MediaButtonsDescriptor
10558    where
10559        ___E: ::fidl_next::Encoder + ?Sized,
10560        MediaButtonsDescriptor: ::fidl_next::Encode<crate::wire::MediaButtonsDescriptor, ___E>,
10561    {
10562        #[inline]
10563        fn encode_option(
10564            this: ::core::option::Option<Self>,
10565            encoder: &mut ___E,
10566            out: &mut ::core::mem::MaybeUninit<
10567                ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsDescriptor>,
10568            >,
10569            _: (),
10570        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10571            if let Some(inner) = this {
10572                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10573                ::fidl_next::wire::Box::encode_present(out);
10574            } else {
10575                ::fidl_next::wire::Box::encode_absent(out);
10576            }
10577
10578            Ok(())
10579        }
10580    }
10581
10582    unsafe impl<'a, ___E>
10583        ::fidl_next::EncodeOption<
10584            ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsDescriptor>,
10585            ___E,
10586        > for &'a MediaButtonsDescriptor
10587    where
10588        ___E: ::fidl_next::Encoder + ?Sized,
10589        &'a MediaButtonsDescriptor: ::fidl_next::Encode<crate::wire::MediaButtonsDescriptor, ___E>,
10590    {
10591        #[inline]
10592        fn encode_option(
10593            this: ::core::option::Option<Self>,
10594            encoder: &mut ___E,
10595            out: &mut ::core::mem::MaybeUninit<
10596                ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsDescriptor>,
10597            >,
10598            _: (),
10599        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10600            if let Some(inner) = this {
10601                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10602                ::fidl_next::wire::Box::encode_present(out);
10603            } else {
10604                ::fidl_next::wire::Box::encode_absent(out);
10605            }
10606
10607            Ok(())
10608        }
10609    }
10610
10611    impl ::fidl_next::FromWire<crate::wire::MediaButtonsDescriptor> for MediaButtonsDescriptor {
10612        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10613            crate::wire::MediaButtonsDescriptor,
10614            Self,
10615        > = unsafe {
10616            ::fidl_next::CopyOptimization::enable_if(
10617                true
10618                    && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
10619                        .is_enabled(),
10620            )
10621        };
10622
10623        #[inline]
10624        fn from_wire(wire: crate::wire::MediaButtonsDescriptor) -> Self {
10625            Self { buttons: ::fidl_next::FromWire::from_wire(wire.buttons) }
10626        }
10627    }
10628
10629    impl ::fidl_next::FromWireRef<crate::wire::MediaButtonsDescriptor> for MediaButtonsDescriptor {
10630        #[inline]
10631        fn from_wire_ref(wire: &crate::wire::MediaButtonsDescriptor) -> Self {
10632            Self { buttons: ::fidl_next::FromWireRef::from_wire_ref(&wire.buttons) }
10633        }
10634    }
10635
10636    #[doc = " `MediaButtonsReport` describes the media buttons event delivered from the event stream.\n Each bool in the report represents a single button where true means the button\n is being pressed. A single report should be sent on every state change.\n"]
10637    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10638    #[repr(C)]
10639    pub struct MediaButtonsReport {
10640        pub volume_up: bool,
10641
10642        pub volume_down: bool,
10643
10644        pub mic_mute: bool,
10645
10646        pub reset: bool,
10647
10648        pub pause: bool,
10649
10650        pub camera_disable: bool,
10651    }
10652
10653    unsafe impl<___E> ::fidl_next::Encode<crate::wire::MediaButtonsReport, ___E> for MediaButtonsReport
10654    where
10655        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10656    {
10657        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10658            Self,
10659            crate::wire::MediaButtonsReport,
10660        > = unsafe {
10661            ::fidl_next::CopyOptimization::enable_if(
10662                true && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled()
10663                    && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled()
10664                    && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled()
10665                    && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled()
10666                    && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled()
10667                    && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled(),
10668            )
10669        };
10670
10671        #[inline]
10672        fn encode(
10673            self,
10674            encoder_: &mut ___E,
10675            out_: &mut ::core::mem::MaybeUninit<crate::wire::MediaButtonsReport>,
10676            _: (),
10677        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10678            ::fidl_next::munge! {
10679                let crate::wire::MediaButtonsReport {
10680                    volume_up,
10681                    volume_down,
10682                    mic_mute,
10683                    reset,
10684                    pause,
10685                    camera_disable,
10686
10687                } = out_;
10688            }
10689
10690            ::fidl_next::Encode::encode(self.volume_up, encoder_, volume_up, ())?;
10691
10692            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(volume_up.as_mut_ptr()) };
10693
10694            ::fidl_next::Encode::encode(self.volume_down, encoder_, volume_down, ())?;
10695
10696            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(volume_down.as_mut_ptr()) };
10697
10698            ::fidl_next::Encode::encode(self.mic_mute, encoder_, mic_mute, ())?;
10699
10700            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mic_mute.as_mut_ptr()) };
10701
10702            ::fidl_next::Encode::encode(self.reset, encoder_, reset, ())?;
10703
10704            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reset.as_mut_ptr()) };
10705
10706            ::fidl_next::Encode::encode(self.pause, encoder_, pause, ())?;
10707
10708            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pause.as_mut_ptr()) };
10709
10710            ::fidl_next::Encode::encode(self.camera_disable, encoder_, camera_disable, ())?;
10711
10712            let mut _field =
10713                unsafe { ::fidl_next::Slot::new_unchecked(camera_disable.as_mut_ptr()) };
10714
10715            Ok(())
10716        }
10717    }
10718
10719    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MediaButtonsReport, ___E>
10720        for &'a MediaButtonsReport
10721    where
10722        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10723    {
10724        #[inline]
10725        fn encode(
10726            self,
10727            encoder_: &mut ___E,
10728            out_: &mut ::core::mem::MaybeUninit<crate::wire::MediaButtonsReport>,
10729            _: (),
10730        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10731            ::fidl_next::munge! {
10732                let crate::wire::MediaButtonsReport {
10733                    volume_up,
10734                    volume_down,
10735                    mic_mute,
10736                    reset,
10737                    pause,
10738                    camera_disable,
10739
10740                } = out_;
10741            }
10742
10743            ::fidl_next::Encode::encode(&self.volume_up, encoder_, volume_up, ())?;
10744
10745            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(volume_up.as_mut_ptr()) };
10746
10747            ::fidl_next::Encode::encode(&self.volume_down, encoder_, volume_down, ())?;
10748
10749            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(volume_down.as_mut_ptr()) };
10750
10751            ::fidl_next::Encode::encode(&self.mic_mute, encoder_, mic_mute, ())?;
10752
10753            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mic_mute.as_mut_ptr()) };
10754
10755            ::fidl_next::Encode::encode(&self.reset, encoder_, reset, ())?;
10756
10757            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reset.as_mut_ptr()) };
10758
10759            ::fidl_next::Encode::encode(&self.pause, encoder_, pause, ())?;
10760
10761            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pause.as_mut_ptr()) };
10762
10763            ::fidl_next::Encode::encode(&self.camera_disable, encoder_, camera_disable, ())?;
10764
10765            let mut _field =
10766                unsafe { ::fidl_next::Slot::new_unchecked(camera_disable.as_mut_ptr()) };
10767
10768            Ok(())
10769        }
10770    }
10771
10772    unsafe impl<___E>
10773        ::fidl_next::EncodeOption<
10774            ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsReport>,
10775            ___E,
10776        > for MediaButtonsReport
10777    where
10778        ___E: ::fidl_next::Encoder + ?Sized,
10779        MediaButtonsReport: ::fidl_next::Encode<crate::wire::MediaButtonsReport, ___E>,
10780    {
10781        #[inline]
10782        fn encode_option(
10783            this: ::core::option::Option<Self>,
10784            encoder: &mut ___E,
10785            out: &mut ::core::mem::MaybeUninit<
10786                ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsReport>,
10787            >,
10788            _: (),
10789        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10790            if let Some(inner) = this {
10791                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10792                ::fidl_next::wire::Box::encode_present(out);
10793            } else {
10794                ::fidl_next::wire::Box::encode_absent(out);
10795            }
10796
10797            Ok(())
10798        }
10799    }
10800
10801    unsafe impl<'a, ___E>
10802        ::fidl_next::EncodeOption<
10803            ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsReport>,
10804            ___E,
10805        > for &'a MediaButtonsReport
10806    where
10807        ___E: ::fidl_next::Encoder + ?Sized,
10808        &'a MediaButtonsReport: ::fidl_next::Encode<crate::wire::MediaButtonsReport, ___E>,
10809    {
10810        #[inline]
10811        fn encode_option(
10812            this: ::core::option::Option<Self>,
10813            encoder: &mut ___E,
10814            out: &mut ::core::mem::MaybeUninit<
10815                ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsReport>,
10816            >,
10817            _: (),
10818        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10819            if let Some(inner) = this {
10820                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10821                ::fidl_next::wire::Box::encode_present(out);
10822            } else {
10823                ::fidl_next::wire::Box::encode_absent(out);
10824            }
10825
10826            Ok(())
10827        }
10828    }
10829
10830    impl ::fidl_next::FromWire<crate::wire::MediaButtonsReport> for MediaButtonsReport {
10831        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10832            crate::wire::MediaButtonsReport,
10833            Self,
10834        > = unsafe {
10835            ::fidl_next::CopyOptimization::enable_if(
10836                true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled()
10837                    && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled()
10838                    && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled()
10839                    && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled()
10840                    && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled()
10841                    && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
10842            )
10843        };
10844
10845        #[inline]
10846        fn from_wire(wire: crate::wire::MediaButtonsReport) -> Self {
10847            Self {
10848                volume_up: ::fidl_next::FromWire::from_wire(wire.volume_up),
10849
10850                volume_down: ::fidl_next::FromWire::from_wire(wire.volume_down),
10851
10852                mic_mute: ::fidl_next::FromWire::from_wire(wire.mic_mute),
10853
10854                reset: ::fidl_next::FromWire::from_wire(wire.reset),
10855
10856                pause: ::fidl_next::FromWire::from_wire(wire.pause),
10857
10858                camera_disable: ::fidl_next::FromWire::from_wire(wire.camera_disable),
10859            }
10860        }
10861    }
10862
10863    impl ::fidl_next::FromWireRef<crate::wire::MediaButtonsReport> for MediaButtonsReport {
10864        #[inline]
10865        fn from_wire_ref(wire: &crate::wire::MediaButtonsReport) -> Self {
10866            Self {
10867                volume_up: ::fidl_next::FromWireRef::from_wire_ref(&wire.volume_up),
10868
10869                volume_down: ::fidl_next::FromWireRef::from_wire_ref(&wire.volume_down),
10870
10871                mic_mute: ::fidl_next::FromWireRef::from_wire_ref(&wire.mic_mute),
10872
10873                reset: ::fidl_next::FromWireRef::from_wire_ref(&wire.reset),
10874
10875                pause: ::fidl_next::FromWireRef::from_wire_ref(&wire.pause),
10876
10877                camera_disable: ::fidl_next::FromWireRef::from_wire_ref(&wire.camera_disable),
10878            }
10879        }
10880    }
10881
10882    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10883    #[repr(C)]
10884    pub struct MouseReport {
10885        pub rel_x: i32,
10886
10887        pub rel_y: i32,
10888
10889        pub rel_hscroll: i32,
10890
10891        pub rel_vscroll: i32,
10892
10893        pub pressed_buttons: u32,
10894    }
10895
10896    unsafe impl<___E> ::fidl_next::Encode<crate::wire::MouseReport, ___E> for MouseReport
10897    where
10898        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10899    {
10900        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::MouseReport> = unsafe {
10901            ::fidl_next::CopyOptimization::enable_if(
10902            true
10903
10904                && <
10905                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
10906                >::COPY_OPTIMIZATION.is_enabled()
10907
10908                && <
10909                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
10910                >::COPY_OPTIMIZATION.is_enabled()
10911
10912                && <
10913                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
10914                >::COPY_OPTIMIZATION.is_enabled()
10915
10916                && <
10917                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
10918                >::COPY_OPTIMIZATION.is_enabled()
10919
10920                && <
10921                    u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
10922                >::COPY_OPTIMIZATION.is_enabled()
10923
10924        )
10925        };
10926
10927        #[inline]
10928        fn encode(
10929            self,
10930            encoder_: &mut ___E,
10931            out_: &mut ::core::mem::MaybeUninit<crate::wire::MouseReport>,
10932            _: (),
10933        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10934            ::fidl_next::munge! {
10935                let crate::wire::MouseReport {
10936                    rel_x,
10937                    rel_y,
10938                    rel_hscroll,
10939                    rel_vscroll,
10940                    pressed_buttons,
10941
10942                } = out_;
10943            }
10944
10945            ::fidl_next::Encode::encode(self.rel_x, encoder_, rel_x, ())?;
10946
10947            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rel_x.as_mut_ptr()) };
10948
10949            ::fidl_next::Encode::encode(self.rel_y, encoder_, rel_y, ())?;
10950
10951            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rel_y.as_mut_ptr()) };
10952
10953            ::fidl_next::Encode::encode(self.rel_hscroll, encoder_, rel_hscroll, ())?;
10954
10955            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rel_hscroll.as_mut_ptr()) };
10956
10957            ::fidl_next::Encode::encode(self.rel_vscroll, encoder_, rel_vscroll, ())?;
10958
10959            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rel_vscroll.as_mut_ptr()) };
10960
10961            ::fidl_next::Encode::encode(self.pressed_buttons, encoder_, pressed_buttons, ())?;
10962
10963            let mut _field =
10964                unsafe { ::fidl_next::Slot::new_unchecked(pressed_buttons.as_mut_ptr()) };
10965
10966            Ok(())
10967        }
10968    }
10969
10970    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MouseReport, ___E> for &'a MouseReport
10971    where
10972        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10973    {
10974        #[inline]
10975        fn encode(
10976            self,
10977            encoder_: &mut ___E,
10978            out_: &mut ::core::mem::MaybeUninit<crate::wire::MouseReport>,
10979            _: (),
10980        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10981            ::fidl_next::munge! {
10982                let crate::wire::MouseReport {
10983                    rel_x,
10984                    rel_y,
10985                    rel_hscroll,
10986                    rel_vscroll,
10987                    pressed_buttons,
10988
10989                } = out_;
10990            }
10991
10992            ::fidl_next::Encode::encode(&self.rel_x, encoder_, rel_x, ())?;
10993
10994            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rel_x.as_mut_ptr()) };
10995
10996            ::fidl_next::Encode::encode(&self.rel_y, encoder_, rel_y, ())?;
10997
10998            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rel_y.as_mut_ptr()) };
10999
11000            ::fidl_next::Encode::encode(&self.rel_hscroll, encoder_, rel_hscroll, ())?;
11001
11002            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rel_hscroll.as_mut_ptr()) };
11003
11004            ::fidl_next::Encode::encode(&self.rel_vscroll, encoder_, rel_vscroll, ())?;
11005
11006            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rel_vscroll.as_mut_ptr()) };
11007
11008            ::fidl_next::Encode::encode(&self.pressed_buttons, encoder_, pressed_buttons, ())?;
11009
11010            let mut _field =
11011                unsafe { ::fidl_next::Slot::new_unchecked(pressed_buttons.as_mut_ptr()) };
11012
11013            Ok(())
11014        }
11015    }
11016
11017    unsafe impl<___E>
11018        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::MouseReport>, ___E>
11019        for MouseReport
11020    where
11021        ___E: ::fidl_next::Encoder + ?Sized,
11022        MouseReport: ::fidl_next::Encode<crate::wire::MouseReport, ___E>,
11023    {
11024        #[inline]
11025        fn encode_option(
11026            this: ::core::option::Option<Self>,
11027            encoder: &mut ___E,
11028            out: &mut ::core::mem::MaybeUninit<
11029                ::fidl_next::wire::Box<'static, crate::wire::MouseReport>,
11030            >,
11031            _: (),
11032        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11033            if let Some(inner) = this {
11034                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11035                ::fidl_next::wire::Box::encode_present(out);
11036            } else {
11037                ::fidl_next::wire::Box::encode_absent(out);
11038            }
11039
11040            Ok(())
11041        }
11042    }
11043
11044    unsafe impl<'a, ___E>
11045        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::MouseReport>, ___E>
11046        for &'a MouseReport
11047    where
11048        ___E: ::fidl_next::Encoder + ?Sized,
11049        &'a MouseReport: ::fidl_next::Encode<crate::wire::MouseReport, ___E>,
11050    {
11051        #[inline]
11052        fn encode_option(
11053            this: ::core::option::Option<Self>,
11054            encoder: &mut ___E,
11055            out: &mut ::core::mem::MaybeUninit<
11056                ::fidl_next::wire::Box<'static, crate::wire::MouseReport>,
11057            >,
11058            _: (),
11059        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11060            if let Some(inner) = this {
11061                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11062                ::fidl_next::wire::Box::encode_present(out);
11063            } else {
11064                ::fidl_next::wire::Box::encode_absent(out);
11065            }
11066
11067            Ok(())
11068        }
11069    }
11070
11071    impl ::fidl_next::FromWire<crate::wire::MouseReport> for MouseReport {
11072        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::MouseReport, Self> = unsafe {
11073            ::fidl_next::CopyOptimization::enable_if(
11074                true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
11075                    .is_enabled()
11076                    && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
11077                        .is_enabled()
11078                    && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
11079                        .is_enabled()
11080                    && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
11081                        .is_enabled()
11082                    && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
11083                        .is_enabled(),
11084            )
11085        };
11086
11087        #[inline]
11088        fn from_wire(wire: crate::wire::MouseReport) -> Self {
11089            Self {
11090                rel_x: ::fidl_next::FromWire::from_wire(wire.rel_x),
11091
11092                rel_y: ::fidl_next::FromWire::from_wire(wire.rel_y),
11093
11094                rel_hscroll: ::fidl_next::FromWire::from_wire(wire.rel_hscroll),
11095
11096                rel_vscroll: ::fidl_next::FromWire::from_wire(wire.rel_vscroll),
11097
11098                pressed_buttons: ::fidl_next::FromWire::from_wire(wire.pressed_buttons),
11099            }
11100        }
11101    }
11102
11103    impl ::fidl_next::FromWireRef<crate::wire::MouseReport> for MouseReport {
11104        #[inline]
11105        fn from_wire_ref(wire: &crate::wire::MouseReport) -> Self {
11106            Self {
11107                rel_x: ::fidl_next::FromWireRef::from_wire_ref(&wire.rel_x),
11108
11109                rel_y: ::fidl_next::FromWireRef::from_wire_ref(&wire.rel_y),
11110
11111                rel_hscroll: ::fidl_next::FromWireRef::from_wire_ref(&wire.rel_hscroll),
11112
11113                rel_vscroll: ::fidl_next::FromWireRef::from_wire_ref(&wire.rel_vscroll),
11114
11115                pressed_buttons: ::fidl_next::FromWireRef::from_wire_ref(&wire.pressed_buttons),
11116            }
11117        }
11118    }
11119
11120    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11121    #[repr(u32)]
11122    pub enum SensorLocation {
11123        Unknown = 0,
11124        Base = 1,
11125        Lid = 2,
11126        UnknownOrdinal_(u32) = 3,
11127    }
11128    impl ::std::convert::From<u32> for SensorLocation {
11129        fn from(value: u32) -> Self {
11130            match value {
11131                0 => Self::Unknown,
11132                1 => Self::Base,
11133                2 => Self::Lid,
11134
11135                _ => Self::UnknownOrdinal_(value),
11136            }
11137        }
11138    }
11139
11140    impl ::std::convert::From<SensorLocation> for u32 {
11141        fn from(value: SensorLocation) -> Self {
11142            match value {
11143                SensorLocation::Unknown => 0,
11144                SensorLocation::Base => 1,
11145                SensorLocation::Lid => 2,
11146
11147                SensorLocation::UnknownOrdinal_(value) => value,
11148            }
11149        }
11150    }
11151
11152    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SensorLocation, ___E> for SensorLocation
11153    where
11154        ___E: ?Sized,
11155    {
11156        #[inline]
11157        fn encode(
11158            self,
11159            encoder: &mut ___E,
11160            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorLocation>,
11161            _: (),
11162        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11163            ::fidl_next::Encode::encode(&self, encoder, out, ())
11164        }
11165    }
11166
11167    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SensorLocation, ___E> for &'a SensorLocation
11168    where
11169        ___E: ?Sized,
11170    {
11171        #[inline]
11172        fn encode(
11173            self,
11174            encoder: &mut ___E,
11175            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorLocation>,
11176            _: (),
11177        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11178            ::fidl_next::munge!(let crate::wire::SensorLocation { value } = out);
11179            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
11180                SensorLocation::Unknown => 0,
11181
11182                SensorLocation::Base => 1,
11183
11184                SensorLocation::Lid => 2,
11185
11186                SensorLocation::UnknownOrdinal_(value) => value,
11187            }));
11188
11189            Ok(())
11190        }
11191    }
11192
11193    impl ::core::convert::From<crate::wire::SensorLocation> for SensorLocation {
11194        fn from(wire: crate::wire::SensorLocation) -> Self {
11195            match u32::from(wire.value) {
11196                0 => Self::Unknown,
11197
11198                1 => Self::Base,
11199
11200                2 => Self::Lid,
11201
11202                value => Self::UnknownOrdinal_(value),
11203            }
11204        }
11205    }
11206
11207    impl ::fidl_next::FromWire<crate::wire::SensorLocation> for SensorLocation {
11208        #[inline]
11209        fn from_wire(wire: crate::wire::SensorLocation) -> Self {
11210            Self::from(wire)
11211        }
11212    }
11213
11214    impl ::fidl_next::FromWireRef<crate::wire::SensorLocation> for SensorLocation {
11215        #[inline]
11216        fn from_wire_ref(wire: &crate::wire::SensorLocation) -> Self {
11217            Self::from(*wire)
11218        }
11219    }
11220
11221    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11222    pub enum SensorReport {
11223        Vector([i16; 3]),
11224
11225        Scalar(u16),
11226    }
11227
11228    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SensorReport<'static>, ___E> for SensorReport
11229    where
11230        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11231        ___E: ::fidl_next::Encoder,
11232    {
11233        #[inline]
11234        fn encode(
11235            self,
11236            encoder: &mut ___E,
11237            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorReport<'static>>,
11238            _: (),
11239        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11240            ::fidl_next::munge!(let crate::wire::SensorReport { raw, _phantom: _ } = out);
11241
11242            match self {
11243                Self::Vector(value) => ::fidl_next::wire::Union::encode_as::<
11244                    ___E,
11245                    [::fidl_next::wire::Int16; 3],
11246                >(value, 1, encoder, raw, ())?,
11247
11248                Self::Scalar(value) => ::fidl_next::wire::Union::encode_as::<
11249                    ___E,
11250                    ::fidl_next::wire::Uint16,
11251                >(value, 2, encoder, raw, ())?,
11252            }
11253
11254            Ok(())
11255        }
11256    }
11257
11258    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SensorReport<'static>, ___E>
11259        for &'a SensorReport
11260    where
11261        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11262        ___E: ::fidl_next::Encoder,
11263    {
11264        #[inline]
11265        fn encode(
11266            self,
11267            encoder: &mut ___E,
11268            out: &mut ::core::mem::MaybeUninit<crate::wire::SensorReport<'static>>,
11269            _: (),
11270        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11271            ::fidl_next::munge!(let crate::wire::SensorReport { raw, _phantom: _ } = out);
11272
11273            match self {
11274                SensorReport::Vector(value) => ::fidl_next::wire::Union::encode_as::<
11275                    ___E,
11276                    [::fidl_next::wire::Int16; 3],
11277                >(value, 1, encoder, raw, ())?,
11278
11279                SensorReport::Scalar(value) => ::fidl_next::wire::Union::encode_as::<
11280                    ___E,
11281                    ::fidl_next::wire::Uint16,
11282                >(value, 2, encoder, raw, ())?,
11283            }
11284
11285            Ok(())
11286        }
11287    }
11288
11289    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::SensorReport<'static>, ___E>
11290        for SensorReport
11291    where
11292        ___E: ?Sized,
11293        SensorReport: ::fidl_next::Encode<crate::wire::SensorReport<'static>, ___E>,
11294    {
11295        #[inline]
11296        fn encode_option(
11297            this: ::core::option::Option<Self>,
11298            encoder: &mut ___E,
11299            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SensorReport<'static>>,
11300            _: (),
11301        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11302            ::fidl_next::munge!(let crate::wire_optional::SensorReport { raw, _phantom: _ } = &mut *out);
11303
11304            if let Some(inner) = this {
11305                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
11306                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
11307            } else {
11308                ::fidl_next::wire::Union::encode_absent(raw);
11309            }
11310
11311            Ok(())
11312        }
11313    }
11314
11315    unsafe impl<'a, ___E>
11316        ::fidl_next::EncodeOption<crate::wire_optional::SensorReport<'static>, ___E>
11317        for &'a SensorReport
11318    where
11319        ___E: ?Sized,
11320        &'a SensorReport: ::fidl_next::Encode<crate::wire::SensorReport<'static>, ___E>,
11321    {
11322        #[inline]
11323        fn encode_option(
11324            this: ::core::option::Option<Self>,
11325            encoder: &mut ___E,
11326            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SensorReport<'static>>,
11327            _: (),
11328        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11329            ::fidl_next::munge!(let crate::wire_optional::SensorReport { raw, _phantom: _ } = &mut *out);
11330
11331            if let Some(inner) = this {
11332                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
11333                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
11334            } else {
11335                ::fidl_next::wire::Union::encode_absent(raw);
11336            }
11337
11338            Ok(())
11339        }
11340    }
11341
11342    impl<'de> ::fidl_next::FromWire<crate::wire::SensorReport<'de>> for SensorReport {
11343        #[inline]
11344        fn from_wire(wire: crate::wire::SensorReport<'de>) -> Self {
11345            let wire = ::core::mem::ManuallyDrop::new(wire);
11346            match wire.raw.ordinal() {
11347                1 => Self::Vector(::fidl_next::FromWire::from_wire(unsafe {
11348                    wire.raw.get().read_unchecked::<[::fidl_next::wire::Int16; 3]>()
11349                })),
11350
11351                2 => Self::Scalar(::fidl_next::FromWire::from_wire(unsafe {
11352                    wire.raw.get().read_unchecked::<::fidl_next::wire::Uint16>()
11353                })),
11354
11355                _ => unsafe { ::core::hint::unreachable_unchecked() },
11356            }
11357        }
11358    }
11359
11360    impl<'de> ::fidl_next::FromWireRef<crate::wire::SensorReport<'de>> for SensorReport {
11361        #[inline]
11362        fn from_wire_ref(wire: &crate::wire::SensorReport<'de>) -> Self {
11363            match wire.raw.ordinal() {
11364                1 => Self::Vector(::fidl_next::FromWireRef::from_wire_ref(unsafe {
11365                    wire.raw.get().deref_unchecked::<[::fidl_next::wire::Int16; 3]>()
11366                })),
11367
11368                2 => Self::Scalar(::fidl_next::FromWireRef::from_wire_ref(unsafe {
11369                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Uint16>()
11370                })),
11371
11372                _ => unsafe { ::core::hint::unreachable_unchecked() },
11373            }
11374        }
11375    }
11376
11377    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SensorReport<'de>> for SensorReport {
11378        #[inline]
11379        fn from_wire_option(
11380            wire: crate::wire_optional::SensorReport<'de>,
11381        ) -> ::core::option::Option<Self> {
11382            if let Some(inner) = wire.into_option() {
11383                Some(::fidl_next::FromWire::from_wire(inner))
11384            } else {
11385                None
11386            }
11387        }
11388    }
11389
11390    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SensorReport<'de>>
11391        for Box<SensorReport>
11392    {
11393        #[inline]
11394        fn from_wire_option(
11395            wire: crate::wire_optional::SensorReport<'de>,
11396        ) -> ::core::option::Option<Self> {
11397            <
11398            SensorReport as ::fidl_next::FromWireOption<crate::wire_optional::SensorReport<'de>>
11399        >::from_wire_option(wire).map(Box::new)
11400        }
11401    }
11402
11403    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::SensorReport<'de>>
11404        for Box<SensorReport>
11405    {
11406        #[inline]
11407        fn from_wire_option_ref(
11408            wire: &crate::wire_optional::SensorReport<'de>,
11409        ) -> ::core::option::Option<Self> {
11410            if let Some(inner) = wire.as_ref() {
11411                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
11412            } else {
11413                None
11414            }
11415        }
11416    }
11417
11418    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11419    pub struct StylusDescriptor {
11420        pub x: crate::natural::Axis,
11421
11422        pub y: crate::natural::Axis,
11423
11424        pub pressure: ::core::option::Option<::std::boxed::Box<crate::natural::Axis>>,
11425
11426        pub is_invertible: bool,
11427
11428        pub buttons: u32,
11429    }
11430
11431    unsafe impl<___E> ::fidl_next::Encode<crate::wire::StylusDescriptor<'static>, ___E>
11432        for StylusDescriptor
11433    where
11434        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11435        ___E: ::fidl_next::Encoder,
11436    {
11437        #[inline]
11438        fn encode(
11439            self,
11440            encoder_: &mut ___E,
11441            out_: &mut ::core::mem::MaybeUninit<crate::wire::StylusDescriptor<'static>>,
11442            _: (),
11443        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11444            ::fidl_next::munge! {
11445                let crate::wire::StylusDescriptor {
11446                    x,
11447                    y,
11448                    pressure,
11449                    is_invertible,
11450                    buttons,
11451
11452                } = out_;
11453            }
11454
11455            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
11456
11457            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
11458
11459            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
11460
11461            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
11462
11463            ::fidl_next::Encode::encode(self.pressure, encoder_, pressure, ())?;
11464
11465            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pressure.as_mut_ptr()) };
11466
11467            ::fidl_next::Encode::encode(self.is_invertible, encoder_, is_invertible, ())?;
11468
11469            let mut _field =
11470                unsafe { ::fidl_next::Slot::new_unchecked(is_invertible.as_mut_ptr()) };
11471
11472            ::fidl_next::Encode::encode(self.buttons, encoder_, buttons, ())?;
11473
11474            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buttons.as_mut_ptr()) };
11475
11476            Ok(())
11477        }
11478    }
11479
11480    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StylusDescriptor<'static>, ___E>
11481        for &'a StylusDescriptor
11482    where
11483        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11484        ___E: ::fidl_next::Encoder,
11485    {
11486        #[inline]
11487        fn encode(
11488            self,
11489            encoder_: &mut ___E,
11490            out_: &mut ::core::mem::MaybeUninit<crate::wire::StylusDescriptor<'static>>,
11491            _: (),
11492        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11493            ::fidl_next::munge! {
11494                let crate::wire::StylusDescriptor {
11495                    x,
11496                    y,
11497                    pressure,
11498                    is_invertible,
11499                    buttons,
11500
11501                } = out_;
11502            }
11503
11504            ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
11505
11506            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
11507
11508            ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
11509
11510            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
11511
11512            ::fidl_next::Encode::encode(&self.pressure, encoder_, pressure, ())?;
11513
11514            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pressure.as_mut_ptr()) };
11515
11516            ::fidl_next::Encode::encode(&self.is_invertible, encoder_, is_invertible, ())?;
11517
11518            let mut _field =
11519                unsafe { ::fidl_next::Slot::new_unchecked(is_invertible.as_mut_ptr()) };
11520
11521            ::fidl_next::Encode::encode(&self.buttons, encoder_, buttons, ())?;
11522
11523            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buttons.as_mut_ptr()) };
11524
11525            Ok(())
11526        }
11527    }
11528
11529    unsafe impl<___E>
11530        ::fidl_next::EncodeOption<
11531            ::fidl_next::wire::Box<'static, crate::wire::StylusDescriptor<'static>>,
11532            ___E,
11533        > for StylusDescriptor
11534    where
11535        ___E: ::fidl_next::Encoder + ?Sized,
11536        StylusDescriptor: ::fidl_next::Encode<crate::wire::StylusDescriptor<'static>, ___E>,
11537    {
11538        #[inline]
11539        fn encode_option(
11540            this: ::core::option::Option<Self>,
11541            encoder: &mut ___E,
11542            out: &mut ::core::mem::MaybeUninit<
11543                ::fidl_next::wire::Box<'static, crate::wire::StylusDescriptor<'static>>,
11544            >,
11545            _: (),
11546        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11547            if let Some(inner) = this {
11548                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11549                ::fidl_next::wire::Box::encode_present(out);
11550            } else {
11551                ::fidl_next::wire::Box::encode_absent(out);
11552            }
11553
11554            Ok(())
11555        }
11556    }
11557
11558    unsafe impl<'a, ___E>
11559        ::fidl_next::EncodeOption<
11560            ::fidl_next::wire::Box<'static, crate::wire::StylusDescriptor<'static>>,
11561            ___E,
11562        > for &'a StylusDescriptor
11563    where
11564        ___E: ::fidl_next::Encoder + ?Sized,
11565        &'a StylusDescriptor: ::fidl_next::Encode<crate::wire::StylusDescriptor<'static>, ___E>,
11566    {
11567        #[inline]
11568        fn encode_option(
11569            this: ::core::option::Option<Self>,
11570            encoder: &mut ___E,
11571            out: &mut ::core::mem::MaybeUninit<
11572                ::fidl_next::wire::Box<'static, crate::wire::StylusDescriptor<'static>>,
11573            >,
11574            _: (),
11575        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11576            if let Some(inner) = this {
11577                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11578                ::fidl_next::wire::Box::encode_present(out);
11579            } else {
11580                ::fidl_next::wire::Box::encode_absent(out);
11581            }
11582
11583            Ok(())
11584        }
11585    }
11586
11587    impl<'de> ::fidl_next::FromWire<crate::wire::StylusDescriptor<'de>> for StylusDescriptor {
11588        #[inline]
11589        fn from_wire(wire: crate::wire::StylusDescriptor<'de>) -> Self {
11590            Self {
11591                x: ::fidl_next::FromWire::from_wire(wire.x),
11592
11593                y: ::fidl_next::FromWire::from_wire(wire.y),
11594
11595                pressure: ::fidl_next::FromWire::from_wire(wire.pressure),
11596
11597                is_invertible: ::fidl_next::FromWire::from_wire(wire.is_invertible),
11598
11599                buttons: ::fidl_next::FromWire::from_wire(wire.buttons),
11600            }
11601        }
11602    }
11603
11604    impl<'de> ::fidl_next::FromWireRef<crate::wire::StylusDescriptor<'de>> for StylusDescriptor {
11605        #[inline]
11606        fn from_wire_ref(wire: &crate::wire::StylusDescriptor<'de>) -> Self {
11607            Self {
11608                x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
11609
11610                y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
11611
11612                pressure: ::fidl_next::FromWireRef::from_wire_ref(&wire.pressure),
11613
11614                is_invertible: ::fidl_next::FromWireRef::from_wire_ref(&wire.is_invertible),
11615
11616                buttons: ::fidl_next::FromWireRef::from_wire_ref(&wire.buttons),
11617            }
11618        }
11619    }
11620
11621    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11622    pub struct StylusReport {
11623        pub x: i32,
11624
11625        pub y: i32,
11626
11627        pub pressure: u32,
11628
11629        pub is_in_contact: bool,
11630
11631        pub in_range: bool,
11632
11633        pub is_inverted: bool,
11634
11635        pub pressed_buttons: u32,
11636    }
11637
11638    unsafe impl<___E> ::fidl_next::Encode<crate::wire::StylusReport, ___E> for StylusReport
11639    where
11640        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11641    {
11642        #[inline]
11643        fn encode(
11644            self,
11645            encoder_: &mut ___E,
11646            out_: &mut ::core::mem::MaybeUninit<crate::wire::StylusReport>,
11647            _: (),
11648        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11649            ::fidl_next::munge! {
11650                let crate::wire::StylusReport {
11651                    x,
11652                    y,
11653                    pressure,
11654                    is_in_contact,
11655                    in_range,
11656                    is_inverted,
11657                    pressed_buttons,
11658
11659                } = out_;
11660            }
11661
11662            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
11663
11664            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
11665
11666            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
11667
11668            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
11669
11670            ::fidl_next::Encode::encode(self.pressure, encoder_, pressure, ())?;
11671
11672            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pressure.as_mut_ptr()) };
11673
11674            ::fidl_next::Encode::encode(self.is_in_contact, encoder_, is_in_contact, ())?;
11675
11676            let mut _field =
11677                unsafe { ::fidl_next::Slot::new_unchecked(is_in_contact.as_mut_ptr()) };
11678
11679            ::fidl_next::Encode::encode(self.in_range, encoder_, in_range, ())?;
11680
11681            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(in_range.as_mut_ptr()) };
11682
11683            ::fidl_next::Encode::encode(self.is_inverted, encoder_, is_inverted, ())?;
11684
11685            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(is_inverted.as_mut_ptr()) };
11686
11687            ::fidl_next::Encode::encode(self.pressed_buttons, encoder_, pressed_buttons, ())?;
11688
11689            let mut _field =
11690                unsafe { ::fidl_next::Slot::new_unchecked(pressed_buttons.as_mut_ptr()) };
11691
11692            Ok(())
11693        }
11694    }
11695
11696    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StylusReport, ___E> for &'a StylusReport
11697    where
11698        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11699    {
11700        #[inline]
11701        fn encode(
11702            self,
11703            encoder_: &mut ___E,
11704            out_: &mut ::core::mem::MaybeUninit<crate::wire::StylusReport>,
11705            _: (),
11706        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11707            ::fidl_next::munge! {
11708                let crate::wire::StylusReport {
11709                    x,
11710                    y,
11711                    pressure,
11712                    is_in_contact,
11713                    in_range,
11714                    is_inverted,
11715                    pressed_buttons,
11716
11717                } = out_;
11718            }
11719
11720            ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
11721
11722            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
11723
11724            ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
11725
11726            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
11727
11728            ::fidl_next::Encode::encode(&self.pressure, encoder_, pressure, ())?;
11729
11730            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pressure.as_mut_ptr()) };
11731
11732            ::fidl_next::Encode::encode(&self.is_in_contact, encoder_, is_in_contact, ())?;
11733
11734            let mut _field =
11735                unsafe { ::fidl_next::Slot::new_unchecked(is_in_contact.as_mut_ptr()) };
11736
11737            ::fidl_next::Encode::encode(&self.in_range, encoder_, in_range, ())?;
11738
11739            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(in_range.as_mut_ptr()) };
11740
11741            ::fidl_next::Encode::encode(&self.is_inverted, encoder_, is_inverted, ())?;
11742
11743            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(is_inverted.as_mut_ptr()) };
11744
11745            ::fidl_next::Encode::encode(&self.pressed_buttons, encoder_, pressed_buttons, ())?;
11746
11747            let mut _field =
11748                unsafe { ::fidl_next::Slot::new_unchecked(pressed_buttons.as_mut_ptr()) };
11749
11750            Ok(())
11751        }
11752    }
11753
11754    unsafe impl<___E>
11755        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::StylusReport>, ___E>
11756        for StylusReport
11757    where
11758        ___E: ::fidl_next::Encoder + ?Sized,
11759        StylusReport: ::fidl_next::Encode<crate::wire::StylusReport, ___E>,
11760    {
11761        #[inline]
11762        fn encode_option(
11763            this: ::core::option::Option<Self>,
11764            encoder: &mut ___E,
11765            out: &mut ::core::mem::MaybeUninit<
11766                ::fidl_next::wire::Box<'static, crate::wire::StylusReport>,
11767            >,
11768            _: (),
11769        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11770            if let Some(inner) = this {
11771                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11772                ::fidl_next::wire::Box::encode_present(out);
11773            } else {
11774                ::fidl_next::wire::Box::encode_absent(out);
11775            }
11776
11777            Ok(())
11778        }
11779    }
11780
11781    unsafe impl<'a, ___E>
11782        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::StylusReport>, ___E>
11783        for &'a StylusReport
11784    where
11785        ___E: ::fidl_next::Encoder + ?Sized,
11786        &'a StylusReport: ::fidl_next::Encode<crate::wire::StylusReport, ___E>,
11787    {
11788        #[inline]
11789        fn encode_option(
11790            this: ::core::option::Option<Self>,
11791            encoder: &mut ___E,
11792            out: &mut ::core::mem::MaybeUninit<
11793                ::fidl_next::wire::Box<'static, crate::wire::StylusReport>,
11794            >,
11795            _: (),
11796        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11797            if let Some(inner) = this {
11798                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11799                ::fidl_next::wire::Box::encode_present(out);
11800            } else {
11801                ::fidl_next::wire::Box::encode_absent(out);
11802            }
11803
11804            Ok(())
11805        }
11806    }
11807
11808    impl ::fidl_next::FromWire<crate::wire::StylusReport> for StylusReport {
11809        #[inline]
11810        fn from_wire(wire: crate::wire::StylusReport) -> Self {
11811            Self {
11812                x: ::fidl_next::FromWire::from_wire(wire.x),
11813
11814                y: ::fidl_next::FromWire::from_wire(wire.y),
11815
11816                pressure: ::fidl_next::FromWire::from_wire(wire.pressure),
11817
11818                is_in_contact: ::fidl_next::FromWire::from_wire(wire.is_in_contact),
11819
11820                in_range: ::fidl_next::FromWire::from_wire(wire.in_range),
11821
11822                is_inverted: ::fidl_next::FromWire::from_wire(wire.is_inverted),
11823
11824                pressed_buttons: ::fidl_next::FromWire::from_wire(wire.pressed_buttons),
11825            }
11826        }
11827    }
11828
11829    impl ::fidl_next::FromWireRef<crate::wire::StylusReport> for StylusReport {
11830        #[inline]
11831        fn from_wire_ref(wire: &crate::wire::StylusReport) -> Self {
11832            Self {
11833                x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
11834
11835                y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
11836
11837                pressure: ::fidl_next::FromWireRef::from_wire_ref(&wire.pressure),
11838
11839                is_in_contact: ::fidl_next::FromWireRef::from_wire_ref(&wire.is_in_contact),
11840
11841                in_range: ::fidl_next::FromWireRef::from_wire_ref(&wire.in_range),
11842
11843                is_inverted: ::fidl_next::FromWireRef::from_wire_ref(&wire.is_inverted),
11844
11845                pressed_buttons: ::fidl_next::FromWireRef::from_wire_ref(&wire.pressed_buttons),
11846            }
11847        }
11848    }
11849
11850    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11851    #[repr(C)]
11852    pub struct Touch {
11853        pub finger_id: u32,
11854
11855        pub x: i32,
11856
11857        pub y: i32,
11858
11859        pub width: u32,
11860
11861        pub height: u32,
11862    }
11863
11864    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Touch, ___E> for Touch
11865    where
11866        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11867    {
11868        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Touch> = unsafe {
11869            ::fidl_next::CopyOptimization::enable_if(
11870            true
11871
11872                && <
11873                    u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
11874                >::COPY_OPTIMIZATION.is_enabled()
11875
11876                && <
11877                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
11878                >::COPY_OPTIMIZATION.is_enabled()
11879
11880                && <
11881                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
11882                >::COPY_OPTIMIZATION.is_enabled()
11883
11884                && <
11885                    u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
11886                >::COPY_OPTIMIZATION.is_enabled()
11887
11888                && <
11889                    u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
11890                >::COPY_OPTIMIZATION.is_enabled()
11891
11892        )
11893        };
11894
11895        #[inline]
11896        fn encode(
11897            self,
11898            encoder_: &mut ___E,
11899            out_: &mut ::core::mem::MaybeUninit<crate::wire::Touch>,
11900            _: (),
11901        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11902            ::fidl_next::munge! {
11903                let crate::wire::Touch {
11904                    finger_id,
11905                    x,
11906                    y,
11907                    width,
11908                    height,
11909
11910                } = out_;
11911            }
11912
11913            ::fidl_next::Encode::encode(self.finger_id, encoder_, finger_id, ())?;
11914
11915            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(finger_id.as_mut_ptr()) };
11916
11917            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
11918
11919            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
11920
11921            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
11922
11923            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
11924
11925            ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
11926
11927            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
11928
11929            ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
11930
11931            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
11932
11933            Ok(())
11934        }
11935    }
11936
11937    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Touch, ___E> for &'a Touch
11938    where
11939        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11940    {
11941        #[inline]
11942        fn encode(
11943            self,
11944            encoder_: &mut ___E,
11945            out_: &mut ::core::mem::MaybeUninit<crate::wire::Touch>,
11946            _: (),
11947        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11948            ::fidl_next::munge! {
11949                let crate::wire::Touch {
11950                    finger_id,
11951                    x,
11952                    y,
11953                    width,
11954                    height,
11955
11956                } = out_;
11957            }
11958
11959            ::fidl_next::Encode::encode(&self.finger_id, encoder_, finger_id, ())?;
11960
11961            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(finger_id.as_mut_ptr()) };
11962
11963            ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
11964
11965            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
11966
11967            ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
11968
11969            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
11970
11971            ::fidl_next::Encode::encode(&self.width, encoder_, width, ())?;
11972
11973            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
11974
11975            ::fidl_next::Encode::encode(&self.height, encoder_, height, ())?;
11976
11977            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
11978
11979            Ok(())
11980        }
11981    }
11982
11983    unsafe impl<___E>
11984        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Touch>, ___E>
11985        for Touch
11986    where
11987        ___E: ::fidl_next::Encoder + ?Sized,
11988        Touch: ::fidl_next::Encode<crate::wire::Touch, ___E>,
11989    {
11990        #[inline]
11991        fn encode_option(
11992            this: ::core::option::Option<Self>,
11993            encoder: &mut ___E,
11994            out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Touch>>,
11995            _: (),
11996        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11997            if let Some(inner) = this {
11998                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11999                ::fidl_next::wire::Box::encode_present(out);
12000            } else {
12001                ::fidl_next::wire::Box::encode_absent(out);
12002            }
12003
12004            Ok(())
12005        }
12006    }
12007
12008    unsafe impl<'a, ___E>
12009        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Touch>, ___E>
12010        for &'a Touch
12011    where
12012        ___E: ::fidl_next::Encoder + ?Sized,
12013        &'a Touch: ::fidl_next::Encode<crate::wire::Touch, ___E>,
12014    {
12015        #[inline]
12016        fn encode_option(
12017            this: ::core::option::Option<Self>,
12018            encoder: &mut ___E,
12019            out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Touch>>,
12020            _: (),
12021        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12022            if let Some(inner) = this {
12023                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
12024                ::fidl_next::wire::Box::encode_present(out);
12025            } else {
12026                ::fidl_next::wire::Box::encode_absent(out);
12027            }
12028
12029            Ok(())
12030        }
12031    }
12032
12033    impl ::fidl_next::FromWire<crate::wire::Touch> for Touch {
12034        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Touch, Self> = unsafe {
12035            ::fidl_next::CopyOptimization::enable_if(
12036                true
12037                    && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
12038                        .is_enabled()
12039                    && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
12040                        .is_enabled()
12041                    && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
12042                        .is_enabled()
12043                    && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
12044                        .is_enabled()
12045                    && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
12046                        .is_enabled(),
12047            )
12048        };
12049
12050        #[inline]
12051        fn from_wire(wire: crate::wire::Touch) -> Self {
12052            Self {
12053                finger_id: ::fidl_next::FromWire::from_wire(wire.finger_id),
12054
12055                x: ::fidl_next::FromWire::from_wire(wire.x),
12056
12057                y: ::fidl_next::FromWire::from_wire(wire.y),
12058
12059                width: ::fidl_next::FromWire::from_wire(wire.width),
12060
12061                height: ::fidl_next::FromWire::from_wire(wire.height),
12062            }
12063        }
12064    }
12065
12066    impl ::fidl_next::FromWireRef<crate::wire::Touch> for Touch {
12067        #[inline]
12068        fn from_wire_ref(wire: &crate::wire::Touch) -> Self {
12069            Self {
12070                finger_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.finger_id),
12071
12072                x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
12073
12074                y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
12075
12076                width: ::fidl_next::FromWireRef::from_wire_ref(&wire.width),
12077
12078                height: ::fidl_next::FromWireRef::from_wire_ref(&wire.height),
12079            }
12080        }
12081    }
12082
12083    #[doc = " Information about a device that issues touch event streams.\n"]
12084    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
12085    pub struct TouchDeviceInfo {
12086        pub id: ::core::option::Option<u32>,
12087    }
12088
12089    impl TouchDeviceInfo {
12090        fn __max_ordinal(&self) -> usize {
12091            if self.id.is_some() {
12092                return 1;
12093            }
12094
12095            0
12096        }
12097    }
12098
12099    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchDeviceInfo<'static>, ___E>
12100        for TouchDeviceInfo
12101    where
12102        ___E: ::fidl_next::Encoder + ?Sized,
12103    {
12104        #[inline]
12105        fn encode(
12106            mut self,
12107            encoder: &mut ___E,
12108            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchDeviceInfo<'static>>,
12109            _: (),
12110        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12111            ::fidl_next::munge!(let crate::wire::TouchDeviceInfo { table } = out);
12112
12113            let max_ord = self.__max_ordinal();
12114
12115            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
12116            ::fidl_next::Wire::zero_padding(&mut out);
12117
12118            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
12119                ::fidl_next::wire::Envelope,
12120            >(encoder, max_ord);
12121
12122            for i in 1..=max_ord {
12123                match i {
12124                    1 => {
12125                        if let Some(value) = self.id.take() {
12126                            ::fidl_next::wire::Envelope::encode_value::<
12127                                ::fidl_next::wire::Uint32,
12128                                ___E,
12129                            >(
12130                                value, preallocated.encoder, &mut out, ()
12131                            )?;
12132                        } else {
12133                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
12134                        }
12135                    }
12136
12137                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
12138                }
12139                unsafe {
12140                    preallocated.write_next(out.assume_init_ref());
12141                }
12142            }
12143
12144            ::fidl_next::wire::Table::encode_len(table, max_ord);
12145
12146            Ok(())
12147        }
12148    }
12149
12150    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TouchDeviceInfo<'static>, ___E>
12151        for &'a TouchDeviceInfo
12152    where
12153        ___E: ::fidl_next::Encoder + ?Sized,
12154    {
12155        #[inline]
12156        fn encode(
12157            self,
12158            encoder: &mut ___E,
12159            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchDeviceInfo<'static>>,
12160            _: (),
12161        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12162            ::fidl_next::munge!(let crate::wire::TouchDeviceInfo { table } = out);
12163
12164            let max_ord = self.__max_ordinal();
12165
12166            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
12167            ::fidl_next::Wire::zero_padding(&mut out);
12168
12169            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
12170                ::fidl_next::wire::Envelope,
12171            >(encoder, max_ord);
12172
12173            for i in 1..=max_ord {
12174                match i {
12175                    1 => {
12176                        if let Some(value) = &self.id {
12177                            ::fidl_next::wire::Envelope::encode_value::<
12178                                ::fidl_next::wire::Uint32,
12179                                ___E,
12180                            >(
12181                                value, preallocated.encoder, &mut out, ()
12182                            )?;
12183                        } else {
12184                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
12185                        }
12186                    }
12187
12188                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
12189                }
12190                unsafe {
12191                    preallocated.write_next(out.assume_init_ref());
12192                }
12193            }
12194
12195            ::fidl_next::wire::Table::encode_len(table, max_ord);
12196
12197            Ok(())
12198        }
12199    }
12200
12201    impl<'de> ::fidl_next::FromWire<crate::wire::TouchDeviceInfo<'de>> for TouchDeviceInfo {
12202        #[inline]
12203        fn from_wire(wire_: crate::wire::TouchDeviceInfo<'de>) -> Self {
12204            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
12205
12206            let id = wire_.table.get(1);
12207
12208            Self {
12209                id: id.map(|envelope| {
12210                    ::fidl_next::FromWire::from_wire(unsafe {
12211                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
12212                    })
12213                }),
12214            }
12215        }
12216    }
12217
12218    impl<'de> ::fidl_next::FromWireRef<crate::wire::TouchDeviceInfo<'de>> for TouchDeviceInfo {
12219        #[inline]
12220        fn from_wire_ref(wire: &crate::wire::TouchDeviceInfo<'de>) -> Self {
12221            Self {
12222                id: wire.table.get(1).map(|envelope| {
12223                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
12224                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
12225                    })
12226                }),
12227            }
12228        }
12229    }
12230
12231    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
12232    #[repr(C)]
12233    pub struct TouchscreenDescriptor {
12234        pub x: crate::natural::Axis,
12235
12236        pub y: crate::natural::Axis,
12237
12238        pub max_finger_id: u32,
12239    }
12240
12241    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchscreenDescriptor, ___E>
12242        for TouchscreenDescriptor
12243    where
12244        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12245    {
12246        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
12247            Self,
12248            crate::wire::TouchscreenDescriptor,
12249        > = unsafe {
12250            ::fidl_next::CopyOptimization::enable_if(
12251            true
12252
12253                && <
12254                    crate::natural::Axis as ::fidl_next::Encode<crate::wire::Axis, ___E>
12255                >::COPY_OPTIMIZATION.is_enabled()
12256
12257                && <
12258                    crate::natural::Axis as ::fidl_next::Encode<crate::wire::Axis, ___E>
12259                >::COPY_OPTIMIZATION.is_enabled()
12260
12261                && <
12262                    u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
12263                >::COPY_OPTIMIZATION.is_enabled()
12264
12265        )
12266        };
12267
12268        #[inline]
12269        fn encode(
12270            self,
12271            encoder_: &mut ___E,
12272            out_: &mut ::core::mem::MaybeUninit<crate::wire::TouchscreenDescriptor>,
12273            _: (),
12274        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12275            ::fidl_next::munge! {
12276                let crate::wire::TouchscreenDescriptor {
12277                    x,
12278                    y,
12279                    max_finger_id,
12280
12281                } = out_;
12282            }
12283
12284            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
12285
12286            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
12287
12288            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
12289
12290            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
12291
12292            ::fidl_next::Encode::encode(self.max_finger_id, encoder_, max_finger_id, ())?;
12293
12294            let mut _field =
12295                unsafe { ::fidl_next::Slot::new_unchecked(max_finger_id.as_mut_ptr()) };
12296
12297            Ok(())
12298        }
12299    }
12300
12301    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TouchscreenDescriptor, ___E>
12302        for &'a TouchscreenDescriptor
12303    where
12304        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12305    {
12306        #[inline]
12307        fn encode(
12308            self,
12309            encoder_: &mut ___E,
12310            out_: &mut ::core::mem::MaybeUninit<crate::wire::TouchscreenDescriptor>,
12311            _: (),
12312        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12313            ::fidl_next::munge! {
12314                let crate::wire::TouchscreenDescriptor {
12315                    x,
12316                    y,
12317                    max_finger_id,
12318
12319                } = out_;
12320            }
12321
12322            ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
12323
12324            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
12325
12326            ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
12327
12328            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
12329
12330            ::fidl_next::Encode::encode(&self.max_finger_id, encoder_, max_finger_id, ())?;
12331
12332            let mut _field =
12333                unsafe { ::fidl_next::Slot::new_unchecked(max_finger_id.as_mut_ptr()) };
12334
12335            Ok(())
12336        }
12337    }
12338
12339    unsafe impl<___E>
12340        ::fidl_next::EncodeOption<
12341            ::fidl_next::wire::Box<'static, crate::wire::TouchscreenDescriptor>,
12342            ___E,
12343        > for TouchscreenDescriptor
12344    where
12345        ___E: ::fidl_next::Encoder + ?Sized,
12346        TouchscreenDescriptor: ::fidl_next::Encode<crate::wire::TouchscreenDescriptor, ___E>,
12347    {
12348        #[inline]
12349        fn encode_option(
12350            this: ::core::option::Option<Self>,
12351            encoder: &mut ___E,
12352            out: &mut ::core::mem::MaybeUninit<
12353                ::fidl_next::wire::Box<'static, crate::wire::TouchscreenDescriptor>,
12354            >,
12355            _: (),
12356        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12357            if let Some(inner) = this {
12358                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
12359                ::fidl_next::wire::Box::encode_present(out);
12360            } else {
12361                ::fidl_next::wire::Box::encode_absent(out);
12362            }
12363
12364            Ok(())
12365        }
12366    }
12367
12368    unsafe impl<'a, ___E>
12369        ::fidl_next::EncodeOption<
12370            ::fidl_next::wire::Box<'static, crate::wire::TouchscreenDescriptor>,
12371            ___E,
12372        > for &'a TouchscreenDescriptor
12373    where
12374        ___E: ::fidl_next::Encoder + ?Sized,
12375        &'a TouchscreenDescriptor: ::fidl_next::Encode<crate::wire::TouchscreenDescriptor, ___E>,
12376    {
12377        #[inline]
12378        fn encode_option(
12379            this: ::core::option::Option<Self>,
12380            encoder: &mut ___E,
12381            out: &mut ::core::mem::MaybeUninit<
12382                ::fidl_next::wire::Box<'static, crate::wire::TouchscreenDescriptor>,
12383            >,
12384            _: (),
12385        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12386            if let Some(inner) = this {
12387                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
12388                ::fidl_next::wire::Box::encode_present(out);
12389            } else {
12390                ::fidl_next::wire::Box::encode_absent(out);
12391            }
12392
12393            Ok(())
12394        }
12395    }
12396
12397    impl ::fidl_next::FromWire<crate::wire::TouchscreenDescriptor> for TouchscreenDescriptor {
12398        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
12399            crate::wire::TouchscreenDescriptor,
12400            Self,
12401        > = unsafe {
12402            ::fidl_next::CopyOptimization::enable_if(
12403            true
12404
12405                && <
12406                    crate::natural::Axis as ::fidl_next::FromWire<crate::wire::Axis>
12407                >::COPY_OPTIMIZATION.is_enabled()
12408
12409                && <
12410                    crate::natural::Axis as ::fidl_next::FromWire<crate::wire::Axis>
12411                >::COPY_OPTIMIZATION.is_enabled()
12412
12413                && <
12414                    u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>
12415                >::COPY_OPTIMIZATION.is_enabled()
12416
12417        )
12418        };
12419
12420        #[inline]
12421        fn from_wire(wire: crate::wire::TouchscreenDescriptor) -> Self {
12422            Self {
12423                x: ::fidl_next::FromWire::from_wire(wire.x),
12424
12425                y: ::fidl_next::FromWire::from_wire(wire.y),
12426
12427                max_finger_id: ::fidl_next::FromWire::from_wire(wire.max_finger_id),
12428            }
12429        }
12430    }
12431
12432    impl ::fidl_next::FromWireRef<crate::wire::TouchscreenDescriptor> for TouchscreenDescriptor {
12433        #[inline]
12434        fn from_wire_ref(wire: &crate::wire::TouchscreenDescriptor) -> Self {
12435            Self {
12436                x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
12437
12438                y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
12439
12440                max_finger_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_finger_id),
12441            }
12442        }
12443    }
12444
12445    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
12446    pub struct TouchscreenReport {
12447        pub touches: ::std::vec::Vec<crate::natural::Touch>,
12448    }
12449
12450    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchscreenReport<'static>, ___E>
12451        for TouchscreenReport
12452    where
12453        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12454        ___E: ::fidl_next::Encoder,
12455    {
12456        #[inline]
12457        fn encode(
12458            self,
12459            encoder_: &mut ___E,
12460            out_: &mut ::core::mem::MaybeUninit<crate::wire::TouchscreenReport<'static>>,
12461            _: (),
12462        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12463            ::fidl_next::munge! {
12464                let crate::wire::TouchscreenReport {
12465                    touches,
12466
12467                } = out_;
12468            }
12469
12470            ::fidl_next::Encode::encode(self.touches, encoder_, touches, (4294967295, ()))?;
12471
12472            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(touches.as_mut_ptr()) };
12473            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
12474
12475            Ok(())
12476        }
12477    }
12478
12479    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TouchscreenReport<'static>, ___E>
12480        for &'a TouchscreenReport
12481    where
12482        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12483        ___E: ::fidl_next::Encoder,
12484    {
12485        #[inline]
12486        fn encode(
12487            self,
12488            encoder_: &mut ___E,
12489            out_: &mut ::core::mem::MaybeUninit<crate::wire::TouchscreenReport<'static>>,
12490            _: (),
12491        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12492            ::fidl_next::munge! {
12493                let crate::wire::TouchscreenReport {
12494                    touches,
12495
12496                } = out_;
12497            }
12498
12499            ::fidl_next::Encode::encode(&self.touches, encoder_, touches, (4294967295, ()))?;
12500
12501            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(touches.as_mut_ptr()) };
12502            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
12503
12504            Ok(())
12505        }
12506    }
12507
12508    unsafe impl<___E>
12509        ::fidl_next::EncodeOption<
12510            ::fidl_next::wire::Box<'static, crate::wire::TouchscreenReport<'static>>,
12511            ___E,
12512        > for TouchscreenReport
12513    where
12514        ___E: ::fidl_next::Encoder + ?Sized,
12515        TouchscreenReport: ::fidl_next::Encode<crate::wire::TouchscreenReport<'static>, ___E>,
12516    {
12517        #[inline]
12518        fn encode_option(
12519            this: ::core::option::Option<Self>,
12520            encoder: &mut ___E,
12521            out: &mut ::core::mem::MaybeUninit<
12522                ::fidl_next::wire::Box<'static, crate::wire::TouchscreenReport<'static>>,
12523            >,
12524            _: (),
12525        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12526            if let Some(inner) = this {
12527                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
12528                ::fidl_next::wire::Box::encode_present(out);
12529            } else {
12530                ::fidl_next::wire::Box::encode_absent(out);
12531            }
12532
12533            Ok(())
12534        }
12535    }
12536
12537    unsafe impl<'a, ___E>
12538        ::fidl_next::EncodeOption<
12539            ::fidl_next::wire::Box<'static, crate::wire::TouchscreenReport<'static>>,
12540            ___E,
12541        > for &'a TouchscreenReport
12542    where
12543        ___E: ::fidl_next::Encoder + ?Sized,
12544        &'a TouchscreenReport: ::fidl_next::Encode<crate::wire::TouchscreenReport<'static>, ___E>,
12545    {
12546        #[inline]
12547        fn encode_option(
12548            this: ::core::option::Option<Self>,
12549            encoder: &mut ___E,
12550            out: &mut ::core::mem::MaybeUninit<
12551                ::fidl_next::wire::Box<'static, crate::wire::TouchscreenReport<'static>>,
12552            >,
12553            _: (),
12554        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12555            if let Some(inner) = this {
12556                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
12557                ::fidl_next::wire::Box::encode_present(out);
12558            } else {
12559                ::fidl_next::wire::Box::encode_absent(out);
12560            }
12561
12562            Ok(())
12563        }
12564    }
12565
12566    impl<'de> ::fidl_next::FromWire<crate::wire::TouchscreenReport<'de>> for TouchscreenReport {
12567        #[inline]
12568        fn from_wire(wire: crate::wire::TouchscreenReport<'de>) -> Self {
12569            Self { touches: ::fidl_next::FromWire::from_wire(wire.touches) }
12570        }
12571    }
12572
12573    impl<'de> ::fidl_next::FromWireRef<crate::wire::TouchscreenReport<'de>> for TouchscreenReport {
12574        #[inline]
12575        fn from_wire_ref(wire: &crate::wire::TouchscreenReport<'de>) -> Self {
12576            Self { touches: ::fidl_next::FromWireRef::from_wire_ref(&wire.touches) }
12577        }
12578    }
12579}
12580
12581pub mod wire {
12582
12583    /// The wire type corresponding to [`Action`].
12584    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12585    #[repr(transparent)]
12586    pub struct Action {
12587        pub(crate) value: ::fidl_next::wire::Uint32,
12588    }
12589
12590    impl ::fidl_next::Constrained for Action {
12591        type Constraint = ();
12592
12593        fn validate(
12594            _: ::fidl_next::Slot<'_, Self>,
12595            _: Self::Constraint,
12596        ) -> Result<(), ::fidl_next::ValidationError> {
12597            Ok(())
12598        }
12599    }
12600
12601    unsafe impl ::fidl_next::Wire for Action {
12602        type Narrowed<'de> = Self;
12603
12604        #[inline]
12605        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12606            // Wire enums have no padding
12607        }
12608    }
12609
12610    impl Action {
12611        pub const ADDED: Action = Action { value: ::fidl_next::wire::Uint32(1) };
12612
12613        pub const UPDATED: Action = Action { value: ::fidl_next::wire::Uint32(2) };
12614
12615        pub const REMOVED: Action = Action { value: ::fidl_next::wire::Uint32(3) };
12616    }
12617
12618    unsafe impl<___D> ::fidl_next::Decode<___D> for Action
12619    where
12620        ___D: ?Sized,
12621    {
12622        fn decode(
12623            slot: ::fidl_next::Slot<'_, Self>,
12624            _: &mut ___D,
12625            _: (),
12626        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12627            Ok(())
12628        }
12629    }
12630
12631    impl ::core::convert::From<crate::natural::Action> for Action {
12632        fn from(natural: crate::natural::Action) -> Self {
12633            match natural {
12634                crate::natural::Action::Added => Action::ADDED,
12635
12636                crate::natural::Action::Updated => Action::UPDATED,
12637
12638                crate::natural::Action::Removed => Action::REMOVED,
12639
12640                crate::natural::Action::UnknownOrdinal_(value) => {
12641                    Action { value: ::fidl_next::wire::Uint32::from(value) }
12642                }
12643            }
12644        }
12645    }
12646
12647    impl ::fidl_next::IntoNatural for Action {
12648        type Natural = crate::natural::Action;
12649    }
12650
12651    /// The wire type corresponding to [`Range`].
12652    #[derive(Clone, Debug)]
12653    #[repr(C)]
12654    pub struct Range {
12655        pub min: ::fidl_next::wire::Int32,
12656
12657        pub max: ::fidl_next::wire::Int32,
12658    }
12659
12660    static_assertions::const_assert_eq!(std::mem::size_of::<Range>(), 8);
12661    static_assertions::const_assert_eq!(std::mem::align_of::<Range>(), 4);
12662
12663    static_assertions::const_assert_eq!(std::mem::offset_of!(Range, min), 0);
12664
12665    static_assertions::const_assert_eq!(std::mem::offset_of!(Range, max), 4);
12666
12667    impl ::fidl_next::Constrained for Range {
12668        type Constraint = ();
12669
12670        fn validate(
12671            _: ::fidl_next::Slot<'_, Self>,
12672            _: Self::Constraint,
12673        ) -> Result<(), ::fidl_next::ValidationError> {
12674            Ok(())
12675        }
12676    }
12677
12678    unsafe impl ::fidl_next::Wire for Range {
12679        type Narrowed<'de> = Range;
12680
12681        #[inline]
12682        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12683            ::fidl_next::munge! {
12684                let Self {
12685                    min,
12686                    max,
12687
12688                } = &mut *out_;
12689            }
12690
12691            ::fidl_next::Wire::zero_padding(min);
12692
12693            ::fidl_next::Wire::zero_padding(max);
12694        }
12695    }
12696
12697    unsafe impl<___D> ::fidl_next::Decode<___D> for Range
12698    where
12699        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12700    {
12701        fn decode(
12702            slot_: ::fidl_next::Slot<'_, Self>,
12703            decoder_: &mut ___D,
12704            _: (),
12705        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12706            ::fidl_next::munge! {
12707                let Self {
12708                    mut min,
12709                    mut max,
12710
12711                } = slot_;
12712            }
12713
12714            let _field = min.as_mut();
12715
12716            ::fidl_next::Decode::decode(min.as_mut(), decoder_, ())?;
12717
12718            let _field = max.as_mut();
12719
12720            ::fidl_next::Decode::decode(max.as_mut(), decoder_, ())?;
12721
12722            Ok(())
12723        }
12724    }
12725
12726    impl ::fidl_next::IntoNatural for Range {
12727        type Natural = crate::natural::Range;
12728    }
12729
12730    /// The wire type corresponding to [`AxisScale`].
12731    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12732    #[repr(transparent)]
12733    pub struct AxisScale {
12734        pub(crate) value: ::fidl_next::wire::Uint32,
12735    }
12736
12737    impl ::fidl_next::Constrained for AxisScale {
12738        type Constraint = ();
12739
12740        fn validate(
12741            _: ::fidl_next::Slot<'_, Self>,
12742            _: Self::Constraint,
12743        ) -> Result<(), ::fidl_next::ValidationError> {
12744            Ok(())
12745        }
12746    }
12747
12748    unsafe impl ::fidl_next::Wire for AxisScale {
12749        type Narrowed<'de> = Self;
12750
12751        #[inline]
12752        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12753            // Wire enums have no padding
12754        }
12755    }
12756
12757    impl AxisScale {
12758        pub const LINEAR: AxisScale = AxisScale { value: ::fidl_next::wire::Uint32(0) };
12759
12760        pub const LOGARITHMIC: AxisScale = AxisScale { value: ::fidl_next::wire::Uint32(1) };
12761    }
12762
12763    unsafe impl<___D> ::fidl_next::Decode<___D> for AxisScale
12764    where
12765        ___D: ?Sized,
12766    {
12767        fn decode(
12768            slot: ::fidl_next::Slot<'_, Self>,
12769            _: &mut ___D,
12770            _: (),
12771        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12772            Ok(())
12773        }
12774    }
12775
12776    impl ::core::convert::From<crate::natural::AxisScale> for AxisScale {
12777        fn from(natural: crate::natural::AxisScale) -> Self {
12778            match natural {
12779                crate::natural::AxisScale::Linear => AxisScale::LINEAR,
12780
12781                crate::natural::AxisScale::Logarithmic => AxisScale::LOGARITHMIC,
12782
12783                crate::natural::AxisScale::UnknownOrdinal_(value) => {
12784                    AxisScale { value: ::fidl_next::wire::Uint32::from(value) }
12785                }
12786            }
12787        }
12788    }
12789
12790    impl ::fidl_next::IntoNatural for AxisScale {
12791        type Natural = crate::natural::AxisScale;
12792    }
12793
12794    /// The wire type corresponding to [`Axis`].
12795    #[derive(Clone, Debug)]
12796    #[repr(C)]
12797    pub struct Axis {
12798        pub range: crate::wire::Range,
12799
12800        pub resolution: ::fidl_next::wire::Int32,
12801
12802        pub scale: crate::wire::AxisScale,
12803    }
12804
12805    static_assertions::const_assert_eq!(std::mem::size_of::<Axis>(), 16);
12806    static_assertions::const_assert_eq!(std::mem::align_of::<Axis>(), 4);
12807
12808    static_assertions::const_assert_eq!(std::mem::offset_of!(Axis, range), 0);
12809
12810    static_assertions::const_assert_eq!(std::mem::offset_of!(Axis, resolution), 8);
12811
12812    static_assertions::const_assert_eq!(std::mem::offset_of!(Axis, scale), 12);
12813
12814    impl ::fidl_next::Constrained for Axis {
12815        type Constraint = ();
12816
12817        fn validate(
12818            _: ::fidl_next::Slot<'_, Self>,
12819            _: Self::Constraint,
12820        ) -> Result<(), ::fidl_next::ValidationError> {
12821            Ok(())
12822        }
12823    }
12824
12825    unsafe impl ::fidl_next::Wire for Axis {
12826        type Narrowed<'de> = Axis;
12827
12828        #[inline]
12829        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12830            ::fidl_next::munge! {
12831                let Self {
12832                    range,
12833                    resolution,
12834                    scale,
12835
12836                } = &mut *out_;
12837            }
12838
12839            ::fidl_next::Wire::zero_padding(range);
12840
12841            ::fidl_next::Wire::zero_padding(resolution);
12842
12843            ::fidl_next::Wire::zero_padding(scale);
12844        }
12845    }
12846
12847    unsafe impl<___D> ::fidl_next::Decode<___D> for Axis
12848    where
12849        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12850    {
12851        fn decode(
12852            slot_: ::fidl_next::Slot<'_, Self>,
12853            decoder_: &mut ___D,
12854            _: (),
12855        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12856            ::fidl_next::munge! {
12857                let Self {
12858                    mut range,
12859                    mut resolution,
12860                    mut scale,
12861
12862                } = slot_;
12863            }
12864
12865            let _field = range.as_mut();
12866
12867            ::fidl_next::Decode::decode(range.as_mut(), decoder_, ())?;
12868
12869            let _field = resolution.as_mut();
12870
12871            ::fidl_next::Decode::decode(resolution.as_mut(), decoder_, ())?;
12872
12873            let _field = scale.as_mut();
12874
12875            ::fidl_next::Decode::decode(scale.as_mut(), decoder_, ())?;
12876
12877            Ok(())
12878        }
12879    }
12880
12881    impl ::fidl_next::IntoNatural for Axis {
12882        type Natural = crate::natural::Axis;
12883    }
12884
12885    /// The wire type corresponding to [`RangeF`].
12886    #[derive(Clone, Debug)]
12887    #[repr(C)]
12888    pub struct RangeF {
12889        pub min: ::fidl_next::wire::Float32,
12890
12891        pub max: ::fidl_next::wire::Float32,
12892    }
12893
12894    static_assertions::const_assert_eq!(std::mem::size_of::<RangeF>(), 8);
12895    static_assertions::const_assert_eq!(std::mem::align_of::<RangeF>(), 4);
12896
12897    static_assertions::const_assert_eq!(std::mem::offset_of!(RangeF, min), 0);
12898
12899    static_assertions::const_assert_eq!(std::mem::offset_of!(RangeF, max), 4);
12900
12901    impl ::fidl_next::Constrained for RangeF {
12902        type Constraint = ();
12903
12904        fn validate(
12905            _: ::fidl_next::Slot<'_, Self>,
12906            _: Self::Constraint,
12907        ) -> Result<(), ::fidl_next::ValidationError> {
12908            Ok(())
12909        }
12910    }
12911
12912    unsafe impl ::fidl_next::Wire for RangeF {
12913        type Narrowed<'de> = RangeF;
12914
12915        #[inline]
12916        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12917            ::fidl_next::munge! {
12918                let Self {
12919                    min,
12920                    max,
12921
12922                } = &mut *out_;
12923            }
12924
12925            ::fidl_next::Wire::zero_padding(min);
12926
12927            ::fidl_next::Wire::zero_padding(max);
12928        }
12929    }
12930
12931    unsafe impl<___D> ::fidl_next::Decode<___D> for RangeF
12932    where
12933        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12934    {
12935        fn decode(
12936            slot_: ::fidl_next::Slot<'_, Self>,
12937            decoder_: &mut ___D,
12938            _: (),
12939        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12940            ::fidl_next::munge! {
12941                let Self {
12942                    mut min,
12943                    mut max,
12944
12945                } = slot_;
12946            }
12947
12948            let _field = min.as_mut();
12949
12950            ::fidl_next::Decode::decode(min.as_mut(), decoder_, ())?;
12951
12952            let _field = max.as_mut();
12953
12954            ::fidl_next::Decode::decode(max.as_mut(), decoder_, ())?;
12955
12956            Ok(())
12957        }
12958    }
12959
12960    impl ::fidl_next::IntoNatural for RangeF {
12961        type Natural = crate::natural::RangeF;
12962    }
12963
12964    /// The wire type corresponding to [`AxisF`].
12965    #[derive(Clone, Debug)]
12966    #[repr(C)]
12967    pub struct AxisF {
12968        pub range: crate::wire::RangeF,
12969
12970        pub resolution: ::fidl_next::wire::Float32,
12971
12972        pub scale: crate::wire::AxisScale,
12973    }
12974
12975    static_assertions::const_assert_eq!(std::mem::size_of::<AxisF>(), 16);
12976    static_assertions::const_assert_eq!(std::mem::align_of::<AxisF>(), 4);
12977
12978    static_assertions::const_assert_eq!(std::mem::offset_of!(AxisF, range), 0);
12979
12980    static_assertions::const_assert_eq!(std::mem::offset_of!(AxisF, resolution), 8);
12981
12982    static_assertions::const_assert_eq!(std::mem::offset_of!(AxisF, scale), 12);
12983
12984    impl ::fidl_next::Constrained for AxisF {
12985        type Constraint = ();
12986
12987        fn validate(
12988            _: ::fidl_next::Slot<'_, Self>,
12989            _: Self::Constraint,
12990        ) -> Result<(), ::fidl_next::ValidationError> {
12991            Ok(())
12992        }
12993    }
12994
12995    unsafe impl ::fidl_next::Wire for AxisF {
12996        type Narrowed<'de> = AxisF;
12997
12998        #[inline]
12999        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13000            ::fidl_next::munge! {
13001                let Self {
13002                    range,
13003                    resolution,
13004                    scale,
13005
13006                } = &mut *out_;
13007            }
13008
13009            ::fidl_next::Wire::zero_padding(range);
13010
13011            ::fidl_next::Wire::zero_padding(resolution);
13012
13013            ::fidl_next::Wire::zero_padding(scale);
13014        }
13015    }
13016
13017    unsafe impl<___D> ::fidl_next::Decode<___D> for AxisF
13018    where
13019        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13020    {
13021        fn decode(
13022            slot_: ::fidl_next::Slot<'_, Self>,
13023            decoder_: &mut ___D,
13024            _: (),
13025        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13026            ::fidl_next::munge! {
13027                let Self {
13028                    mut range,
13029                    mut resolution,
13030                    mut scale,
13031
13032                } = slot_;
13033            }
13034
13035            let _field = range.as_mut();
13036
13037            ::fidl_next::Decode::decode(range.as_mut(), decoder_, ())?;
13038
13039            let _field = resolution.as_mut();
13040
13041            ::fidl_next::Decode::decode(resolution.as_mut(), decoder_, ())?;
13042
13043            let _field = scale.as_mut();
13044
13045            ::fidl_next::Decode::decode(scale.as_mut(), decoder_, ())?;
13046
13047            Ok(())
13048        }
13049    }
13050
13051    impl ::fidl_next::IntoNatural for AxisF {
13052        type Natural = crate::natural::AxisF;
13053    }
13054
13055    /// The wire type corresponding to [`PointerEventType`].
13056    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
13057    #[repr(transparent)]
13058    pub struct PointerEventType {
13059        pub(crate) value: ::fidl_next::wire::Uint32,
13060    }
13061
13062    impl ::fidl_next::Constrained for PointerEventType {
13063        type Constraint = ();
13064
13065        fn validate(
13066            _: ::fidl_next::Slot<'_, Self>,
13067            _: Self::Constraint,
13068        ) -> Result<(), ::fidl_next::ValidationError> {
13069            Ok(())
13070        }
13071    }
13072
13073    unsafe impl ::fidl_next::Wire for PointerEventType {
13074        type Narrowed<'de> = Self;
13075
13076        #[inline]
13077        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13078            // Wire enums have no padding
13079        }
13080    }
13081
13082    impl PointerEventType {
13083        pub const TOUCH: PointerEventType =
13084            PointerEventType { value: ::fidl_next::wire::Uint32(0) };
13085
13086        pub const STYLUS: PointerEventType =
13087            PointerEventType { value: ::fidl_next::wire::Uint32(1) };
13088
13089        pub const INVERTED_STYLUS: PointerEventType =
13090            PointerEventType { value: ::fidl_next::wire::Uint32(2) };
13091
13092        pub const MOUSE: PointerEventType =
13093            PointerEventType { value: ::fidl_next::wire::Uint32(3) };
13094    }
13095
13096    unsafe impl<___D> ::fidl_next::Decode<___D> for PointerEventType
13097    where
13098        ___D: ?Sized,
13099    {
13100        fn decode(
13101            slot: ::fidl_next::Slot<'_, Self>,
13102            _: &mut ___D,
13103            _: (),
13104        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13105            ::fidl_next::munge!(let Self { value } = slot);
13106
13107            match u32::from(*value) {
13108                0 | 1 | 2 | 3 => (),
13109                unknown => {
13110                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
13111                }
13112            }
13113
13114            Ok(())
13115        }
13116    }
13117
13118    impl ::core::convert::From<crate::natural::PointerEventType> for PointerEventType {
13119        fn from(natural: crate::natural::PointerEventType) -> Self {
13120            match natural {
13121                crate::natural::PointerEventType::Touch => PointerEventType::TOUCH,
13122
13123                crate::natural::PointerEventType::Stylus => PointerEventType::STYLUS,
13124
13125                crate::natural::PointerEventType::InvertedStylus => {
13126                    PointerEventType::INVERTED_STYLUS
13127                }
13128
13129                crate::natural::PointerEventType::Mouse => PointerEventType::MOUSE,
13130            }
13131        }
13132    }
13133
13134    impl ::fidl_next::IntoNatural for PointerEventType {
13135        type Natural = crate::natural::PointerEventType;
13136    }
13137
13138    /// The wire type corresponding to [`PointerEventPhase`].
13139    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
13140    #[repr(transparent)]
13141    pub struct PointerEventPhase {
13142        pub(crate) value: ::fidl_next::wire::Uint32,
13143    }
13144
13145    impl ::fidl_next::Constrained for PointerEventPhase {
13146        type Constraint = ();
13147
13148        fn validate(
13149            _: ::fidl_next::Slot<'_, Self>,
13150            _: Self::Constraint,
13151        ) -> Result<(), ::fidl_next::ValidationError> {
13152            Ok(())
13153        }
13154    }
13155
13156    unsafe impl ::fidl_next::Wire for PointerEventPhase {
13157        type Narrowed<'de> = Self;
13158
13159        #[inline]
13160        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13161            // Wire enums have no padding
13162        }
13163    }
13164
13165    impl PointerEventPhase {
13166        pub const ADD: PointerEventPhase =
13167            PointerEventPhase { value: ::fidl_next::wire::Uint32(0) };
13168
13169        pub const HOVER: PointerEventPhase =
13170            PointerEventPhase { value: ::fidl_next::wire::Uint32(1) };
13171
13172        pub const DOWN: PointerEventPhase =
13173            PointerEventPhase { value: ::fidl_next::wire::Uint32(2) };
13174
13175        pub const MOVE: PointerEventPhase =
13176            PointerEventPhase { value: ::fidl_next::wire::Uint32(3) };
13177
13178        pub const UP: PointerEventPhase = PointerEventPhase { value: ::fidl_next::wire::Uint32(4) };
13179
13180        pub const REMOVE: PointerEventPhase =
13181            PointerEventPhase { value: ::fidl_next::wire::Uint32(5) };
13182
13183        pub const CANCEL: PointerEventPhase =
13184            PointerEventPhase { value: ::fidl_next::wire::Uint32(6) };
13185    }
13186
13187    unsafe impl<___D> ::fidl_next::Decode<___D> for PointerEventPhase
13188    where
13189        ___D: ?Sized,
13190    {
13191        fn decode(
13192            slot: ::fidl_next::Slot<'_, Self>,
13193            _: &mut ___D,
13194            _: (),
13195        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13196            ::fidl_next::munge!(let Self { value } = slot);
13197
13198            match u32::from(*value) {
13199                0 | 1 | 2 | 3 | 4 | 5 | 6 => (),
13200                unknown => {
13201                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
13202                }
13203            }
13204
13205            Ok(())
13206        }
13207    }
13208
13209    impl ::core::convert::From<crate::natural::PointerEventPhase> for PointerEventPhase {
13210        fn from(natural: crate::natural::PointerEventPhase) -> Self {
13211            match natural {
13212                crate::natural::PointerEventPhase::Add => PointerEventPhase::ADD,
13213
13214                crate::natural::PointerEventPhase::Hover => PointerEventPhase::HOVER,
13215
13216                crate::natural::PointerEventPhase::Down => PointerEventPhase::DOWN,
13217
13218                crate::natural::PointerEventPhase::Move => PointerEventPhase::MOVE,
13219
13220                crate::natural::PointerEventPhase::Up => PointerEventPhase::UP,
13221
13222                crate::natural::PointerEventPhase::Remove => PointerEventPhase::REMOVE,
13223
13224                crate::natural::PointerEventPhase::Cancel => PointerEventPhase::CANCEL,
13225            }
13226        }
13227    }
13228
13229    impl ::fidl_next::IntoNatural for PointerEventPhase {
13230        type Natural = crate::natural::PointerEventPhase;
13231    }
13232
13233    /// The wire type corresponding to [`PointerEvent`].
13234    #[derive(Clone, Debug)]
13235    #[repr(C)]
13236    pub struct PointerEvent {
13237        pub event_time: ::fidl_next::wire::Uint64,
13238
13239        pub device_id: ::fidl_next::wire::Uint32,
13240
13241        pub pointer_id: ::fidl_next::wire::Uint32,
13242
13243        pub type_: crate::wire::PointerEventType,
13244
13245        pub phase: crate::wire::PointerEventPhase,
13246
13247        pub x: ::fidl_next::wire::Float32,
13248
13249        pub y: ::fidl_next::wire::Float32,
13250
13251        pub radius_major: ::fidl_next::wire::Float32,
13252
13253        pub radius_minor: ::fidl_next::wire::Float32,
13254
13255        pub buttons: ::fidl_next::wire::Uint32,
13256    }
13257
13258    static_assertions::const_assert_eq!(std::mem::size_of::<PointerEvent>(), 48);
13259    static_assertions::const_assert_eq!(std::mem::align_of::<PointerEvent>(), 8);
13260
13261    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, event_time), 0);
13262
13263    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, device_id), 8);
13264
13265    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, pointer_id), 12);
13266
13267    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, type_), 16);
13268
13269    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, phase), 20);
13270
13271    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, x), 24);
13272
13273    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, y), 28);
13274
13275    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, radius_major), 32);
13276
13277    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, radius_minor), 36);
13278
13279    static_assertions::const_assert_eq!(std::mem::offset_of!(PointerEvent, buttons), 40);
13280
13281    impl ::fidl_next::Constrained for PointerEvent {
13282        type Constraint = ();
13283
13284        fn validate(
13285            _: ::fidl_next::Slot<'_, Self>,
13286            _: Self::Constraint,
13287        ) -> Result<(), ::fidl_next::ValidationError> {
13288            Ok(())
13289        }
13290    }
13291
13292    unsafe impl ::fidl_next::Wire for PointerEvent {
13293        type Narrowed<'de> = PointerEvent;
13294
13295        #[inline]
13296        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13297            ::fidl_next::munge! {
13298                let Self {
13299                    event_time,
13300                    device_id,
13301                    pointer_id,
13302                    type_,
13303                    phase,
13304                    x,
13305                    y,
13306                    radius_major,
13307                    radius_minor,
13308                    buttons,
13309
13310                } = &mut *out_;
13311            }
13312
13313            ::fidl_next::Wire::zero_padding(event_time);
13314
13315            ::fidl_next::Wire::zero_padding(device_id);
13316
13317            ::fidl_next::Wire::zero_padding(pointer_id);
13318
13319            ::fidl_next::Wire::zero_padding(type_);
13320
13321            ::fidl_next::Wire::zero_padding(phase);
13322
13323            ::fidl_next::Wire::zero_padding(x);
13324
13325            ::fidl_next::Wire::zero_padding(y);
13326
13327            ::fidl_next::Wire::zero_padding(radius_major);
13328
13329            ::fidl_next::Wire::zero_padding(radius_minor);
13330
13331            ::fidl_next::Wire::zero_padding(buttons);
13332
13333            unsafe {
13334                out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
13335            }
13336        }
13337    }
13338
13339    unsafe impl<___D> ::fidl_next::Decode<___D> for PointerEvent
13340    where
13341        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13342    {
13343        fn decode(
13344            slot_: ::fidl_next::Slot<'_, Self>,
13345            decoder_: &mut ___D,
13346            _: (),
13347        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13348            if slot_.as_bytes()[44..48] != [0u8; 4] {
13349                return Err(::fidl_next::DecodeError::InvalidPadding);
13350            }
13351
13352            ::fidl_next::munge! {
13353                let Self {
13354                    mut event_time,
13355                    mut device_id,
13356                    mut pointer_id,
13357                    mut type_,
13358                    mut phase,
13359                    mut x,
13360                    mut y,
13361                    mut radius_major,
13362                    mut radius_minor,
13363                    mut buttons,
13364
13365                } = slot_;
13366            }
13367
13368            let _field = event_time.as_mut();
13369
13370            ::fidl_next::Decode::decode(event_time.as_mut(), decoder_, ())?;
13371
13372            let _field = device_id.as_mut();
13373
13374            ::fidl_next::Decode::decode(device_id.as_mut(), decoder_, ())?;
13375
13376            let _field = pointer_id.as_mut();
13377
13378            ::fidl_next::Decode::decode(pointer_id.as_mut(), decoder_, ())?;
13379
13380            let _field = type_.as_mut();
13381
13382            ::fidl_next::Decode::decode(type_.as_mut(), decoder_, ())?;
13383
13384            let _field = phase.as_mut();
13385
13386            ::fidl_next::Decode::decode(phase.as_mut(), decoder_, ())?;
13387
13388            let _field = x.as_mut();
13389
13390            ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
13391
13392            let _field = y.as_mut();
13393
13394            ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
13395
13396            let _field = radius_major.as_mut();
13397
13398            ::fidl_next::Decode::decode(radius_major.as_mut(), decoder_, ())?;
13399
13400            let _field = radius_minor.as_mut();
13401
13402            ::fidl_next::Decode::decode(radius_minor.as_mut(), decoder_, ())?;
13403
13404            let _field = buttons.as_mut();
13405
13406            ::fidl_next::Decode::decode(buttons.as_mut(), decoder_, ())?;
13407
13408            Ok(())
13409        }
13410    }
13411
13412    impl ::fidl_next::IntoNatural for PointerEvent {
13413        type Natural = crate::natural::PointerEvent;
13414    }
13415
13416    /// The wire type corresponding to [`SendPointerInputCmd`].
13417    #[derive(Clone, Debug)]
13418    #[repr(C)]
13419    pub struct SendPointerInputCmd {
13420        pub compositor_id: ::fidl_next::wire::Uint32,
13421
13422        pub pointer_event: crate::wire::PointerEvent,
13423    }
13424
13425    static_assertions::const_assert_eq!(std::mem::size_of::<SendPointerInputCmd>(), 56);
13426    static_assertions::const_assert_eq!(std::mem::align_of::<SendPointerInputCmd>(), 8);
13427
13428    static_assertions::const_assert_eq!(
13429        std::mem::offset_of!(SendPointerInputCmd, compositor_id),
13430        0
13431    );
13432
13433    static_assertions::const_assert_eq!(
13434        std::mem::offset_of!(SendPointerInputCmd, pointer_event),
13435        8
13436    );
13437
13438    impl ::fidl_next::Constrained for SendPointerInputCmd {
13439        type Constraint = ();
13440
13441        fn validate(
13442            _: ::fidl_next::Slot<'_, Self>,
13443            _: Self::Constraint,
13444        ) -> Result<(), ::fidl_next::ValidationError> {
13445            Ok(())
13446        }
13447    }
13448
13449    unsafe impl ::fidl_next::Wire for SendPointerInputCmd {
13450        type Narrowed<'de> = SendPointerInputCmd;
13451
13452        #[inline]
13453        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13454            ::fidl_next::munge! {
13455                let Self {
13456                    compositor_id,
13457                    pointer_event,
13458
13459                } = &mut *out_;
13460            }
13461
13462            ::fidl_next::Wire::zero_padding(compositor_id);
13463
13464            ::fidl_next::Wire::zero_padding(pointer_event);
13465
13466            unsafe {
13467                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
13468            }
13469        }
13470    }
13471
13472    unsafe impl<___D> ::fidl_next::Decode<___D> for SendPointerInputCmd
13473    where
13474        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13475    {
13476        fn decode(
13477            slot_: ::fidl_next::Slot<'_, Self>,
13478            decoder_: &mut ___D,
13479            _: (),
13480        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13481            if slot_.as_bytes()[4..8] != [0u8; 4] {
13482                return Err(::fidl_next::DecodeError::InvalidPadding);
13483            }
13484
13485            ::fidl_next::munge! {
13486                let Self {
13487                    mut compositor_id,
13488                    mut pointer_event,
13489
13490                } = slot_;
13491            }
13492
13493            let _field = compositor_id.as_mut();
13494
13495            ::fidl_next::Decode::decode(compositor_id.as_mut(), decoder_, ())?;
13496
13497            let _field = pointer_event.as_mut();
13498
13499            ::fidl_next::Decode::decode(pointer_event.as_mut(), decoder_, ())?;
13500
13501            Ok(())
13502        }
13503    }
13504
13505    impl ::fidl_next::IntoNatural for SendPointerInputCmd {
13506        type Natural = crate::natural::SendPointerInputCmd;
13507    }
13508
13509    /// The wire type corresponding to [`SetHardKeyboardDeliveryCmd`].
13510    #[derive(Clone, Debug)]
13511    #[repr(C)]
13512    pub struct SetHardKeyboardDeliveryCmd {
13513        pub delivery_request: bool,
13514    }
13515
13516    static_assertions::const_assert_eq!(std::mem::size_of::<SetHardKeyboardDeliveryCmd>(), 1);
13517    static_assertions::const_assert_eq!(std::mem::align_of::<SetHardKeyboardDeliveryCmd>(), 1);
13518
13519    static_assertions::const_assert_eq!(
13520        std::mem::offset_of!(SetHardKeyboardDeliveryCmd, delivery_request),
13521        0
13522    );
13523
13524    impl ::fidl_next::Constrained for SetHardKeyboardDeliveryCmd {
13525        type Constraint = ();
13526
13527        fn validate(
13528            _: ::fidl_next::Slot<'_, Self>,
13529            _: Self::Constraint,
13530        ) -> Result<(), ::fidl_next::ValidationError> {
13531            Ok(())
13532        }
13533    }
13534
13535    unsafe impl ::fidl_next::Wire for SetHardKeyboardDeliveryCmd {
13536        type Narrowed<'de> = SetHardKeyboardDeliveryCmd;
13537
13538        #[inline]
13539        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13540            ::fidl_next::munge! {
13541                let Self {
13542                    delivery_request,
13543
13544                } = &mut *out_;
13545            }
13546
13547            ::fidl_next::Wire::zero_padding(delivery_request);
13548        }
13549    }
13550
13551    unsafe impl<___D> ::fidl_next::Decode<___D> for SetHardKeyboardDeliveryCmd
13552    where
13553        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13554    {
13555        fn decode(
13556            slot_: ::fidl_next::Slot<'_, Self>,
13557            decoder_: &mut ___D,
13558            _: (),
13559        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13560            ::fidl_next::munge! {
13561                let Self {
13562                    mut delivery_request,
13563
13564                } = slot_;
13565            }
13566
13567            let _field = delivery_request.as_mut();
13568
13569            ::fidl_next::Decode::decode(delivery_request.as_mut(), decoder_, ())?;
13570
13571            Ok(())
13572        }
13573    }
13574
13575    impl ::fidl_next::IntoNatural for SetHardKeyboardDeliveryCmd {
13576        type Natural = crate::natural::SetHardKeyboardDeliveryCmd;
13577    }
13578
13579    /// The wire type corresponding to [`SetParallelDispatchCmd`].
13580    #[derive(Clone, Debug)]
13581    #[repr(C)]
13582    pub struct SetParallelDispatchCmd {
13583        pub parallel_dispatch: bool,
13584    }
13585
13586    static_assertions::const_assert_eq!(std::mem::size_of::<SetParallelDispatchCmd>(), 1);
13587    static_assertions::const_assert_eq!(std::mem::align_of::<SetParallelDispatchCmd>(), 1);
13588
13589    static_assertions::const_assert_eq!(
13590        std::mem::offset_of!(SetParallelDispatchCmd, parallel_dispatch),
13591        0
13592    );
13593
13594    impl ::fidl_next::Constrained for SetParallelDispatchCmd {
13595        type Constraint = ();
13596
13597        fn validate(
13598            _: ::fidl_next::Slot<'_, Self>,
13599            _: Self::Constraint,
13600        ) -> Result<(), ::fidl_next::ValidationError> {
13601            Ok(())
13602        }
13603    }
13604
13605    unsafe impl ::fidl_next::Wire for SetParallelDispatchCmd {
13606        type Narrowed<'de> = SetParallelDispatchCmd;
13607
13608        #[inline]
13609        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13610            ::fidl_next::munge! {
13611                let Self {
13612                    parallel_dispatch,
13613
13614                } = &mut *out_;
13615            }
13616
13617            ::fidl_next::Wire::zero_padding(parallel_dispatch);
13618        }
13619    }
13620
13621    unsafe impl<___D> ::fidl_next::Decode<___D> for SetParallelDispatchCmd
13622    where
13623        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13624    {
13625        fn decode(
13626            slot_: ::fidl_next::Slot<'_, Self>,
13627            decoder_: &mut ___D,
13628            _: (),
13629        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13630            ::fidl_next::munge! {
13631                let Self {
13632                    mut parallel_dispatch,
13633
13634                } = slot_;
13635            }
13636
13637            let _field = parallel_dispatch.as_mut();
13638
13639            ::fidl_next::Decode::decode(parallel_dispatch.as_mut(), decoder_, ())?;
13640
13641            Ok(())
13642        }
13643    }
13644
13645    impl ::fidl_next::IntoNatural for SetParallelDispatchCmd {
13646        type Natural = crate::natural::SetParallelDispatchCmd;
13647    }
13648
13649    /// The wire type corresponding to [`KeyboardEventPhase`].
13650    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
13651    #[repr(transparent)]
13652    pub struct KeyboardEventPhase {
13653        pub(crate) value: ::fidl_next::wire::Uint32,
13654    }
13655
13656    impl ::fidl_next::Constrained for KeyboardEventPhase {
13657        type Constraint = ();
13658
13659        fn validate(
13660            _: ::fidl_next::Slot<'_, Self>,
13661            _: Self::Constraint,
13662        ) -> Result<(), ::fidl_next::ValidationError> {
13663            Ok(())
13664        }
13665    }
13666
13667    unsafe impl ::fidl_next::Wire for KeyboardEventPhase {
13668        type Narrowed<'de> = Self;
13669
13670        #[inline]
13671        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13672            // Wire enums have no padding
13673        }
13674    }
13675
13676    impl KeyboardEventPhase {
13677        pub const PRESSED: KeyboardEventPhase =
13678            KeyboardEventPhase { value: ::fidl_next::wire::Uint32(0) };
13679
13680        pub const RELEASED: KeyboardEventPhase =
13681            KeyboardEventPhase { value: ::fidl_next::wire::Uint32(1) };
13682
13683        pub const CANCELLED: KeyboardEventPhase =
13684            KeyboardEventPhase { value: ::fidl_next::wire::Uint32(2) };
13685
13686        pub const REPEAT: KeyboardEventPhase =
13687            KeyboardEventPhase { value: ::fidl_next::wire::Uint32(3) };
13688    }
13689
13690    unsafe impl<___D> ::fidl_next::Decode<___D> for KeyboardEventPhase
13691    where
13692        ___D: ?Sized,
13693    {
13694        fn decode(
13695            slot: ::fidl_next::Slot<'_, Self>,
13696            _: &mut ___D,
13697            _: (),
13698        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13699            Ok(())
13700        }
13701    }
13702
13703    impl ::core::convert::From<crate::natural::KeyboardEventPhase> for KeyboardEventPhase {
13704        fn from(natural: crate::natural::KeyboardEventPhase) -> Self {
13705            match natural {
13706                crate::natural::KeyboardEventPhase::Pressed => KeyboardEventPhase::PRESSED,
13707
13708                crate::natural::KeyboardEventPhase::Released => KeyboardEventPhase::RELEASED,
13709
13710                crate::natural::KeyboardEventPhase::Cancelled => KeyboardEventPhase::CANCELLED,
13711
13712                crate::natural::KeyboardEventPhase::Repeat => KeyboardEventPhase::REPEAT,
13713
13714                crate::natural::KeyboardEventPhase::UnknownOrdinal_(value) => {
13715                    KeyboardEventPhase { value: ::fidl_next::wire::Uint32::from(value) }
13716                }
13717            }
13718        }
13719    }
13720
13721    impl ::fidl_next::IntoNatural for KeyboardEventPhase {
13722        type Natural = crate::natural::KeyboardEventPhase;
13723    }
13724
13725    /// The wire type corresponding to [`KeyboardEvent`].
13726    #[derive(Clone, Debug)]
13727    #[repr(C)]
13728    pub struct KeyboardEvent {
13729        pub event_time: ::fidl_next::wire::Uint64,
13730
13731        pub device_id: ::fidl_next::wire::Uint32,
13732
13733        pub phase: crate::wire::KeyboardEventPhase,
13734
13735        pub hid_usage: ::fidl_next::wire::Uint32,
13736
13737        pub code_point: ::fidl_next::wire::Uint32,
13738
13739        pub modifiers: ::fidl_next::wire::Uint32,
13740    }
13741
13742    static_assertions::const_assert_eq!(std::mem::size_of::<KeyboardEvent>(), 32);
13743    static_assertions::const_assert_eq!(std::mem::align_of::<KeyboardEvent>(), 8);
13744
13745    static_assertions::const_assert_eq!(std::mem::offset_of!(KeyboardEvent, event_time), 0);
13746
13747    static_assertions::const_assert_eq!(std::mem::offset_of!(KeyboardEvent, device_id), 8);
13748
13749    static_assertions::const_assert_eq!(std::mem::offset_of!(KeyboardEvent, phase), 12);
13750
13751    static_assertions::const_assert_eq!(std::mem::offset_of!(KeyboardEvent, hid_usage), 16);
13752
13753    static_assertions::const_assert_eq!(std::mem::offset_of!(KeyboardEvent, code_point), 20);
13754
13755    static_assertions::const_assert_eq!(std::mem::offset_of!(KeyboardEvent, modifiers), 24);
13756
13757    impl ::fidl_next::Constrained for KeyboardEvent {
13758        type Constraint = ();
13759
13760        fn validate(
13761            _: ::fidl_next::Slot<'_, Self>,
13762            _: Self::Constraint,
13763        ) -> Result<(), ::fidl_next::ValidationError> {
13764            Ok(())
13765        }
13766    }
13767
13768    unsafe impl ::fidl_next::Wire for KeyboardEvent {
13769        type Narrowed<'de> = KeyboardEvent;
13770
13771        #[inline]
13772        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13773            ::fidl_next::munge! {
13774                let Self {
13775                    event_time,
13776                    device_id,
13777                    phase,
13778                    hid_usage,
13779                    code_point,
13780                    modifiers,
13781
13782                } = &mut *out_;
13783            }
13784
13785            ::fidl_next::Wire::zero_padding(event_time);
13786
13787            ::fidl_next::Wire::zero_padding(device_id);
13788
13789            ::fidl_next::Wire::zero_padding(phase);
13790
13791            ::fidl_next::Wire::zero_padding(hid_usage);
13792
13793            ::fidl_next::Wire::zero_padding(code_point);
13794
13795            ::fidl_next::Wire::zero_padding(modifiers);
13796
13797            unsafe {
13798                out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
13799            }
13800        }
13801    }
13802
13803    unsafe impl<___D> ::fidl_next::Decode<___D> for KeyboardEvent
13804    where
13805        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13806    {
13807        fn decode(
13808            slot_: ::fidl_next::Slot<'_, Self>,
13809            decoder_: &mut ___D,
13810            _: (),
13811        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13812            if slot_.as_bytes()[28..32] != [0u8; 4] {
13813                return Err(::fidl_next::DecodeError::InvalidPadding);
13814            }
13815
13816            ::fidl_next::munge! {
13817                let Self {
13818                    mut event_time,
13819                    mut device_id,
13820                    mut phase,
13821                    mut hid_usage,
13822                    mut code_point,
13823                    mut modifiers,
13824
13825                } = slot_;
13826            }
13827
13828            let _field = event_time.as_mut();
13829
13830            ::fidl_next::Decode::decode(event_time.as_mut(), decoder_, ())?;
13831
13832            let _field = device_id.as_mut();
13833
13834            ::fidl_next::Decode::decode(device_id.as_mut(), decoder_, ())?;
13835
13836            let _field = phase.as_mut();
13837
13838            ::fidl_next::Decode::decode(phase.as_mut(), decoder_, ())?;
13839
13840            let _field = hid_usage.as_mut();
13841
13842            ::fidl_next::Decode::decode(hid_usage.as_mut(), decoder_, ())?;
13843
13844            let _field = code_point.as_mut();
13845
13846            ::fidl_next::Decode::decode(code_point.as_mut(), decoder_, ())?;
13847
13848            let _field = modifiers.as_mut();
13849
13850            ::fidl_next::Decode::decode(modifiers.as_mut(), decoder_, ())?;
13851
13852            Ok(())
13853        }
13854    }
13855
13856    impl ::fidl_next::IntoNatural for KeyboardEvent {
13857        type Natural = crate::natural::KeyboardEvent;
13858    }
13859
13860    /// The wire type corresponding to [`SendKeyboardInputCmd`].
13861    #[derive(Clone, Debug)]
13862    #[repr(C)]
13863    pub struct SendKeyboardInputCmd {
13864        pub compositor_id: ::fidl_next::wire::Uint32,
13865
13866        pub keyboard_event: crate::wire::KeyboardEvent,
13867    }
13868
13869    static_assertions::const_assert_eq!(std::mem::size_of::<SendKeyboardInputCmd>(), 40);
13870    static_assertions::const_assert_eq!(std::mem::align_of::<SendKeyboardInputCmd>(), 8);
13871
13872    static_assertions::const_assert_eq!(
13873        std::mem::offset_of!(SendKeyboardInputCmd, compositor_id),
13874        0
13875    );
13876
13877    static_assertions::const_assert_eq!(
13878        std::mem::offset_of!(SendKeyboardInputCmd, keyboard_event),
13879        8
13880    );
13881
13882    impl ::fidl_next::Constrained for SendKeyboardInputCmd {
13883        type Constraint = ();
13884
13885        fn validate(
13886            _: ::fidl_next::Slot<'_, Self>,
13887            _: Self::Constraint,
13888        ) -> Result<(), ::fidl_next::ValidationError> {
13889            Ok(())
13890        }
13891    }
13892
13893    unsafe impl ::fidl_next::Wire for SendKeyboardInputCmd {
13894        type Narrowed<'de> = SendKeyboardInputCmd;
13895
13896        #[inline]
13897        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13898            ::fidl_next::munge! {
13899                let Self {
13900                    compositor_id,
13901                    keyboard_event,
13902
13903                } = &mut *out_;
13904            }
13905
13906            ::fidl_next::Wire::zero_padding(compositor_id);
13907
13908            ::fidl_next::Wire::zero_padding(keyboard_event);
13909
13910            unsafe {
13911                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
13912            }
13913        }
13914    }
13915
13916    unsafe impl<___D> ::fidl_next::Decode<___D> for SendKeyboardInputCmd
13917    where
13918        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13919    {
13920        fn decode(
13921            slot_: ::fidl_next::Slot<'_, Self>,
13922            decoder_: &mut ___D,
13923            _: (),
13924        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13925            if slot_.as_bytes()[4..8] != [0u8; 4] {
13926                return Err(::fidl_next::DecodeError::InvalidPadding);
13927            }
13928
13929            ::fidl_next::munge! {
13930                let Self {
13931                    mut compositor_id,
13932                    mut keyboard_event,
13933
13934                } = slot_;
13935            }
13936
13937            let _field = compositor_id.as_mut();
13938
13939            ::fidl_next::Decode::decode(compositor_id.as_mut(), decoder_, ())?;
13940
13941            let _field = keyboard_event.as_mut();
13942
13943            ::fidl_next::Decode::decode(keyboard_event.as_mut(), decoder_, ())?;
13944
13945            Ok(())
13946        }
13947    }
13948
13949    impl ::fidl_next::IntoNatural for SendKeyboardInputCmd {
13950        type Natural = crate::natural::SendKeyboardInputCmd;
13951    }
13952
13953    /// The wire type corresponding to [`Command`].
13954    #[repr(transparent)]
13955    pub struct Command<'de> {
13956        pub(crate) raw: ::fidl_next::wire::Union,
13957        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
13958    }
13959
13960    impl<'de> Drop for Command<'de> {
13961        fn drop(&mut self) {
13962            match self.raw.ordinal() {
13963                1 => {
13964                    let _ = unsafe {
13965                        self.raw.get().read_unchecked::<crate::wire::SendKeyboardInputCmd>()
13966                    };
13967                }
13968
13969                2 => {
13970                    let _ = unsafe {
13971                        self.raw.get().read_unchecked::<crate::wire::SendPointerInputCmd>()
13972                    };
13973                }
13974
13975                3 => {
13976                    let _ = unsafe {
13977                        self.raw.get().read_unchecked::<crate::wire::SetHardKeyboardDeliveryCmd>()
13978                    };
13979                }
13980
13981                4 => {
13982                    let _ = unsafe {
13983                        self.raw.get().read_unchecked::<crate::wire::SetParallelDispatchCmd>()
13984                    };
13985                }
13986
13987                _ => unsafe { ::core::hint::unreachable_unchecked() },
13988            }
13989        }
13990    }
13991
13992    impl ::fidl_next::Constrained for Command<'_> {
13993        type Constraint = ();
13994
13995        fn validate(
13996            _: ::fidl_next::Slot<'_, Self>,
13997            _: Self::Constraint,
13998        ) -> Result<(), ::fidl_next::ValidationError> {
13999            Ok(())
14000        }
14001    }
14002
14003    unsafe impl ::fidl_next::Wire for Command<'static> {
14004        type Narrowed<'de> = Command<'de>;
14005
14006        #[inline]
14007        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14008            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
14009            ::fidl_next::wire::Union::zero_padding(raw);
14010        }
14011    }
14012
14013    pub mod command {
14014        pub enum Ref<'de> {
14015            SendKeyboardInput(&'de crate::wire::SendKeyboardInputCmd),
14016
14017            SendPointerInput(&'de crate::wire::SendPointerInputCmd),
14018
14019            SetHardKeyboardDelivery(&'de crate::wire::SetHardKeyboardDeliveryCmd),
14020
14021            SetParallelDispatch(&'de crate::wire::SetParallelDispatchCmd),
14022        }
14023
14024        pub enum Value {
14025            SendKeyboardInput(crate::wire::SendKeyboardInputCmd),
14026
14027            SendPointerInput(crate::wire::SendPointerInputCmd),
14028
14029            SetHardKeyboardDelivery(crate::wire::SetHardKeyboardDeliveryCmd),
14030
14031            SetParallelDispatch(crate::wire::SetParallelDispatchCmd),
14032        }
14033    }
14034
14035    impl<'de> Command<'de> {
14036        pub fn as_ref(&self) -> crate::wire::command::Ref<'_> {
14037            match self.raw.ordinal() {
14038                1 => crate::wire::command::Ref::SendKeyboardInput(unsafe {
14039                    self.raw.get().deref_unchecked::<crate::wire::SendKeyboardInputCmd>()
14040                }),
14041
14042                2 => crate::wire::command::Ref::SendPointerInput(unsafe {
14043                    self.raw.get().deref_unchecked::<crate::wire::SendPointerInputCmd>()
14044                }),
14045
14046                3 => crate::wire::command::Ref::SetHardKeyboardDelivery(unsafe {
14047                    self.raw.get().deref_unchecked::<crate::wire::SetHardKeyboardDeliveryCmd>()
14048                }),
14049
14050                4 => crate::wire::command::Ref::SetParallelDispatch(unsafe {
14051                    self.raw.get().deref_unchecked::<crate::wire::SetParallelDispatchCmd>()
14052                }),
14053
14054                _ => unsafe { ::core::hint::unreachable_unchecked() },
14055            }
14056        }
14057
14058        pub fn into_inner(self) -> crate::wire::command::Value {
14059            let this = ::core::mem::ManuallyDrop::new(self);
14060
14061            match this.raw.ordinal() {
14062                1 => crate::wire::command::Value::SendKeyboardInput(unsafe {
14063                    this.raw.get().read_unchecked::<crate::wire::SendKeyboardInputCmd>()
14064                }),
14065
14066                2 => crate::wire::command::Value::SendPointerInput(unsafe {
14067                    this.raw.get().read_unchecked::<crate::wire::SendPointerInputCmd>()
14068                }),
14069
14070                3 => crate::wire::command::Value::SetHardKeyboardDelivery(unsafe {
14071                    this.raw.get().read_unchecked::<crate::wire::SetHardKeyboardDeliveryCmd>()
14072                }),
14073
14074                4 => crate::wire::command::Value::SetParallelDispatch(unsafe {
14075                    this.raw.get().read_unchecked::<crate::wire::SetParallelDispatchCmd>()
14076                }),
14077
14078                _ => unsafe { ::core::hint::unreachable_unchecked() },
14079            }
14080        }
14081    }
14082
14083    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Command<'de>
14084    where
14085        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14086        ___D: ::fidl_next::Decoder<'de>,
14087    {
14088        fn decode(
14089            mut slot: ::fidl_next::Slot<'_, Self>,
14090            decoder: &mut ___D,
14091            _: (),
14092        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14093            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
14094            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
14095                1 => {
14096                    ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SendKeyboardInputCmd>(
14097                        raw,
14098                        decoder,
14099                        (),
14100                    )?
14101                }
14102
14103                2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SendPointerInputCmd>(
14104                    raw,
14105                    decoder,
14106                    (),
14107                )?,
14108
14109                3 => ::fidl_next::wire::Union::decode_as::<
14110                    ___D,
14111                    crate::wire::SetHardKeyboardDeliveryCmd,
14112                >(raw, decoder, ())?,
14113
14114                4 => ::fidl_next::wire::Union::decode_as::<
14115                    ___D,
14116                    crate::wire::SetParallelDispatchCmd,
14117                >(raw, decoder, ())?,
14118
14119                ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
14120            }
14121
14122            Ok(())
14123        }
14124    }
14125
14126    impl<'de> ::core::fmt::Debug for Command<'de> {
14127        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
14128            match self.raw.ordinal() {
14129                1 => unsafe {
14130                    self.raw.get().deref_unchecked::<crate::wire::SendKeyboardInputCmd>().fmt(f)
14131                },
14132                2 => unsafe {
14133                    self.raw.get().deref_unchecked::<crate::wire::SendPointerInputCmd>().fmt(f)
14134                },
14135                3 => unsafe {
14136                    self.raw
14137                        .get()
14138                        .deref_unchecked::<crate::wire::SetHardKeyboardDeliveryCmd>()
14139                        .fmt(f)
14140                },
14141                4 => unsafe {
14142                    self.raw.get().deref_unchecked::<crate::wire::SetParallelDispatchCmd>().fmt(f)
14143                },
14144                _ => unsafe { ::core::hint::unreachable_unchecked() },
14145            }
14146        }
14147    }
14148
14149    impl<'de> ::fidl_next::IntoNatural for Command<'de> {
14150        type Natural = crate::natural::Command;
14151    }
14152
14153    /// The wire type corresponding to [`ConsumerControlInputDescriptor`].
14154    #[repr(C)]
14155    pub struct ConsumerControlInputDescriptor<'de> {
14156        pub(crate) table: ::fidl_next::wire::Table<'de>,
14157    }
14158
14159    impl<'de> Drop for ConsumerControlInputDescriptor<'de> {
14160        fn drop(&mut self) {
14161            let _ = self.table.get(1).map(|envelope| unsafe {
14162                envelope.read_unchecked::<::fidl_next::wire::Vector<
14163                    'de,
14164                    ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
14165                >>()
14166            });
14167        }
14168    }
14169
14170    impl ::fidl_next::Constrained for ConsumerControlInputDescriptor<'_> {
14171        type Constraint = ();
14172
14173        fn validate(
14174            _: ::fidl_next::Slot<'_, Self>,
14175            _: Self::Constraint,
14176        ) -> Result<(), ::fidl_next::ValidationError> {
14177            Ok(())
14178        }
14179    }
14180
14181    unsafe impl ::fidl_next::Wire for ConsumerControlInputDescriptor<'static> {
14182        type Narrowed<'de> = ConsumerControlInputDescriptor<'de>;
14183
14184        #[inline]
14185        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14186            ::fidl_next::munge!(let Self { table } = out);
14187            ::fidl_next::wire::Table::zero_padding(table);
14188        }
14189    }
14190
14191    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ConsumerControlInputDescriptor<'de>
14192    where
14193        ___D: ::fidl_next::Decoder<'de> + ?Sized,
14194    {
14195        fn decode(
14196            slot: ::fidl_next::Slot<'_, Self>,
14197            decoder: &mut ___D,
14198            _: (),
14199        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14200            ::fidl_next::munge!(let Self { table } = slot);
14201
14202            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14203                match ordinal {
14204                    0 => unsafe { ::core::hint::unreachable_unchecked() },
14205
14206                    1 => {
14207                        ::fidl_next::wire::Envelope::decode_as::<
14208                            ___D,
14209                            ::fidl_next::wire::Vector<
14210                                'de,
14211                                ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
14212                            >,
14213                        >(slot.as_mut(), decoder, (255, ()))?;
14214
14215                        let value = unsafe {
14216                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
14217                                '_,
14218                                ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
14219                            >>()
14220                        };
14221
14222                        if value.len() > 255 {
14223                            return Err(::fidl_next::DecodeError::VectorTooLong {
14224                                size: value.len() as u64,
14225                                limit: 255,
14226                            });
14227                        }
14228
14229                        Ok(())
14230                    }
14231
14232                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14233                }
14234            })
14235        }
14236    }
14237
14238    impl<'de> ConsumerControlInputDescriptor<'de> {
14239        pub fn buttons(
14240            &self,
14241        ) -> ::core::option::Option<
14242            &::fidl_next::wire::Vector<
14243                'de,
14244                ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
14245            >,
14246        > {
14247            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14248        }
14249
14250        pub fn take_buttons(
14251            &mut self,
14252        ) -> ::core::option::Option<
14253            ::fidl_next::wire::Vector<
14254                'de,
14255                ::fidl_next_common_fuchsia_input::wire::ConsumerControlButton,
14256            >,
14257        > {
14258            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14259        }
14260    }
14261
14262    impl<'de> ::core::fmt::Debug for ConsumerControlInputDescriptor<'de> {
14263        fn fmt(
14264            &self,
14265            f: &mut ::core::fmt::Formatter<'_>,
14266        ) -> ::core::result::Result<(), ::core::fmt::Error> {
14267            f.debug_struct("ConsumerControlInputDescriptor")
14268                .field("buttons", &self.buttons())
14269                .finish()
14270        }
14271    }
14272
14273    impl<'de> ::fidl_next::IntoNatural for ConsumerControlInputDescriptor<'de> {
14274        type Natural = crate::natural::ConsumerControlInputDescriptor;
14275    }
14276
14277    /// The wire type corresponding to [`ConsumerControlDescriptor`].
14278    #[repr(C)]
14279    pub struct ConsumerControlDescriptor<'de> {
14280        pub(crate) table: ::fidl_next::wire::Table<'de>,
14281    }
14282
14283    impl<'de> Drop for ConsumerControlDescriptor<'de> {
14284        fn drop(&mut self) {
14285            let _ = self.table.get(1).map(|envelope| unsafe {
14286                envelope.read_unchecked::<crate::wire::ConsumerControlInputDescriptor<'de>>()
14287            });
14288        }
14289    }
14290
14291    impl ::fidl_next::Constrained for ConsumerControlDescriptor<'_> {
14292        type Constraint = ();
14293
14294        fn validate(
14295            _: ::fidl_next::Slot<'_, Self>,
14296            _: Self::Constraint,
14297        ) -> Result<(), ::fidl_next::ValidationError> {
14298            Ok(())
14299        }
14300    }
14301
14302    unsafe impl ::fidl_next::Wire for ConsumerControlDescriptor<'static> {
14303        type Narrowed<'de> = ConsumerControlDescriptor<'de>;
14304
14305        #[inline]
14306        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14307            ::fidl_next::munge!(let Self { table } = out);
14308            ::fidl_next::wire::Table::zero_padding(table);
14309        }
14310    }
14311
14312    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ConsumerControlDescriptor<'de>
14313    where
14314        ___D: ::fidl_next::Decoder<'de> + ?Sized,
14315    {
14316        fn decode(
14317            slot: ::fidl_next::Slot<'_, Self>,
14318            decoder: &mut ___D,
14319            _: (),
14320        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14321            ::fidl_next::munge!(let Self { table } = slot);
14322
14323            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14324                match ordinal {
14325                    0 => unsafe { ::core::hint::unreachable_unchecked() },
14326
14327                    1 => {
14328                        ::fidl_next::wire::Envelope::decode_as::<
14329                            ___D,
14330                            crate::wire::ConsumerControlInputDescriptor<'de>,
14331                        >(slot.as_mut(), decoder, ())?;
14332
14333                        Ok(())
14334                    }
14335
14336                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14337                }
14338            })
14339        }
14340    }
14341
14342    impl<'de> ConsumerControlDescriptor<'de> {
14343        pub fn input(
14344            &self,
14345        ) -> ::core::option::Option<&crate::wire::ConsumerControlInputDescriptor<'de>> {
14346            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14347        }
14348
14349        pub fn take_input(
14350            &mut self,
14351        ) -> ::core::option::Option<crate::wire::ConsumerControlInputDescriptor<'de>> {
14352            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14353        }
14354    }
14355
14356    impl<'de> ::core::fmt::Debug for ConsumerControlDescriptor<'de> {
14357        fn fmt(
14358            &self,
14359            f: &mut ::core::fmt::Formatter<'_>,
14360        ) -> ::core::result::Result<(), ::core::fmt::Error> {
14361            f.debug_struct("ConsumerControlDescriptor").field("input", &self.input()).finish()
14362        }
14363    }
14364
14365    impl<'de> ::fidl_next::IntoNatural for ConsumerControlDescriptor<'de> {
14366        type Natural = crate::natural::ConsumerControlDescriptor;
14367    }
14368
14369    /// The wire type corresponding to [`ContactInputDescriptor`].
14370    #[repr(C)]
14371    pub struct ContactInputDescriptor<'de> {
14372        pub(crate) table: ::fidl_next::wire::Table<'de>,
14373    }
14374
14375    impl<'de> Drop for ContactInputDescriptor<'de> {
14376        fn drop(&mut self) {
14377            let _ = self.table.get(1).map(|envelope| unsafe {
14378                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14379            });
14380
14381            let _ = self.table.get(2).map(|envelope| unsafe {
14382                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14383            });
14384
14385            let _ = self.table.get(3).map(|envelope| unsafe {
14386                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14387            });
14388
14389            let _ = self.table.get(4).map(|envelope| unsafe {
14390                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14391            });
14392
14393            let _ = self.table.get(5).map(|envelope| unsafe {
14394                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14395            });
14396        }
14397    }
14398
14399    impl ::fidl_next::Constrained for ContactInputDescriptor<'_> {
14400        type Constraint = ();
14401
14402        fn validate(
14403            _: ::fidl_next::Slot<'_, Self>,
14404            _: Self::Constraint,
14405        ) -> Result<(), ::fidl_next::ValidationError> {
14406            Ok(())
14407        }
14408    }
14409
14410    unsafe impl ::fidl_next::Wire for ContactInputDescriptor<'static> {
14411        type Narrowed<'de> = ContactInputDescriptor<'de>;
14412
14413        #[inline]
14414        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14415            ::fidl_next::munge!(let Self { table } = out);
14416            ::fidl_next::wire::Table::zero_padding(table);
14417        }
14418    }
14419
14420    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ContactInputDescriptor<'de>
14421    where
14422        ___D: ::fidl_next::Decoder<'de> + ?Sized,
14423    {
14424        fn decode(
14425            slot: ::fidl_next::Slot<'_, Self>,
14426            decoder: &mut ___D,
14427            _: (),
14428        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14429            ::fidl_next::munge!(let Self { table } = slot);
14430
14431            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14432                match ordinal {
14433                    0 => unsafe { ::core::hint::unreachable_unchecked() },
14434
14435                    1 => {
14436                        ::fidl_next::wire::Envelope::decode_as::<
14437                            ___D,
14438                            ::fidl_next_common_fuchsia_input::wire::Axis,
14439                        >(slot.as_mut(), decoder, ())?;
14440
14441                        Ok(())
14442                    }
14443
14444                    2 => {
14445                        ::fidl_next::wire::Envelope::decode_as::<
14446                            ___D,
14447                            ::fidl_next_common_fuchsia_input::wire::Axis,
14448                        >(slot.as_mut(), decoder, ())?;
14449
14450                        Ok(())
14451                    }
14452
14453                    3 => {
14454                        ::fidl_next::wire::Envelope::decode_as::<
14455                            ___D,
14456                            ::fidl_next_common_fuchsia_input::wire::Axis,
14457                        >(slot.as_mut(), decoder, ())?;
14458
14459                        Ok(())
14460                    }
14461
14462                    4 => {
14463                        ::fidl_next::wire::Envelope::decode_as::<
14464                            ___D,
14465                            ::fidl_next_common_fuchsia_input::wire::Axis,
14466                        >(slot.as_mut(), decoder, ())?;
14467
14468                        Ok(())
14469                    }
14470
14471                    5 => {
14472                        ::fidl_next::wire::Envelope::decode_as::<
14473                            ___D,
14474                            ::fidl_next_common_fuchsia_input::wire::Axis,
14475                        >(slot.as_mut(), decoder, ())?;
14476
14477                        Ok(())
14478                    }
14479
14480                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14481                }
14482            })
14483        }
14484    }
14485
14486    impl<'de> ContactInputDescriptor<'de> {
14487        pub fn position_x(
14488            &self,
14489        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
14490            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14491        }
14492
14493        pub fn take_position_x(
14494            &mut self,
14495        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
14496            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14497        }
14498
14499        pub fn position_y(
14500            &self,
14501        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
14502            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14503        }
14504
14505        pub fn take_position_y(
14506            &mut self,
14507        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
14508            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14509        }
14510
14511        pub fn pressure(
14512            &self,
14513        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
14514            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
14515        }
14516
14517        pub fn take_pressure(
14518            &mut self,
14519        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
14520            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
14521        }
14522
14523        pub fn contact_width(
14524            &self,
14525        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
14526            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
14527        }
14528
14529        pub fn take_contact_width(
14530            &mut self,
14531        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
14532            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
14533        }
14534
14535        pub fn contact_height(
14536            &self,
14537        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
14538            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
14539        }
14540
14541        pub fn take_contact_height(
14542            &mut self,
14543        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
14544            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
14545        }
14546    }
14547
14548    impl<'de> ::core::fmt::Debug for ContactInputDescriptor<'de> {
14549        fn fmt(
14550            &self,
14551            f: &mut ::core::fmt::Formatter<'_>,
14552        ) -> ::core::result::Result<(), ::core::fmt::Error> {
14553            f.debug_struct("ContactInputDescriptor")
14554                .field("position_x", &self.position_x())
14555                .field("position_y", &self.position_y())
14556                .field("pressure", &self.pressure())
14557                .field("contact_width", &self.contact_width())
14558                .field("contact_height", &self.contact_height())
14559                .finish()
14560        }
14561    }
14562
14563    impl<'de> ::fidl_next::IntoNatural for ContactInputDescriptor<'de> {
14564        type Natural = crate::natural::ContactInputDescriptor;
14565    }
14566
14567    /// The wire type corresponding to [`DeviceInformation`].
14568    #[repr(C)]
14569    pub struct DeviceInformation<'de> {
14570        pub(crate) table: ::fidl_next::wire::Table<'de>,
14571    }
14572
14573    impl<'de> Drop for DeviceInformation<'de> {
14574        fn drop(&mut self) {
14575            let _ = self
14576                .table
14577                .get(1)
14578                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
14579
14580            let _ = self
14581                .table
14582                .get(2)
14583                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
14584
14585            let _ = self
14586                .table
14587                .get(3)
14588                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
14589
14590            let _ = self
14591                .table
14592                .get(4)
14593                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
14594
14595            let _ = self.table.get(5).map(|envelope| unsafe {
14596                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
14597            });
14598
14599            let _ = self.table.get(6).map(|envelope| unsafe {
14600                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
14601            });
14602
14603            let _ = self.table.get(7).map(|envelope| unsafe {
14604                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
14605            });
14606        }
14607    }
14608
14609    impl ::fidl_next::Constrained for DeviceInformation<'_> {
14610        type Constraint = ();
14611
14612        fn validate(
14613            _: ::fidl_next::Slot<'_, Self>,
14614            _: Self::Constraint,
14615        ) -> Result<(), ::fidl_next::ValidationError> {
14616            Ok(())
14617        }
14618    }
14619
14620    unsafe impl ::fidl_next::Wire for DeviceInformation<'static> {
14621        type Narrowed<'de> = DeviceInformation<'de>;
14622
14623        #[inline]
14624        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14625            ::fidl_next::munge!(let Self { table } = out);
14626            ::fidl_next::wire::Table::zero_padding(table);
14627        }
14628    }
14629
14630    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceInformation<'de>
14631    where
14632        ___D: ::fidl_next::Decoder<'de> + ?Sized,
14633    {
14634        fn decode(
14635            slot: ::fidl_next::Slot<'_, Self>,
14636            decoder: &mut ___D,
14637            _: (),
14638        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14639            ::fidl_next::munge!(let Self { table } = slot);
14640
14641            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14642                match ordinal {
14643                    0 => unsafe { ::core::hint::unreachable_unchecked() },
14644
14645                    1 => {
14646                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
14647                            slot.as_mut(),
14648                            decoder,
14649                            (),
14650                        )?;
14651
14652                        Ok(())
14653                    }
14654
14655                    2 => {
14656                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
14657                            slot.as_mut(),
14658                            decoder,
14659                            (),
14660                        )?;
14661
14662                        Ok(())
14663                    }
14664
14665                    3 => {
14666                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
14667                            slot.as_mut(),
14668                            decoder,
14669                            (),
14670                        )?;
14671
14672                        Ok(())
14673                    }
14674
14675                    4 => {
14676                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
14677                            slot.as_mut(),
14678                            decoder,
14679                            (),
14680                        )?;
14681
14682                        Ok(())
14683                    }
14684
14685                    5 => {
14686                        ::fidl_next::wire::Envelope::decode_as::<
14687                            ___D,
14688                            ::fidl_next::wire::String<'de>,
14689                        >(slot.as_mut(), decoder, 256)?;
14690
14691                        let value = unsafe {
14692                            slot.deref_unchecked()
14693                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
14694                        };
14695
14696                        if value.len() > 256 {
14697                            return Err(::fidl_next::DecodeError::VectorTooLong {
14698                                size: value.len() as u64,
14699                                limit: 256,
14700                            });
14701                        }
14702
14703                        Ok(())
14704                    }
14705
14706                    6 => {
14707                        ::fidl_next::wire::Envelope::decode_as::<
14708                            ___D,
14709                            ::fidl_next::wire::String<'de>,
14710                        >(slot.as_mut(), decoder, 256)?;
14711
14712                        let value = unsafe {
14713                            slot.deref_unchecked()
14714                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
14715                        };
14716
14717                        if value.len() > 256 {
14718                            return Err(::fidl_next::DecodeError::VectorTooLong {
14719                                size: value.len() as u64,
14720                                limit: 256,
14721                            });
14722                        }
14723
14724                        Ok(())
14725                    }
14726
14727                    7 => {
14728                        ::fidl_next::wire::Envelope::decode_as::<
14729                            ___D,
14730                            ::fidl_next::wire::String<'de>,
14731                        >(slot.as_mut(), decoder, 256)?;
14732
14733                        let value = unsafe {
14734                            slot.deref_unchecked()
14735                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
14736                        };
14737
14738                        if value.len() > 256 {
14739                            return Err(::fidl_next::DecodeError::VectorTooLong {
14740                                size: value.len() as u64,
14741                                limit: 256,
14742                            });
14743                        }
14744
14745                        Ok(())
14746                    }
14747
14748                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14749                }
14750            })
14751        }
14752    }
14753
14754    impl<'de> DeviceInformation<'de> {
14755        pub fn vendor_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
14756            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14757        }
14758
14759        pub fn take_vendor_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
14760            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14761        }
14762
14763        pub fn product_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
14764            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14765        }
14766
14767        pub fn take_product_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
14768            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14769        }
14770
14771        pub fn version(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
14772            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
14773        }
14774
14775        pub fn take_version(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
14776            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
14777        }
14778
14779        pub fn polling_rate(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
14780            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
14781        }
14782
14783        pub fn take_polling_rate(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
14784            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
14785        }
14786
14787        pub fn manufacturer_name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
14788            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
14789        }
14790
14791        pub fn take_manufacturer_name(
14792            &mut self,
14793        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
14794            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
14795        }
14796
14797        pub fn product_name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
14798            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
14799        }
14800
14801        pub fn take_product_name(
14802            &mut self,
14803        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
14804            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
14805        }
14806
14807        pub fn serial_number(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
14808            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
14809        }
14810
14811        pub fn take_serial_number(
14812            &mut self,
14813        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
14814            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
14815        }
14816    }
14817
14818    impl<'de> ::core::fmt::Debug for DeviceInformation<'de> {
14819        fn fmt(
14820            &self,
14821            f: &mut ::core::fmt::Formatter<'_>,
14822        ) -> ::core::result::Result<(), ::core::fmt::Error> {
14823            f.debug_struct("DeviceInformation")
14824                .field("vendor_id", &self.vendor_id())
14825                .field("product_id", &self.product_id())
14826                .field("version", &self.version())
14827                .field("polling_rate", &self.polling_rate())
14828                .field("manufacturer_name", &self.manufacturer_name())
14829                .field("product_name", &self.product_name())
14830                .field("serial_number", &self.serial_number())
14831                .finish()
14832        }
14833    }
14834
14835    impl<'de> ::fidl_next::IntoNatural for DeviceInformation<'de> {
14836        type Natural = crate::natural::DeviceInformation;
14837    }
14838
14839    /// The wire type corresponding to [`MouseInputDescriptor`].
14840    #[repr(C)]
14841    pub struct MouseInputDescriptor<'de> {
14842        pub(crate) table: ::fidl_next::wire::Table<'de>,
14843    }
14844
14845    impl<'de> Drop for MouseInputDescriptor<'de> {
14846        fn drop(&mut self) {
14847            let _ = self.table.get(1).map(|envelope| unsafe {
14848                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14849            });
14850
14851            let _ = self.table.get(2).map(|envelope| unsafe {
14852                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14853            });
14854
14855            let _ = self.table.get(3).map(|envelope| unsafe {
14856                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14857            });
14858
14859            let _ = self.table.get(4).map(|envelope| unsafe {
14860                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14861            });
14862
14863            let _ = self.table.get(5).map(|envelope| unsafe {
14864                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
14865            });
14866
14867            let _ = self.table.get(6).map(|envelope| unsafe {
14868                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14869            });
14870
14871            let _ = self.table.get(7).map(|envelope| unsafe {
14872                envelope.read_unchecked::<::fidl_next_common_fuchsia_input::wire::Axis>()
14873            });
14874        }
14875    }
14876
14877    impl ::fidl_next::Constrained for MouseInputDescriptor<'_> {
14878        type Constraint = ();
14879
14880        fn validate(
14881            _: ::fidl_next::Slot<'_, Self>,
14882            _: Self::Constraint,
14883        ) -> Result<(), ::fidl_next::ValidationError> {
14884            Ok(())
14885        }
14886    }
14887
14888    unsafe impl ::fidl_next::Wire for MouseInputDescriptor<'static> {
14889        type Narrowed<'de> = MouseInputDescriptor<'de>;
14890
14891        #[inline]
14892        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14893            ::fidl_next::munge!(let Self { table } = out);
14894            ::fidl_next::wire::Table::zero_padding(table);
14895        }
14896    }
14897
14898    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MouseInputDescriptor<'de>
14899    where
14900        ___D: ::fidl_next::Decoder<'de> + ?Sized,
14901    {
14902        fn decode(
14903            slot: ::fidl_next::Slot<'_, Self>,
14904            decoder: &mut ___D,
14905            _: (),
14906        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14907            ::fidl_next::munge!(let Self { table } = slot);
14908
14909            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14910                match ordinal {
14911                    0 => unsafe { ::core::hint::unreachable_unchecked() },
14912
14913                    1 => {
14914                        ::fidl_next::wire::Envelope::decode_as::<
14915                            ___D,
14916                            ::fidl_next_common_fuchsia_input::wire::Axis,
14917                        >(slot.as_mut(), decoder, ())?;
14918
14919                        Ok(())
14920                    }
14921
14922                    2 => {
14923                        ::fidl_next::wire::Envelope::decode_as::<
14924                            ___D,
14925                            ::fidl_next_common_fuchsia_input::wire::Axis,
14926                        >(slot.as_mut(), decoder, ())?;
14927
14928                        Ok(())
14929                    }
14930
14931                    3 => {
14932                        ::fidl_next::wire::Envelope::decode_as::<
14933                            ___D,
14934                            ::fidl_next_common_fuchsia_input::wire::Axis,
14935                        >(slot.as_mut(), decoder, ())?;
14936
14937                        Ok(())
14938                    }
14939
14940                    4 => {
14941                        ::fidl_next::wire::Envelope::decode_as::<
14942                            ___D,
14943                            ::fidl_next_common_fuchsia_input::wire::Axis,
14944                        >(slot.as_mut(), decoder, ())?;
14945
14946                        Ok(())
14947                    }
14948
14949                    5 => {
14950                        ::fidl_next::wire::Envelope::decode_as::<
14951                            ___D,
14952                            ::fidl_next::wire::Vector<'de, u8>,
14953                        >(slot.as_mut(), decoder, (32, ()))?;
14954
14955                        let value = unsafe {
14956                            slot.deref_unchecked()
14957                                .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
14958                        };
14959
14960                        if value.len() > 32 {
14961                            return Err(::fidl_next::DecodeError::VectorTooLong {
14962                                size: value.len() as u64,
14963                                limit: 32,
14964                            });
14965                        }
14966
14967                        Ok(())
14968                    }
14969
14970                    6 => {
14971                        ::fidl_next::wire::Envelope::decode_as::<
14972                            ___D,
14973                            ::fidl_next_common_fuchsia_input::wire::Axis,
14974                        >(slot.as_mut(), decoder, ())?;
14975
14976                        Ok(())
14977                    }
14978
14979                    7 => {
14980                        ::fidl_next::wire::Envelope::decode_as::<
14981                            ___D,
14982                            ::fidl_next_common_fuchsia_input::wire::Axis,
14983                        >(slot.as_mut(), decoder, ())?;
14984
14985                        Ok(())
14986                    }
14987
14988                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14989                }
14990            })
14991        }
14992    }
14993
14994    impl<'de> MouseInputDescriptor<'de> {
14995        pub fn movement_x(
14996            &self,
14997        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
14998            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14999        }
15000
15001        pub fn take_movement_x(
15002            &mut self,
15003        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
15004            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
15005        }
15006
15007        pub fn movement_y(
15008            &self,
15009        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
15010            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15011        }
15012
15013        pub fn take_movement_y(
15014            &mut self,
15015        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
15016            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
15017        }
15018
15019        pub fn scroll_v(
15020            &self,
15021        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
15022            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
15023        }
15024
15025        pub fn take_scroll_v(
15026            &mut self,
15027        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
15028            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
15029        }
15030
15031        pub fn scroll_h(
15032            &self,
15033        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
15034            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
15035        }
15036
15037        pub fn take_scroll_h(
15038            &mut self,
15039        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
15040            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
15041        }
15042
15043        pub fn buttons(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
15044            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
15045        }
15046
15047        pub fn take_buttons(
15048            &mut self,
15049        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
15050            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
15051        }
15052
15053        pub fn position_x(
15054            &self,
15055        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
15056            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
15057        }
15058
15059        pub fn take_position_x(
15060            &mut self,
15061        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
15062            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
15063        }
15064
15065        pub fn position_y(
15066            &self,
15067        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_input::wire::Axis> {
15068            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
15069        }
15070
15071        pub fn take_position_y(
15072            &mut self,
15073        ) -> ::core::option::Option<::fidl_next_common_fuchsia_input::wire::Axis> {
15074            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
15075        }
15076    }
15077
15078    impl<'de> ::core::fmt::Debug for MouseInputDescriptor<'de> {
15079        fn fmt(
15080            &self,
15081            f: &mut ::core::fmt::Formatter<'_>,
15082        ) -> ::core::result::Result<(), ::core::fmt::Error> {
15083            f.debug_struct("MouseInputDescriptor")
15084                .field("movement_x", &self.movement_x())
15085                .field("movement_y", &self.movement_y())
15086                .field("scroll_v", &self.scroll_v())
15087                .field("scroll_h", &self.scroll_h())
15088                .field("buttons", &self.buttons())
15089                .field("position_x", &self.position_x())
15090                .field("position_y", &self.position_y())
15091                .finish()
15092        }
15093    }
15094
15095    impl<'de> ::fidl_next::IntoNatural for MouseInputDescriptor<'de> {
15096        type Natural = crate::natural::MouseInputDescriptor;
15097    }
15098
15099    /// The wire type corresponding to [`MouseDescriptor`].
15100    #[repr(C)]
15101    pub struct MouseDescriptor<'de> {
15102        pub(crate) table: ::fidl_next::wire::Table<'de>,
15103    }
15104
15105    impl<'de> Drop for MouseDescriptor<'de> {
15106        fn drop(&mut self) {
15107            let _ = self.table.get(1).map(|envelope| unsafe {
15108                envelope.read_unchecked::<crate::wire::MouseInputDescriptor<'de>>()
15109            });
15110        }
15111    }
15112
15113    impl ::fidl_next::Constrained for MouseDescriptor<'_> {
15114        type Constraint = ();
15115
15116        fn validate(
15117            _: ::fidl_next::Slot<'_, Self>,
15118            _: Self::Constraint,
15119        ) -> Result<(), ::fidl_next::ValidationError> {
15120            Ok(())
15121        }
15122    }
15123
15124    unsafe impl ::fidl_next::Wire for MouseDescriptor<'static> {
15125        type Narrowed<'de> = MouseDescriptor<'de>;
15126
15127        #[inline]
15128        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15129            ::fidl_next::munge!(let Self { table } = out);
15130            ::fidl_next::wire::Table::zero_padding(table);
15131        }
15132    }
15133
15134    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MouseDescriptor<'de>
15135    where
15136        ___D: ::fidl_next::Decoder<'de> + ?Sized,
15137    {
15138        fn decode(
15139            slot: ::fidl_next::Slot<'_, Self>,
15140            decoder: &mut ___D,
15141            _: (),
15142        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15143            ::fidl_next::munge!(let Self { table } = slot);
15144
15145            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15146                match ordinal {
15147                    0 => unsafe { ::core::hint::unreachable_unchecked() },
15148
15149                    1 => {
15150                        ::fidl_next::wire::Envelope::decode_as::<
15151                            ___D,
15152                            crate::wire::MouseInputDescriptor<'de>,
15153                        >(slot.as_mut(), decoder, ())?;
15154
15155                        Ok(())
15156                    }
15157
15158                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15159                }
15160            })
15161        }
15162    }
15163
15164    impl<'de> MouseDescriptor<'de> {
15165        pub fn input(&self) -> ::core::option::Option<&crate::wire::MouseInputDescriptor<'de>> {
15166            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15167        }
15168
15169        pub fn take_input(
15170            &mut self,
15171        ) -> ::core::option::Option<crate::wire::MouseInputDescriptor<'de>> {
15172            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
15173        }
15174    }
15175
15176    impl<'de> ::core::fmt::Debug for MouseDescriptor<'de> {
15177        fn fmt(
15178            &self,
15179            f: &mut ::core::fmt::Formatter<'_>,
15180        ) -> ::core::result::Result<(), ::core::fmt::Error> {
15181            f.debug_struct("MouseDescriptor").field("input", &self.input()).finish()
15182        }
15183    }
15184
15185    impl<'de> ::fidl_next::IntoNatural for MouseDescriptor<'de> {
15186        type Natural = crate::natural::MouseDescriptor;
15187    }
15188
15189    /// The wire type corresponding to [`SensorType`].
15190    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
15191    #[repr(transparent)]
15192    pub struct SensorType {
15193        pub(crate) value: ::fidl_next::wire::Uint32,
15194    }
15195
15196    impl ::fidl_next::Constrained for SensorType {
15197        type Constraint = ();
15198
15199        fn validate(
15200            _: ::fidl_next::Slot<'_, Self>,
15201            _: Self::Constraint,
15202        ) -> Result<(), ::fidl_next::ValidationError> {
15203            Ok(())
15204        }
15205    }
15206
15207    unsafe impl ::fidl_next::Wire for SensorType {
15208        type Narrowed<'de> = Self;
15209
15210        #[inline]
15211        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15212            // Wire enums have no padding
15213        }
15214    }
15215
15216    impl SensorType {
15217        pub const ACCELEROMETER_X: SensorType = SensorType { value: ::fidl_next::wire::Uint32(1) };
15218
15219        pub const ACCELEROMETER_Y: SensorType = SensorType { value: ::fidl_next::wire::Uint32(2) };
15220
15221        pub const ACCELEROMETER_Z: SensorType = SensorType { value: ::fidl_next::wire::Uint32(3) };
15222
15223        pub const MAGNETOMETER_X: SensorType = SensorType { value: ::fidl_next::wire::Uint32(4) };
15224
15225        pub const MAGNETOMETER_Y: SensorType = SensorType { value: ::fidl_next::wire::Uint32(5) };
15226
15227        pub const MAGNETOMETER_Z: SensorType = SensorType { value: ::fidl_next::wire::Uint32(6) };
15228
15229        pub const GYROSCOPE_X: SensorType = SensorType { value: ::fidl_next::wire::Uint32(7) };
15230
15231        pub const GYROSCOPE_Y: SensorType = SensorType { value: ::fidl_next::wire::Uint32(8) };
15232
15233        pub const GYROSCOPE_Z: SensorType = SensorType { value: ::fidl_next::wire::Uint32(9) };
15234
15235        pub const LIGHT_ILLUMINANCE: SensorType =
15236            SensorType { value: ::fidl_next::wire::Uint32(10) };
15237
15238        pub const LIGHT_RED: SensorType = SensorType { value: ::fidl_next::wire::Uint32(11) };
15239
15240        pub const LIGHT_GREEN: SensorType = SensorType { value: ::fidl_next::wire::Uint32(12) };
15241
15242        pub const LIGHT_BLUE: SensorType = SensorType { value: ::fidl_next::wire::Uint32(13) };
15243    }
15244
15245    unsafe impl<___D> ::fidl_next::Decode<___D> for SensorType
15246    where
15247        ___D: ?Sized,
15248    {
15249        fn decode(
15250            slot: ::fidl_next::Slot<'_, Self>,
15251            _: &mut ___D,
15252            _: (),
15253        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15254            Ok(())
15255        }
15256    }
15257
15258    impl ::core::convert::From<crate::natural::SensorType> for SensorType {
15259        fn from(natural: crate::natural::SensorType) -> Self {
15260            match natural {
15261                crate::natural::SensorType::AccelerometerX => SensorType::ACCELEROMETER_X,
15262
15263                crate::natural::SensorType::AccelerometerY => SensorType::ACCELEROMETER_Y,
15264
15265                crate::natural::SensorType::AccelerometerZ => SensorType::ACCELEROMETER_Z,
15266
15267                crate::natural::SensorType::MagnetometerX => SensorType::MAGNETOMETER_X,
15268
15269                crate::natural::SensorType::MagnetometerY => SensorType::MAGNETOMETER_Y,
15270
15271                crate::natural::SensorType::MagnetometerZ => SensorType::MAGNETOMETER_Z,
15272
15273                crate::natural::SensorType::GyroscopeX => SensorType::GYROSCOPE_X,
15274
15275                crate::natural::SensorType::GyroscopeY => SensorType::GYROSCOPE_Y,
15276
15277                crate::natural::SensorType::GyroscopeZ => SensorType::GYROSCOPE_Z,
15278
15279                crate::natural::SensorType::LightIlluminance => SensorType::LIGHT_ILLUMINANCE,
15280
15281                crate::natural::SensorType::LightRed => SensorType::LIGHT_RED,
15282
15283                crate::natural::SensorType::LightGreen => SensorType::LIGHT_GREEN,
15284
15285                crate::natural::SensorType::LightBlue => SensorType::LIGHT_BLUE,
15286
15287                crate::natural::SensorType::UnknownOrdinal_(value) => {
15288                    SensorType { value: ::fidl_next::wire::Uint32::from(value) }
15289                }
15290            }
15291        }
15292    }
15293
15294    impl ::fidl_next::IntoNatural for SensorType {
15295        type Natural = crate::natural::SensorType;
15296    }
15297
15298    /// The wire type corresponding to [`SensorAxis`].
15299    #[derive(Clone, Debug)]
15300    #[repr(C)]
15301    pub struct SensorAxis {
15302        pub axis: ::fidl_next_common_fuchsia_input::wire::Axis,
15303
15304        pub type_: crate::wire::SensorType,
15305    }
15306
15307    static_assertions::const_assert_eq!(std::mem::size_of::<SensorAxis>(), 32);
15308    static_assertions::const_assert_eq!(std::mem::align_of::<SensorAxis>(), 8);
15309
15310    static_assertions::const_assert_eq!(std::mem::offset_of!(SensorAxis, axis), 0);
15311
15312    static_assertions::const_assert_eq!(std::mem::offset_of!(SensorAxis, type_), 24);
15313
15314    impl ::fidl_next::Constrained for SensorAxis {
15315        type Constraint = ();
15316
15317        fn validate(
15318            _: ::fidl_next::Slot<'_, Self>,
15319            _: Self::Constraint,
15320        ) -> Result<(), ::fidl_next::ValidationError> {
15321            Ok(())
15322        }
15323    }
15324
15325    unsafe impl ::fidl_next::Wire for SensorAxis {
15326        type Narrowed<'de> = SensorAxis;
15327
15328        #[inline]
15329        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15330            ::fidl_next::munge! {
15331                let Self {
15332                    axis,
15333                    type_,
15334
15335                } = &mut *out_;
15336            }
15337
15338            ::fidl_next::Wire::zero_padding(axis);
15339
15340            ::fidl_next::Wire::zero_padding(type_);
15341
15342            unsafe {
15343                out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
15344            }
15345        }
15346    }
15347
15348    unsafe impl<___D> ::fidl_next::Decode<___D> for SensorAxis
15349    where
15350        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15351    {
15352        fn decode(
15353            slot_: ::fidl_next::Slot<'_, Self>,
15354            decoder_: &mut ___D,
15355            _: (),
15356        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15357            if slot_.as_bytes()[28..32] != [0u8; 4] {
15358                return Err(::fidl_next::DecodeError::InvalidPadding);
15359            }
15360
15361            ::fidl_next::munge! {
15362                let Self {
15363                    mut axis,
15364                    mut type_,
15365
15366                } = slot_;
15367            }
15368
15369            let _field = axis.as_mut();
15370
15371            ::fidl_next::Decode::decode(axis.as_mut(), decoder_, ())?;
15372
15373            let _field = type_.as_mut();
15374
15375            ::fidl_next::Decode::decode(type_.as_mut(), decoder_, ())?;
15376
15377            Ok(())
15378        }
15379    }
15380
15381    impl ::fidl_next::IntoNatural for SensorAxis {
15382        type Natural = crate::natural::SensorAxis;
15383    }
15384
15385    /// The wire type corresponding to [`SensorInputDescriptor`].
15386    #[repr(C)]
15387    pub struct SensorInputDescriptor<'de> {
15388        pub(crate) table: ::fidl_next::wire::Table<'de>,
15389    }
15390
15391    impl<'de> Drop for SensorInputDescriptor<'de> {
15392        fn drop(&mut self) {
15393            let _ = self.table.get(1).map(|envelope| unsafe {
15394                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SensorAxis>>()
15395            });
15396        }
15397    }
15398
15399    impl ::fidl_next::Constrained for SensorInputDescriptor<'_> {
15400        type Constraint = ();
15401
15402        fn validate(
15403            _: ::fidl_next::Slot<'_, Self>,
15404            _: Self::Constraint,
15405        ) -> Result<(), ::fidl_next::ValidationError> {
15406            Ok(())
15407        }
15408    }
15409
15410    unsafe impl ::fidl_next::Wire for SensorInputDescriptor<'static> {
15411        type Narrowed<'de> = SensorInputDescriptor<'de>;
15412
15413        #[inline]
15414        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15415            ::fidl_next::munge!(let Self { table } = out);
15416            ::fidl_next::wire::Table::zero_padding(table);
15417        }
15418    }
15419
15420    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SensorInputDescriptor<'de>
15421    where
15422        ___D: ::fidl_next::Decoder<'de> + ?Sized,
15423    {
15424        fn decode(
15425            slot: ::fidl_next::Slot<'_, Self>,
15426            decoder: &mut ___D,
15427            _: (),
15428        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15429            ::fidl_next::munge!(let Self { table } = slot);
15430
15431            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15432                match ordinal {
15433                    0 => unsafe { ::core::hint::unreachable_unchecked() },
15434
15435                    1 => {
15436                        ::fidl_next::wire::Envelope::decode_as::<
15437                            ___D,
15438                            ::fidl_next::wire::Vector<'de, crate::wire::SensorAxis>,
15439                        >(slot.as_mut(), decoder, (100, ()))?;
15440
15441                        let value = unsafe {
15442                            slot
15443                                            .deref_unchecked()
15444                                            .deref_unchecked::<
15445                                                ::fidl_next::wire::Vector<'_, crate::wire::SensorAxis>
15446                                            >()
15447                        };
15448
15449                        if value.len() > 100 {
15450                            return Err(::fidl_next::DecodeError::VectorTooLong {
15451                                size: value.len() as u64,
15452                                limit: 100,
15453                            });
15454                        }
15455
15456                        Ok(())
15457                    }
15458
15459                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15460                }
15461            })
15462        }
15463    }
15464
15465    impl<'de> SensorInputDescriptor<'de> {
15466        pub fn values(
15467            &self,
15468        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::SensorAxis>>
15469        {
15470            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15471        }
15472
15473        pub fn take_values(
15474            &mut self,
15475        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::SensorAxis>>
15476        {
15477            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
15478        }
15479    }
15480
15481    impl<'de> ::core::fmt::Debug for SensorInputDescriptor<'de> {
15482        fn fmt(
15483            &self,
15484            f: &mut ::core::fmt::Formatter<'_>,
15485        ) -> ::core::result::Result<(), ::core::fmt::Error> {
15486            f.debug_struct("SensorInputDescriptor").field("values", &self.values()).finish()
15487        }
15488    }
15489
15490    impl<'de> ::fidl_next::IntoNatural for SensorInputDescriptor<'de> {
15491        type Natural = crate::natural::SensorInputDescriptor;
15492    }
15493
15494    /// The wire type corresponding to [`SensorDescriptor`].
15495    #[repr(C)]
15496    pub struct SensorDescriptor<'de> {
15497        pub(crate) table: ::fidl_next::wire::Table<'de>,
15498    }
15499
15500    impl<'de> Drop for SensorDescriptor<'de> {
15501        fn drop(&mut self) {
15502            let _ = self.table.get(1).map(|envelope| unsafe {
15503                envelope.read_unchecked::<crate::wire::SensorInputDescriptor<'de>>()
15504            });
15505        }
15506    }
15507
15508    impl ::fidl_next::Constrained for SensorDescriptor<'_> {
15509        type Constraint = ();
15510
15511        fn validate(
15512            _: ::fidl_next::Slot<'_, Self>,
15513            _: Self::Constraint,
15514        ) -> Result<(), ::fidl_next::ValidationError> {
15515            Ok(())
15516        }
15517    }
15518
15519    unsafe impl ::fidl_next::Wire for SensorDescriptor<'static> {
15520        type Narrowed<'de> = SensorDescriptor<'de>;
15521
15522        #[inline]
15523        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15524            ::fidl_next::munge!(let Self { table } = out);
15525            ::fidl_next::wire::Table::zero_padding(table);
15526        }
15527    }
15528
15529    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SensorDescriptor<'de>
15530    where
15531        ___D: ::fidl_next::Decoder<'de> + ?Sized,
15532    {
15533        fn decode(
15534            slot: ::fidl_next::Slot<'_, Self>,
15535            decoder: &mut ___D,
15536            _: (),
15537        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15538            ::fidl_next::munge!(let Self { table } = slot);
15539
15540            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15541                match ordinal {
15542                    0 => unsafe { ::core::hint::unreachable_unchecked() },
15543
15544                    1 => {
15545                        ::fidl_next::wire::Envelope::decode_as::<
15546                            ___D,
15547                            crate::wire::SensorInputDescriptor<'de>,
15548                        >(slot.as_mut(), decoder, ())?;
15549
15550                        Ok(())
15551                    }
15552
15553                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15554                }
15555            })
15556        }
15557    }
15558
15559    impl<'de> SensorDescriptor<'de> {
15560        pub fn input(&self) -> ::core::option::Option<&crate::wire::SensorInputDescriptor<'de>> {
15561            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15562        }
15563
15564        pub fn take_input(
15565            &mut self,
15566        ) -> ::core::option::Option<crate::wire::SensorInputDescriptor<'de>> {
15567            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
15568        }
15569    }
15570
15571    impl<'de> ::core::fmt::Debug for SensorDescriptor<'de> {
15572        fn fmt(
15573            &self,
15574            f: &mut ::core::fmt::Formatter<'_>,
15575        ) -> ::core::result::Result<(), ::core::fmt::Error> {
15576            f.debug_struct("SensorDescriptor").field("input", &self.input()).finish()
15577        }
15578    }
15579
15580    impl<'de> ::fidl_next::IntoNatural for SensorDescriptor<'de> {
15581        type Natural = crate::natural::SensorDescriptor;
15582    }
15583
15584    /// The wire type corresponding to [`TouchType`].
15585    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
15586    #[repr(transparent)]
15587    pub struct TouchType {
15588        pub(crate) value: ::fidl_next::wire::Uint32,
15589    }
15590
15591    impl ::fidl_next::Constrained for TouchType {
15592        type Constraint = ();
15593
15594        fn validate(
15595            _: ::fidl_next::Slot<'_, Self>,
15596            _: Self::Constraint,
15597        ) -> Result<(), ::fidl_next::ValidationError> {
15598            Ok(())
15599        }
15600    }
15601
15602    unsafe impl ::fidl_next::Wire for TouchType {
15603        type Narrowed<'de> = Self;
15604
15605        #[inline]
15606        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15607            // Wire enums have no padding
15608        }
15609    }
15610
15611    impl TouchType {
15612        pub const TOUCHSCREEN: TouchType = TouchType { value: ::fidl_next::wire::Uint32(1) };
15613
15614        pub const TOUCHPAD: TouchType = TouchType { value: ::fidl_next::wire::Uint32(2) };
15615    }
15616
15617    unsafe impl<___D> ::fidl_next::Decode<___D> for TouchType
15618    where
15619        ___D: ?Sized,
15620    {
15621        fn decode(
15622            slot: ::fidl_next::Slot<'_, Self>,
15623            _: &mut ___D,
15624            _: (),
15625        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15626            Ok(())
15627        }
15628    }
15629
15630    impl ::core::convert::From<crate::natural::TouchType> for TouchType {
15631        fn from(natural: crate::natural::TouchType) -> Self {
15632            match natural {
15633                crate::natural::TouchType::Touchscreen => TouchType::TOUCHSCREEN,
15634
15635                crate::natural::TouchType::Touchpad => TouchType::TOUCHPAD,
15636
15637                crate::natural::TouchType::UnknownOrdinal_(value) => {
15638                    TouchType { value: ::fidl_next::wire::Uint32::from(value) }
15639                }
15640            }
15641        }
15642    }
15643
15644    impl ::fidl_next::IntoNatural for TouchType {
15645        type Natural = crate::natural::TouchType;
15646    }
15647
15648    /// The wire type corresponding to [`TouchButton`].
15649    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
15650    #[repr(transparent)]
15651    pub struct TouchButton {
15652        pub(crate) value: ::fidl_next::wire::Uint32,
15653    }
15654
15655    impl ::fidl_next::Constrained for TouchButton {
15656        type Constraint = ();
15657
15658        fn validate(
15659            _: ::fidl_next::Slot<'_, Self>,
15660            _: Self::Constraint,
15661        ) -> Result<(), ::fidl_next::ValidationError> {
15662            Ok(())
15663        }
15664    }
15665
15666    unsafe impl ::fidl_next::Wire for TouchButton {
15667        type Narrowed<'de> = Self;
15668
15669        #[inline]
15670        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15671            // Wire enums have no padding
15672        }
15673    }
15674
15675    impl TouchButton {
15676        pub const PALM: TouchButton = TouchButton { value: ::fidl_next::wire::Uint32(1) };
15677
15678        pub const SWIPE_UP: TouchButton = TouchButton { value: ::fidl_next::wire::Uint32(2) };
15679
15680        pub const SWIPE_LEFT: TouchButton = TouchButton { value: ::fidl_next::wire::Uint32(3) };
15681
15682        pub const SWIPE_RIGHT: TouchButton = TouchButton { value: ::fidl_next::wire::Uint32(4) };
15683
15684        pub const SWIPE_DOWN: TouchButton = TouchButton { value: ::fidl_next::wire::Uint32(5) };
15685    }
15686
15687    unsafe impl<___D> ::fidl_next::Decode<___D> for TouchButton
15688    where
15689        ___D: ?Sized,
15690    {
15691        fn decode(
15692            slot: ::fidl_next::Slot<'_, Self>,
15693            _: &mut ___D,
15694            _: (),
15695        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15696            Ok(())
15697        }
15698    }
15699
15700    impl ::core::convert::From<crate::natural::TouchButton> for TouchButton {
15701        fn from(natural: crate::natural::TouchButton) -> Self {
15702            match natural {
15703                crate::natural::TouchButton::Palm => TouchButton::PALM,
15704
15705                crate::natural::TouchButton::SwipeUp => TouchButton::SWIPE_UP,
15706
15707                crate::natural::TouchButton::SwipeLeft => TouchButton::SWIPE_LEFT,
15708
15709                crate::natural::TouchButton::SwipeRight => TouchButton::SWIPE_RIGHT,
15710
15711                crate::natural::TouchButton::SwipeDown => TouchButton::SWIPE_DOWN,
15712
15713                crate::natural::TouchButton::UnknownOrdinal_(value) => {
15714                    TouchButton { value: ::fidl_next::wire::Uint32::from(value) }
15715                }
15716            }
15717        }
15718    }
15719
15720    impl ::fidl_next::IntoNatural for TouchButton {
15721        type Natural = crate::natural::TouchButton;
15722    }
15723
15724    /// The wire type corresponding to [`TouchInputDescriptor`].
15725    #[repr(C)]
15726    pub struct TouchInputDescriptor<'de> {
15727        pub(crate) table: ::fidl_next::wire::Table<'de>,
15728    }
15729
15730    impl<'de> Drop for TouchInputDescriptor<'de> {
15731        fn drop(&mut self) {
15732            let _ = self.table.get(1)
15733                .map(|envelope| unsafe {
15734                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ContactInputDescriptor<'de>>>()
15735                });
15736
15737            let _ = self
15738                .table
15739                .get(2)
15740                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
15741
15742            let _ = self
15743                .table
15744                .get(3)
15745                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::TouchType>() });
15746
15747            let _ = self.table.get(4).map(|envelope| unsafe {
15748                envelope
15749                    .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>()
15750            });
15751        }
15752    }
15753
15754    impl ::fidl_next::Constrained for TouchInputDescriptor<'_> {
15755        type Constraint = ();
15756
15757        fn validate(
15758            _: ::fidl_next::Slot<'_, Self>,
15759            _: Self::Constraint,
15760        ) -> Result<(), ::fidl_next::ValidationError> {
15761            Ok(())
15762        }
15763    }
15764
15765    unsafe impl ::fidl_next::Wire for TouchInputDescriptor<'static> {
15766        type Narrowed<'de> = TouchInputDescriptor<'de>;
15767
15768        #[inline]
15769        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15770            ::fidl_next::munge!(let Self { table } = out);
15771            ::fidl_next::wire::Table::zero_padding(table);
15772        }
15773    }
15774
15775    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TouchInputDescriptor<'de>
15776    where
15777        ___D: ::fidl_next::Decoder<'de> + ?Sized,
15778    {
15779        fn decode(
15780            slot: ::fidl_next::Slot<'_, Self>,
15781            decoder: &mut ___D,
15782            _: (),
15783        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15784            ::fidl_next::munge!(let Self { table } = slot);
15785
15786            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15787                match ordinal {
15788                    0 => unsafe { ::core::hint::unreachable_unchecked() },
15789
15790                    1 => {
15791                        ::fidl_next::wire::Envelope::decode_as::<
15792                            ___D,
15793                            ::fidl_next::wire::Vector<
15794                                'de,
15795                                crate::wire::ContactInputDescriptor<'de>,
15796                            >,
15797                        >(slot.as_mut(), decoder, (10, ()))?;
15798
15799                        let value = unsafe {
15800                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
15801                                '_,
15802                                crate::wire::ContactInputDescriptor<'_>,
15803                            >>()
15804                        };
15805
15806                        if value.len() > 10 {
15807                            return Err(::fidl_next::DecodeError::VectorTooLong {
15808                                size: value.len() as u64,
15809                                limit: 10,
15810                            });
15811                        }
15812
15813                        Ok(())
15814                    }
15815
15816                    2 => {
15817                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
15818                            slot.as_mut(),
15819                            decoder,
15820                            (),
15821                        )?;
15822
15823                        Ok(())
15824                    }
15825
15826                    3 => {
15827                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::TouchType>(
15828                            slot.as_mut(),
15829                            decoder,
15830                            (),
15831                        )?;
15832
15833                        Ok(())
15834                    }
15835
15836                    4 => {
15837                        ::fidl_next::wire::Envelope::decode_as::<
15838                            ___D,
15839                            ::fidl_next::wire::Vector<'de, crate::wire::TouchButton>,
15840                        >(slot.as_mut(), decoder, (10, ()))?;
15841
15842                        let value = unsafe {
15843                            slot
15844                                            .deref_unchecked()
15845                                            .deref_unchecked::<
15846                                                ::fidl_next::wire::Vector<'_, crate::wire::TouchButton>
15847                                            >()
15848                        };
15849
15850                        if value.len() > 10 {
15851                            return Err(::fidl_next::DecodeError::VectorTooLong {
15852                                size: value.len() as u64,
15853                                limit: 10,
15854                            });
15855                        }
15856
15857                        Ok(())
15858                    }
15859
15860                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
15861                }
15862            })
15863        }
15864    }
15865
15866    impl<'de> TouchInputDescriptor<'de> {
15867        pub fn contacts(
15868            &self,
15869        ) -> ::core::option::Option<
15870            &::fidl_next::wire::Vector<'de, crate::wire::ContactInputDescriptor<'de>>,
15871        > {
15872            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15873        }
15874
15875        pub fn take_contacts(
15876            &mut self,
15877        ) -> ::core::option::Option<
15878            ::fidl_next::wire::Vector<'de, crate::wire::ContactInputDescriptor<'de>>,
15879        > {
15880            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
15881        }
15882
15883        pub fn max_contacts(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
15884            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15885        }
15886
15887        pub fn take_max_contacts(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
15888            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
15889        }
15890
15891        pub fn touch_type(&self) -> ::core::option::Option<&crate::wire::TouchType> {
15892            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
15893        }
15894
15895        pub fn take_touch_type(&mut self) -> ::core::option::Option<crate::wire::TouchType> {
15896            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
15897        }
15898
15899        pub fn buttons(
15900            &self,
15901        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>
15902        {
15903            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
15904        }
15905
15906        pub fn take_buttons(
15907            &mut self,
15908        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>
15909        {
15910            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
15911        }
15912    }
15913
15914    impl<'de> ::core::fmt::Debug for TouchInputDescriptor<'de> {
15915        fn fmt(
15916            &self,
15917            f: &mut ::core::fmt::Formatter<'_>,
15918        ) -> ::core::result::Result<(), ::core::fmt::Error> {
15919            f.debug_struct("TouchInputDescriptor")
15920                .field("contacts", &self.contacts())
15921                .field("max_contacts", &self.max_contacts())
15922                .field("touch_type", &self.touch_type())
15923                .field("buttons", &self.buttons())
15924                .finish()
15925        }
15926    }
15927
15928    impl<'de> ::fidl_next::IntoNatural for TouchInputDescriptor<'de> {
15929        type Natural = crate::natural::TouchInputDescriptor;
15930    }
15931
15932    /// The wire type corresponding to [`TouchFeatureDescriptor`].
15933    #[repr(C)]
15934    pub struct TouchFeatureDescriptor<'de> {
15935        pub(crate) table: ::fidl_next::wire::Table<'de>,
15936    }
15937
15938    impl<'de> Drop for TouchFeatureDescriptor<'de> {
15939        fn drop(&mut self) {
15940            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
15941
15942            let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
15943        }
15944    }
15945
15946    impl ::fidl_next::Constrained for TouchFeatureDescriptor<'_> {
15947        type Constraint = ();
15948
15949        fn validate(
15950            _: ::fidl_next::Slot<'_, Self>,
15951            _: Self::Constraint,
15952        ) -> Result<(), ::fidl_next::ValidationError> {
15953            Ok(())
15954        }
15955    }
15956
15957    unsafe impl ::fidl_next::Wire for TouchFeatureDescriptor<'static> {
15958        type Narrowed<'de> = TouchFeatureDescriptor<'de>;
15959
15960        #[inline]
15961        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15962            ::fidl_next::munge!(let Self { table } = out);
15963            ::fidl_next::wire::Table::zero_padding(table);
15964        }
15965    }
15966
15967    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TouchFeatureDescriptor<'de>
15968    where
15969        ___D: ::fidl_next::Decoder<'de> + ?Sized,
15970    {
15971        fn decode(
15972            slot: ::fidl_next::Slot<'_, Self>,
15973            decoder: &mut ___D,
15974            _: (),
15975        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15976            ::fidl_next::munge!(let Self { table } = slot);
15977
15978            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15979                match ordinal {
15980                    0 => unsafe { ::core::hint::unreachable_unchecked() },
15981
15982                    1 => {
15983                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
15984                            slot.as_mut(),
15985                            decoder,
15986                            (),
15987                        )?;
15988
15989                        Ok(())
15990                    }
15991
15992                    2 => {
15993                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
15994                            slot.as_mut(),
15995                            decoder,
15996                            (),
15997                        )?;
15998
15999                        Ok(())
16000                    }
16001
16002                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16003                }
16004            })
16005        }
16006    }
16007
16008    impl<'de> TouchFeatureDescriptor<'de> {
16009        pub fn supports_input_mode(&self) -> ::core::option::Option<&bool> {
16010            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16011        }
16012
16013        pub fn take_supports_input_mode(&mut self) -> ::core::option::Option<bool> {
16014            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16015        }
16016
16017        pub fn supports_selective_reporting(&self) -> ::core::option::Option<&bool> {
16018            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16019        }
16020
16021        pub fn take_supports_selective_reporting(&mut self) -> ::core::option::Option<bool> {
16022            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
16023        }
16024    }
16025
16026    impl<'de> ::core::fmt::Debug for TouchFeatureDescriptor<'de> {
16027        fn fmt(
16028            &self,
16029            f: &mut ::core::fmt::Formatter<'_>,
16030        ) -> ::core::result::Result<(), ::core::fmt::Error> {
16031            f.debug_struct("TouchFeatureDescriptor")
16032                .field("supports_input_mode", &self.supports_input_mode())
16033                .field("supports_selective_reporting", &self.supports_selective_reporting())
16034                .finish()
16035        }
16036    }
16037
16038    impl<'de> ::fidl_next::IntoNatural for TouchFeatureDescriptor<'de> {
16039        type Natural = crate::natural::TouchFeatureDescriptor;
16040    }
16041
16042    /// The wire type corresponding to [`TouchDescriptor`].
16043    #[repr(C)]
16044    pub struct TouchDescriptor<'de> {
16045        pub(crate) table: ::fidl_next::wire::Table<'de>,
16046    }
16047
16048    impl<'de> Drop for TouchDescriptor<'de> {
16049        fn drop(&mut self) {
16050            let _ = self.table.get(1).map(|envelope| unsafe {
16051                envelope.read_unchecked::<crate::wire::TouchInputDescriptor<'de>>()
16052            });
16053
16054            let _ = self.table.get(2).map(|envelope| unsafe {
16055                envelope.read_unchecked::<crate::wire::TouchFeatureDescriptor<'de>>()
16056            });
16057        }
16058    }
16059
16060    impl ::fidl_next::Constrained for TouchDescriptor<'_> {
16061        type Constraint = ();
16062
16063        fn validate(
16064            _: ::fidl_next::Slot<'_, Self>,
16065            _: Self::Constraint,
16066        ) -> Result<(), ::fidl_next::ValidationError> {
16067            Ok(())
16068        }
16069    }
16070
16071    unsafe impl ::fidl_next::Wire for TouchDescriptor<'static> {
16072        type Narrowed<'de> = TouchDescriptor<'de>;
16073
16074        #[inline]
16075        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16076            ::fidl_next::munge!(let Self { table } = out);
16077            ::fidl_next::wire::Table::zero_padding(table);
16078        }
16079    }
16080
16081    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TouchDescriptor<'de>
16082    where
16083        ___D: ::fidl_next::Decoder<'de> + ?Sized,
16084    {
16085        fn decode(
16086            slot: ::fidl_next::Slot<'_, Self>,
16087            decoder: &mut ___D,
16088            _: (),
16089        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16090            ::fidl_next::munge!(let Self { table } = slot);
16091
16092            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16093                match ordinal {
16094                    0 => unsafe { ::core::hint::unreachable_unchecked() },
16095
16096                    1 => {
16097                        ::fidl_next::wire::Envelope::decode_as::<
16098                            ___D,
16099                            crate::wire::TouchInputDescriptor<'de>,
16100                        >(slot.as_mut(), decoder, ())?;
16101
16102                        Ok(())
16103                    }
16104
16105                    2 => {
16106                        ::fidl_next::wire::Envelope::decode_as::<
16107                            ___D,
16108                            crate::wire::TouchFeatureDescriptor<'de>,
16109                        >(slot.as_mut(), decoder, ())?;
16110
16111                        Ok(())
16112                    }
16113
16114                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16115                }
16116            })
16117        }
16118    }
16119
16120    impl<'de> TouchDescriptor<'de> {
16121        pub fn input(&self) -> ::core::option::Option<&crate::wire::TouchInputDescriptor<'de>> {
16122            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16123        }
16124
16125        pub fn take_input(
16126            &mut self,
16127        ) -> ::core::option::Option<crate::wire::TouchInputDescriptor<'de>> {
16128            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16129        }
16130
16131        pub fn feature(&self) -> ::core::option::Option<&crate::wire::TouchFeatureDescriptor<'de>> {
16132            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16133        }
16134
16135        pub fn take_feature(
16136            &mut self,
16137        ) -> ::core::option::Option<crate::wire::TouchFeatureDescriptor<'de>> {
16138            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
16139        }
16140    }
16141
16142    impl<'de> ::core::fmt::Debug for TouchDescriptor<'de> {
16143        fn fmt(
16144            &self,
16145            f: &mut ::core::fmt::Formatter<'_>,
16146        ) -> ::core::result::Result<(), ::core::fmt::Error> {
16147            f.debug_struct("TouchDescriptor")
16148                .field("input", &self.input())
16149                .field("feature", &self.feature())
16150                .finish()
16151        }
16152    }
16153
16154    impl<'de> ::fidl_next::IntoNatural for TouchDescriptor<'de> {
16155        type Natural = crate::natural::TouchDescriptor;
16156    }
16157
16158    /// The wire type corresponding to [`KeyboardInputDescriptor`].
16159    #[repr(C)]
16160    pub struct KeyboardInputDescriptor<'de> {
16161        pub(crate) table: ::fidl_next::wire::Table<'de>,
16162    }
16163
16164    impl<'de> Drop for KeyboardInputDescriptor<'de> {
16165        fn drop(&mut self) {
16166            let _ = self.table.get(1)
16167                .map(|envelope| unsafe {
16168                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_input::wire::Key>>()
16169                });
16170        }
16171    }
16172
16173    impl ::fidl_next::Constrained for KeyboardInputDescriptor<'_> {
16174        type Constraint = ();
16175
16176        fn validate(
16177            _: ::fidl_next::Slot<'_, Self>,
16178            _: Self::Constraint,
16179        ) -> Result<(), ::fidl_next::ValidationError> {
16180            Ok(())
16181        }
16182    }
16183
16184    unsafe impl ::fidl_next::Wire for KeyboardInputDescriptor<'static> {
16185        type Narrowed<'de> = KeyboardInputDescriptor<'de>;
16186
16187        #[inline]
16188        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16189            ::fidl_next::munge!(let Self { table } = out);
16190            ::fidl_next::wire::Table::zero_padding(table);
16191        }
16192    }
16193
16194    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for KeyboardInputDescriptor<'de>
16195    where
16196        ___D: ::fidl_next::Decoder<'de> + ?Sized,
16197    {
16198        fn decode(
16199            slot: ::fidl_next::Slot<'_, Self>,
16200            decoder: &mut ___D,
16201            _: (),
16202        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16203            ::fidl_next::munge!(let Self { table } = slot);
16204
16205            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16206                match ordinal {
16207                    0 => unsafe { ::core::hint::unreachable_unchecked() },
16208
16209                    1 => {
16210                        ::fidl_next::wire::Envelope::decode_as::<
16211                            ___D,
16212                            ::fidl_next::wire::Vector<
16213                                'de,
16214                                ::fidl_next_common_fuchsia_input::wire::Key,
16215                            >,
16216                        >(slot.as_mut(), decoder, (256, ()))?;
16217
16218                        let value = unsafe {
16219                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
16220                                '_,
16221                                ::fidl_next_common_fuchsia_input::wire::Key,
16222                            >>()
16223                        };
16224
16225                        if value.len() > 256 {
16226                            return Err(::fidl_next::DecodeError::VectorTooLong {
16227                                size: value.len() as u64,
16228                                limit: 256,
16229                            });
16230                        }
16231
16232                        Ok(())
16233                    }
16234
16235                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16236                }
16237            })
16238        }
16239    }
16240
16241    impl<'de> KeyboardInputDescriptor<'de> {
16242        pub fn keys(
16243            &self,
16244        ) -> ::core::option::Option<
16245            &::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_input::wire::Key>,
16246        > {
16247            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16248        }
16249
16250        pub fn take_keys(
16251            &mut self,
16252        ) -> ::core::option::Option<
16253            ::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_input::wire::Key>,
16254        > {
16255            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16256        }
16257    }
16258
16259    impl<'de> ::core::fmt::Debug for KeyboardInputDescriptor<'de> {
16260        fn fmt(
16261            &self,
16262            f: &mut ::core::fmt::Formatter<'_>,
16263        ) -> ::core::result::Result<(), ::core::fmt::Error> {
16264            f.debug_struct("KeyboardInputDescriptor").field("keys", &self.keys()).finish()
16265        }
16266    }
16267
16268    impl<'de> ::fidl_next::IntoNatural for KeyboardInputDescriptor<'de> {
16269        type Natural = crate::natural::KeyboardInputDescriptor;
16270    }
16271
16272    /// The wire type corresponding to [`LedType`].
16273    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
16274    #[repr(transparent)]
16275    pub struct LedType {
16276        pub(crate) value: ::fidl_next::wire::Uint32,
16277    }
16278
16279    impl ::fidl_next::Constrained for LedType {
16280        type Constraint = ();
16281
16282        fn validate(
16283            _: ::fidl_next::Slot<'_, Self>,
16284            _: Self::Constraint,
16285        ) -> Result<(), ::fidl_next::ValidationError> {
16286            Ok(())
16287        }
16288    }
16289
16290    unsafe impl ::fidl_next::Wire for LedType {
16291        type Narrowed<'de> = Self;
16292
16293        #[inline]
16294        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
16295            // Wire enums have no padding
16296        }
16297    }
16298
16299    impl LedType {
16300        pub const NUM_LOCK: LedType = LedType { value: ::fidl_next::wire::Uint32(1) };
16301
16302        pub const CAPS_LOCK: LedType = LedType { value: ::fidl_next::wire::Uint32(2) };
16303
16304        pub const SCROLL_LOCK: LedType = LedType { value: ::fidl_next::wire::Uint32(3) };
16305
16306        pub const COMPOSE: LedType = LedType { value: ::fidl_next::wire::Uint32(4) };
16307
16308        pub const KANA: LedType = LedType { value: ::fidl_next::wire::Uint32(5) };
16309    }
16310
16311    unsafe impl<___D> ::fidl_next::Decode<___D> for LedType
16312    where
16313        ___D: ?Sized,
16314    {
16315        fn decode(
16316            slot: ::fidl_next::Slot<'_, Self>,
16317            _: &mut ___D,
16318            _: (),
16319        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16320            Ok(())
16321        }
16322    }
16323
16324    impl ::core::convert::From<crate::natural::LedType> for LedType {
16325        fn from(natural: crate::natural::LedType) -> Self {
16326            match natural {
16327                crate::natural::LedType::NumLock => LedType::NUM_LOCK,
16328
16329                crate::natural::LedType::CapsLock => LedType::CAPS_LOCK,
16330
16331                crate::natural::LedType::ScrollLock => LedType::SCROLL_LOCK,
16332
16333                crate::natural::LedType::Compose => LedType::COMPOSE,
16334
16335                crate::natural::LedType::Kana => LedType::KANA,
16336
16337                crate::natural::LedType::UnknownOrdinal_(value) => {
16338                    LedType { value: ::fidl_next::wire::Uint32::from(value) }
16339                }
16340            }
16341        }
16342    }
16343
16344    impl ::fidl_next::IntoNatural for LedType {
16345        type Natural = crate::natural::LedType;
16346    }
16347
16348    /// The wire type corresponding to [`KeyboardOutputDescriptor`].
16349    #[repr(C)]
16350    pub struct KeyboardOutputDescriptor<'de> {
16351        pub(crate) table: ::fidl_next::wire::Table<'de>,
16352    }
16353
16354    impl<'de> Drop for KeyboardOutputDescriptor<'de> {
16355        fn drop(&mut self) {
16356            let _ = self.table.get(1).map(|envelope| unsafe {
16357                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::LedType>>()
16358            });
16359        }
16360    }
16361
16362    impl ::fidl_next::Constrained for KeyboardOutputDescriptor<'_> {
16363        type Constraint = ();
16364
16365        fn validate(
16366            _: ::fidl_next::Slot<'_, Self>,
16367            _: Self::Constraint,
16368        ) -> Result<(), ::fidl_next::ValidationError> {
16369            Ok(())
16370        }
16371    }
16372
16373    unsafe impl ::fidl_next::Wire for KeyboardOutputDescriptor<'static> {
16374        type Narrowed<'de> = KeyboardOutputDescriptor<'de>;
16375
16376        #[inline]
16377        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16378            ::fidl_next::munge!(let Self { table } = out);
16379            ::fidl_next::wire::Table::zero_padding(table);
16380        }
16381    }
16382
16383    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for KeyboardOutputDescriptor<'de>
16384    where
16385        ___D: ::fidl_next::Decoder<'de> + ?Sized,
16386    {
16387        fn decode(
16388            slot: ::fidl_next::Slot<'_, Self>,
16389            decoder: &mut ___D,
16390            _: (),
16391        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16392            ::fidl_next::munge!(let Self { table } = slot);
16393
16394            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16395                match ordinal {
16396                    0 => unsafe { ::core::hint::unreachable_unchecked() },
16397
16398                    1 => {
16399                        ::fidl_next::wire::Envelope::decode_as::<
16400                            ___D,
16401                            ::fidl_next::wire::Vector<'de, crate::wire::LedType>,
16402                        >(slot.as_mut(), decoder, (256, ()))?;
16403
16404                        let value = unsafe {
16405                            slot
16406                                            .deref_unchecked()
16407                                            .deref_unchecked::<
16408                                                ::fidl_next::wire::Vector<'_, crate::wire::LedType>
16409                                            >()
16410                        };
16411
16412                        if value.len() > 256 {
16413                            return Err(::fidl_next::DecodeError::VectorTooLong {
16414                                size: value.len() as u64,
16415                                limit: 256,
16416                            });
16417                        }
16418
16419                        Ok(())
16420                    }
16421
16422                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16423                }
16424            })
16425        }
16426    }
16427
16428    impl<'de> KeyboardOutputDescriptor<'de> {
16429        pub fn leds(
16430            &self,
16431        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::LedType>> {
16432            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16433        }
16434
16435        pub fn take_leds(
16436            &mut self,
16437        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::LedType>> {
16438            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16439        }
16440    }
16441
16442    impl<'de> ::core::fmt::Debug for KeyboardOutputDescriptor<'de> {
16443        fn fmt(
16444            &self,
16445            f: &mut ::core::fmt::Formatter<'_>,
16446        ) -> ::core::result::Result<(), ::core::fmt::Error> {
16447            f.debug_struct("KeyboardOutputDescriptor").field("leds", &self.leds()).finish()
16448        }
16449    }
16450
16451    impl<'de> ::fidl_next::IntoNatural for KeyboardOutputDescriptor<'de> {
16452        type Natural = crate::natural::KeyboardOutputDescriptor;
16453    }
16454
16455    /// The wire type corresponding to [`KeyboardDescriptor`].
16456    #[repr(C)]
16457    pub struct KeyboardDescriptor<'de> {
16458        pub(crate) table: ::fidl_next::wire::Table<'de>,
16459    }
16460
16461    impl<'de> Drop for KeyboardDescriptor<'de> {
16462        fn drop(&mut self) {
16463            let _ = self.table.get(1).map(|envelope| unsafe {
16464                envelope.read_unchecked::<crate::wire::KeyboardInputDescriptor<'de>>()
16465            });
16466
16467            let _ = self.table.get(2).map(|envelope| unsafe {
16468                envelope.read_unchecked::<crate::wire::KeyboardOutputDescriptor<'de>>()
16469            });
16470        }
16471    }
16472
16473    impl ::fidl_next::Constrained for KeyboardDescriptor<'_> {
16474        type Constraint = ();
16475
16476        fn validate(
16477            _: ::fidl_next::Slot<'_, Self>,
16478            _: Self::Constraint,
16479        ) -> Result<(), ::fidl_next::ValidationError> {
16480            Ok(())
16481        }
16482    }
16483
16484    unsafe impl ::fidl_next::Wire for KeyboardDescriptor<'static> {
16485        type Narrowed<'de> = KeyboardDescriptor<'de>;
16486
16487        #[inline]
16488        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16489            ::fidl_next::munge!(let Self { table } = out);
16490            ::fidl_next::wire::Table::zero_padding(table);
16491        }
16492    }
16493
16494    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for KeyboardDescriptor<'de>
16495    where
16496        ___D: ::fidl_next::Decoder<'de> + ?Sized,
16497    {
16498        fn decode(
16499            slot: ::fidl_next::Slot<'_, Self>,
16500            decoder: &mut ___D,
16501            _: (),
16502        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16503            ::fidl_next::munge!(let Self { table } = slot);
16504
16505            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16506                match ordinal {
16507                    0 => unsafe { ::core::hint::unreachable_unchecked() },
16508
16509                    1 => {
16510                        ::fidl_next::wire::Envelope::decode_as::<
16511                            ___D,
16512                            crate::wire::KeyboardInputDescriptor<'de>,
16513                        >(slot.as_mut(), decoder, ())?;
16514
16515                        Ok(())
16516                    }
16517
16518                    2 => {
16519                        ::fidl_next::wire::Envelope::decode_as::<
16520                            ___D,
16521                            crate::wire::KeyboardOutputDescriptor<'de>,
16522                        >(slot.as_mut(), decoder, ())?;
16523
16524                        Ok(())
16525                    }
16526
16527                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16528                }
16529            })
16530        }
16531    }
16532
16533    impl<'de> KeyboardDescriptor<'de> {
16534        pub fn input(&self) -> ::core::option::Option<&crate::wire::KeyboardInputDescriptor<'de>> {
16535            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16536        }
16537
16538        pub fn take_input(
16539            &mut self,
16540        ) -> ::core::option::Option<crate::wire::KeyboardInputDescriptor<'de>> {
16541            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16542        }
16543
16544        pub fn output(
16545            &self,
16546        ) -> ::core::option::Option<&crate::wire::KeyboardOutputDescriptor<'de>> {
16547            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16548        }
16549
16550        pub fn take_output(
16551            &mut self,
16552        ) -> ::core::option::Option<crate::wire::KeyboardOutputDescriptor<'de>> {
16553            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
16554        }
16555    }
16556
16557    impl<'de> ::core::fmt::Debug for KeyboardDescriptor<'de> {
16558        fn fmt(
16559            &self,
16560            f: &mut ::core::fmt::Formatter<'_>,
16561        ) -> ::core::result::Result<(), ::core::fmt::Error> {
16562            f.debug_struct("KeyboardDescriptor")
16563                .field("input", &self.input())
16564                .field("output", &self.output())
16565                .finish()
16566        }
16567    }
16568
16569    impl<'de> ::fidl_next::IntoNatural for KeyboardDescriptor<'de> {
16570        type Natural = crate::natural::KeyboardDescriptor;
16571    }
16572
16573    /// The wire type corresponding to [`DeviceDescriptor`].
16574    #[repr(C)]
16575    pub struct DeviceDescriptor<'de> {
16576        pub(crate) table: ::fidl_next::wire::Table<'de>,
16577    }
16578
16579    impl<'de> Drop for DeviceDescriptor<'de> {
16580        fn drop(&mut self) {
16581            let _ = self.table.get(1).map(|envelope| unsafe {
16582                envelope.read_unchecked::<crate::wire::DeviceInformation<'de>>()
16583            });
16584
16585            let _ = self.table.get(2).map(|envelope| unsafe {
16586                envelope.read_unchecked::<crate::wire::MouseDescriptor<'de>>()
16587            });
16588
16589            let _ = self.table.get(3).map(|envelope| unsafe {
16590                envelope.read_unchecked::<crate::wire::SensorDescriptor<'de>>()
16591            });
16592
16593            let _ = self.table.get(4).map(|envelope| unsafe {
16594                envelope.read_unchecked::<crate::wire::TouchDescriptor<'de>>()
16595            });
16596
16597            let _ = self.table.get(5).map(|envelope| unsafe {
16598                envelope.read_unchecked::<crate::wire::KeyboardDescriptor<'de>>()
16599            });
16600
16601            let _ = self.table.get(6).map(|envelope| unsafe {
16602                envelope.read_unchecked::<crate::wire::ConsumerControlDescriptor<'de>>()
16603            });
16604        }
16605    }
16606
16607    impl ::fidl_next::Constrained for DeviceDescriptor<'_> {
16608        type Constraint = ();
16609
16610        fn validate(
16611            _: ::fidl_next::Slot<'_, Self>,
16612            _: Self::Constraint,
16613        ) -> Result<(), ::fidl_next::ValidationError> {
16614            Ok(())
16615        }
16616    }
16617
16618    unsafe impl ::fidl_next::Wire for DeviceDescriptor<'static> {
16619        type Narrowed<'de> = DeviceDescriptor<'de>;
16620
16621        #[inline]
16622        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16623            ::fidl_next::munge!(let Self { table } = out);
16624            ::fidl_next::wire::Table::zero_padding(table);
16625        }
16626    }
16627
16628    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceDescriptor<'de>
16629    where
16630        ___D: ::fidl_next::Decoder<'de> + ?Sized,
16631    {
16632        fn decode(
16633            slot: ::fidl_next::Slot<'_, Self>,
16634            decoder: &mut ___D,
16635            _: (),
16636        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16637            ::fidl_next::munge!(let Self { table } = slot);
16638
16639            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16640                match ordinal {
16641                    0 => unsafe { ::core::hint::unreachable_unchecked() },
16642
16643                    1 => {
16644                        ::fidl_next::wire::Envelope::decode_as::<
16645                            ___D,
16646                            crate::wire::DeviceInformation<'de>,
16647                        >(slot.as_mut(), decoder, ())?;
16648
16649                        Ok(())
16650                    }
16651
16652                    2 => {
16653                        ::fidl_next::wire::Envelope::decode_as::<
16654                            ___D,
16655                            crate::wire::MouseDescriptor<'de>,
16656                        >(slot.as_mut(), decoder, ())?;
16657
16658                        Ok(())
16659                    }
16660
16661                    3 => {
16662                        ::fidl_next::wire::Envelope::decode_as::<
16663                            ___D,
16664                            crate::wire::SensorDescriptor<'de>,
16665                        >(slot.as_mut(), decoder, ())?;
16666
16667                        Ok(())
16668                    }
16669
16670                    4 => {
16671                        ::fidl_next::wire::Envelope::decode_as::<
16672                            ___D,
16673                            crate::wire::TouchDescriptor<'de>,
16674                        >(slot.as_mut(), decoder, ())?;
16675
16676                        Ok(())
16677                    }
16678
16679                    5 => {
16680                        ::fidl_next::wire::Envelope::decode_as::<
16681                            ___D,
16682                            crate::wire::KeyboardDescriptor<'de>,
16683                        >(slot.as_mut(), decoder, ())?;
16684
16685                        Ok(())
16686                    }
16687
16688                    6 => {
16689                        ::fidl_next::wire::Envelope::decode_as::<
16690                            ___D,
16691                            crate::wire::ConsumerControlDescriptor<'de>,
16692                        >(slot.as_mut(), decoder, ())?;
16693
16694                        Ok(())
16695                    }
16696
16697                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16698                }
16699            })
16700        }
16701    }
16702
16703    impl<'de> DeviceDescriptor<'de> {
16704        pub fn device_information(
16705            &self,
16706        ) -> ::core::option::Option<&crate::wire::DeviceInformation<'de>> {
16707            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16708        }
16709
16710        pub fn take_device_information(
16711            &mut self,
16712        ) -> ::core::option::Option<crate::wire::DeviceInformation<'de>> {
16713            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16714        }
16715
16716        pub fn mouse(&self) -> ::core::option::Option<&crate::wire::MouseDescriptor<'de>> {
16717            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16718        }
16719
16720        pub fn take_mouse(&mut self) -> ::core::option::Option<crate::wire::MouseDescriptor<'de>> {
16721            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
16722        }
16723
16724        pub fn sensor(&self) -> ::core::option::Option<&crate::wire::SensorDescriptor<'de>> {
16725            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
16726        }
16727
16728        pub fn take_sensor(
16729            &mut self,
16730        ) -> ::core::option::Option<crate::wire::SensorDescriptor<'de>> {
16731            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
16732        }
16733
16734        pub fn touch(&self) -> ::core::option::Option<&crate::wire::TouchDescriptor<'de>> {
16735            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
16736        }
16737
16738        pub fn take_touch(&mut self) -> ::core::option::Option<crate::wire::TouchDescriptor<'de>> {
16739            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
16740        }
16741
16742        pub fn keyboard(&self) -> ::core::option::Option<&crate::wire::KeyboardDescriptor<'de>> {
16743            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
16744        }
16745
16746        pub fn take_keyboard(
16747            &mut self,
16748        ) -> ::core::option::Option<crate::wire::KeyboardDescriptor<'de>> {
16749            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
16750        }
16751
16752        pub fn consumer_control(
16753            &self,
16754        ) -> ::core::option::Option<&crate::wire::ConsumerControlDescriptor<'de>> {
16755            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
16756        }
16757
16758        pub fn take_consumer_control(
16759            &mut self,
16760        ) -> ::core::option::Option<crate::wire::ConsumerControlDescriptor<'de>> {
16761            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
16762        }
16763    }
16764
16765    impl<'de> ::core::fmt::Debug for DeviceDescriptor<'de> {
16766        fn fmt(
16767            &self,
16768            f: &mut ::core::fmt::Formatter<'_>,
16769        ) -> ::core::result::Result<(), ::core::fmt::Error> {
16770            f.debug_struct("DeviceDescriptor")
16771                .field("device_information", &self.device_information())
16772                .field("mouse", &self.mouse())
16773                .field("sensor", &self.sensor())
16774                .field("touch", &self.touch())
16775                .field("keyboard", &self.keyboard())
16776                .field("consumer_control", &self.consumer_control())
16777                .finish()
16778        }
16779    }
16780
16781    impl<'de> ::fidl_next::IntoNatural for DeviceDescriptor<'de> {
16782        type Natural = crate::natural::DeviceDescriptor;
16783    }
16784
16785    /// The wire type corresponding to [`DeviceEvent`].
16786    #[repr(C)]
16787    pub struct DeviceEvent<'de> {
16788        pub(crate) table: ::fidl_next::wire::Table<'de>,
16789    }
16790
16791    impl<'de> Drop for DeviceEvent<'de> {
16792        fn drop(&mut self) {
16793            let _ = self
16794                .table
16795                .get(1)
16796                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Action>() });
16797
16798            let _ = self
16799                .table
16800                .get(2)
16801                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
16802
16803            let _ = self.table.get(3).map(|envelope| unsafe {
16804                envelope.read_unchecked::<crate::wire::DeviceDescriptor<'de>>()
16805            });
16806        }
16807    }
16808
16809    impl ::fidl_next::Constrained for DeviceEvent<'_> {
16810        type Constraint = ();
16811
16812        fn validate(
16813            _: ::fidl_next::Slot<'_, Self>,
16814            _: Self::Constraint,
16815        ) -> Result<(), ::fidl_next::ValidationError> {
16816            Ok(())
16817        }
16818    }
16819
16820    unsafe impl ::fidl_next::Wire for DeviceEvent<'static> {
16821        type Narrowed<'de> = DeviceEvent<'de>;
16822
16823        #[inline]
16824        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16825            ::fidl_next::munge!(let Self { table } = out);
16826            ::fidl_next::wire::Table::zero_padding(table);
16827        }
16828    }
16829
16830    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceEvent<'de>
16831    where
16832        ___D: ::fidl_next::Decoder<'de> + ?Sized,
16833    {
16834        fn decode(
16835            slot: ::fidl_next::Slot<'_, Self>,
16836            decoder: &mut ___D,
16837            _: (),
16838        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16839            ::fidl_next::munge!(let Self { table } = slot);
16840
16841            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16842                match ordinal {
16843                    0 => unsafe { ::core::hint::unreachable_unchecked() },
16844
16845                    1 => {
16846                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Action>(
16847                            slot.as_mut(),
16848                            decoder,
16849                            (),
16850                        )?;
16851
16852                        Ok(())
16853                    }
16854
16855                    2 => {
16856                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
16857                            slot.as_mut(),
16858                            decoder,
16859                            (),
16860                        )?;
16861
16862                        Ok(())
16863                    }
16864
16865                    3 => {
16866                        ::fidl_next::wire::Envelope::decode_as::<
16867                            ___D,
16868                            crate::wire::DeviceDescriptor<'de>,
16869                        >(slot.as_mut(), decoder, ())?;
16870
16871                        Ok(())
16872                    }
16873
16874                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
16875                }
16876            })
16877        }
16878    }
16879
16880    impl<'de> DeviceEvent<'de> {
16881        pub fn action(&self) -> ::core::option::Option<&crate::wire::Action> {
16882            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16883        }
16884
16885        pub fn take_action(&mut self) -> ::core::option::Option<crate::wire::Action> {
16886            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
16887        }
16888
16889        pub fn device_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
16890            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16891        }
16892
16893        pub fn take_device_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
16894            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
16895        }
16896
16897        pub fn descriptor(&self) -> ::core::option::Option<&crate::wire::DeviceDescriptor<'de>> {
16898            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
16899        }
16900
16901        pub fn take_descriptor(
16902            &mut self,
16903        ) -> ::core::option::Option<crate::wire::DeviceDescriptor<'de>> {
16904            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
16905        }
16906    }
16907
16908    impl<'de> ::core::fmt::Debug for DeviceEvent<'de> {
16909        fn fmt(
16910            &self,
16911            f: &mut ::core::fmt::Formatter<'_>,
16912        ) -> ::core::result::Result<(), ::core::fmt::Error> {
16913            f.debug_struct("DeviceEvent")
16914                .field("action", &self.action())
16915                .field("device_id", &self.device_id())
16916                .field("descriptor", &self.descriptor())
16917                .finish()
16918        }
16919    }
16920
16921    impl<'de> ::fidl_next::IntoNatural for DeviceEvent<'de> {
16922        type Natural = crate::natural::DeviceEvent;
16923    }
16924
16925    /// The wire type corresponding to [`DeviceInfo`].
16926    #[derive(Debug)]
16927    #[repr(C)]
16928    pub struct DeviceInfo<'de> {
16929        pub vendor_id: ::fidl_next::wire::Uint32,
16930
16931        pub product_id: ::fidl_next::wire::Uint32,
16932
16933        pub version: ::fidl_next::wire::Uint32,
16934
16935        pub name: ::fidl_next::wire::String<'de>,
16936    }
16937
16938    static_assertions::const_assert_eq!(std::mem::size_of::<DeviceInfo<'_>>(), 32);
16939    static_assertions::const_assert_eq!(std::mem::align_of::<DeviceInfo<'_>>(), 8);
16940
16941    static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceInfo<'_>, vendor_id), 0);
16942
16943    static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceInfo<'_>, product_id), 4);
16944
16945    static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceInfo<'_>, version), 8);
16946
16947    static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceInfo<'_>, name), 16);
16948
16949    impl ::fidl_next::Constrained for DeviceInfo<'_> {
16950        type Constraint = ();
16951
16952        fn validate(
16953            _: ::fidl_next::Slot<'_, Self>,
16954            _: Self::Constraint,
16955        ) -> Result<(), ::fidl_next::ValidationError> {
16956            Ok(())
16957        }
16958    }
16959
16960    unsafe impl ::fidl_next::Wire for DeviceInfo<'static> {
16961        type Narrowed<'de> = DeviceInfo<'de>;
16962
16963        #[inline]
16964        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16965            ::fidl_next::munge! {
16966                let Self {
16967                    vendor_id,
16968                    product_id,
16969                    version,
16970                    name,
16971
16972                } = &mut *out_;
16973            }
16974
16975            ::fidl_next::Wire::zero_padding(vendor_id);
16976
16977            ::fidl_next::Wire::zero_padding(product_id);
16978
16979            ::fidl_next::Wire::zero_padding(version);
16980
16981            ::fidl_next::Wire::zero_padding(name);
16982
16983            unsafe {
16984                out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
16985            }
16986        }
16987    }
16988
16989    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceInfo<'de>
16990    where
16991        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16992        ___D: ::fidl_next::Decoder<'de>,
16993    {
16994        fn decode(
16995            slot_: ::fidl_next::Slot<'_, Self>,
16996            decoder_: &mut ___D,
16997            _: (),
16998        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16999            if slot_.as_bytes()[12..16] != [0u8; 4] {
17000                return Err(::fidl_next::DecodeError::InvalidPadding);
17001            }
17002
17003            ::fidl_next::munge! {
17004                let Self {
17005                    mut vendor_id,
17006                    mut product_id,
17007                    mut version,
17008                    mut name,
17009
17010                } = slot_;
17011            }
17012
17013            let _field = vendor_id.as_mut();
17014
17015            ::fidl_next::Decode::decode(vendor_id.as_mut(), decoder_, ())?;
17016
17017            let _field = product_id.as_mut();
17018
17019            ::fidl_next::Decode::decode(product_id.as_mut(), decoder_, ())?;
17020
17021            let _field = version.as_mut();
17022
17023            ::fidl_next::Decode::decode(version.as_mut(), decoder_, ())?;
17024
17025            let _field = name.as_mut();
17026            ::fidl_next::Constrained::validate(_field, 4294967295)?;
17027            ::fidl_next::Decode::decode(name.as_mut(), decoder_, 4294967295)?;
17028
17029            Ok(())
17030        }
17031    }
17032
17033    impl<'de> ::fidl_next::IntoNatural for DeviceInfo<'de> {
17034        type Natural = crate::natural::DeviceInfo;
17035    }
17036
17037    /// The wire type corresponding to [`DeviceIteratorGetNextResponse`].
17038    #[derive(Debug)]
17039    #[repr(C)]
17040    pub struct DeviceIteratorGetNextResponse<'de> {
17041        pub devices: ::fidl_next::wire::Vector<'de, crate::wire::DeviceEvent<'de>>,
17042    }
17043
17044    static_assertions::const_assert_eq!(
17045        std::mem::size_of::<DeviceIteratorGetNextResponse<'_>>(),
17046        16
17047    );
17048    static_assertions::const_assert_eq!(
17049        std::mem::align_of::<DeviceIteratorGetNextResponse<'_>>(),
17050        8
17051    );
17052
17053    static_assertions::const_assert_eq!(
17054        std::mem::offset_of!(DeviceIteratorGetNextResponse<'_>, devices),
17055        0
17056    );
17057
17058    impl ::fidl_next::Constrained for DeviceIteratorGetNextResponse<'_> {
17059        type Constraint = ();
17060
17061        fn validate(
17062            _: ::fidl_next::Slot<'_, Self>,
17063            _: Self::Constraint,
17064        ) -> Result<(), ::fidl_next::ValidationError> {
17065            Ok(())
17066        }
17067    }
17068
17069    unsafe impl ::fidl_next::Wire for DeviceIteratorGetNextResponse<'static> {
17070        type Narrowed<'de> = DeviceIteratorGetNextResponse<'de>;
17071
17072        #[inline]
17073        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17074            ::fidl_next::munge! {
17075                let Self {
17076                    devices,
17077
17078                } = &mut *out_;
17079            }
17080
17081            ::fidl_next::Wire::zero_padding(devices);
17082        }
17083    }
17084
17085    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceIteratorGetNextResponse<'de>
17086    where
17087        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17088        ___D: ::fidl_next::Decoder<'de>,
17089    {
17090        fn decode(
17091            slot_: ::fidl_next::Slot<'_, Self>,
17092            decoder_: &mut ___D,
17093            _: (),
17094        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17095            ::fidl_next::munge! {
17096                let Self {
17097                    mut devices,
17098
17099                } = slot_;
17100            }
17101
17102            let _field = devices.as_mut();
17103            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
17104            ::fidl_next::Decode::decode(devices.as_mut(), decoder_, (4294967295, ()))?;
17105
17106            Ok(())
17107        }
17108    }
17109
17110    impl<'de> ::fidl_next::IntoNatural for DeviceIteratorGetNextResponse<'de> {
17111        type Natural = crate::natural::DeviceIteratorGetNextResponse;
17112    }
17113
17114    /// The wire type corresponding to [`DeviceListenerOnDeviceChangedRequest`].
17115    #[derive(Debug)]
17116    #[repr(C)]
17117    pub struct DeviceListenerOnDeviceChangedRequest<'de> {
17118        pub event: crate::wire::DeviceEvent<'de>,
17119    }
17120
17121    static_assertions::const_assert_eq!(
17122        std::mem::size_of::<DeviceListenerOnDeviceChangedRequest<'_>>(),
17123        16
17124    );
17125    static_assertions::const_assert_eq!(
17126        std::mem::align_of::<DeviceListenerOnDeviceChangedRequest<'_>>(),
17127        8
17128    );
17129
17130    static_assertions::const_assert_eq!(
17131        std::mem::offset_of!(DeviceListenerOnDeviceChangedRequest<'_>, event),
17132        0
17133    );
17134
17135    impl ::fidl_next::Constrained for DeviceListenerOnDeviceChangedRequest<'_> {
17136        type Constraint = ();
17137
17138        fn validate(
17139            _: ::fidl_next::Slot<'_, Self>,
17140            _: Self::Constraint,
17141        ) -> Result<(), ::fidl_next::ValidationError> {
17142            Ok(())
17143        }
17144    }
17145
17146    unsafe impl ::fidl_next::Wire for DeviceListenerOnDeviceChangedRequest<'static> {
17147        type Narrowed<'de> = DeviceListenerOnDeviceChangedRequest<'de>;
17148
17149        #[inline]
17150        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17151            ::fidl_next::munge! {
17152                let Self {
17153                    event,
17154
17155                } = &mut *out_;
17156            }
17157
17158            ::fidl_next::Wire::zero_padding(event);
17159        }
17160    }
17161
17162    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceListenerOnDeviceChangedRequest<'de>
17163    where
17164        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17165        ___D: ::fidl_next::Decoder<'de>,
17166    {
17167        fn decode(
17168            slot_: ::fidl_next::Slot<'_, Self>,
17169            decoder_: &mut ___D,
17170            _: (),
17171        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17172            ::fidl_next::munge! {
17173                let Self {
17174                    mut event,
17175
17176                } = slot_;
17177            }
17178
17179            let _field = event.as_mut();
17180
17181            ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
17182
17183            Ok(())
17184        }
17185    }
17186
17187    impl<'de> ::fidl_next::IntoNatural for DeviceListenerOnDeviceChangedRequest<'de> {
17188        type Natural = crate::natural::DeviceListenerOnDeviceChangedRequest;
17189    }
17190
17191    /// The wire type corresponding to [`FocusEvent`].
17192    #[derive(Clone, Debug)]
17193    #[repr(C)]
17194    pub struct FocusEvent {
17195        pub event_time: ::fidl_next::wire::Uint64,
17196
17197        pub focused: bool,
17198    }
17199
17200    static_assertions::const_assert_eq!(std::mem::size_of::<FocusEvent>(), 16);
17201    static_assertions::const_assert_eq!(std::mem::align_of::<FocusEvent>(), 8);
17202
17203    static_assertions::const_assert_eq!(std::mem::offset_of!(FocusEvent, event_time), 0);
17204
17205    static_assertions::const_assert_eq!(std::mem::offset_of!(FocusEvent, focused), 8);
17206
17207    impl ::fidl_next::Constrained for FocusEvent {
17208        type Constraint = ();
17209
17210        fn validate(
17211            _: ::fidl_next::Slot<'_, Self>,
17212            _: Self::Constraint,
17213        ) -> Result<(), ::fidl_next::ValidationError> {
17214            Ok(())
17215        }
17216    }
17217
17218    unsafe impl ::fidl_next::Wire for FocusEvent {
17219        type Narrowed<'de> = FocusEvent;
17220
17221        #[inline]
17222        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17223            ::fidl_next::munge! {
17224                let Self {
17225                    event_time,
17226                    focused,
17227
17228                } = &mut *out_;
17229            }
17230
17231            ::fidl_next::Wire::zero_padding(event_time);
17232
17233            ::fidl_next::Wire::zero_padding(focused);
17234
17235            unsafe {
17236                out_.as_mut_ptr().cast::<u8>().add(9).write_bytes(0, 7);
17237            }
17238        }
17239    }
17240
17241    unsafe impl<___D> ::fidl_next::Decode<___D> for FocusEvent
17242    where
17243        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17244    {
17245        fn decode(
17246            slot_: ::fidl_next::Slot<'_, Self>,
17247            decoder_: &mut ___D,
17248            _: (),
17249        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17250            if slot_.as_bytes()[9..16] != [0u8; 7] {
17251                return Err(::fidl_next::DecodeError::InvalidPadding);
17252            }
17253
17254            ::fidl_next::munge! {
17255                let Self {
17256                    mut event_time,
17257                    mut focused,
17258
17259                } = slot_;
17260            }
17261
17262            let _field = event_time.as_mut();
17263
17264            ::fidl_next::Decode::decode(event_time.as_mut(), decoder_, ())?;
17265
17266            let _field = focused.as_mut();
17267
17268            ::fidl_next::Decode::decode(focused.as_mut(), decoder_, ())?;
17269
17270            Ok(())
17271        }
17272    }
17273
17274    impl ::fidl_next::IntoNatural for FocusEvent {
17275        type Natural = crate::natural::FocusEvent;
17276    }
17277
17278    /// The wire type corresponding to [`TextAffinity`].
17279    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
17280    #[repr(transparent)]
17281    pub struct TextAffinity {
17282        pub(crate) value: ::fidl_next::wire::Uint32,
17283    }
17284
17285    impl ::fidl_next::Constrained for TextAffinity {
17286        type Constraint = ();
17287
17288        fn validate(
17289            _: ::fidl_next::Slot<'_, Self>,
17290            _: Self::Constraint,
17291        ) -> Result<(), ::fidl_next::ValidationError> {
17292            Ok(())
17293        }
17294    }
17295
17296    unsafe impl ::fidl_next::Wire for TextAffinity {
17297        type Narrowed<'de> = Self;
17298
17299        #[inline]
17300        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
17301            // Wire enums have no padding
17302        }
17303    }
17304
17305    impl TextAffinity {
17306        pub const UPSTREAM: TextAffinity = TextAffinity { value: ::fidl_next::wire::Uint32(0) };
17307
17308        pub const DOWNSTREAM: TextAffinity = TextAffinity { value: ::fidl_next::wire::Uint32(1) };
17309    }
17310
17311    unsafe impl<___D> ::fidl_next::Decode<___D> for TextAffinity
17312    where
17313        ___D: ?Sized,
17314    {
17315        fn decode(
17316            slot: ::fidl_next::Slot<'_, Self>,
17317            _: &mut ___D,
17318            _: (),
17319        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17320            ::fidl_next::munge!(let Self { value } = slot);
17321
17322            match u32::from(*value) {
17323                0 | 1 => (),
17324                unknown => {
17325                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
17326                }
17327            }
17328
17329            Ok(())
17330        }
17331    }
17332
17333    impl ::core::convert::From<crate::natural::TextAffinity> for TextAffinity {
17334        fn from(natural: crate::natural::TextAffinity) -> Self {
17335            match natural {
17336                crate::natural::TextAffinity::Upstream => TextAffinity::UPSTREAM,
17337
17338                crate::natural::TextAffinity::Downstream => TextAffinity::DOWNSTREAM,
17339            }
17340        }
17341    }
17342
17343    impl ::fidl_next::IntoNatural for TextAffinity {
17344        type Natural = crate::natural::TextAffinity;
17345    }
17346
17347    /// The wire type corresponding to [`TextSelection`].
17348    #[derive(Clone, Debug)]
17349    #[repr(C)]
17350    pub struct TextSelection {
17351        pub base: ::fidl_next::wire::Int64,
17352
17353        pub extent: ::fidl_next::wire::Int64,
17354
17355        pub affinity: crate::wire::TextAffinity,
17356    }
17357
17358    static_assertions::const_assert_eq!(std::mem::size_of::<TextSelection>(), 24);
17359    static_assertions::const_assert_eq!(std::mem::align_of::<TextSelection>(), 8);
17360
17361    static_assertions::const_assert_eq!(std::mem::offset_of!(TextSelection, base), 0);
17362
17363    static_assertions::const_assert_eq!(std::mem::offset_of!(TextSelection, extent), 8);
17364
17365    static_assertions::const_assert_eq!(std::mem::offset_of!(TextSelection, affinity), 16);
17366
17367    impl ::fidl_next::Constrained for TextSelection {
17368        type Constraint = ();
17369
17370        fn validate(
17371            _: ::fidl_next::Slot<'_, Self>,
17372            _: Self::Constraint,
17373        ) -> Result<(), ::fidl_next::ValidationError> {
17374            Ok(())
17375        }
17376    }
17377
17378    unsafe impl ::fidl_next::Wire for TextSelection {
17379        type Narrowed<'de> = TextSelection;
17380
17381        #[inline]
17382        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17383            ::fidl_next::munge! {
17384                let Self {
17385                    base,
17386                    extent,
17387                    affinity,
17388
17389                } = &mut *out_;
17390            }
17391
17392            ::fidl_next::Wire::zero_padding(base);
17393
17394            ::fidl_next::Wire::zero_padding(extent);
17395
17396            ::fidl_next::Wire::zero_padding(affinity);
17397
17398            unsafe {
17399                out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
17400            }
17401        }
17402    }
17403
17404    unsafe impl<___D> ::fidl_next::Decode<___D> for TextSelection
17405    where
17406        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17407    {
17408        fn decode(
17409            slot_: ::fidl_next::Slot<'_, Self>,
17410            decoder_: &mut ___D,
17411            _: (),
17412        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17413            if slot_.as_bytes()[20..24] != [0u8; 4] {
17414                return Err(::fidl_next::DecodeError::InvalidPadding);
17415            }
17416
17417            ::fidl_next::munge! {
17418                let Self {
17419                    mut base,
17420                    mut extent,
17421                    mut affinity,
17422
17423                } = slot_;
17424            }
17425
17426            let _field = base.as_mut();
17427
17428            ::fidl_next::Decode::decode(base.as_mut(), decoder_, ())?;
17429
17430            let _field = extent.as_mut();
17431
17432            ::fidl_next::Decode::decode(extent.as_mut(), decoder_, ())?;
17433
17434            let _field = affinity.as_mut();
17435
17436            ::fidl_next::Decode::decode(affinity.as_mut(), decoder_, ())?;
17437
17438            Ok(())
17439        }
17440    }
17441
17442    impl ::fidl_next::IntoNatural for TextSelection {
17443        type Natural = crate::natural::TextSelection;
17444    }
17445
17446    /// The wire type corresponding to [`TextRange`].
17447    #[derive(Clone, Debug)]
17448    #[repr(C)]
17449    pub struct TextRange {
17450        pub start: ::fidl_next::wire::Int64,
17451
17452        pub end: ::fidl_next::wire::Int64,
17453    }
17454
17455    static_assertions::const_assert_eq!(std::mem::size_of::<TextRange>(), 16);
17456    static_assertions::const_assert_eq!(std::mem::align_of::<TextRange>(), 8);
17457
17458    static_assertions::const_assert_eq!(std::mem::offset_of!(TextRange, start), 0);
17459
17460    static_assertions::const_assert_eq!(std::mem::offset_of!(TextRange, end), 8);
17461
17462    impl ::fidl_next::Constrained for TextRange {
17463        type Constraint = ();
17464
17465        fn validate(
17466            _: ::fidl_next::Slot<'_, Self>,
17467            _: Self::Constraint,
17468        ) -> Result<(), ::fidl_next::ValidationError> {
17469            Ok(())
17470        }
17471    }
17472
17473    unsafe impl ::fidl_next::Wire for TextRange {
17474        type Narrowed<'de> = TextRange;
17475
17476        #[inline]
17477        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17478            ::fidl_next::munge! {
17479                let Self {
17480                    start,
17481                    end,
17482
17483                } = &mut *out_;
17484            }
17485
17486            ::fidl_next::Wire::zero_padding(start);
17487
17488            ::fidl_next::Wire::zero_padding(end);
17489        }
17490    }
17491
17492    unsafe impl<___D> ::fidl_next::Decode<___D> for TextRange
17493    where
17494        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17495    {
17496        fn decode(
17497            slot_: ::fidl_next::Slot<'_, Self>,
17498            decoder_: &mut ___D,
17499            _: (),
17500        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17501            ::fidl_next::munge! {
17502                let Self {
17503                    mut start,
17504                    mut end,
17505
17506                } = slot_;
17507            }
17508
17509            let _field = start.as_mut();
17510
17511            ::fidl_next::Decode::decode(start.as_mut(), decoder_, ())?;
17512
17513            let _field = end.as_mut();
17514
17515            ::fidl_next::Decode::decode(end.as_mut(), decoder_, ())?;
17516
17517            Ok(())
17518        }
17519    }
17520
17521    impl ::fidl_next::IntoNatural for TextRange {
17522        type Natural = crate::natural::TextRange;
17523    }
17524
17525    /// The wire type corresponding to [`TextInputState`].
17526    #[derive(Debug)]
17527    #[repr(C)]
17528    pub struct TextInputState<'de> {
17529        pub revision: ::fidl_next::wire::Uint32,
17530
17531        pub text: ::fidl_next::wire::String<'de>,
17532
17533        pub selection: crate::wire::TextSelection,
17534
17535        pub composing: crate::wire::TextRange,
17536    }
17537
17538    static_assertions::const_assert_eq!(std::mem::size_of::<TextInputState<'_>>(), 64);
17539    static_assertions::const_assert_eq!(std::mem::align_of::<TextInputState<'_>>(), 8);
17540
17541    static_assertions::const_assert_eq!(std::mem::offset_of!(TextInputState<'_>, revision), 0);
17542
17543    static_assertions::const_assert_eq!(std::mem::offset_of!(TextInputState<'_>, text), 8);
17544
17545    static_assertions::const_assert_eq!(std::mem::offset_of!(TextInputState<'_>, selection), 24);
17546
17547    static_assertions::const_assert_eq!(std::mem::offset_of!(TextInputState<'_>, composing), 48);
17548
17549    impl ::fidl_next::Constrained for TextInputState<'_> {
17550        type Constraint = ();
17551
17552        fn validate(
17553            _: ::fidl_next::Slot<'_, Self>,
17554            _: Self::Constraint,
17555        ) -> Result<(), ::fidl_next::ValidationError> {
17556            Ok(())
17557        }
17558    }
17559
17560    unsafe impl ::fidl_next::Wire for TextInputState<'static> {
17561        type Narrowed<'de> = TextInputState<'de>;
17562
17563        #[inline]
17564        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17565            ::fidl_next::munge! {
17566                let Self {
17567                    revision,
17568                    text,
17569                    selection,
17570                    composing,
17571
17572                } = &mut *out_;
17573            }
17574
17575            ::fidl_next::Wire::zero_padding(revision);
17576
17577            ::fidl_next::Wire::zero_padding(text);
17578
17579            ::fidl_next::Wire::zero_padding(selection);
17580
17581            ::fidl_next::Wire::zero_padding(composing);
17582
17583            unsafe {
17584                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
17585            }
17586        }
17587    }
17588
17589    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TextInputState<'de>
17590    where
17591        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17592        ___D: ::fidl_next::Decoder<'de>,
17593    {
17594        fn decode(
17595            slot_: ::fidl_next::Slot<'_, Self>,
17596            decoder_: &mut ___D,
17597            _: (),
17598        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17599            if slot_.as_bytes()[4..8] != [0u8; 4] {
17600                return Err(::fidl_next::DecodeError::InvalidPadding);
17601            }
17602
17603            ::fidl_next::munge! {
17604                let Self {
17605                    mut revision,
17606                    mut text,
17607                    mut selection,
17608                    mut composing,
17609
17610                } = slot_;
17611            }
17612
17613            let _field = revision.as_mut();
17614
17615            ::fidl_next::Decode::decode(revision.as_mut(), decoder_, ())?;
17616
17617            let _field = text.as_mut();
17618            ::fidl_next::Constrained::validate(_field, 4294967295)?;
17619            ::fidl_next::Decode::decode(text.as_mut(), decoder_, 4294967295)?;
17620
17621            let _field = selection.as_mut();
17622
17623            ::fidl_next::Decode::decode(selection.as_mut(), decoder_, ())?;
17624
17625            let _field = composing.as_mut();
17626
17627            ::fidl_next::Decode::decode(composing.as_mut(), decoder_, ())?;
17628
17629            Ok(())
17630        }
17631    }
17632
17633    impl<'de> ::fidl_next::IntoNatural for TextInputState<'de> {
17634        type Natural = crate::natural::TextInputState;
17635    }
17636
17637    /// The wire type corresponding to [`KeyboardType`].
17638    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
17639    #[repr(transparent)]
17640    pub struct KeyboardType {
17641        pub(crate) value: ::fidl_next::wire::Uint32,
17642    }
17643
17644    impl ::fidl_next::Constrained for KeyboardType {
17645        type Constraint = ();
17646
17647        fn validate(
17648            _: ::fidl_next::Slot<'_, Self>,
17649            _: Self::Constraint,
17650        ) -> Result<(), ::fidl_next::ValidationError> {
17651            Ok(())
17652        }
17653    }
17654
17655    unsafe impl ::fidl_next::Wire for KeyboardType {
17656        type Narrowed<'de> = Self;
17657
17658        #[inline]
17659        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
17660            // Wire enums have no padding
17661        }
17662    }
17663
17664    impl KeyboardType {
17665        pub const TEXT: KeyboardType = KeyboardType { value: ::fidl_next::wire::Uint32(0) };
17666
17667        pub const NUMBER: KeyboardType = KeyboardType { value: ::fidl_next::wire::Uint32(1) };
17668
17669        pub const PHONE: KeyboardType = KeyboardType { value: ::fidl_next::wire::Uint32(2) };
17670
17671        pub const DATETIME: KeyboardType = KeyboardType { value: ::fidl_next::wire::Uint32(3) };
17672
17673        pub const MULTILINE: KeyboardType = KeyboardType { value: ::fidl_next::wire::Uint32(4) };
17674    }
17675
17676    unsafe impl<___D> ::fidl_next::Decode<___D> for KeyboardType
17677    where
17678        ___D: ?Sized,
17679    {
17680        fn decode(
17681            slot: ::fidl_next::Slot<'_, Self>,
17682            _: &mut ___D,
17683            _: (),
17684        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17685            Ok(())
17686        }
17687    }
17688
17689    impl ::core::convert::From<crate::natural::KeyboardType> for KeyboardType {
17690        fn from(natural: crate::natural::KeyboardType) -> Self {
17691            match natural {
17692                crate::natural::KeyboardType::Text => KeyboardType::TEXT,
17693
17694                crate::natural::KeyboardType::Number => KeyboardType::NUMBER,
17695
17696                crate::natural::KeyboardType::Phone => KeyboardType::PHONE,
17697
17698                crate::natural::KeyboardType::Datetime => KeyboardType::DATETIME,
17699
17700                crate::natural::KeyboardType::Multiline => KeyboardType::MULTILINE,
17701
17702                crate::natural::KeyboardType::UnknownOrdinal_(value) => {
17703                    KeyboardType { value: ::fidl_next::wire::Uint32::from(value) }
17704                }
17705            }
17706        }
17707    }
17708
17709    impl ::fidl_next::IntoNatural for KeyboardType {
17710        type Natural = crate::natural::KeyboardType;
17711    }
17712
17713    /// The wire type corresponding to [`InputMethodAction`].
17714    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
17715    #[repr(transparent)]
17716    pub struct InputMethodAction {
17717        pub(crate) value: ::fidl_next::wire::Uint32,
17718    }
17719
17720    impl ::fidl_next::Constrained for InputMethodAction {
17721        type Constraint = ();
17722
17723        fn validate(
17724            _: ::fidl_next::Slot<'_, Self>,
17725            _: Self::Constraint,
17726        ) -> Result<(), ::fidl_next::ValidationError> {
17727            Ok(())
17728        }
17729    }
17730
17731    unsafe impl ::fidl_next::Wire for InputMethodAction {
17732        type Narrowed<'de> = Self;
17733
17734        #[inline]
17735        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
17736            // Wire enums have no padding
17737        }
17738    }
17739
17740    impl InputMethodAction {
17741        pub const UNSPECIFIED: InputMethodAction =
17742            InputMethodAction { value: ::fidl_next::wire::Uint32(0) };
17743
17744        pub const NONE: InputMethodAction =
17745            InputMethodAction { value: ::fidl_next::wire::Uint32(1) };
17746
17747        pub const GO: InputMethodAction = InputMethodAction { value: ::fidl_next::wire::Uint32(2) };
17748
17749        pub const SEARCH: InputMethodAction =
17750            InputMethodAction { value: ::fidl_next::wire::Uint32(3) };
17751
17752        pub const SEND: InputMethodAction =
17753            InputMethodAction { value: ::fidl_next::wire::Uint32(4) };
17754
17755        pub const NEXT: InputMethodAction =
17756            InputMethodAction { value: ::fidl_next::wire::Uint32(5) };
17757
17758        pub const DONE: InputMethodAction =
17759            InputMethodAction { value: ::fidl_next::wire::Uint32(6) };
17760
17761        pub const PREVIOUS: InputMethodAction =
17762            InputMethodAction { value: ::fidl_next::wire::Uint32(7) };
17763
17764        pub const NEWLINE: InputMethodAction =
17765            InputMethodAction { value: ::fidl_next::wire::Uint32(8) };
17766    }
17767
17768    unsafe impl<___D> ::fidl_next::Decode<___D> for InputMethodAction
17769    where
17770        ___D: ?Sized,
17771    {
17772        fn decode(
17773            slot: ::fidl_next::Slot<'_, Self>,
17774            _: &mut ___D,
17775            _: (),
17776        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17777            Ok(())
17778        }
17779    }
17780
17781    impl ::core::convert::From<crate::natural::InputMethodAction> for InputMethodAction {
17782        fn from(natural: crate::natural::InputMethodAction) -> Self {
17783            match natural {
17784                crate::natural::InputMethodAction::Unspecified => InputMethodAction::UNSPECIFIED,
17785
17786                crate::natural::InputMethodAction::None => InputMethodAction::NONE,
17787
17788                crate::natural::InputMethodAction::Go => InputMethodAction::GO,
17789
17790                crate::natural::InputMethodAction::Search => InputMethodAction::SEARCH,
17791
17792                crate::natural::InputMethodAction::Send => InputMethodAction::SEND,
17793
17794                crate::natural::InputMethodAction::Next => InputMethodAction::NEXT,
17795
17796                crate::natural::InputMethodAction::Done => InputMethodAction::DONE,
17797
17798                crate::natural::InputMethodAction::Previous => InputMethodAction::PREVIOUS,
17799
17800                crate::natural::InputMethodAction::Newline => InputMethodAction::NEWLINE,
17801
17802                crate::natural::InputMethodAction::UnknownOrdinal_(value) => {
17803                    InputMethodAction { value: ::fidl_next::wire::Uint32::from(value) }
17804                }
17805            }
17806        }
17807    }
17808
17809    impl ::fidl_next::IntoNatural for InputMethodAction {
17810        type Natural = crate::natural::InputMethodAction;
17811    }
17812
17813    /// The wire type corresponding to [`InputReport`].
17814    #[derive(Debug)]
17815    #[repr(C)]
17816    pub struct InputReport<'de> {
17817        pub event_time: ::fidl_next::wire::Uint64,
17818
17819        pub keyboard: ::fidl_next::wire::Box<'de, crate::wire::KeyboardReport<'de>>,
17820
17821        pub media_buttons: ::fidl_next::wire::Box<'de, crate::wire::MediaButtonsReport>,
17822
17823        pub mouse: ::fidl_next::wire::Box<'de, crate::wire::MouseReport>,
17824
17825        pub stylus: ::fidl_next::wire::Box<'de, crate::wire::StylusReport>,
17826
17827        pub touchscreen: ::fidl_next::wire::Box<'de, crate::wire::TouchscreenReport<'de>>,
17828
17829        pub sensor: crate::wire_optional::SensorReport<'de>,
17830
17831        pub trace_id: ::fidl_next::wire::Uint64,
17832    }
17833
17834    static_assertions::const_assert_eq!(std::mem::size_of::<InputReport<'_>>(), 72);
17835    static_assertions::const_assert_eq!(std::mem::align_of::<InputReport<'_>>(), 8);
17836
17837    static_assertions::const_assert_eq!(std::mem::offset_of!(InputReport<'_>, event_time), 0);
17838
17839    static_assertions::const_assert_eq!(std::mem::offset_of!(InputReport<'_>, keyboard), 8);
17840
17841    static_assertions::const_assert_eq!(std::mem::offset_of!(InputReport<'_>, media_buttons), 16);
17842
17843    static_assertions::const_assert_eq!(std::mem::offset_of!(InputReport<'_>, mouse), 24);
17844
17845    static_assertions::const_assert_eq!(std::mem::offset_of!(InputReport<'_>, stylus), 32);
17846
17847    static_assertions::const_assert_eq!(std::mem::offset_of!(InputReport<'_>, touchscreen), 40);
17848
17849    static_assertions::const_assert_eq!(std::mem::offset_of!(InputReport<'_>, sensor), 48);
17850
17851    static_assertions::const_assert_eq!(std::mem::offset_of!(InputReport<'_>, trace_id), 64);
17852
17853    impl ::fidl_next::Constrained for InputReport<'_> {
17854        type Constraint = ();
17855
17856        fn validate(
17857            _: ::fidl_next::Slot<'_, Self>,
17858            _: Self::Constraint,
17859        ) -> Result<(), ::fidl_next::ValidationError> {
17860            Ok(())
17861        }
17862    }
17863
17864    unsafe impl ::fidl_next::Wire for InputReport<'static> {
17865        type Narrowed<'de> = InputReport<'de>;
17866
17867        #[inline]
17868        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17869            ::fidl_next::munge! {
17870                let Self {
17871                    event_time,
17872                    keyboard,
17873                    media_buttons,
17874                    mouse,
17875                    stylus,
17876                    touchscreen,
17877                    sensor,
17878                    trace_id,
17879
17880                } = &mut *out_;
17881            }
17882
17883            ::fidl_next::Wire::zero_padding(event_time);
17884
17885            ::fidl_next::Wire::zero_padding(keyboard);
17886
17887            ::fidl_next::Wire::zero_padding(media_buttons);
17888
17889            ::fidl_next::Wire::zero_padding(mouse);
17890
17891            ::fidl_next::Wire::zero_padding(stylus);
17892
17893            ::fidl_next::Wire::zero_padding(touchscreen);
17894
17895            ::fidl_next::Wire::zero_padding(sensor);
17896
17897            ::fidl_next::Wire::zero_padding(trace_id);
17898        }
17899    }
17900
17901    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputReport<'de>
17902    where
17903        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17904        ___D: ::fidl_next::Decoder<'de>,
17905    {
17906        fn decode(
17907            slot_: ::fidl_next::Slot<'_, Self>,
17908            decoder_: &mut ___D,
17909            _: (),
17910        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17911            ::fidl_next::munge! {
17912                let Self {
17913                    mut event_time,
17914                    mut keyboard,
17915                    mut media_buttons,
17916                    mut mouse,
17917                    mut stylus,
17918                    mut touchscreen,
17919                    mut sensor,
17920                    mut trace_id,
17921
17922                } = slot_;
17923            }
17924
17925            let _field = event_time.as_mut();
17926
17927            ::fidl_next::Decode::decode(event_time.as_mut(), decoder_, ())?;
17928
17929            let _field = keyboard.as_mut();
17930
17931            ::fidl_next::Decode::decode(keyboard.as_mut(), decoder_, ())?;
17932
17933            let _field = media_buttons.as_mut();
17934
17935            ::fidl_next::Decode::decode(media_buttons.as_mut(), decoder_, ())?;
17936
17937            let _field = mouse.as_mut();
17938
17939            ::fidl_next::Decode::decode(mouse.as_mut(), decoder_, ())?;
17940
17941            let _field = stylus.as_mut();
17942
17943            ::fidl_next::Decode::decode(stylus.as_mut(), decoder_, ())?;
17944
17945            let _field = touchscreen.as_mut();
17946
17947            ::fidl_next::Decode::decode(touchscreen.as_mut(), decoder_, ())?;
17948
17949            let _field = sensor.as_mut();
17950
17951            ::fidl_next::Decode::decode(sensor.as_mut(), decoder_, ())?;
17952
17953            let _field = trace_id.as_mut();
17954
17955            ::fidl_next::Decode::decode(trace_id.as_mut(), decoder_, ())?;
17956
17957            Ok(())
17958        }
17959    }
17960
17961    impl<'de> ::fidl_next::IntoNatural for InputReport<'de> {
17962        type Natural = crate::natural::InputReport;
17963    }
17964
17965    /// The wire type corresponding to [`InputDeviceDispatchReportRequest`].
17966    #[derive(Debug)]
17967    #[repr(C)]
17968    pub struct InputDeviceDispatchReportRequest<'de> {
17969        pub report: crate::wire::InputReport<'de>,
17970    }
17971
17972    static_assertions::const_assert_eq!(
17973        std::mem::size_of::<InputDeviceDispatchReportRequest<'_>>(),
17974        72
17975    );
17976    static_assertions::const_assert_eq!(
17977        std::mem::align_of::<InputDeviceDispatchReportRequest<'_>>(),
17978        8
17979    );
17980
17981    static_assertions::const_assert_eq!(
17982        std::mem::offset_of!(InputDeviceDispatchReportRequest<'_>, report),
17983        0
17984    );
17985
17986    impl ::fidl_next::Constrained for InputDeviceDispatchReportRequest<'_> {
17987        type Constraint = ();
17988
17989        fn validate(
17990            _: ::fidl_next::Slot<'_, Self>,
17991            _: Self::Constraint,
17992        ) -> Result<(), ::fidl_next::ValidationError> {
17993            Ok(())
17994        }
17995    }
17996
17997    unsafe impl ::fidl_next::Wire for InputDeviceDispatchReportRequest<'static> {
17998        type Narrowed<'de> = InputDeviceDispatchReportRequest<'de>;
17999
18000        #[inline]
18001        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18002            ::fidl_next::munge! {
18003                let Self {
18004                    report,
18005
18006                } = &mut *out_;
18007            }
18008
18009            ::fidl_next::Wire::zero_padding(report);
18010        }
18011    }
18012
18013    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputDeviceDispatchReportRequest<'de>
18014    where
18015        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18016        ___D: ::fidl_next::Decoder<'de>,
18017    {
18018        fn decode(
18019            slot_: ::fidl_next::Slot<'_, Self>,
18020            decoder_: &mut ___D,
18021            _: (),
18022        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18023            ::fidl_next::munge! {
18024                let Self {
18025                    mut report,
18026
18027                } = slot_;
18028            }
18029
18030            let _field = report.as_mut();
18031
18032            ::fidl_next::Decode::decode(report.as_mut(), decoder_, ())?;
18033
18034            Ok(())
18035        }
18036    }
18037
18038    impl<'de> ::fidl_next::IntoNatural for InputDeviceDispatchReportRequest<'de> {
18039        type Natural = crate::natural::InputDeviceDispatchReportRequest;
18040    }
18041
18042    /// The wire type corresponding to [`InputEvent`].
18043    #[repr(transparent)]
18044    pub struct InputEvent<'de> {
18045        pub(crate) raw: ::fidl_next::wire::Union,
18046        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
18047    }
18048
18049    impl<'de> Drop for InputEvent<'de> {
18050        fn drop(&mut self) {
18051            match self.raw.ordinal() {
18052                1 => {
18053                    let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::PointerEvent>() };
18054                }
18055
18056                2 => {
18057                    let _ =
18058                        unsafe { self.raw.get().read_unchecked::<crate::wire::KeyboardEvent>() };
18059                }
18060
18061                3 => {
18062                    let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FocusEvent>() };
18063                }
18064
18065                _ => unsafe { ::core::hint::unreachable_unchecked() },
18066            }
18067        }
18068    }
18069
18070    impl ::fidl_next::Constrained for InputEvent<'_> {
18071        type Constraint = ();
18072
18073        fn validate(
18074            _: ::fidl_next::Slot<'_, Self>,
18075            _: Self::Constraint,
18076        ) -> Result<(), ::fidl_next::ValidationError> {
18077            Ok(())
18078        }
18079    }
18080
18081    unsafe impl ::fidl_next::Wire for InputEvent<'static> {
18082        type Narrowed<'de> = InputEvent<'de>;
18083
18084        #[inline]
18085        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
18086            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
18087            ::fidl_next::wire::Union::zero_padding(raw);
18088        }
18089    }
18090
18091    pub mod input_event {
18092        pub enum Ref<'de> {
18093            Pointer(&'de crate::wire::PointerEvent),
18094
18095            Keyboard(&'de crate::wire::KeyboardEvent),
18096
18097            Focus(&'de crate::wire::FocusEvent),
18098        }
18099
18100        pub enum Value {
18101            Pointer(crate::wire::PointerEvent),
18102
18103            Keyboard(crate::wire::KeyboardEvent),
18104
18105            Focus(crate::wire::FocusEvent),
18106        }
18107    }
18108
18109    impl<'de> InputEvent<'de> {
18110        pub fn as_ref(&self) -> crate::wire::input_event::Ref<'_> {
18111            match self.raw.ordinal() {
18112                1 => crate::wire::input_event::Ref::Pointer(unsafe {
18113                    self.raw.get().deref_unchecked::<crate::wire::PointerEvent>()
18114                }),
18115
18116                2 => crate::wire::input_event::Ref::Keyboard(unsafe {
18117                    self.raw.get().deref_unchecked::<crate::wire::KeyboardEvent>()
18118                }),
18119
18120                3 => crate::wire::input_event::Ref::Focus(unsafe {
18121                    self.raw.get().deref_unchecked::<crate::wire::FocusEvent>()
18122                }),
18123
18124                _ => unsafe { ::core::hint::unreachable_unchecked() },
18125            }
18126        }
18127
18128        pub fn into_inner(self) -> crate::wire::input_event::Value {
18129            let this = ::core::mem::ManuallyDrop::new(self);
18130
18131            match this.raw.ordinal() {
18132                1 => crate::wire::input_event::Value::Pointer(unsafe {
18133                    this.raw.get().read_unchecked::<crate::wire::PointerEvent>()
18134                }),
18135
18136                2 => crate::wire::input_event::Value::Keyboard(unsafe {
18137                    this.raw.get().read_unchecked::<crate::wire::KeyboardEvent>()
18138                }),
18139
18140                3 => crate::wire::input_event::Value::Focus(unsafe {
18141                    this.raw.get().read_unchecked::<crate::wire::FocusEvent>()
18142                }),
18143
18144                _ => unsafe { ::core::hint::unreachable_unchecked() },
18145            }
18146        }
18147    }
18148
18149    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputEvent<'de>
18150    where
18151        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18152        ___D: ::fidl_next::Decoder<'de>,
18153    {
18154        fn decode(
18155            mut slot: ::fidl_next::Slot<'_, Self>,
18156            decoder: &mut ___D,
18157            _: (),
18158        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18159            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
18160            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
18161                1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::PointerEvent>(
18162                    raw,
18163                    decoder,
18164                    (),
18165                )?,
18166
18167                2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::KeyboardEvent>(
18168                    raw,
18169                    decoder,
18170                    (),
18171                )?,
18172
18173                3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FocusEvent>(
18174                    raw,
18175                    decoder,
18176                    (),
18177                )?,
18178
18179                ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
18180            }
18181
18182            Ok(())
18183        }
18184    }
18185
18186    impl<'de> ::core::fmt::Debug for InputEvent<'de> {
18187        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
18188            match self.raw.ordinal() {
18189                1 => unsafe {
18190                    self.raw.get().deref_unchecked::<crate::wire::PointerEvent>().fmt(f)
18191                },
18192                2 => unsafe {
18193                    self.raw.get().deref_unchecked::<crate::wire::KeyboardEvent>().fmt(f)
18194                },
18195                3 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FocusEvent>().fmt(f) },
18196                _ => unsafe { ::core::hint::unreachable_unchecked() },
18197            }
18198        }
18199    }
18200
18201    impl<'de> ::fidl_next::IntoNatural for InputEvent<'de> {
18202        type Natural = crate::natural::InputEvent;
18203    }
18204
18205    /// The wire type corresponding to [`InputMethodEditorSetStateRequest`].
18206    #[derive(Debug)]
18207    #[repr(C)]
18208    pub struct InputMethodEditorSetStateRequest<'de> {
18209        pub state: crate::wire::TextInputState<'de>,
18210    }
18211
18212    static_assertions::const_assert_eq!(
18213        std::mem::size_of::<InputMethodEditorSetStateRequest<'_>>(),
18214        64
18215    );
18216    static_assertions::const_assert_eq!(
18217        std::mem::align_of::<InputMethodEditorSetStateRequest<'_>>(),
18218        8
18219    );
18220
18221    static_assertions::const_assert_eq!(
18222        std::mem::offset_of!(InputMethodEditorSetStateRequest<'_>, state),
18223        0
18224    );
18225
18226    impl ::fidl_next::Constrained for InputMethodEditorSetStateRequest<'_> {
18227        type Constraint = ();
18228
18229        fn validate(
18230            _: ::fidl_next::Slot<'_, Self>,
18231            _: Self::Constraint,
18232        ) -> Result<(), ::fidl_next::ValidationError> {
18233            Ok(())
18234        }
18235    }
18236
18237    unsafe impl ::fidl_next::Wire for InputMethodEditorSetStateRequest<'static> {
18238        type Narrowed<'de> = InputMethodEditorSetStateRequest<'de>;
18239
18240        #[inline]
18241        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18242            ::fidl_next::munge! {
18243                let Self {
18244                    state,
18245
18246                } = &mut *out_;
18247            }
18248
18249            ::fidl_next::Wire::zero_padding(state);
18250        }
18251    }
18252
18253    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputMethodEditorSetStateRequest<'de>
18254    where
18255        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18256        ___D: ::fidl_next::Decoder<'de>,
18257    {
18258        fn decode(
18259            slot_: ::fidl_next::Slot<'_, Self>,
18260            decoder_: &mut ___D,
18261            _: (),
18262        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18263            ::fidl_next::munge! {
18264                let Self {
18265                    mut state,
18266
18267                } = slot_;
18268            }
18269
18270            let _field = state.as_mut();
18271
18272            ::fidl_next::Decode::decode(state.as_mut(), decoder_, ())?;
18273
18274            Ok(())
18275        }
18276    }
18277
18278    impl<'de> ::fidl_next::IntoNatural for InputMethodEditorSetStateRequest<'de> {
18279        type Natural = crate::natural::InputMethodEditorSetStateRequest;
18280    }
18281
18282    /// The wire type corresponding to [`InputMethodEditorSetKeyboardTypeRequest`].
18283    #[derive(Clone, Debug)]
18284    #[repr(C)]
18285    pub struct InputMethodEditorSetKeyboardTypeRequest {
18286        pub keyboard_type: crate::wire::KeyboardType,
18287    }
18288
18289    static_assertions::const_assert_eq!(
18290        std::mem::size_of::<InputMethodEditorSetKeyboardTypeRequest>(),
18291        4
18292    );
18293    static_assertions::const_assert_eq!(
18294        std::mem::align_of::<InputMethodEditorSetKeyboardTypeRequest>(),
18295        4
18296    );
18297
18298    static_assertions::const_assert_eq!(
18299        std::mem::offset_of!(InputMethodEditorSetKeyboardTypeRequest, keyboard_type),
18300        0
18301    );
18302
18303    impl ::fidl_next::Constrained for InputMethodEditorSetKeyboardTypeRequest {
18304        type Constraint = ();
18305
18306        fn validate(
18307            _: ::fidl_next::Slot<'_, Self>,
18308            _: Self::Constraint,
18309        ) -> Result<(), ::fidl_next::ValidationError> {
18310            Ok(())
18311        }
18312    }
18313
18314    unsafe impl ::fidl_next::Wire for InputMethodEditorSetKeyboardTypeRequest {
18315        type Narrowed<'de> = InputMethodEditorSetKeyboardTypeRequest;
18316
18317        #[inline]
18318        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18319            ::fidl_next::munge! {
18320                let Self {
18321                    keyboard_type,
18322
18323                } = &mut *out_;
18324            }
18325
18326            ::fidl_next::Wire::zero_padding(keyboard_type);
18327        }
18328    }
18329
18330    unsafe impl<___D> ::fidl_next::Decode<___D> for InputMethodEditorSetKeyboardTypeRequest
18331    where
18332        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18333    {
18334        fn decode(
18335            slot_: ::fidl_next::Slot<'_, Self>,
18336            decoder_: &mut ___D,
18337            _: (),
18338        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18339            ::fidl_next::munge! {
18340                let Self {
18341                    mut keyboard_type,
18342
18343                } = slot_;
18344            }
18345
18346            let _field = keyboard_type.as_mut();
18347
18348            ::fidl_next::Decode::decode(keyboard_type.as_mut(), decoder_, ())?;
18349
18350            Ok(())
18351        }
18352    }
18353
18354    impl ::fidl_next::IntoNatural for InputMethodEditorSetKeyboardTypeRequest {
18355        type Natural = crate::natural::InputMethodEditorSetKeyboardTypeRequest;
18356    }
18357
18358    /// The wire type corresponding to [`InputMethodEditorDispatchKey3Response`].
18359    #[derive(Clone, Debug)]
18360    #[repr(C)]
18361    pub struct InputMethodEditorDispatchKey3Response {
18362        pub handled: bool,
18363    }
18364
18365    static_assertions::const_assert_eq!(
18366        std::mem::size_of::<InputMethodEditorDispatchKey3Response>(),
18367        1
18368    );
18369    static_assertions::const_assert_eq!(
18370        std::mem::align_of::<InputMethodEditorDispatchKey3Response>(),
18371        1
18372    );
18373
18374    static_assertions::const_assert_eq!(
18375        std::mem::offset_of!(InputMethodEditorDispatchKey3Response, handled),
18376        0
18377    );
18378
18379    impl ::fidl_next::Constrained for InputMethodEditorDispatchKey3Response {
18380        type Constraint = ();
18381
18382        fn validate(
18383            _: ::fidl_next::Slot<'_, Self>,
18384            _: Self::Constraint,
18385        ) -> Result<(), ::fidl_next::ValidationError> {
18386            Ok(())
18387        }
18388    }
18389
18390    unsafe impl ::fidl_next::Wire for InputMethodEditorDispatchKey3Response {
18391        type Narrowed<'de> = InputMethodEditorDispatchKey3Response;
18392
18393        #[inline]
18394        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18395            ::fidl_next::munge! {
18396                let Self {
18397                    handled,
18398
18399                } = &mut *out_;
18400            }
18401
18402            ::fidl_next::Wire::zero_padding(handled);
18403        }
18404    }
18405
18406    unsafe impl<___D> ::fidl_next::Decode<___D> for InputMethodEditorDispatchKey3Response
18407    where
18408        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18409    {
18410        fn decode(
18411            slot_: ::fidl_next::Slot<'_, Self>,
18412            decoder_: &mut ___D,
18413            _: (),
18414        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18415            ::fidl_next::munge! {
18416                let Self {
18417                    mut handled,
18418
18419                } = slot_;
18420            }
18421
18422            let _field = handled.as_mut();
18423
18424            ::fidl_next::Decode::decode(handled.as_mut(), decoder_, ())?;
18425
18426            Ok(())
18427        }
18428    }
18429
18430    impl ::fidl_next::IntoNatural for InputMethodEditorDispatchKey3Response {
18431        type Natural = crate::natural::InputMethodEditorDispatchKey3Response;
18432    }
18433
18434    /// The wire type corresponding to [`InputMethodEditorInjectInputRequest`].
18435    #[derive(Debug)]
18436    #[repr(C)]
18437    pub struct InputMethodEditorInjectInputRequest<'de> {
18438        pub event: crate::wire::InputEvent<'de>,
18439    }
18440
18441    static_assertions::const_assert_eq!(
18442        std::mem::size_of::<InputMethodEditorInjectInputRequest<'_>>(),
18443        16
18444    );
18445    static_assertions::const_assert_eq!(
18446        std::mem::align_of::<InputMethodEditorInjectInputRequest<'_>>(),
18447        8
18448    );
18449
18450    static_assertions::const_assert_eq!(
18451        std::mem::offset_of!(InputMethodEditorInjectInputRequest<'_>, event),
18452        0
18453    );
18454
18455    impl ::fidl_next::Constrained for InputMethodEditorInjectInputRequest<'_> {
18456        type Constraint = ();
18457
18458        fn validate(
18459            _: ::fidl_next::Slot<'_, Self>,
18460            _: Self::Constraint,
18461        ) -> Result<(), ::fidl_next::ValidationError> {
18462            Ok(())
18463        }
18464    }
18465
18466    unsafe impl ::fidl_next::Wire for InputMethodEditorInjectInputRequest<'static> {
18467        type Narrowed<'de> = InputMethodEditorInjectInputRequest<'de>;
18468
18469        #[inline]
18470        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18471            ::fidl_next::munge! {
18472                let Self {
18473                    event,
18474
18475                } = &mut *out_;
18476            }
18477
18478            ::fidl_next::Wire::zero_padding(event);
18479        }
18480    }
18481
18482    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputMethodEditorInjectInputRequest<'de>
18483    where
18484        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18485        ___D: ::fidl_next::Decoder<'de>,
18486    {
18487        fn decode(
18488            slot_: ::fidl_next::Slot<'_, Self>,
18489            decoder_: &mut ___D,
18490            _: (),
18491        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18492            ::fidl_next::munge! {
18493                let Self {
18494                    mut event,
18495
18496                } = slot_;
18497            }
18498
18499            let _field = event.as_mut();
18500
18501            ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
18502
18503            Ok(())
18504        }
18505    }
18506
18507    impl<'de> ::fidl_next::IntoNatural for InputMethodEditorInjectInputRequest<'de> {
18508        type Natural = crate::natural::InputMethodEditorInjectInputRequest;
18509    }
18510
18511    /// The wire type corresponding to [`InputMethodEditorDispatchKey3Request`].
18512    #[derive(Debug)]
18513    #[repr(C)]
18514    pub struct InputMethodEditorDispatchKey3Request<'de> {
18515        pub event: ::fidl_next_common_fuchsia_ui_input3::wire::KeyEvent<'de>,
18516    }
18517
18518    static_assertions::const_assert_eq!(
18519        std::mem::size_of::<InputMethodEditorDispatchKey3Request<'_>>(),
18520        16
18521    );
18522    static_assertions::const_assert_eq!(
18523        std::mem::align_of::<InputMethodEditorDispatchKey3Request<'_>>(),
18524        8
18525    );
18526
18527    static_assertions::const_assert_eq!(
18528        std::mem::offset_of!(InputMethodEditorDispatchKey3Request<'_>, event),
18529        0
18530    );
18531
18532    impl ::fidl_next::Constrained for InputMethodEditorDispatchKey3Request<'_> {
18533        type Constraint = ();
18534
18535        fn validate(
18536            _: ::fidl_next::Slot<'_, Self>,
18537            _: Self::Constraint,
18538        ) -> Result<(), ::fidl_next::ValidationError> {
18539            Ok(())
18540        }
18541    }
18542
18543    unsafe impl ::fidl_next::Wire for InputMethodEditorDispatchKey3Request<'static> {
18544        type Narrowed<'de> = InputMethodEditorDispatchKey3Request<'de>;
18545
18546        #[inline]
18547        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18548            ::fidl_next::munge! {
18549                let Self {
18550                    event,
18551
18552                } = &mut *out_;
18553            }
18554
18555            ::fidl_next::Wire::zero_padding(event);
18556        }
18557    }
18558
18559    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputMethodEditorDispatchKey3Request<'de>
18560    where
18561        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18562        ___D: ::fidl_next::Decoder<'de>,
18563    {
18564        fn decode(
18565            slot_: ::fidl_next::Slot<'_, Self>,
18566            decoder_: &mut ___D,
18567            _: (),
18568        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18569            ::fidl_next::munge! {
18570                let Self {
18571                    mut event,
18572
18573                } = slot_;
18574            }
18575
18576            let _field = event.as_mut();
18577
18578            ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
18579
18580            Ok(())
18581        }
18582    }
18583
18584    impl<'de> ::fidl_next::IntoNatural for InputMethodEditorDispatchKey3Request<'de> {
18585        type Natural = crate::natural::InputMethodEditorDispatchKey3Request;
18586    }
18587
18588    /// The wire type corresponding to [`InputMethodEditorClientOnActionRequest`].
18589    #[derive(Clone, Debug)]
18590    #[repr(C)]
18591    pub struct InputMethodEditorClientOnActionRequest {
18592        pub action: crate::wire::InputMethodAction,
18593    }
18594
18595    static_assertions::const_assert_eq!(
18596        std::mem::size_of::<InputMethodEditorClientOnActionRequest>(),
18597        4
18598    );
18599    static_assertions::const_assert_eq!(
18600        std::mem::align_of::<InputMethodEditorClientOnActionRequest>(),
18601        4
18602    );
18603
18604    static_assertions::const_assert_eq!(
18605        std::mem::offset_of!(InputMethodEditorClientOnActionRequest, action),
18606        0
18607    );
18608
18609    impl ::fidl_next::Constrained for InputMethodEditorClientOnActionRequest {
18610        type Constraint = ();
18611
18612        fn validate(
18613            _: ::fidl_next::Slot<'_, Self>,
18614            _: Self::Constraint,
18615        ) -> Result<(), ::fidl_next::ValidationError> {
18616            Ok(())
18617        }
18618    }
18619
18620    unsafe impl ::fidl_next::Wire for InputMethodEditorClientOnActionRequest {
18621        type Narrowed<'de> = InputMethodEditorClientOnActionRequest;
18622
18623        #[inline]
18624        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18625            ::fidl_next::munge! {
18626                let Self {
18627                    action,
18628
18629                } = &mut *out_;
18630            }
18631
18632            ::fidl_next::Wire::zero_padding(action);
18633        }
18634    }
18635
18636    unsafe impl<___D> ::fidl_next::Decode<___D> for InputMethodEditorClientOnActionRequest
18637    where
18638        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18639    {
18640        fn decode(
18641            slot_: ::fidl_next::Slot<'_, Self>,
18642            decoder_: &mut ___D,
18643            _: (),
18644        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18645            ::fidl_next::munge! {
18646                let Self {
18647                    mut action,
18648
18649                } = slot_;
18650            }
18651
18652            let _field = action.as_mut();
18653
18654            ::fidl_next::Decode::decode(action.as_mut(), decoder_, ())?;
18655
18656            Ok(())
18657        }
18658    }
18659
18660    impl ::fidl_next::IntoNatural for InputMethodEditorClientOnActionRequest {
18661        type Natural = crate::natural::InputMethodEditorClientOnActionRequest;
18662    }
18663
18664    /// The wire type corresponding to [`InputMethodEditorClientDidUpdateStateRequest`].
18665    #[derive(Debug)]
18666    #[repr(C)]
18667    pub struct InputMethodEditorClientDidUpdateStateRequest<'de> {
18668        pub state: crate::wire::TextInputState<'de>,
18669
18670        pub event: crate::wire_optional::InputEvent<'de>,
18671    }
18672
18673    static_assertions::const_assert_eq!(
18674        std::mem::size_of::<InputMethodEditorClientDidUpdateStateRequest<'_>>(),
18675        80
18676    );
18677    static_assertions::const_assert_eq!(
18678        std::mem::align_of::<InputMethodEditorClientDidUpdateStateRequest<'_>>(),
18679        8
18680    );
18681
18682    static_assertions::const_assert_eq!(
18683        std::mem::offset_of!(InputMethodEditorClientDidUpdateStateRequest<'_>, state),
18684        0
18685    );
18686
18687    static_assertions::const_assert_eq!(
18688        std::mem::offset_of!(InputMethodEditorClientDidUpdateStateRequest<'_>, event),
18689        64
18690    );
18691
18692    impl ::fidl_next::Constrained for InputMethodEditorClientDidUpdateStateRequest<'_> {
18693        type Constraint = ();
18694
18695        fn validate(
18696            _: ::fidl_next::Slot<'_, Self>,
18697            _: Self::Constraint,
18698        ) -> Result<(), ::fidl_next::ValidationError> {
18699            Ok(())
18700        }
18701    }
18702
18703    unsafe impl ::fidl_next::Wire for InputMethodEditorClientDidUpdateStateRequest<'static> {
18704        type Narrowed<'de> = InputMethodEditorClientDidUpdateStateRequest<'de>;
18705
18706        #[inline]
18707        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18708            ::fidl_next::munge! {
18709                let Self {
18710                    state,
18711                    event,
18712
18713                } = &mut *out_;
18714            }
18715
18716            ::fidl_next::Wire::zero_padding(state);
18717
18718            ::fidl_next::Wire::zero_padding(event);
18719        }
18720    }
18721
18722    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
18723        for InputMethodEditorClientDidUpdateStateRequest<'de>
18724    where
18725        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18726        ___D: ::fidl_next::Decoder<'de>,
18727    {
18728        fn decode(
18729            slot_: ::fidl_next::Slot<'_, Self>,
18730            decoder_: &mut ___D,
18731            _: (),
18732        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18733            ::fidl_next::munge! {
18734                let Self {
18735                    mut state,
18736                    mut event,
18737
18738                } = slot_;
18739            }
18740
18741            let _field = state.as_mut();
18742
18743            ::fidl_next::Decode::decode(state.as_mut(), decoder_, ())?;
18744
18745            let _field = event.as_mut();
18746
18747            ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
18748
18749            Ok(())
18750        }
18751    }
18752
18753    impl<'de> ::fidl_next::IntoNatural for InputMethodEditorClientDidUpdateStateRequest<'de> {
18754        type Natural = crate::natural::InputMethodEditorClientDidUpdateStateRequest;
18755    }
18756
18757    /// The wire type corresponding to [`KeyboardReport`].
18758    #[derive(Debug)]
18759    #[repr(C)]
18760    pub struct KeyboardReport<'de> {
18761        pub pressed_keys: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>,
18762    }
18763
18764    static_assertions::const_assert_eq!(std::mem::size_of::<KeyboardReport<'_>>(), 16);
18765    static_assertions::const_assert_eq!(std::mem::align_of::<KeyboardReport<'_>>(), 8);
18766
18767    static_assertions::const_assert_eq!(std::mem::offset_of!(KeyboardReport<'_>, pressed_keys), 0);
18768
18769    impl ::fidl_next::Constrained for KeyboardReport<'_> {
18770        type Constraint = ();
18771
18772        fn validate(
18773            _: ::fidl_next::Slot<'_, Self>,
18774            _: Self::Constraint,
18775        ) -> Result<(), ::fidl_next::ValidationError> {
18776            Ok(())
18777        }
18778    }
18779
18780    unsafe impl ::fidl_next::Wire for KeyboardReport<'static> {
18781        type Narrowed<'de> = KeyboardReport<'de>;
18782
18783        #[inline]
18784        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18785            ::fidl_next::munge! {
18786                let Self {
18787                    pressed_keys,
18788
18789                } = &mut *out_;
18790            }
18791
18792            ::fidl_next::Wire::zero_padding(pressed_keys);
18793        }
18794    }
18795
18796    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for KeyboardReport<'de>
18797    where
18798        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18799        ___D: ::fidl_next::Decoder<'de>,
18800    {
18801        fn decode(
18802            slot_: ::fidl_next::Slot<'_, Self>,
18803            decoder_: &mut ___D,
18804            _: (),
18805        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18806            ::fidl_next::munge! {
18807                let Self {
18808                    mut pressed_keys,
18809
18810                } = slot_;
18811            }
18812
18813            let _field = pressed_keys.as_mut();
18814            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
18815            ::fidl_next::Decode::decode(pressed_keys.as_mut(), decoder_, (4294967295, ()))?;
18816
18817            Ok(())
18818        }
18819    }
18820
18821    impl<'de> ::fidl_next::IntoNatural for KeyboardReport<'de> {
18822        type Natural = crate::natural::KeyboardReport;
18823    }
18824
18825    /// The wire type corresponding to [`MediaButtonsDescriptor`].
18826    #[derive(Clone, Debug)]
18827    #[repr(C)]
18828    pub struct MediaButtonsDescriptor {
18829        pub buttons: ::fidl_next::wire::Uint32,
18830    }
18831
18832    static_assertions::const_assert_eq!(std::mem::size_of::<MediaButtonsDescriptor>(), 4);
18833    static_assertions::const_assert_eq!(std::mem::align_of::<MediaButtonsDescriptor>(), 4);
18834
18835    static_assertions::const_assert_eq!(std::mem::offset_of!(MediaButtonsDescriptor, buttons), 0);
18836
18837    impl ::fidl_next::Constrained for MediaButtonsDescriptor {
18838        type Constraint = ();
18839
18840        fn validate(
18841            _: ::fidl_next::Slot<'_, Self>,
18842            _: Self::Constraint,
18843        ) -> Result<(), ::fidl_next::ValidationError> {
18844            Ok(())
18845        }
18846    }
18847
18848    unsafe impl ::fidl_next::Wire for MediaButtonsDescriptor {
18849        type Narrowed<'de> = MediaButtonsDescriptor;
18850
18851        #[inline]
18852        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18853            ::fidl_next::munge! {
18854                let Self {
18855                    buttons,
18856
18857                } = &mut *out_;
18858            }
18859
18860            ::fidl_next::Wire::zero_padding(buttons);
18861        }
18862    }
18863
18864    unsafe impl<___D> ::fidl_next::Decode<___D> for MediaButtonsDescriptor
18865    where
18866        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18867    {
18868        fn decode(
18869            slot_: ::fidl_next::Slot<'_, Self>,
18870            decoder_: &mut ___D,
18871            _: (),
18872        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18873            ::fidl_next::munge! {
18874                let Self {
18875                    mut buttons,
18876
18877                } = slot_;
18878            }
18879
18880            let _field = buttons.as_mut();
18881
18882            ::fidl_next::Decode::decode(buttons.as_mut(), decoder_, ())?;
18883
18884            Ok(())
18885        }
18886    }
18887
18888    impl ::fidl_next::IntoNatural for MediaButtonsDescriptor {
18889        type Natural = crate::natural::MediaButtonsDescriptor;
18890    }
18891
18892    /// The wire type corresponding to [`MediaButtonsReport`].
18893    #[derive(Clone, Debug)]
18894    #[repr(C)]
18895    pub struct MediaButtonsReport {
18896        pub volume_up: bool,
18897
18898        pub volume_down: bool,
18899
18900        pub mic_mute: bool,
18901
18902        pub reset: bool,
18903
18904        pub pause: bool,
18905
18906        pub camera_disable: bool,
18907    }
18908
18909    static_assertions::const_assert_eq!(std::mem::size_of::<MediaButtonsReport>(), 6);
18910    static_assertions::const_assert_eq!(std::mem::align_of::<MediaButtonsReport>(), 1);
18911
18912    static_assertions::const_assert_eq!(std::mem::offset_of!(MediaButtonsReport, volume_up), 0);
18913
18914    static_assertions::const_assert_eq!(std::mem::offset_of!(MediaButtonsReport, volume_down), 1);
18915
18916    static_assertions::const_assert_eq!(std::mem::offset_of!(MediaButtonsReport, mic_mute), 2);
18917
18918    static_assertions::const_assert_eq!(std::mem::offset_of!(MediaButtonsReport, reset), 3);
18919
18920    static_assertions::const_assert_eq!(std::mem::offset_of!(MediaButtonsReport, pause), 4);
18921
18922    static_assertions::const_assert_eq!(
18923        std::mem::offset_of!(MediaButtonsReport, camera_disable),
18924        5
18925    );
18926
18927    impl ::fidl_next::Constrained for MediaButtonsReport {
18928        type Constraint = ();
18929
18930        fn validate(
18931            _: ::fidl_next::Slot<'_, Self>,
18932            _: Self::Constraint,
18933        ) -> Result<(), ::fidl_next::ValidationError> {
18934            Ok(())
18935        }
18936    }
18937
18938    unsafe impl ::fidl_next::Wire for MediaButtonsReport {
18939        type Narrowed<'de> = MediaButtonsReport;
18940
18941        #[inline]
18942        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18943            ::fidl_next::munge! {
18944                let Self {
18945                    volume_up,
18946                    volume_down,
18947                    mic_mute,
18948                    reset,
18949                    pause,
18950                    camera_disable,
18951
18952                } = &mut *out_;
18953            }
18954
18955            ::fidl_next::Wire::zero_padding(volume_up);
18956
18957            ::fidl_next::Wire::zero_padding(volume_down);
18958
18959            ::fidl_next::Wire::zero_padding(mic_mute);
18960
18961            ::fidl_next::Wire::zero_padding(reset);
18962
18963            ::fidl_next::Wire::zero_padding(pause);
18964
18965            ::fidl_next::Wire::zero_padding(camera_disable);
18966        }
18967    }
18968
18969    unsafe impl<___D> ::fidl_next::Decode<___D> for MediaButtonsReport
18970    where
18971        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18972    {
18973        fn decode(
18974            slot_: ::fidl_next::Slot<'_, Self>,
18975            decoder_: &mut ___D,
18976            _: (),
18977        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18978            ::fidl_next::munge! {
18979                let Self {
18980                    mut volume_up,
18981                    mut volume_down,
18982                    mut mic_mute,
18983                    mut reset,
18984                    mut pause,
18985                    mut camera_disable,
18986
18987                } = slot_;
18988            }
18989
18990            let _field = volume_up.as_mut();
18991
18992            ::fidl_next::Decode::decode(volume_up.as_mut(), decoder_, ())?;
18993
18994            let _field = volume_down.as_mut();
18995
18996            ::fidl_next::Decode::decode(volume_down.as_mut(), decoder_, ())?;
18997
18998            let _field = mic_mute.as_mut();
18999
19000            ::fidl_next::Decode::decode(mic_mute.as_mut(), decoder_, ())?;
19001
19002            let _field = reset.as_mut();
19003
19004            ::fidl_next::Decode::decode(reset.as_mut(), decoder_, ())?;
19005
19006            let _field = pause.as_mut();
19007
19008            ::fidl_next::Decode::decode(pause.as_mut(), decoder_, ())?;
19009
19010            let _field = camera_disable.as_mut();
19011
19012            ::fidl_next::Decode::decode(camera_disable.as_mut(), decoder_, ())?;
19013
19014            Ok(())
19015        }
19016    }
19017
19018    impl ::fidl_next::IntoNatural for MediaButtonsReport {
19019        type Natural = crate::natural::MediaButtonsReport;
19020    }
19021
19022    /// The wire type corresponding to [`MouseReport`].
19023    #[derive(Clone, Debug)]
19024    #[repr(C)]
19025    pub struct MouseReport {
19026        pub rel_x: ::fidl_next::wire::Int32,
19027
19028        pub rel_y: ::fidl_next::wire::Int32,
19029
19030        pub rel_hscroll: ::fidl_next::wire::Int32,
19031
19032        pub rel_vscroll: ::fidl_next::wire::Int32,
19033
19034        pub pressed_buttons: ::fidl_next::wire::Uint32,
19035    }
19036
19037    static_assertions::const_assert_eq!(std::mem::size_of::<MouseReport>(), 20);
19038    static_assertions::const_assert_eq!(std::mem::align_of::<MouseReport>(), 4);
19039
19040    static_assertions::const_assert_eq!(std::mem::offset_of!(MouseReport, rel_x), 0);
19041
19042    static_assertions::const_assert_eq!(std::mem::offset_of!(MouseReport, rel_y), 4);
19043
19044    static_assertions::const_assert_eq!(std::mem::offset_of!(MouseReport, rel_hscroll), 8);
19045
19046    static_assertions::const_assert_eq!(std::mem::offset_of!(MouseReport, rel_vscroll), 12);
19047
19048    static_assertions::const_assert_eq!(std::mem::offset_of!(MouseReport, pressed_buttons), 16);
19049
19050    impl ::fidl_next::Constrained for MouseReport {
19051        type Constraint = ();
19052
19053        fn validate(
19054            _: ::fidl_next::Slot<'_, Self>,
19055            _: Self::Constraint,
19056        ) -> Result<(), ::fidl_next::ValidationError> {
19057            Ok(())
19058        }
19059    }
19060
19061    unsafe impl ::fidl_next::Wire for MouseReport {
19062        type Narrowed<'de> = MouseReport;
19063
19064        #[inline]
19065        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
19066            ::fidl_next::munge! {
19067                let Self {
19068                    rel_x,
19069                    rel_y,
19070                    rel_hscroll,
19071                    rel_vscroll,
19072                    pressed_buttons,
19073
19074                } = &mut *out_;
19075            }
19076
19077            ::fidl_next::Wire::zero_padding(rel_x);
19078
19079            ::fidl_next::Wire::zero_padding(rel_y);
19080
19081            ::fidl_next::Wire::zero_padding(rel_hscroll);
19082
19083            ::fidl_next::Wire::zero_padding(rel_vscroll);
19084
19085            ::fidl_next::Wire::zero_padding(pressed_buttons);
19086        }
19087    }
19088
19089    unsafe impl<___D> ::fidl_next::Decode<___D> for MouseReport
19090    where
19091        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19092    {
19093        fn decode(
19094            slot_: ::fidl_next::Slot<'_, Self>,
19095            decoder_: &mut ___D,
19096            _: (),
19097        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19098            ::fidl_next::munge! {
19099                let Self {
19100                    mut rel_x,
19101                    mut rel_y,
19102                    mut rel_hscroll,
19103                    mut rel_vscroll,
19104                    mut pressed_buttons,
19105
19106                } = slot_;
19107            }
19108
19109            let _field = rel_x.as_mut();
19110
19111            ::fidl_next::Decode::decode(rel_x.as_mut(), decoder_, ())?;
19112
19113            let _field = rel_y.as_mut();
19114
19115            ::fidl_next::Decode::decode(rel_y.as_mut(), decoder_, ())?;
19116
19117            let _field = rel_hscroll.as_mut();
19118
19119            ::fidl_next::Decode::decode(rel_hscroll.as_mut(), decoder_, ())?;
19120
19121            let _field = rel_vscroll.as_mut();
19122
19123            ::fidl_next::Decode::decode(rel_vscroll.as_mut(), decoder_, ())?;
19124
19125            let _field = pressed_buttons.as_mut();
19126
19127            ::fidl_next::Decode::decode(pressed_buttons.as_mut(), decoder_, ())?;
19128
19129            Ok(())
19130        }
19131    }
19132
19133    impl ::fidl_next::IntoNatural for MouseReport {
19134        type Natural = crate::natural::MouseReport;
19135    }
19136
19137    /// The wire type corresponding to [`SensorLocation`].
19138    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
19139    #[repr(transparent)]
19140    pub struct SensorLocation {
19141        pub(crate) value: ::fidl_next::wire::Uint32,
19142    }
19143
19144    impl ::fidl_next::Constrained for SensorLocation {
19145        type Constraint = ();
19146
19147        fn validate(
19148            _: ::fidl_next::Slot<'_, Self>,
19149            _: Self::Constraint,
19150        ) -> Result<(), ::fidl_next::ValidationError> {
19151            Ok(())
19152        }
19153    }
19154
19155    unsafe impl ::fidl_next::Wire for SensorLocation {
19156        type Narrowed<'de> = Self;
19157
19158        #[inline]
19159        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
19160            // Wire enums have no padding
19161        }
19162    }
19163
19164    impl SensorLocation {
19165        pub const UNKNOWN: SensorLocation = SensorLocation { value: ::fidl_next::wire::Uint32(0) };
19166
19167        pub const BASE: SensorLocation = SensorLocation { value: ::fidl_next::wire::Uint32(1) };
19168
19169        pub const LID: SensorLocation = SensorLocation { value: ::fidl_next::wire::Uint32(2) };
19170    }
19171
19172    unsafe impl<___D> ::fidl_next::Decode<___D> for SensorLocation
19173    where
19174        ___D: ?Sized,
19175    {
19176        fn decode(
19177            slot: ::fidl_next::Slot<'_, Self>,
19178            _: &mut ___D,
19179            _: (),
19180        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19181            Ok(())
19182        }
19183    }
19184
19185    impl ::core::convert::From<crate::natural::SensorLocation> for SensorLocation {
19186        fn from(natural: crate::natural::SensorLocation) -> Self {
19187            match natural {
19188                crate::natural::SensorLocation::Unknown => SensorLocation::UNKNOWN,
19189
19190                crate::natural::SensorLocation::Base => SensorLocation::BASE,
19191
19192                crate::natural::SensorLocation::Lid => SensorLocation::LID,
19193
19194                crate::natural::SensorLocation::UnknownOrdinal_(value) => {
19195                    SensorLocation { value: ::fidl_next::wire::Uint32::from(value) }
19196                }
19197            }
19198        }
19199    }
19200
19201    impl ::fidl_next::IntoNatural for SensorLocation {
19202        type Natural = crate::natural::SensorLocation;
19203    }
19204
19205    /// The wire type corresponding to [`SensorReport`].
19206    #[repr(transparent)]
19207    pub struct SensorReport<'de> {
19208        pub(crate) raw: ::fidl_next::wire::Union,
19209        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
19210    }
19211
19212    impl<'de> Drop for SensorReport<'de> {
19213        fn drop(&mut self) {
19214            match self.raw.ordinal() {
19215                1 => {
19216                    let _ =
19217                        unsafe { self.raw.get().read_unchecked::<[::fidl_next::wire::Int16; 3]>() };
19218                }
19219
19220                2 => {
19221                    let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint16>() };
19222                }
19223
19224                _ => unsafe { ::core::hint::unreachable_unchecked() },
19225            }
19226        }
19227    }
19228
19229    impl ::fidl_next::Constrained for SensorReport<'_> {
19230        type Constraint = ();
19231
19232        fn validate(
19233            _: ::fidl_next::Slot<'_, Self>,
19234            _: Self::Constraint,
19235        ) -> Result<(), ::fidl_next::ValidationError> {
19236            Ok(())
19237        }
19238    }
19239
19240    unsafe impl ::fidl_next::Wire for SensorReport<'static> {
19241        type Narrowed<'de> = SensorReport<'de>;
19242
19243        #[inline]
19244        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
19245            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
19246            ::fidl_next::wire::Union::zero_padding(raw);
19247        }
19248    }
19249
19250    pub mod sensor_report {
19251        pub enum Ref<'de> {
19252            Vector(&'de [::fidl_next::wire::Int16; 3]),
19253
19254            Scalar(&'de ::fidl_next::wire::Uint16),
19255        }
19256
19257        pub enum Value {
19258            Vector([::fidl_next::wire::Int16; 3]),
19259
19260            Scalar(::fidl_next::wire::Uint16),
19261        }
19262    }
19263
19264    impl<'de> SensorReport<'de> {
19265        pub fn as_ref(&self) -> crate::wire::sensor_report::Ref<'_> {
19266            match self.raw.ordinal() {
19267                1 => crate::wire::sensor_report::Ref::Vector(unsafe {
19268                    self.raw.get().deref_unchecked::<[::fidl_next::wire::Int16; 3]>()
19269                }),
19270
19271                2 => crate::wire::sensor_report::Ref::Scalar(unsafe {
19272                    self.raw.get().deref_unchecked::<::fidl_next::wire::Uint16>()
19273                }),
19274
19275                _ => unsafe { ::core::hint::unreachable_unchecked() },
19276            }
19277        }
19278
19279        pub fn into_inner(self) -> crate::wire::sensor_report::Value {
19280            let this = ::core::mem::ManuallyDrop::new(self);
19281
19282            match this.raw.ordinal() {
19283                1 => crate::wire::sensor_report::Value::Vector(unsafe {
19284                    this.raw.get().read_unchecked::<[::fidl_next::wire::Int16; 3]>()
19285                }),
19286
19287                2 => crate::wire::sensor_report::Value::Scalar(unsafe {
19288                    this.raw.get().read_unchecked::<::fidl_next::wire::Uint16>()
19289                }),
19290
19291                _ => unsafe { ::core::hint::unreachable_unchecked() },
19292            }
19293        }
19294    }
19295
19296    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SensorReport<'de>
19297    where
19298        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19299        ___D: ::fidl_next::Decoder<'de>,
19300    {
19301        fn decode(
19302            mut slot: ::fidl_next::Slot<'_, Self>,
19303            decoder: &mut ___D,
19304            _: (),
19305        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19306            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
19307            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
19308                1 => ::fidl_next::wire::Union::decode_as::<___D, [::fidl_next::wire::Int16; 3]>(
19309                    raw,
19310                    decoder,
19311                    (),
19312                )?,
19313
19314                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint16>(
19315                    raw,
19316                    decoder,
19317                    (),
19318                )?,
19319
19320                ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
19321            }
19322
19323            Ok(())
19324        }
19325    }
19326
19327    impl<'de> ::core::fmt::Debug for SensorReport<'de> {
19328        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
19329            match self.raw.ordinal() {
19330                1 => unsafe {
19331                    self.raw.get().deref_unchecked::<[::fidl_next::wire::Int16; 3]>().fmt(f)
19332                },
19333                2 => unsafe {
19334                    self.raw.get().deref_unchecked::<::fidl_next::wire::Uint16>().fmt(f)
19335                },
19336                _ => unsafe { ::core::hint::unreachable_unchecked() },
19337            }
19338        }
19339    }
19340
19341    impl<'de> ::fidl_next::IntoNatural for SensorReport<'de> {
19342        type Natural = crate::natural::SensorReport;
19343    }
19344
19345    /// The wire type corresponding to [`StylusDescriptor`].
19346    #[derive(Debug)]
19347    #[repr(C)]
19348    pub struct StylusDescriptor<'de> {
19349        pub x: crate::wire::Axis,
19350
19351        pub y: crate::wire::Axis,
19352
19353        pub pressure: ::fidl_next::wire::Box<'de, crate::wire::Axis>,
19354
19355        pub is_invertible: bool,
19356
19357        pub buttons: ::fidl_next::wire::Uint32,
19358    }
19359
19360    static_assertions::const_assert_eq!(std::mem::size_of::<StylusDescriptor<'_>>(), 48);
19361    static_assertions::const_assert_eq!(std::mem::align_of::<StylusDescriptor<'_>>(), 8);
19362
19363    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusDescriptor<'_>, x), 0);
19364
19365    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusDescriptor<'_>, y), 16);
19366
19367    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusDescriptor<'_>, pressure), 32);
19368
19369    static_assertions::const_assert_eq!(
19370        std::mem::offset_of!(StylusDescriptor<'_>, is_invertible),
19371        40
19372    );
19373
19374    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusDescriptor<'_>, buttons), 44);
19375
19376    impl ::fidl_next::Constrained for StylusDescriptor<'_> {
19377        type Constraint = ();
19378
19379        fn validate(
19380            _: ::fidl_next::Slot<'_, Self>,
19381            _: Self::Constraint,
19382        ) -> Result<(), ::fidl_next::ValidationError> {
19383            Ok(())
19384        }
19385    }
19386
19387    unsafe impl ::fidl_next::Wire for StylusDescriptor<'static> {
19388        type Narrowed<'de> = StylusDescriptor<'de>;
19389
19390        #[inline]
19391        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
19392            ::fidl_next::munge! {
19393                let Self {
19394                    x,
19395                    y,
19396                    pressure,
19397                    is_invertible,
19398                    buttons,
19399
19400                } = &mut *out_;
19401            }
19402
19403            ::fidl_next::Wire::zero_padding(x);
19404
19405            ::fidl_next::Wire::zero_padding(y);
19406
19407            ::fidl_next::Wire::zero_padding(pressure);
19408
19409            ::fidl_next::Wire::zero_padding(is_invertible);
19410
19411            ::fidl_next::Wire::zero_padding(buttons);
19412
19413            unsafe {
19414                out_.as_mut_ptr().cast::<u8>().add(41).write_bytes(0, 3);
19415            }
19416        }
19417    }
19418
19419    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StylusDescriptor<'de>
19420    where
19421        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19422        ___D: ::fidl_next::Decoder<'de>,
19423    {
19424        fn decode(
19425            slot_: ::fidl_next::Slot<'_, Self>,
19426            decoder_: &mut ___D,
19427            _: (),
19428        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19429            if slot_.as_bytes()[41..44] != [0u8; 3] {
19430                return Err(::fidl_next::DecodeError::InvalidPadding);
19431            }
19432
19433            ::fidl_next::munge! {
19434                let Self {
19435                    mut x,
19436                    mut y,
19437                    mut pressure,
19438                    mut is_invertible,
19439                    mut buttons,
19440
19441                } = slot_;
19442            }
19443
19444            let _field = x.as_mut();
19445
19446            ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
19447
19448            let _field = y.as_mut();
19449
19450            ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
19451
19452            let _field = pressure.as_mut();
19453
19454            ::fidl_next::Decode::decode(pressure.as_mut(), decoder_, ())?;
19455
19456            let _field = is_invertible.as_mut();
19457
19458            ::fidl_next::Decode::decode(is_invertible.as_mut(), decoder_, ())?;
19459
19460            let _field = buttons.as_mut();
19461
19462            ::fidl_next::Decode::decode(buttons.as_mut(), decoder_, ())?;
19463
19464            Ok(())
19465        }
19466    }
19467
19468    impl<'de> ::fidl_next::IntoNatural for StylusDescriptor<'de> {
19469        type Natural = crate::natural::StylusDescriptor;
19470    }
19471
19472    /// The wire type corresponding to [`StylusReport`].
19473    #[derive(Clone, Debug)]
19474    #[repr(C)]
19475    pub struct StylusReport {
19476        pub x: ::fidl_next::wire::Int32,
19477
19478        pub y: ::fidl_next::wire::Int32,
19479
19480        pub pressure: ::fidl_next::wire::Uint32,
19481
19482        pub is_in_contact: bool,
19483
19484        pub in_range: bool,
19485
19486        pub is_inverted: bool,
19487
19488        pub pressed_buttons: ::fidl_next::wire::Uint32,
19489    }
19490
19491    static_assertions::const_assert_eq!(std::mem::size_of::<StylusReport>(), 20);
19492    static_assertions::const_assert_eq!(std::mem::align_of::<StylusReport>(), 4);
19493
19494    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusReport, x), 0);
19495
19496    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusReport, y), 4);
19497
19498    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusReport, pressure), 8);
19499
19500    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusReport, is_in_contact), 12);
19501
19502    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusReport, in_range), 13);
19503
19504    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusReport, is_inverted), 14);
19505
19506    static_assertions::const_assert_eq!(std::mem::offset_of!(StylusReport, pressed_buttons), 16);
19507
19508    impl ::fidl_next::Constrained for StylusReport {
19509        type Constraint = ();
19510
19511        fn validate(
19512            _: ::fidl_next::Slot<'_, Self>,
19513            _: Self::Constraint,
19514        ) -> Result<(), ::fidl_next::ValidationError> {
19515            Ok(())
19516        }
19517    }
19518
19519    unsafe impl ::fidl_next::Wire for StylusReport {
19520        type Narrowed<'de> = StylusReport;
19521
19522        #[inline]
19523        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
19524            ::fidl_next::munge! {
19525                let Self {
19526                    x,
19527                    y,
19528                    pressure,
19529                    is_in_contact,
19530                    in_range,
19531                    is_inverted,
19532                    pressed_buttons,
19533
19534                } = &mut *out_;
19535            }
19536
19537            ::fidl_next::Wire::zero_padding(x);
19538
19539            ::fidl_next::Wire::zero_padding(y);
19540
19541            ::fidl_next::Wire::zero_padding(pressure);
19542
19543            ::fidl_next::Wire::zero_padding(is_in_contact);
19544
19545            ::fidl_next::Wire::zero_padding(in_range);
19546
19547            ::fidl_next::Wire::zero_padding(is_inverted);
19548
19549            ::fidl_next::Wire::zero_padding(pressed_buttons);
19550
19551            unsafe {
19552                out_.as_mut_ptr().cast::<u8>().add(15).write_bytes(0, 1);
19553            }
19554        }
19555    }
19556
19557    unsafe impl<___D> ::fidl_next::Decode<___D> for StylusReport
19558    where
19559        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19560    {
19561        fn decode(
19562            slot_: ::fidl_next::Slot<'_, Self>,
19563            decoder_: &mut ___D,
19564            _: (),
19565        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19566            if slot_.as_bytes()[15..16] != [0u8; 1] {
19567                return Err(::fidl_next::DecodeError::InvalidPadding);
19568            }
19569
19570            ::fidl_next::munge! {
19571                let Self {
19572                    mut x,
19573                    mut y,
19574                    mut pressure,
19575                    mut is_in_contact,
19576                    mut in_range,
19577                    mut is_inverted,
19578                    mut pressed_buttons,
19579
19580                } = slot_;
19581            }
19582
19583            let _field = x.as_mut();
19584
19585            ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
19586
19587            let _field = y.as_mut();
19588
19589            ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
19590
19591            let _field = pressure.as_mut();
19592
19593            ::fidl_next::Decode::decode(pressure.as_mut(), decoder_, ())?;
19594
19595            let _field = is_in_contact.as_mut();
19596
19597            ::fidl_next::Decode::decode(is_in_contact.as_mut(), decoder_, ())?;
19598
19599            let _field = in_range.as_mut();
19600
19601            ::fidl_next::Decode::decode(in_range.as_mut(), decoder_, ())?;
19602
19603            let _field = is_inverted.as_mut();
19604
19605            ::fidl_next::Decode::decode(is_inverted.as_mut(), decoder_, ())?;
19606
19607            let _field = pressed_buttons.as_mut();
19608
19609            ::fidl_next::Decode::decode(pressed_buttons.as_mut(), decoder_, ())?;
19610
19611            Ok(())
19612        }
19613    }
19614
19615    impl ::fidl_next::IntoNatural for StylusReport {
19616        type Natural = crate::natural::StylusReport;
19617    }
19618
19619    /// The wire type corresponding to [`Touch`].
19620    #[derive(Clone, Debug)]
19621    #[repr(C)]
19622    pub struct Touch {
19623        pub finger_id: ::fidl_next::wire::Uint32,
19624
19625        pub x: ::fidl_next::wire::Int32,
19626
19627        pub y: ::fidl_next::wire::Int32,
19628
19629        pub width: ::fidl_next::wire::Uint32,
19630
19631        pub height: ::fidl_next::wire::Uint32,
19632    }
19633
19634    static_assertions::const_assert_eq!(std::mem::size_of::<Touch>(), 20);
19635    static_assertions::const_assert_eq!(std::mem::align_of::<Touch>(), 4);
19636
19637    static_assertions::const_assert_eq!(std::mem::offset_of!(Touch, finger_id), 0);
19638
19639    static_assertions::const_assert_eq!(std::mem::offset_of!(Touch, x), 4);
19640
19641    static_assertions::const_assert_eq!(std::mem::offset_of!(Touch, y), 8);
19642
19643    static_assertions::const_assert_eq!(std::mem::offset_of!(Touch, width), 12);
19644
19645    static_assertions::const_assert_eq!(std::mem::offset_of!(Touch, height), 16);
19646
19647    impl ::fidl_next::Constrained for Touch {
19648        type Constraint = ();
19649
19650        fn validate(
19651            _: ::fidl_next::Slot<'_, Self>,
19652            _: Self::Constraint,
19653        ) -> Result<(), ::fidl_next::ValidationError> {
19654            Ok(())
19655        }
19656    }
19657
19658    unsafe impl ::fidl_next::Wire for Touch {
19659        type Narrowed<'de> = Touch;
19660
19661        #[inline]
19662        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
19663            ::fidl_next::munge! {
19664                let Self {
19665                    finger_id,
19666                    x,
19667                    y,
19668                    width,
19669                    height,
19670
19671                } = &mut *out_;
19672            }
19673
19674            ::fidl_next::Wire::zero_padding(finger_id);
19675
19676            ::fidl_next::Wire::zero_padding(x);
19677
19678            ::fidl_next::Wire::zero_padding(y);
19679
19680            ::fidl_next::Wire::zero_padding(width);
19681
19682            ::fidl_next::Wire::zero_padding(height);
19683        }
19684    }
19685
19686    unsafe impl<___D> ::fidl_next::Decode<___D> for Touch
19687    where
19688        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19689    {
19690        fn decode(
19691            slot_: ::fidl_next::Slot<'_, Self>,
19692            decoder_: &mut ___D,
19693            _: (),
19694        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19695            ::fidl_next::munge! {
19696                let Self {
19697                    mut finger_id,
19698                    mut x,
19699                    mut y,
19700                    mut width,
19701                    mut height,
19702
19703                } = slot_;
19704            }
19705
19706            let _field = finger_id.as_mut();
19707
19708            ::fidl_next::Decode::decode(finger_id.as_mut(), decoder_, ())?;
19709
19710            let _field = x.as_mut();
19711
19712            ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
19713
19714            let _field = y.as_mut();
19715
19716            ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
19717
19718            let _field = width.as_mut();
19719
19720            ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
19721
19722            let _field = height.as_mut();
19723
19724            ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
19725
19726            Ok(())
19727        }
19728    }
19729
19730    impl ::fidl_next::IntoNatural for Touch {
19731        type Natural = crate::natural::Touch;
19732    }
19733
19734    /// The wire type corresponding to [`TouchDeviceInfo`].
19735    #[repr(C)]
19736    pub struct TouchDeviceInfo<'de> {
19737        pub(crate) table: ::fidl_next::wire::Table<'de>,
19738    }
19739
19740    impl<'de> Drop for TouchDeviceInfo<'de> {
19741        fn drop(&mut self) {
19742            let _ = self
19743                .table
19744                .get(1)
19745                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
19746        }
19747    }
19748
19749    impl ::fidl_next::Constrained for TouchDeviceInfo<'_> {
19750        type Constraint = ();
19751
19752        fn validate(
19753            _: ::fidl_next::Slot<'_, Self>,
19754            _: Self::Constraint,
19755        ) -> Result<(), ::fidl_next::ValidationError> {
19756            Ok(())
19757        }
19758    }
19759
19760    unsafe impl ::fidl_next::Wire for TouchDeviceInfo<'static> {
19761        type Narrowed<'de> = TouchDeviceInfo<'de>;
19762
19763        #[inline]
19764        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
19765            ::fidl_next::munge!(let Self { table } = out);
19766            ::fidl_next::wire::Table::zero_padding(table);
19767        }
19768    }
19769
19770    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TouchDeviceInfo<'de>
19771    where
19772        ___D: ::fidl_next::Decoder<'de> + ?Sized,
19773    {
19774        fn decode(
19775            slot: ::fidl_next::Slot<'_, Self>,
19776            decoder: &mut ___D,
19777            _: (),
19778        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19779            ::fidl_next::munge!(let Self { table } = slot);
19780
19781            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
19782                match ordinal {
19783                    0 => unsafe { ::core::hint::unreachable_unchecked() },
19784
19785                    1 => {
19786                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
19787                            slot.as_mut(),
19788                            decoder,
19789                            (),
19790                        )?;
19791
19792                        Ok(())
19793                    }
19794
19795                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
19796                }
19797            })
19798        }
19799    }
19800
19801    impl<'de> TouchDeviceInfo<'de> {
19802        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
19803            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
19804        }
19805
19806        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
19807            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
19808        }
19809    }
19810
19811    impl<'de> ::core::fmt::Debug for TouchDeviceInfo<'de> {
19812        fn fmt(
19813            &self,
19814            f: &mut ::core::fmt::Formatter<'_>,
19815        ) -> ::core::result::Result<(), ::core::fmt::Error> {
19816            f.debug_struct("TouchDeviceInfo").field("id", &self.id()).finish()
19817        }
19818    }
19819
19820    impl<'de> ::fidl_next::IntoNatural for TouchDeviceInfo<'de> {
19821        type Natural = crate::natural::TouchDeviceInfo;
19822    }
19823
19824    /// The wire type corresponding to [`TouchscreenDescriptor`].
19825    #[derive(Clone, Debug)]
19826    #[repr(C)]
19827    pub struct TouchscreenDescriptor {
19828        pub x: crate::wire::Axis,
19829
19830        pub y: crate::wire::Axis,
19831
19832        pub max_finger_id: ::fidl_next::wire::Uint32,
19833    }
19834
19835    static_assertions::const_assert_eq!(std::mem::size_of::<TouchscreenDescriptor>(), 36);
19836    static_assertions::const_assert_eq!(std::mem::align_of::<TouchscreenDescriptor>(), 4);
19837
19838    static_assertions::const_assert_eq!(std::mem::offset_of!(TouchscreenDescriptor, x), 0);
19839
19840    static_assertions::const_assert_eq!(std::mem::offset_of!(TouchscreenDescriptor, y), 16);
19841
19842    static_assertions::const_assert_eq!(
19843        std::mem::offset_of!(TouchscreenDescriptor, max_finger_id),
19844        32
19845    );
19846
19847    impl ::fidl_next::Constrained for TouchscreenDescriptor {
19848        type Constraint = ();
19849
19850        fn validate(
19851            _: ::fidl_next::Slot<'_, Self>,
19852            _: Self::Constraint,
19853        ) -> Result<(), ::fidl_next::ValidationError> {
19854            Ok(())
19855        }
19856    }
19857
19858    unsafe impl ::fidl_next::Wire for TouchscreenDescriptor {
19859        type Narrowed<'de> = TouchscreenDescriptor;
19860
19861        #[inline]
19862        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
19863            ::fidl_next::munge! {
19864                let Self {
19865                    x,
19866                    y,
19867                    max_finger_id,
19868
19869                } = &mut *out_;
19870            }
19871
19872            ::fidl_next::Wire::zero_padding(x);
19873
19874            ::fidl_next::Wire::zero_padding(y);
19875
19876            ::fidl_next::Wire::zero_padding(max_finger_id);
19877        }
19878    }
19879
19880    unsafe impl<___D> ::fidl_next::Decode<___D> for TouchscreenDescriptor
19881    where
19882        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19883    {
19884        fn decode(
19885            slot_: ::fidl_next::Slot<'_, Self>,
19886            decoder_: &mut ___D,
19887            _: (),
19888        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19889            ::fidl_next::munge! {
19890                let Self {
19891                    mut x,
19892                    mut y,
19893                    mut max_finger_id,
19894
19895                } = slot_;
19896            }
19897
19898            let _field = x.as_mut();
19899
19900            ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
19901
19902            let _field = y.as_mut();
19903
19904            ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
19905
19906            let _field = max_finger_id.as_mut();
19907
19908            ::fidl_next::Decode::decode(max_finger_id.as_mut(), decoder_, ())?;
19909
19910            Ok(())
19911        }
19912    }
19913
19914    impl ::fidl_next::IntoNatural for TouchscreenDescriptor {
19915        type Natural = crate::natural::TouchscreenDescriptor;
19916    }
19917
19918    /// The wire type corresponding to [`TouchscreenReport`].
19919    #[derive(Debug)]
19920    #[repr(C)]
19921    pub struct TouchscreenReport<'de> {
19922        pub touches: ::fidl_next::wire::Vector<'de, crate::wire::Touch>,
19923    }
19924
19925    static_assertions::const_assert_eq!(std::mem::size_of::<TouchscreenReport<'_>>(), 16);
19926    static_assertions::const_assert_eq!(std::mem::align_of::<TouchscreenReport<'_>>(), 8);
19927
19928    static_assertions::const_assert_eq!(std::mem::offset_of!(TouchscreenReport<'_>, touches), 0);
19929
19930    impl ::fidl_next::Constrained for TouchscreenReport<'_> {
19931        type Constraint = ();
19932
19933        fn validate(
19934            _: ::fidl_next::Slot<'_, Self>,
19935            _: Self::Constraint,
19936        ) -> Result<(), ::fidl_next::ValidationError> {
19937            Ok(())
19938        }
19939    }
19940
19941    unsafe impl ::fidl_next::Wire for TouchscreenReport<'static> {
19942        type Narrowed<'de> = TouchscreenReport<'de>;
19943
19944        #[inline]
19945        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
19946            ::fidl_next::munge! {
19947                let Self {
19948                    touches,
19949
19950                } = &mut *out_;
19951            }
19952
19953            ::fidl_next::Wire::zero_padding(touches);
19954        }
19955    }
19956
19957    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TouchscreenReport<'de>
19958    where
19959        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19960        ___D: ::fidl_next::Decoder<'de>,
19961    {
19962        fn decode(
19963            slot_: ::fidl_next::Slot<'_, Self>,
19964            decoder_: &mut ___D,
19965            _: (),
19966        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
19967            ::fidl_next::munge! {
19968                let Self {
19969                    mut touches,
19970
19971                } = slot_;
19972            }
19973
19974            let _field = touches.as_mut();
19975            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
19976            ::fidl_next::Decode::decode(touches.as_mut(), decoder_, (4294967295, ()))?;
19977
19978            Ok(())
19979        }
19980    }
19981
19982    impl<'de> ::fidl_next::IntoNatural for TouchscreenReport<'de> {
19983        type Natural = crate::natural::TouchscreenReport;
19984    }
19985}
19986
19987pub mod wire_optional {
19988
19989    #[repr(transparent)]
19990    pub struct Command<'de> {
19991        pub(crate) raw: ::fidl_next::wire::Union,
19992        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
19993    }
19994
19995    impl ::fidl_next::Constrained for Command<'_> {
19996        type Constraint = ();
19997
19998        fn validate(
19999            _: ::fidl_next::Slot<'_, Self>,
20000            _: Self::Constraint,
20001        ) -> Result<(), ::fidl_next::ValidationError> {
20002            Ok(())
20003        }
20004    }
20005
20006    unsafe impl ::fidl_next::Wire for Command<'static> {
20007        type Narrowed<'de> = Command<'de>;
20008
20009        #[inline]
20010        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
20011            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
20012            ::fidl_next::wire::Union::zero_padding(raw);
20013        }
20014    }
20015
20016    impl<'de> Command<'de> {
20017        pub fn is_some(&self) -> bool {
20018            self.raw.is_some()
20019        }
20020
20021        pub fn is_none(&self) -> bool {
20022            self.raw.is_none()
20023        }
20024
20025        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Command<'de>> {
20026            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
20027        }
20028
20029        pub fn into_option(self) -> ::core::option::Option<crate::wire::Command<'de>> {
20030            if self.is_some() {
20031                Some(crate::wire::Command { raw: self.raw, _phantom: ::core::marker::PhantomData })
20032            } else {
20033                None
20034            }
20035        }
20036    }
20037
20038    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Command<'de>
20039    where
20040        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
20041        ___D: ::fidl_next::Decoder<'de>,
20042    {
20043        fn decode(
20044            mut slot: ::fidl_next::Slot<'_, Self>,
20045            decoder: &mut ___D,
20046            _: (),
20047        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
20048            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
20049            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
20050                1 => {
20051                    ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SendKeyboardInputCmd>(
20052                        raw,
20053                        decoder,
20054                        (),
20055                    )?
20056                }
20057
20058                2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SendPointerInputCmd>(
20059                    raw,
20060                    decoder,
20061                    (),
20062                )?,
20063
20064                3 => ::fidl_next::wire::Union::decode_as::<
20065                    ___D,
20066                    crate::wire::SetHardKeyboardDeliveryCmd,
20067                >(raw, decoder, ())?,
20068
20069                4 => ::fidl_next::wire::Union::decode_as::<
20070                    ___D,
20071                    crate::wire::SetParallelDispatchCmd,
20072                >(raw, decoder, ())?,
20073
20074                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
20075                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
20076            }
20077
20078            Ok(())
20079        }
20080    }
20081
20082    impl<'de> ::core::fmt::Debug for Command<'de> {
20083        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
20084            self.as_ref().fmt(f)
20085        }
20086    }
20087
20088    impl<'de> ::fidl_next::IntoNatural for Command<'de> {
20089        type Natural = ::core::option::Option<crate::natural::Command>;
20090    }
20091
20092    #[repr(transparent)]
20093    pub struct InputEvent<'de> {
20094        pub(crate) raw: ::fidl_next::wire::Union,
20095        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
20096    }
20097
20098    impl ::fidl_next::Constrained for InputEvent<'_> {
20099        type Constraint = ();
20100
20101        fn validate(
20102            _: ::fidl_next::Slot<'_, Self>,
20103            _: Self::Constraint,
20104        ) -> Result<(), ::fidl_next::ValidationError> {
20105            Ok(())
20106        }
20107    }
20108
20109    unsafe impl ::fidl_next::Wire for InputEvent<'static> {
20110        type Narrowed<'de> = InputEvent<'de>;
20111
20112        #[inline]
20113        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
20114            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
20115            ::fidl_next::wire::Union::zero_padding(raw);
20116        }
20117    }
20118
20119    impl<'de> InputEvent<'de> {
20120        pub fn is_some(&self) -> bool {
20121            self.raw.is_some()
20122        }
20123
20124        pub fn is_none(&self) -> bool {
20125            self.raw.is_none()
20126        }
20127
20128        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::InputEvent<'de>> {
20129            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
20130        }
20131
20132        pub fn into_option(self) -> ::core::option::Option<crate::wire::InputEvent<'de>> {
20133            if self.is_some() {
20134                Some(crate::wire::InputEvent {
20135                    raw: self.raw,
20136                    _phantom: ::core::marker::PhantomData,
20137                })
20138            } else {
20139                None
20140            }
20141        }
20142    }
20143
20144    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputEvent<'de>
20145    where
20146        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
20147        ___D: ::fidl_next::Decoder<'de>,
20148    {
20149        fn decode(
20150            mut slot: ::fidl_next::Slot<'_, Self>,
20151            decoder: &mut ___D,
20152            _: (),
20153        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
20154            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
20155            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
20156                1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::PointerEvent>(
20157                    raw,
20158                    decoder,
20159                    (),
20160                )?,
20161
20162                2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::KeyboardEvent>(
20163                    raw,
20164                    decoder,
20165                    (),
20166                )?,
20167
20168                3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FocusEvent>(
20169                    raw,
20170                    decoder,
20171                    (),
20172                )?,
20173
20174                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
20175                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
20176            }
20177
20178            Ok(())
20179        }
20180    }
20181
20182    impl<'de> ::core::fmt::Debug for InputEvent<'de> {
20183        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
20184            self.as_ref().fmt(f)
20185        }
20186    }
20187
20188    impl<'de> ::fidl_next::IntoNatural for InputEvent<'de> {
20189        type Natural = ::core::option::Option<crate::natural::InputEvent>;
20190    }
20191
20192    #[repr(transparent)]
20193    pub struct SensorReport<'de> {
20194        pub(crate) raw: ::fidl_next::wire::Union,
20195        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
20196    }
20197
20198    impl ::fidl_next::Constrained for SensorReport<'_> {
20199        type Constraint = ();
20200
20201        fn validate(
20202            _: ::fidl_next::Slot<'_, Self>,
20203            _: Self::Constraint,
20204        ) -> Result<(), ::fidl_next::ValidationError> {
20205            Ok(())
20206        }
20207    }
20208
20209    unsafe impl ::fidl_next::Wire for SensorReport<'static> {
20210        type Narrowed<'de> = SensorReport<'de>;
20211
20212        #[inline]
20213        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
20214            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
20215            ::fidl_next::wire::Union::zero_padding(raw);
20216        }
20217    }
20218
20219    impl<'de> SensorReport<'de> {
20220        pub fn is_some(&self) -> bool {
20221            self.raw.is_some()
20222        }
20223
20224        pub fn is_none(&self) -> bool {
20225            self.raw.is_none()
20226        }
20227
20228        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SensorReport<'de>> {
20229            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
20230        }
20231
20232        pub fn into_option(self) -> ::core::option::Option<crate::wire::SensorReport<'de>> {
20233            if self.is_some() {
20234                Some(crate::wire::SensorReport {
20235                    raw: self.raw,
20236                    _phantom: ::core::marker::PhantomData,
20237                })
20238            } else {
20239                None
20240            }
20241        }
20242    }
20243
20244    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SensorReport<'de>
20245    where
20246        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
20247        ___D: ::fidl_next::Decoder<'de>,
20248    {
20249        fn decode(
20250            mut slot: ::fidl_next::Slot<'_, Self>,
20251            decoder: &mut ___D,
20252            _: (),
20253        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
20254            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
20255            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
20256                1 => ::fidl_next::wire::Union::decode_as::<___D, [::fidl_next::wire::Int16; 3]>(
20257                    raw,
20258                    decoder,
20259                    (),
20260                )?,
20261
20262                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint16>(
20263                    raw,
20264                    decoder,
20265                    (),
20266                )?,
20267
20268                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
20269                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
20270            }
20271
20272            Ok(())
20273        }
20274    }
20275
20276    impl<'de> ::core::fmt::Debug for SensorReport<'de> {
20277        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
20278            self.as_ref().fmt(f)
20279        }
20280    }
20281
20282    impl<'de> ::fidl_next::IntoNatural for SensorReport<'de> {
20283        type Natural = ::core::option::Option<crate::natural::SensorReport>;
20284    }
20285}
20286
20287pub mod generic {
20288
20289    /// The generic type corresponding to [`Range`].
20290    pub struct Range<T0, T1> {
20291        pub min: T0,
20292
20293        pub max: T1,
20294    }
20295
20296    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Range, ___E> for Range<T0, T1>
20297    where
20298        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20299        T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
20300        T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
20301    {
20302        #[inline]
20303        fn encode(
20304            self,
20305            encoder_: &mut ___E,
20306            out_: &mut ::core::mem::MaybeUninit<crate::wire::Range>,
20307            _: (),
20308        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20309            ::fidl_next::munge! {
20310                let crate::wire::Range {
20311                    min,
20312                    max,
20313
20314                } = out_;
20315            }
20316
20317            ::fidl_next::Encode::encode(self.min, encoder_, min, ())?;
20318
20319            ::fidl_next::Encode::encode(self.max, encoder_, max, ())?;
20320
20321            Ok(())
20322        }
20323    }
20324
20325    /// The generic type corresponding to [`Axis`].
20326    pub struct Axis<T0, T1, T2> {
20327        pub range: T0,
20328
20329        pub resolution: T1,
20330
20331        pub scale: T2,
20332    }
20333
20334    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Axis, ___E> for Axis<T0, T1, T2>
20335    where
20336        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20337        T0: ::fidl_next::Encode<crate::wire::Range, ___E>,
20338        T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
20339        T2: ::fidl_next::Encode<crate::wire::AxisScale, ___E>,
20340    {
20341        #[inline]
20342        fn encode(
20343            self,
20344            encoder_: &mut ___E,
20345            out_: &mut ::core::mem::MaybeUninit<crate::wire::Axis>,
20346            _: (),
20347        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20348            ::fidl_next::munge! {
20349                let crate::wire::Axis {
20350                    range,
20351                    resolution,
20352                    scale,
20353
20354                } = out_;
20355            }
20356
20357            ::fidl_next::Encode::encode(self.range, encoder_, range, ())?;
20358
20359            ::fidl_next::Encode::encode(self.resolution, encoder_, resolution, ())?;
20360
20361            ::fidl_next::Encode::encode(self.scale, encoder_, scale, ())?;
20362
20363            Ok(())
20364        }
20365    }
20366
20367    /// The generic type corresponding to [`RangeF`].
20368    pub struct RangeF<T0, T1> {
20369        pub min: T0,
20370
20371        pub max: T1,
20372    }
20373
20374    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::RangeF, ___E> for RangeF<T0, T1>
20375    where
20376        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20377        T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
20378        T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
20379    {
20380        #[inline]
20381        fn encode(
20382            self,
20383            encoder_: &mut ___E,
20384            out_: &mut ::core::mem::MaybeUninit<crate::wire::RangeF>,
20385            _: (),
20386        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20387            ::fidl_next::munge! {
20388                let crate::wire::RangeF {
20389                    min,
20390                    max,
20391
20392                } = out_;
20393            }
20394
20395            ::fidl_next::Encode::encode(self.min, encoder_, min, ())?;
20396
20397            ::fidl_next::Encode::encode(self.max, encoder_, max, ())?;
20398
20399            Ok(())
20400        }
20401    }
20402
20403    /// The generic type corresponding to [`AxisF`].
20404    pub struct AxisF<T0, T1, T2> {
20405        pub range: T0,
20406
20407        pub resolution: T1,
20408
20409        pub scale: T2,
20410    }
20411
20412    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::AxisF, ___E> for AxisF<T0, T1, T2>
20413    where
20414        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20415        T0: ::fidl_next::Encode<crate::wire::RangeF, ___E>,
20416        T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
20417        T2: ::fidl_next::Encode<crate::wire::AxisScale, ___E>,
20418    {
20419        #[inline]
20420        fn encode(
20421            self,
20422            encoder_: &mut ___E,
20423            out_: &mut ::core::mem::MaybeUninit<crate::wire::AxisF>,
20424            _: (),
20425        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20426            ::fidl_next::munge! {
20427                let crate::wire::AxisF {
20428                    range,
20429                    resolution,
20430                    scale,
20431
20432                } = out_;
20433            }
20434
20435            ::fidl_next::Encode::encode(self.range, encoder_, range, ())?;
20436
20437            ::fidl_next::Encode::encode(self.resolution, encoder_, resolution, ())?;
20438
20439            ::fidl_next::Encode::encode(self.scale, encoder_, scale, ())?;
20440
20441            Ok(())
20442        }
20443    }
20444
20445    /// The generic type corresponding to [`PointerEvent`].
20446    pub struct PointerEvent<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> {
20447        pub event_time: T0,
20448
20449        pub device_id: T1,
20450
20451        pub pointer_id: T2,
20452
20453        pub type_: T3,
20454
20455        pub phase: T4,
20456
20457        pub x: T5,
20458
20459        pub y: T6,
20460
20461        pub radius_major: T7,
20462
20463        pub radius_minor: T8,
20464
20465        pub buttons: T9,
20466    }
20467
20468    unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
20469        ::fidl_next::Encode<crate::wire::PointerEvent, ___E>
20470        for PointerEvent<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
20471    where
20472        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20473        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20474        T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20475        T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20476        T3: ::fidl_next::Encode<crate::wire::PointerEventType, ___E>,
20477        T4: ::fidl_next::Encode<crate::wire::PointerEventPhase, ___E>,
20478        T5: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
20479        T6: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
20480        T7: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
20481        T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
20482        T9: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20483    {
20484        #[inline]
20485        fn encode(
20486            self,
20487            encoder_: &mut ___E,
20488            out_: &mut ::core::mem::MaybeUninit<crate::wire::PointerEvent>,
20489            _: (),
20490        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20491            ::fidl_next::munge! {
20492                let crate::wire::PointerEvent {
20493                    event_time,
20494                    device_id,
20495                    pointer_id,
20496                    type_,
20497                    phase,
20498                    x,
20499                    y,
20500                    radius_major,
20501                    radius_minor,
20502                    buttons,
20503
20504                } = out_;
20505            }
20506
20507            ::fidl_next::Encode::encode(self.event_time, encoder_, event_time, ())?;
20508
20509            ::fidl_next::Encode::encode(self.device_id, encoder_, device_id, ())?;
20510
20511            ::fidl_next::Encode::encode(self.pointer_id, encoder_, pointer_id, ())?;
20512
20513            ::fidl_next::Encode::encode(self.type_, encoder_, type_, ())?;
20514
20515            ::fidl_next::Encode::encode(self.phase, encoder_, phase, ())?;
20516
20517            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
20518
20519            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
20520
20521            ::fidl_next::Encode::encode(self.radius_major, encoder_, radius_major, ())?;
20522
20523            ::fidl_next::Encode::encode(self.radius_minor, encoder_, radius_minor, ())?;
20524
20525            ::fidl_next::Encode::encode(self.buttons, encoder_, buttons, ())?;
20526
20527            Ok(())
20528        }
20529    }
20530
20531    /// The generic type corresponding to [`SendPointerInputCmd`].
20532    pub struct SendPointerInputCmd<T0, T1> {
20533        pub compositor_id: T0,
20534
20535        pub pointer_event: T1,
20536    }
20537
20538    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SendPointerInputCmd, ___E>
20539        for SendPointerInputCmd<T0, T1>
20540    where
20541        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20542        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20543        T1: ::fidl_next::Encode<crate::wire::PointerEvent, ___E>,
20544    {
20545        #[inline]
20546        fn encode(
20547            self,
20548            encoder_: &mut ___E,
20549            out_: &mut ::core::mem::MaybeUninit<crate::wire::SendPointerInputCmd>,
20550            _: (),
20551        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20552            ::fidl_next::munge! {
20553                let crate::wire::SendPointerInputCmd {
20554                    compositor_id,
20555                    pointer_event,
20556
20557                } = out_;
20558            }
20559
20560            ::fidl_next::Encode::encode(self.compositor_id, encoder_, compositor_id, ())?;
20561
20562            ::fidl_next::Encode::encode(self.pointer_event, encoder_, pointer_event, ())?;
20563
20564            Ok(())
20565        }
20566    }
20567
20568    /// The generic type corresponding to [`SetHardKeyboardDeliveryCmd`].
20569    pub struct SetHardKeyboardDeliveryCmd<T0> {
20570        pub delivery_request: T0,
20571    }
20572
20573    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SetHardKeyboardDeliveryCmd, ___E>
20574        for SetHardKeyboardDeliveryCmd<T0>
20575    where
20576        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20577        T0: ::fidl_next::Encode<bool, ___E>,
20578    {
20579        #[inline]
20580        fn encode(
20581            self,
20582            encoder_: &mut ___E,
20583            out_: &mut ::core::mem::MaybeUninit<crate::wire::SetHardKeyboardDeliveryCmd>,
20584            _: (),
20585        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20586            ::fidl_next::munge! {
20587                let crate::wire::SetHardKeyboardDeliveryCmd {
20588                    delivery_request,
20589
20590                } = out_;
20591            }
20592
20593            ::fidl_next::Encode::encode(self.delivery_request, encoder_, delivery_request, ())?;
20594
20595            Ok(())
20596        }
20597    }
20598
20599    /// The generic type corresponding to [`SetParallelDispatchCmd`].
20600    pub struct SetParallelDispatchCmd<T0> {
20601        pub parallel_dispatch: T0,
20602    }
20603
20604    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SetParallelDispatchCmd, ___E>
20605        for SetParallelDispatchCmd<T0>
20606    where
20607        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20608        T0: ::fidl_next::Encode<bool, ___E>,
20609    {
20610        #[inline]
20611        fn encode(
20612            self,
20613            encoder_: &mut ___E,
20614            out_: &mut ::core::mem::MaybeUninit<crate::wire::SetParallelDispatchCmd>,
20615            _: (),
20616        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20617            ::fidl_next::munge! {
20618                let crate::wire::SetParallelDispatchCmd {
20619                    parallel_dispatch,
20620
20621                } = out_;
20622            }
20623
20624            ::fidl_next::Encode::encode(self.parallel_dispatch, encoder_, parallel_dispatch, ())?;
20625
20626            Ok(())
20627        }
20628    }
20629
20630    /// The generic type corresponding to [`KeyboardEvent`].
20631    pub struct KeyboardEvent<T0, T1, T2, T3, T4, T5> {
20632        pub event_time: T0,
20633
20634        pub device_id: T1,
20635
20636        pub phase: T2,
20637
20638        pub hid_usage: T3,
20639
20640        pub code_point: T4,
20641
20642        pub modifiers: T5,
20643    }
20644
20645    unsafe impl<___E, T0, T1, T2, T3, T4, T5> ::fidl_next::Encode<crate::wire::KeyboardEvent, ___E>
20646        for KeyboardEvent<T0, T1, T2, T3, T4, T5>
20647    where
20648        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20649        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20650        T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20651        T2: ::fidl_next::Encode<crate::wire::KeyboardEventPhase, ___E>,
20652        T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20653        T4: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20654        T5: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20655    {
20656        #[inline]
20657        fn encode(
20658            self,
20659            encoder_: &mut ___E,
20660            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardEvent>,
20661            _: (),
20662        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20663            ::fidl_next::munge! {
20664                let crate::wire::KeyboardEvent {
20665                    event_time,
20666                    device_id,
20667                    phase,
20668                    hid_usage,
20669                    code_point,
20670                    modifiers,
20671
20672                } = out_;
20673            }
20674
20675            ::fidl_next::Encode::encode(self.event_time, encoder_, event_time, ())?;
20676
20677            ::fidl_next::Encode::encode(self.device_id, encoder_, device_id, ())?;
20678
20679            ::fidl_next::Encode::encode(self.phase, encoder_, phase, ())?;
20680
20681            ::fidl_next::Encode::encode(self.hid_usage, encoder_, hid_usage, ())?;
20682
20683            ::fidl_next::Encode::encode(self.code_point, encoder_, code_point, ())?;
20684
20685            ::fidl_next::Encode::encode(self.modifiers, encoder_, modifiers, ())?;
20686
20687            Ok(())
20688        }
20689    }
20690
20691    /// The generic type corresponding to [`SendKeyboardInputCmd`].
20692    pub struct SendKeyboardInputCmd<T0, T1> {
20693        pub compositor_id: T0,
20694
20695        pub keyboard_event: T1,
20696    }
20697
20698    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SendKeyboardInputCmd, ___E>
20699        for SendKeyboardInputCmd<T0, T1>
20700    where
20701        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20702        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20703        T1: ::fidl_next::Encode<crate::wire::KeyboardEvent, ___E>,
20704    {
20705        #[inline]
20706        fn encode(
20707            self,
20708            encoder_: &mut ___E,
20709            out_: &mut ::core::mem::MaybeUninit<crate::wire::SendKeyboardInputCmd>,
20710            _: (),
20711        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20712            ::fidl_next::munge! {
20713                let crate::wire::SendKeyboardInputCmd {
20714                    compositor_id,
20715                    keyboard_event,
20716
20717                } = out_;
20718            }
20719
20720            ::fidl_next::Encode::encode(self.compositor_id, encoder_, compositor_id, ())?;
20721
20722            ::fidl_next::Encode::encode(self.keyboard_event, encoder_, keyboard_event, ())?;
20723
20724            Ok(())
20725        }
20726    }
20727
20728    /// The generic type corresponding to [`SensorAxis`].
20729    pub struct SensorAxis<T0, T1> {
20730        pub axis: T0,
20731
20732        pub type_: T1,
20733    }
20734
20735    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SensorAxis, ___E> for SensorAxis<T0, T1>
20736    where
20737        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20738        T0: ::fidl_next::Encode<::fidl_next_common_fuchsia_input::wire::Axis, ___E>,
20739        T1: ::fidl_next::Encode<crate::wire::SensorType, ___E>,
20740    {
20741        #[inline]
20742        fn encode(
20743            self,
20744            encoder_: &mut ___E,
20745            out_: &mut ::core::mem::MaybeUninit<crate::wire::SensorAxis>,
20746            _: (),
20747        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20748            ::fidl_next::munge! {
20749                let crate::wire::SensorAxis {
20750                    axis,
20751                    type_,
20752
20753                } = out_;
20754            }
20755
20756            ::fidl_next::Encode::encode(self.axis, encoder_, axis, ())?;
20757
20758            ::fidl_next::Encode::encode(self.type_, encoder_, type_, ())?;
20759
20760            Ok(())
20761        }
20762    }
20763
20764    /// The generic type corresponding to [`DeviceInfo`].
20765    pub struct DeviceInfo<T0, T1, T2, T3> {
20766        pub vendor_id: T0,
20767
20768        pub product_id: T1,
20769
20770        pub version: T2,
20771
20772        pub name: T3,
20773    }
20774
20775    unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::DeviceInfo<'static>, ___E>
20776        for DeviceInfo<T0, T1, T2, T3>
20777    where
20778        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20779        ___E: ::fidl_next::Encoder,
20780        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20781        T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20782        T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
20783        T3: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
20784    {
20785        #[inline]
20786        fn encode(
20787            self,
20788            encoder_: &mut ___E,
20789            out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceInfo<'static>>,
20790            _: (),
20791        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20792            ::fidl_next::munge! {
20793                let crate::wire::DeviceInfo {
20794                    vendor_id,
20795                    product_id,
20796                    version,
20797                    name,
20798
20799                } = out_;
20800            }
20801
20802            ::fidl_next::Encode::encode(self.vendor_id, encoder_, vendor_id, ())?;
20803
20804            ::fidl_next::Encode::encode(self.product_id, encoder_, product_id, ())?;
20805
20806            ::fidl_next::Encode::encode(self.version, encoder_, version, ())?;
20807
20808            ::fidl_next::Encode::encode(self.name, encoder_, name, 4294967295)?;
20809
20810            Ok(())
20811        }
20812    }
20813
20814    /// The generic type corresponding to [`DeviceIteratorGetNextResponse`].
20815    pub struct DeviceIteratorGetNextResponse<T0> {
20816        pub devices: T0,
20817    }
20818
20819    unsafe impl<___E, T0>
20820        ::fidl_next::Encode<crate::wire::DeviceIteratorGetNextResponse<'static>, ___E>
20821        for DeviceIteratorGetNextResponse<T0>
20822    where
20823        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20824        ___E: ::fidl_next::Encoder,
20825        T0: ::fidl_next::Encode<
20826                ::fidl_next::wire::Vector<'static, crate::wire::DeviceEvent<'static>>,
20827                ___E,
20828            >,
20829    {
20830        #[inline]
20831        fn encode(
20832            self,
20833            encoder_: &mut ___E,
20834            out_: &mut ::core::mem::MaybeUninit<
20835                crate::wire::DeviceIteratorGetNextResponse<'static>,
20836            >,
20837            _: (),
20838        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20839            ::fidl_next::munge! {
20840                let crate::wire::DeviceIteratorGetNextResponse {
20841                    devices,
20842
20843                } = out_;
20844            }
20845
20846            ::fidl_next::Encode::encode(self.devices, encoder_, devices, (4294967295, ()))?;
20847
20848            Ok(())
20849        }
20850    }
20851
20852    /// The generic type corresponding to [`DeviceListenerOnDeviceChangedRequest`].
20853    pub struct DeviceListenerOnDeviceChangedRequest<T0> {
20854        pub event: T0,
20855    }
20856
20857    unsafe impl<___E, T0>
20858        ::fidl_next::Encode<crate::wire::DeviceListenerOnDeviceChangedRequest<'static>, ___E>
20859        for DeviceListenerOnDeviceChangedRequest<T0>
20860    where
20861        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20862        ___E: ::fidl_next::Encoder,
20863        T0: ::fidl_next::Encode<crate::wire::DeviceEvent<'static>, ___E>,
20864    {
20865        #[inline]
20866        fn encode(
20867            self,
20868            encoder_: &mut ___E,
20869            out_: &mut ::core::mem::MaybeUninit<
20870                crate::wire::DeviceListenerOnDeviceChangedRequest<'static>,
20871            >,
20872            _: (),
20873        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20874            ::fidl_next::munge! {
20875                let crate::wire::DeviceListenerOnDeviceChangedRequest {
20876                    event,
20877
20878                } = out_;
20879            }
20880
20881            ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
20882
20883            Ok(())
20884        }
20885    }
20886
20887    /// The generic type corresponding to [`FocusEvent`].
20888    pub struct FocusEvent<T0, T1> {
20889        pub event_time: T0,
20890
20891        pub focused: T1,
20892    }
20893
20894    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FocusEvent, ___E> for FocusEvent<T0, T1>
20895    where
20896        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20897        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
20898        T1: ::fidl_next::Encode<bool, ___E>,
20899    {
20900        #[inline]
20901        fn encode(
20902            self,
20903            encoder_: &mut ___E,
20904            out_: &mut ::core::mem::MaybeUninit<crate::wire::FocusEvent>,
20905            _: (),
20906        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20907            ::fidl_next::munge! {
20908                let crate::wire::FocusEvent {
20909                    event_time,
20910                    focused,
20911
20912                } = out_;
20913            }
20914
20915            ::fidl_next::Encode::encode(self.event_time, encoder_, event_time, ())?;
20916
20917            ::fidl_next::Encode::encode(self.focused, encoder_, focused, ())?;
20918
20919            Ok(())
20920        }
20921    }
20922
20923    /// The generic type corresponding to [`TextSelection`].
20924    pub struct TextSelection<T0, T1, T2> {
20925        pub base: T0,
20926
20927        pub extent: T1,
20928
20929        pub affinity: T2,
20930    }
20931
20932    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::TextSelection, ___E>
20933        for TextSelection<T0, T1, T2>
20934    where
20935        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20936        T0: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
20937        T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
20938        T2: ::fidl_next::Encode<crate::wire::TextAffinity, ___E>,
20939    {
20940        #[inline]
20941        fn encode(
20942            self,
20943            encoder_: &mut ___E,
20944            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextSelection>,
20945            _: (),
20946        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20947            ::fidl_next::munge! {
20948                let crate::wire::TextSelection {
20949                    base,
20950                    extent,
20951                    affinity,
20952
20953                } = out_;
20954            }
20955
20956            ::fidl_next::Encode::encode(self.base, encoder_, base, ())?;
20957
20958            ::fidl_next::Encode::encode(self.extent, encoder_, extent, ())?;
20959
20960            ::fidl_next::Encode::encode(self.affinity, encoder_, affinity, ())?;
20961
20962            Ok(())
20963        }
20964    }
20965
20966    /// The generic type corresponding to [`TextRange`].
20967    pub struct TextRange<T0, T1> {
20968        pub start: T0,
20969
20970        pub end: T1,
20971    }
20972
20973    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::TextRange, ___E> for TextRange<T0, T1>
20974    where
20975        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20976        T0: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
20977        T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
20978    {
20979        #[inline]
20980        fn encode(
20981            self,
20982            encoder_: &mut ___E,
20983            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextRange>,
20984            _: (),
20985        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
20986            ::fidl_next::munge! {
20987                let crate::wire::TextRange {
20988                    start,
20989                    end,
20990
20991                } = out_;
20992            }
20993
20994            ::fidl_next::Encode::encode(self.start, encoder_, start, ())?;
20995
20996            ::fidl_next::Encode::encode(self.end, encoder_, end, ())?;
20997
20998            Ok(())
20999        }
21000    }
21001
21002    /// The generic type corresponding to [`TextInputState`].
21003    pub struct TextInputState<T0, T1, T2, T3> {
21004        pub revision: T0,
21005
21006        pub text: T1,
21007
21008        pub selection: T2,
21009
21010        pub composing: T3,
21011    }
21012
21013    unsafe impl<___E, T0, T1, T2, T3>
21014        ::fidl_next::Encode<crate::wire::TextInputState<'static>, ___E>
21015        for TextInputState<T0, T1, T2, T3>
21016    where
21017        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21018        ___E: ::fidl_next::Encoder,
21019        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21020        T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
21021        T2: ::fidl_next::Encode<crate::wire::TextSelection, ___E>,
21022        T3: ::fidl_next::Encode<crate::wire::TextRange, ___E>,
21023    {
21024        #[inline]
21025        fn encode(
21026            self,
21027            encoder_: &mut ___E,
21028            out_: &mut ::core::mem::MaybeUninit<crate::wire::TextInputState<'static>>,
21029            _: (),
21030        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21031            ::fidl_next::munge! {
21032                let crate::wire::TextInputState {
21033                    revision,
21034                    text,
21035                    selection,
21036                    composing,
21037
21038                } = out_;
21039            }
21040
21041            ::fidl_next::Encode::encode(self.revision, encoder_, revision, ())?;
21042
21043            ::fidl_next::Encode::encode(self.text, encoder_, text, 4294967295)?;
21044
21045            ::fidl_next::Encode::encode(self.selection, encoder_, selection, ())?;
21046
21047            ::fidl_next::Encode::encode(self.composing, encoder_, composing, ())?;
21048
21049            Ok(())
21050        }
21051    }
21052
21053    /// The generic type corresponding to [`InputReport`].
21054    pub struct InputReport<T0, T1, T2, T3, T4, T5, T6, T7> {
21055        pub event_time: T0,
21056
21057        pub keyboard: T1,
21058
21059        pub media_buttons: T2,
21060
21061        pub mouse: T3,
21062
21063        pub stylus: T4,
21064
21065        pub touchscreen: T5,
21066
21067        pub sensor: T6,
21068
21069        pub trace_id: T7,
21070    }
21071
21072    unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7>
21073        ::fidl_next::Encode<crate::wire::InputReport<'static>, ___E>
21074        for InputReport<T0, T1, T2, T3, T4, T5, T6, T7>
21075    where
21076        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21077        ___E: ::fidl_next::Encoder,
21078        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
21079        T1: ::fidl_next::Encode<
21080                ::fidl_next::wire::Box<'static, crate::wire::KeyboardReport<'static>>,
21081                ___E,
21082            >,
21083        T2: ::fidl_next::Encode<
21084                ::fidl_next::wire::Box<'static, crate::wire::MediaButtonsReport>,
21085                ___E,
21086            >,
21087        T3: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::MouseReport>, ___E>,
21088        T4: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::StylusReport>, ___E>,
21089        T5: ::fidl_next::Encode<
21090                ::fidl_next::wire::Box<'static, crate::wire::TouchscreenReport<'static>>,
21091                ___E,
21092            >,
21093        T6: ::fidl_next::Encode<crate::wire_optional::SensorReport<'static>, ___E>,
21094        T7: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
21095    {
21096        #[inline]
21097        fn encode(
21098            self,
21099            encoder_: &mut ___E,
21100            out_: &mut ::core::mem::MaybeUninit<crate::wire::InputReport<'static>>,
21101            _: (),
21102        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21103            ::fidl_next::munge! {
21104                let crate::wire::InputReport {
21105                    event_time,
21106                    keyboard,
21107                    media_buttons,
21108                    mouse,
21109                    stylus,
21110                    touchscreen,
21111                    sensor,
21112                    trace_id,
21113
21114                } = out_;
21115            }
21116
21117            ::fidl_next::Encode::encode(self.event_time, encoder_, event_time, ())?;
21118
21119            ::fidl_next::Encode::encode(self.keyboard, encoder_, keyboard, ())?;
21120
21121            ::fidl_next::Encode::encode(self.media_buttons, encoder_, media_buttons, ())?;
21122
21123            ::fidl_next::Encode::encode(self.mouse, encoder_, mouse, ())?;
21124
21125            ::fidl_next::Encode::encode(self.stylus, encoder_, stylus, ())?;
21126
21127            ::fidl_next::Encode::encode(self.touchscreen, encoder_, touchscreen, ())?;
21128
21129            ::fidl_next::Encode::encode(self.sensor, encoder_, sensor, ())?;
21130
21131            ::fidl_next::Encode::encode(self.trace_id, encoder_, trace_id, ())?;
21132
21133            Ok(())
21134        }
21135    }
21136
21137    /// The generic type corresponding to [`InputDeviceDispatchReportRequest`].
21138    pub struct InputDeviceDispatchReportRequest<T0> {
21139        pub report: T0,
21140    }
21141
21142    unsafe impl<___E, T0>
21143        ::fidl_next::Encode<crate::wire::InputDeviceDispatchReportRequest<'static>, ___E>
21144        for InputDeviceDispatchReportRequest<T0>
21145    where
21146        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21147        ___E: ::fidl_next::Encoder,
21148        T0: ::fidl_next::Encode<crate::wire::InputReport<'static>, ___E>,
21149    {
21150        #[inline]
21151        fn encode(
21152            self,
21153            encoder_: &mut ___E,
21154            out_: &mut ::core::mem::MaybeUninit<
21155                crate::wire::InputDeviceDispatchReportRequest<'static>,
21156            >,
21157            _: (),
21158        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21159            ::fidl_next::munge! {
21160                let crate::wire::InputDeviceDispatchReportRequest {
21161                    report,
21162
21163                } = out_;
21164            }
21165
21166            ::fidl_next::Encode::encode(self.report, encoder_, report, ())?;
21167
21168            Ok(())
21169        }
21170    }
21171
21172    /// The generic type corresponding to [`InputMethodEditorSetStateRequest`].
21173    pub struct InputMethodEditorSetStateRequest<T0> {
21174        pub state: T0,
21175    }
21176
21177    unsafe impl<___E, T0>
21178        ::fidl_next::Encode<crate::wire::InputMethodEditorSetStateRequest<'static>, ___E>
21179        for InputMethodEditorSetStateRequest<T0>
21180    where
21181        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21182        ___E: ::fidl_next::Encoder,
21183        T0: ::fidl_next::Encode<crate::wire::TextInputState<'static>, ___E>,
21184    {
21185        #[inline]
21186        fn encode(
21187            self,
21188            encoder_: &mut ___E,
21189            out_: &mut ::core::mem::MaybeUninit<
21190                crate::wire::InputMethodEditorSetStateRequest<'static>,
21191            >,
21192            _: (),
21193        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21194            ::fidl_next::munge! {
21195                let crate::wire::InputMethodEditorSetStateRequest {
21196                    state,
21197
21198                } = out_;
21199            }
21200
21201            ::fidl_next::Encode::encode(self.state, encoder_, state, ())?;
21202
21203            Ok(())
21204        }
21205    }
21206
21207    /// The generic type corresponding to [`InputMethodEditorSetKeyboardTypeRequest`].
21208    pub struct InputMethodEditorSetKeyboardTypeRequest<T0> {
21209        pub keyboard_type: T0,
21210    }
21211
21212    unsafe impl<___E, T0>
21213        ::fidl_next::Encode<crate::wire::InputMethodEditorSetKeyboardTypeRequest, ___E>
21214        for InputMethodEditorSetKeyboardTypeRequest<T0>
21215    where
21216        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21217        T0: ::fidl_next::Encode<crate::wire::KeyboardType, ___E>,
21218    {
21219        #[inline]
21220        fn encode(
21221            self,
21222            encoder_: &mut ___E,
21223            out_: &mut ::core::mem::MaybeUninit<
21224                crate::wire::InputMethodEditorSetKeyboardTypeRequest,
21225            >,
21226            _: (),
21227        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21228            ::fidl_next::munge! {
21229                let crate::wire::InputMethodEditorSetKeyboardTypeRequest {
21230                    keyboard_type,
21231
21232                } = out_;
21233            }
21234
21235            ::fidl_next::Encode::encode(self.keyboard_type, encoder_, keyboard_type, ())?;
21236
21237            Ok(())
21238        }
21239    }
21240
21241    /// The generic type corresponding to [`InputMethodEditorDispatchKey3Response`].
21242    pub struct InputMethodEditorDispatchKey3Response<T0> {
21243        pub handled: T0,
21244    }
21245
21246    unsafe impl<___E, T0>
21247        ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Response, ___E>
21248        for InputMethodEditorDispatchKey3Response<T0>
21249    where
21250        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21251        T0: ::fidl_next::Encode<bool, ___E>,
21252    {
21253        #[inline]
21254        fn encode(
21255            self,
21256            encoder_: &mut ___E,
21257            out_: &mut ::core::mem::MaybeUninit<crate::wire::InputMethodEditorDispatchKey3Response>,
21258            _: (),
21259        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21260            ::fidl_next::munge! {
21261                let crate::wire::InputMethodEditorDispatchKey3Response {
21262                    handled,
21263
21264                } = out_;
21265            }
21266
21267            ::fidl_next::Encode::encode(self.handled, encoder_, handled, ())?;
21268
21269            Ok(())
21270        }
21271    }
21272
21273    /// The generic type corresponding to [`InputMethodEditorInjectInputRequest`].
21274    pub struct InputMethodEditorInjectInputRequest<T0> {
21275        pub event: T0,
21276    }
21277
21278    unsafe impl<___E, T0>
21279        ::fidl_next::Encode<crate::wire::InputMethodEditorInjectInputRequest<'static>, ___E>
21280        for InputMethodEditorInjectInputRequest<T0>
21281    where
21282        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21283        ___E: ::fidl_next::Encoder,
21284        T0: ::fidl_next::Encode<crate::wire::InputEvent<'static>, ___E>,
21285    {
21286        #[inline]
21287        fn encode(
21288            self,
21289            encoder_: &mut ___E,
21290            out_: &mut ::core::mem::MaybeUninit<
21291                crate::wire::InputMethodEditorInjectInputRequest<'static>,
21292            >,
21293            _: (),
21294        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21295            ::fidl_next::munge! {
21296                let crate::wire::InputMethodEditorInjectInputRequest {
21297                    event,
21298
21299                } = out_;
21300            }
21301
21302            ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
21303
21304            Ok(())
21305        }
21306    }
21307
21308    /// The generic type corresponding to [`InputMethodEditorDispatchKey3Request`].
21309    pub struct InputMethodEditorDispatchKey3Request<T0> {
21310        pub event: T0,
21311    }
21312
21313    unsafe impl<___E, T0>
21314        ::fidl_next::Encode<crate::wire::InputMethodEditorDispatchKey3Request<'static>, ___E>
21315        for InputMethodEditorDispatchKey3Request<T0>
21316    where
21317        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21318        ___E: ::fidl_next::Encoder,
21319        T0: ::fidl_next::Encode<::fidl_next_common_fuchsia_ui_input3::wire::KeyEvent<'static>, ___E>,
21320    {
21321        #[inline]
21322        fn encode(
21323            self,
21324            encoder_: &mut ___E,
21325            out_: &mut ::core::mem::MaybeUninit<
21326                crate::wire::InputMethodEditorDispatchKey3Request<'static>,
21327            >,
21328            _: (),
21329        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21330            ::fidl_next::munge! {
21331                let crate::wire::InputMethodEditorDispatchKey3Request {
21332                    event,
21333
21334                } = out_;
21335            }
21336
21337            ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
21338
21339            Ok(())
21340        }
21341    }
21342
21343    /// The generic type corresponding to [`InputMethodEditorClientOnActionRequest`].
21344    pub struct InputMethodEditorClientOnActionRequest<T0> {
21345        pub action: T0,
21346    }
21347
21348    unsafe impl<___E, T0>
21349        ::fidl_next::Encode<crate::wire::InputMethodEditorClientOnActionRequest, ___E>
21350        for InputMethodEditorClientOnActionRequest<T0>
21351    where
21352        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21353        T0: ::fidl_next::Encode<crate::wire::InputMethodAction, ___E>,
21354    {
21355        #[inline]
21356        fn encode(
21357            self,
21358            encoder_: &mut ___E,
21359            out_: &mut ::core::mem::MaybeUninit<
21360                crate::wire::InputMethodEditorClientOnActionRequest,
21361            >,
21362            _: (),
21363        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21364            ::fidl_next::munge! {
21365                let crate::wire::InputMethodEditorClientOnActionRequest {
21366                    action,
21367
21368                } = out_;
21369            }
21370
21371            ::fidl_next::Encode::encode(self.action, encoder_, action, ())?;
21372
21373            Ok(())
21374        }
21375    }
21376
21377    /// The generic type corresponding to [`InputMethodEditorClientDidUpdateStateRequest`].
21378    pub struct InputMethodEditorClientDidUpdateStateRequest<T0, T1> {
21379        pub state: T0,
21380
21381        pub event: T1,
21382    }
21383
21384    unsafe impl<___E, T0, T1>
21385        ::fidl_next::Encode<
21386            crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
21387            ___E,
21388        > for InputMethodEditorClientDidUpdateStateRequest<T0, T1>
21389    where
21390        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21391        ___E: ::fidl_next::Encoder,
21392        T0: ::fidl_next::Encode<crate::wire::TextInputState<'static>, ___E>,
21393        T1: ::fidl_next::Encode<crate::wire_optional::InputEvent<'static>, ___E>,
21394    {
21395        #[inline]
21396        fn encode(
21397            self,
21398            encoder_: &mut ___E,
21399            out_: &mut ::core::mem::MaybeUninit<
21400                crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
21401            >,
21402            _: (),
21403        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21404            ::fidl_next::munge! {
21405                let crate::wire::InputMethodEditorClientDidUpdateStateRequest {
21406                    state,
21407                    event,
21408
21409                } = out_;
21410            }
21411
21412            ::fidl_next::Encode::encode(self.state, encoder_, state, ())?;
21413
21414            ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
21415
21416            Ok(())
21417        }
21418    }
21419
21420    /// The generic type corresponding to [`KeyboardReport`].
21421    pub struct KeyboardReport<T0> {
21422        pub pressed_keys: T0,
21423    }
21424
21425    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::KeyboardReport<'static>, ___E>
21426        for KeyboardReport<T0>
21427    where
21428        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21429        ___E: ::fidl_next::Encoder,
21430        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, ::fidl_next::wire::Uint32>, ___E>,
21431    {
21432        #[inline]
21433        fn encode(
21434            self,
21435            encoder_: &mut ___E,
21436            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardReport<'static>>,
21437            _: (),
21438        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21439            ::fidl_next::munge! {
21440                let crate::wire::KeyboardReport {
21441                    pressed_keys,
21442
21443                } = out_;
21444            }
21445
21446            ::fidl_next::Encode::encode(
21447                self.pressed_keys,
21448                encoder_,
21449                pressed_keys,
21450                (4294967295, ()),
21451            )?;
21452
21453            Ok(())
21454        }
21455    }
21456
21457    /// The generic type corresponding to [`MediaButtonsDescriptor`].
21458    pub struct MediaButtonsDescriptor<T0> {
21459        pub buttons: T0,
21460    }
21461
21462    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::MediaButtonsDescriptor, ___E>
21463        for MediaButtonsDescriptor<T0>
21464    where
21465        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21466        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21467    {
21468        #[inline]
21469        fn encode(
21470            self,
21471            encoder_: &mut ___E,
21472            out_: &mut ::core::mem::MaybeUninit<crate::wire::MediaButtonsDescriptor>,
21473            _: (),
21474        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21475            ::fidl_next::munge! {
21476                let crate::wire::MediaButtonsDescriptor {
21477                    buttons,
21478
21479                } = out_;
21480            }
21481
21482            ::fidl_next::Encode::encode(self.buttons, encoder_, buttons, ())?;
21483
21484            Ok(())
21485        }
21486    }
21487
21488    /// The generic type corresponding to [`MediaButtonsReport`].
21489    pub struct MediaButtonsReport<T0, T1, T2, T3, T4, T5> {
21490        pub volume_up: T0,
21491
21492        pub volume_down: T1,
21493
21494        pub mic_mute: T2,
21495
21496        pub reset: T3,
21497
21498        pub pause: T4,
21499
21500        pub camera_disable: T5,
21501    }
21502
21503    unsafe impl<___E, T0, T1, T2, T3, T4, T5>
21504        ::fidl_next::Encode<crate::wire::MediaButtonsReport, ___E>
21505        for MediaButtonsReport<T0, T1, T2, T3, T4, T5>
21506    where
21507        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21508        T0: ::fidl_next::Encode<bool, ___E>,
21509        T1: ::fidl_next::Encode<bool, ___E>,
21510        T2: ::fidl_next::Encode<bool, ___E>,
21511        T3: ::fidl_next::Encode<bool, ___E>,
21512        T4: ::fidl_next::Encode<bool, ___E>,
21513        T5: ::fidl_next::Encode<bool, ___E>,
21514    {
21515        #[inline]
21516        fn encode(
21517            self,
21518            encoder_: &mut ___E,
21519            out_: &mut ::core::mem::MaybeUninit<crate::wire::MediaButtonsReport>,
21520            _: (),
21521        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21522            ::fidl_next::munge! {
21523                let crate::wire::MediaButtonsReport {
21524                    volume_up,
21525                    volume_down,
21526                    mic_mute,
21527                    reset,
21528                    pause,
21529                    camera_disable,
21530
21531                } = out_;
21532            }
21533
21534            ::fidl_next::Encode::encode(self.volume_up, encoder_, volume_up, ())?;
21535
21536            ::fidl_next::Encode::encode(self.volume_down, encoder_, volume_down, ())?;
21537
21538            ::fidl_next::Encode::encode(self.mic_mute, encoder_, mic_mute, ())?;
21539
21540            ::fidl_next::Encode::encode(self.reset, encoder_, reset, ())?;
21541
21542            ::fidl_next::Encode::encode(self.pause, encoder_, pause, ())?;
21543
21544            ::fidl_next::Encode::encode(self.camera_disable, encoder_, camera_disable, ())?;
21545
21546            Ok(())
21547        }
21548    }
21549
21550    /// The generic type corresponding to [`MouseReport`].
21551    pub struct MouseReport<T0, T1, T2, T3, T4> {
21552        pub rel_x: T0,
21553
21554        pub rel_y: T1,
21555
21556        pub rel_hscroll: T2,
21557
21558        pub rel_vscroll: T3,
21559
21560        pub pressed_buttons: T4,
21561    }
21562
21563    unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::MouseReport, ___E>
21564        for MouseReport<T0, T1, T2, T3, T4>
21565    where
21566        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21567        T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
21568        T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
21569        T2: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
21570        T3: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
21571        T4: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21572    {
21573        #[inline]
21574        fn encode(
21575            self,
21576            encoder_: &mut ___E,
21577            out_: &mut ::core::mem::MaybeUninit<crate::wire::MouseReport>,
21578            _: (),
21579        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21580            ::fidl_next::munge! {
21581                let crate::wire::MouseReport {
21582                    rel_x,
21583                    rel_y,
21584                    rel_hscroll,
21585                    rel_vscroll,
21586                    pressed_buttons,
21587
21588                } = out_;
21589            }
21590
21591            ::fidl_next::Encode::encode(self.rel_x, encoder_, rel_x, ())?;
21592
21593            ::fidl_next::Encode::encode(self.rel_y, encoder_, rel_y, ())?;
21594
21595            ::fidl_next::Encode::encode(self.rel_hscroll, encoder_, rel_hscroll, ())?;
21596
21597            ::fidl_next::Encode::encode(self.rel_vscroll, encoder_, rel_vscroll, ())?;
21598
21599            ::fidl_next::Encode::encode(self.pressed_buttons, encoder_, pressed_buttons, ())?;
21600
21601            Ok(())
21602        }
21603    }
21604
21605    /// The generic type corresponding to [`StylusDescriptor`].
21606    pub struct StylusDescriptor<T0, T1, T2, T3, T4> {
21607        pub x: T0,
21608
21609        pub y: T1,
21610
21611        pub pressure: T2,
21612
21613        pub is_invertible: T3,
21614
21615        pub buttons: T4,
21616    }
21617
21618    unsafe impl<___E, T0, T1, T2, T3, T4>
21619        ::fidl_next::Encode<crate::wire::StylusDescriptor<'static>, ___E>
21620        for StylusDescriptor<T0, T1, T2, T3, T4>
21621    where
21622        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21623        ___E: ::fidl_next::Encoder,
21624        T0: ::fidl_next::Encode<crate::wire::Axis, ___E>,
21625        T1: ::fidl_next::Encode<crate::wire::Axis, ___E>,
21626        T2: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::Axis>, ___E>,
21627        T3: ::fidl_next::Encode<bool, ___E>,
21628        T4: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21629    {
21630        #[inline]
21631        fn encode(
21632            self,
21633            encoder_: &mut ___E,
21634            out_: &mut ::core::mem::MaybeUninit<crate::wire::StylusDescriptor<'static>>,
21635            _: (),
21636        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21637            ::fidl_next::munge! {
21638                let crate::wire::StylusDescriptor {
21639                    x,
21640                    y,
21641                    pressure,
21642                    is_invertible,
21643                    buttons,
21644
21645                } = out_;
21646            }
21647
21648            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
21649
21650            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
21651
21652            ::fidl_next::Encode::encode(self.pressure, encoder_, pressure, ())?;
21653
21654            ::fidl_next::Encode::encode(self.is_invertible, encoder_, is_invertible, ())?;
21655
21656            ::fidl_next::Encode::encode(self.buttons, encoder_, buttons, ())?;
21657
21658            Ok(())
21659        }
21660    }
21661
21662    /// The generic type corresponding to [`StylusReport`].
21663    pub struct StylusReport<T0, T1, T2, T3, T4, T5, T6> {
21664        pub x: T0,
21665
21666        pub y: T1,
21667
21668        pub pressure: T2,
21669
21670        pub is_in_contact: T3,
21671
21672        pub in_range: T4,
21673
21674        pub is_inverted: T5,
21675
21676        pub pressed_buttons: T6,
21677    }
21678
21679    unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
21680        ::fidl_next::Encode<crate::wire::StylusReport, ___E>
21681        for StylusReport<T0, T1, T2, T3, T4, T5, T6>
21682    where
21683        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21684        T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
21685        T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
21686        T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21687        T3: ::fidl_next::Encode<bool, ___E>,
21688        T4: ::fidl_next::Encode<bool, ___E>,
21689        T5: ::fidl_next::Encode<bool, ___E>,
21690        T6: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21691    {
21692        #[inline]
21693        fn encode(
21694            self,
21695            encoder_: &mut ___E,
21696            out_: &mut ::core::mem::MaybeUninit<crate::wire::StylusReport>,
21697            _: (),
21698        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21699            ::fidl_next::munge! {
21700                let crate::wire::StylusReport {
21701                    x,
21702                    y,
21703                    pressure,
21704                    is_in_contact,
21705                    in_range,
21706                    is_inverted,
21707                    pressed_buttons,
21708
21709                } = out_;
21710            }
21711
21712            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
21713
21714            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
21715
21716            ::fidl_next::Encode::encode(self.pressure, encoder_, pressure, ())?;
21717
21718            ::fidl_next::Encode::encode(self.is_in_contact, encoder_, is_in_contact, ())?;
21719
21720            ::fidl_next::Encode::encode(self.in_range, encoder_, in_range, ())?;
21721
21722            ::fidl_next::Encode::encode(self.is_inverted, encoder_, is_inverted, ())?;
21723
21724            ::fidl_next::Encode::encode(self.pressed_buttons, encoder_, pressed_buttons, ())?;
21725
21726            Ok(())
21727        }
21728    }
21729
21730    /// The generic type corresponding to [`Touch`].
21731    pub struct Touch<T0, T1, T2, T3, T4> {
21732        pub finger_id: T0,
21733
21734        pub x: T1,
21735
21736        pub y: T2,
21737
21738        pub width: T3,
21739
21740        pub height: T4,
21741    }
21742
21743    unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::Touch, ___E>
21744        for Touch<T0, T1, T2, T3, T4>
21745    where
21746        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21747        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21748        T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
21749        T2: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
21750        T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21751        T4: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21752    {
21753        #[inline]
21754        fn encode(
21755            self,
21756            encoder_: &mut ___E,
21757            out_: &mut ::core::mem::MaybeUninit<crate::wire::Touch>,
21758            _: (),
21759        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21760            ::fidl_next::munge! {
21761                let crate::wire::Touch {
21762                    finger_id,
21763                    x,
21764                    y,
21765                    width,
21766                    height,
21767
21768                } = out_;
21769            }
21770
21771            ::fidl_next::Encode::encode(self.finger_id, encoder_, finger_id, ())?;
21772
21773            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
21774
21775            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
21776
21777            ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
21778
21779            ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
21780
21781            Ok(())
21782        }
21783    }
21784
21785    /// The generic type corresponding to [`TouchscreenDescriptor`].
21786    pub struct TouchscreenDescriptor<T0, T1, T2> {
21787        pub x: T0,
21788
21789        pub y: T1,
21790
21791        pub max_finger_id: T2,
21792    }
21793
21794    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::TouchscreenDescriptor, ___E>
21795        for TouchscreenDescriptor<T0, T1, T2>
21796    where
21797        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21798        T0: ::fidl_next::Encode<crate::wire::Axis, ___E>,
21799        T1: ::fidl_next::Encode<crate::wire::Axis, ___E>,
21800        T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
21801    {
21802        #[inline]
21803        fn encode(
21804            self,
21805            encoder_: &mut ___E,
21806            out_: &mut ::core::mem::MaybeUninit<crate::wire::TouchscreenDescriptor>,
21807            _: (),
21808        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21809            ::fidl_next::munge! {
21810                let crate::wire::TouchscreenDescriptor {
21811                    x,
21812                    y,
21813                    max_finger_id,
21814
21815                } = out_;
21816            }
21817
21818            ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
21819
21820            ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
21821
21822            ::fidl_next::Encode::encode(self.max_finger_id, encoder_, max_finger_id, ())?;
21823
21824            Ok(())
21825        }
21826    }
21827
21828    /// The generic type corresponding to [`TouchscreenReport`].
21829    pub struct TouchscreenReport<T0> {
21830        pub touches: T0,
21831    }
21832
21833    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TouchscreenReport<'static>, ___E>
21834        for TouchscreenReport<T0>
21835    where
21836        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21837        ___E: ::fidl_next::Encoder,
21838        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, crate::wire::Touch>, ___E>,
21839    {
21840        #[inline]
21841        fn encode(
21842            self,
21843            encoder_: &mut ___E,
21844            out_: &mut ::core::mem::MaybeUninit<crate::wire::TouchscreenReport<'static>>,
21845            _: (),
21846        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
21847            ::fidl_next::munge! {
21848                let crate::wire::TouchscreenReport {
21849                    touches,
21850
21851                } = out_;
21852            }
21853
21854            ::fidl_next::Encode::encode(self.touches, encoder_, touches, (4294967295, ()))?;
21855
21856            Ok(())
21857        }
21858    }
21859}
21860
21861pub use self::natural::*;
21862
21863pub const CONSUMER_CONTROL_MAX_NUM_BUTTONS: u32 = 255 as u32;
21864
21865pub const MAX_NAME_LENGTH: u32 = 256 as u32;
21866
21867pub const MOUSE_MAX_NUM_BUTTONS: u32 = 32 as u32;
21868
21869pub const SENSOR_MAX_VALUES: u32 = 100 as u32;
21870
21871pub const TOUCH_MAX_CONTACTS: u32 = 10 as u32;
21872
21873pub const TOUCH_MAX_NUM_BUTTONS: u32 = 10 as u32;
21874
21875pub const KEYBOARD_MAX_NUM_KEYS: u32 = 256 as u32;
21876
21877pub const KEYBOARD_MAX_NUM_LEDS: u32 = 256 as u32;
21878
21879/// The type corresponding to the DeviceIterator protocol.
21880#[doc = " Protocol for iterating over the initial set of active devices.\n\n This iterator is returned upon registering a listener and is used to bootstrap\n the client\'s state with the devices that are already present.\n"]
21881#[derive(PartialEq, Debug)]
21882pub struct DeviceIterator;
21883
21884#[cfg(target_os = "fuchsia")]
21885impl ::fidl_next::HasTransport for DeviceIterator {
21886    type Transport = ::fidl_next::fuchsia::zx::Channel;
21887}
21888
21889pub mod device_iterator {
21890    pub mod prelude {
21891        pub use crate::{
21892            DeviceIterator, DeviceIteratorClientHandler, DeviceIteratorLocalClientHandler,
21893            DeviceIteratorLocalServerHandler, DeviceIteratorServerHandler, device_iterator,
21894        };
21895
21896        pub use crate::natural::DeviceIteratorGetNextResponse;
21897    }
21898
21899    pub struct GetNext;
21900
21901    impl ::fidl_next::Method for GetNext {
21902        const ORDINAL: u64 = 8779028446211724796;
21903        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
21904            ::fidl_next::protocol::Flexibility::Strict;
21905
21906        type Protocol = crate::DeviceIterator;
21907
21908        type Request = ::fidl_next::wire::EmptyMessageBody;
21909    }
21910
21911    impl ::fidl_next::TwoWayMethod for GetNext {
21912        type Response =
21913            ::fidl_next::wire::Strict<crate::wire::DeviceIteratorGetNextResponse<'static>>;
21914    }
21915
21916    impl<___R> ::fidl_next::Respond<___R> for GetNext {
21917        type Output = ::fidl_next::Strict<crate::generic::DeviceIteratorGetNextResponse<___R>>;
21918
21919        fn respond(response: ___R) -> Self::Output {
21920            ::fidl_next::Strict(crate::generic::DeviceIteratorGetNextResponse { devices: response })
21921        }
21922    }
21923
21924    mod ___detail {
21925        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DeviceIterator
21926        where
21927            ___T: ::fidl_next::Transport,
21928        {
21929            type Client = DeviceIteratorClient<___T>;
21930            type Server = DeviceIteratorServer<___T>;
21931        }
21932
21933        /// The client for the `DeviceIterator` protocol.
21934        #[repr(transparent)]
21935        pub struct DeviceIteratorClient<___T: ::fidl_next::Transport> {
21936            #[allow(dead_code)]
21937            client: ::fidl_next::protocol::Client<___T>,
21938        }
21939
21940        impl<___T> DeviceIteratorClient<___T>
21941        where
21942            ___T: ::fidl_next::Transport,
21943        {
21944            #[doc = " Returns the next batch of active devices.\n\n Returns an empty vector when all existing devices have been iterated\n through. The client should then close this channel and rely on the\n `DeviceListener` for subsequent events.\n"]
21945            pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
21946                ::fidl_next::TwoWayFuture::from_untyped(
21947                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
21948                        8779028446211724796,
21949                        <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
21950                        (),
21951                    ),
21952                )
21953            }
21954        }
21955
21956        /// The server for the `DeviceIterator` protocol.
21957        #[repr(transparent)]
21958        pub struct DeviceIteratorServer<___T: ::fidl_next::Transport> {
21959            server: ::fidl_next::protocol::Server<___T>,
21960        }
21961
21962        impl<___T> DeviceIteratorServer<___T> where ___T: ::fidl_next::Transport {}
21963    }
21964}
21965
21966#[diagnostic::on_unimplemented(
21967    note = "If {Self} implements the non-local DeviceIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
21968)]
21969
21970/// A client handler for the DeviceIterator protocol.
21971///
21972/// See [`DeviceIterator`] for more details.
21973pub trait DeviceIteratorLocalClientHandler<
21974    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
21975    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
21976>
21977{
21978}
21979
21980impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DeviceIterator
21981where
21982    ___H: DeviceIteratorLocalClientHandler<___T>,
21983    ___T: ::fidl_next::Transport,
21984{
21985    async fn on_event(
21986        handler: &mut ___H,
21987        mut message: ::fidl_next::Message<___T>,
21988    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
21989        match *message.header().ordinal {
21990            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
21991        }
21992    }
21993}
21994
21995#[diagnostic::on_unimplemented(
21996    note = "If {Self} implements the non-local DeviceIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
21997)]
21998
21999/// A server handler for the DeviceIterator protocol.
22000///
22001/// See [`DeviceIterator`] for more details.
22002pub trait DeviceIteratorLocalServerHandler<
22003    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22004    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22005>
22006{
22007    #[doc = " Returns the next batch of active devices.\n\n Returns an empty vector when all existing devices have been iterated\n through. The client should then close this channel and rely on the\n `DeviceListener` for subsequent events.\n"]
22008    fn get_next(
22009        &mut self,
22010
22011        responder: ::fidl_next::Responder<device_iterator::GetNext, ___T>,
22012    ) -> impl ::core::future::Future<Output = ()>;
22013}
22014
22015impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DeviceIterator
22016where
22017    ___H: DeviceIteratorLocalServerHandler<___T>,
22018    ___T: ::fidl_next::Transport,
22019{
22020    async fn on_one_way(
22021        handler: &mut ___H,
22022        mut message: ::fidl_next::Message<___T>,
22023    ) -> ::core::result::Result<
22024        (),
22025        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22026    > {
22027        match *message.header().ordinal {
22028            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22029        }
22030    }
22031
22032    async fn on_two_way(
22033        handler: &mut ___H,
22034        mut message: ::fidl_next::Message<___T>,
22035        responder: ::fidl_next::protocol::Responder<___T>,
22036    ) -> ::core::result::Result<
22037        (),
22038        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22039    > {
22040        match *message.header().ordinal {
22041            8779028446211724796 => {
22042                let responder = ::fidl_next::Responder::from_untyped(responder);
22043
22044                handler.get_next(responder).await;
22045                Ok(())
22046            }
22047
22048            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22049        }
22050    }
22051}
22052
22053/// A client handler for the DeviceIterator protocol.
22054///
22055/// See [`DeviceIterator`] for more details.
22056pub trait DeviceIteratorClientHandler<
22057    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22058    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22059>
22060{
22061}
22062
22063impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DeviceIterator
22064where
22065    ___H: DeviceIteratorClientHandler<___T> + ::core::marker::Send,
22066    ___T: ::fidl_next::Transport,
22067{
22068    async fn on_event(
22069        handler: &mut ___H,
22070        mut message: ::fidl_next::Message<___T>,
22071    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
22072        match *message.header().ordinal {
22073            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22074        }
22075    }
22076}
22077
22078/// A server handler for the DeviceIterator protocol.
22079///
22080/// See [`DeviceIterator`] for more details.
22081pub trait DeviceIteratorServerHandler<
22082    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22083    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22084>
22085{
22086    #[doc = " Returns the next batch of active devices.\n\n Returns an empty vector when all existing devices have been iterated\n through. The client should then close this channel and rely on the\n `DeviceListener` for subsequent events.\n"]
22087    fn get_next(
22088        &mut self,
22089
22090        responder: ::fidl_next::Responder<device_iterator::GetNext, ___T>,
22091    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
22092}
22093
22094impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DeviceIterator
22095where
22096    ___H: DeviceIteratorServerHandler<___T> + ::core::marker::Send,
22097    ___T: ::fidl_next::Transport,
22098{
22099    async fn on_one_way(
22100        handler: &mut ___H,
22101        mut message: ::fidl_next::Message<___T>,
22102    ) -> ::core::result::Result<
22103        (),
22104        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22105    > {
22106        match *message.header().ordinal {
22107            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22108        }
22109    }
22110
22111    async fn on_two_way(
22112        handler: &mut ___H,
22113        mut message: ::fidl_next::Message<___T>,
22114        responder: ::fidl_next::protocol::Responder<___T>,
22115    ) -> ::core::result::Result<
22116        (),
22117        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22118    > {
22119        match *message.header().ordinal {
22120            8779028446211724796 => {
22121                let responder = ::fidl_next::Responder::from_untyped(responder);
22122
22123                handler.get_next(responder).await;
22124                Ok(())
22125            }
22126
22127            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22128        }
22129    }
22130}
22131
22132impl<___T> DeviceIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents where
22133    ___T: ::fidl_next::Transport
22134{
22135}
22136
22137impl<___H, ___T> DeviceIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
22138where
22139    ___H: DeviceIteratorClientHandler<___T>,
22140    ___T: ::fidl_next::Transport,
22141{
22142}
22143
22144impl<___H, ___T> DeviceIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
22145where
22146    ___H: DeviceIteratorServerHandler<___T>,
22147    ___T: ::fidl_next::Transport,
22148{
22149    async fn get_next(
22150        &mut self,
22151
22152        responder: ::fidl_next::Responder<device_iterator::GetNext, ___T>,
22153    ) {
22154        ___H::get_next(&mut self.0, responder).await
22155    }
22156}
22157
22158/// The type corresponding to the DeviceListener protocol.
22159#[doc = " Callback protocol implemented by clients to receive live device change events.\n\n Events are sent to this listener only for changes occurring after registration\n is complete.\n"]
22160#[derive(PartialEq, Debug)]
22161pub struct DeviceListener;
22162
22163#[cfg(target_os = "fuchsia")]
22164impl ::fidl_next::HasTransport for DeviceListener {
22165    type Transport = ::fidl_next::fuchsia::zx::Channel;
22166}
22167
22168pub mod device_listener {
22169    pub mod prelude {
22170        pub use crate::{
22171            DeviceListener, DeviceListenerClientHandler, DeviceListenerLocalClientHandler,
22172            DeviceListenerLocalServerHandler, DeviceListenerServerHandler, device_listener,
22173        };
22174
22175        pub use crate::natural::DeviceListenerOnDeviceChangedRequest;
22176    }
22177
22178    pub struct OnDeviceChanged;
22179
22180    impl ::fidl_next::Method for OnDeviceChanged {
22181        const ORDINAL: u64 = 2594736031667364228;
22182        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
22183            ::fidl_next::protocol::Flexibility::Strict;
22184
22185        type Protocol = crate::DeviceListener;
22186
22187        type Request = crate::wire::DeviceListenerOnDeviceChangedRequest<'static>;
22188    }
22189
22190    mod ___detail {
22191        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DeviceListener
22192        where
22193            ___T: ::fidl_next::Transport,
22194        {
22195            type Client = DeviceListenerClient<___T>;
22196            type Server = DeviceListenerServer<___T>;
22197        }
22198
22199        /// The client for the `DeviceListener` protocol.
22200        #[repr(transparent)]
22201        pub struct DeviceListenerClient<___T: ::fidl_next::Transport> {
22202            #[allow(dead_code)]
22203            client: ::fidl_next::protocol::Client<___T>,
22204        }
22205
22206        impl<___T> DeviceListenerClient<___T>
22207        where
22208            ___T: ::fidl_next::Transport,
22209        {
22210            #[doc = " Called when a device change event occurs.\n"]
22211            pub fn on_device_changed(
22212                &self,
22213
22214                event: impl ::fidl_next::Encode<
22215                    crate::wire::DeviceEvent<'static>,
22216                    <___T as ::fidl_next::Transport>::SendBuffer,
22217                >,
22218            ) -> ::fidl_next::SendFuture<'_, ___T>
22219            where
22220                <___T as ::fidl_next::Transport>::SendBuffer:
22221                    ::fidl_next::encoder::InternalHandleEncoder,
22222                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
22223            {
22224                self.on_device_changed_with(crate::generic::DeviceListenerOnDeviceChangedRequest {
22225                    event,
22226                })
22227            }
22228
22229            #[doc = " Called when a device change event occurs.\n"]
22230            pub fn on_device_changed_with<___R>(
22231                &self,
22232                request: ___R,
22233            ) -> ::fidl_next::SendFuture<'_, ___T>
22234            where
22235                ___R: ::fidl_next::Encode<
22236                        crate::wire::DeviceListenerOnDeviceChangedRequest<'static>,
22237                        <___T as ::fidl_next::Transport>::SendBuffer,
22238                    >,
22239            {
22240                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
22241                    2594736031667364228,
22242                    <super::OnDeviceChanged as ::fidl_next::Method>::FLEXIBILITY,
22243                    request,
22244                ))
22245            }
22246        }
22247
22248        /// The server for the `DeviceListener` protocol.
22249        #[repr(transparent)]
22250        pub struct DeviceListenerServer<___T: ::fidl_next::Transport> {
22251            server: ::fidl_next::protocol::Server<___T>,
22252        }
22253
22254        impl<___T> DeviceListenerServer<___T> where ___T: ::fidl_next::Transport {}
22255    }
22256}
22257
22258#[diagnostic::on_unimplemented(
22259    note = "If {Self} implements the non-local DeviceListenerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
22260)]
22261
22262/// A client handler for the DeviceListener protocol.
22263///
22264/// See [`DeviceListener`] for more details.
22265pub trait DeviceListenerLocalClientHandler<
22266    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22267    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22268>
22269{
22270}
22271
22272impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DeviceListener
22273where
22274    ___H: DeviceListenerLocalClientHandler<___T>,
22275    ___T: ::fidl_next::Transport,
22276{
22277    async fn on_event(
22278        handler: &mut ___H,
22279        mut message: ::fidl_next::Message<___T>,
22280    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
22281        match *message.header().ordinal {
22282            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22283        }
22284    }
22285}
22286
22287#[diagnostic::on_unimplemented(
22288    note = "If {Self} implements the non-local DeviceListenerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
22289)]
22290
22291/// A server handler for the DeviceListener protocol.
22292///
22293/// See [`DeviceListener`] for more details.
22294pub trait DeviceListenerLocalServerHandler<
22295    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22296    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22297>
22298{
22299    #[doc = " Called when a device change event occurs.\n"]
22300    fn on_device_changed(
22301        &mut self,
22302
22303        request: ::fidl_next::Request<device_listener::OnDeviceChanged, ___T>,
22304    ) -> impl ::core::future::Future<Output = ()>;
22305}
22306
22307impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DeviceListener
22308where
22309    ___H: DeviceListenerLocalServerHandler<___T>,
22310    ___T: ::fidl_next::Transport,
22311    for<'de> crate::wire::DeviceListenerOnDeviceChangedRequest<'de>: ::fidl_next::Decode<
22312            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
22313            Constraint = (),
22314        >,
22315{
22316    async fn on_one_way(
22317        handler: &mut ___H,
22318        mut message: ::fidl_next::Message<___T>,
22319    ) -> ::core::result::Result<
22320        (),
22321        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22322    > {
22323        match *message.header().ordinal {
22324            2594736031667364228 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
22325                Ok(decoded) => {
22326                    handler.on_device_changed(::fidl_next::Request::from_decoded(decoded)).await;
22327                    Ok(())
22328                }
22329                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
22330                    ordinal: 2594736031667364228,
22331                    error,
22332                }),
22333            },
22334
22335            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22336        }
22337    }
22338
22339    async fn on_two_way(
22340        handler: &mut ___H,
22341        mut message: ::fidl_next::Message<___T>,
22342        responder: ::fidl_next::protocol::Responder<___T>,
22343    ) -> ::core::result::Result<
22344        (),
22345        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22346    > {
22347        match *message.header().ordinal {
22348            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22349        }
22350    }
22351}
22352
22353/// A client handler for the DeviceListener protocol.
22354///
22355/// See [`DeviceListener`] for more details.
22356pub trait DeviceListenerClientHandler<
22357    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22358    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22359>
22360{
22361}
22362
22363impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DeviceListener
22364where
22365    ___H: DeviceListenerClientHandler<___T> + ::core::marker::Send,
22366    ___T: ::fidl_next::Transport,
22367{
22368    async fn on_event(
22369        handler: &mut ___H,
22370        mut message: ::fidl_next::Message<___T>,
22371    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
22372        match *message.header().ordinal {
22373            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22374        }
22375    }
22376}
22377
22378/// A server handler for the DeviceListener protocol.
22379///
22380/// See [`DeviceListener`] for more details.
22381pub trait DeviceListenerServerHandler<
22382    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22383    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22384>
22385{
22386    #[doc = " Called when a device change event occurs.\n"]
22387    fn on_device_changed(
22388        &mut self,
22389
22390        request: ::fidl_next::Request<device_listener::OnDeviceChanged, ___T>,
22391    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
22392}
22393
22394impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DeviceListener
22395where
22396    ___H: DeviceListenerServerHandler<___T> + ::core::marker::Send,
22397    ___T: ::fidl_next::Transport,
22398    for<'de> crate::wire::DeviceListenerOnDeviceChangedRequest<'de>: ::fidl_next::Decode<
22399            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
22400            Constraint = (),
22401        >,
22402{
22403    async fn on_one_way(
22404        handler: &mut ___H,
22405        mut message: ::fidl_next::Message<___T>,
22406    ) -> ::core::result::Result<
22407        (),
22408        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22409    > {
22410        match *message.header().ordinal {
22411            2594736031667364228 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
22412                Ok(decoded) => {
22413                    handler.on_device_changed(::fidl_next::Request::from_decoded(decoded)).await;
22414                    Ok(())
22415                }
22416                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
22417                    ordinal: 2594736031667364228,
22418                    error,
22419                }),
22420            },
22421
22422            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22423        }
22424    }
22425
22426    async fn on_two_way(
22427        handler: &mut ___H,
22428        mut message: ::fidl_next::Message<___T>,
22429        responder: ::fidl_next::protocol::Responder<___T>,
22430    ) -> ::core::result::Result<
22431        (),
22432        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22433    > {
22434        match *message.header().ordinal {
22435            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22436        }
22437    }
22438}
22439
22440impl<___T> DeviceListenerClientHandler<___T> for ::fidl_next::IgnoreEvents where
22441    ___T: ::fidl_next::Transport
22442{
22443}
22444
22445impl<___H, ___T> DeviceListenerLocalClientHandler<___T> for ::fidl_next::Local<___H>
22446where
22447    ___H: DeviceListenerClientHandler<___T>,
22448    ___T: ::fidl_next::Transport,
22449{
22450}
22451
22452impl<___H, ___T> DeviceListenerLocalServerHandler<___T> for ::fidl_next::Local<___H>
22453where
22454    ___H: DeviceListenerServerHandler<___T>,
22455    ___T: ::fidl_next::Transport,
22456{
22457    async fn on_device_changed(
22458        &mut self,
22459
22460        request: ::fidl_next::Request<device_listener::OnDeviceChanged, ___T>,
22461    ) {
22462        ___H::on_device_changed(&mut self.0, request).await
22463    }
22464}
22465
22466/// The type corresponding to the InputDevice protocol.
22467#[derive(PartialEq, Debug)]
22468pub struct InputDevice;
22469
22470#[cfg(target_os = "fuchsia")]
22471impl ::fidl_next::HasTransport for InputDevice {
22472    type Transport = ::fidl_next::fuchsia::zx::Channel;
22473}
22474
22475pub mod input_device {
22476    pub mod prelude {
22477        pub use crate::{
22478            InputDevice, InputDeviceClientHandler, InputDeviceLocalClientHandler,
22479            InputDeviceLocalServerHandler, InputDeviceServerHandler, input_device,
22480        };
22481
22482        pub use crate::natural::InputDeviceDispatchReportRequest;
22483    }
22484
22485    pub struct DispatchReport;
22486
22487    impl ::fidl_next::Method for DispatchReport {
22488        const ORDINAL: u64 = 9143281205184959647;
22489        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
22490            ::fidl_next::protocol::Flexibility::Strict;
22491
22492        type Protocol = crate::InputDevice;
22493
22494        type Request = crate::wire::InputDeviceDispatchReportRequest<'static>;
22495    }
22496
22497    mod ___detail {
22498        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::InputDevice
22499        where
22500            ___T: ::fidl_next::Transport,
22501        {
22502            type Client = InputDeviceClient<___T>;
22503            type Server = InputDeviceServer<___T>;
22504        }
22505
22506        /// The client for the `InputDevice` protocol.
22507        #[repr(transparent)]
22508        pub struct InputDeviceClient<___T: ::fidl_next::Transport> {
22509            #[allow(dead_code)]
22510            client: ::fidl_next::protocol::Client<___T>,
22511        }
22512
22513        impl<___T> InputDeviceClient<___T>
22514        where
22515            ___T: ::fidl_next::Transport,
22516        {
22517            #[doc = " Dispatch an `InputReport` from the device `token`\n"]
22518            pub fn dispatch_report(
22519                &self,
22520
22521                report: impl ::fidl_next::Encode<
22522                    crate::wire::InputReport<'static>,
22523                    <___T as ::fidl_next::Transport>::SendBuffer,
22524                >,
22525            ) -> ::fidl_next::SendFuture<'_, ___T>
22526            where
22527                <___T as ::fidl_next::Transport>::SendBuffer:
22528                    ::fidl_next::encoder::InternalHandleEncoder,
22529                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
22530            {
22531                self.dispatch_report_with(crate::generic::InputDeviceDispatchReportRequest {
22532                    report,
22533                })
22534            }
22535
22536            #[doc = " Dispatch an `InputReport` from the device `token`\n"]
22537            pub fn dispatch_report_with<___R>(
22538                &self,
22539                request: ___R,
22540            ) -> ::fidl_next::SendFuture<'_, ___T>
22541            where
22542                ___R: ::fidl_next::Encode<
22543                        crate::wire::InputDeviceDispatchReportRequest<'static>,
22544                        <___T as ::fidl_next::Transport>::SendBuffer,
22545                    >,
22546            {
22547                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
22548                    9143281205184959647,
22549                    <super::DispatchReport as ::fidl_next::Method>::FLEXIBILITY,
22550                    request,
22551                ))
22552            }
22553        }
22554
22555        /// The server for the `InputDevice` protocol.
22556        #[repr(transparent)]
22557        pub struct InputDeviceServer<___T: ::fidl_next::Transport> {
22558            server: ::fidl_next::protocol::Server<___T>,
22559        }
22560
22561        impl<___T> InputDeviceServer<___T> where ___T: ::fidl_next::Transport {}
22562    }
22563}
22564
22565#[diagnostic::on_unimplemented(
22566    note = "If {Self} implements the non-local InputDeviceClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
22567)]
22568
22569/// A client handler for the InputDevice protocol.
22570///
22571/// See [`InputDevice`] for more details.
22572pub trait InputDeviceLocalClientHandler<
22573    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22574    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22575>
22576{
22577}
22578
22579impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for InputDevice
22580where
22581    ___H: InputDeviceLocalClientHandler<___T>,
22582    ___T: ::fidl_next::Transport,
22583{
22584    async fn on_event(
22585        handler: &mut ___H,
22586        mut message: ::fidl_next::Message<___T>,
22587    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
22588        match *message.header().ordinal {
22589            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22590        }
22591    }
22592}
22593
22594#[diagnostic::on_unimplemented(
22595    note = "If {Self} implements the non-local InputDeviceServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
22596)]
22597
22598/// A server handler for the InputDevice protocol.
22599///
22600/// See [`InputDevice`] for more details.
22601pub trait InputDeviceLocalServerHandler<
22602    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22603    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22604>
22605{
22606    #[doc = " Dispatch an `InputReport` from the device `token`\n"]
22607    fn dispatch_report(
22608        &mut self,
22609
22610        request: ::fidl_next::Request<input_device::DispatchReport, ___T>,
22611    ) -> impl ::core::future::Future<Output = ()>;
22612}
22613
22614impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for InputDevice
22615where
22616    ___H: InputDeviceLocalServerHandler<___T>,
22617    ___T: ::fidl_next::Transport,
22618    for<'de> crate::wire::InputDeviceDispatchReportRequest<'de>: ::fidl_next::Decode<
22619            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
22620            Constraint = (),
22621        >,
22622{
22623    async fn on_one_way(
22624        handler: &mut ___H,
22625        mut message: ::fidl_next::Message<___T>,
22626    ) -> ::core::result::Result<
22627        (),
22628        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22629    > {
22630        match *message.header().ordinal {
22631            9143281205184959647 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
22632                Ok(decoded) => {
22633                    handler.dispatch_report(::fidl_next::Request::from_decoded(decoded)).await;
22634                    Ok(())
22635                }
22636                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
22637                    ordinal: 9143281205184959647,
22638                    error,
22639                }),
22640            },
22641
22642            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22643        }
22644    }
22645
22646    async fn on_two_way(
22647        handler: &mut ___H,
22648        mut message: ::fidl_next::Message<___T>,
22649        responder: ::fidl_next::protocol::Responder<___T>,
22650    ) -> ::core::result::Result<
22651        (),
22652        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22653    > {
22654        match *message.header().ordinal {
22655            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22656        }
22657    }
22658}
22659
22660/// A client handler for the InputDevice protocol.
22661///
22662/// See [`InputDevice`] for more details.
22663pub trait InputDeviceClientHandler<
22664    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22665    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22666>
22667{
22668}
22669
22670impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for InputDevice
22671where
22672    ___H: InputDeviceClientHandler<___T> + ::core::marker::Send,
22673    ___T: ::fidl_next::Transport,
22674{
22675    async fn on_event(
22676        handler: &mut ___H,
22677        mut message: ::fidl_next::Message<___T>,
22678    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
22679        match *message.header().ordinal {
22680            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22681        }
22682    }
22683}
22684
22685/// A server handler for the InputDevice protocol.
22686///
22687/// See [`InputDevice`] for more details.
22688pub trait InputDeviceServerHandler<
22689    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
22690    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
22691>
22692{
22693    #[doc = " Dispatch an `InputReport` from the device `token`\n"]
22694    fn dispatch_report(
22695        &mut self,
22696
22697        request: ::fidl_next::Request<input_device::DispatchReport, ___T>,
22698    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
22699}
22700
22701impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for InputDevice
22702where
22703    ___H: InputDeviceServerHandler<___T> + ::core::marker::Send,
22704    ___T: ::fidl_next::Transport,
22705    for<'de> crate::wire::InputDeviceDispatchReportRequest<'de>: ::fidl_next::Decode<
22706            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
22707            Constraint = (),
22708        >,
22709{
22710    async fn on_one_way(
22711        handler: &mut ___H,
22712        mut message: ::fidl_next::Message<___T>,
22713    ) -> ::core::result::Result<
22714        (),
22715        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22716    > {
22717        match *message.header().ordinal {
22718            9143281205184959647 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
22719                Ok(decoded) => {
22720                    handler.dispatch_report(::fidl_next::Request::from_decoded(decoded)).await;
22721                    Ok(())
22722                }
22723                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
22724                    ordinal: 9143281205184959647,
22725                    error,
22726                }),
22727            },
22728
22729            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22730        }
22731    }
22732
22733    async fn on_two_way(
22734        handler: &mut ___H,
22735        mut message: ::fidl_next::Message<___T>,
22736        responder: ::fidl_next::protocol::Responder<___T>,
22737    ) -> ::core::result::Result<
22738        (),
22739        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
22740    > {
22741        match *message.header().ordinal {
22742            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
22743        }
22744    }
22745}
22746
22747impl<___T> InputDeviceClientHandler<___T> for ::fidl_next::IgnoreEvents where
22748    ___T: ::fidl_next::Transport
22749{
22750}
22751
22752impl<___H, ___T> InputDeviceLocalClientHandler<___T> for ::fidl_next::Local<___H>
22753where
22754    ___H: InputDeviceClientHandler<___T>,
22755    ___T: ::fidl_next::Transport,
22756{
22757}
22758
22759impl<___H, ___T> InputDeviceLocalServerHandler<___T> for ::fidl_next::Local<___H>
22760where
22761    ___H: InputDeviceServerHandler<___T>,
22762    ___T: ::fidl_next::Transport,
22763{
22764    async fn dispatch_report(
22765        &mut self,
22766
22767        request: ::fidl_next::Request<input_device::DispatchReport, ___T>,
22768    ) {
22769        ___H::dispatch_report(&mut self.0, request).await
22770    }
22771}
22772
22773/// The type corresponding to the InputMethodEditor protocol.
22774#[doc = " A interface for interacting with a text input control.\n"]
22775#[derive(PartialEq, Debug)]
22776pub struct InputMethodEditor;
22777
22778#[cfg(target_os = "fuchsia")]
22779impl ::fidl_next::HasTransport for InputMethodEditor {
22780    type Transport = ::fidl_next::fuchsia::zx::Channel;
22781}
22782
22783pub mod input_method_editor {
22784    pub mod prelude {
22785        pub use crate::{
22786            InputMethodEditor, InputMethodEditorClientHandler, InputMethodEditorLocalClientHandler,
22787            InputMethodEditorLocalServerHandler, InputMethodEditorServerHandler,
22788            input_method_editor,
22789        };
22790
22791        pub use crate::natural::InputMethodEditorDispatchKey3Request;
22792
22793        pub use crate::natural::InputMethodEditorDispatchKey3Response;
22794
22795        pub use crate::natural::InputMethodEditorInjectInputRequest;
22796
22797        pub use crate::natural::InputMethodEditorSetKeyboardTypeRequest;
22798
22799        pub use crate::natural::InputMethodEditorSetStateRequest;
22800    }
22801
22802    pub struct SetKeyboardType;
22803
22804    impl ::fidl_next::Method for SetKeyboardType {
22805        const ORDINAL: u64 = 1512753079355167879;
22806        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
22807            ::fidl_next::protocol::Flexibility::Strict;
22808
22809        type Protocol = crate::InputMethodEditor;
22810
22811        type Request = crate::wire::InputMethodEditorSetKeyboardTypeRequest;
22812    }
22813
22814    pub struct SetState;
22815
22816    impl ::fidl_next::Method for SetState {
22817        const ORDINAL: u64 = 1347833818391875397;
22818        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
22819            ::fidl_next::protocol::Flexibility::Strict;
22820
22821        type Protocol = crate::InputMethodEditor;
22822
22823        type Request = crate::wire::InputMethodEditorSetStateRequest<'static>;
22824    }
22825
22826    pub struct InjectInput;
22827
22828    impl ::fidl_next::Method for InjectInput {
22829        const ORDINAL: u64 = 237273810823608363;
22830        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
22831            ::fidl_next::protocol::Flexibility::Strict;
22832
22833        type Protocol = crate::InputMethodEditor;
22834
22835        type Request = crate::wire::InputMethodEditorInjectInputRequest<'static>;
22836    }
22837
22838    pub struct DispatchKey3;
22839
22840    impl ::fidl_next::Method for DispatchKey3 {
22841        const ORDINAL: u64 = 3320110035252677036;
22842        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
22843            ::fidl_next::protocol::Flexibility::Strict;
22844
22845        type Protocol = crate::InputMethodEditor;
22846
22847        type Request = crate::wire::InputMethodEditorDispatchKey3Request<'static>;
22848    }
22849
22850    impl ::fidl_next::TwoWayMethod for DispatchKey3 {
22851        type Response =
22852            ::fidl_next::wire::Strict<crate::wire::InputMethodEditorDispatchKey3Response>;
22853    }
22854
22855    impl<___R> ::fidl_next::Respond<___R> for DispatchKey3 {
22856        type Output =
22857            ::fidl_next::Strict<crate::generic::InputMethodEditorDispatchKey3Response<___R>>;
22858
22859        fn respond(response: ___R) -> Self::Output {
22860            ::fidl_next::Strict(crate::generic::InputMethodEditorDispatchKey3Response {
22861                handled: response,
22862            })
22863        }
22864    }
22865
22866    pub struct Show;
22867
22868    impl ::fidl_next::Method for Show {
22869        const ORDINAL: u64 = 1853794995948683310;
22870        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
22871            ::fidl_next::protocol::Flexibility::Strict;
22872
22873        type Protocol = crate::InputMethodEditor;
22874
22875        type Request = ::fidl_next::wire::EmptyMessageBody;
22876    }
22877
22878    pub struct Hide;
22879
22880    impl ::fidl_next::Method for Hide {
22881        const ORDINAL: u64 = 2899769328688524702;
22882        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
22883            ::fidl_next::protocol::Flexibility::Strict;
22884
22885        type Protocol = crate::InputMethodEditor;
22886
22887        type Request = ::fidl_next::wire::EmptyMessageBody;
22888    }
22889
22890    mod ___detail {
22891        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::InputMethodEditor
22892        where
22893            ___T: ::fidl_next::Transport,
22894        {
22895            type Client = InputMethodEditorClient<___T>;
22896            type Server = InputMethodEditorServer<___T>;
22897        }
22898
22899        /// The client for the `InputMethodEditor` protocol.
22900        #[repr(transparent)]
22901        pub struct InputMethodEditorClient<___T: ::fidl_next::Transport> {
22902            #[allow(dead_code)]
22903            client: ::fidl_next::protocol::Client<___T>,
22904        }
22905
22906        impl<___T> InputMethodEditorClient<___T>
22907        where
22908            ___T: ::fidl_next::Transport,
22909        {
22910            pub fn set_keyboard_type(
22911                &self,
22912
22913                keyboard_type: impl ::fidl_next::Encode<
22914                    crate::wire::KeyboardType,
22915                    <___T as ::fidl_next::Transport>::SendBuffer,
22916                >,
22917            ) -> ::fidl_next::SendFuture<'_, ___T>
22918            where
22919                <___T as ::fidl_next::Transport>::SendBuffer:
22920                    ::fidl_next::encoder::InternalHandleEncoder,
22921            {
22922                self.set_keyboard_type_with(
22923                    crate::generic::InputMethodEditorSetKeyboardTypeRequest { keyboard_type },
22924                )
22925            }
22926
22927            pub fn set_keyboard_type_with<___R>(
22928                &self,
22929                request: ___R,
22930            ) -> ::fidl_next::SendFuture<'_, ___T>
22931            where
22932                ___R: ::fidl_next::Encode<
22933                        crate::wire::InputMethodEditorSetKeyboardTypeRequest,
22934                        <___T as ::fidl_next::Transport>::SendBuffer,
22935                    >,
22936            {
22937                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
22938                    1512753079355167879,
22939                    <super::SetKeyboardType as ::fidl_next::Method>::FLEXIBILITY,
22940                    request,
22941                ))
22942            }
22943
22944            pub fn set_state(
22945                &self,
22946
22947                state: impl ::fidl_next::Encode<
22948                    crate::wire::TextInputState<'static>,
22949                    <___T as ::fidl_next::Transport>::SendBuffer,
22950                >,
22951            ) -> ::fidl_next::SendFuture<'_, ___T>
22952            where
22953                <___T as ::fidl_next::Transport>::SendBuffer:
22954                    ::fidl_next::encoder::InternalHandleEncoder,
22955                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
22956            {
22957                self.set_state_with(crate::generic::InputMethodEditorSetStateRequest { state })
22958            }
22959
22960            pub fn set_state_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
22961            where
22962                ___R: ::fidl_next::Encode<
22963                        crate::wire::InputMethodEditorSetStateRequest<'static>,
22964                        <___T as ::fidl_next::Transport>::SendBuffer,
22965                    >,
22966            {
22967                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
22968                    1347833818391875397,
22969                    <super::SetState as ::fidl_next::Method>::FLEXIBILITY,
22970                    request,
22971                ))
22972            }
22973
22974            pub fn inject_input(
22975                &self,
22976
22977                event: impl ::fidl_next::Encode<
22978                    crate::wire::InputEvent<'static>,
22979                    <___T as ::fidl_next::Transport>::SendBuffer,
22980                >,
22981            ) -> ::fidl_next::SendFuture<'_, ___T>
22982            where
22983                <___T as ::fidl_next::Transport>::SendBuffer:
22984                    ::fidl_next::encoder::InternalHandleEncoder,
22985                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
22986            {
22987                self.inject_input_with(crate::generic::InputMethodEditorInjectInputRequest {
22988                    event,
22989                })
22990            }
22991
22992            pub fn inject_input_with<___R>(
22993                &self,
22994                request: ___R,
22995            ) -> ::fidl_next::SendFuture<'_, ___T>
22996            where
22997                ___R: ::fidl_next::Encode<
22998                        crate::wire::InputMethodEditorInjectInputRequest<'static>,
22999                        <___T as ::fidl_next::Transport>::SendBuffer,
23000                    >,
23001            {
23002                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
23003                    237273810823608363,
23004                    <super::InjectInput as ::fidl_next::Method>::FLEXIBILITY,
23005                    request,
23006                ))
23007            }
23008
23009            pub fn dispatch_key3(
23010                &self,
23011
23012                event: impl ::fidl_next::Encode<
23013                    ::fidl_next_common_fuchsia_ui_input3::wire::KeyEvent<'static>,
23014                    <___T as ::fidl_next::Transport>::SendBuffer,
23015                >,
23016            ) -> ::fidl_next::TwoWayFuture<'_, super::DispatchKey3, ___T>
23017            where
23018                <___T as ::fidl_next::Transport>::SendBuffer:
23019                    ::fidl_next::encoder::InternalHandleEncoder,
23020                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
23021            {
23022                self.dispatch_key3_with(crate::generic::InputMethodEditorDispatchKey3Request {
23023                    event,
23024                })
23025            }
23026
23027            pub fn dispatch_key3_with<___R>(
23028                &self,
23029                request: ___R,
23030            ) -> ::fidl_next::TwoWayFuture<'_, super::DispatchKey3, ___T>
23031            where
23032                ___R: ::fidl_next::Encode<
23033                        crate::wire::InputMethodEditorDispatchKey3Request<'static>,
23034                        <___T as ::fidl_next::Transport>::SendBuffer,
23035                    >,
23036            {
23037                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
23038                    3320110035252677036,
23039                    <super::DispatchKey3 as ::fidl_next::Method>::FLEXIBILITY,
23040                    request,
23041                ))
23042            }
23043
23044            pub fn show(&self) -> ::fidl_next::SendFuture<'_, ___T> {
23045                ::fidl_next::SendFuture::from_untyped(
23046                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
23047                        1853794995948683310,
23048                        <super::Show as ::fidl_next::Method>::FLEXIBILITY,
23049                        (),
23050                    ),
23051                )
23052            }
23053
23054            pub fn hide(&self) -> ::fidl_next::SendFuture<'_, ___T> {
23055                ::fidl_next::SendFuture::from_untyped(
23056                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
23057                        2899769328688524702,
23058                        <super::Hide as ::fidl_next::Method>::FLEXIBILITY,
23059                        (),
23060                    ),
23061                )
23062            }
23063        }
23064
23065        /// The server for the `InputMethodEditor` protocol.
23066        #[repr(transparent)]
23067        pub struct InputMethodEditorServer<___T: ::fidl_next::Transport> {
23068            server: ::fidl_next::protocol::Server<___T>,
23069        }
23070
23071        impl<___T> InputMethodEditorServer<___T> where ___T: ::fidl_next::Transport {}
23072    }
23073}
23074
23075#[diagnostic::on_unimplemented(
23076    note = "If {Self} implements the non-local InputMethodEditorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
23077)]
23078
23079/// A client handler for the InputMethodEditor protocol.
23080///
23081/// See [`InputMethodEditor`] for more details.
23082pub trait InputMethodEditorLocalClientHandler<
23083    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
23084    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
23085>
23086{
23087}
23088
23089impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for InputMethodEditor
23090where
23091    ___H: InputMethodEditorLocalClientHandler<___T>,
23092    ___T: ::fidl_next::Transport,
23093{
23094    async fn on_event(
23095        handler: &mut ___H,
23096        mut message: ::fidl_next::Message<___T>,
23097    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
23098        match *message.header().ordinal {
23099            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23100        }
23101    }
23102}
23103
23104#[diagnostic::on_unimplemented(
23105    note = "If {Self} implements the non-local InputMethodEditorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
23106)]
23107
23108/// A server handler for the InputMethodEditor protocol.
23109///
23110/// See [`InputMethodEditor`] for more details.
23111pub trait InputMethodEditorLocalServerHandler<
23112    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
23113    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
23114>
23115{
23116    fn set_keyboard_type(
23117        &mut self,
23118
23119        request: ::fidl_next::Request<input_method_editor::SetKeyboardType, ___T>,
23120    ) -> impl ::core::future::Future<Output = ()>;
23121
23122    fn set_state(
23123        &mut self,
23124
23125        request: ::fidl_next::Request<input_method_editor::SetState, ___T>,
23126    ) -> impl ::core::future::Future<Output = ()>;
23127
23128    fn inject_input(
23129        &mut self,
23130
23131        request: ::fidl_next::Request<input_method_editor::InjectInput, ___T>,
23132    ) -> impl ::core::future::Future<Output = ()>;
23133
23134    fn dispatch_key3(
23135        &mut self,
23136
23137        request: ::fidl_next::Request<input_method_editor::DispatchKey3, ___T>,
23138
23139        responder: ::fidl_next::Responder<input_method_editor::DispatchKey3, ___T>,
23140    ) -> impl ::core::future::Future<Output = ()>;
23141
23142    fn show(&mut self) -> impl ::core::future::Future<Output = ()>;
23143
23144    fn hide(&mut self) -> impl ::core::future::Future<Output = ()>;
23145}
23146
23147impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for InputMethodEditor
23148where
23149    ___H: InputMethodEditorLocalServerHandler<___T>,
23150    ___T: ::fidl_next::Transport,
23151    for<'de> crate::wire::InputMethodEditorSetKeyboardTypeRequest: ::fidl_next::Decode<
23152            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23153            Constraint = (),
23154        >,
23155    for<'de> crate::wire::InputMethodEditorSetStateRequest<'de>: ::fidl_next::Decode<
23156            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23157            Constraint = (),
23158        >,
23159    for<'de> crate::wire::InputMethodEditorInjectInputRequest<'de>: ::fidl_next::Decode<
23160            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23161            Constraint = (),
23162        >,
23163    for<'de> crate::wire::InputMethodEditorDispatchKey3Request<'de>: ::fidl_next::Decode<
23164            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23165            Constraint = (),
23166        >,
23167{
23168    async fn on_one_way(
23169        handler: &mut ___H,
23170        mut message: ::fidl_next::Message<___T>,
23171    ) -> ::core::result::Result<
23172        (),
23173        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
23174    > {
23175        match *message.header().ordinal {
23176            1512753079355167879 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23177                Ok(decoded) => {
23178                    handler.set_keyboard_type(::fidl_next::Request::from_decoded(decoded)).await;
23179                    Ok(())
23180                }
23181                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23182                    ordinal: 1512753079355167879,
23183                    error,
23184                }),
23185            },
23186
23187            1347833818391875397 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23188                Ok(decoded) => {
23189                    handler.set_state(::fidl_next::Request::from_decoded(decoded)).await;
23190                    Ok(())
23191                }
23192                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23193                    ordinal: 1347833818391875397,
23194                    error,
23195                }),
23196            },
23197
23198            237273810823608363 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23199                Ok(decoded) => {
23200                    handler.inject_input(::fidl_next::Request::from_decoded(decoded)).await;
23201                    Ok(())
23202                }
23203                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23204                    ordinal: 237273810823608363,
23205                    error,
23206                }),
23207            },
23208
23209            1853794995948683310 => {
23210                handler.show().await;
23211                Ok(())
23212            }
23213
23214            2899769328688524702 => {
23215                handler.hide().await;
23216                Ok(())
23217            }
23218
23219            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23220        }
23221    }
23222
23223    async fn on_two_way(
23224        handler: &mut ___H,
23225        mut message: ::fidl_next::Message<___T>,
23226        responder: ::fidl_next::protocol::Responder<___T>,
23227    ) -> ::core::result::Result<
23228        (),
23229        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
23230    > {
23231        match *message.header().ordinal {
23232            3320110035252677036 => {
23233                let responder = ::fidl_next::Responder::from_untyped(responder);
23234
23235                match ::fidl_next::AsDecoderExt::into_decoded(message) {
23236                    Ok(decoded) => {
23237                        handler
23238                            .dispatch_key3(::fidl_next::Request::from_decoded(decoded), responder)
23239                            .await;
23240                        Ok(())
23241                    }
23242                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23243                        ordinal: 3320110035252677036,
23244                        error,
23245                    }),
23246                }
23247            }
23248
23249            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23250        }
23251    }
23252}
23253
23254/// A client handler for the InputMethodEditor protocol.
23255///
23256/// See [`InputMethodEditor`] for more details.
23257pub trait InputMethodEditorClientHandler<
23258    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
23259    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
23260>
23261{
23262}
23263
23264impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for InputMethodEditor
23265where
23266    ___H: InputMethodEditorClientHandler<___T> + ::core::marker::Send,
23267    ___T: ::fidl_next::Transport,
23268{
23269    async fn on_event(
23270        handler: &mut ___H,
23271        mut message: ::fidl_next::Message<___T>,
23272    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
23273        match *message.header().ordinal {
23274            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23275        }
23276    }
23277}
23278
23279/// A server handler for the InputMethodEditor protocol.
23280///
23281/// See [`InputMethodEditor`] for more details.
23282pub trait InputMethodEditorServerHandler<
23283    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
23284    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
23285>
23286{
23287    fn set_keyboard_type(
23288        &mut self,
23289
23290        request: ::fidl_next::Request<input_method_editor::SetKeyboardType, ___T>,
23291    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
23292
23293    fn set_state(
23294        &mut self,
23295
23296        request: ::fidl_next::Request<input_method_editor::SetState, ___T>,
23297    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
23298
23299    fn inject_input(
23300        &mut self,
23301
23302        request: ::fidl_next::Request<input_method_editor::InjectInput, ___T>,
23303    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
23304
23305    fn dispatch_key3(
23306        &mut self,
23307
23308        request: ::fidl_next::Request<input_method_editor::DispatchKey3, ___T>,
23309
23310        responder: ::fidl_next::Responder<input_method_editor::DispatchKey3, ___T>,
23311    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
23312
23313    fn show(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
23314
23315    fn hide(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
23316}
23317
23318impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for InputMethodEditor
23319where
23320    ___H: InputMethodEditorServerHandler<___T> + ::core::marker::Send,
23321    ___T: ::fidl_next::Transport,
23322    for<'de> crate::wire::InputMethodEditorSetKeyboardTypeRequest: ::fidl_next::Decode<
23323            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23324            Constraint = (),
23325        >,
23326    for<'de> crate::wire::InputMethodEditorSetStateRequest<'de>: ::fidl_next::Decode<
23327            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23328            Constraint = (),
23329        >,
23330    for<'de> crate::wire::InputMethodEditorInjectInputRequest<'de>: ::fidl_next::Decode<
23331            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23332            Constraint = (),
23333        >,
23334    for<'de> crate::wire::InputMethodEditorDispatchKey3Request<'de>: ::fidl_next::Decode<
23335            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23336            Constraint = (),
23337        >,
23338{
23339    async fn on_one_way(
23340        handler: &mut ___H,
23341        mut message: ::fidl_next::Message<___T>,
23342    ) -> ::core::result::Result<
23343        (),
23344        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
23345    > {
23346        match *message.header().ordinal {
23347            1512753079355167879 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23348                Ok(decoded) => {
23349                    handler.set_keyboard_type(::fidl_next::Request::from_decoded(decoded)).await;
23350                    Ok(())
23351                }
23352                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23353                    ordinal: 1512753079355167879,
23354                    error,
23355                }),
23356            },
23357
23358            1347833818391875397 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23359                Ok(decoded) => {
23360                    handler.set_state(::fidl_next::Request::from_decoded(decoded)).await;
23361                    Ok(())
23362                }
23363                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23364                    ordinal: 1347833818391875397,
23365                    error,
23366                }),
23367            },
23368
23369            237273810823608363 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23370                Ok(decoded) => {
23371                    handler.inject_input(::fidl_next::Request::from_decoded(decoded)).await;
23372                    Ok(())
23373                }
23374                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23375                    ordinal: 237273810823608363,
23376                    error,
23377                }),
23378            },
23379
23380            1853794995948683310 => {
23381                handler.show().await;
23382                Ok(())
23383            }
23384
23385            2899769328688524702 => {
23386                handler.hide().await;
23387                Ok(())
23388            }
23389
23390            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23391        }
23392    }
23393
23394    async fn on_two_way(
23395        handler: &mut ___H,
23396        mut message: ::fidl_next::Message<___T>,
23397        responder: ::fidl_next::protocol::Responder<___T>,
23398    ) -> ::core::result::Result<
23399        (),
23400        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
23401    > {
23402        match *message.header().ordinal {
23403            3320110035252677036 => {
23404                let responder = ::fidl_next::Responder::from_untyped(responder);
23405
23406                match ::fidl_next::AsDecoderExt::into_decoded(message) {
23407                    Ok(decoded) => {
23408                        handler
23409                            .dispatch_key3(::fidl_next::Request::from_decoded(decoded), responder)
23410                            .await;
23411                        Ok(())
23412                    }
23413                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23414                        ordinal: 3320110035252677036,
23415                        error,
23416                    }),
23417                }
23418            }
23419
23420            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23421        }
23422    }
23423}
23424
23425impl<___T> InputMethodEditorClientHandler<___T> for ::fidl_next::IgnoreEvents where
23426    ___T: ::fidl_next::Transport
23427{
23428}
23429
23430impl<___H, ___T> InputMethodEditorLocalClientHandler<___T> for ::fidl_next::Local<___H>
23431where
23432    ___H: InputMethodEditorClientHandler<___T>,
23433    ___T: ::fidl_next::Transport,
23434{
23435}
23436
23437impl<___H, ___T> InputMethodEditorLocalServerHandler<___T> for ::fidl_next::Local<___H>
23438where
23439    ___H: InputMethodEditorServerHandler<___T>,
23440    ___T: ::fidl_next::Transport,
23441{
23442    async fn set_keyboard_type(
23443        &mut self,
23444
23445        request: ::fidl_next::Request<input_method_editor::SetKeyboardType, ___T>,
23446    ) {
23447        ___H::set_keyboard_type(&mut self.0, request).await
23448    }
23449
23450    async fn set_state(
23451        &mut self,
23452
23453        request: ::fidl_next::Request<input_method_editor::SetState, ___T>,
23454    ) {
23455        ___H::set_state(&mut self.0, request).await
23456    }
23457
23458    async fn inject_input(
23459        &mut self,
23460
23461        request: ::fidl_next::Request<input_method_editor::InjectInput, ___T>,
23462    ) {
23463        ___H::inject_input(&mut self.0, request).await
23464    }
23465
23466    async fn dispatch_key3(
23467        &mut self,
23468
23469        request: ::fidl_next::Request<input_method_editor::DispatchKey3, ___T>,
23470
23471        responder: ::fidl_next::Responder<input_method_editor::DispatchKey3, ___T>,
23472    ) {
23473        ___H::dispatch_key3(&mut self.0, request, responder).await
23474    }
23475
23476    async fn show(&mut self) {
23477        ___H::show(&mut self.0).await
23478    }
23479
23480    async fn hide(&mut self) {
23481        ___H::hide(&mut self.0).await
23482    }
23483}
23484
23485/// The type corresponding to the InputMethodEditorClient protocol.
23486#[doc = " An interface to receive information from `TextInputService`.\n"]
23487#[derive(PartialEq, Debug)]
23488pub struct InputMethodEditorClient;
23489
23490#[cfg(target_os = "fuchsia")]
23491impl ::fidl_next::HasTransport for InputMethodEditorClient {
23492    type Transport = ::fidl_next::fuchsia::zx::Channel;
23493}
23494
23495pub mod input_method_editor_client {
23496    pub mod prelude {
23497        pub use crate::{
23498            InputMethodEditorClient, InputMethodEditorClientClientHandler,
23499            InputMethodEditorClientLocalClientHandler, InputMethodEditorClientLocalServerHandler,
23500            InputMethodEditorClientServerHandler, input_method_editor_client,
23501        };
23502
23503        pub use crate::natural::InputMethodEditorClientDidUpdateStateRequest;
23504
23505        pub use crate::natural::InputMethodEditorClientOnActionRequest;
23506    }
23507
23508    pub struct DidUpdateState;
23509
23510    impl ::fidl_next::Method for DidUpdateState {
23511        const ORDINAL: u64 = 2767491018424805277;
23512        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
23513            ::fidl_next::protocol::Flexibility::Strict;
23514
23515        type Protocol = crate::InputMethodEditorClient;
23516
23517        type Request = crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>;
23518    }
23519
23520    pub struct OnAction;
23521
23522    impl ::fidl_next::Method for OnAction {
23523        const ORDINAL: u64 = 1856645167774651288;
23524        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
23525            ::fidl_next::protocol::Flexibility::Strict;
23526
23527        type Protocol = crate::InputMethodEditorClient;
23528
23529        type Request = crate::wire::InputMethodEditorClientOnActionRequest;
23530    }
23531
23532    mod ___detail {
23533        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::InputMethodEditorClient
23534        where
23535            ___T: ::fidl_next::Transport,
23536        {
23537            type Client = InputMethodEditorClientClient<___T>;
23538            type Server = InputMethodEditorClientServer<___T>;
23539        }
23540
23541        /// The client for the `InputMethodEditorClient` protocol.
23542        #[repr(transparent)]
23543        pub struct InputMethodEditorClientClient<___T: ::fidl_next::Transport> {
23544            #[allow(dead_code)]
23545            client: ::fidl_next::protocol::Client<___T>,
23546        }
23547
23548        impl<___T> InputMethodEditorClientClient<___T>
23549        where
23550            ___T: ::fidl_next::Transport,
23551        {
23552            pub fn did_update_state(
23553                &self,
23554
23555                state: impl ::fidl_next::Encode<
23556                    crate::wire::TextInputState<'static>,
23557                    <___T as ::fidl_next::Transport>::SendBuffer,
23558                >,
23559
23560                event: impl ::fidl_next::Encode<
23561                    crate::wire_optional::InputEvent<'static>,
23562                    <___T as ::fidl_next::Transport>::SendBuffer,
23563                >,
23564            ) -> ::fidl_next::SendFuture<'_, ___T>
23565            where
23566                <___T as ::fidl_next::Transport>::SendBuffer:
23567                    ::fidl_next::encoder::InternalHandleEncoder,
23568                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
23569            {
23570                self.did_update_state_with(
23571                    crate::generic::InputMethodEditorClientDidUpdateStateRequest { state, event },
23572                )
23573            }
23574
23575            pub fn did_update_state_with<___R>(
23576                &self,
23577                request: ___R,
23578            ) -> ::fidl_next::SendFuture<'_, ___T>
23579            where
23580                ___R: ::fidl_next::Encode<
23581                        crate::wire::InputMethodEditorClientDidUpdateStateRequest<'static>,
23582                        <___T as ::fidl_next::Transport>::SendBuffer,
23583                    >,
23584            {
23585                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
23586                    2767491018424805277,
23587                    <super::DidUpdateState as ::fidl_next::Method>::FLEXIBILITY,
23588                    request,
23589                ))
23590            }
23591
23592            pub fn on_action(
23593                &self,
23594
23595                action: impl ::fidl_next::Encode<
23596                    crate::wire::InputMethodAction,
23597                    <___T as ::fidl_next::Transport>::SendBuffer,
23598                >,
23599            ) -> ::fidl_next::SendFuture<'_, ___T>
23600            where
23601                <___T as ::fidl_next::Transport>::SendBuffer:
23602                    ::fidl_next::encoder::InternalHandleEncoder,
23603            {
23604                self.on_action_with(crate::generic::InputMethodEditorClientOnActionRequest {
23605                    action,
23606                })
23607            }
23608
23609            pub fn on_action_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
23610            where
23611                ___R: ::fidl_next::Encode<
23612                        crate::wire::InputMethodEditorClientOnActionRequest,
23613                        <___T as ::fidl_next::Transport>::SendBuffer,
23614                    >,
23615            {
23616                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
23617                    1856645167774651288,
23618                    <super::OnAction as ::fidl_next::Method>::FLEXIBILITY,
23619                    request,
23620                ))
23621            }
23622        }
23623
23624        /// The server for the `InputMethodEditorClient` protocol.
23625        #[repr(transparent)]
23626        pub struct InputMethodEditorClientServer<___T: ::fidl_next::Transport> {
23627            server: ::fidl_next::protocol::Server<___T>,
23628        }
23629
23630        impl<___T> InputMethodEditorClientServer<___T> where ___T: ::fidl_next::Transport {}
23631    }
23632}
23633
23634#[diagnostic::on_unimplemented(
23635    note = "If {Self} implements the non-local InputMethodEditorClientClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
23636)]
23637
23638/// A client handler for the InputMethodEditorClient protocol.
23639///
23640/// See [`InputMethodEditorClient`] for more details.
23641pub trait InputMethodEditorClientLocalClientHandler<
23642    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
23643    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
23644>
23645{
23646}
23647
23648impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for InputMethodEditorClient
23649where
23650    ___H: InputMethodEditorClientLocalClientHandler<___T>,
23651    ___T: ::fidl_next::Transport,
23652{
23653    async fn on_event(
23654        handler: &mut ___H,
23655        mut message: ::fidl_next::Message<___T>,
23656    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
23657        match *message.header().ordinal {
23658            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23659        }
23660    }
23661}
23662
23663#[diagnostic::on_unimplemented(
23664    note = "If {Self} implements the non-local InputMethodEditorClientServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
23665)]
23666
23667/// A server handler for the InputMethodEditorClient protocol.
23668///
23669/// See [`InputMethodEditorClient`] for more details.
23670pub trait InputMethodEditorClientLocalServerHandler<
23671    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
23672    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
23673>
23674{
23675    fn did_update_state(
23676        &mut self,
23677
23678        request: ::fidl_next::Request<input_method_editor_client::DidUpdateState, ___T>,
23679    ) -> impl ::core::future::Future<Output = ()>;
23680
23681    fn on_action(
23682        &mut self,
23683
23684        request: ::fidl_next::Request<input_method_editor_client::OnAction, ___T>,
23685    ) -> impl ::core::future::Future<Output = ()>;
23686}
23687
23688impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for InputMethodEditorClient
23689where
23690    ___H: InputMethodEditorClientLocalServerHandler<___T>,
23691    ___T: ::fidl_next::Transport,
23692    for<'de> crate::wire::InputMethodEditorClientDidUpdateStateRequest<'de>: ::fidl_next::Decode<
23693            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23694            Constraint = (),
23695        >,
23696    for<'de> crate::wire::InputMethodEditorClientOnActionRequest: ::fidl_next::Decode<
23697            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23698            Constraint = (),
23699        >,
23700{
23701    async fn on_one_way(
23702        handler: &mut ___H,
23703        mut message: ::fidl_next::Message<___T>,
23704    ) -> ::core::result::Result<
23705        (),
23706        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
23707    > {
23708        match *message.header().ordinal {
23709            2767491018424805277 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23710                Ok(decoded) => {
23711                    handler.did_update_state(::fidl_next::Request::from_decoded(decoded)).await;
23712                    Ok(())
23713                }
23714                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23715                    ordinal: 2767491018424805277,
23716                    error,
23717                }),
23718            },
23719
23720            1856645167774651288 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23721                Ok(decoded) => {
23722                    handler.on_action(::fidl_next::Request::from_decoded(decoded)).await;
23723                    Ok(())
23724                }
23725                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23726                    ordinal: 1856645167774651288,
23727                    error,
23728                }),
23729            },
23730
23731            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23732        }
23733    }
23734
23735    async fn on_two_way(
23736        handler: &mut ___H,
23737        mut message: ::fidl_next::Message<___T>,
23738        responder: ::fidl_next::protocol::Responder<___T>,
23739    ) -> ::core::result::Result<
23740        (),
23741        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
23742    > {
23743        match *message.header().ordinal {
23744            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23745        }
23746    }
23747}
23748
23749/// A client handler for the InputMethodEditorClient protocol.
23750///
23751/// See [`InputMethodEditorClient`] for more details.
23752pub trait InputMethodEditorClientClientHandler<
23753    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
23754    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
23755>
23756{
23757}
23758
23759impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for InputMethodEditorClient
23760where
23761    ___H: InputMethodEditorClientClientHandler<___T> + ::core::marker::Send,
23762    ___T: ::fidl_next::Transport,
23763{
23764    async fn on_event(
23765        handler: &mut ___H,
23766        mut message: ::fidl_next::Message<___T>,
23767    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
23768        match *message.header().ordinal {
23769            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23770        }
23771    }
23772}
23773
23774/// A server handler for the InputMethodEditorClient protocol.
23775///
23776/// See [`InputMethodEditorClient`] for more details.
23777pub trait InputMethodEditorClientServerHandler<
23778    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
23779    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
23780>
23781{
23782    fn did_update_state(
23783        &mut self,
23784
23785        request: ::fidl_next::Request<input_method_editor_client::DidUpdateState, ___T>,
23786    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
23787
23788    fn on_action(
23789        &mut self,
23790
23791        request: ::fidl_next::Request<input_method_editor_client::OnAction, ___T>,
23792    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
23793}
23794
23795impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for InputMethodEditorClient
23796where
23797    ___H: InputMethodEditorClientServerHandler<___T> + ::core::marker::Send,
23798    ___T: ::fidl_next::Transport,
23799    for<'de> crate::wire::InputMethodEditorClientDidUpdateStateRequest<'de>: ::fidl_next::Decode<
23800            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23801            Constraint = (),
23802        >,
23803    for<'de> crate::wire::InputMethodEditorClientOnActionRequest: ::fidl_next::Decode<
23804            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
23805            Constraint = (),
23806        >,
23807{
23808    async fn on_one_way(
23809        handler: &mut ___H,
23810        mut message: ::fidl_next::Message<___T>,
23811    ) -> ::core::result::Result<
23812        (),
23813        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
23814    > {
23815        match *message.header().ordinal {
23816            2767491018424805277 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23817                Ok(decoded) => {
23818                    handler.did_update_state(::fidl_next::Request::from_decoded(decoded)).await;
23819                    Ok(())
23820                }
23821                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23822                    ordinal: 2767491018424805277,
23823                    error,
23824                }),
23825            },
23826
23827            1856645167774651288 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
23828                Ok(decoded) => {
23829                    handler.on_action(::fidl_next::Request::from_decoded(decoded)).await;
23830                    Ok(())
23831                }
23832                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
23833                    ordinal: 1856645167774651288,
23834                    error,
23835                }),
23836            },
23837
23838            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23839        }
23840    }
23841
23842    async fn on_two_way(
23843        handler: &mut ___H,
23844        mut message: ::fidl_next::Message<___T>,
23845        responder: ::fidl_next::protocol::Responder<___T>,
23846    ) -> ::core::result::Result<
23847        (),
23848        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
23849    > {
23850        match *message.header().ordinal {
23851            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
23852        }
23853    }
23854}
23855
23856impl<___T> InputMethodEditorClientClientHandler<___T> for ::fidl_next::IgnoreEvents where
23857    ___T: ::fidl_next::Transport
23858{
23859}
23860
23861impl<___H, ___T> InputMethodEditorClientLocalClientHandler<___T> for ::fidl_next::Local<___H>
23862where
23863    ___H: InputMethodEditorClientClientHandler<___T>,
23864    ___T: ::fidl_next::Transport,
23865{
23866}
23867
23868impl<___H, ___T> InputMethodEditorClientLocalServerHandler<___T> for ::fidl_next::Local<___H>
23869where
23870    ___H: InputMethodEditorClientServerHandler<___T>,
23871    ___T: ::fidl_next::Transport,
23872{
23873    async fn did_update_state(
23874        &mut self,
23875
23876        request: ::fidl_next::Request<input_method_editor_client::DidUpdateState, ___T>,
23877    ) {
23878        ___H::did_update_state(&mut self.0, request).await
23879    }
23880
23881    async fn on_action(
23882        &mut self,
23883
23884        request: ::fidl_next::Request<input_method_editor_client::OnAction, ___T>,
23885    ) {
23886        ___H::on_action(&mut self.0, request).await
23887    }
23888}
23889
23890pub const K_MODIFIER_ALT: u32 = 96 as u32;
23891
23892pub const K_MODIFIER_CAPS_LOCK: u32 = 1 as u32;
23893
23894pub const K_MODIFIER_CONTROL: u32 = 24 as u32;
23895
23896pub const K_MODIFIER_LEFT_ALT: u32 = 32 as u32;
23897
23898pub const K_MODIFIER_LEFT_CONTROL: u32 = 8 as u32;
23899
23900pub const K_MODIFIER_LEFT_SHIFT: u32 = 2 as u32;
23901
23902pub const K_MODIFIER_LEFT_SUPER: u32 = 128 as u32;
23903
23904#[doc = " Keyboard modifiers\n"]
23905pub const K_MODIFIER_NONE: u32 = 0 as u32;
23906
23907pub const K_MODIFIER_RIGHT_ALT: u32 = 64 as u32;
23908
23909pub const K_MODIFIER_RIGHT_CONTROL: u32 = 16 as u32;
23910
23911pub const K_MODIFIER_RIGHT_SHIFT: u32 = 4 as u32;
23912
23913pub const K_MODIFIER_RIGHT_SUPER: u32 = 256 as u32;
23914
23915pub const K_MODIFIER_SHIFT: u32 = 6 as u32;
23916
23917pub const K_MODIFIER_SUPER: u32 = 384 as u32;