Skip to main content

fidl_next_fuchsia_ui_input/
fidl_next_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    pub use fidl_next_common_fuchsia_ui_input::natural::*;
8
9    #[derive(Debug, PartialEq)]
10    #[repr(C)]
11    pub struct DeviceListenerRegistryRegisterListenerRequest {
12        pub listener:
13            ::fidl_next::ClientEnd<crate::DeviceListener, ::fidl_next::fuchsia::zx::Channel>,
14    }
15
16    unsafe impl<___E>
17        ::fidl_next::Encode<crate::wire::DeviceListenerRegistryRegisterListenerRequest, ___E>
18        for DeviceListenerRegistryRegisterListenerRequest
19    where
20        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21        ___E: ::fidl_next::fuchsia::HandleEncoder,
22    {
23        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
24            Self,
25            crate::wire::DeviceListenerRegistryRegisterListenerRequest,
26        > = unsafe {
27            ::fidl_next::CopyOptimization::enable_if(
28                true && <::fidl_next::ClientEnd<
29                    crate::DeviceListener,
30                    ::fidl_next::fuchsia::zx::Channel,
31                > as ::fidl_next::Encode<
32                    ::fidl_next::ClientEnd<
33                        crate::DeviceListener,
34                        ::fidl_next::wire::fuchsia::Channel,
35                    >,
36                    ___E,
37                >>::COPY_OPTIMIZATION
38                    .is_enabled(),
39            )
40        };
41
42        #[inline]
43        fn encode(
44            self,
45            encoder_: &mut ___E,
46            out_: &mut ::core::mem::MaybeUninit<
47                crate::wire::DeviceListenerRegistryRegisterListenerRequest,
48            >,
49            _: (),
50        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
51            ::fidl_next::munge! {
52                let crate::wire::DeviceListenerRegistryRegisterListenerRequest {
53                    listener,
54
55                } = out_;
56            }
57
58            ::fidl_next::Encode::encode(self.listener, encoder_, listener, ())?;
59
60            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(listener.as_mut_ptr()) };
61
62            Ok(())
63        }
64    }
65
66    unsafe impl<___E>
67        ::fidl_next::EncodeOption<
68            ::fidl_next::wire::Box<
69                'static,
70                crate::wire::DeviceListenerRegistryRegisterListenerRequest,
71            >,
72            ___E,
73        > for DeviceListenerRegistryRegisterListenerRequest
74    where
75        ___E: ::fidl_next::Encoder + ?Sized,
76        DeviceListenerRegistryRegisterListenerRequest:
77            ::fidl_next::Encode<crate::wire::DeviceListenerRegistryRegisterListenerRequest, ___E>,
78    {
79        #[inline]
80        fn encode_option(
81            this: ::core::option::Option<Self>,
82            encoder: &mut ___E,
83            out: &mut ::core::mem::MaybeUninit<
84                ::fidl_next::wire::Box<
85                    'static,
86                    crate::wire::DeviceListenerRegistryRegisterListenerRequest,
87                >,
88            >,
89            _: (),
90        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
91            if let Some(inner) = this {
92                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
93                ::fidl_next::wire::Box::encode_present(out);
94            } else {
95                ::fidl_next::wire::Box::encode_absent(out);
96            }
97
98            Ok(())
99        }
100    }
101
102    impl ::fidl_next::FromWire<crate::wire::DeviceListenerRegistryRegisterListenerRequest>
103        for DeviceListenerRegistryRegisterListenerRequest
104    {
105        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
106            crate::wire::DeviceListenerRegistryRegisterListenerRequest,
107            Self,
108        > = unsafe {
109            ::fidl_next::CopyOptimization::enable_if(
110                true && <::fidl_next::ClientEnd<
111                    crate::DeviceListener,
112                    ::fidl_next::fuchsia::zx::Channel,
113                > as ::fidl_next::FromWire<
114                    ::fidl_next::ClientEnd<
115                        crate::DeviceListener,
116                        ::fidl_next::wire::fuchsia::Channel,
117                    >,
118                >>::COPY_OPTIMIZATION
119                    .is_enabled(),
120            )
121        };
122
123        #[inline]
124        fn from_wire(wire: crate::wire::DeviceListenerRegistryRegisterListenerRequest) -> Self {
125            Self { listener: ::fidl_next::FromWire::from_wire(wire.listener) }
126        }
127    }
128
129    #[derive(Debug, PartialEq)]
130    #[repr(C)]
131    pub struct DeviceListenerRegistryRegisterListenerResponse {
132        pub iterator:
133            ::fidl_next::ClientEnd<crate::DeviceIterator, ::fidl_next::fuchsia::zx::Channel>,
134    }
135
136    unsafe impl<___E>
137        ::fidl_next::Encode<crate::wire::DeviceListenerRegistryRegisterListenerResponse, ___E>
138        for DeviceListenerRegistryRegisterListenerResponse
139    where
140        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
141        ___E: ::fidl_next::fuchsia::HandleEncoder,
142    {
143        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
144            Self,
145            crate::wire::DeviceListenerRegistryRegisterListenerResponse,
146        > = unsafe {
147            ::fidl_next::CopyOptimization::enable_if(
148                true && <::fidl_next::ClientEnd<
149                    crate::DeviceIterator,
150                    ::fidl_next::fuchsia::zx::Channel,
151                > as ::fidl_next::Encode<
152                    ::fidl_next::ClientEnd<
153                        crate::DeviceIterator,
154                        ::fidl_next::wire::fuchsia::Channel,
155                    >,
156                    ___E,
157                >>::COPY_OPTIMIZATION
158                    .is_enabled(),
159            )
160        };
161
162        #[inline]
163        fn encode(
164            self,
165            encoder_: &mut ___E,
166            out_: &mut ::core::mem::MaybeUninit<
167                crate::wire::DeviceListenerRegistryRegisterListenerResponse,
168            >,
169            _: (),
170        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
171            ::fidl_next::munge! {
172                let crate::wire::DeviceListenerRegistryRegisterListenerResponse {
173                    iterator,
174
175                } = out_;
176            }
177
178            ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
179
180            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
181
182            Ok(())
183        }
184    }
185
186    unsafe impl<___E>
187        ::fidl_next::EncodeOption<
188            ::fidl_next::wire::Box<
189                'static,
190                crate::wire::DeviceListenerRegistryRegisterListenerResponse,
191            >,
192            ___E,
193        > for DeviceListenerRegistryRegisterListenerResponse
194    where
195        ___E: ::fidl_next::Encoder + ?Sized,
196        DeviceListenerRegistryRegisterListenerResponse:
197            ::fidl_next::Encode<crate::wire::DeviceListenerRegistryRegisterListenerResponse, ___E>,
198    {
199        #[inline]
200        fn encode_option(
201            this: ::core::option::Option<Self>,
202            encoder: &mut ___E,
203            out: &mut ::core::mem::MaybeUninit<
204                ::fidl_next::wire::Box<
205                    'static,
206                    crate::wire::DeviceListenerRegistryRegisterListenerResponse,
207                >,
208            >,
209            _: (),
210        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
211            if let Some(inner) = this {
212                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
213                ::fidl_next::wire::Box::encode_present(out);
214            } else {
215                ::fidl_next::wire::Box::encode_absent(out);
216            }
217
218            Ok(())
219        }
220    }
221
222    impl ::fidl_next::FromWire<crate::wire::DeviceListenerRegistryRegisterListenerResponse>
223        for DeviceListenerRegistryRegisterListenerResponse
224    {
225        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
226            crate::wire::DeviceListenerRegistryRegisterListenerResponse,
227            Self,
228        > = unsafe {
229            ::fidl_next::CopyOptimization::enable_if(
230                true && <::fidl_next::ClientEnd<
231                    crate::DeviceIterator,
232                    ::fidl_next::fuchsia::zx::Channel,
233                > as ::fidl_next::FromWire<
234                    ::fidl_next::ClientEnd<
235                        crate::DeviceIterator,
236                        ::fidl_next::wire::fuchsia::Channel,
237                    >,
238                >>::COPY_OPTIMIZATION
239                    .is_enabled(),
240            )
241        };
242
243        #[inline]
244        fn from_wire(wire: crate::wire::DeviceListenerRegistryRegisterListenerResponse) -> Self {
245            Self { iterator: ::fidl_next::FromWire::from_wire(wire.iterator) }
246        }
247    }
248
249    #[derive(Debug, PartialEq)]
250    pub struct ImeServiceGetInputMethodEditorRequest {
251        pub keyboard_type: crate::natural::KeyboardType,
252
253        pub action: crate::natural::InputMethodAction,
254
255        pub initial_state: crate::natural::TextInputState,
256
257        pub client: ::fidl_next::ClientEnd<
258            crate::InputMethodEditorClient,
259            ::fidl_next::fuchsia::zx::Channel,
260        >,
261
262        pub editor:
263            ::fidl_next::ServerEnd<crate::InputMethodEditor, ::fidl_next::fuchsia::zx::Channel>,
264    }
265
266    unsafe impl<___E>
267        ::fidl_next::Encode<crate::wire::ImeServiceGetInputMethodEditorRequest<'static>, ___E>
268        for ImeServiceGetInputMethodEditorRequest
269    where
270        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
271        ___E: ::fidl_next::Encoder,
272        ___E: ::fidl_next::fuchsia::HandleEncoder,
273    {
274        #[inline]
275        fn encode(
276            self,
277            encoder_: &mut ___E,
278            out_: &mut ::core::mem::MaybeUninit<
279                crate::wire::ImeServiceGetInputMethodEditorRequest<'static>,
280            >,
281            _: (),
282        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
283            ::fidl_next::munge! {
284                let crate::wire::ImeServiceGetInputMethodEditorRequest {
285                    keyboard_type,
286                    action,
287                    initial_state,
288                    client,
289                    editor,
290
291                } = out_;
292            }
293
294            ::fidl_next::Encode::encode(self.keyboard_type, encoder_, keyboard_type, ())?;
295
296            let mut _field =
297                unsafe { ::fidl_next::Slot::new_unchecked(keyboard_type.as_mut_ptr()) };
298
299            ::fidl_next::Encode::encode(self.action, encoder_, action, ())?;
300
301            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(action.as_mut_ptr()) };
302
303            ::fidl_next::Encode::encode(self.initial_state, encoder_, initial_state, ())?;
304
305            let mut _field =
306                unsafe { ::fidl_next::Slot::new_unchecked(initial_state.as_mut_ptr()) };
307
308            ::fidl_next::Encode::encode(self.client, encoder_, client, ())?;
309
310            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client.as_mut_ptr()) };
311
312            ::fidl_next::Encode::encode(self.editor, encoder_, editor, ())?;
313
314            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(editor.as_mut_ptr()) };
315
316            Ok(())
317        }
318    }
319
320    unsafe impl<___E>
321        ::fidl_next::EncodeOption<
322            ::fidl_next::wire::Box<
323                'static,
324                crate::wire::ImeServiceGetInputMethodEditorRequest<'static>,
325            >,
326            ___E,
327        > for ImeServiceGetInputMethodEditorRequest
328    where
329        ___E: ::fidl_next::Encoder + ?Sized,
330        ImeServiceGetInputMethodEditorRequest:
331            ::fidl_next::Encode<crate::wire::ImeServiceGetInputMethodEditorRequest<'static>, ___E>,
332    {
333        #[inline]
334        fn encode_option(
335            this: ::core::option::Option<Self>,
336            encoder: &mut ___E,
337            out: &mut ::core::mem::MaybeUninit<
338                ::fidl_next::wire::Box<
339                    'static,
340                    crate::wire::ImeServiceGetInputMethodEditorRequest<'static>,
341                >,
342            >,
343            _: (),
344        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
345            if let Some(inner) = this {
346                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
347                ::fidl_next::wire::Box::encode_present(out);
348            } else {
349                ::fidl_next::wire::Box::encode_absent(out);
350            }
351
352            Ok(())
353        }
354    }
355
356    impl<'de> ::fidl_next::FromWire<crate::wire::ImeServiceGetInputMethodEditorRequest<'de>>
357        for ImeServiceGetInputMethodEditorRequest
358    {
359        #[inline]
360        fn from_wire(wire: crate::wire::ImeServiceGetInputMethodEditorRequest<'de>) -> Self {
361            Self {
362                keyboard_type: ::fidl_next::FromWire::from_wire(wire.keyboard_type),
363
364                action: ::fidl_next::FromWire::from_wire(wire.action),
365
366                initial_state: ::fidl_next::FromWire::from_wire(wire.initial_state),
367
368                client: ::fidl_next::FromWire::from_wire(wire.client),
369
370                editor: ::fidl_next::FromWire::from_wire(wire.editor),
371            }
372        }
373    }
374
375    #[derive(Debug, Default, PartialEq)]
376    pub struct MediaButtonsEvent {
377        pub volume: ::core::option::Option<i8>,
378
379        pub mic_mute: ::core::option::Option<bool>,
380
381        pub pause: ::core::option::Option<bool>,
382
383        pub camera_disable: ::core::option::Option<bool>,
384
385        pub power: ::core::option::Option<bool>,
386
387        pub function: ::core::option::Option<bool>,
388
389        pub device_id: ::core::option::Option<u32>,
390
391        pub wake_lease: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
392
393        pub trace_flow_id: ::core::option::Option<u64>,
394    }
395
396    impl MediaButtonsEvent {
397        fn __max_ordinal(&self) -> usize {
398            if self.trace_flow_id.is_some() {
399                return 9;
400            }
401
402            if self.wake_lease.is_some() {
403                return 8;
404            }
405
406            if self.device_id.is_some() {
407                return 7;
408            }
409
410            if self.function.is_some() {
411                return 6;
412            }
413
414            if self.power.is_some() {
415                return 5;
416            }
417
418            if self.camera_disable.is_some() {
419                return 4;
420            }
421
422            if self.pause.is_some() {
423                return 3;
424            }
425
426            if self.mic_mute.is_some() {
427                return 2;
428            }
429
430            if self.volume.is_some() {
431                return 1;
432            }
433
434            0
435        }
436    }
437
438    unsafe impl<___E> ::fidl_next::Encode<crate::wire::MediaButtonsEvent<'static>, ___E>
439        for MediaButtonsEvent
440    where
441        ___E: ::fidl_next::Encoder + ?Sized,
442        ___E: ::fidl_next::fuchsia::HandleEncoder,
443    {
444        #[inline]
445        fn encode(
446            mut self,
447            encoder: &mut ___E,
448            out: &mut ::core::mem::MaybeUninit<crate::wire::MediaButtonsEvent<'static>>,
449            _: (),
450        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
451            ::fidl_next::munge!(let crate::wire::MediaButtonsEvent { table } = out);
452
453            let max_ord = self.__max_ordinal();
454
455            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
456            ::fidl_next::Wire::zero_padding(&mut out);
457
458            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
459                ::fidl_next::wire::Envelope,
460            >(encoder, max_ord);
461
462            for i in 1..=max_ord {
463                match i {
464                    9 => {
465                        if let Some(value) = self.trace_flow_id.take() {
466                            ::fidl_next::wire::Envelope::encode_value::<
467                                ::fidl_next::wire::Uint64,
468                                ___E,
469                            >(
470                                value, preallocated.encoder, &mut out, ()
471                            )?;
472                        } else {
473                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
474                        }
475                    }
476
477                    8 => {
478                        if let Some(value) = self.wake_lease.take() {
479                            ::fidl_next::wire::Envelope::encode_value::<
480                                ::fidl_next::wire::fuchsia::EventPair,
481                                ___E,
482                            >(
483                                value, preallocated.encoder, &mut out, ()
484                            )?;
485                        } else {
486                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
487                        }
488                    }
489
490                    7 => {
491                        if let Some(value) = self.device_id.take() {
492                            ::fidl_next::wire::Envelope::encode_value::<
493                                ::fidl_next::wire::Uint32,
494                                ___E,
495                            >(
496                                value, preallocated.encoder, &mut out, ()
497                            )?;
498                        } else {
499                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
500                        }
501                    }
502
503                    6 => {
504                        if let Some(value) = self.function.take() {
505                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
506                                value,
507                                preallocated.encoder,
508                                &mut out,
509                                (),
510                            )?;
511                        } else {
512                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
513                        }
514                    }
515
516                    5 => {
517                        if let Some(value) = self.power.take() {
518                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
519                                value,
520                                preallocated.encoder,
521                                &mut out,
522                                (),
523                            )?;
524                        } else {
525                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
526                        }
527                    }
528
529                    4 => {
530                        if let Some(value) = self.camera_disable.take() {
531                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
532                                value,
533                                preallocated.encoder,
534                                &mut out,
535                                (),
536                            )?;
537                        } else {
538                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
539                        }
540                    }
541
542                    3 => {
543                        if let Some(value) = self.pause.take() {
544                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
545                                value,
546                                preallocated.encoder,
547                                &mut out,
548                                (),
549                            )?;
550                        } else {
551                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
552                        }
553                    }
554
555                    2 => {
556                        if let Some(value) = self.mic_mute.take() {
557                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
558                                value,
559                                preallocated.encoder,
560                                &mut out,
561                                (),
562                            )?;
563                        } else {
564                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
565                        }
566                    }
567
568                    1 => {
569                        if let Some(value) = self.volume.take() {
570                            ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
571                                value,
572                                preallocated.encoder,
573                                &mut out,
574                                (),
575                            )?;
576                        } else {
577                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
578                        }
579                    }
580
581                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
582                }
583                unsafe {
584                    preallocated.write_next(out.assume_init_ref());
585                }
586            }
587
588            ::fidl_next::wire::Table::encode_len(table, max_ord);
589
590            Ok(())
591        }
592    }
593
594    impl<'de> ::fidl_next::FromWire<crate::wire::MediaButtonsEvent<'de>> for MediaButtonsEvent {
595        #[inline]
596        fn from_wire(wire_: crate::wire::MediaButtonsEvent<'de>) -> Self {
597            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
598
599            let volume = wire_.table.get(1);
600
601            let mic_mute = wire_.table.get(2);
602
603            let pause = wire_.table.get(3);
604
605            let camera_disable = wire_.table.get(4);
606
607            let power = wire_.table.get(5);
608
609            let function = wire_.table.get(6);
610
611            let device_id = wire_.table.get(7);
612
613            let wake_lease = wire_.table.get(8);
614
615            let trace_flow_id = wire_.table.get(9);
616
617            Self {
618                volume: volume.map(|envelope| {
619                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<i8>() })
620                }),
621
622                mic_mute: mic_mute.map(|envelope| {
623                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
624                }),
625
626                pause: pause.map(|envelope| {
627                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
628                }),
629
630                camera_disable: camera_disable.map(|envelope| {
631                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
632                }),
633
634                power: power.map(|envelope| {
635                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
636                }),
637
638                function: function.map(|envelope| {
639                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
640                }),
641
642                device_id: device_id.map(|envelope| {
643                    ::fidl_next::FromWire::from_wire(unsafe {
644                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
645                    })
646                }),
647
648                wake_lease: wake_lease.map(|envelope| {
649                    ::fidl_next::FromWire::from_wire(unsafe {
650                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
651                    })
652                }),
653
654                trace_flow_id: trace_flow_id.map(|envelope| {
655                    ::fidl_next::FromWire::from_wire(unsafe {
656                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
657                    })
658                }),
659            }
660        }
661    }
662
663    #[derive(Debug, Default, PartialEq)]
664    pub struct TouchButtonsEvent {
665        pub event_time: ::core::option::Option<i64>,
666
667        pub device_info: ::core::option::Option<crate::natural::TouchDeviceInfo>,
668
669        pub pressed_buttons: ::core::option::Option<::std::vec::Vec<crate::natural::TouchButton>>,
670
671        pub wake_lease: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
672
673        pub trace_flow_id: ::core::option::Option<u64>,
674    }
675
676    impl TouchButtonsEvent {
677        fn __max_ordinal(&self) -> usize {
678            if self.trace_flow_id.is_some() {
679                return 5;
680            }
681
682            if self.wake_lease.is_some() {
683                return 4;
684            }
685
686            if self.pressed_buttons.is_some() {
687                return 3;
688            }
689
690            if self.device_info.is_some() {
691                return 2;
692            }
693
694            if self.event_time.is_some() {
695                return 1;
696            }
697
698            0
699        }
700    }
701
702    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TouchButtonsEvent<'static>, ___E>
703        for TouchButtonsEvent
704    where
705        ___E: ::fidl_next::Encoder + ?Sized,
706        ___E: ::fidl_next::fuchsia::HandleEncoder,
707    {
708        #[inline]
709        fn encode(
710            mut self,
711            encoder: &mut ___E,
712            out: &mut ::core::mem::MaybeUninit<crate::wire::TouchButtonsEvent<'static>>,
713            _: (),
714        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
715            ::fidl_next::munge!(let crate::wire::TouchButtonsEvent { table } = out);
716
717            let max_ord = self.__max_ordinal();
718
719            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
720            ::fidl_next::Wire::zero_padding(&mut out);
721
722            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
723                ::fidl_next::wire::Envelope,
724            >(encoder, max_ord);
725
726            for i in 1..=max_ord {
727                match i {
728                    5 => {
729                        if let Some(value) = self.trace_flow_id.take() {
730                            ::fidl_next::wire::Envelope::encode_value::<
731                                ::fidl_next::wire::Uint64,
732                                ___E,
733                            >(
734                                value, preallocated.encoder, &mut out, ()
735                            )?;
736                        } else {
737                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
738                        }
739                    }
740
741                    4 => {
742                        if let Some(value) = self.wake_lease.take() {
743                            ::fidl_next::wire::Envelope::encode_value::<
744                                ::fidl_next::wire::fuchsia::EventPair,
745                                ___E,
746                            >(
747                                value, preallocated.encoder, &mut out, ()
748                            )?;
749                        } else {
750                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
751                        }
752                    }
753
754                    3 => {
755                        if let Some(value) = self.pressed_buttons.take() {
756                            ::fidl_next::wire::Envelope::encode_value::<
757                                ::fidl_next::wire::Vector<'static, crate::wire::TouchButton>,
758                                ___E,
759                            >(
760                                value, preallocated.encoder, &mut out, (4294967295, ())
761                            )?;
762                        } else {
763                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
764                        }
765                    }
766
767                    2 => {
768                        if let Some(value) = self.device_info.take() {
769                            ::fidl_next::wire::Envelope::encode_value::<
770                                crate::wire::TouchDeviceInfo<'static>,
771                                ___E,
772                            >(
773                                value, preallocated.encoder, &mut out, ()
774                            )?;
775                        } else {
776                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
777                        }
778                    }
779
780                    1 => {
781                        if let Some(value) = self.event_time.take() {
782                            ::fidl_next::wire::Envelope::encode_value::<
783                                ::fidl_next::wire::Int64,
784                                ___E,
785                            >(
786                                value, preallocated.encoder, &mut out, ()
787                            )?;
788                        } else {
789                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
790                        }
791                    }
792
793                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
794                }
795                unsafe {
796                    preallocated.write_next(out.assume_init_ref());
797                }
798            }
799
800            ::fidl_next::wire::Table::encode_len(table, max_ord);
801
802            Ok(())
803        }
804    }
805
806    impl<'de> ::fidl_next::FromWire<crate::wire::TouchButtonsEvent<'de>> for TouchButtonsEvent {
807        #[inline]
808        fn from_wire(wire_: crate::wire::TouchButtonsEvent<'de>) -> Self {
809            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
810
811            let event_time = wire_.table.get(1);
812
813            let device_info = wire_.table.get(2);
814
815            let pressed_buttons = wire_.table.get(3);
816
817            let wake_lease = wire_.table.get(4);
818
819            let trace_flow_id = wire_.table.get(5);
820
821            Self {
822
823
824                event_time: event_time.map(|envelope| ::fidl_next::FromWire::from_wire(
825                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() }
826                )),
827
828
829                device_info: device_info.map(|envelope| ::fidl_next::FromWire::from_wire(
830                    unsafe { envelope.read_unchecked::<crate::wire::TouchDeviceInfo<'de>>() }
831                )),
832
833
834                pressed_buttons: pressed_buttons.map(|envelope| ::fidl_next::FromWire::from_wire(
835                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>() }
836                )),
837
838
839                wake_lease: wake_lease.map(|envelope| ::fidl_next::FromWire::from_wire(
840                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>() }
841                )),
842
843
844                trace_flow_id: trace_flow_id.map(|envelope| ::fidl_next::FromWire::from_wire(
845                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
846                )),
847
848        }
849        }
850    }
851}
852
853pub mod wire {
854
855    pub use fidl_next_common_fuchsia_ui_input::wire::*;
856
857    /// The wire type corresponding to [`DeviceListenerRegistryRegisterListenerRequest`].
858    #[derive(Debug)]
859    #[repr(C)]
860    pub struct DeviceListenerRegistryRegisterListenerRequest {
861        pub listener:
862            ::fidl_next::ClientEnd<crate::DeviceListener, ::fidl_next::wire::fuchsia::Channel>,
863    }
864
865    static_assertions::const_assert_eq!(
866        std::mem::size_of::<DeviceListenerRegistryRegisterListenerRequest>(),
867        4
868    );
869    static_assertions::const_assert_eq!(
870        std::mem::align_of::<DeviceListenerRegistryRegisterListenerRequest>(),
871        4
872    );
873
874    static_assertions::const_assert_eq!(
875        std::mem::offset_of!(DeviceListenerRegistryRegisterListenerRequest, listener),
876        0
877    );
878
879    impl ::fidl_next::Constrained for DeviceListenerRegistryRegisterListenerRequest {
880        type Constraint = ();
881
882        fn validate(
883            _: ::fidl_next::Slot<'_, Self>,
884            _: Self::Constraint,
885        ) -> Result<(), ::fidl_next::ValidationError> {
886            Ok(())
887        }
888    }
889
890    unsafe impl ::fidl_next::Wire for DeviceListenerRegistryRegisterListenerRequest {
891        type Narrowed<'de> = DeviceListenerRegistryRegisterListenerRequest;
892
893        #[inline]
894        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
895            ::fidl_next::munge! {
896                let Self {
897                    listener,
898
899                } = &mut *out_;
900            }
901
902            ::fidl_next::Wire::zero_padding(listener);
903        }
904    }
905
906    unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceListenerRegistryRegisterListenerRequest
907    where
908        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
909        ___D: ::fidl_next::fuchsia::HandleDecoder,
910    {
911        fn decode(
912            slot_: ::fidl_next::Slot<'_, Self>,
913            decoder_: &mut ___D,
914            _: (),
915        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
916            ::fidl_next::munge! {
917                let Self {
918                    mut listener,
919
920                } = slot_;
921            }
922
923            let _field = listener.as_mut();
924
925            ::fidl_next::Decode::decode(listener.as_mut(), decoder_, ())?;
926
927            Ok(())
928        }
929    }
930
931    impl ::fidl_next::IntoNatural for DeviceListenerRegistryRegisterListenerRequest {
932        type Natural = crate::natural::DeviceListenerRegistryRegisterListenerRequest;
933    }
934
935    /// The wire type corresponding to [`DeviceListenerRegistryRegisterListenerResponse`].
936    #[derive(Debug)]
937    #[repr(C)]
938    pub struct DeviceListenerRegistryRegisterListenerResponse {
939        pub iterator:
940            ::fidl_next::ClientEnd<crate::DeviceIterator, ::fidl_next::wire::fuchsia::Channel>,
941    }
942
943    static_assertions::const_assert_eq!(
944        std::mem::size_of::<DeviceListenerRegistryRegisterListenerResponse>(),
945        4
946    );
947    static_assertions::const_assert_eq!(
948        std::mem::align_of::<DeviceListenerRegistryRegisterListenerResponse>(),
949        4
950    );
951
952    static_assertions::const_assert_eq!(
953        std::mem::offset_of!(DeviceListenerRegistryRegisterListenerResponse, iterator),
954        0
955    );
956
957    impl ::fidl_next::Constrained for DeviceListenerRegistryRegisterListenerResponse {
958        type Constraint = ();
959
960        fn validate(
961            _: ::fidl_next::Slot<'_, Self>,
962            _: Self::Constraint,
963        ) -> Result<(), ::fidl_next::ValidationError> {
964            Ok(())
965        }
966    }
967
968    unsafe impl ::fidl_next::Wire for DeviceListenerRegistryRegisterListenerResponse {
969        type Narrowed<'de> = DeviceListenerRegistryRegisterListenerResponse;
970
971        #[inline]
972        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
973            ::fidl_next::munge! {
974                let Self {
975                    iterator,
976
977                } = &mut *out_;
978            }
979
980            ::fidl_next::Wire::zero_padding(iterator);
981        }
982    }
983
984    unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceListenerRegistryRegisterListenerResponse
985    where
986        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
987        ___D: ::fidl_next::fuchsia::HandleDecoder,
988    {
989        fn decode(
990            slot_: ::fidl_next::Slot<'_, Self>,
991            decoder_: &mut ___D,
992            _: (),
993        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
994            ::fidl_next::munge! {
995                let Self {
996                    mut iterator,
997
998                } = slot_;
999            }
1000
1001            let _field = iterator.as_mut();
1002
1003            ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
1004
1005            Ok(())
1006        }
1007    }
1008
1009    impl ::fidl_next::IntoNatural for DeviceListenerRegistryRegisterListenerResponse {
1010        type Natural = crate::natural::DeviceListenerRegistryRegisterListenerResponse;
1011    }
1012
1013    /// The wire type corresponding to [`ImeServiceGetInputMethodEditorRequest`].
1014    #[derive(Debug)]
1015    #[repr(C)]
1016    pub struct ImeServiceGetInputMethodEditorRequest<'de> {
1017        pub keyboard_type: crate::wire::KeyboardType,
1018
1019        pub action: crate::wire::InputMethodAction,
1020
1021        pub initial_state: crate::wire::TextInputState<'de>,
1022
1023        pub client: ::fidl_next::ClientEnd<
1024            crate::InputMethodEditorClient,
1025            ::fidl_next::wire::fuchsia::Channel,
1026        >,
1027
1028        pub editor:
1029            ::fidl_next::ServerEnd<crate::InputMethodEditor, ::fidl_next::wire::fuchsia::Channel>,
1030    }
1031
1032    static_assertions::const_assert_eq!(
1033        std::mem::size_of::<ImeServiceGetInputMethodEditorRequest<'_>>(),
1034        80
1035    );
1036    static_assertions::const_assert_eq!(
1037        std::mem::align_of::<ImeServiceGetInputMethodEditorRequest<'_>>(),
1038        8
1039    );
1040
1041    static_assertions::const_assert_eq!(
1042        std::mem::offset_of!(ImeServiceGetInputMethodEditorRequest<'_>, keyboard_type),
1043        0
1044    );
1045
1046    static_assertions::const_assert_eq!(
1047        std::mem::offset_of!(ImeServiceGetInputMethodEditorRequest<'_>, action),
1048        4
1049    );
1050
1051    static_assertions::const_assert_eq!(
1052        std::mem::offset_of!(ImeServiceGetInputMethodEditorRequest<'_>, initial_state),
1053        8
1054    );
1055
1056    static_assertions::const_assert_eq!(
1057        std::mem::offset_of!(ImeServiceGetInputMethodEditorRequest<'_>, client),
1058        72
1059    );
1060
1061    static_assertions::const_assert_eq!(
1062        std::mem::offset_of!(ImeServiceGetInputMethodEditorRequest<'_>, editor),
1063        76
1064    );
1065
1066    impl ::fidl_next::Constrained for ImeServiceGetInputMethodEditorRequest<'_> {
1067        type Constraint = ();
1068
1069        fn validate(
1070            _: ::fidl_next::Slot<'_, Self>,
1071            _: Self::Constraint,
1072        ) -> Result<(), ::fidl_next::ValidationError> {
1073            Ok(())
1074        }
1075    }
1076
1077    unsafe impl ::fidl_next::Wire for ImeServiceGetInputMethodEditorRequest<'static> {
1078        type Narrowed<'de> = ImeServiceGetInputMethodEditorRequest<'de>;
1079
1080        #[inline]
1081        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1082            ::fidl_next::munge! {
1083                let Self {
1084                    keyboard_type,
1085                    action,
1086                    initial_state,
1087                    client,
1088                    editor,
1089
1090                } = &mut *out_;
1091            }
1092
1093            ::fidl_next::Wire::zero_padding(keyboard_type);
1094
1095            ::fidl_next::Wire::zero_padding(action);
1096
1097            ::fidl_next::Wire::zero_padding(initial_state);
1098
1099            ::fidl_next::Wire::zero_padding(client);
1100
1101            ::fidl_next::Wire::zero_padding(editor);
1102        }
1103    }
1104
1105    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ImeServiceGetInputMethodEditorRequest<'de>
1106    where
1107        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1108        ___D: ::fidl_next::Decoder<'de>,
1109        ___D: ::fidl_next::fuchsia::HandleDecoder,
1110    {
1111        fn decode(
1112            slot_: ::fidl_next::Slot<'_, Self>,
1113            decoder_: &mut ___D,
1114            _: (),
1115        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1116            ::fidl_next::munge! {
1117                let Self {
1118                    mut keyboard_type,
1119                    mut action,
1120                    mut initial_state,
1121                    mut client,
1122                    mut editor,
1123
1124                } = slot_;
1125            }
1126
1127            let _field = keyboard_type.as_mut();
1128
1129            ::fidl_next::Decode::decode(keyboard_type.as_mut(), decoder_, ())?;
1130
1131            let _field = action.as_mut();
1132
1133            ::fidl_next::Decode::decode(action.as_mut(), decoder_, ())?;
1134
1135            let _field = initial_state.as_mut();
1136
1137            ::fidl_next::Decode::decode(initial_state.as_mut(), decoder_, ())?;
1138
1139            let _field = client.as_mut();
1140
1141            ::fidl_next::Decode::decode(client.as_mut(), decoder_, ())?;
1142
1143            let _field = editor.as_mut();
1144
1145            ::fidl_next::Decode::decode(editor.as_mut(), decoder_, ())?;
1146
1147            Ok(())
1148        }
1149    }
1150
1151    impl<'de> ::fidl_next::IntoNatural for ImeServiceGetInputMethodEditorRequest<'de> {
1152        type Natural = crate::natural::ImeServiceGetInputMethodEditorRequest;
1153    }
1154
1155    /// The wire type corresponding to [`MediaButtonsEvent`].
1156    #[repr(C)]
1157    pub struct MediaButtonsEvent<'de> {
1158        pub(crate) table: ::fidl_next::wire::Table<'de>,
1159    }
1160
1161    impl<'de> Drop for MediaButtonsEvent<'de> {
1162        fn drop(&mut self) {
1163            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
1164
1165            let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
1166
1167            let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
1168
1169            let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
1170
1171            let _ = self.table.get(5).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
1172
1173            let _ = self.table.get(6).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
1174
1175            let _ = self
1176                .table
1177                .get(7)
1178                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
1179
1180            let _ = self.table.get(8).map(|envelope| unsafe {
1181                envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
1182            });
1183
1184            let _ = self
1185                .table
1186                .get(9)
1187                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
1188        }
1189    }
1190
1191    impl ::fidl_next::Constrained for MediaButtonsEvent<'_> {
1192        type Constraint = ();
1193
1194        fn validate(
1195            _: ::fidl_next::Slot<'_, Self>,
1196            _: Self::Constraint,
1197        ) -> Result<(), ::fidl_next::ValidationError> {
1198            Ok(())
1199        }
1200    }
1201
1202    unsafe impl ::fidl_next::Wire for MediaButtonsEvent<'static> {
1203        type Narrowed<'de> = MediaButtonsEvent<'de>;
1204
1205        #[inline]
1206        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1207            ::fidl_next::munge!(let Self { table } = out);
1208            ::fidl_next::wire::Table::zero_padding(table);
1209        }
1210    }
1211
1212    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MediaButtonsEvent<'de>
1213    where
1214        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1215        ___D: ::fidl_next::fuchsia::HandleDecoder,
1216    {
1217        fn decode(
1218            slot: ::fidl_next::Slot<'_, Self>,
1219            decoder: &mut ___D,
1220            _: (),
1221        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1222            ::fidl_next::munge!(let Self { table } = slot);
1223
1224            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1225                match ordinal {
1226                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1227
1228                    1 => {
1229                        ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
1230                            slot.as_mut(),
1231                            decoder,
1232                            (),
1233                        )?;
1234
1235                        Ok(())
1236                    }
1237
1238                    2 => {
1239                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
1240                            slot.as_mut(),
1241                            decoder,
1242                            (),
1243                        )?;
1244
1245                        Ok(())
1246                    }
1247
1248                    3 => {
1249                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
1250                            slot.as_mut(),
1251                            decoder,
1252                            (),
1253                        )?;
1254
1255                        Ok(())
1256                    }
1257
1258                    4 => {
1259                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
1260                            slot.as_mut(),
1261                            decoder,
1262                            (),
1263                        )?;
1264
1265                        Ok(())
1266                    }
1267
1268                    5 => {
1269                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
1270                            slot.as_mut(),
1271                            decoder,
1272                            (),
1273                        )?;
1274
1275                        Ok(())
1276                    }
1277
1278                    6 => {
1279                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
1280                            slot.as_mut(),
1281                            decoder,
1282                            (),
1283                        )?;
1284
1285                        Ok(())
1286                    }
1287
1288                    7 => {
1289                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
1290                            slot.as_mut(),
1291                            decoder,
1292                            (),
1293                        )?;
1294
1295                        Ok(())
1296                    }
1297
1298                    8 => {
1299                        ::fidl_next::wire::Envelope::decode_as::<
1300                            ___D,
1301                            ::fidl_next::wire::fuchsia::EventPair,
1302                        >(slot.as_mut(), decoder, ())?;
1303
1304                        Ok(())
1305                    }
1306
1307                    9 => {
1308                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
1309                            slot.as_mut(),
1310                            decoder,
1311                            (),
1312                        )?;
1313
1314                        Ok(())
1315                    }
1316
1317                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1318                }
1319            })
1320        }
1321    }
1322
1323    impl<'de> MediaButtonsEvent<'de> {
1324        pub fn volume(&self) -> ::core::option::Option<&i8> {
1325            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1326        }
1327
1328        pub fn take_volume(&mut self) -> ::core::option::Option<i8> {
1329            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1330        }
1331
1332        pub fn mic_mute(&self) -> ::core::option::Option<&bool> {
1333            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1334        }
1335
1336        pub fn take_mic_mute(&mut self) -> ::core::option::Option<bool> {
1337            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1338        }
1339
1340        pub fn pause(&self) -> ::core::option::Option<&bool> {
1341            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1342        }
1343
1344        pub fn take_pause(&mut self) -> ::core::option::Option<bool> {
1345            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
1346        }
1347
1348        pub fn camera_disable(&self) -> ::core::option::Option<&bool> {
1349            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1350        }
1351
1352        pub fn take_camera_disable(&mut self) -> ::core::option::Option<bool> {
1353            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
1354        }
1355
1356        pub fn power(&self) -> ::core::option::Option<&bool> {
1357            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
1358        }
1359
1360        pub fn take_power(&mut self) -> ::core::option::Option<bool> {
1361            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
1362        }
1363
1364        pub fn function(&self) -> ::core::option::Option<&bool> {
1365            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
1366        }
1367
1368        pub fn take_function(&mut self) -> ::core::option::Option<bool> {
1369            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
1370        }
1371
1372        pub fn device_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
1373            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
1374        }
1375
1376        pub fn take_device_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
1377            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
1378        }
1379
1380        pub fn wake_lease(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
1381            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
1382        }
1383
1384        pub fn take_wake_lease(
1385            &mut self,
1386        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
1387            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
1388        }
1389
1390        pub fn trace_flow_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
1391            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
1392        }
1393
1394        pub fn take_trace_flow_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
1395            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
1396        }
1397    }
1398
1399    impl<'de> ::core::fmt::Debug for MediaButtonsEvent<'de> {
1400        fn fmt(
1401            &self,
1402            f: &mut ::core::fmt::Formatter<'_>,
1403        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1404            f.debug_struct("MediaButtonsEvent")
1405                .field("volume", &self.volume())
1406                .field("mic_mute", &self.mic_mute())
1407                .field("pause", &self.pause())
1408                .field("camera_disable", &self.camera_disable())
1409                .field("power", &self.power())
1410                .field("function", &self.function())
1411                .field("device_id", &self.device_id())
1412                .field("wake_lease", &self.wake_lease())
1413                .field("trace_flow_id", &self.trace_flow_id())
1414                .finish()
1415        }
1416    }
1417
1418    impl<'de> ::fidl_next::IntoNatural for MediaButtonsEvent<'de> {
1419        type Natural = crate::natural::MediaButtonsEvent;
1420    }
1421
1422    /// The wire type corresponding to [`TouchButtonsEvent`].
1423    #[repr(C)]
1424    pub struct TouchButtonsEvent<'de> {
1425        pub(crate) table: ::fidl_next::wire::Table<'de>,
1426    }
1427
1428    impl<'de> Drop for TouchButtonsEvent<'de> {
1429        fn drop(&mut self) {
1430            let _ = self
1431                .table
1432                .get(1)
1433                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
1434
1435            let _ = self.table.get(2).map(|envelope| unsafe {
1436                envelope.read_unchecked::<crate::wire::TouchDeviceInfo<'de>>()
1437            });
1438
1439            let _ = self.table.get(3).map(|envelope| unsafe {
1440                envelope
1441                    .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>()
1442            });
1443
1444            let _ = self.table.get(4).map(|envelope| unsafe {
1445                envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
1446            });
1447
1448            let _ = self
1449                .table
1450                .get(5)
1451                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
1452        }
1453    }
1454
1455    impl ::fidl_next::Constrained for TouchButtonsEvent<'_> {
1456        type Constraint = ();
1457
1458        fn validate(
1459            _: ::fidl_next::Slot<'_, Self>,
1460            _: Self::Constraint,
1461        ) -> Result<(), ::fidl_next::ValidationError> {
1462            Ok(())
1463        }
1464    }
1465
1466    unsafe impl ::fidl_next::Wire for TouchButtonsEvent<'static> {
1467        type Narrowed<'de> = TouchButtonsEvent<'de>;
1468
1469        #[inline]
1470        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1471            ::fidl_next::munge!(let Self { table } = out);
1472            ::fidl_next::wire::Table::zero_padding(table);
1473        }
1474    }
1475
1476    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TouchButtonsEvent<'de>
1477    where
1478        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1479        ___D: ::fidl_next::fuchsia::HandleDecoder,
1480    {
1481        fn decode(
1482            slot: ::fidl_next::Slot<'_, Self>,
1483            decoder: &mut ___D,
1484            _: (),
1485        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1486            ::fidl_next::munge!(let Self { table } = slot);
1487
1488            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1489                match ordinal {
1490                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1491
1492                    1 => {
1493                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
1494                            slot.as_mut(),
1495                            decoder,
1496                            (),
1497                        )?;
1498
1499                        Ok(())
1500                    }
1501
1502                    2 => {
1503                        ::fidl_next::wire::Envelope::decode_as::<
1504                            ___D,
1505                            crate::wire::TouchDeviceInfo<'de>,
1506                        >(slot.as_mut(), decoder, ())?;
1507
1508                        Ok(())
1509                    }
1510
1511                    3 => {
1512                        ::fidl_next::wire::Envelope::decode_as::<
1513                            ___D,
1514                            ::fidl_next::wire::Vector<'de, crate::wire::TouchButton>,
1515                        >(slot.as_mut(), decoder, (4294967295, ()))?;
1516
1517                        Ok(())
1518                    }
1519
1520                    4 => {
1521                        ::fidl_next::wire::Envelope::decode_as::<
1522                            ___D,
1523                            ::fidl_next::wire::fuchsia::EventPair,
1524                        >(slot.as_mut(), decoder, ())?;
1525
1526                        Ok(())
1527                    }
1528
1529                    5 => {
1530                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
1531                            slot.as_mut(),
1532                            decoder,
1533                            (),
1534                        )?;
1535
1536                        Ok(())
1537                    }
1538
1539                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1540                }
1541            })
1542        }
1543    }
1544
1545    impl<'de> TouchButtonsEvent<'de> {
1546        pub fn event_time(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
1547            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1548        }
1549
1550        pub fn take_event_time(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
1551            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1552        }
1553
1554        pub fn device_info(&self) -> ::core::option::Option<&crate::wire::TouchDeviceInfo<'de>> {
1555            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1556        }
1557
1558        pub fn take_device_info(
1559            &mut self,
1560        ) -> ::core::option::Option<crate::wire::TouchDeviceInfo<'de>> {
1561            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1562        }
1563
1564        pub fn pressed_buttons(
1565            &self,
1566        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>
1567        {
1568            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1569        }
1570
1571        pub fn take_pressed_buttons(
1572            &mut self,
1573        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::TouchButton>>
1574        {
1575            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
1576        }
1577
1578        pub fn wake_lease(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
1579            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1580        }
1581
1582        pub fn take_wake_lease(
1583            &mut self,
1584        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
1585            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
1586        }
1587
1588        pub fn trace_flow_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
1589            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
1590        }
1591
1592        pub fn take_trace_flow_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
1593            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
1594        }
1595    }
1596
1597    impl<'de> ::core::fmt::Debug for TouchButtonsEvent<'de> {
1598        fn fmt(
1599            &self,
1600            f: &mut ::core::fmt::Formatter<'_>,
1601        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1602            f.debug_struct("TouchButtonsEvent")
1603                .field("event_time", &self.event_time())
1604                .field("device_info", &self.device_info())
1605                .field("pressed_buttons", &self.pressed_buttons())
1606                .field("wake_lease", &self.wake_lease())
1607                .field("trace_flow_id", &self.trace_flow_id())
1608                .finish()
1609        }
1610    }
1611
1612    impl<'de> ::fidl_next::IntoNatural for TouchButtonsEvent<'de> {
1613        type Natural = crate::natural::TouchButtonsEvent;
1614    }
1615}
1616
1617pub mod wire_optional {
1618
1619    pub use fidl_next_common_fuchsia_ui_input::wire_optional::*;
1620}
1621
1622pub mod generic {
1623
1624    pub use fidl_next_common_fuchsia_ui_input::generic::*;
1625
1626    /// The generic type corresponding to [`DeviceListenerRegistryRegisterListenerRequest`].
1627    pub struct DeviceListenerRegistryRegisterListenerRequest<T0> {
1628        pub listener: T0,
1629    }
1630
1631    unsafe impl<___E, T0>
1632        ::fidl_next::Encode<crate::wire::DeviceListenerRegistryRegisterListenerRequest, ___E>
1633        for DeviceListenerRegistryRegisterListenerRequest<T0>
1634    where
1635        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1636        ___E: ::fidl_next::fuchsia::HandleEncoder,
1637        T0: ::fidl_next::Encode<
1638                ::fidl_next::ClientEnd<crate::DeviceListener, ::fidl_next::wire::fuchsia::Channel>,
1639                ___E,
1640            >,
1641    {
1642        #[inline]
1643        fn encode(
1644            self,
1645            encoder_: &mut ___E,
1646            out_: &mut ::core::mem::MaybeUninit<
1647                crate::wire::DeviceListenerRegistryRegisterListenerRequest,
1648            >,
1649            _: (),
1650        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1651            ::fidl_next::munge! {
1652                let crate::wire::DeviceListenerRegistryRegisterListenerRequest {
1653                    listener,
1654
1655                } = out_;
1656            }
1657
1658            ::fidl_next::Encode::encode(self.listener, encoder_, listener, ())?;
1659
1660            Ok(())
1661        }
1662    }
1663
1664    /// The generic type corresponding to [`DeviceListenerRegistryRegisterListenerResponse`].
1665    pub struct DeviceListenerRegistryRegisterListenerResponse<T0> {
1666        pub iterator: T0,
1667    }
1668
1669    unsafe impl<___E, T0>
1670        ::fidl_next::Encode<crate::wire::DeviceListenerRegistryRegisterListenerResponse, ___E>
1671        for DeviceListenerRegistryRegisterListenerResponse<T0>
1672    where
1673        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1674        ___E: ::fidl_next::fuchsia::HandleEncoder,
1675        T0: ::fidl_next::Encode<
1676                ::fidl_next::ClientEnd<crate::DeviceIterator, ::fidl_next::wire::fuchsia::Channel>,
1677                ___E,
1678            >,
1679    {
1680        #[inline]
1681        fn encode(
1682            self,
1683            encoder_: &mut ___E,
1684            out_: &mut ::core::mem::MaybeUninit<
1685                crate::wire::DeviceListenerRegistryRegisterListenerResponse,
1686            >,
1687            _: (),
1688        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1689            ::fidl_next::munge! {
1690                let crate::wire::DeviceListenerRegistryRegisterListenerResponse {
1691                    iterator,
1692
1693                } = out_;
1694            }
1695
1696            ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
1697
1698            Ok(())
1699        }
1700    }
1701
1702    /// The generic type corresponding to [`ImeServiceGetInputMethodEditorRequest`].
1703    pub struct ImeServiceGetInputMethodEditorRequest<T0, T1, T2, T3, T4> {
1704        pub keyboard_type: T0,
1705
1706        pub action: T1,
1707
1708        pub initial_state: T2,
1709
1710        pub client: T3,
1711
1712        pub editor: T4,
1713    }
1714
1715    unsafe impl<___E, T0, T1, T2, T3, T4>
1716        ::fidl_next::Encode<crate::wire::ImeServiceGetInputMethodEditorRequest<'static>, ___E>
1717        for ImeServiceGetInputMethodEditorRequest<T0, T1, T2, T3, T4>
1718    where
1719        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1720        ___E: ::fidl_next::Encoder,
1721        ___E: ::fidl_next::fuchsia::HandleEncoder,
1722        T0: ::fidl_next::Encode<crate::wire::KeyboardType, ___E>,
1723        T1: ::fidl_next::Encode<crate::wire::InputMethodAction, ___E>,
1724        T2: ::fidl_next::Encode<crate::wire::TextInputState<'static>, ___E>,
1725        T3: ::fidl_next::Encode<
1726                ::fidl_next::ClientEnd<
1727                    crate::InputMethodEditorClient,
1728                    ::fidl_next::wire::fuchsia::Channel,
1729                >,
1730                ___E,
1731            >,
1732        T4: ::fidl_next::Encode<
1733                ::fidl_next::ServerEnd<
1734                    crate::InputMethodEditor,
1735                    ::fidl_next::wire::fuchsia::Channel,
1736                >,
1737                ___E,
1738            >,
1739    {
1740        #[inline]
1741        fn encode(
1742            self,
1743            encoder_: &mut ___E,
1744            out_: &mut ::core::mem::MaybeUninit<
1745                crate::wire::ImeServiceGetInputMethodEditorRequest<'static>,
1746            >,
1747            _: (),
1748        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1749            ::fidl_next::munge! {
1750                let crate::wire::ImeServiceGetInputMethodEditorRequest {
1751                    keyboard_type,
1752                    action,
1753                    initial_state,
1754                    client,
1755                    editor,
1756
1757                } = out_;
1758            }
1759
1760            ::fidl_next::Encode::encode(self.keyboard_type, encoder_, keyboard_type, ())?;
1761
1762            ::fidl_next::Encode::encode(self.action, encoder_, action, ())?;
1763
1764            ::fidl_next::Encode::encode(self.initial_state, encoder_, initial_state, ())?;
1765
1766            ::fidl_next::Encode::encode(self.client, encoder_, client, ())?;
1767
1768            ::fidl_next::Encode::encode(self.editor, encoder_, editor, ())?;
1769
1770            Ok(())
1771        }
1772    }
1773}
1774
1775pub use self::natural::*;
1776
1777/// The type corresponding to the DeviceListenerRegistry protocol.
1778#[doc = " Registry service that allows clients to monitor input device changes.\n"]
1779#[derive(PartialEq, Debug)]
1780pub struct DeviceListenerRegistry;
1781
1782impl ::fidl_next::Discoverable for DeviceListenerRegistry {
1783    const PROTOCOL_NAME: &'static str = "fuchsia.ui.input.DeviceListenerRegistry";
1784}
1785
1786#[cfg(target_os = "fuchsia")]
1787impl ::fidl_next::HasTransport for DeviceListenerRegistry {
1788    type Transport = ::fidl_next::fuchsia::zx::Channel;
1789}
1790
1791pub mod device_listener_registry {
1792    pub mod prelude {
1793        pub use crate::{
1794            DeviceListenerRegistry, DeviceListenerRegistryClientHandler,
1795            DeviceListenerRegistryLocalClientHandler, DeviceListenerRegistryLocalServerHandler,
1796            DeviceListenerRegistryServerHandler, device_listener_registry,
1797        };
1798
1799        pub use crate::natural::DeviceListenerRegistryRegisterListenerRequest;
1800
1801        pub use crate::natural::DeviceListenerRegistryRegisterListenerResponse;
1802    }
1803
1804    pub struct RegisterListener;
1805
1806    impl ::fidl_next::Method for RegisterListener {
1807        const ORDINAL: u64 = 2866676296029265929;
1808        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1809            ::fidl_next::protocol::Flexibility::Strict;
1810
1811        type Protocol = crate::DeviceListenerRegistry;
1812
1813        type Request = crate::wire::DeviceListenerRegistryRegisterListenerRequest;
1814    }
1815
1816    impl ::fidl_next::TwoWayMethod for RegisterListener {
1817        type Response =
1818            ::fidl_next::wire::Strict<crate::wire::DeviceListenerRegistryRegisterListenerResponse>;
1819    }
1820
1821    impl<___R> ::fidl_next::Respond<___R> for RegisterListener {
1822        type Output = ::fidl_next::Strict<
1823            crate::generic::DeviceListenerRegistryRegisterListenerResponse<___R>,
1824        >;
1825
1826        fn respond(response: ___R) -> Self::Output {
1827            ::fidl_next::Strict(crate::generic::DeviceListenerRegistryRegisterListenerResponse {
1828                iterator: response,
1829            })
1830        }
1831    }
1832
1833    mod ___detail {
1834        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DeviceListenerRegistry
1835        where
1836            ___T: ::fidl_next::Transport,
1837        {
1838            type Client = DeviceListenerRegistryClient<___T>;
1839            type Server = DeviceListenerRegistryServer<___T>;
1840        }
1841
1842        /// The client for the `DeviceListenerRegistry` protocol.
1843        #[repr(transparent)]
1844        pub struct DeviceListenerRegistryClient<___T: ::fidl_next::Transport> {
1845            #[allow(dead_code)]
1846            client: ::fidl_next::protocol::Client<___T>,
1847        }
1848
1849        impl<___T> DeviceListenerRegistryClient<___T>
1850        where
1851            ___T: ::fidl_next::Transport,
1852        {
1853            #[doc = " Registers a listener to receive future device change events.\n\n Returns a `DeviceIterator` which the client MUST use to drain the list\n of devices that were already active at the time of registration.\n"]
1854            pub fn register_listener(
1855                &self,
1856
1857                listener: impl ::fidl_next::Encode<
1858                    ::fidl_next::ClientEnd<
1859                        crate::DeviceListener,
1860                        ::fidl_next::wire::fuchsia::Channel,
1861                    >,
1862                    <___T as ::fidl_next::Transport>::SendBuffer,
1863                >,
1864            ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterListener, ___T>
1865            where
1866                <___T as ::fidl_next::Transport>::SendBuffer:
1867                    ::fidl_next::encoder::InternalHandleEncoder,
1868                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1869            {
1870                self.register_listener_with(
1871                    crate::generic::DeviceListenerRegistryRegisterListenerRequest { listener },
1872                )
1873            }
1874
1875            #[doc = " Registers a listener to receive future device change events.\n\n Returns a `DeviceIterator` which the client MUST use to drain the list\n of devices that were already active at the time of registration.\n"]
1876            pub fn register_listener_with<___R>(
1877                &self,
1878                request: ___R,
1879            ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterListener, ___T>
1880            where
1881                ___R: ::fidl_next::Encode<
1882                        crate::wire::DeviceListenerRegistryRegisterListenerRequest,
1883                        <___T as ::fidl_next::Transport>::SendBuffer,
1884                    >,
1885            {
1886                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1887                    2866676296029265929,
1888                    <super::RegisterListener as ::fidl_next::Method>::FLEXIBILITY,
1889                    request,
1890                ))
1891            }
1892        }
1893
1894        /// The server for the `DeviceListenerRegistry` protocol.
1895        #[repr(transparent)]
1896        pub struct DeviceListenerRegistryServer<___T: ::fidl_next::Transport> {
1897            server: ::fidl_next::protocol::Server<___T>,
1898        }
1899
1900        impl<___T> DeviceListenerRegistryServer<___T> where ___T: ::fidl_next::Transport {}
1901    }
1902}
1903
1904#[diagnostic::on_unimplemented(
1905    note = "If {Self} implements the non-local DeviceListenerRegistryClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1906)]
1907
1908/// A client handler for the DeviceListenerRegistry protocol.
1909///
1910/// See [`DeviceListenerRegistry`] for more details.
1911pub trait DeviceListenerRegistryLocalClientHandler<
1912    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1913    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1914>
1915{
1916    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1917        ::core::future::ready(())
1918    }
1919}
1920
1921impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DeviceListenerRegistry
1922where
1923    ___H: DeviceListenerRegistryLocalClientHandler<___T>,
1924    ___T: ::fidl_next::Transport,
1925{
1926    async fn on_event(
1927        handler: &mut ___H,
1928        mut message: ::fidl_next::Message<___T>,
1929    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1930        match *message.header().ordinal {
1931            ordinal => {
1932                handler.on_unknown_interaction(ordinal).await;
1933                if ::core::matches!(
1934                    message.header().flexibility(),
1935                    ::fidl_next::protocol::Flexibility::Strict
1936                ) {
1937                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1938                } else {
1939                    Ok(())
1940                }
1941            }
1942        }
1943    }
1944}
1945
1946#[diagnostic::on_unimplemented(
1947    note = "If {Self} implements the non-local DeviceListenerRegistryServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1948)]
1949
1950/// A server handler for the DeviceListenerRegistry protocol.
1951///
1952/// See [`DeviceListenerRegistry`] for more details.
1953pub trait DeviceListenerRegistryLocalServerHandler<
1954    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1955    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1956>
1957{
1958    #[doc = " Registers a listener to receive future device change events.\n\n Returns a `DeviceIterator` which the client MUST use to drain the list\n of devices that were already active at the time of registration.\n"]
1959    fn register_listener(
1960        &mut self,
1961
1962        request: ::fidl_next::Request<device_listener_registry::RegisterListener, ___T>,
1963
1964        responder: ::fidl_next::Responder<device_listener_registry::RegisterListener, ___T>,
1965    ) -> impl ::core::future::Future<Output = ()>;
1966
1967    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1968        ::core::future::ready(())
1969    }
1970}
1971
1972impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DeviceListenerRegistry
1973where
1974    ___H: DeviceListenerRegistryLocalServerHandler<___T>,
1975    ___T: ::fidl_next::Transport,
1976    for<'de> crate::wire::DeviceListenerRegistryRegisterListenerRequest: ::fidl_next::Decode<
1977            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1978            Constraint = (),
1979        >,
1980{
1981    async fn on_one_way(
1982        handler: &mut ___H,
1983        mut message: ::fidl_next::Message<___T>,
1984    ) -> ::core::result::Result<
1985        (),
1986        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1987    > {
1988        match *message.header().ordinal {
1989            ordinal => {
1990                handler.on_unknown_interaction(ordinal).await;
1991                if ::core::matches!(
1992                    message.header().flexibility(),
1993                    ::fidl_next::protocol::Flexibility::Strict
1994                ) {
1995                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1996                } else {
1997                    Ok(())
1998                }
1999            }
2000        }
2001    }
2002
2003    async fn on_two_way(
2004        handler: &mut ___H,
2005        mut message: ::fidl_next::Message<___T>,
2006        responder: ::fidl_next::protocol::Responder<___T>,
2007    ) -> ::core::result::Result<
2008        (),
2009        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2010    > {
2011        match *message.header().ordinal {
2012            2866676296029265929 => {
2013                let responder = ::fidl_next::Responder::from_untyped(responder);
2014
2015                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2016                    Ok(decoded) => {
2017                        handler
2018                            .register_listener(
2019                                ::fidl_next::Request::from_decoded(decoded),
2020                                responder,
2021                            )
2022                            .await;
2023                        Ok(())
2024                    }
2025                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2026                        ordinal: 2866676296029265929,
2027                        error,
2028                    }),
2029                }
2030            }
2031
2032            ordinal => {
2033                handler.on_unknown_interaction(ordinal).await;
2034                if ::core::matches!(
2035                    message.header().flexibility(),
2036                    ::fidl_next::protocol::Flexibility::Strict
2037                ) {
2038                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2039                } else {
2040                    responder
2041                        .respond_framework_error(
2042                            ordinal,
2043                            ::fidl_next::FrameworkError::UnknownMethod,
2044                        )
2045                        .expect("encoding a framework error should never fail")
2046                        .await?;
2047                    Ok(())
2048                }
2049            }
2050        }
2051    }
2052}
2053
2054/// A client handler for the DeviceListenerRegistry protocol.
2055///
2056/// See [`DeviceListenerRegistry`] for more details.
2057pub trait DeviceListenerRegistryClientHandler<
2058    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2059    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2060>
2061{
2062    fn on_unknown_interaction(
2063        &mut self,
2064        ordinal: u64,
2065    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2066        ::core::future::ready(())
2067    }
2068}
2069
2070impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DeviceListenerRegistry
2071where
2072    ___H: DeviceListenerRegistryClientHandler<___T> + ::core::marker::Send,
2073    ___T: ::fidl_next::Transport,
2074{
2075    async fn on_event(
2076        handler: &mut ___H,
2077        mut message: ::fidl_next::Message<___T>,
2078    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2079        match *message.header().ordinal {
2080            ordinal => {
2081                handler.on_unknown_interaction(ordinal).await;
2082                if ::core::matches!(
2083                    message.header().flexibility(),
2084                    ::fidl_next::protocol::Flexibility::Strict
2085                ) {
2086                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2087                } else {
2088                    Ok(())
2089                }
2090            }
2091        }
2092    }
2093}
2094
2095/// A server handler for the DeviceListenerRegistry protocol.
2096///
2097/// See [`DeviceListenerRegistry`] for more details.
2098pub trait DeviceListenerRegistryServerHandler<
2099    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2100    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2101>
2102{
2103    #[doc = " Registers a listener to receive future device change events.\n\n Returns a `DeviceIterator` which the client MUST use to drain the list\n of devices that were already active at the time of registration.\n"]
2104    fn register_listener(
2105        &mut self,
2106
2107        request: ::fidl_next::Request<device_listener_registry::RegisterListener, ___T>,
2108
2109        responder: ::fidl_next::Responder<device_listener_registry::RegisterListener, ___T>,
2110    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2111
2112    fn on_unknown_interaction(
2113        &mut self,
2114        ordinal: u64,
2115    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2116        ::core::future::ready(())
2117    }
2118}
2119
2120impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DeviceListenerRegistry
2121where
2122    ___H: DeviceListenerRegistryServerHandler<___T> + ::core::marker::Send,
2123    ___T: ::fidl_next::Transport,
2124    for<'de> crate::wire::DeviceListenerRegistryRegisterListenerRequest: ::fidl_next::Decode<
2125            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2126            Constraint = (),
2127        >,
2128{
2129    async fn on_one_way(
2130        handler: &mut ___H,
2131        mut message: ::fidl_next::Message<___T>,
2132    ) -> ::core::result::Result<
2133        (),
2134        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2135    > {
2136        match *message.header().ordinal {
2137            ordinal => {
2138                handler.on_unknown_interaction(ordinal).await;
2139                if ::core::matches!(
2140                    message.header().flexibility(),
2141                    ::fidl_next::protocol::Flexibility::Strict
2142                ) {
2143                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2144                } else {
2145                    Ok(())
2146                }
2147            }
2148        }
2149    }
2150
2151    async fn on_two_way(
2152        handler: &mut ___H,
2153        mut message: ::fidl_next::Message<___T>,
2154        responder: ::fidl_next::protocol::Responder<___T>,
2155    ) -> ::core::result::Result<
2156        (),
2157        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2158    > {
2159        match *message.header().ordinal {
2160            2866676296029265929 => {
2161                let responder = ::fidl_next::Responder::from_untyped(responder);
2162
2163                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2164                    Ok(decoded) => {
2165                        handler
2166                            .register_listener(
2167                                ::fidl_next::Request::from_decoded(decoded),
2168                                responder,
2169                            )
2170                            .await;
2171                        Ok(())
2172                    }
2173                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2174                        ordinal: 2866676296029265929,
2175                        error,
2176                    }),
2177                }
2178            }
2179
2180            ordinal => {
2181                handler.on_unknown_interaction(ordinal).await;
2182                if ::core::matches!(
2183                    message.header().flexibility(),
2184                    ::fidl_next::protocol::Flexibility::Strict
2185                ) {
2186                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2187                } else {
2188                    responder
2189                        .respond_framework_error(
2190                            ordinal,
2191                            ::fidl_next::FrameworkError::UnknownMethod,
2192                        )
2193                        .expect("encoding a framework error should never fail")
2194                        .await?;
2195                    Ok(())
2196                }
2197            }
2198        }
2199    }
2200}
2201
2202impl<___T> DeviceListenerRegistryClientHandler<___T> for ::fidl_next::IgnoreEvents
2203where
2204    ___T: ::fidl_next::Transport,
2205{
2206    async fn on_unknown_interaction(&mut self, _: u64) {}
2207}
2208
2209impl<___H, ___T> DeviceListenerRegistryLocalClientHandler<___T> for ::fidl_next::Local<___H>
2210where
2211    ___H: DeviceListenerRegistryClientHandler<___T>,
2212    ___T: ::fidl_next::Transport,
2213{
2214    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2215        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2216    }
2217}
2218
2219impl<___H, ___T> DeviceListenerRegistryLocalServerHandler<___T> for ::fidl_next::Local<___H>
2220where
2221    ___H: DeviceListenerRegistryServerHandler<___T>,
2222    ___T: ::fidl_next::Transport,
2223{
2224    async fn register_listener(
2225        &mut self,
2226
2227        request: ::fidl_next::Request<device_listener_registry::RegisterListener, ___T>,
2228
2229        responder: ::fidl_next::Responder<device_listener_registry::RegisterListener, ___T>,
2230    ) {
2231        ___H::register_listener(&mut self.0, request, responder).await
2232    }
2233
2234    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2235        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2236    }
2237}
2238
2239/// The type corresponding to the ImeService protocol.
2240#[doc = " The service provided by an IME\n"]
2241#[derive(PartialEq, Debug)]
2242pub struct ImeService;
2243
2244impl ::fidl_next::Discoverable for ImeService {
2245    const PROTOCOL_NAME: &'static str = "fuchsia.ui.input.ImeService";
2246}
2247
2248#[cfg(target_os = "fuchsia")]
2249impl ::fidl_next::HasTransport for ImeService {
2250    type Transport = ::fidl_next::fuchsia::zx::Channel;
2251}
2252
2253pub mod ime_service {
2254    pub mod prelude {
2255        pub use crate::{
2256            ImeService, ImeServiceClientHandler, ImeServiceLocalClientHandler,
2257            ImeServiceLocalServerHandler, ImeServiceServerHandler, ime_service,
2258        };
2259
2260        pub use crate::natural::ImeServiceGetInputMethodEditorRequest;
2261    }
2262
2263    pub struct GetInputMethodEditor;
2264
2265    impl ::fidl_next::Method for GetInputMethodEditor {
2266        const ORDINAL: u64 = 1480890716194628092;
2267        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2268            ::fidl_next::protocol::Flexibility::Strict;
2269
2270        type Protocol = crate::ImeService;
2271
2272        type Request = crate::wire::ImeServiceGetInputMethodEditorRequest<'static>;
2273    }
2274
2275    pub struct ShowKeyboard;
2276
2277    impl ::fidl_next::Method for ShowKeyboard {
2278        const ORDINAL: u64 = 4101981143447698672;
2279        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2280            ::fidl_next::protocol::Flexibility::Strict;
2281
2282        type Protocol = crate::ImeService;
2283
2284        type Request = ::fidl_next::wire::EmptyMessageBody;
2285    }
2286
2287    pub struct HideKeyboard;
2288
2289    impl ::fidl_next::Method for HideKeyboard {
2290        const ORDINAL: u64 = 8532052555131062781;
2291        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2292            ::fidl_next::protocol::Flexibility::Strict;
2293
2294        type Protocol = crate::ImeService;
2295
2296        type Request = ::fidl_next::wire::EmptyMessageBody;
2297    }
2298
2299    mod ___detail {
2300        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ImeService
2301        where
2302            ___T: ::fidl_next::Transport,
2303        {
2304            type Client = ImeServiceClient<___T>;
2305            type Server = ImeServiceServer<___T>;
2306        }
2307
2308        /// The client for the `ImeService` protocol.
2309        #[repr(transparent)]
2310        pub struct ImeServiceClient<___T: ::fidl_next::Transport> {
2311            #[allow(dead_code)]
2312            client: ::fidl_next::protocol::Client<___T>,
2313        }
2314
2315        impl<___T> ImeServiceClient<___T>
2316        where
2317            ___T: ::fidl_next::Transport,
2318        {
2319            pub fn get_input_method_editor(
2320                &self,
2321
2322                keyboard_type: impl ::fidl_next::Encode<
2323                    crate::wire::KeyboardType,
2324                    <___T as ::fidl_next::Transport>::SendBuffer,
2325                >,
2326
2327                action: impl ::fidl_next::Encode<
2328                    crate::wire::InputMethodAction,
2329                    <___T as ::fidl_next::Transport>::SendBuffer,
2330                >,
2331
2332                initial_state: impl ::fidl_next::Encode<
2333                    crate::wire::TextInputState<'static>,
2334                    <___T as ::fidl_next::Transport>::SendBuffer,
2335                >,
2336
2337                client: impl ::fidl_next::Encode<
2338                    ::fidl_next::ClientEnd<
2339                        crate::InputMethodEditorClient,
2340                        ::fidl_next::wire::fuchsia::Channel,
2341                    >,
2342                    <___T as ::fidl_next::Transport>::SendBuffer,
2343                >,
2344
2345                editor: impl ::fidl_next::Encode<
2346                    ::fidl_next::ServerEnd<
2347                        crate::InputMethodEditor,
2348                        ::fidl_next::wire::fuchsia::Channel,
2349                    >,
2350                    <___T as ::fidl_next::Transport>::SendBuffer,
2351                >,
2352            ) -> ::fidl_next::SendFuture<'_, ___T>
2353            where
2354                <___T as ::fidl_next::Transport>::SendBuffer:
2355                    ::fidl_next::encoder::InternalHandleEncoder,
2356                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2357                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2358            {
2359                self.get_input_method_editor_with(
2360                    crate::generic::ImeServiceGetInputMethodEditorRequest {
2361                        keyboard_type,
2362
2363                        action,
2364
2365                        initial_state,
2366
2367                        client,
2368
2369                        editor,
2370                    },
2371                )
2372            }
2373
2374            pub fn get_input_method_editor_with<___R>(
2375                &self,
2376                request: ___R,
2377            ) -> ::fidl_next::SendFuture<'_, ___T>
2378            where
2379                ___R: ::fidl_next::Encode<
2380                        crate::wire::ImeServiceGetInputMethodEditorRequest<'static>,
2381                        <___T as ::fidl_next::Transport>::SendBuffer,
2382                    >,
2383            {
2384                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2385                    1480890716194628092,
2386                    <super::GetInputMethodEditor as ::fidl_next::Method>::FLEXIBILITY,
2387                    request,
2388                ))
2389            }
2390
2391            pub fn show_keyboard(&self) -> ::fidl_next::SendFuture<'_, ___T> {
2392                ::fidl_next::SendFuture::from_untyped(
2393                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
2394                        4101981143447698672,
2395                        <super::ShowKeyboard as ::fidl_next::Method>::FLEXIBILITY,
2396                        (),
2397                    ),
2398                )
2399            }
2400
2401            pub fn hide_keyboard(&self) -> ::fidl_next::SendFuture<'_, ___T> {
2402                ::fidl_next::SendFuture::from_untyped(
2403                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
2404                        8532052555131062781,
2405                        <super::HideKeyboard as ::fidl_next::Method>::FLEXIBILITY,
2406                        (),
2407                    ),
2408                )
2409            }
2410        }
2411
2412        /// The server for the `ImeService` protocol.
2413        #[repr(transparent)]
2414        pub struct ImeServiceServer<___T: ::fidl_next::Transport> {
2415            server: ::fidl_next::protocol::Server<___T>,
2416        }
2417
2418        impl<___T> ImeServiceServer<___T> where ___T: ::fidl_next::Transport {}
2419    }
2420}
2421
2422#[diagnostic::on_unimplemented(
2423    note = "If {Self} implements the non-local ImeServiceClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2424)]
2425
2426/// A client handler for the ImeService protocol.
2427///
2428/// See [`ImeService`] for more details.
2429pub trait ImeServiceLocalClientHandler<
2430    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2431    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2432>
2433{
2434}
2435
2436impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ImeService
2437where
2438    ___H: ImeServiceLocalClientHandler<___T>,
2439    ___T: ::fidl_next::Transport,
2440{
2441    async fn on_event(
2442        handler: &mut ___H,
2443        mut message: ::fidl_next::Message<___T>,
2444    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2445        match *message.header().ordinal {
2446            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2447        }
2448    }
2449}
2450
2451#[diagnostic::on_unimplemented(
2452    note = "If {Self} implements the non-local ImeServiceServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2453)]
2454
2455/// A server handler for the ImeService protocol.
2456///
2457/// See [`ImeService`] for more details.
2458pub trait ImeServiceLocalServerHandler<
2459    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2460    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2461>
2462{
2463    fn get_input_method_editor(
2464        &mut self,
2465
2466        request: ::fidl_next::Request<ime_service::GetInputMethodEditor, ___T>,
2467    ) -> impl ::core::future::Future<Output = ()>;
2468
2469    fn show_keyboard(&mut self) -> impl ::core::future::Future<Output = ()>;
2470
2471    fn hide_keyboard(&mut self) -> impl ::core::future::Future<Output = ()>;
2472}
2473
2474impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ImeService
2475where
2476    ___H: ImeServiceLocalServerHandler<___T>,
2477    ___T: ::fidl_next::Transport,
2478    for<'de> crate::wire::ImeServiceGetInputMethodEditorRequest<'de>: ::fidl_next::Decode<
2479            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2480            Constraint = (),
2481        >,
2482{
2483    async fn on_one_way(
2484        handler: &mut ___H,
2485        mut message: ::fidl_next::Message<___T>,
2486    ) -> ::core::result::Result<
2487        (),
2488        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2489    > {
2490        match *message.header().ordinal {
2491            1480890716194628092 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
2492                Ok(decoded) => {
2493                    handler
2494                        .get_input_method_editor(::fidl_next::Request::from_decoded(decoded))
2495                        .await;
2496                    Ok(())
2497                }
2498                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2499                    ordinal: 1480890716194628092,
2500                    error,
2501                }),
2502            },
2503
2504            4101981143447698672 => {
2505                handler.show_keyboard().await;
2506                Ok(())
2507            }
2508
2509            8532052555131062781 => {
2510                handler.hide_keyboard().await;
2511                Ok(())
2512            }
2513
2514            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2515        }
2516    }
2517
2518    async fn on_two_way(
2519        handler: &mut ___H,
2520        mut message: ::fidl_next::Message<___T>,
2521        responder: ::fidl_next::protocol::Responder<___T>,
2522    ) -> ::core::result::Result<
2523        (),
2524        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2525    > {
2526        match *message.header().ordinal {
2527            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2528        }
2529    }
2530}
2531
2532/// A client handler for the ImeService protocol.
2533///
2534/// See [`ImeService`] for more details.
2535pub trait ImeServiceClientHandler<
2536    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2537    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2538>
2539{
2540}
2541
2542impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ImeService
2543where
2544    ___H: ImeServiceClientHandler<___T> + ::core::marker::Send,
2545    ___T: ::fidl_next::Transport,
2546{
2547    async fn on_event(
2548        handler: &mut ___H,
2549        mut message: ::fidl_next::Message<___T>,
2550    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2551        match *message.header().ordinal {
2552            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2553        }
2554    }
2555}
2556
2557/// A server handler for the ImeService protocol.
2558///
2559/// See [`ImeService`] for more details.
2560pub trait ImeServiceServerHandler<
2561    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2562    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2563>
2564{
2565    fn get_input_method_editor(
2566        &mut self,
2567
2568        request: ::fidl_next::Request<ime_service::GetInputMethodEditor, ___T>,
2569    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2570
2571    fn show_keyboard(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2572
2573    fn hide_keyboard(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2574}
2575
2576impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ImeService
2577where
2578    ___H: ImeServiceServerHandler<___T> + ::core::marker::Send,
2579    ___T: ::fidl_next::Transport,
2580    for<'de> crate::wire::ImeServiceGetInputMethodEditorRequest<'de>: ::fidl_next::Decode<
2581            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2582            Constraint = (),
2583        >,
2584{
2585    async fn on_one_way(
2586        handler: &mut ___H,
2587        mut message: ::fidl_next::Message<___T>,
2588    ) -> ::core::result::Result<
2589        (),
2590        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2591    > {
2592        match *message.header().ordinal {
2593            1480890716194628092 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
2594                Ok(decoded) => {
2595                    handler
2596                        .get_input_method_editor(::fidl_next::Request::from_decoded(decoded))
2597                        .await;
2598                    Ok(())
2599                }
2600                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2601                    ordinal: 1480890716194628092,
2602                    error,
2603                }),
2604            },
2605
2606            4101981143447698672 => {
2607                handler.show_keyboard().await;
2608                Ok(())
2609            }
2610
2611            8532052555131062781 => {
2612                handler.hide_keyboard().await;
2613                Ok(())
2614            }
2615
2616            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2617        }
2618    }
2619
2620    async fn on_two_way(
2621        handler: &mut ___H,
2622        mut message: ::fidl_next::Message<___T>,
2623        responder: ::fidl_next::protocol::Responder<___T>,
2624    ) -> ::core::result::Result<
2625        (),
2626        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2627    > {
2628        match *message.header().ordinal {
2629            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2630        }
2631    }
2632}
2633
2634impl<___T> ImeServiceClientHandler<___T> for ::fidl_next::IgnoreEvents where
2635    ___T: ::fidl_next::Transport
2636{
2637}
2638
2639impl<___H, ___T> ImeServiceLocalClientHandler<___T> for ::fidl_next::Local<___H>
2640where
2641    ___H: ImeServiceClientHandler<___T>,
2642    ___T: ::fidl_next::Transport,
2643{
2644}
2645
2646impl<___H, ___T> ImeServiceLocalServerHandler<___T> for ::fidl_next::Local<___H>
2647where
2648    ___H: ImeServiceServerHandler<___T>,
2649    ___T: ::fidl_next::Transport,
2650{
2651    async fn get_input_method_editor(
2652        &mut self,
2653
2654        request: ::fidl_next::Request<ime_service::GetInputMethodEditor, ___T>,
2655    ) {
2656        ___H::get_input_method_editor(&mut self.0, request).await
2657    }
2658
2659    async fn show_keyboard(&mut self) {
2660        ___H::show_keyboard(&mut self.0).await
2661    }
2662
2663    async fn hide_keyboard(&mut self) {
2664        ___H::hide_keyboard(&mut self.0).await
2665    }
2666}
2667
2668pub use fidl_next_common_fuchsia_ui_input::*;