Skip to main content

fidl_next_fuchsia_ui_input3/
fidl_next_fuchsia_ui_input3.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_input3::natural::*;
8
9    #[derive(Debug, PartialEq)]
10    #[repr(C)]
11    pub struct KeyboardAddListenerRequest {
12        pub view_ref: ::fidl_next_fuchsia_ui_views::natural::ViewRef,
13
14        pub listener:
15            ::fidl_next::ClientEnd<crate::KeyboardListener, ::fidl_next::fuchsia::zx::Channel>,
16    }
17
18    unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeyboardAddListenerRequest, ___E>
19        for KeyboardAddListenerRequest
20    where
21        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22        ___E: ::fidl_next::fuchsia::HandleEncoder,
23    {
24        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
25            Self,
26            crate::wire::KeyboardAddListenerRequest,
27        > = unsafe {
28            ::fidl_next::CopyOptimization::enable_if(
29                true && <::fidl_next_fuchsia_ui_views::natural::ViewRef as ::fidl_next::Encode<
30                    ::fidl_next_fuchsia_ui_views::wire::ViewRef,
31                    ___E,
32                >>::COPY_OPTIMIZATION
33                    .is_enabled()
34                    && <::fidl_next::ClientEnd<
35                        crate::KeyboardListener,
36                        ::fidl_next::fuchsia::zx::Channel,
37                    > as ::fidl_next::Encode<
38                        ::fidl_next::ClientEnd<
39                            crate::KeyboardListener,
40                            ::fidl_next::wire::fuchsia::Channel,
41                        >,
42                        ___E,
43                    >>::COPY_OPTIMIZATION
44                        .is_enabled(),
45            )
46        };
47
48        #[inline]
49        fn encode(
50            self,
51            encoder_: &mut ___E,
52            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardAddListenerRequest>,
53            _: (),
54        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
55            ::fidl_next::munge! {
56                let crate::wire::KeyboardAddListenerRequest {
57                    view_ref,
58                    listener,
59
60                } = out_;
61            }
62
63            ::fidl_next::Encode::encode(self.view_ref, encoder_, view_ref, ())?;
64
65            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(view_ref.as_mut_ptr()) };
66
67            ::fidl_next::Encode::encode(self.listener, encoder_, listener, ())?;
68
69            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(listener.as_mut_ptr()) };
70
71            Ok(())
72        }
73    }
74
75    unsafe impl<___E>
76        ::fidl_next::EncodeOption<
77            ::fidl_next::wire::Box<'static, crate::wire::KeyboardAddListenerRequest>,
78            ___E,
79        > for KeyboardAddListenerRequest
80    where
81        ___E: ::fidl_next::Encoder + ?Sized,
82        KeyboardAddListenerRequest:
83            ::fidl_next::Encode<crate::wire::KeyboardAddListenerRequest, ___E>,
84    {
85        #[inline]
86        fn encode_option(
87            this: ::core::option::Option<Self>,
88            encoder: &mut ___E,
89            out: &mut ::core::mem::MaybeUninit<
90                ::fidl_next::wire::Box<'static, crate::wire::KeyboardAddListenerRequest>,
91            >,
92            _: (),
93        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
94            if let Some(inner) = this {
95                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
96                ::fidl_next::wire::Box::encode_present(out);
97            } else {
98                ::fidl_next::wire::Box::encode_absent(out);
99            }
100
101            Ok(())
102        }
103    }
104
105    impl ::fidl_next::FromWire<crate::wire::KeyboardAddListenerRequest> for KeyboardAddListenerRequest {
106        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
107            crate::wire::KeyboardAddListenerRequest,
108            Self,
109        > = unsafe {
110            ::fidl_next::CopyOptimization::enable_if(
111                true && <::fidl_next_fuchsia_ui_views::natural::ViewRef as ::fidl_next::FromWire<
112                    ::fidl_next_fuchsia_ui_views::wire::ViewRef,
113                >>::COPY_OPTIMIZATION
114                    .is_enabled()
115                    && <::fidl_next::ClientEnd<
116                        crate::KeyboardListener,
117                        ::fidl_next::fuchsia::zx::Channel,
118                    > as ::fidl_next::FromWire<
119                        ::fidl_next::ClientEnd<
120                            crate::KeyboardListener,
121                            ::fidl_next::wire::fuchsia::Channel,
122                        >,
123                    >>::COPY_OPTIMIZATION
124                        .is_enabled(),
125            )
126        };
127
128        #[inline]
129        fn from_wire(wire: crate::wire::KeyboardAddListenerRequest) -> Self {
130            Self {
131                view_ref: ::fidl_next::FromWire::from_wire(wire.view_ref),
132
133                listener: ::fidl_next::FromWire::from_wire(wire.listener),
134            }
135        }
136    }
137}
138
139pub mod wire {
140
141    pub use fidl_next_common_fuchsia_ui_input3::wire::*;
142
143    /// The wire type corresponding to [`KeyboardAddListenerRequest`].
144    #[derive(Debug)]
145    #[repr(C)]
146    pub struct KeyboardAddListenerRequest {
147        pub view_ref: ::fidl_next_fuchsia_ui_views::wire::ViewRef,
148
149        pub listener:
150            ::fidl_next::ClientEnd<crate::KeyboardListener, ::fidl_next::wire::fuchsia::Channel>,
151    }
152
153    static_assertions::const_assert_eq!(std::mem::size_of::<KeyboardAddListenerRequest>(), 8);
154    static_assertions::const_assert_eq!(std::mem::align_of::<KeyboardAddListenerRequest>(), 4);
155
156    static_assertions::const_assert_eq!(
157        std::mem::offset_of!(KeyboardAddListenerRequest, view_ref),
158        0
159    );
160
161    static_assertions::const_assert_eq!(
162        std::mem::offset_of!(KeyboardAddListenerRequest, listener),
163        4
164    );
165
166    impl ::fidl_next::Constrained for KeyboardAddListenerRequest {
167        type Constraint = ();
168
169        fn validate(
170            _: ::fidl_next::Slot<'_, Self>,
171            _: Self::Constraint,
172        ) -> Result<(), ::fidl_next::ValidationError> {
173            Ok(())
174        }
175    }
176
177    unsafe impl ::fidl_next::Wire for KeyboardAddListenerRequest {
178        type Narrowed<'de> = KeyboardAddListenerRequest;
179
180        #[inline]
181        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
182            ::fidl_next::munge! {
183                let Self {
184                    view_ref,
185                    listener,
186
187                } = &mut *out_;
188            }
189
190            ::fidl_next::Wire::zero_padding(view_ref);
191
192            ::fidl_next::Wire::zero_padding(listener);
193        }
194    }
195
196    unsafe impl<___D> ::fidl_next::Decode<___D> for KeyboardAddListenerRequest
197    where
198        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
199        ___D: ::fidl_next::fuchsia::HandleDecoder,
200    {
201        fn decode(
202            slot_: ::fidl_next::Slot<'_, Self>,
203            decoder_: &mut ___D,
204            _: (),
205        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
206            ::fidl_next::munge! {
207                let Self {
208                    mut view_ref,
209                    mut listener,
210
211                } = slot_;
212            }
213
214            let _field = view_ref.as_mut();
215
216            ::fidl_next::Decode::decode(view_ref.as_mut(), decoder_, ())?;
217
218            let _field = listener.as_mut();
219
220            ::fidl_next::Decode::decode(listener.as_mut(), decoder_, ())?;
221
222            Ok(())
223        }
224    }
225
226    impl ::fidl_next::IntoNatural for KeyboardAddListenerRequest {
227        type Natural = crate::natural::KeyboardAddListenerRequest;
228    }
229}
230
231pub mod wire_optional {
232
233    pub use fidl_next_common_fuchsia_ui_input3::wire_optional::*;
234}
235
236pub mod generic {
237
238    pub use fidl_next_common_fuchsia_ui_input3::generic::*;
239
240    /// The generic type corresponding to [`KeyboardAddListenerRequest`].
241    pub struct KeyboardAddListenerRequest<T0, T1> {
242        pub view_ref: T0,
243
244        pub listener: T1,
245    }
246
247    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::KeyboardAddListenerRequest, ___E>
248        for KeyboardAddListenerRequest<T0, T1>
249    where
250        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
251        ___E: ::fidl_next::fuchsia::HandleEncoder,
252        T0: ::fidl_next::Encode<::fidl_next_fuchsia_ui_views::wire::ViewRef, ___E>,
253        T1: ::fidl_next::Encode<
254                ::fidl_next::ClientEnd<
255                    crate::KeyboardListener,
256                    ::fidl_next::wire::fuchsia::Channel,
257                >,
258                ___E,
259            >,
260    {
261        #[inline]
262        fn encode(
263            self,
264            encoder_: &mut ___E,
265            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardAddListenerRequest>,
266            _: (),
267        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
268            ::fidl_next::munge! {
269                let crate::wire::KeyboardAddListenerRequest {
270                    view_ref,
271                    listener,
272
273                } = out_;
274            }
275
276            ::fidl_next::Encode::encode(self.view_ref, encoder_, view_ref, ())?;
277
278            ::fidl_next::Encode::encode(self.listener, encoder_, listener, ())?;
279
280            Ok(())
281        }
282    }
283
284    unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::KeyboardAddListenerRequest, ___E>
285        for &'a KeyboardAddListenerRequest<T0, T1>
286    where
287        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
288        ___E: ::fidl_next::fuchsia::HandleEncoder,
289        &'a T0: ::fidl_next::Encode<::fidl_next_fuchsia_ui_views::wire::ViewRef, ___E>,
290        &'a T1: ::fidl_next::Encode<
291                ::fidl_next::ClientEnd<
292                    crate::KeyboardListener,
293                    ::fidl_next::wire::fuchsia::Channel,
294                >,
295                ___E,
296            >,
297    {
298        #[inline]
299        fn encode(
300            self,
301            encoder_: &mut ___E,
302            out_: &mut ::core::mem::MaybeUninit<crate::wire::KeyboardAddListenerRequest>,
303            _: (),
304        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
305            ::fidl_next::munge! {
306                let crate::wire::KeyboardAddListenerRequest {
307                    view_ref,
308                    listener,
309
310                } = out_;
311            }
312
313            ::fidl_next::Encode::encode(&self.view_ref, encoder_, view_ref, ())?;
314
315            ::fidl_next::Encode::encode(&self.listener, encoder_, listener, ())?;
316
317            Ok(())
318        }
319    }
320}
321
322pub use self::natural::*;
323
324/// The type corresponding to the Keyboard protocol.
325#[doc = " Components may request this service from their namespace to be notified of\n physical key events.\n"]
326#[derive(PartialEq, Debug)]
327pub struct Keyboard;
328
329impl ::fidl_next::Discoverable for Keyboard {
330    const PROTOCOL_NAME: &'static str = "fuchsia.ui.input3.Keyboard";
331}
332
333#[cfg(target_os = "fuchsia")]
334impl ::fidl_next::HasTransport for Keyboard {
335    type Transport = ::fidl_next::fuchsia::zx::Channel;
336}
337
338pub mod keyboard {
339    pub mod prelude {
340        pub use crate::{
341            Keyboard, KeyboardClientHandler, KeyboardLocalClientHandler,
342            KeyboardLocalServerHandler, KeyboardServerHandler, keyboard,
343        };
344
345        pub use crate::natural::KeyboardAddListenerRequest;
346    }
347
348    pub struct AddListener;
349
350    impl ::fidl_next::Method for AddListener {
351        const ORDINAL: u64 = 4306977845568814370;
352        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
353            ::fidl_next::protocol::Flexibility::Strict;
354
355        type Protocol = crate::Keyboard;
356
357        type Request = crate::wire::KeyboardAddListenerRequest;
358    }
359
360    impl ::fidl_next::TwoWayMethod for AddListener {
361        type Response = ::fidl_next::wire::Strict<::fidl_next::wire::EmptyMessageBody>;
362    }
363
364    impl<___R> ::fidl_next::Respond<___R> for AddListener {
365        type Output = ::fidl_next::Strict<___R>;
366
367        fn respond(response: ___R) -> Self::Output {
368            ::fidl_next::Strict(response)
369        }
370    }
371
372    mod ___detail {
373        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Keyboard
374        where
375            ___T: ::fidl_next::Transport,
376        {
377            type Client = KeyboardClient<___T>;
378            type Server = KeyboardServer<___T>;
379        }
380
381        /// The client for the `Keyboard` protocol.
382        #[repr(transparent)]
383        pub struct KeyboardClient<___T: ::fidl_next::Transport> {
384            #[allow(dead_code)]
385            client: ::fidl_next::protocol::Client<___T>,
386        }
387
388        impl<___T> KeyboardClient<___T>
389        where
390            ___T: ::fidl_next::Transport,
391        {
392            #[doc = " Add a key event listener for the specified View.\n If multiple listeners are added, each will receive key events independently and\n should respond with a `Status`.\n\n The client calling `AddListener` should keep the connection to `Keyboard` alive\n for as long as the events from `KeyboardListener` need to be received.  Dropping the\n connection to the `Keyboard` protocol will terminate `KeyboardListener` as well.\n"]
393            pub fn add_listener(
394                &self,
395
396                view_ref: impl ::fidl_next::Encode<
397                    ::fidl_next_fuchsia_ui_views::wire::ViewRef,
398                    <___T as ::fidl_next::Transport>::SendBuffer,
399                >,
400
401                listener: impl ::fidl_next::Encode<
402                    ::fidl_next::ClientEnd<
403                        crate::KeyboardListener,
404                        ::fidl_next::wire::fuchsia::Channel,
405                    >,
406                    <___T as ::fidl_next::Transport>::SendBuffer,
407                >,
408            ) -> ::fidl_next::TwoWayFuture<'_, super::AddListener, ___T>
409            where
410                <___T as ::fidl_next::Transport>::SendBuffer:
411                    ::fidl_next::encoder::InternalHandleEncoder,
412                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
413            {
414                self.add_listener_with(crate::generic::KeyboardAddListenerRequest {
415                    view_ref,
416
417                    listener,
418                })
419            }
420
421            #[doc = " Add a key event listener for the specified View.\n If multiple listeners are added, each will receive key events independently and\n should respond with a `Status`.\n\n The client calling `AddListener` should keep the connection to `Keyboard` alive\n for as long as the events from `KeyboardListener` need to be received.  Dropping the\n connection to the `Keyboard` protocol will terminate `KeyboardListener` as well.\n"]
422            pub fn add_listener_with<___R>(
423                &self,
424                request: ___R,
425            ) -> ::fidl_next::TwoWayFuture<'_, super::AddListener, ___T>
426            where
427                ___R: ::fidl_next::Encode<
428                        crate::wire::KeyboardAddListenerRequest,
429                        <___T as ::fidl_next::Transport>::SendBuffer,
430                    >,
431            {
432                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
433                    4306977845568814370,
434                    <super::AddListener as ::fidl_next::Method>::FLEXIBILITY,
435                    request,
436                ))
437            }
438        }
439
440        /// The server for the `Keyboard` protocol.
441        #[repr(transparent)]
442        pub struct KeyboardServer<___T: ::fidl_next::Transport> {
443            server: ::fidl_next::protocol::Server<___T>,
444        }
445
446        impl<___T> KeyboardServer<___T> where ___T: ::fidl_next::Transport {}
447    }
448}
449
450#[diagnostic::on_unimplemented(
451    note = "If {Self} implements the non-local KeyboardClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
452)]
453
454/// A client handler for the Keyboard protocol.
455///
456/// See [`Keyboard`] for more details.
457pub trait KeyboardLocalClientHandler<
458    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
459    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
460>
461{
462}
463
464impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Keyboard
465where
466    ___H: KeyboardLocalClientHandler<___T>,
467    ___T: ::fidl_next::Transport,
468{
469    async fn on_event(
470        handler: &mut ___H,
471        mut message: ::fidl_next::Message<___T>,
472    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
473        match *message.header().ordinal {
474            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
475        }
476    }
477}
478
479#[diagnostic::on_unimplemented(
480    note = "If {Self} implements the non-local KeyboardServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
481)]
482
483/// A server handler for the Keyboard protocol.
484///
485/// See [`Keyboard`] for more details.
486pub trait KeyboardLocalServerHandler<
487    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
488    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
489>
490{
491    #[doc = " Add a key event listener for the specified View.\n If multiple listeners are added, each will receive key events independently and\n should respond with a `Status`.\n\n The client calling `AddListener` should keep the connection to `Keyboard` alive\n for as long as the events from `KeyboardListener` need to be received.  Dropping the\n connection to the `Keyboard` protocol will terminate `KeyboardListener` as well.\n"]
492    fn add_listener(
493        &mut self,
494
495        request: ::fidl_next::Request<keyboard::AddListener, ___T>,
496
497        responder: ::fidl_next::Responder<keyboard::AddListener, ___T>,
498    ) -> impl ::core::future::Future<Output = ()>;
499}
500
501impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Keyboard
502where
503    ___H: KeyboardLocalServerHandler<___T>,
504    ___T: ::fidl_next::Transport,
505    for<'de> crate::wire::KeyboardAddListenerRequest: ::fidl_next::Decode<
506            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
507            Constraint = (),
508        >,
509{
510    async fn on_one_way(
511        handler: &mut ___H,
512        mut message: ::fidl_next::Message<___T>,
513    ) -> ::core::result::Result<
514        (),
515        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
516    > {
517        match *message.header().ordinal {
518            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
519        }
520    }
521
522    async fn on_two_way(
523        handler: &mut ___H,
524        mut message: ::fidl_next::Message<___T>,
525        responder: ::fidl_next::protocol::Responder<___T>,
526    ) -> ::core::result::Result<
527        (),
528        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
529    > {
530        match *message.header().ordinal {
531            4306977845568814370 => {
532                let responder = ::fidl_next::Responder::from_untyped(responder);
533
534                match ::fidl_next::AsDecoderExt::into_decoded(message) {
535                    Ok(decoded) => {
536                        handler
537                            .add_listener(::fidl_next::Request::from_decoded(decoded), responder)
538                            .await;
539                        Ok(())
540                    }
541                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
542                        ordinal: 4306977845568814370,
543                        error,
544                    }),
545                }
546            }
547
548            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
549        }
550    }
551}
552
553/// A client handler for the Keyboard protocol.
554///
555/// See [`Keyboard`] for more details.
556pub trait KeyboardClientHandler<
557    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
558    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
559>
560{
561}
562
563impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Keyboard
564where
565    ___H: KeyboardClientHandler<___T> + ::core::marker::Send,
566    ___T: ::fidl_next::Transport,
567{
568    async fn on_event(
569        handler: &mut ___H,
570        mut message: ::fidl_next::Message<___T>,
571    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
572        match *message.header().ordinal {
573            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
574        }
575    }
576}
577
578/// A server handler for the Keyboard protocol.
579///
580/// See [`Keyboard`] for more details.
581pub trait KeyboardServerHandler<
582    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
583    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
584>
585{
586    #[doc = " Add a key event listener for the specified View.\n If multiple listeners are added, each will receive key events independently and\n should respond with a `Status`.\n\n The client calling `AddListener` should keep the connection to `Keyboard` alive\n for as long as the events from `KeyboardListener` need to be received.  Dropping the\n connection to the `Keyboard` protocol will terminate `KeyboardListener` as well.\n"]
587    fn add_listener(
588        &mut self,
589
590        request: ::fidl_next::Request<keyboard::AddListener, ___T>,
591
592        responder: ::fidl_next::Responder<keyboard::AddListener, ___T>,
593    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
594}
595
596impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Keyboard
597where
598    ___H: KeyboardServerHandler<___T> + ::core::marker::Send,
599    ___T: ::fidl_next::Transport,
600    for<'de> crate::wire::KeyboardAddListenerRequest: ::fidl_next::Decode<
601            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
602            Constraint = (),
603        >,
604{
605    async fn on_one_way(
606        handler: &mut ___H,
607        mut message: ::fidl_next::Message<___T>,
608    ) -> ::core::result::Result<
609        (),
610        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
611    > {
612        match *message.header().ordinal {
613            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
614        }
615    }
616
617    async fn on_two_way(
618        handler: &mut ___H,
619        mut message: ::fidl_next::Message<___T>,
620        responder: ::fidl_next::protocol::Responder<___T>,
621    ) -> ::core::result::Result<
622        (),
623        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
624    > {
625        match *message.header().ordinal {
626            4306977845568814370 => {
627                let responder = ::fidl_next::Responder::from_untyped(responder);
628
629                match ::fidl_next::AsDecoderExt::into_decoded(message) {
630                    Ok(decoded) => {
631                        handler
632                            .add_listener(::fidl_next::Request::from_decoded(decoded), responder)
633                            .await;
634                        Ok(())
635                    }
636                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
637                        ordinal: 4306977845568814370,
638                        error,
639                    }),
640                }
641            }
642
643            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
644        }
645    }
646}
647
648impl<___T> KeyboardClientHandler<___T> for ::fidl_next::IgnoreEvents where
649    ___T: ::fidl_next::Transport
650{
651}
652
653impl<___H, ___T> KeyboardLocalClientHandler<___T> for ::fidl_next::Local<___H>
654where
655    ___H: KeyboardClientHandler<___T>,
656    ___T: ::fidl_next::Transport,
657{
658}
659
660impl<___H, ___T> KeyboardLocalServerHandler<___T> for ::fidl_next::Local<___H>
661where
662    ___H: KeyboardServerHandler<___T>,
663    ___T: ::fidl_next::Transport,
664{
665    async fn add_listener(
666        &mut self,
667
668        request: ::fidl_next::Request<keyboard::AddListener, ___T>,
669
670        responder: ::fidl_next::Responder<keyboard::AddListener, ___T>,
671    ) {
672        ___H::add_listener(&mut self.0, request, responder).await
673    }
674}
675
676pub use fidl_next_common_fuchsia_ui_input3::*;