Skip to main content

fidl_next_fuchsia_input_report/
fidl_next_fuchsia_input_report.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_input_report::natural::*;
8
9    pub type Axis = ::fidl_next_fuchsia_input::natural::Axis;
10
11    pub type ConsumerControlButton = ::fidl_next_fuchsia_input::natural::ConsumerControlButton;
12
13    #[derive(Debug, PartialEq)]
14    #[repr(C)]
15    pub struct InputDeviceGetInputReportsReaderRequest {
16        pub reader:
17            ::fidl_next::ServerEnd<crate::InputReportsReader, ::fidl_next::fuchsia::zx::Channel>,
18    }
19
20    unsafe impl<___E>
21        ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportsReaderRequest, ___E>
22        for InputDeviceGetInputReportsReaderRequest
23    where
24        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
25        ___E: ::fidl_next::fuchsia::HandleEncoder,
26    {
27        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
28            Self,
29            crate::wire::InputDeviceGetInputReportsReaderRequest,
30        > = unsafe {
31            ::fidl_next::CopyOptimization::enable_if(
32                true && <::fidl_next::ServerEnd<
33                    crate::InputReportsReader,
34                    ::fidl_next::fuchsia::zx::Channel,
35                > as ::fidl_next::Encode<
36                    ::fidl_next::ServerEnd<
37                        crate::InputReportsReader,
38                        ::fidl_next::wire::fuchsia::Channel,
39                    >,
40                    ___E,
41                >>::COPY_OPTIMIZATION
42                    .is_enabled(),
43            )
44        };
45
46        #[inline]
47        fn encode(
48            self,
49            encoder_: &mut ___E,
50            out_: &mut ::core::mem::MaybeUninit<
51                crate::wire::InputDeviceGetInputReportsReaderRequest,
52            >,
53            _: (),
54        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
55            ::fidl_next::munge! {
56                let crate::wire::InputDeviceGetInputReportsReaderRequest {
57                    reader,
58
59                } = out_;
60            }
61
62            ::fidl_next::Encode::encode(self.reader, encoder_, reader, ())?;
63
64            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reader.as_mut_ptr()) };
65
66            Ok(())
67        }
68    }
69
70    unsafe impl<___E>
71        ::fidl_next::EncodeOption<
72            ::fidl_next::wire::Box<'static, crate::wire::InputDeviceGetInputReportsReaderRequest>,
73            ___E,
74        > for InputDeviceGetInputReportsReaderRequest
75    where
76        ___E: ::fidl_next::Encoder + ?Sized,
77        InputDeviceGetInputReportsReaderRequest:
78            ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportsReaderRequest, ___E>,
79    {
80        #[inline]
81        fn encode_option(
82            this: ::core::option::Option<Self>,
83            encoder: &mut ___E,
84            out: &mut ::core::mem::MaybeUninit<
85                ::fidl_next::wire::Box<
86                    'static,
87                    crate::wire::InputDeviceGetInputReportsReaderRequest,
88                >,
89            >,
90            _: (),
91        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
92            if let Some(inner) = this {
93                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
94                ::fidl_next::wire::Box::encode_present(out);
95            } else {
96                ::fidl_next::wire::Box::encode_absent(out);
97            }
98
99            Ok(())
100        }
101    }
102
103    impl ::fidl_next::FromWire<crate::wire::InputDeviceGetInputReportsReaderRequest>
104        for InputDeviceGetInputReportsReaderRequest
105    {
106        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
107            crate::wire::InputDeviceGetInputReportsReaderRequest,
108            Self,
109        > = unsafe {
110            ::fidl_next::CopyOptimization::enable_if(
111                true && <::fidl_next::ServerEnd<
112                    crate::InputReportsReader,
113                    ::fidl_next::fuchsia::zx::Channel,
114                > as ::fidl_next::FromWire<
115                    ::fidl_next::ServerEnd<
116                        crate::InputReportsReader,
117                        ::fidl_next::wire::fuchsia::Channel,
118                    >,
119                >>::COPY_OPTIMIZATION
120                    .is_enabled(),
121            )
122        };
123
124        #[inline]
125        fn from_wire(wire: crate::wire::InputDeviceGetInputReportsReaderRequest) -> Self {
126            Self { reader: ::fidl_next::FromWire::from_wire(wire.reader) }
127        }
128    }
129
130    #[derive(Debug, PartialEq)]
131    pub struct InputDeviceGetInputReportsReaderV2Request {
132        pub reader:
133            ::fidl_next::ServerEnd<crate::InputReportsReaderV2, ::fidl_next::fuchsia::zx::Channel>,
134
135        pub max_unacknowledged_reports_limit: u16,
136    }
137
138    unsafe impl<___E>
139        ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportsReaderV2Request, ___E>
140        for InputDeviceGetInputReportsReaderV2Request
141    where
142        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
143        ___E: ::fidl_next::fuchsia::HandleEncoder,
144    {
145        #[inline]
146        fn encode(
147            self,
148            encoder_: &mut ___E,
149            out_: &mut ::core::mem::MaybeUninit<
150                crate::wire::InputDeviceGetInputReportsReaderV2Request,
151            >,
152            _: (),
153        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
154            ::fidl_next::munge! {
155                let crate::wire::InputDeviceGetInputReportsReaderV2Request {
156                    reader,
157                    max_unacknowledged_reports_limit,
158
159                } = out_;
160            }
161
162            ::fidl_next::Encode::encode(self.reader, encoder_, reader, ())?;
163
164            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reader.as_mut_ptr()) };
165
166            ::fidl_next::Encode::encode(
167                self.max_unacknowledged_reports_limit,
168                encoder_,
169                max_unacknowledged_reports_limit,
170                (),
171            )?;
172
173            let mut _field = unsafe {
174                ::fidl_next::Slot::new_unchecked(max_unacknowledged_reports_limit.as_mut_ptr())
175            };
176
177            Ok(())
178        }
179    }
180
181    unsafe impl<___E>
182        ::fidl_next::EncodeOption<
183            ::fidl_next::wire::Box<'static, crate::wire::InputDeviceGetInputReportsReaderV2Request>,
184            ___E,
185        > for InputDeviceGetInputReportsReaderV2Request
186    where
187        ___E: ::fidl_next::Encoder + ?Sized,
188        InputDeviceGetInputReportsReaderV2Request:
189            ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportsReaderV2Request, ___E>,
190    {
191        #[inline]
192        fn encode_option(
193            this: ::core::option::Option<Self>,
194            encoder: &mut ___E,
195            out: &mut ::core::mem::MaybeUninit<
196                ::fidl_next::wire::Box<
197                    'static,
198                    crate::wire::InputDeviceGetInputReportsReaderV2Request,
199                >,
200            >,
201            _: (),
202        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
203            if let Some(inner) = this {
204                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
205                ::fidl_next::wire::Box::encode_present(out);
206            } else {
207                ::fidl_next::wire::Box::encode_absent(out);
208            }
209
210            Ok(())
211        }
212    }
213
214    impl ::fidl_next::FromWire<crate::wire::InputDeviceGetInputReportsReaderV2Request>
215        for InputDeviceGetInputReportsReaderV2Request
216    {
217        #[inline]
218        fn from_wire(wire: crate::wire::InputDeviceGetInputReportsReaderV2Request) -> Self {
219            Self {
220                reader: ::fidl_next::FromWire::from_wire(wire.reader),
221
222                max_unacknowledged_reports_limit: ::fidl_next::FromWire::from_wire(
223                    wire.max_unacknowledged_reports_limit,
224                ),
225            }
226        }
227    }
228
229    #[doc = " An `InputReport` is a single report that is created by an input device.\n An `InputReport` can contain one of many different report types. The report\n types are not mutually exclusive. The `event_time` is the time in\n nanoseconds when the report was generated.\n"]
230    #[derive(Debug, Default, PartialEq)]
231    pub struct InputReport {
232        pub event_time: ::core::option::Option<i64>,
233
234        pub mouse: ::core::option::Option<crate::natural::MouseInputReport>,
235
236        pub trace_id: ::core::option::Option<u64>,
237
238        pub sensor: ::core::option::Option<crate::natural::SensorInputReport>,
239
240        pub touch: ::core::option::Option<crate::natural::TouchInputReport>,
241
242        pub keyboard: ::core::option::Option<crate::natural::KeyboardInputReport>,
243
244        pub consumer_control: ::core::option::Option<crate::natural::ConsumerControlInputReport>,
245
246        pub report_id: ::core::option::Option<u8>,
247
248        pub wake_lease: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
249    }
250
251    impl InputReport {
252        fn __max_ordinal(&self) -> usize {
253            if self.wake_lease.is_some() {
254                return 9;
255            }
256
257            if self.report_id.is_some() {
258                return 8;
259            }
260
261            if self.consumer_control.is_some() {
262                return 7;
263            }
264
265            if self.keyboard.is_some() {
266                return 6;
267            }
268
269            if self.touch.is_some() {
270                return 5;
271            }
272
273            if self.sensor.is_some() {
274                return 4;
275            }
276
277            if self.trace_id.is_some() {
278                return 3;
279            }
280
281            if self.mouse.is_some() {
282                return 2;
283            }
284
285            if self.event_time.is_some() {
286                return 1;
287            }
288
289            0
290        }
291    }
292
293    unsafe impl<___E> ::fidl_next::Encode<crate::wire::InputReport<'static>, ___E> for InputReport
294    where
295        ___E: ::fidl_next::Encoder + ?Sized,
296        ___E: ::fidl_next::fuchsia::HandleEncoder,
297    {
298        #[inline]
299        fn encode(
300            mut self,
301            encoder: &mut ___E,
302            out: &mut ::core::mem::MaybeUninit<crate::wire::InputReport<'static>>,
303            _: (),
304        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
305            ::fidl_next::munge!(let crate::wire::InputReport { table } = out);
306
307            let max_ord = self.__max_ordinal();
308
309            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
310            ::fidl_next::Wire::zero_padding(&mut out);
311
312            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
313                ::fidl_next::wire::Envelope,
314            >(encoder, max_ord);
315
316            for i in 1..=max_ord {
317                match i {
318                    9 => {
319                        if let Some(value) = self.wake_lease.take() {
320                            ::fidl_next::wire::Envelope::encode_value::<
321                                ::fidl_next::wire::fuchsia::EventPair,
322                                ___E,
323                            >(
324                                value, preallocated.encoder, &mut out, ()
325                            )?;
326                        } else {
327                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
328                        }
329                    }
330
331                    8 => {
332                        if let Some(value) = self.report_id.take() {
333                            ::fidl_next::wire::Envelope::encode_value::<u8, ___E>(
334                                value,
335                                preallocated.encoder,
336                                &mut out,
337                                (),
338                            )?;
339                        } else {
340                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
341                        }
342                    }
343
344                    7 => {
345                        if let Some(value) = self.consumer_control.take() {
346                            ::fidl_next::wire::Envelope::encode_value::<
347                                crate::wire::ConsumerControlInputReport<'static>,
348                                ___E,
349                            >(
350                                value, preallocated.encoder, &mut out, ()
351                            )?;
352                        } else {
353                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
354                        }
355                    }
356
357                    6 => {
358                        if let Some(value) = self.keyboard.take() {
359                            ::fidl_next::wire::Envelope::encode_value::<
360                                crate::wire::KeyboardInputReport<'static>,
361                                ___E,
362                            >(
363                                value, preallocated.encoder, &mut out, ()
364                            )?;
365                        } else {
366                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
367                        }
368                    }
369
370                    5 => {
371                        if let Some(value) = self.touch.take() {
372                            ::fidl_next::wire::Envelope::encode_value::<
373                                crate::wire::TouchInputReport<'static>,
374                                ___E,
375                            >(
376                                value, preallocated.encoder, &mut out, ()
377                            )?;
378                        } else {
379                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
380                        }
381                    }
382
383                    4 => {
384                        if let Some(value) = self.sensor.take() {
385                            ::fidl_next::wire::Envelope::encode_value::<
386                                crate::wire::SensorInputReport<'static>,
387                                ___E,
388                            >(
389                                value, preallocated.encoder, &mut out, ()
390                            )?;
391                        } else {
392                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
393                        }
394                    }
395
396                    3 => {
397                        if let Some(value) = self.trace_id.take() {
398                            ::fidl_next::wire::Envelope::encode_value::<
399                                ::fidl_next::wire::Uint64,
400                                ___E,
401                            >(
402                                value, preallocated.encoder, &mut out, ()
403                            )?;
404                        } else {
405                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
406                        }
407                    }
408
409                    2 => {
410                        if let Some(value) = self.mouse.take() {
411                            ::fidl_next::wire::Envelope::encode_value::<
412                                crate::wire::MouseInputReport<'static>,
413                                ___E,
414                            >(
415                                value, preallocated.encoder, &mut out, ()
416                            )?;
417                        } else {
418                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
419                        }
420                    }
421
422                    1 => {
423                        if let Some(value) = self.event_time.take() {
424                            ::fidl_next::wire::Envelope::encode_value::<
425                                ::fidl_next::wire::Int64,
426                                ___E,
427                            >(
428                                value, preallocated.encoder, &mut out, ()
429                            )?;
430                        } else {
431                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
432                        }
433                    }
434
435                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
436                }
437                unsafe {
438                    preallocated.write_next(out.assume_init_ref());
439                }
440            }
441
442            ::fidl_next::wire::Table::encode_len(table, max_ord);
443
444            Ok(())
445        }
446    }
447
448    impl<'de> ::fidl_next::FromWire<crate::wire::InputReport<'de>> for InputReport {
449        #[inline]
450        fn from_wire(wire_: crate::wire::InputReport<'de>) -> Self {
451            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
452
453            let event_time = wire_.table.get(1);
454
455            let mouse = wire_.table.get(2);
456
457            let trace_id = wire_.table.get(3);
458
459            let sensor = wire_.table.get(4);
460
461            let touch = wire_.table.get(5);
462
463            let keyboard = wire_.table.get(6);
464
465            let consumer_control = wire_.table.get(7);
466
467            let report_id = wire_.table.get(8);
468
469            let wake_lease = wire_.table.get(9);
470
471            Self {
472                event_time: event_time.map(|envelope| {
473                    ::fidl_next::FromWire::from_wire(unsafe {
474                        envelope.read_unchecked::<::fidl_next::wire::Int64>()
475                    })
476                }),
477
478                mouse: mouse.map(|envelope| {
479                    ::fidl_next::FromWire::from_wire(unsafe {
480                        envelope.read_unchecked::<crate::wire::MouseInputReport<'de>>()
481                    })
482                }),
483
484                trace_id: trace_id.map(|envelope| {
485                    ::fidl_next::FromWire::from_wire(unsafe {
486                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
487                    })
488                }),
489
490                sensor: sensor.map(|envelope| {
491                    ::fidl_next::FromWire::from_wire(unsafe {
492                        envelope.read_unchecked::<crate::wire::SensorInputReport<'de>>()
493                    })
494                }),
495
496                touch: touch.map(|envelope| {
497                    ::fidl_next::FromWire::from_wire(unsafe {
498                        envelope.read_unchecked::<crate::wire::TouchInputReport<'de>>()
499                    })
500                }),
501
502                keyboard: keyboard.map(|envelope| {
503                    ::fidl_next::FromWire::from_wire(unsafe {
504                        envelope.read_unchecked::<crate::wire::KeyboardInputReport<'de>>()
505                    })
506                }),
507
508                consumer_control: consumer_control.map(|envelope| {
509                    ::fidl_next::FromWire::from_wire(unsafe {
510                        envelope.read_unchecked::<crate::wire::ConsumerControlInputReport<'de>>()
511                    })
512                }),
513
514                report_id: report_id.map(|envelope| {
515                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<u8>() })
516                }),
517
518                wake_lease: wake_lease.map(|envelope| {
519                    ::fidl_next::FromWire::from_wire(unsafe {
520                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
521                    })
522                }),
523            }
524        }
525    }
526
527    #[derive(Debug, PartialEq)]
528    pub struct InputDeviceGetInputReportResponse {
529        pub report: crate::natural::InputReport,
530    }
531
532    unsafe impl<___E>
533        ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportResponse<'static>, ___E>
534        for InputDeviceGetInputReportResponse
535    where
536        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
537        ___E: ::fidl_next::Encoder,
538        ___E: ::fidl_next::fuchsia::HandleEncoder,
539    {
540        #[inline]
541        fn encode(
542            self,
543            encoder_: &mut ___E,
544            out_: &mut ::core::mem::MaybeUninit<
545                crate::wire::InputDeviceGetInputReportResponse<'static>,
546            >,
547            _: (),
548        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
549            ::fidl_next::munge! {
550                let crate::wire::InputDeviceGetInputReportResponse {
551                    report,
552
553                } = out_;
554            }
555
556            ::fidl_next::Encode::encode(self.report, encoder_, report, ())?;
557
558            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(report.as_mut_ptr()) };
559
560            Ok(())
561        }
562    }
563
564    unsafe impl<___E>
565        ::fidl_next::EncodeOption<
566            ::fidl_next::wire::Box<
567                'static,
568                crate::wire::InputDeviceGetInputReportResponse<'static>,
569            >,
570            ___E,
571        > for InputDeviceGetInputReportResponse
572    where
573        ___E: ::fidl_next::Encoder + ?Sized,
574        InputDeviceGetInputReportResponse:
575            ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportResponse<'static>, ___E>,
576    {
577        #[inline]
578        fn encode_option(
579            this: ::core::option::Option<Self>,
580            encoder: &mut ___E,
581            out: &mut ::core::mem::MaybeUninit<
582                ::fidl_next::wire::Box<
583                    'static,
584                    crate::wire::InputDeviceGetInputReportResponse<'static>,
585                >,
586            >,
587            _: (),
588        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
589            if let Some(inner) = this {
590                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
591                ::fidl_next::wire::Box::encode_present(out);
592            } else {
593                ::fidl_next::wire::Box::encode_absent(out);
594            }
595
596            Ok(())
597        }
598    }
599
600    impl<'de> ::fidl_next::FromWire<crate::wire::InputDeviceGetInputReportResponse<'de>>
601        for InputDeviceGetInputReportResponse
602    {
603        #[inline]
604        fn from_wire(wire: crate::wire::InputDeviceGetInputReportResponse<'de>) -> Self {
605            Self { report: ::fidl_next::FromWire::from_wire(wire.report) }
606        }
607    }
608
609    #[derive(Debug, PartialEq)]
610    pub struct InputReportsReaderReadInputReportsResponse {
611        pub reports: ::std::vec::Vec<crate::natural::InputReport>,
612    }
613
614    unsafe impl<___E>
615        ::fidl_next::Encode<crate::wire::InputReportsReaderReadInputReportsResponse<'static>, ___E>
616        for InputReportsReaderReadInputReportsResponse
617    where
618        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
619        ___E: ::fidl_next::Encoder,
620        ___E: ::fidl_next::fuchsia::HandleEncoder,
621    {
622        #[inline]
623        fn encode(
624            self,
625            encoder_: &mut ___E,
626            out_: &mut ::core::mem::MaybeUninit<
627                crate::wire::InputReportsReaderReadInputReportsResponse<'static>,
628            >,
629            _: (),
630        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
631            ::fidl_next::munge! {
632                let crate::wire::InputReportsReaderReadInputReportsResponse {
633                    reports,
634
635                } = out_;
636            }
637
638            ::fidl_next::Encode::encode(self.reports, encoder_, reports, (50, ()))?;
639
640            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reports.as_mut_ptr()) };
641            ::fidl_next::Constrained::validate(_field, (50, ()))?;
642
643            Ok(())
644        }
645    }
646
647    unsafe impl<___E>
648        ::fidl_next::EncodeOption<
649            ::fidl_next::wire::Box<
650                'static,
651                crate::wire::InputReportsReaderReadInputReportsResponse<'static>,
652            >,
653            ___E,
654        > for InputReportsReaderReadInputReportsResponse
655    where
656        ___E: ::fidl_next::Encoder + ?Sized,
657        InputReportsReaderReadInputReportsResponse: ::fidl_next::Encode<
658                crate::wire::InputReportsReaderReadInputReportsResponse<'static>,
659                ___E,
660            >,
661    {
662        #[inline]
663        fn encode_option(
664            this: ::core::option::Option<Self>,
665            encoder: &mut ___E,
666            out: &mut ::core::mem::MaybeUninit<
667                ::fidl_next::wire::Box<
668                    'static,
669                    crate::wire::InputReportsReaderReadInputReportsResponse<'static>,
670                >,
671            >,
672            _: (),
673        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
674            if let Some(inner) = this {
675                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
676                ::fidl_next::wire::Box::encode_present(out);
677            } else {
678                ::fidl_next::wire::Box::encode_absent(out);
679            }
680
681            Ok(())
682        }
683    }
684
685    impl<'de> ::fidl_next::FromWire<crate::wire::InputReportsReaderReadInputReportsResponse<'de>>
686        for InputReportsReaderReadInputReportsResponse
687    {
688        #[inline]
689        fn from_wire(wire: crate::wire::InputReportsReaderReadInputReportsResponse<'de>) -> Self {
690            Self { reports: ::fidl_next::FromWire::from_wire(wire.reports) }
691        }
692    }
693
694    #[derive(Debug, PartialEq)]
695    pub struct InputReportsReaderV2OnInputReportsRequest {
696        pub reports: ::std::vec::Vec<crate::natural::InputReport>,
697
698        pub last_report_stamp: u64,
699    }
700
701    unsafe impl<___E>
702        ::fidl_next::Encode<crate::wire::InputReportsReaderV2OnInputReportsRequest<'static>, ___E>
703        for InputReportsReaderV2OnInputReportsRequest
704    where
705        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
706        ___E: ::fidl_next::Encoder,
707        ___E: ::fidl_next::fuchsia::HandleEncoder,
708    {
709        #[inline]
710        fn encode(
711            self,
712            encoder_: &mut ___E,
713            out_: &mut ::core::mem::MaybeUninit<
714                crate::wire::InputReportsReaderV2OnInputReportsRequest<'static>,
715            >,
716            _: (),
717        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
718            ::fidl_next::munge! {
719                let crate::wire::InputReportsReaderV2OnInputReportsRequest {
720                    reports,
721                    last_report_stamp,
722
723                } = out_;
724            }
725
726            ::fidl_next::Encode::encode(self.reports, encoder_, reports, (50, ()))?;
727
728            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reports.as_mut_ptr()) };
729            ::fidl_next::Constrained::validate(_field, (50, ()))?;
730
731            ::fidl_next::Encode::encode(self.last_report_stamp, encoder_, last_report_stamp, ())?;
732
733            let mut _field =
734                unsafe { ::fidl_next::Slot::new_unchecked(last_report_stamp.as_mut_ptr()) };
735
736            Ok(())
737        }
738    }
739
740    unsafe impl<___E>
741        ::fidl_next::EncodeOption<
742            ::fidl_next::wire::Box<
743                'static,
744                crate::wire::InputReportsReaderV2OnInputReportsRequest<'static>,
745            >,
746            ___E,
747        > for InputReportsReaderV2OnInputReportsRequest
748    where
749        ___E: ::fidl_next::Encoder + ?Sized,
750        InputReportsReaderV2OnInputReportsRequest: ::fidl_next::Encode<
751                crate::wire::InputReportsReaderV2OnInputReportsRequest<'static>,
752                ___E,
753            >,
754    {
755        #[inline]
756        fn encode_option(
757            this: ::core::option::Option<Self>,
758            encoder: &mut ___E,
759            out: &mut ::core::mem::MaybeUninit<
760                ::fidl_next::wire::Box<
761                    'static,
762                    crate::wire::InputReportsReaderV2OnInputReportsRequest<'static>,
763                >,
764            >,
765            _: (),
766        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
767            if let Some(inner) = this {
768                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
769                ::fidl_next::wire::Box::encode_present(out);
770            } else {
771                ::fidl_next::wire::Box::encode_absent(out);
772            }
773
774            Ok(())
775        }
776    }
777
778    impl<'de> ::fidl_next::FromWire<crate::wire::InputReportsReaderV2OnInputReportsRequest<'de>>
779        for InputReportsReaderV2OnInputReportsRequest
780    {
781        #[inline]
782        fn from_wire(wire: crate::wire::InputReportsReaderV2OnInputReportsRequest<'de>) -> Self {
783            Self {
784                reports: ::fidl_next::FromWire::from_wire(wire.reports),
785
786                last_report_stamp: ::fidl_next::FromWire::from_wire(wire.last_report_stamp),
787            }
788        }
789    }
790
791    pub type Range = ::fidl_next_fuchsia_input::natural::Range;
792
793    pub type Unit = ::fidl_next_fuchsia_input::natural::Unit;
794
795    pub type UnitType = ::fidl_next_fuchsia_input::natural::UnitType;
796}
797
798pub mod wire {
799
800    pub use fidl_next_common_fuchsia_input_report::wire::*;
801
802    /// The wire type corresponding to [`Axis`](crate::natural::Axis).
803    pub type Axis = ::fidl_next_fuchsia_input::wire::Axis;
804
805    /// The wire type corresponding to [`ConsumerControlButton`](crate::natural::ConsumerControlButton).
806    pub type ConsumerControlButton = ::fidl_next_fuchsia_input::wire::ConsumerControlButton;
807
808    /// The wire type corresponding to [`InputDeviceGetInputReportsReaderRequest`].
809    #[derive(Debug)]
810    #[repr(C)]
811    pub struct InputDeviceGetInputReportsReaderRequest {
812        pub reader:
813            ::fidl_next::ServerEnd<crate::InputReportsReader, ::fidl_next::wire::fuchsia::Channel>,
814    }
815
816    static_assertions::const_assert_eq!(
817        std::mem::size_of::<InputDeviceGetInputReportsReaderRequest>(),
818        4
819    );
820    static_assertions::const_assert_eq!(
821        std::mem::align_of::<InputDeviceGetInputReportsReaderRequest>(),
822        4
823    );
824
825    static_assertions::const_assert_eq!(
826        std::mem::offset_of!(InputDeviceGetInputReportsReaderRequest, reader),
827        0
828    );
829
830    impl ::fidl_next::Constrained for InputDeviceGetInputReportsReaderRequest {
831        type Constraint = ();
832
833        fn validate(
834            _: ::fidl_next::Slot<'_, Self>,
835            _: Self::Constraint,
836        ) -> Result<(), ::fidl_next::ValidationError> {
837            Ok(())
838        }
839    }
840
841    unsafe impl ::fidl_next::Wire for InputDeviceGetInputReportsReaderRequest {
842        type Narrowed<'de> = InputDeviceGetInputReportsReaderRequest;
843
844        #[inline]
845        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
846            ::fidl_next::munge! {
847                let Self {
848                    reader,
849
850                } = &mut *out_;
851            }
852
853            ::fidl_next::Wire::zero_padding(reader);
854        }
855    }
856
857    unsafe impl<___D> ::fidl_next::Decode<___D> for InputDeviceGetInputReportsReaderRequest
858    where
859        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
860        ___D: ::fidl_next::fuchsia::HandleDecoder,
861    {
862        fn decode(
863            slot_: ::fidl_next::Slot<'_, Self>,
864            decoder_: &mut ___D,
865            _: (),
866        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
867            ::fidl_next::munge! {
868                let Self {
869                    mut reader,
870
871                } = slot_;
872            }
873
874            let _field = reader.as_mut();
875
876            ::fidl_next::Decode::decode(reader.as_mut(), decoder_, ())?;
877
878            Ok(())
879        }
880    }
881
882    impl ::fidl_next::IntoNatural for InputDeviceGetInputReportsReaderRequest {
883        type Natural = crate::natural::InputDeviceGetInputReportsReaderRequest;
884    }
885
886    /// The wire type corresponding to [`InputDeviceGetInputReportsReaderV2Request`].
887    #[derive(Debug)]
888    #[repr(C)]
889    pub struct InputDeviceGetInputReportsReaderV2Request {
890        pub reader: ::fidl_next::ServerEnd<
891            crate::InputReportsReaderV2,
892            ::fidl_next::wire::fuchsia::Channel,
893        >,
894
895        pub max_unacknowledged_reports_limit: ::fidl_next::wire::Uint16,
896    }
897
898    static_assertions::const_assert_eq!(
899        std::mem::size_of::<InputDeviceGetInputReportsReaderV2Request>(),
900        8
901    );
902    static_assertions::const_assert_eq!(
903        std::mem::align_of::<InputDeviceGetInputReportsReaderV2Request>(),
904        4
905    );
906
907    static_assertions::const_assert_eq!(
908        std::mem::offset_of!(InputDeviceGetInputReportsReaderV2Request, reader),
909        0
910    );
911
912    static_assertions::const_assert_eq!(
913        std::mem::offset_of!(
914            InputDeviceGetInputReportsReaderV2Request,
915            max_unacknowledged_reports_limit
916        ),
917        4
918    );
919
920    impl ::fidl_next::Constrained for InputDeviceGetInputReportsReaderV2Request {
921        type Constraint = ();
922
923        fn validate(
924            _: ::fidl_next::Slot<'_, Self>,
925            _: Self::Constraint,
926        ) -> Result<(), ::fidl_next::ValidationError> {
927            Ok(())
928        }
929    }
930
931    unsafe impl ::fidl_next::Wire for InputDeviceGetInputReportsReaderV2Request {
932        type Narrowed<'de> = InputDeviceGetInputReportsReaderV2Request;
933
934        #[inline]
935        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
936            ::fidl_next::munge! {
937                let Self {
938                    reader,
939                    max_unacknowledged_reports_limit,
940
941                } = &mut *out_;
942            }
943
944            ::fidl_next::Wire::zero_padding(reader);
945
946            ::fidl_next::Wire::zero_padding(max_unacknowledged_reports_limit);
947
948            unsafe {
949                out_.as_mut_ptr().cast::<u8>().add(6).write_bytes(0, 2);
950            }
951        }
952    }
953
954    unsafe impl<___D> ::fidl_next::Decode<___D> for InputDeviceGetInputReportsReaderV2Request
955    where
956        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
957        ___D: ::fidl_next::fuchsia::HandleDecoder,
958    {
959        fn decode(
960            slot_: ::fidl_next::Slot<'_, Self>,
961            decoder_: &mut ___D,
962            _: (),
963        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
964            if slot_.as_bytes()[6..8] != [0u8; 2] {
965                return Err(::fidl_next::DecodeError::InvalidPadding);
966            }
967
968            ::fidl_next::munge! {
969                let Self {
970                    mut reader,
971                    mut max_unacknowledged_reports_limit,
972
973                } = slot_;
974            }
975
976            let _field = reader.as_mut();
977
978            ::fidl_next::Decode::decode(reader.as_mut(), decoder_, ())?;
979
980            let _field = max_unacknowledged_reports_limit.as_mut();
981
982            ::fidl_next::Decode::decode(max_unacknowledged_reports_limit.as_mut(), decoder_, ())?;
983
984            Ok(())
985        }
986    }
987
988    impl ::fidl_next::IntoNatural for InputDeviceGetInputReportsReaderV2Request {
989        type Natural = crate::natural::InputDeviceGetInputReportsReaderV2Request;
990    }
991
992    /// The wire type corresponding to [`InputReport`].
993    #[repr(C)]
994    pub struct InputReport<'de> {
995        pub(crate) table: ::fidl_next::wire::Table<'de>,
996    }
997
998    impl<'de> Drop for InputReport<'de> {
999        fn drop(&mut self) {
1000            let _ = self
1001                .table
1002                .get(1)
1003                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
1004
1005            let _ = self.table.get(2).map(|envelope| unsafe {
1006                envelope.read_unchecked::<crate::wire::MouseInputReport<'de>>()
1007            });
1008
1009            let _ = self
1010                .table
1011                .get(3)
1012                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
1013
1014            let _ = self.table.get(4).map(|envelope| unsafe {
1015                envelope.read_unchecked::<crate::wire::SensorInputReport<'de>>()
1016            });
1017
1018            let _ = self.table.get(5).map(|envelope| unsafe {
1019                envelope.read_unchecked::<crate::wire::TouchInputReport<'de>>()
1020            });
1021
1022            let _ = self.table.get(6).map(|envelope| unsafe {
1023                envelope.read_unchecked::<crate::wire::KeyboardInputReport<'de>>()
1024            });
1025
1026            let _ = self.table.get(7).map(|envelope| unsafe {
1027                envelope.read_unchecked::<crate::wire::ConsumerControlInputReport<'de>>()
1028            });
1029
1030            let _ = self.table.get(8).map(|envelope| unsafe { envelope.read_unchecked::<u8>() });
1031
1032            let _ = self.table.get(9).map(|envelope| unsafe {
1033                envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
1034            });
1035        }
1036    }
1037
1038    impl ::fidl_next::Constrained for InputReport<'_> {
1039        type Constraint = ();
1040
1041        fn validate(
1042            _: ::fidl_next::Slot<'_, Self>,
1043            _: Self::Constraint,
1044        ) -> Result<(), ::fidl_next::ValidationError> {
1045            Ok(())
1046        }
1047    }
1048
1049    unsafe impl ::fidl_next::Wire for InputReport<'static> {
1050        type Narrowed<'de> = InputReport<'de>;
1051
1052        #[inline]
1053        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1054            ::fidl_next::munge!(let Self { table } = out);
1055            ::fidl_next::wire::Table::zero_padding(table);
1056        }
1057    }
1058
1059    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputReport<'de>
1060    where
1061        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1062        ___D: ::fidl_next::fuchsia::HandleDecoder,
1063    {
1064        fn decode(
1065            slot: ::fidl_next::Slot<'_, Self>,
1066            decoder: &mut ___D,
1067            _: (),
1068        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1069            ::fidl_next::munge!(let Self { table } = slot);
1070
1071            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1072                match ordinal {
1073                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1074
1075                    1 => {
1076                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
1077                            slot.as_mut(),
1078                            decoder,
1079                            (),
1080                        )?;
1081
1082                        Ok(())
1083                    }
1084
1085                    2 => {
1086                        ::fidl_next::wire::Envelope::decode_as::<
1087                            ___D,
1088                            crate::wire::MouseInputReport<'de>,
1089                        >(slot.as_mut(), decoder, ())?;
1090
1091                        Ok(())
1092                    }
1093
1094                    3 => {
1095                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
1096                            slot.as_mut(),
1097                            decoder,
1098                            (),
1099                        )?;
1100
1101                        Ok(())
1102                    }
1103
1104                    4 => {
1105                        ::fidl_next::wire::Envelope::decode_as::<
1106                            ___D,
1107                            crate::wire::SensorInputReport<'de>,
1108                        >(slot.as_mut(), decoder, ())?;
1109
1110                        Ok(())
1111                    }
1112
1113                    5 => {
1114                        ::fidl_next::wire::Envelope::decode_as::<
1115                            ___D,
1116                            crate::wire::TouchInputReport<'de>,
1117                        >(slot.as_mut(), decoder, ())?;
1118
1119                        Ok(())
1120                    }
1121
1122                    6 => {
1123                        ::fidl_next::wire::Envelope::decode_as::<
1124                            ___D,
1125                            crate::wire::KeyboardInputReport<'de>,
1126                        >(slot.as_mut(), decoder, ())?;
1127
1128                        Ok(())
1129                    }
1130
1131                    7 => {
1132                        ::fidl_next::wire::Envelope::decode_as::<
1133                            ___D,
1134                            crate::wire::ConsumerControlInputReport<'de>,
1135                        >(slot.as_mut(), decoder, ())?;
1136
1137                        Ok(())
1138                    }
1139
1140                    8 => {
1141                        ::fidl_next::wire::Envelope::decode_as::<___D, u8>(
1142                            slot.as_mut(),
1143                            decoder,
1144                            (),
1145                        )?;
1146
1147                        Ok(())
1148                    }
1149
1150                    9 => {
1151                        ::fidl_next::wire::Envelope::decode_as::<
1152                            ___D,
1153                            ::fidl_next::wire::fuchsia::EventPair,
1154                        >(slot.as_mut(), decoder, ())?;
1155
1156                        Ok(())
1157                    }
1158
1159                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1160                }
1161            })
1162        }
1163    }
1164
1165    impl<'de> InputReport<'de> {
1166        pub fn event_time(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
1167            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1168        }
1169
1170        pub fn take_event_time(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
1171            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1172        }
1173
1174        pub fn mouse(&self) -> ::core::option::Option<&crate::wire::MouseInputReport<'de>> {
1175            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1176        }
1177
1178        pub fn take_mouse(&mut self) -> ::core::option::Option<crate::wire::MouseInputReport<'de>> {
1179            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1180        }
1181
1182        pub fn trace_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
1183            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1184        }
1185
1186        pub fn take_trace_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
1187            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
1188        }
1189
1190        pub fn sensor(&self) -> ::core::option::Option<&crate::wire::SensorInputReport<'de>> {
1191            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1192        }
1193
1194        pub fn take_sensor(
1195            &mut self,
1196        ) -> ::core::option::Option<crate::wire::SensorInputReport<'de>> {
1197            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
1198        }
1199
1200        pub fn touch(&self) -> ::core::option::Option<&crate::wire::TouchInputReport<'de>> {
1201            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
1202        }
1203
1204        pub fn take_touch(&mut self) -> ::core::option::Option<crate::wire::TouchInputReport<'de>> {
1205            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
1206        }
1207
1208        pub fn keyboard(&self) -> ::core::option::Option<&crate::wire::KeyboardInputReport<'de>> {
1209            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
1210        }
1211
1212        pub fn take_keyboard(
1213            &mut self,
1214        ) -> ::core::option::Option<crate::wire::KeyboardInputReport<'de>> {
1215            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
1216        }
1217
1218        pub fn consumer_control(
1219            &self,
1220        ) -> ::core::option::Option<&crate::wire::ConsumerControlInputReport<'de>> {
1221            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
1222        }
1223
1224        pub fn take_consumer_control(
1225            &mut self,
1226        ) -> ::core::option::Option<crate::wire::ConsumerControlInputReport<'de>> {
1227            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
1228        }
1229
1230        pub fn report_id(&self) -> ::core::option::Option<&u8> {
1231            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
1232        }
1233
1234        pub fn take_report_id(&mut self) -> ::core::option::Option<u8> {
1235            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
1236        }
1237
1238        pub fn wake_lease(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
1239            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
1240        }
1241
1242        pub fn take_wake_lease(
1243            &mut self,
1244        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
1245            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
1246        }
1247    }
1248
1249    impl<'de> ::core::fmt::Debug for InputReport<'de> {
1250        fn fmt(
1251            &self,
1252            f: &mut ::core::fmt::Formatter<'_>,
1253        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1254            f.debug_struct("InputReport")
1255                .field("event_time", &self.event_time())
1256                .field("mouse", &self.mouse())
1257                .field("trace_id", &self.trace_id())
1258                .field("sensor", &self.sensor())
1259                .field("touch", &self.touch())
1260                .field("keyboard", &self.keyboard())
1261                .field("consumer_control", &self.consumer_control())
1262                .field("report_id", &self.report_id())
1263                .field("wake_lease", &self.wake_lease())
1264                .finish()
1265        }
1266    }
1267
1268    impl<'de> ::fidl_next::IntoNatural for InputReport<'de> {
1269        type Natural = crate::natural::InputReport;
1270    }
1271
1272    /// The wire type corresponding to [`InputDeviceGetInputReportResponse`].
1273    #[derive(Debug)]
1274    #[repr(C)]
1275    pub struct InputDeviceGetInputReportResponse<'de> {
1276        pub report: crate::wire::InputReport<'de>,
1277    }
1278
1279    static_assertions::const_assert_eq!(
1280        std::mem::size_of::<InputDeviceGetInputReportResponse<'_>>(),
1281        16
1282    );
1283    static_assertions::const_assert_eq!(
1284        std::mem::align_of::<InputDeviceGetInputReportResponse<'_>>(),
1285        8
1286    );
1287
1288    static_assertions::const_assert_eq!(
1289        std::mem::offset_of!(InputDeviceGetInputReportResponse<'_>, report),
1290        0
1291    );
1292
1293    impl ::fidl_next::Constrained for InputDeviceGetInputReportResponse<'_> {
1294        type Constraint = ();
1295
1296        fn validate(
1297            _: ::fidl_next::Slot<'_, Self>,
1298            _: Self::Constraint,
1299        ) -> Result<(), ::fidl_next::ValidationError> {
1300            Ok(())
1301        }
1302    }
1303
1304    unsafe impl ::fidl_next::Wire for InputDeviceGetInputReportResponse<'static> {
1305        type Narrowed<'de> = InputDeviceGetInputReportResponse<'de>;
1306
1307        #[inline]
1308        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1309            ::fidl_next::munge! {
1310                let Self {
1311                    report,
1312
1313                } = &mut *out_;
1314            }
1315
1316            ::fidl_next::Wire::zero_padding(report);
1317        }
1318    }
1319
1320    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputDeviceGetInputReportResponse<'de>
1321    where
1322        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1323        ___D: ::fidl_next::Decoder<'de>,
1324        ___D: ::fidl_next::fuchsia::HandleDecoder,
1325    {
1326        fn decode(
1327            slot_: ::fidl_next::Slot<'_, Self>,
1328            decoder_: &mut ___D,
1329            _: (),
1330        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1331            ::fidl_next::munge! {
1332                let Self {
1333                    mut report,
1334
1335                } = slot_;
1336            }
1337
1338            let _field = report.as_mut();
1339
1340            ::fidl_next::Decode::decode(report.as_mut(), decoder_, ())?;
1341
1342            Ok(())
1343        }
1344    }
1345
1346    impl<'de> ::fidl_next::IntoNatural for InputDeviceGetInputReportResponse<'de> {
1347        type Natural = crate::natural::InputDeviceGetInputReportResponse;
1348    }
1349
1350    /// The wire type corresponding to [`InputReportsReaderReadInputReportsResponse`].
1351    #[derive(Debug)]
1352    #[repr(C)]
1353    pub struct InputReportsReaderReadInputReportsResponse<'de> {
1354        pub reports: ::fidl_next::wire::Vector<'de, crate::wire::InputReport<'de>>,
1355    }
1356
1357    static_assertions::const_assert_eq!(
1358        std::mem::size_of::<InputReportsReaderReadInputReportsResponse<'_>>(),
1359        16
1360    );
1361    static_assertions::const_assert_eq!(
1362        std::mem::align_of::<InputReportsReaderReadInputReportsResponse<'_>>(),
1363        8
1364    );
1365
1366    static_assertions::const_assert_eq!(
1367        std::mem::offset_of!(InputReportsReaderReadInputReportsResponse<'_>, reports),
1368        0
1369    );
1370
1371    impl ::fidl_next::Constrained for InputReportsReaderReadInputReportsResponse<'_> {
1372        type Constraint = ();
1373
1374        fn validate(
1375            _: ::fidl_next::Slot<'_, Self>,
1376            _: Self::Constraint,
1377        ) -> Result<(), ::fidl_next::ValidationError> {
1378            Ok(())
1379        }
1380    }
1381
1382    unsafe impl ::fidl_next::Wire for InputReportsReaderReadInputReportsResponse<'static> {
1383        type Narrowed<'de> = InputReportsReaderReadInputReportsResponse<'de>;
1384
1385        #[inline]
1386        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1387            ::fidl_next::munge! {
1388                let Self {
1389                    reports,
1390
1391                } = &mut *out_;
1392            }
1393
1394            ::fidl_next::Wire::zero_padding(reports);
1395        }
1396    }
1397
1398    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputReportsReaderReadInputReportsResponse<'de>
1399    where
1400        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1401        ___D: ::fidl_next::Decoder<'de>,
1402        ___D: ::fidl_next::fuchsia::HandleDecoder,
1403    {
1404        fn decode(
1405            slot_: ::fidl_next::Slot<'_, Self>,
1406            decoder_: &mut ___D,
1407            _: (),
1408        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1409            ::fidl_next::munge! {
1410                let Self {
1411                    mut reports,
1412
1413                } = slot_;
1414            }
1415
1416            let _field = reports.as_mut();
1417            ::fidl_next::Constrained::validate(_field, (50, ()))?;
1418            ::fidl_next::Decode::decode(reports.as_mut(), decoder_, (50, ()))?;
1419
1420            let reports = unsafe { reports.deref_unchecked() };
1421
1422            if reports.len() > 50 {
1423                return Err(::fidl_next::DecodeError::VectorTooLong {
1424                    size: reports.len() as u64,
1425                    limit: 50,
1426                });
1427            }
1428
1429            Ok(())
1430        }
1431    }
1432
1433    impl<'de> ::fidl_next::IntoNatural for InputReportsReaderReadInputReportsResponse<'de> {
1434        type Natural = crate::natural::InputReportsReaderReadInputReportsResponse;
1435    }
1436
1437    /// The wire type corresponding to [`InputReportsReaderV2OnInputReportsRequest`].
1438    #[derive(Debug)]
1439    #[repr(C)]
1440    pub struct InputReportsReaderV2OnInputReportsRequest<'de> {
1441        pub reports: ::fidl_next::wire::Vector<'de, crate::wire::InputReport<'de>>,
1442
1443        pub last_report_stamp: ::fidl_next::wire::Uint64,
1444    }
1445
1446    static_assertions::const_assert_eq!(
1447        std::mem::size_of::<InputReportsReaderV2OnInputReportsRequest<'_>>(),
1448        24
1449    );
1450    static_assertions::const_assert_eq!(
1451        std::mem::align_of::<InputReportsReaderV2OnInputReportsRequest<'_>>(),
1452        8
1453    );
1454
1455    static_assertions::const_assert_eq!(
1456        std::mem::offset_of!(InputReportsReaderV2OnInputReportsRequest<'_>, reports),
1457        0
1458    );
1459
1460    static_assertions::const_assert_eq!(
1461        std::mem::offset_of!(InputReportsReaderV2OnInputReportsRequest<'_>, last_report_stamp),
1462        16
1463    );
1464
1465    impl ::fidl_next::Constrained for InputReportsReaderV2OnInputReportsRequest<'_> {
1466        type Constraint = ();
1467
1468        fn validate(
1469            _: ::fidl_next::Slot<'_, Self>,
1470            _: Self::Constraint,
1471        ) -> Result<(), ::fidl_next::ValidationError> {
1472            Ok(())
1473        }
1474    }
1475
1476    unsafe impl ::fidl_next::Wire for InputReportsReaderV2OnInputReportsRequest<'static> {
1477        type Narrowed<'de> = InputReportsReaderV2OnInputReportsRequest<'de>;
1478
1479        #[inline]
1480        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1481            ::fidl_next::munge! {
1482                let Self {
1483                    reports,
1484                    last_report_stamp,
1485
1486                } = &mut *out_;
1487            }
1488
1489            ::fidl_next::Wire::zero_padding(reports);
1490
1491            ::fidl_next::Wire::zero_padding(last_report_stamp);
1492        }
1493    }
1494
1495    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for InputReportsReaderV2OnInputReportsRequest<'de>
1496    where
1497        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1498        ___D: ::fidl_next::Decoder<'de>,
1499        ___D: ::fidl_next::fuchsia::HandleDecoder,
1500    {
1501        fn decode(
1502            slot_: ::fidl_next::Slot<'_, Self>,
1503            decoder_: &mut ___D,
1504            _: (),
1505        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1506            ::fidl_next::munge! {
1507                let Self {
1508                    mut reports,
1509                    mut last_report_stamp,
1510
1511                } = slot_;
1512            }
1513
1514            let _field = reports.as_mut();
1515            ::fidl_next::Constrained::validate(_field, (50, ()))?;
1516            ::fidl_next::Decode::decode(reports.as_mut(), decoder_, (50, ()))?;
1517
1518            let reports = unsafe { reports.deref_unchecked() };
1519
1520            if reports.len() > 50 {
1521                return Err(::fidl_next::DecodeError::VectorTooLong {
1522                    size: reports.len() as u64,
1523                    limit: 50,
1524                });
1525            }
1526
1527            let _field = last_report_stamp.as_mut();
1528
1529            ::fidl_next::Decode::decode(last_report_stamp.as_mut(), decoder_, ())?;
1530
1531            Ok(())
1532        }
1533    }
1534
1535    impl<'de> ::fidl_next::IntoNatural for InputReportsReaderV2OnInputReportsRequest<'de> {
1536        type Natural = crate::natural::InputReportsReaderV2OnInputReportsRequest;
1537    }
1538
1539    /// The wire type corresponding to [`Range`](crate::natural::Range).
1540    pub type Range = ::fidl_next_fuchsia_input::wire::Range;
1541
1542    /// The wire type corresponding to [`Unit`](crate::natural::Unit).
1543    pub type Unit = ::fidl_next_fuchsia_input::wire::Unit;
1544
1545    /// The wire type corresponding to [`UnitType`](crate::natural::UnitType).
1546    pub type UnitType = ::fidl_next_fuchsia_input::wire::UnitType;
1547}
1548
1549pub mod wire_optional {
1550
1551    pub use fidl_next_common_fuchsia_input_report::wire_optional::*;
1552}
1553
1554pub mod generic {
1555
1556    pub use fidl_next_common_fuchsia_input_report::generic::*;
1557
1558    /// The generic type corresponding to [`InputDeviceGetInputReportsReaderRequest`].
1559    pub struct InputDeviceGetInputReportsReaderRequest<T0> {
1560        pub reader: T0,
1561    }
1562
1563    unsafe impl<___E, T0>
1564        ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportsReaderRequest, ___E>
1565        for InputDeviceGetInputReportsReaderRequest<T0>
1566    where
1567        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1568        ___E: ::fidl_next::fuchsia::HandleEncoder,
1569        T0: ::fidl_next::Encode<
1570                ::fidl_next::ServerEnd<
1571                    crate::InputReportsReader,
1572                    ::fidl_next::wire::fuchsia::Channel,
1573                >,
1574                ___E,
1575            >,
1576    {
1577        #[inline]
1578        fn encode(
1579            self,
1580            encoder_: &mut ___E,
1581            out_: &mut ::core::mem::MaybeUninit<
1582                crate::wire::InputDeviceGetInputReportsReaderRequest,
1583            >,
1584            _: (),
1585        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1586            ::fidl_next::munge! {
1587                let crate::wire::InputDeviceGetInputReportsReaderRequest {
1588                    reader,
1589
1590                } = out_;
1591            }
1592
1593            ::fidl_next::Encode::encode(self.reader, encoder_, reader, ())?;
1594
1595            Ok(())
1596        }
1597    }
1598
1599    /// The generic type corresponding to [`InputDeviceGetInputReportsReaderV2Request`].
1600    pub struct InputDeviceGetInputReportsReaderV2Request<T0, T1> {
1601        pub reader: T0,
1602
1603        pub max_unacknowledged_reports_limit: T1,
1604    }
1605
1606    unsafe impl<___E, T0, T1>
1607        ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportsReaderV2Request, ___E>
1608        for InputDeviceGetInputReportsReaderV2Request<T0, T1>
1609    where
1610        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1611        ___E: ::fidl_next::fuchsia::HandleEncoder,
1612        T0: ::fidl_next::Encode<
1613                ::fidl_next::ServerEnd<
1614                    crate::InputReportsReaderV2,
1615                    ::fidl_next::wire::fuchsia::Channel,
1616                >,
1617                ___E,
1618            >,
1619        T1: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
1620    {
1621        #[inline]
1622        fn encode(
1623            self,
1624            encoder_: &mut ___E,
1625            out_: &mut ::core::mem::MaybeUninit<
1626                crate::wire::InputDeviceGetInputReportsReaderV2Request,
1627            >,
1628            _: (),
1629        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1630            ::fidl_next::munge! {
1631                let crate::wire::InputDeviceGetInputReportsReaderV2Request {
1632                    reader,
1633                    max_unacknowledged_reports_limit,
1634
1635                } = out_;
1636            }
1637
1638            ::fidl_next::Encode::encode(self.reader, encoder_, reader, ())?;
1639
1640            ::fidl_next::Encode::encode(
1641                self.max_unacknowledged_reports_limit,
1642                encoder_,
1643                max_unacknowledged_reports_limit,
1644                (),
1645            )?;
1646
1647            Ok(())
1648        }
1649    }
1650
1651    /// The generic type corresponding to [`InputDeviceGetInputReportResponse`].
1652    pub struct InputDeviceGetInputReportResponse<T0> {
1653        pub report: T0,
1654    }
1655
1656    unsafe impl<___E, T0>
1657        ::fidl_next::Encode<crate::wire::InputDeviceGetInputReportResponse<'static>, ___E>
1658        for InputDeviceGetInputReportResponse<T0>
1659    where
1660        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1661        ___E: ::fidl_next::Encoder,
1662        ___E: ::fidl_next::fuchsia::HandleEncoder,
1663        T0: ::fidl_next::Encode<crate::wire::InputReport<'static>, ___E>,
1664    {
1665        #[inline]
1666        fn encode(
1667            self,
1668            encoder_: &mut ___E,
1669            out_: &mut ::core::mem::MaybeUninit<
1670                crate::wire::InputDeviceGetInputReportResponse<'static>,
1671            >,
1672            _: (),
1673        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1674            ::fidl_next::munge! {
1675                let crate::wire::InputDeviceGetInputReportResponse {
1676                    report,
1677
1678                } = out_;
1679            }
1680
1681            ::fidl_next::Encode::encode(self.report, encoder_, report, ())?;
1682
1683            Ok(())
1684        }
1685    }
1686
1687    /// The generic type corresponding to [`InputReportsReaderReadInputReportsResponse`].
1688    pub struct InputReportsReaderReadInputReportsResponse<T0> {
1689        pub reports: T0,
1690    }
1691
1692    unsafe impl<___E, T0>
1693        ::fidl_next::Encode<crate::wire::InputReportsReaderReadInputReportsResponse<'static>, ___E>
1694        for InputReportsReaderReadInputReportsResponse<T0>
1695    where
1696        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1697        ___E: ::fidl_next::Encoder,
1698        ___E: ::fidl_next::fuchsia::HandleEncoder,
1699        T0: ::fidl_next::Encode<
1700                ::fidl_next::wire::Vector<'static, crate::wire::InputReport<'static>>,
1701                ___E,
1702            >,
1703    {
1704        #[inline]
1705        fn encode(
1706            self,
1707            encoder_: &mut ___E,
1708            out_: &mut ::core::mem::MaybeUninit<
1709                crate::wire::InputReportsReaderReadInputReportsResponse<'static>,
1710            >,
1711            _: (),
1712        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1713            ::fidl_next::munge! {
1714                let crate::wire::InputReportsReaderReadInputReportsResponse {
1715                    reports,
1716
1717                } = out_;
1718            }
1719
1720            ::fidl_next::Encode::encode(self.reports, encoder_, reports, (50, ()))?;
1721
1722            Ok(())
1723        }
1724    }
1725
1726    /// The generic type corresponding to [`InputReportsReaderV2OnInputReportsRequest`].
1727    pub struct InputReportsReaderV2OnInputReportsRequest<T0, T1> {
1728        pub reports: T0,
1729
1730        pub last_report_stamp: T1,
1731    }
1732
1733    unsafe impl<___E, T0, T1>
1734        ::fidl_next::Encode<crate::wire::InputReportsReaderV2OnInputReportsRequest<'static>, ___E>
1735        for InputReportsReaderV2OnInputReportsRequest<T0, T1>
1736    where
1737        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1738        ___E: ::fidl_next::Encoder,
1739        ___E: ::fidl_next::fuchsia::HandleEncoder,
1740        T0: ::fidl_next::Encode<
1741                ::fidl_next::wire::Vector<'static, crate::wire::InputReport<'static>>,
1742                ___E,
1743            >,
1744        T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
1745    {
1746        #[inline]
1747        fn encode(
1748            self,
1749            encoder_: &mut ___E,
1750            out_: &mut ::core::mem::MaybeUninit<
1751                crate::wire::InputReportsReaderV2OnInputReportsRequest<'static>,
1752            >,
1753            _: (),
1754        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1755            ::fidl_next::munge! {
1756                let crate::wire::InputReportsReaderV2OnInputReportsRequest {
1757                    reports,
1758                    last_report_stamp,
1759
1760                } = out_;
1761            }
1762
1763            ::fidl_next::Encode::encode(self.reports, encoder_, reports, (50, ()))?;
1764
1765            ::fidl_next::Encode::encode(self.last_report_stamp, encoder_, last_report_stamp, ())?;
1766
1767            Ok(())
1768        }
1769    }
1770}
1771
1772pub use self::natural::*;
1773
1774/// The type corresponding to the InputDevice protocol.
1775#[doc = " An `InputDevice` driver represents a single physical input device.\n The InputDevice maintains an internal FIFO of `MAX_DEVICE_REPORT_COUNT`\n reports for each client that connects. Reports are removed from the FIFO\n once they are read by the client. If the FIFO is full, it will drop the\n oldest report to make room for an incoming report.\n"]
1776#[derive(PartialEq, Debug)]
1777pub struct InputDevice;
1778
1779impl ::fidl_next::Discoverable for InputDevice {
1780    const PROTOCOL_NAME: &'static str = "fuchsia.input.report.InputDevice";
1781}
1782
1783#[cfg(target_os = "fuchsia")]
1784impl ::fidl_next::HasTransport for InputDevice {
1785    type Transport = ::fidl_next::fuchsia::zx::Channel;
1786}
1787
1788pub mod input_device {
1789    pub mod prelude {
1790        pub use crate::{
1791            InputDevice, InputDeviceClientHandler, InputDeviceLocalClientHandler,
1792            InputDeviceLocalServerHandler, InputDeviceServerHandler, input_device,
1793        };
1794
1795        pub use crate::natural::InputDeviceGetDescriptorResponse;
1796
1797        pub use crate::natural::InputDeviceGetInputReportRequest;
1798
1799        pub use crate::natural::InputDeviceGetInputReportsReaderRequest;
1800
1801        pub use crate::natural::InputDeviceGetInputReportsReaderV2Request;
1802
1803        pub use crate::natural::InputDeviceGetInputReportsReaderV2Response;
1804
1805        pub use crate::natural::InputDeviceSendOutputReportRequest;
1806
1807        pub use crate::natural::InputDeviceSetFeatureReportRequest;
1808
1809        pub use crate::natural::InputDeviceGetFeatureReportResponse;
1810
1811        pub use crate::natural::InputDeviceGetInputReportResponse;
1812
1813        pub use crate::natural::InputDeviceSendOutputReportResponse;
1814
1815        pub use crate::natural::InputDeviceSetFeatureReportResponse;
1816    }
1817
1818    pub struct GetInputReportsReader;
1819
1820    impl ::fidl_next::Method for GetInputReportsReader {
1821        const ORDINAL: u64 = 7555298015256750913;
1822        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1823            ::fidl_next::protocol::Flexibility::Strict;
1824
1825        type Protocol = crate::InputDevice;
1826
1827        type Request = crate::wire::InputDeviceGetInputReportsReaderRequest;
1828    }
1829
1830    pub struct GetInputReportsReaderV2;
1831
1832    impl ::fidl_next::Method for GetInputReportsReaderV2 {
1833        const ORDINAL: u64 = 464298209416351825;
1834        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1835            ::fidl_next::protocol::Flexibility::Strict;
1836
1837        type Protocol = crate::InputDevice;
1838
1839        type Request = crate::wire::InputDeviceGetInputReportsReaderV2Request;
1840    }
1841
1842    impl ::fidl_next::TwoWayMethod for GetInputReportsReaderV2 {
1843        type Response =
1844            ::fidl_next::wire::Strict<crate::wire::InputDeviceGetInputReportsReaderV2Response>;
1845    }
1846
1847    impl<___R> ::fidl_next::Respond<___R> for GetInputReportsReaderV2 {
1848        type Output =
1849            ::fidl_next::Strict<crate::generic::InputDeviceGetInputReportsReaderV2Response<___R>>;
1850
1851        fn respond(response: ___R) -> Self::Output {
1852            ::fidl_next::Strict(crate::generic::InputDeviceGetInputReportsReaderV2Response {
1853                max_unacknowledged_reports: response,
1854            })
1855        }
1856    }
1857
1858    pub struct GetDescriptor;
1859
1860    impl ::fidl_next::Method for GetDescriptor {
1861        const ORDINAL: u64 = 4428799916562230578;
1862        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1863            ::fidl_next::protocol::Flexibility::Strict;
1864
1865        type Protocol = crate::InputDevice;
1866
1867        type Request = ::fidl_next::wire::EmptyMessageBody;
1868    }
1869
1870    impl ::fidl_next::TwoWayMethod for GetDescriptor {
1871        type Response =
1872            ::fidl_next::wire::Strict<crate::wire::InputDeviceGetDescriptorResponse<'static>>;
1873    }
1874
1875    impl<___R> ::fidl_next::Respond<___R> for GetDescriptor {
1876        type Output = ::fidl_next::Strict<crate::generic::InputDeviceGetDescriptorResponse<___R>>;
1877
1878        fn respond(response: ___R) -> Self::Output {
1879            ::fidl_next::Strict(crate::generic::InputDeviceGetDescriptorResponse {
1880                descriptor: response,
1881            })
1882        }
1883    }
1884
1885    pub struct SendOutputReport;
1886
1887    impl ::fidl_next::Method for SendOutputReport {
1888        const ORDINAL: u64 = 466765262340648762;
1889        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1890            ::fidl_next::protocol::Flexibility::Strict;
1891
1892        type Protocol = crate::InputDevice;
1893
1894        type Request = crate::wire::InputDeviceSendOutputReportRequest<'static>;
1895    }
1896
1897    impl ::fidl_next::TwoWayMethod for SendOutputReport {
1898        type Response = ::fidl_next::wire::Result<
1899            'static,
1900            crate::wire::InputDeviceSendOutputReportResponse,
1901            ::fidl_next::wire::fuchsia::Status,
1902        >;
1903    }
1904
1905    impl<___R> ::fidl_next::Respond<___R> for SendOutputReport {
1906        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1907
1908        fn respond(response: ___R) -> Self::Output {
1909            ::core::result::Result::Ok(response)
1910        }
1911    }
1912
1913    impl<___R> ::fidl_next::RespondErr<___R> for SendOutputReport {
1914        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1915
1916        fn respond_err(response: ___R) -> Self::Output {
1917            ::core::result::Result::Err(response)
1918        }
1919    }
1920
1921    pub struct GetFeatureReport;
1922
1923    impl ::fidl_next::Method for GetFeatureReport {
1924        const ORDINAL: u64 = 5294682407360339734;
1925        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1926            ::fidl_next::protocol::Flexibility::Strict;
1927
1928        type Protocol = crate::InputDevice;
1929
1930        type Request = ::fidl_next::wire::EmptyMessageBody;
1931    }
1932
1933    impl ::fidl_next::TwoWayMethod for GetFeatureReport {
1934        type Response = ::fidl_next::wire::Result<
1935            'static,
1936            crate::wire::InputDeviceGetFeatureReportResponse<'static>,
1937            ::fidl_next::wire::fuchsia::Status,
1938        >;
1939    }
1940
1941    impl<___R> ::fidl_next::Respond<___R> for GetFeatureReport {
1942        type Output = ::core::result::Result<
1943            crate::generic::InputDeviceGetFeatureReportResponse<___R>,
1944            ::fidl_next::never::Never,
1945        >;
1946
1947        fn respond(response: ___R) -> Self::Output {
1948            ::core::result::Result::Ok(crate::generic::InputDeviceGetFeatureReportResponse {
1949                report: response,
1950            })
1951        }
1952    }
1953
1954    impl<___R> ::fidl_next::RespondErr<___R> for GetFeatureReport {
1955        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1956
1957        fn respond_err(response: ___R) -> Self::Output {
1958            ::core::result::Result::Err(response)
1959        }
1960    }
1961
1962    pub struct SetFeatureReport;
1963
1964    impl ::fidl_next::Method for SetFeatureReport {
1965        const ORDINAL: u64 = 8537033744562275055;
1966        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1967            ::fidl_next::protocol::Flexibility::Strict;
1968
1969        type Protocol = crate::InputDevice;
1970
1971        type Request = crate::wire::InputDeviceSetFeatureReportRequest<'static>;
1972    }
1973
1974    impl ::fidl_next::TwoWayMethod for SetFeatureReport {
1975        type Response = ::fidl_next::wire::Result<
1976            'static,
1977            crate::wire::InputDeviceSetFeatureReportResponse,
1978            ::fidl_next::wire::fuchsia::Status,
1979        >;
1980    }
1981
1982    impl<___R> ::fidl_next::Respond<___R> for SetFeatureReport {
1983        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1984
1985        fn respond(response: ___R) -> Self::Output {
1986            ::core::result::Result::Ok(response)
1987        }
1988    }
1989
1990    impl<___R> ::fidl_next::RespondErr<___R> for SetFeatureReport {
1991        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1992
1993        fn respond_err(response: ___R) -> Self::Output {
1994            ::core::result::Result::Err(response)
1995        }
1996    }
1997
1998    pub struct GetInputReport;
1999
2000    impl ::fidl_next::Method for GetInputReport {
2001        const ORDINAL: u64 = 5139395162123862600;
2002        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2003            ::fidl_next::protocol::Flexibility::Strict;
2004
2005        type Protocol = crate::InputDevice;
2006
2007        type Request = crate::wire::InputDeviceGetInputReportRequest;
2008    }
2009
2010    impl ::fidl_next::TwoWayMethod for GetInputReport {
2011        type Response = ::fidl_next::wire::Result<
2012            'static,
2013            crate::wire::InputDeviceGetInputReportResponse<'static>,
2014            ::fidl_next::wire::fuchsia::Status,
2015        >;
2016    }
2017
2018    impl<___R> ::fidl_next::Respond<___R> for GetInputReport {
2019        type Output = ::core::result::Result<
2020            crate::generic::InputDeviceGetInputReportResponse<___R>,
2021            ::fidl_next::never::Never,
2022        >;
2023
2024        fn respond(response: ___R) -> Self::Output {
2025            ::core::result::Result::Ok(crate::generic::InputDeviceGetInputReportResponse {
2026                report: response,
2027            })
2028        }
2029    }
2030
2031    impl<___R> ::fidl_next::RespondErr<___R> for GetInputReport {
2032        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
2033
2034        fn respond_err(response: ___R) -> Self::Output {
2035            ::core::result::Result::Err(response)
2036        }
2037    }
2038
2039    mod ___detail {
2040        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::InputDevice
2041        where
2042            ___T: ::fidl_next::Transport,
2043        {
2044            type Client = InputDeviceClient<___T>;
2045            type Server = InputDeviceServer<___T>;
2046        }
2047
2048        /// The client for the `InputDevice` protocol.
2049        #[repr(transparent)]
2050        pub struct InputDeviceClient<___T: ::fidl_next::Transport> {
2051            #[allow(dead_code)]
2052            client: ::fidl_next::protocol::Client<___T>,
2053        }
2054
2055        impl<___T> InputDeviceClient<___T>
2056        where
2057            ___T: ::fidl_next::Transport,
2058        {
2059            #[doc = " Open a new InputReportsReader on this device. Each reader receives\n their own reports.\n"]
2060            pub fn get_input_reports_reader(
2061                &self,
2062
2063                reader: impl ::fidl_next::Encode<
2064                    ::fidl_next::ServerEnd<
2065                        crate::InputReportsReader,
2066                        ::fidl_next::wire::fuchsia::Channel,
2067                    >,
2068                    <___T as ::fidl_next::Transport>::SendBuffer,
2069                >,
2070            ) -> ::fidl_next::SendFuture<'_, ___T>
2071            where
2072                <___T as ::fidl_next::Transport>::SendBuffer:
2073                    ::fidl_next::encoder::InternalHandleEncoder,
2074                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2075            {
2076                self.get_input_reports_reader_with(
2077                    crate::generic::InputDeviceGetInputReportsReaderRequest { reader },
2078                )
2079            }
2080
2081            #[doc = " Open a new InputReportsReader on this device. Each reader receives\n their own reports.\n"]
2082            pub fn get_input_reports_reader_with<___R>(
2083                &self,
2084                request: ___R,
2085            ) -> ::fidl_next::SendFuture<'_, ___T>
2086            where
2087                ___R: ::fidl_next::Encode<
2088                        crate::wire::InputDeviceGetInputReportsReaderRequest,
2089                        <___T as ::fidl_next::Transport>::SendBuffer,
2090                    >,
2091            {
2092                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2093                    7555298015256750913,
2094                    <super::GetInputReportsReader as ::fidl_next::Method>::FLEXIBILITY,
2095                    request,
2096                ))
2097            }
2098
2099            #[doc = " Open a new InputReportsReaderV2 on this device. Each reader receives\n the full stream of event reports.\n"]
2100            pub fn get_input_reports_reader_v2(
2101                &self,
2102
2103                reader: impl ::fidl_next::Encode<
2104                    ::fidl_next::ServerEnd<
2105                        crate::InputReportsReaderV2,
2106                        ::fidl_next::wire::fuchsia::Channel,
2107                    >,
2108                    <___T as ::fidl_next::Transport>::SendBuffer,
2109                >,
2110
2111                max_unacknowledged_reports_limit: impl ::fidl_next::Encode<
2112                    ::fidl_next::wire::Uint16,
2113                    <___T as ::fidl_next::Transport>::SendBuffer,
2114                >,
2115            ) -> ::fidl_next::TwoWayFuture<'_, super::GetInputReportsReaderV2, ___T>
2116            where
2117                <___T as ::fidl_next::Transport>::SendBuffer:
2118                    ::fidl_next::encoder::InternalHandleEncoder,
2119                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2120            {
2121                self.get_input_reports_reader_v2_with(
2122                    crate::generic::InputDeviceGetInputReportsReaderV2Request {
2123                        reader,
2124
2125                        max_unacknowledged_reports_limit,
2126                    },
2127                )
2128            }
2129
2130            #[doc = " Open a new InputReportsReaderV2 on this device. Each reader receives\n the full stream of event reports.\n"]
2131            pub fn get_input_reports_reader_v2_with<___R>(
2132                &self,
2133                request: ___R,
2134            ) -> ::fidl_next::TwoWayFuture<'_, super::GetInputReportsReaderV2, ___T>
2135            where
2136                ___R: ::fidl_next::Encode<
2137                        crate::wire::InputDeviceGetInputReportsReaderV2Request,
2138                        <___T as ::fidl_next::Transport>::SendBuffer,
2139                    >,
2140            {
2141                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2142                    464298209416351825,
2143                    <super::GetInputReportsReaderV2 as ::fidl_next::Method>::FLEXIBILITY,
2144                    request,
2145                ))
2146            }
2147
2148            #[doc = " Gets the device descriptor for this device.\n"]
2149            pub fn get_descriptor(
2150                &self,
2151            ) -> ::fidl_next::TwoWayFuture<'_, super::GetDescriptor, ___T> {
2152                ::fidl_next::TwoWayFuture::from_untyped(
2153                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2154                        4428799916562230578,
2155                        <super::GetDescriptor as ::fidl_next::Method>::FLEXIBILITY,
2156                        (),
2157                    ),
2158                )
2159            }
2160
2161            #[doc = " Send a single output report to the device. This will throw an error\n if the output report does not follow the OutputDescriptor.\n"]
2162            pub fn send_output_report(
2163                &self,
2164
2165                report: impl ::fidl_next::Encode<
2166                    crate::wire::OutputReport<'static>,
2167                    <___T as ::fidl_next::Transport>::SendBuffer,
2168                >,
2169            ) -> ::fidl_next::TwoWayFuture<'_, super::SendOutputReport, ___T>
2170            where
2171                <___T as ::fidl_next::Transport>::SendBuffer:
2172                    ::fidl_next::encoder::InternalHandleEncoder,
2173                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2174            {
2175                self.send_output_report_with(crate::generic::InputDeviceSendOutputReportRequest {
2176                    report,
2177                })
2178            }
2179
2180            #[doc = " Send a single output report to the device. This will throw an error\n if the output report does not follow the OutputDescriptor.\n"]
2181            pub fn send_output_report_with<___R>(
2182                &self,
2183                request: ___R,
2184            ) -> ::fidl_next::TwoWayFuture<'_, super::SendOutputReport, ___T>
2185            where
2186                ___R: ::fidl_next::Encode<
2187                        crate::wire::InputDeviceSendOutputReportRequest<'static>,
2188                        <___T as ::fidl_next::Transport>::SendBuffer,
2189                    >,
2190            {
2191                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2192                    466765262340648762,
2193                    <super::SendOutputReport as ::fidl_next::Method>::FLEXIBILITY,
2194                    request,
2195                ))
2196            }
2197
2198            #[doc = " Get the feature report for a given device. This requests the state of\n the device\'s features.\n"]
2199            pub fn get_feature_report(
2200                &self,
2201            ) -> ::fidl_next::TwoWayFuture<'_, super::GetFeatureReport, ___T> {
2202                ::fidl_next::TwoWayFuture::from_untyped(
2203                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2204                        5294682407360339734,
2205                        <super::GetFeatureReport as ::fidl_next::Method>::FLEXIBILITY,
2206                        (),
2207                    ),
2208                )
2209            }
2210
2211            #[doc = " Set the feature report for a given device. This sets the state of\n the device\'s features.\n"]
2212            pub fn set_feature_report(
2213                &self,
2214
2215                report: impl ::fidl_next::Encode<
2216                    crate::wire::FeatureReport<'static>,
2217                    <___T as ::fidl_next::Transport>::SendBuffer,
2218                >,
2219            ) -> ::fidl_next::TwoWayFuture<'_, super::SetFeatureReport, ___T>
2220            where
2221                <___T as ::fidl_next::Transport>::SendBuffer:
2222                    ::fidl_next::encoder::InternalHandleEncoder,
2223                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2224            {
2225                self.set_feature_report_with(crate::generic::InputDeviceSetFeatureReportRequest {
2226                    report,
2227                })
2228            }
2229
2230            #[doc = " Set the feature report for a given device. This sets the state of\n the device\'s features.\n"]
2231            pub fn set_feature_report_with<___R>(
2232                &self,
2233                request: ___R,
2234            ) -> ::fidl_next::TwoWayFuture<'_, super::SetFeatureReport, ___T>
2235            where
2236                ___R: ::fidl_next::Encode<
2237                        crate::wire::InputDeviceSetFeatureReportRequest<'static>,
2238                        <___T as ::fidl_next::Transport>::SendBuffer,
2239                    >,
2240            {
2241                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2242                    8537033744562275055,
2243                    <super::SetFeatureReport as ::fidl_next::Method>::FLEXIBILITY,
2244                    request,
2245                ))
2246            }
2247
2248            #[doc = " For general cases, InputReportReader is the preferred way of getting\n InputReports. For devices that don\'t send InputReports naturally, this\n method can be used to request a report from the device type indicated.\n Does not block, and returns ZX_ERR_NOT_SUPPORTED if `GetInputReport` or\n `device_type` are not supported.\n"]
2249            pub fn get_input_report(
2250                &self,
2251
2252                device_type: impl ::fidl_next::Encode<
2253                    crate::wire::DeviceType,
2254                    <___T as ::fidl_next::Transport>::SendBuffer,
2255                >,
2256            ) -> ::fidl_next::TwoWayFuture<'_, super::GetInputReport, ___T>
2257            where
2258                <___T as ::fidl_next::Transport>::SendBuffer:
2259                    ::fidl_next::encoder::InternalHandleEncoder,
2260            {
2261                self.get_input_report_with(crate::generic::InputDeviceGetInputReportRequest {
2262                    device_type,
2263                })
2264            }
2265
2266            #[doc = " For general cases, InputReportReader is the preferred way of getting\n InputReports. For devices that don\'t send InputReports naturally, this\n method can be used to request a report from the device type indicated.\n Does not block, and returns ZX_ERR_NOT_SUPPORTED if `GetInputReport` or\n `device_type` are not supported.\n"]
2267            pub fn get_input_report_with<___R>(
2268                &self,
2269                request: ___R,
2270            ) -> ::fidl_next::TwoWayFuture<'_, super::GetInputReport, ___T>
2271            where
2272                ___R: ::fidl_next::Encode<
2273                        crate::wire::InputDeviceGetInputReportRequest,
2274                        <___T as ::fidl_next::Transport>::SendBuffer,
2275                    >,
2276            {
2277                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2278                    5139395162123862600,
2279                    <super::GetInputReport as ::fidl_next::Method>::FLEXIBILITY,
2280                    request,
2281                ))
2282            }
2283        }
2284
2285        /// The server for the `InputDevice` protocol.
2286        #[repr(transparent)]
2287        pub struct InputDeviceServer<___T: ::fidl_next::Transport> {
2288            server: ::fidl_next::protocol::Server<___T>,
2289        }
2290
2291        impl<___T> InputDeviceServer<___T> where ___T: ::fidl_next::Transport {}
2292    }
2293}
2294
2295#[diagnostic::on_unimplemented(
2296    note = "If {Self} implements the non-local InputDeviceClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2297)]
2298
2299/// A client handler for the InputDevice protocol.
2300///
2301/// See [`InputDevice`] for more details.
2302pub trait InputDeviceLocalClientHandler<
2303    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2304    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2305>
2306{
2307    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
2308        ::core::future::ready(())
2309    }
2310}
2311
2312impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for InputDevice
2313where
2314    ___H: InputDeviceLocalClientHandler<___T>,
2315    ___T: ::fidl_next::Transport,
2316{
2317    async fn on_event(
2318        handler: &mut ___H,
2319        mut message: ::fidl_next::Message<___T>,
2320    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2321        match *message.header().ordinal {
2322            ordinal => {
2323                handler.on_unknown_interaction(ordinal).await;
2324                if ::core::matches!(
2325                    message.header().flexibility(),
2326                    ::fidl_next::protocol::Flexibility::Strict
2327                ) {
2328                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2329                } else {
2330                    Ok(())
2331                }
2332            }
2333        }
2334    }
2335}
2336
2337#[diagnostic::on_unimplemented(
2338    note = "If {Self} implements the non-local InputDeviceServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2339)]
2340
2341/// A server handler for the InputDevice protocol.
2342///
2343/// See [`InputDevice`] for more details.
2344pub trait InputDeviceLocalServerHandler<
2345    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2346    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2347>
2348{
2349    #[doc = " Open a new InputReportsReader on this device. Each reader receives\n their own reports.\n"]
2350    fn get_input_reports_reader(
2351        &mut self,
2352
2353        request: ::fidl_next::Request<input_device::GetInputReportsReader, ___T>,
2354    ) -> impl ::core::future::Future<Output = ()>;
2355
2356    #[doc = " Open a new InputReportsReaderV2 on this device. Each reader receives\n the full stream of event reports.\n"]
2357    fn get_input_reports_reader_v2(
2358        &mut self,
2359
2360        request: ::fidl_next::Request<input_device::GetInputReportsReaderV2, ___T>,
2361
2362        responder: ::fidl_next::Responder<input_device::GetInputReportsReaderV2, ___T>,
2363    ) -> impl ::core::future::Future<Output = ()>;
2364
2365    #[doc = " Gets the device descriptor for this device.\n"]
2366    fn get_descriptor(
2367        &mut self,
2368
2369        responder: ::fidl_next::Responder<input_device::GetDescriptor, ___T>,
2370    ) -> impl ::core::future::Future<Output = ()>;
2371
2372    #[doc = " Send a single output report to the device. This will throw an error\n if the output report does not follow the OutputDescriptor.\n"]
2373    fn send_output_report(
2374        &mut self,
2375
2376        request: ::fidl_next::Request<input_device::SendOutputReport, ___T>,
2377
2378        responder: ::fidl_next::Responder<input_device::SendOutputReport, ___T>,
2379    ) -> impl ::core::future::Future<Output = ()>;
2380
2381    #[doc = " Get the feature report for a given device. This requests the state of\n the device\'s features.\n"]
2382    fn get_feature_report(
2383        &mut self,
2384
2385        responder: ::fidl_next::Responder<input_device::GetFeatureReport, ___T>,
2386    ) -> impl ::core::future::Future<Output = ()>;
2387
2388    #[doc = " Set the feature report for a given device. This sets the state of\n the device\'s features.\n"]
2389    fn set_feature_report(
2390        &mut self,
2391
2392        request: ::fidl_next::Request<input_device::SetFeatureReport, ___T>,
2393
2394        responder: ::fidl_next::Responder<input_device::SetFeatureReport, ___T>,
2395    ) -> impl ::core::future::Future<Output = ()>;
2396
2397    #[doc = " For general cases, InputReportReader is the preferred way of getting\n InputReports. For devices that don\'t send InputReports naturally, this\n method can be used to request a report from the device type indicated.\n Does not block, and returns ZX_ERR_NOT_SUPPORTED if `GetInputReport` or\n `device_type` are not supported.\n"]
2398    fn get_input_report(
2399        &mut self,
2400
2401        request: ::fidl_next::Request<input_device::GetInputReport, ___T>,
2402
2403        responder: ::fidl_next::Responder<input_device::GetInputReport, ___T>,
2404    ) -> impl ::core::future::Future<Output = ()>;
2405
2406    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
2407        ::core::future::ready(())
2408    }
2409}
2410
2411impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for InputDevice
2412where
2413    ___H: InputDeviceLocalServerHandler<___T>,
2414    ___T: ::fidl_next::Transport,
2415    for<'de> crate::wire::InputDeviceGetInputReportsReaderRequest: ::fidl_next::Decode<
2416            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2417            Constraint = (),
2418        >,
2419    for<'de> crate::wire::InputDeviceGetInputReportsReaderV2Request: ::fidl_next::Decode<
2420            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2421            Constraint = (),
2422        >,
2423    for<'de> crate::wire::InputDeviceSendOutputReportRequest<'de>: ::fidl_next::Decode<
2424            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2425            Constraint = (),
2426        >,
2427    for<'de> crate::wire::InputDeviceSetFeatureReportRequest<'de>: ::fidl_next::Decode<
2428            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2429            Constraint = (),
2430        >,
2431    for<'de> crate::wire::InputDeviceGetInputReportRequest: ::fidl_next::Decode<
2432            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2433            Constraint = (),
2434        >,
2435{
2436    async fn on_one_way(
2437        handler: &mut ___H,
2438        mut message: ::fidl_next::Message<___T>,
2439    ) -> ::core::result::Result<
2440        (),
2441        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2442    > {
2443        match *message.header().ordinal {
2444            7555298015256750913 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
2445                Ok(decoded) => {
2446                    handler
2447                        .get_input_reports_reader(::fidl_next::Request::from_decoded(decoded))
2448                        .await;
2449                    Ok(())
2450                }
2451                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2452                    ordinal: 7555298015256750913,
2453                    error,
2454                }),
2455            },
2456
2457            ordinal => {
2458                handler.on_unknown_interaction(ordinal).await;
2459                if ::core::matches!(
2460                    message.header().flexibility(),
2461                    ::fidl_next::protocol::Flexibility::Strict
2462                ) {
2463                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2464                } else {
2465                    Ok(())
2466                }
2467            }
2468        }
2469    }
2470
2471    async fn on_two_way(
2472        handler: &mut ___H,
2473        mut message: ::fidl_next::Message<___T>,
2474        responder: ::fidl_next::protocol::Responder<___T>,
2475    ) -> ::core::result::Result<
2476        (),
2477        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2478    > {
2479        match *message.header().ordinal {
2480            464298209416351825 => {
2481                let responder = ::fidl_next::Responder::from_untyped(responder);
2482
2483                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2484                    Ok(decoded) => {
2485                        handler
2486                            .get_input_reports_reader_v2(
2487                                ::fidl_next::Request::from_decoded(decoded),
2488                                responder,
2489                            )
2490                            .await;
2491                        Ok(())
2492                    }
2493                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2494                        ordinal: 464298209416351825,
2495                        error,
2496                    }),
2497                }
2498            }
2499
2500            4428799916562230578 => {
2501                let responder = ::fidl_next::Responder::from_untyped(responder);
2502
2503                handler.get_descriptor(responder).await;
2504                Ok(())
2505            }
2506
2507            466765262340648762 => {
2508                let responder = ::fidl_next::Responder::from_untyped(responder);
2509
2510                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2511                    Ok(decoded) => {
2512                        handler
2513                            .send_output_report(
2514                                ::fidl_next::Request::from_decoded(decoded),
2515                                responder,
2516                            )
2517                            .await;
2518                        Ok(())
2519                    }
2520                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2521                        ordinal: 466765262340648762,
2522                        error,
2523                    }),
2524                }
2525            }
2526
2527            5294682407360339734 => {
2528                let responder = ::fidl_next::Responder::from_untyped(responder);
2529
2530                handler.get_feature_report(responder).await;
2531                Ok(())
2532            }
2533
2534            8537033744562275055 => {
2535                let responder = ::fidl_next::Responder::from_untyped(responder);
2536
2537                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2538                    Ok(decoded) => {
2539                        handler
2540                            .set_feature_report(
2541                                ::fidl_next::Request::from_decoded(decoded),
2542                                responder,
2543                            )
2544                            .await;
2545                        Ok(())
2546                    }
2547                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2548                        ordinal: 8537033744562275055,
2549                        error,
2550                    }),
2551                }
2552            }
2553
2554            5139395162123862600 => {
2555                let responder = ::fidl_next::Responder::from_untyped(responder);
2556
2557                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2558                    Ok(decoded) => {
2559                        handler
2560                            .get_input_report(
2561                                ::fidl_next::Request::from_decoded(decoded),
2562                                responder,
2563                            )
2564                            .await;
2565                        Ok(())
2566                    }
2567                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2568                        ordinal: 5139395162123862600,
2569                        error,
2570                    }),
2571                }
2572            }
2573
2574            ordinal => {
2575                handler.on_unknown_interaction(ordinal).await;
2576                if ::core::matches!(
2577                    message.header().flexibility(),
2578                    ::fidl_next::protocol::Flexibility::Strict
2579                ) {
2580                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2581                } else {
2582                    responder
2583                        .respond_framework_error(
2584                            ordinal,
2585                            ::fidl_next::FrameworkError::UnknownMethod,
2586                        )
2587                        .expect("encoding a framework error should never fail")
2588                        .await?;
2589                    Ok(())
2590                }
2591            }
2592        }
2593    }
2594}
2595
2596/// A client handler for the InputDevice protocol.
2597///
2598/// See [`InputDevice`] for more details.
2599pub trait InputDeviceClientHandler<
2600    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2601    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2602>
2603{
2604    fn on_unknown_interaction(
2605        &mut self,
2606        ordinal: u64,
2607    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2608        ::core::future::ready(())
2609    }
2610}
2611
2612impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for InputDevice
2613where
2614    ___H: InputDeviceClientHandler<___T> + ::core::marker::Send,
2615    ___T: ::fidl_next::Transport,
2616{
2617    async fn on_event(
2618        handler: &mut ___H,
2619        mut message: ::fidl_next::Message<___T>,
2620    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2621        match *message.header().ordinal {
2622            ordinal => {
2623                handler.on_unknown_interaction(ordinal).await;
2624                if ::core::matches!(
2625                    message.header().flexibility(),
2626                    ::fidl_next::protocol::Flexibility::Strict
2627                ) {
2628                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2629                } else {
2630                    Ok(())
2631                }
2632            }
2633        }
2634    }
2635}
2636
2637/// A server handler for the InputDevice protocol.
2638///
2639/// See [`InputDevice`] for more details.
2640pub trait InputDeviceServerHandler<
2641    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2642    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2643>
2644{
2645    #[doc = " Open a new InputReportsReader on this device. Each reader receives\n their own reports.\n"]
2646    fn get_input_reports_reader(
2647        &mut self,
2648
2649        request: ::fidl_next::Request<input_device::GetInputReportsReader, ___T>,
2650    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2651
2652    #[doc = " Open a new InputReportsReaderV2 on this device. Each reader receives\n the full stream of event reports.\n"]
2653    fn get_input_reports_reader_v2(
2654        &mut self,
2655
2656        request: ::fidl_next::Request<input_device::GetInputReportsReaderV2, ___T>,
2657
2658        responder: ::fidl_next::Responder<input_device::GetInputReportsReaderV2, ___T>,
2659    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2660
2661    #[doc = " Gets the device descriptor for this device.\n"]
2662    fn get_descriptor(
2663        &mut self,
2664
2665        responder: ::fidl_next::Responder<input_device::GetDescriptor, ___T>,
2666    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2667
2668    #[doc = " Send a single output report to the device. This will throw an error\n if the output report does not follow the OutputDescriptor.\n"]
2669    fn send_output_report(
2670        &mut self,
2671
2672        request: ::fidl_next::Request<input_device::SendOutputReport, ___T>,
2673
2674        responder: ::fidl_next::Responder<input_device::SendOutputReport, ___T>,
2675    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2676
2677    #[doc = " Get the feature report for a given device. This requests the state of\n the device\'s features.\n"]
2678    fn get_feature_report(
2679        &mut self,
2680
2681        responder: ::fidl_next::Responder<input_device::GetFeatureReport, ___T>,
2682    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2683
2684    #[doc = " Set the feature report for a given device. This sets the state of\n the device\'s features.\n"]
2685    fn set_feature_report(
2686        &mut self,
2687
2688        request: ::fidl_next::Request<input_device::SetFeatureReport, ___T>,
2689
2690        responder: ::fidl_next::Responder<input_device::SetFeatureReport, ___T>,
2691    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2692
2693    #[doc = " For general cases, InputReportReader is the preferred way of getting\n InputReports. For devices that don\'t send InputReports naturally, this\n method can be used to request a report from the device type indicated.\n Does not block, and returns ZX_ERR_NOT_SUPPORTED if `GetInputReport` or\n `device_type` are not supported.\n"]
2694    fn get_input_report(
2695        &mut self,
2696
2697        request: ::fidl_next::Request<input_device::GetInputReport, ___T>,
2698
2699        responder: ::fidl_next::Responder<input_device::GetInputReport, ___T>,
2700    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2701
2702    fn on_unknown_interaction(
2703        &mut self,
2704        ordinal: u64,
2705    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2706        ::core::future::ready(())
2707    }
2708}
2709
2710impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for InputDevice
2711where
2712    ___H: InputDeviceServerHandler<___T> + ::core::marker::Send,
2713    ___T: ::fidl_next::Transport,
2714    for<'de> crate::wire::InputDeviceGetInputReportsReaderRequest: ::fidl_next::Decode<
2715            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2716            Constraint = (),
2717        >,
2718    for<'de> crate::wire::InputDeviceGetInputReportsReaderV2Request: ::fidl_next::Decode<
2719            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2720            Constraint = (),
2721        >,
2722    for<'de> crate::wire::InputDeviceSendOutputReportRequest<'de>: ::fidl_next::Decode<
2723            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2724            Constraint = (),
2725        >,
2726    for<'de> crate::wire::InputDeviceSetFeatureReportRequest<'de>: ::fidl_next::Decode<
2727            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2728            Constraint = (),
2729        >,
2730    for<'de> crate::wire::InputDeviceGetInputReportRequest: ::fidl_next::Decode<
2731            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2732            Constraint = (),
2733        >,
2734{
2735    async fn on_one_way(
2736        handler: &mut ___H,
2737        mut message: ::fidl_next::Message<___T>,
2738    ) -> ::core::result::Result<
2739        (),
2740        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2741    > {
2742        match *message.header().ordinal {
2743            7555298015256750913 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
2744                Ok(decoded) => {
2745                    handler
2746                        .get_input_reports_reader(::fidl_next::Request::from_decoded(decoded))
2747                        .await;
2748                    Ok(())
2749                }
2750                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2751                    ordinal: 7555298015256750913,
2752                    error,
2753                }),
2754            },
2755
2756            ordinal => {
2757                handler.on_unknown_interaction(ordinal).await;
2758                if ::core::matches!(
2759                    message.header().flexibility(),
2760                    ::fidl_next::protocol::Flexibility::Strict
2761                ) {
2762                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2763                } else {
2764                    Ok(())
2765                }
2766            }
2767        }
2768    }
2769
2770    async fn on_two_way(
2771        handler: &mut ___H,
2772        mut message: ::fidl_next::Message<___T>,
2773        responder: ::fidl_next::protocol::Responder<___T>,
2774    ) -> ::core::result::Result<
2775        (),
2776        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2777    > {
2778        match *message.header().ordinal {
2779            464298209416351825 => {
2780                let responder = ::fidl_next::Responder::from_untyped(responder);
2781
2782                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2783                    Ok(decoded) => {
2784                        handler
2785                            .get_input_reports_reader_v2(
2786                                ::fidl_next::Request::from_decoded(decoded),
2787                                responder,
2788                            )
2789                            .await;
2790                        Ok(())
2791                    }
2792                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2793                        ordinal: 464298209416351825,
2794                        error,
2795                    }),
2796                }
2797            }
2798
2799            4428799916562230578 => {
2800                let responder = ::fidl_next::Responder::from_untyped(responder);
2801
2802                handler.get_descriptor(responder).await;
2803                Ok(())
2804            }
2805
2806            466765262340648762 => {
2807                let responder = ::fidl_next::Responder::from_untyped(responder);
2808
2809                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2810                    Ok(decoded) => {
2811                        handler
2812                            .send_output_report(
2813                                ::fidl_next::Request::from_decoded(decoded),
2814                                responder,
2815                            )
2816                            .await;
2817                        Ok(())
2818                    }
2819                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2820                        ordinal: 466765262340648762,
2821                        error,
2822                    }),
2823                }
2824            }
2825
2826            5294682407360339734 => {
2827                let responder = ::fidl_next::Responder::from_untyped(responder);
2828
2829                handler.get_feature_report(responder).await;
2830                Ok(())
2831            }
2832
2833            8537033744562275055 => {
2834                let responder = ::fidl_next::Responder::from_untyped(responder);
2835
2836                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2837                    Ok(decoded) => {
2838                        handler
2839                            .set_feature_report(
2840                                ::fidl_next::Request::from_decoded(decoded),
2841                                responder,
2842                            )
2843                            .await;
2844                        Ok(())
2845                    }
2846                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2847                        ordinal: 8537033744562275055,
2848                        error,
2849                    }),
2850                }
2851            }
2852
2853            5139395162123862600 => {
2854                let responder = ::fidl_next::Responder::from_untyped(responder);
2855
2856                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2857                    Ok(decoded) => {
2858                        handler
2859                            .get_input_report(
2860                                ::fidl_next::Request::from_decoded(decoded),
2861                                responder,
2862                            )
2863                            .await;
2864                        Ok(())
2865                    }
2866                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2867                        ordinal: 5139395162123862600,
2868                        error,
2869                    }),
2870                }
2871            }
2872
2873            ordinal => {
2874                handler.on_unknown_interaction(ordinal).await;
2875                if ::core::matches!(
2876                    message.header().flexibility(),
2877                    ::fidl_next::protocol::Flexibility::Strict
2878                ) {
2879                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2880                } else {
2881                    responder
2882                        .respond_framework_error(
2883                            ordinal,
2884                            ::fidl_next::FrameworkError::UnknownMethod,
2885                        )
2886                        .expect("encoding a framework error should never fail")
2887                        .await?;
2888                    Ok(())
2889                }
2890            }
2891        }
2892    }
2893}
2894
2895impl<___T> InputDeviceClientHandler<___T> for ::fidl_next::IgnoreEvents
2896where
2897    ___T: ::fidl_next::Transport,
2898{
2899    async fn on_unknown_interaction(&mut self, _: u64) {}
2900}
2901
2902impl<___H, ___T> InputDeviceLocalClientHandler<___T> for ::fidl_next::Local<___H>
2903where
2904    ___H: InputDeviceClientHandler<___T>,
2905    ___T: ::fidl_next::Transport,
2906{
2907    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2908        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2909    }
2910}
2911
2912impl<___H, ___T> InputDeviceLocalServerHandler<___T> for ::fidl_next::Local<___H>
2913where
2914    ___H: InputDeviceServerHandler<___T>,
2915    ___T: ::fidl_next::Transport,
2916{
2917    async fn get_input_reports_reader(
2918        &mut self,
2919
2920        request: ::fidl_next::Request<input_device::GetInputReportsReader, ___T>,
2921    ) {
2922        ___H::get_input_reports_reader(&mut self.0, request).await
2923    }
2924
2925    async fn get_input_reports_reader_v2(
2926        &mut self,
2927
2928        request: ::fidl_next::Request<input_device::GetInputReportsReaderV2, ___T>,
2929
2930        responder: ::fidl_next::Responder<input_device::GetInputReportsReaderV2, ___T>,
2931    ) {
2932        ___H::get_input_reports_reader_v2(&mut self.0, request, responder).await
2933    }
2934
2935    async fn get_descriptor(
2936        &mut self,
2937
2938        responder: ::fidl_next::Responder<input_device::GetDescriptor, ___T>,
2939    ) {
2940        ___H::get_descriptor(&mut self.0, responder).await
2941    }
2942
2943    async fn send_output_report(
2944        &mut self,
2945
2946        request: ::fidl_next::Request<input_device::SendOutputReport, ___T>,
2947
2948        responder: ::fidl_next::Responder<input_device::SendOutputReport, ___T>,
2949    ) {
2950        ___H::send_output_report(&mut self.0, request, responder).await
2951    }
2952
2953    async fn get_feature_report(
2954        &mut self,
2955
2956        responder: ::fidl_next::Responder<input_device::GetFeatureReport, ___T>,
2957    ) {
2958        ___H::get_feature_report(&mut self.0, responder).await
2959    }
2960
2961    async fn set_feature_report(
2962        &mut self,
2963
2964        request: ::fidl_next::Request<input_device::SetFeatureReport, ___T>,
2965
2966        responder: ::fidl_next::Responder<input_device::SetFeatureReport, ___T>,
2967    ) {
2968        ___H::set_feature_report(&mut self.0, request, responder).await
2969    }
2970
2971    async fn get_input_report(
2972        &mut self,
2973
2974        request: ::fidl_next::Request<input_device::GetInputReport, ___T>,
2975
2976        responder: ::fidl_next::Responder<input_device::GetInputReport, ___T>,
2977    ) {
2978        ___H::get_input_report(&mut self.0, request, responder).await
2979    }
2980
2981    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2982        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2983    }
2984}
2985
2986/// The type corresponding to the InputReportsReader protocol.
2987#[doc = " Each `InputReportsReader` has its own FIFO of InputReports that it maintains.\n When ReadInputReports is called it drains the InputReports FIFO.\n If too many InputReports are created before the FIFO is drained, then\n the oldest InputReport will be silently discarded.\n"]
2988#[derive(PartialEq, Debug)]
2989pub struct InputReportsReader;
2990
2991#[cfg(target_os = "fuchsia")]
2992impl ::fidl_next::HasTransport for InputReportsReader {
2993    type Transport = ::fidl_next::fuchsia::zx::Channel;
2994}
2995
2996pub mod input_reports_reader {
2997    pub mod prelude {
2998        pub use crate::{
2999            InputReportsReader, InputReportsReaderClientHandler,
3000            InputReportsReaderLocalClientHandler, InputReportsReaderLocalServerHandler,
3001            InputReportsReaderServerHandler, input_reports_reader,
3002        };
3003
3004        pub use crate::natural::InputReportsReaderReadInputReportsResponse;
3005    }
3006
3007    pub struct ReadInputReports;
3008
3009    impl ::fidl_next::Method for ReadInputReports {
3010        const ORDINAL: u64 = 3861255986002273625;
3011        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3012            ::fidl_next::protocol::Flexibility::Strict;
3013
3014        type Protocol = crate::InputReportsReader;
3015
3016        type Request = ::fidl_next::wire::EmptyMessageBody;
3017    }
3018
3019    impl ::fidl_next::TwoWayMethod for ReadInputReports {
3020        type Response = ::fidl_next::wire::Result<
3021            'static,
3022            crate::wire::InputReportsReaderReadInputReportsResponse<'static>,
3023            ::fidl_next::wire::fuchsia::Status,
3024        >;
3025    }
3026
3027    impl<___R> ::fidl_next::Respond<___R> for ReadInputReports {
3028        type Output = ::core::result::Result<
3029            crate::generic::InputReportsReaderReadInputReportsResponse<___R>,
3030            ::fidl_next::never::Never,
3031        >;
3032
3033        fn respond(response: ___R) -> Self::Output {
3034            ::core::result::Result::Ok(crate::generic::InputReportsReaderReadInputReportsResponse {
3035                reports: response,
3036            })
3037        }
3038    }
3039
3040    impl<___R> ::fidl_next::RespondErr<___R> for ReadInputReports {
3041        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3042
3043        fn respond_err(response: ___R) -> Self::Output {
3044            ::core::result::Result::Err(response)
3045        }
3046    }
3047
3048    mod ___detail {
3049        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::InputReportsReader
3050        where
3051            ___T: ::fidl_next::Transport,
3052        {
3053            type Client = InputReportsReaderClient<___T>;
3054            type Server = InputReportsReaderServer<___T>;
3055        }
3056
3057        /// The client for the `InputReportsReader` protocol.
3058        #[repr(transparent)]
3059        pub struct InputReportsReaderClient<___T: ::fidl_next::Transport> {
3060            #[allow(dead_code)]
3061            client: ::fidl_next::protocol::Client<___T>,
3062        }
3063
3064        impl<___T> InputReportsReaderClient<___T>
3065        where
3066            ___T: ::fidl_next::Transport,
3067        {
3068            #[doc = " This is a Hanging-Get function to read the reports in the\n InputReport FIFO. This will not reply until there is at least one\n report available.\n If there is already one outstanding Hanging-Get, calling this\n again will return ZX_ERR_ALREADY_BOUND.\n"]
3069            pub fn read_input_reports(
3070                &self,
3071            ) -> ::fidl_next::TwoWayFuture<'_, super::ReadInputReports, ___T> {
3072                ::fidl_next::TwoWayFuture::from_untyped(
3073                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3074                        3861255986002273625,
3075                        <super::ReadInputReports as ::fidl_next::Method>::FLEXIBILITY,
3076                        (),
3077                    ),
3078                )
3079            }
3080        }
3081
3082        /// The server for the `InputReportsReader` protocol.
3083        #[repr(transparent)]
3084        pub struct InputReportsReaderServer<___T: ::fidl_next::Transport> {
3085            server: ::fidl_next::protocol::Server<___T>,
3086        }
3087
3088        impl<___T> InputReportsReaderServer<___T> where ___T: ::fidl_next::Transport {}
3089    }
3090}
3091
3092#[diagnostic::on_unimplemented(
3093    note = "If {Self} implements the non-local InputReportsReaderClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3094)]
3095
3096/// A client handler for the InputReportsReader protocol.
3097///
3098/// See [`InputReportsReader`] for more details.
3099pub trait InputReportsReaderLocalClientHandler<
3100    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3101    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3102>
3103{
3104}
3105
3106impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for InputReportsReader
3107where
3108    ___H: InputReportsReaderLocalClientHandler<___T>,
3109    ___T: ::fidl_next::Transport,
3110{
3111    async fn on_event(
3112        handler: &mut ___H,
3113        mut message: ::fidl_next::Message<___T>,
3114    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3115        match *message.header().ordinal {
3116            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3117        }
3118    }
3119}
3120
3121#[diagnostic::on_unimplemented(
3122    note = "If {Self} implements the non-local InputReportsReaderServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3123)]
3124
3125/// A server handler for the InputReportsReader protocol.
3126///
3127/// See [`InputReportsReader`] for more details.
3128pub trait InputReportsReaderLocalServerHandler<
3129    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3130    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3131>
3132{
3133    #[doc = " This is a Hanging-Get function to read the reports in the\n InputReport FIFO. This will not reply until there is at least one\n report available.\n If there is already one outstanding Hanging-Get, calling this\n again will return ZX_ERR_ALREADY_BOUND.\n"]
3134    fn read_input_reports(
3135        &mut self,
3136
3137        responder: ::fidl_next::Responder<input_reports_reader::ReadInputReports, ___T>,
3138    ) -> impl ::core::future::Future<Output = ()>;
3139}
3140
3141impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for InputReportsReader
3142where
3143    ___H: InputReportsReaderLocalServerHandler<___T>,
3144    ___T: ::fidl_next::Transport,
3145{
3146    async fn on_one_way(
3147        handler: &mut ___H,
3148        mut message: ::fidl_next::Message<___T>,
3149    ) -> ::core::result::Result<
3150        (),
3151        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3152    > {
3153        match *message.header().ordinal {
3154            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3155        }
3156    }
3157
3158    async fn on_two_way(
3159        handler: &mut ___H,
3160        mut message: ::fidl_next::Message<___T>,
3161        responder: ::fidl_next::protocol::Responder<___T>,
3162    ) -> ::core::result::Result<
3163        (),
3164        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3165    > {
3166        match *message.header().ordinal {
3167            3861255986002273625 => {
3168                let responder = ::fidl_next::Responder::from_untyped(responder);
3169
3170                handler.read_input_reports(responder).await;
3171                Ok(())
3172            }
3173
3174            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3175        }
3176    }
3177}
3178
3179/// A client handler for the InputReportsReader protocol.
3180///
3181/// See [`InputReportsReader`] for more details.
3182pub trait InputReportsReaderClientHandler<
3183    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3184    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3185>
3186{
3187}
3188
3189impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for InputReportsReader
3190where
3191    ___H: InputReportsReaderClientHandler<___T> + ::core::marker::Send,
3192    ___T: ::fidl_next::Transport,
3193{
3194    async fn on_event(
3195        handler: &mut ___H,
3196        mut message: ::fidl_next::Message<___T>,
3197    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3198        match *message.header().ordinal {
3199            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3200        }
3201    }
3202}
3203
3204/// A server handler for the InputReportsReader protocol.
3205///
3206/// See [`InputReportsReader`] for more details.
3207pub trait InputReportsReaderServerHandler<
3208    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3209    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3210>
3211{
3212    #[doc = " This is a Hanging-Get function to read the reports in the\n InputReport FIFO. This will not reply until there is at least one\n report available.\n If there is already one outstanding Hanging-Get, calling this\n again will return ZX_ERR_ALREADY_BOUND.\n"]
3213    fn read_input_reports(
3214        &mut self,
3215
3216        responder: ::fidl_next::Responder<input_reports_reader::ReadInputReports, ___T>,
3217    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3218}
3219
3220impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for InputReportsReader
3221where
3222    ___H: InputReportsReaderServerHandler<___T> + ::core::marker::Send,
3223    ___T: ::fidl_next::Transport,
3224{
3225    async fn on_one_way(
3226        handler: &mut ___H,
3227        mut message: ::fidl_next::Message<___T>,
3228    ) -> ::core::result::Result<
3229        (),
3230        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3231    > {
3232        match *message.header().ordinal {
3233            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3234        }
3235    }
3236
3237    async fn on_two_way(
3238        handler: &mut ___H,
3239        mut message: ::fidl_next::Message<___T>,
3240        responder: ::fidl_next::protocol::Responder<___T>,
3241    ) -> ::core::result::Result<
3242        (),
3243        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3244    > {
3245        match *message.header().ordinal {
3246            3861255986002273625 => {
3247                let responder = ::fidl_next::Responder::from_untyped(responder);
3248
3249                handler.read_input_reports(responder).await;
3250                Ok(())
3251            }
3252
3253            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3254        }
3255    }
3256}
3257
3258impl<___T> InputReportsReaderClientHandler<___T> for ::fidl_next::IgnoreEvents where
3259    ___T: ::fidl_next::Transport
3260{
3261}
3262
3263impl<___H, ___T> InputReportsReaderLocalClientHandler<___T> for ::fidl_next::Local<___H>
3264where
3265    ___H: InputReportsReaderClientHandler<___T>,
3266    ___T: ::fidl_next::Transport,
3267{
3268}
3269
3270impl<___H, ___T> InputReportsReaderLocalServerHandler<___T> for ::fidl_next::Local<___H>
3271where
3272    ___H: InputReportsReaderServerHandler<___T>,
3273    ___T: ::fidl_next::Transport,
3274{
3275    async fn read_input_reports(
3276        &mut self,
3277
3278        responder: ::fidl_next::Responder<input_reports_reader::ReadInputReports, ___T>,
3279    ) {
3280        ___H::read_input_reports(&mut self.0, responder).await
3281    }
3282}
3283
3284/// The type corresponding to the InputReportsReaderV2 protocol.
3285#[doc = " A reader protocol that reports input events.\n"]
3286#[derive(PartialEq, Debug)]
3287pub struct InputReportsReaderV2;
3288
3289#[cfg(target_os = "fuchsia")]
3290impl ::fidl_next::HasTransport for InputReportsReaderV2 {
3291    type Transport = ::fidl_next::fuchsia::zx::Channel;
3292}
3293
3294pub mod input_reports_reader_v2 {
3295    pub mod prelude {
3296        pub use crate::{
3297            InputReportsReaderV2, InputReportsReaderV2ClientHandler,
3298            InputReportsReaderV2LocalClientHandler, InputReportsReaderV2LocalServerHandler,
3299            InputReportsReaderV2ServerHandler, input_reports_reader_v2,
3300        };
3301
3302        pub use crate::natural::InputReportsReaderV2AcknowledgeReportsRequest;
3303
3304        pub use crate::natural::InputReportsReaderV2OnInputReportsRequest;
3305    }
3306
3307    pub struct OnInputReports;
3308
3309    impl ::fidl_next::Method for OnInputReports {
3310        const ORDINAL: u64 = 6354256711421322169;
3311        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3312            ::fidl_next::protocol::Flexibility::Flexible;
3313
3314        type Protocol = crate::InputReportsReaderV2;
3315
3316        type Request = crate::wire::InputReportsReaderV2OnInputReportsRequest<'static>;
3317    }
3318
3319    pub struct AcknowledgeReports;
3320
3321    impl ::fidl_next::Method for AcknowledgeReports {
3322        const ORDINAL: u64 = 8249168730373743369;
3323        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3324            ::fidl_next::protocol::Flexibility::Flexible;
3325
3326        type Protocol = crate::InputReportsReaderV2;
3327
3328        type Request = crate::wire::InputReportsReaderV2AcknowledgeReportsRequest;
3329    }
3330
3331    mod ___detail {
3332        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::InputReportsReaderV2
3333        where
3334            ___T: ::fidl_next::Transport,
3335        {
3336            type Client = InputReportsReaderV2Client<___T>;
3337            type Server = InputReportsReaderV2Server<___T>;
3338        }
3339
3340        /// The client for the `InputReportsReaderV2` protocol.
3341        #[repr(transparent)]
3342        pub struct InputReportsReaderV2Client<___T: ::fidl_next::Transport> {
3343            #[allow(dead_code)]
3344            client: ::fidl_next::protocol::Client<___T>,
3345        }
3346
3347        impl<___T> InputReportsReaderV2Client<___T>
3348        where
3349            ___T: ::fidl_next::Transport,
3350        {
3351            #[doc = " The client has processed events up to `last_acknowledged_report_stamp`.\n All reports sent with a `last_report_stamp` less than or equal to\n `last_acknowledged_report_stamp` will be considered acknowledged, and therefore\n will not count towards the `max_unacknowledged_reports` limit.\n"]
3352            pub fn acknowledge_reports(
3353                &self,
3354
3355                last_acknowledged_report_stamp: impl ::fidl_next::Encode<
3356                    ::fidl_next::wire::Uint64,
3357                    <___T as ::fidl_next::Transport>::SendBuffer,
3358                >,
3359            ) -> ::fidl_next::SendFuture<'_, ___T>
3360            where
3361                <___T as ::fidl_next::Transport>::SendBuffer:
3362                    ::fidl_next::encoder::InternalHandleEncoder,
3363            {
3364                self.acknowledge_reports_with(
3365                    crate::generic::InputReportsReaderV2AcknowledgeReportsRequest {
3366                        last_acknowledged_report_stamp,
3367                    },
3368                )
3369            }
3370
3371            #[doc = " The client has processed events up to `last_acknowledged_report_stamp`.\n All reports sent with a `last_report_stamp` less than or equal to\n `last_acknowledged_report_stamp` will be considered acknowledged, and therefore\n will not count towards the `max_unacknowledged_reports` limit.\n"]
3372            pub fn acknowledge_reports_with<___R>(
3373                &self,
3374                request: ___R,
3375            ) -> ::fidl_next::SendFuture<'_, ___T>
3376            where
3377                ___R: ::fidl_next::Encode<
3378                        crate::wire::InputReportsReaderV2AcknowledgeReportsRequest,
3379                        <___T as ::fidl_next::Transport>::SendBuffer,
3380                    >,
3381            {
3382                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3383                    8249168730373743369,
3384                    <super::AcknowledgeReports as ::fidl_next::Method>::FLEXIBILITY,
3385                    request,
3386                ))
3387            }
3388        }
3389
3390        /// The server for the `InputReportsReaderV2` protocol.
3391        #[repr(transparent)]
3392        pub struct InputReportsReaderV2Server<___T: ::fidl_next::Transport> {
3393            server: ::fidl_next::protocol::Server<___T>,
3394        }
3395
3396        impl<___T> InputReportsReaderV2Server<___T>
3397        where
3398            ___T: ::fidl_next::Transport,
3399        {
3400            #[doc = " The device pushes events to the client.\n The client does not need to acknowledge every report; it can allow multiple\n reports to be in flight up to `max_unacknowledged_reports`.\n\n Streaming begins automatically on connection.\n"]
3401            pub fn on_input_reports(
3402                &self,
3403
3404                reports: impl ::fidl_next::Encode<
3405                    ::fidl_next::wire::Vector<'static, crate::wire::InputReport<'static>>,
3406                    <___T as ::fidl_next::Transport>::SendBuffer,
3407                >,
3408
3409                last_report_stamp: impl ::fidl_next::Encode<
3410                    ::fidl_next::wire::Uint64,
3411                    <___T as ::fidl_next::Transport>::SendBuffer,
3412                >,
3413            ) -> ::fidl_next::SendFuture<'_, ___T>
3414            where
3415                <___T as ::fidl_next::Transport>::SendBuffer:
3416                    ::fidl_next::encoder::InternalHandleEncoder,
3417                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3418                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3419            {
3420                self.on_input_reports_with(
3421                    crate::generic::InputReportsReaderV2OnInputReportsRequest {
3422                        reports,
3423
3424                        last_report_stamp,
3425                    },
3426                )
3427            }
3428
3429            #[doc = " The device pushes events to the client.\n The client does not need to acknowledge every report; it can allow multiple\n reports to be in flight up to `max_unacknowledged_reports`.\n\n Streaming begins automatically on connection.\n"]
3430
3431            pub fn on_input_reports_with<___R>(
3432                &self,
3433                request: ___R,
3434            ) -> ::fidl_next::SendFuture<'_, ___T>
3435            where
3436                ___R: ::fidl_next::Encode<
3437                        <super::OnInputReports as ::fidl_next::Method>::Request,
3438                        <___T as ::fidl_next::Transport>::SendBuffer,
3439                    >,
3440            {
3441                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3442                    6354256711421322169,
3443                    <super::OnInputReports as ::fidl_next::Method>::FLEXIBILITY,
3444                    request,
3445                ))
3446            }
3447        }
3448    }
3449}
3450
3451#[diagnostic::on_unimplemented(
3452    note = "If {Self} implements the non-local InputReportsReaderV2ClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3453)]
3454
3455/// A client handler for the InputReportsReaderV2 protocol.
3456///
3457/// See [`InputReportsReaderV2`] for more details.
3458pub trait InputReportsReaderV2LocalClientHandler<
3459    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3460    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3461>
3462{
3463    #[doc = " The device pushes events to the client.\n The client does not need to acknowledge every report; it can allow multiple\n reports to be in flight up to `max_unacknowledged_reports`.\n\n Streaming begins automatically on connection.\n"]
3464    fn on_input_reports(
3465        &mut self,
3466
3467        request: ::fidl_next::Request<input_reports_reader_v2::OnInputReports, ___T>,
3468    ) -> impl ::core::future::Future<Output = ()>;
3469
3470    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3471        ::core::future::ready(())
3472    }
3473}
3474
3475impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for InputReportsReaderV2
3476where
3477    ___H: InputReportsReaderV2LocalClientHandler<___T>,
3478    ___T: ::fidl_next::Transport,
3479    for<'de> crate::wire::InputReportsReaderV2OnInputReportsRequest<'de>: ::fidl_next::Decode<
3480            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3481            Constraint = (),
3482        >,
3483{
3484    async fn on_event(
3485        handler: &mut ___H,
3486        mut message: ::fidl_next::Message<___T>,
3487    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3488        match *message.header().ordinal {
3489            6354256711421322169 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3490                Ok(decoded) => {
3491                    handler.on_input_reports(::fidl_next::Request::from_decoded(decoded)).await;
3492                    Ok(())
3493                }
3494                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3495                    ordinal: 6354256711421322169,
3496                    error,
3497                }),
3498            },
3499
3500            ordinal => {
3501                handler.on_unknown_interaction(ordinal).await;
3502                if ::core::matches!(
3503                    message.header().flexibility(),
3504                    ::fidl_next::protocol::Flexibility::Strict
3505                ) {
3506                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3507                } else {
3508                    Ok(())
3509                }
3510            }
3511        }
3512    }
3513}
3514
3515#[diagnostic::on_unimplemented(
3516    note = "If {Self} implements the non-local InputReportsReaderV2ServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3517)]
3518
3519/// A server handler for the InputReportsReaderV2 protocol.
3520///
3521/// See [`InputReportsReaderV2`] for more details.
3522pub trait InputReportsReaderV2LocalServerHandler<
3523    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3524    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3525>
3526{
3527    #[doc = " The client has processed events up to `last_acknowledged_report_stamp`.\n All reports sent with a `last_report_stamp` less than or equal to\n `last_acknowledged_report_stamp` will be considered acknowledged, and therefore\n will not count towards the `max_unacknowledged_reports` limit.\n"]
3528    fn acknowledge_reports(
3529        &mut self,
3530
3531        request: ::fidl_next::Request<input_reports_reader_v2::AcknowledgeReports, ___T>,
3532    ) -> impl ::core::future::Future<Output = ()>;
3533
3534    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3535        ::core::future::ready(())
3536    }
3537}
3538
3539impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for InputReportsReaderV2
3540where
3541    ___H: InputReportsReaderV2LocalServerHandler<___T>,
3542    ___T: ::fidl_next::Transport,
3543    for<'de> crate::wire::InputReportsReaderV2AcknowledgeReportsRequest: ::fidl_next::Decode<
3544            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3545            Constraint = (),
3546        >,
3547{
3548    async fn on_one_way(
3549        handler: &mut ___H,
3550        mut message: ::fidl_next::Message<___T>,
3551    ) -> ::core::result::Result<
3552        (),
3553        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3554    > {
3555        match *message.header().ordinal {
3556            8249168730373743369 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3557                Ok(decoded) => {
3558                    handler.acknowledge_reports(::fidl_next::Request::from_decoded(decoded)).await;
3559                    Ok(())
3560                }
3561                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3562                    ordinal: 8249168730373743369,
3563                    error,
3564                }),
3565            },
3566
3567            ordinal => {
3568                handler.on_unknown_interaction(ordinal).await;
3569                if ::core::matches!(
3570                    message.header().flexibility(),
3571                    ::fidl_next::protocol::Flexibility::Strict
3572                ) {
3573                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3574                } else {
3575                    Ok(())
3576                }
3577            }
3578        }
3579    }
3580
3581    async fn on_two_way(
3582        handler: &mut ___H,
3583        mut message: ::fidl_next::Message<___T>,
3584        responder: ::fidl_next::protocol::Responder<___T>,
3585    ) -> ::core::result::Result<
3586        (),
3587        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3588    > {
3589        match *message.header().ordinal {
3590            ordinal => {
3591                handler.on_unknown_interaction(ordinal).await;
3592                if ::core::matches!(
3593                    message.header().flexibility(),
3594                    ::fidl_next::protocol::Flexibility::Strict
3595                ) {
3596                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3597                } else {
3598                    responder
3599                        .respond_framework_error(
3600                            ordinal,
3601                            ::fidl_next::FrameworkError::UnknownMethod,
3602                        )
3603                        .expect("encoding a framework error should never fail")
3604                        .await?;
3605                    Ok(())
3606                }
3607            }
3608        }
3609    }
3610}
3611
3612/// A client handler for the InputReportsReaderV2 protocol.
3613///
3614/// See [`InputReportsReaderV2`] for more details.
3615pub trait InputReportsReaderV2ClientHandler<
3616    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3617    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3618>
3619{
3620    #[doc = " The device pushes events to the client.\n The client does not need to acknowledge every report; it can allow multiple\n reports to be in flight up to `max_unacknowledged_reports`.\n\n Streaming begins automatically on connection.\n"]
3621    fn on_input_reports(
3622        &mut self,
3623
3624        request: ::fidl_next::Request<input_reports_reader_v2::OnInputReports, ___T>,
3625    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3626
3627    fn on_unknown_interaction(
3628        &mut self,
3629        ordinal: u64,
3630    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3631        ::core::future::ready(())
3632    }
3633}
3634
3635impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for InputReportsReaderV2
3636where
3637    ___H: InputReportsReaderV2ClientHandler<___T> + ::core::marker::Send,
3638    ___T: ::fidl_next::Transport,
3639    for<'de> crate::wire::InputReportsReaderV2OnInputReportsRequest<'de>: ::fidl_next::Decode<
3640            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3641            Constraint = (),
3642        >,
3643{
3644    async fn on_event(
3645        handler: &mut ___H,
3646        mut message: ::fidl_next::Message<___T>,
3647    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3648        match *message.header().ordinal {
3649            6354256711421322169 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3650                Ok(decoded) => {
3651                    handler.on_input_reports(::fidl_next::Request::from_decoded(decoded)).await;
3652                    Ok(())
3653                }
3654                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3655                    ordinal: 6354256711421322169,
3656                    error,
3657                }),
3658            },
3659
3660            ordinal => {
3661                handler.on_unknown_interaction(ordinal).await;
3662                if ::core::matches!(
3663                    message.header().flexibility(),
3664                    ::fidl_next::protocol::Flexibility::Strict
3665                ) {
3666                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3667                } else {
3668                    Ok(())
3669                }
3670            }
3671        }
3672    }
3673}
3674
3675/// A server handler for the InputReportsReaderV2 protocol.
3676///
3677/// See [`InputReportsReaderV2`] for more details.
3678pub trait InputReportsReaderV2ServerHandler<
3679    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3680    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3681>
3682{
3683    #[doc = " The client has processed events up to `last_acknowledged_report_stamp`.\n All reports sent with a `last_report_stamp` less than or equal to\n `last_acknowledged_report_stamp` will be considered acknowledged, and therefore\n will not count towards the `max_unacknowledged_reports` limit.\n"]
3684    fn acknowledge_reports(
3685        &mut self,
3686
3687        request: ::fidl_next::Request<input_reports_reader_v2::AcknowledgeReports, ___T>,
3688    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3689
3690    fn on_unknown_interaction(
3691        &mut self,
3692        ordinal: u64,
3693    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3694        ::core::future::ready(())
3695    }
3696}
3697
3698impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for InputReportsReaderV2
3699where
3700    ___H: InputReportsReaderV2ServerHandler<___T> + ::core::marker::Send,
3701    ___T: ::fidl_next::Transport,
3702    for<'de> crate::wire::InputReportsReaderV2AcknowledgeReportsRequest: ::fidl_next::Decode<
3703            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3704            Constraint = (),
3705        >,
3706{
3707    async fn on_one_way(
3708        handler: &mut ___H,
3709        mut message: ::fidl_next::Message<___T>,
3710    ) -> ::core::result::Result<
3711        (),
3712        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3713    > {
3714        match *message.header().ordinal {
3715            8249168730373743369 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3716                Ok(decoded) => {
3717                    handler.acknowledge_reports(::fidl_next::Request::from_decoded(decoded)).await;
3718                    Ok(())
3719                }
3720                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3721                    ordinal: 8249168730373743369,
3722                    error,
3723                }),
3724            },
3725
3726            ordinal => {
3727                handler.on_unknown_interaction(ordinal).await;
3728                if ::core::matches!(
3729                    message.header().flexibility(),
3730                    ::fidl_next::protocol::Flexibility::Strict
3731                ) {
3732                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3733                } else {
3734                    Ok(())
3735                }
3736            }
3737        }
3738    }
3739
3740    async fn on_two_way(
3741        handler: &mut ___H,
3742        mut message: ::fidl_next::Message<___T>,
3743        responder: ::fidl_next::protocol::Responder<___T>,
3744    ) -> ::core::result::Result<
3745        (),
3746        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3747    > {
3748        match *message.header().ordinal {
3749            ordinal => {
3750                handler.on_unknown_interaction(ordinal).await;
3751                if ::core::matches!(
3752                    message.header().flexibility(),
3753                    ::fidl_next::protocol::Flexibility::Strict
3754                ) {
3755                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3756                } else {
3757                    responder
3758                        .respond_framework_error(
3759                            ordinal,
3760                            ::fidl_next::FrameworkError::UnknownMethod,
3761                        )
3762                        .expect("encoding a framework error should never fail")
3763                        .await?;
3764                    Ok(())
3765                }
3766            }
3767        }
3768    }
3769}
3770
3771impl<___T> InputReportsReaderV2ClientHandler<___T> for ::fidl_next::IgnoreEvents
3772where
3773    ___T: ::fidl_next::Transport,
3774{
3775    async fn on_input_reports(
3776        &mut self,
3777
3778        _: ::fidl_next::Request<input_reports_reader_v2::OnInputReports, ___T>,
3779    ) {
3780    }
3781
3782    async fn on_unknown_interaction(&mut self, _: u64) {}
3783}
3784
3785impl<___H, ___T> InputReportsReaderV2LocalClientHandler<___T> for ::fidl_next::Local<___H>
3786where
3787    ___H: InputReportsReaderV2ClientHandler<___T>,
3788    ___T: ::fidl_next::Transport,
3789{
3790    async fn on_input_reports(
3791        &mut self,
3792
3793        request: ::fidl_next::Request<input_reports_reader_v2::OnInputReports, ___T>,
3794    ) {
3795        ___H::on_input_reports(&mut self.0, request).await
3796    }
3797
3798    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3799        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3800    }
3801}
3802
3803impl<___H, ___T> InputReportsReaderV2LocalServerHandler<___T> for ::fidl_next::Local<___H>
3804where
3805    ___H: InputReportsReaderV2ServerHandler<___T>,
3806    ___T: ::fidl_next::Transport,
3807{
3808    async fn acknowledge_reports(
3809        &mut self,
3810
3811        request: ::fidl_next::Request<input_reports_reader_v2::AcknowledgeReports, ___T>,
3812    ) {
3813        ___H::acknowledge_reports(&mut self.0, request).await
3814    }
3815
3816    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3817        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3818    }
3819}
3820
3821/// The type corresponding to the Service service.
3822#[derive(Debug)]
3823pub struct Service;
3824
3825impl ::fidl_next::DiscoverableService for Service {
3826    const SERVICE_NAME: &'static str = "fuchsia.input.report.Service";
3827    const MEMBER_NAMES: &'static [&'static str] = &["input_device"];
3828}
3829
3830impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for Service {}
3831
3832impl<___C> ::fidl_next::Service<___C> for Service
3833where
3834    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
3835{
3836    type Connector = ServiceConnector<___C>;
3837}
3838
3839/// A strongly-typed service connector for the `Service` service.
3840#[repr(transparent)]
3841pub struct ServiceConnector<___C> {
3842    #[allow(dead_code)]
3843    connector: ___C,
3844}
3845
3846impl<___C> ServiceConnector<___C>
3847where
3848    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
3849{
3850    /// Attempts to connect to the `input_device` service member.
3851    pub fn input_device(
3852        &self,
3853        server_end: ::fidl_next::ServerEnd<crate::InputDevice, ::fidl_next::fuchsia::zx::Channel>,
3854    ) -> ::core::result::Result<
3855        (),
3856        <___C as ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>>::Error,
3857    > {
3858        ::fidl_next::protocol::ServiceConnector::<
3859                ::fidl_next::fuchsia::zx::Channel
3860            >::connect_to_member(
3861                &self.connector,
3862                "input_device",
3863                server_end.into_untyped(),
3864            )
3865    }
3866}
3867
3868/// A service handler for the `Service` service.
3869pub trait ServiceHandler {
3870    /// Handles an attempt to connect to the `input_device` member.
3871    fn input_device(
3872        &self,
3873        server_end: ::fidl_next::ServerEnd<crate::InputDevice, ::fidl_next::fuchsia::zx::Channel>,
3874    );
3875}
3876
3877impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for Service
3878where
3879    ___H: ServiceHandler,
3880    ::fidl_next::fuchsia::zx::Channel: ::fidl_next::InstanceFromServiceTransport<___T>,
3881{
3882    fn on_connection(handler: &___H, member: &str, server_end: ___T) {
3883        use ::fidl_next::InstanceFromServiceTransport;
3884        match member {
3885            "input_device" => handler.input_device(::fidl_next::ServerEnd::from_untyped(
3886                ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
3887            )),
3888
3889            _ => unreachable!(),
3890        }
3891    }
3892}
3893
3894pub use fidl_next_common_fuchsia_input_report::*;