Skip to main content

fidl_next_fuchsia_hardware_pin/
fidl_next_fuchsia_hardware_pin.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_hardware_pin::natural::*;
8
9    #[derive(Debug, PartialEq)]
10    #[repr(C)]
11    pub struct DebugConnectPinRequest {
12        pub server: ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::fuchsia::zx::Channel>,
13    }
14
15    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DebugConnectPinRequest, ___E>
16        for DebugConnectPinRequest
17    where
18        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19        ___E: ::fidl_next::fuchsia::HandleEncoder,
20    {
21        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
22            Self,
23            crate::wire::DebugConnectPinRequest,
24        > = unsafe {
25            ::fidl_next::CopyOptimization::enable_if(
26            true
27
28                && <
29                    ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Pin, ::fidl_next::wire::fuchsia::Channel>, ___E>
30                >::COPY_OPTIMIZATION.is_enabled()
31
32        )
33        };
34
35        #[inline]
36        fn encode(
37            self,
38            encoder_: &mut ___E,
39            out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugConnectPinRequest>,
40            _: (),
41        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
42            ::fidl_next::munge! {
43                let crate::wire::DebugConnectPinRequest {
44                    server,
45
46                } = out_;
47            }
48
49            ::fidl_next::Encode::encode(self.server, encoder_, server, ())?;
50
51            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server.as_mut_ptr()) };
52
53            Ok(())
54        }
55    }
56
57    unsafe impl<___E>
58        ::fidl_next::EncodeOption<
59            ::fidl_next::wire::Box<'static, crate::wire::DebugConnectPinRequest>,
60            ___E,
61        > for DebugConnectPinRequest
62    where
63        ___E: ::fidl_next::Encoder + ?Sized,
64        DebugConnectPinRequest: ::fidl_next::Encode<crate::wire::DebugConnectPinRequest, ___E>,
65    {
66        #[inline]
67        fn encode_option(
68            this: ::core::option::Option<Self>,
69            encoder: &mut ___E,
70            out: &mut ::core::mem::MaybeUninit<
71                ::fidl_next::wire::Box<'static, crate::wire::DebugConnectPinRequest>,
72            >,
73            _: (),
74        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
75            if let Some(inner) = this {
76                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
77                ::fidl_next::wire::Box::encode_present(out);
78            } else {
79                ::fidl_next::wire::Box::encode_absent(out);
80            }
81
82            Ok(())
83        }
84    }
85
86    impl ::fidl_next::FromWire<crate::wire::DebugConnectPinRequest> for DebugConnectPinRequest {
87        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
88            crate::wire::DebugConnectPinRequest,
89            Self,
90        > = unsafe {
91            ::fidl_next::CopyOptimization::enable_if(
92            true
93
94                && <
95                    ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Pin, ::fidl_next::wire::fuchsia::Channel>>
96                >::COPY_OPTIMIZATION.is_enabled()
97
98        )
99        };
100
101        #[inline]
102        fn from_wire(wire: crate::wire::DebugConnectPinRequest) -> Self {
103            Self { server: ::fidl_next::FromWire::from_wire(wire.server) }
104        }
105    }
106
107    #[derive(Debug, PartialEq)]
108    #[repr(C)]
109    pub struct DebugConnectGpioRequest {
110        pub server: ::fidl_next::ServerEnd<
111            ::fidl_next_fuchsia_hardware_gpio::Gpio,
112            ::fidl_next::fuchsia::zx::Channel,
113        >,
114    }
115
116    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DebugConnectGpioRequest, ___E>
117        for DebugConnectGpioRequest
118    where
119        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
120        ___E: ::fidl_next::fuchsia::HandleEncoder,
121    {
122        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
123            Self,
124            crate::wire::DebugConnectGpioRequest,
125        > = unsafe {
126            ::fidl_next::CopyOptimization::enable_if(
127                true && <::fidl_next::ServerEnd<
128                    ::fidl_next_fuchsia_hardware_gpio::Gpio,
129                    ::fidl_next::fuchsia::zx::Channel,
130                > as ::fidl_next::Encode<
131                    ::fidl_next::ServerEnd<
132                        ::fidl_next_fuchsia_hardware_gpio::Gpio,
133                        ::fidl_next::wire::fuchsia::Channel,
134                    >,
135                    ___E,
136                >>::COPY_OPTIMIZATION
137                    .is_enabled(),
138            )
139        };
140
141        #[inline]
142        fn encode(
143            self,
144            encoder_: &mut ___E,
145            out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugConnectGpioRequest>,
146            _: (),
147        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
148            ::fidl_next::munge! {
149                let crate::wire::DebugConnectGpioRequest {
150                    server,
151
152                } = out_;
153            }
154
155            ::fidl_next::Encode::encode(self.server, encoder_, server, ())?;
156
157            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server.as_mut_ptr()) };
158
159            Ok(())
160        }
161    }
162
163    unsafe impl<___E>
164        ::fidl_next::EncodeOption<
165            ::fidl_next::wire::Box<'static, crate::wire::DebugConnectGpioRequest>,
166            ___E,
167        > for DebugConnectGpioRequest
168    where
169        ___E: ::fidl_next::Encoder + ?Sized,
170        DebugConnectGpioRequest: ::fidl_next::Encode<crate::wire::DebugConnectGpioRequest, ___E>,
171    {
172        #[inline]
173        fn encode_option(
174            this: ::core::option::Option<Self>,
175            encoder: &mut ___E,
176            out: &mut ::core::mem::MaybeUninit<
177                ::fidl_next::wire::Box<'static, crate::wire::DebugConnectGpioRequest>,
178            >,
179            _: (),
180        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
181            if let Some(inner) = this {
182                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
183                ::fidl_next::wire::Box::encode_present(out);
184            } else {
185                ::fidl_next::wire::Box::encode_absent(out);
186            }
187
188            Ok(())
189        }
190    }
191
192    impl ::fidl_next::FromWire<crate::wire::DebugConnectGpioRequest> for DebugConnectGpioRequest {
193        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
194            crate::wire::DebugConnectGpioRequest,
195            Self,
196        > = unsafe {
197            ::fidl_next::CopyOptimization::enable_if(
198                true && <::fidl_next::ServerEnd<
199                    ::fidl_next_fuchsia_hardware_gpio::Gpio,
200                    ::fidl_next::fuchsia::zx::Channel,
201                > as ::fidl_next::FromWire<
202                    ::fidl_next::ServerEnd<
203                        ::fidl_next_fuchsia_hardware_gpio::Gpio,
204                        ::fidl_next::wire::fuchsia::Channel,
205                    >,
206                >>::COPY_OPTIMIZATION
207                    .is_enabled(),
208            )
209        };
210
211        #[inline]
212        fn from_wire(wire: crate::wire::DebugConnectGpioRequest) -> Self {
213            Self { server: ::fidl_next::FromWire::from_wire(wire.server) }
214        }
215    }
216}
217
218pub mod wire {
219
220    pub use fidl_next_common_fuchsia_hardware_pin::wire::*;
221
222    /// The wire type corresponding to [`DebugConnectPinRequest`].
223    #[derive(Debug)]
224    #[repr(C)]
225    pub struct DebugConnectPinRequest {
226        pub server: ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::wire::fuchsia::Channel>,
227    }
228
229    static_assertions::const_assert_eq!(std::mem::size_of::<DebugConnectPinRequest>(), 4);
230    static_assertions::const_assert_eq!(std::mem::align_of::<DebugConnectPinRequest>(), 4);
231
232    static_assertions::const_assert_eq!(std::mem::offset_of!(DebugConnectPinRequest, server), 0);
233
234    impl ::fidl_next::Constrained for DebugConnectPinRequest {
235        type Constraint = ();
236
237        fn validate(
238            _: ::fidl_next::Slot<'_, Self>,
239            _: Self::Constraint,
240        ) -> Result<(), ::fidl_next::ValidationError> {
241            Ok(())
242        }
243    }
244
245    unsafe impl ::fidl_next::Wire for DebugConnectPinRequest {
246        type Narrowed<'de> = DebugConnectPinRequest;
247
248        #[inline]
249        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
250            ::fidl_next::munge! {
251                let Self {
252                    server,
253
254                } = &mut *out_;
255            }
256
257            ::fidl_next::Wire::zero_padding(server);
258        }
259    }
260
261    unsafe impl<___D> ::fidl_next::Decode<___D> for DebugConnectPinRequest
262    where
263        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
264        ___D: ::fidl_next::fuchsia::HandleDecoder,
265    {
266        fn decode(
267            slot_: ::fidl_next::Slot<'_, Self>,
268            decoder_: &mut ___D,
269            _: (),
270        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
271            ::fidl_next::munge! {
272                let Self {
273                    mut server,
274
275                } = slot_;
276            }
277
278            let _field = server.as_mut();
279
280            ::fidl_next::Decode::decode(server.as_mut(), decoder_, ())?;
281
282            Ok(())
283        }
284    }
285
286    impl ::fidl_next::IntoNatural for DebugConnectPinRequest {
287        type Natural = crate::natural::DebugConnectPinRequest;
288    }
289
290    /// The wire type corresponding to [`DebugConnectGpioRequest`].
291    #[derive(Debug)]
292    #[repr(C)]
293    pub struct DebugConnectGpioRequest {
294        pub server: ::fidl_next::ServerEnd<
295            ::fidl_next_fuchsia_hardware_gpio::Gpio,
296            ::fidl_next::wire::fuchsia::Channel,
297        >,
298    }
299
300    static_assertions::const_assert_eq!(std::mem::size_of::<DebugConnectGpioRequest>(), 4);
301    static_assertions::const_assert_eq!(std::mem::align_of::<DebugConnectGpioRequest>(), 4);
302
303    static_assertions::const_assert_eq!(std::mem::offset_of!(DebugConnectGpioRequest, server), 0);
304
305    impl ::fidl_next::Constrained for DebugConnectGpioRequest {
306        type Constraint = ();
307
308        fn validate(
309            _: ::fidl_next::Slot<'_, Self>,
310            _: Self::Constraint,
311        ) -> Result<(), ::fidl_next::ValidationError> {
312            Ok(())
313        }
314    }
315
316    unsafe impl ::fidl_next::Wire for DebugConnectGpioRequest {
317        type Narrowed<'de> = DebugConnectGpioRequest;
318
319        #[inline]
320        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
321            ::fidl_next::munge! {
322                let Self {
323                    server,
324
325                } = &mut *out_;
326            }
327
328            ::fidl_next::Wire::zero_padding(server);
329        }
330    }
331
332    unsafe impl<___D> ::fidl_next::Decode<___D> for DebugConnectGpioRequest
333    where
334        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
335        ___D: ::fidl_next::fuchsia::HandleDecoder,
336    {
337        fn decode(
338            slot_: ::fidl_next::Slot<'_, Self>,
339            decoder_: &mut ___D,
340            _: (),
341        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
342            ::fidl_next::munge! {
343                let Self {
344                    mut server,
345
346                } = slot_;
347            }
348
349            let _field = server.as_mut();
350
351            ::fidl_next::Decode::decode(server.as_mut(), decoder_, ())?;
352
353            Ok(())
354        }
355    }
356
357    impl ::fidl_next::IntoNatural for DebugConnectGpioRequest {
358        type Natural = crate::natural::DebugConnectGpioRequest;
359    }
360}
361
362pub mod wire_optional {
363
364    pub use fidl_next_common_fuchsia_hardware_pin::wire_optional::*;
365}
366
367pub mod generic {
368
369    pub use fidl_next_common_fuchsia_hardware_pin::generic::*;
370
371    /// The generic type corresponding to [`DebugConnectPinRequest`].
372    pub struct DebugConnectPinRequest<T0> {
373        pub server: T0,
374    }
375
376    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DebugConnectPinRequest, ___E>
377        for DebugConnectPinRequest<T0>
378    where
379        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
380        ___E: ::fidl_next::fuchsia::HandleEncoder,
381        T0: ::fidl_next::Encode<
382                ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::wire::fuchsia::Channel>,
383                ___E,
384            >,
385    {
386        #[inline]
387        fn encode(
388            self,
389            encoder_: &mut ___E,
390            out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugConnectPinRequest>,
391            _: (),
392        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
393            ::fidl_next::munge! {
394                let crate::wire::DebugConnectPinRequest {
395                    server,
396
397                } = out_;
398            }
399
400            ::fidl_next::Encode::encode(self.server, encoder_, server, ())?;
401
402            Ok(())
403        }
404    }
405
406    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::DebugConnectPinRequest, ___E>
407        for &'a DebugConnectPinRequest<T0>
408    where
409        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
410        ___E: ::fidl_next::fuchsia::HandleEncoder,
411        &'a T0: ::fidl_next::Encode<
412                ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::wire::fuchsia::Channel>,
413                ___E,
414            >,
415    {
416        #[inline]
417        fn encode(
418            self,
419            encoder_: &mut ___E,
420            out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugConnectPinRequest>,
421            _: (),
422        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
423            ::fidl_next::munge! {
424                let crate::wire::DebugConnectPinRequest {
425                    server,
426
427                } = out_;
428            }
429
430            ::fidl_next::Encode::encode(&self.server, encoder_, server, ())?;
431
432            Ok(())
433        }
434    }
435
436    /// The generic type corresponding to [`DebugConnectGpioRequest`].
437    pub struct DebugConnectGpioRequest<T0> {
438        pub server: T0,
439    }
440
441    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DebugConnectGpioRequest, ___E>
442        for DebugConnectGpioRequest<T0>
443    where
444        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
445        ___E: ::fidl_next::fuchsia::HandleEncoder,
446        T0: ::fidl_next::Encode<
447                ::fidl_next::ServerEnd<
448                    ::fidl_next_fuchsia_hardware_gpio::Gpio,
449                    ::fidl_next::wire::fuchsia::Channel,
450                >,
451                ___E,
452            >,
453    {
454        #[inline]
455        fn encode(
456            self,
457            encoder_: &mut ___E,
458            out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugConnectGpioRequest>,
459            _: (),
460        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
461            ::fidl_next::munge! {
462                let crate::wire::DebugConnectGpioRequest {
463                    server,
464
465                } = out_;
466            }
467
468            ::fidl_next::Encode::encode(self.server, encoder_, server, ())?;
469
470            Ok(())
471        }
472    }
473
474    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::DebugConnectGpioRequest, ___E>
475        for &'a DebugConnectGpioRequest<T0>
476    where
477        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
478        ___E: ::fidl_next::fuchsia::HandleEncoder,
479        &'a T0: ::fidl_next::Encode<
480                ::fidl_next::ServerEnd<
481                    ::fidl_next_fuchsia_hardware_gpio::Gpio,
482                    ::fidl_next::wire::fuchsia::Channel,
483                >,
484                ___E,
485            >,
486    {
487        #[inline]
488        fn encode(
489            self,
490            encoder_: &mut ___E,
491            out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugConnectGpioRequest>,
492            _: (),
493        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
494            ::fidl_next::munge! {
495                let crate::wire::DebugConnectGpioRequest {
496                    server,
497
498                } = out_;
499            }
500
501            ::fidl_next::Encode::encode(&self.server, encoder_, server, ())?;
502
503            Ok(())
504        }
505    }
506}
507
508pub use self::natural::*;
509
510/// The type corresponding to the Debug protocol.
511#[derive(PartialEq, Debug)]
512pub struct Debug;
513
514#[cfg(target_os = "fuchsia")]
515impl ::fidl_next::HasTransport for Debug {
516    type Transport = ::fidl_next::fuchsia::zx::Channel;
517}
518
519pub mod debug {
520    pub mod prelude {
521        pub use crate::{
522            Debug, DebugClientHandler, DebugLocalClientHandler, DebugLocalServerHandler,
523            DebugServerHandler, debug,
524        };
525
526        pub use crate::natural::DebugConnectGpioRequest;
527
528        pub use crate::natural::DebugConnectPinRequest;
529
530        pub use crate::natural::DebugGetPropertiesResponse;
531
532        pub use crate::natural::DebugConnectGpioResponse;
533
534        pub use crate::natural::DebugConnectPinResponse;
535    }
536
537    pub struct GetProperties;
538
539    impl ::fidl_next::Method for GetProperties {
540        const ORDINAL: u64 = 4539001881061135815;
541        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
542            ::fidl_next::protocol::Flexibility::Strict;
543
544        type Protocol = crate::Debug;
545
546        type Request = ::fidl_next::wire::EmptyMessageBody;
547    }
548
549    impl ::fidl_next::TwoWayMethod for GetProperties {
550        type Response = ::fidl_next::wire::Strict<crate::wire::DebugGetPropertiesResponse<'static>>;
551    }
552
553    impl<___R> ::fidl_next::Respond<___R> for GetProperties {
554        type Output = ::fidl_next::Strict<___R>;
555
556        fn respond(response: ___R) -> Self::Output {
557            ::fidl_next::Strict(response)
558        }
559    }
560
561    pub struct ConnectPin;
562
563    impl ::fidl_next::Method for ConnectPin {
564        const ORDINAL: u64 = 9153433124183362592;
565        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
566            ::fidl_next::protocol::Flexibility::Strict;
567
568        type Protocol = crate::Debug;
569
570        type Request = crate::wire::DebugConnectPinRequest;
571    }
572
573    impl ::fidl_next::TwoWayMethod for ConnectPin {
574        type Response = ::fidl_next::wire::Result<
575            'static,
576            crate::wire::DebugConnectPinResponse,
577            ::fidl_next::wire::fuchsia::Status,
578        >;
579    }
580
581    impl<___R> ::fidl_next::Respond<___R> for ConnectPin {
582        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
583
584        fn respond(response: ___R) -> Self::Output {
585            ::core::result::Result::Ok(response)
586        }
587    }
588
589    impl<___R> ::fidl_next::RespondErr<___R> for ConnectPin {
590        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
591
592        fn respond_err(response: ___R) -> Self::Output {
593            ::core::result::Result::Err(response)
594        }
595    }
596
597    pub struct ConnectGpio;
598
599    impl ::fidl_next::Method for ConnectGpio {
600        const ORDINAL: u64 = 6045361242176349938;
601        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
602            ::fidl_next::protocol::Flexibility::Strict;
603
604        type Protocol = crate::Debug;
605
606        type Request = crate::wire::DebugConnectGpioRequest;
607    }
608
609    impl ::fidl_next::TwoWayMethod for ConnectGpio {
610        type Response = ::fidl_next::wire::Result<
611            'static,
612            crate::wire::DebugConnectGpioResponse,
613            ::fidl_next::wire::fuchsia::Status,
614        >;
615    }
616
617    impl<___R> ::fidl_next::Respond<___R> for ConnectGpio {
618        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
619
620        fn respond(response: ___R) -> Self::Output {
621            ::core::result::Result::Ok(response)
622        }
623    }
624
625    impl<___R> ::fidl_next::RespondErr<___R> for ConnectGpio {
626        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
627
628        fn respond_err(response: ___R) -> Self::Output {
629            ::core::result::Result::Err(response)
630        }
631    }
632
633    mod ___detail {
634        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Debug
635        where
636            ___T: ::fidl_next::Transport,
637        {
638            type Client = DebugClient<___T>;
639            type Server = DebugServer<___T>;
640        }
641
642        /// The client for the `Debug` protocol.
643        #[repr(transparent)]
644        pub struct DebugClient<___T: ::fidl_next::Transport> {
645            #[allow(dead_code)]
646            client: ::fidl_next::protocol::Client<___T>,
647        }
648
649        impl<___T> DebugClient<___T>
650        where
651            ___T: ::fidl_next::Transport,
652        {
653            #[doc = " Returns the static properties of a pin.\n"]
654            pub fn get_properties(
655                &self,
656            ) -> ::fidl_next::TwoWayFuture<'_, super::GetProperties, ___T> {
657                ::fidl_next::TwoWayFuture::from_untyped(
658                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
659                        4539001881061135815,
660                        <super::GetProperties as ::fidl_next::Method>::FLEXIBILITY,
661                        (),
662                    ),
663                )
664            }
665
666            pub fn connect_pin(
667                &self,
668
669                server: impl ::fidl_next::Encode<
670                    ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::wire::fuchsia::Channel>,
671                    <___T as ::fidl_next::Transport>::SendBuffer,
672                >,
673            ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectPin, ___T>
674            where
675                <___T as ::fidl_next::Transport>::SendBuffer:
676                    ::fidl_next::encoder::InternalHandleEncoder,
677                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
678            {
679                self.connect_pin_with(crate::generic::DebugConnectPinRequest { server })
680            }
681
682            pub fn connect_pin_with<___R>(
683                &self,
684                request: ___R,
685            ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectPin, ___T>
686            where
687                ___R: ::fidl_next::Encode<
688                        crate::wire::DebugConnectPinRequest,
689                        <___T as ::fidl_next::Transport>::SendBuffer,
690                    >,
691            {
692                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
693                    9153433124183362592,
694                    <super::ConnectPin as ::fidl_next::Method>::FLEXIBILITY,
695                    request,
696                ))
697            }
698
699            #[doc = " Returns ZX_ERR_NOT_SUPPORTED if the pin does not support GPIO.\n"]
700            pub fn connect_gpio(
701                &self,
702
703                server: impl ::fidl_next::Encode<
704                    ::fidl_next::ServerEnd<
705                        ::fidl_next_fuchsia_hardware_gpio::Gpio,
706                        ::fidl_next::wire::fuchsia::Channel,
707                    >,
708                    <___T as ::fidl_next::Transport>::SendBuffer,
709                >,
710            ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectGpio, ___T>
711            where
712                <___T as ::fidl_next::Transport>::SendBuffer:
713                    ::fidl_next::encoder::InternalHandleEncoder,
714                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
715            {
716                self.connect_gpio_with(crate::generic::DebugConnectGpioRequest { server })
717            }
718
719            #[doc = " Returns ZX_ERR_NOT_SUPPORTED if the pin does not support GPIO.\n"]
720            pub fn connect_gpio_with<___R>(
721                &self,
722                request: ___R,
723            ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectGpio, ___T>
724            where
725                ___R: ::fidl_next::Encode<
726                        crate::wire::DebugConnectGpioRequest,
727                        <___T as ::fidl_next::Transport>::SendBuffer,
728                    >,
729            {
730                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
731                    6045361242176349938,
732                    <super::ConnectGpio as ::fidl_next::Method>::FLEXIBILITY,
733                    request,
734                ))
735            }
736        }
737
738        /// The server for the `Debug` protocol.
739        #[repr(transparent)]
740        pub struct DebugServer<___T: ::fidl_next::Transport> {
741            server: ::fidl_next::protocol::Server<___T>,
742        }
743
744        impl<___T> DebugServer<___T> where ___T: ::fidl_next::Transport {}
745    }
746}
747
748#[diagnostic::on_unimplemented(
749    note = "If {Self} implements the non-local DebugClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
750)]
751
752/// A client handler for the Debug protocol.
753///
754/// See [`Debug`] for more details.
755pub trait DebugLocalClientHandler<
756    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
757    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
758>
759{
760    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
761        ::core::future::ready(())
762    }
763}
764
765impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Debug
766where
767    ___H: DebugLocalClientHandler<___T>,
768    ___T: ::fidl_next::Transport,
769{
770    async fn on_event(
771        handler: &mut ___H,
772        mut message: ::fidl_next::Message<___T>,
773    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
774        match *message.header().ordinal {
775            ordinal => {
776                handler.on_unknown_interaction(ordinal).await;
777                if ::core::matches!(
778                    message.header().flexibility(),
779                    ::fidl_next::protocol::Flexibility::Strict
780                ) {
781                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
782                } else {
783                    Ok(())
784                }
785            }
786        }
787    }
788}
789
790#[diagnostic::on_unimplemented(
791    note = "If {Self} implements the non-local DebugServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
792)]
793
794/// A server handler for the Debug protocol.
795///
796/// See [`Debug`] for more details.
797pub trait DebugLocalServerHandler<
798    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
799    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
800>
801{
802    #[doc = " Returns the static properties of a pin.\n"]
803    fn get_properties(
804        &mut self,
805
806        responder: ::fidl_next::Responder<debug::GetProperties, ___T>,
807    ) -> impl ::core::future::Future<Output = ()>;
808
809    fn connect_pin(
810        &mut self,
811
812        request: ::fidl_next::Request<debug::ConnectPin, ___T>,
813
814        responder: ::fidl_next::Responder<debug::ConnectPin, ___T>,
815    ) -> impl ::core::future::Future<Output = ()>;
816
817    #[doc = " Returns ZX_ERR_NOT_SUPPORTED if the pin does not support GPIO.\n"]
818    fn connect_gpio(
819        &mut self,
820
821        request: ::fidl_next::Request<debug::ConnectGpio, ___T>,
822
823        responder: ::fidl_next::Responder<debug::ConnectGpio, ___T>,
824    ) -> impl ::core::future::Future<Output = ()>;
825
826    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
827        ::core::future::ready(())
828    }
829}
830
831impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Debug
832where
833    ___H: DebugLocalServerHandler<___T>,
834    ___T: ::fidl_next::Transport,
835    for<'de> crate::wire::DebugConnectPinRequest: ::fidl_next::Decode<
836            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
837            Constraint = (),
838        >,
839    for<'de> crate::wire::DebugConnectGpioRequest: ::fidl_next::Decode<
840            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
841            Constraint = (),
842        >,
843{
844    async fn on_one_way(
845        handler: &mut ___H,
846        mut message: ::fidl_next::Message<___T>,
847    ) -> ::core::result::Result<
848        (),
849        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
850    > {
851        match *message.header().ordinal {
852            ordinal => {
853                handler.on_unknown_interaction(ordinal).await;
854                if ::core::matches!(
855                    message.header().flexibility(),
856                    ::fidl_next::protocol::Flexibility::Strict
857                ) {
858                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
859                } else {
860                    Ok(())
861                }
862            }
863        }
864    }
865
866    async fn on_two_way(
867        handler: &mut ___H,
868        mut message: ::fidl_next::Message<___T>,
869        responder: ::fidl_next::protocol::Responder<___T>,
870    ) -> ::core::result::Result<
871        (),
872        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
873    > {
874        match *message.header().ordinal {
875            4539001881061135815 => {
876                let responder = ::fidl_next::Responder::from_untyped(responder);
877
878                handler.get_properties(responder).await;
879                Ok(())
880            }
881
882            9153433124183362592 => {
883                let responder = ::fidl_next::Responder::from_untyped(responder);
884
885                match ::fidl_next::AsDecoderExt::into_decoded(message) {
886                    Ok(decoded) => {
887                        handler
888                            .connect_pin(::fidl_next::Request::from_decoded(decoded), responder)
889                            .await;
890                        Ok(())
891                    }
892                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
893                        ordinal: 9153433124183362592,
894                        error,
895                    }),
896                }
897            }
898
899            6045361242176349938 => {
900                let responder = ::fidl_next::Responder::from_untyped(responder);
901
902                match ::fidl_next::AsDecoderExt::into_decoded(message) {
903                    Ok(decoded) => {
904                        handler
905                            .connect_gpio(::fidl_next::Request::from_decoded(decoded), responder)
906                            .await;
907                        Ok(())
908                    }
909                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
910                        ordinal: 6045361242176349938,
911                        error,
912                    }),
913                }
914            }
915
916            ordinal => {
917                handler.on_unknown_interaction(ordinal).await;
918                if ::core::matches!(
919                    message.header().flexibility(),
920                    ::fidl_next::protocol::Flexibility::Strict
921                ) {
922                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
923                } else {
924                    responder
925                        .respond_framework_error(
926                            ordinal,
927                            ::fidl_next::FrameworkError::UnknownMethod,
928                        )
929                        .expect("encoding a framework error should never fail")
930                        .await?;
931                    Ok(())
932                }
933            }
934        }
935    }
936}
937
938/// A client handler for the Debug protocol.
939///
940/// See [`Debug`] for more details.
941pub trait DebugClientHandler<
942    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
943    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
944>
945{
946    fn on_unknown_interaction(
947        &mut self,
948        ordinal: u64,
949    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
950        ::core::future::ready(())
951    }
952}
953
954impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Debug
955where
956    ___H: DebugClientHandler<___T> + ::core::marker::Send,
957    ___T: ::fidl_next::Transport,
958{
959    async fn on_event(
960        handler: &mut ___H,
961        mut message: ::fidl_next::Message<___T>,
962    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
963        match *message.header().ordinal {
964            ordinal => {
965                handler.on_unknown_interaction(ordinal).await;
966                if ::core::matches!(
967                    message.header().flexibility(),
968                    ::fidl_next::protocol::Flexibility::Strict
969                ) {
970                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
971                } else {
972                    Ok(())
973                }
974            }
975        }
976    }
977}
978
979/// A server handler for the Debug protocol.
980///
981/// See [`Debug`] for more details.
982pub trait DebugServerHandler<
983    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
984    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
985>
986{
987    #[doc = " Returns the static properties of a pin.\n"]
988    fn get_properties(
989        &mut self,
990
991        responder: ::fidl_next::Responder<debug::GetProperties, ___T>,
992    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
993
994    fn connect_pin(
995        &mut self,
996
997        request: ::fidl_next::Request<debug::ConnectPin, ___T>,
998
999        responder: ::fidl_next::Responder<debug::ConnectPin, ___T>,
1000    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1001
1002    #[doc = " Returns ZX_ERR_NOT_SUPPORTED if the pin does not support GPIO.\n"]
1003    fn connect_gpio(
1004        &mut self,
1005
1006        request: ::fidl_next::Request<debug::ConnectGpio, ___T>,
1007
1008        responder: ::fidl_next::Responder<debug::ConnectGpio, ___T>,
1009    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1010
1011    fn on_unknown_interaction(
1012        &mut self,
1013        ordinal: u64,
1014    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1015        ::core::future::ready(())
1016    }
1017}
1018
1019impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Debug
1020where
1021    ___H: DebugServerHandler<___T> + ::core::marker::Send,
1022    ___T: ::fidl_next::Transport,
1023    for<'de> crate::wire::DebugConnectPinRequest: ::fidl_next::Decode<
1024            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1025            Constraint = (),
1026        >,
1027    for<'de> crate::wire::DebugConnectGpioRequest: ::fidl_next::Decode<
1028            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1029            Constraint = (),
1030        >,
1031{
1032    async fn on_one_way(
1033        handler: &mut ___H,
1034        mut message: ::fidl_next::Message<___T>,
1035    ) -> ::core::result::Result<
1036        (),
1037        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1038    > {
1039        match *message.header().ordinal {
1040            ordinal => {
1041                handler.on_unknown_interaction(ordinal).await;
1042                if ::core::matches!(
1043                    message.header().flexibility(),
1044                    ::fidl_next::protocol::Flexibility::Strict
1045                ) {
1046                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1047                } else {
1048                    Ok(())
1049                }
1050            }
1051        }
1052    }
1053
1054    async fn on_two_way(
1055        handler: &mut ___H,
1056        mut message: ::fidl_next::Message<___T>,
1057        responder: ::fidl_next::protocol::Responder<___T>,
1058    ) -> ::core::result::Result<
1059        (),
1060        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1061    > {
1062        match *message.header().ordinal {
1063            4539001881061135815 => {
1064                let responder = ::fidl_next::Responder::from_untyped(responder);
1065
1066                handler.get_properties(responder).await;
1067                Ok(())
1068            }
1069
1070            9153433124183362592 => {
1071                let responder = ::fidl_next::Responder::from_untyped(responder);
1072
1073                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1074                    Ok(decoded) => {
1075                        handler
1076                            .connect_pin(::fidl_next::Request::from_decoded(decoded), responder)
1077                            .await;
1078                        Ok(())
1079                    }
1080                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1081                        ordinal: 9153433124183362592,
1082                        error,
1083                    }),
1084                }
1085            }
1086
1087            6045361242176349938 => {
1088                let responder = ::fidl_next::Responder::from_untyped(responder);
1089
1090                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1091                    Ok(decoded) => {
1092                        handler
1093                            .connect_gpio(::fidl_next::Request::from_decoded(decoded), responder)
1094                            .await;
1095                        Ok(())
1096                    }
1097                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1098                        ordinal: 6045361242176349938,
1099                        error,
1100                    }),
1101                }
1102            }
1103
1104            ordinal => {
1105                handler.on_unknown_interaction(ordinal).await;
1106                if ::core::matches!(
1107                    message.header().flexibility(),
1108                    ::fidl_next::protocol::Flexibility::Strict
1109                ) {
1110                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1111                } else {
1112                    responder
1113                        .respond_framework_error(
1114                            ordinal,
1115                            ::fidl_next::FrameworkError::UnknownMethod,
1116                        )
1117                        .expect("encoding a framework error should never fail")
1118                        .await?;
1119                    Ok(())
1120                }
1121            }
1122        }
1123    }
1124}
1125
1126impl<___T> DebugClientHandler<___T> for ::fidl_next::IgnoreEvents
1127where
1128    ___T: ::fidl_next::Transport,
1129{
1130    async fn on_unknown_interaction(&mut self, _: u64) {}
1131}
1132
1133impl<___H, ___T> DebugLocalClientHandler<___T> for ::fidl_next::Local<___H>
1134where
1135    ___H: DebugClientHandler<___T>,
1136    ___T: ::fidl_next::Transport,
1137{
1138    async fn on_unknown_interaction(&mut self, ordinal: u64) {
1139        ___H::on_unknown_interaction(&mut self.0, ordinal).await
1140    }
1141}
1142
1143impl<___H, ___T> DebugLocalServerHandler<___T> for ::fidl_next::Local<___H>
1144where
1145    ___H: DebugServerHandler<___T>,
1146    ___T: ::fidl_next::Transport,
1147{
1148    async fn get_properties(
1149        &mut self,
1150
1151        responder: ::fidl_next::Responder<debug::GetProperties, ___T>,
1152    ) {
1153        ___H::get_properties(&mut self.0, responder).await
1154    }
1155
1156    async fn connect_pin(
1157        &mut self,
1158
1159        request: ::fidl_next::Request<debug::ConnectPin, ___T>,
1160
1161        responder: ::fidl_next::Responder<debug::ConnectPin, ___T>,
1162    ) {
1163        ___H::connect_pin(&mut self.0, request, responder).await
1164    }
1165
1166    async fn connect_gpio(
1167        &mut self,
1168
1169        request: ::fidl_next::Request<debug::ConnectGpio, ___T>,
1170
1171        responder: ::fidl_next::Responder<debug::ConnectGpio, ___T>,
1172    ) {
1173        ___H::connect_gpio(&mut self.0, request, responder).await
1174    }
1175
1176    async fn on_unknown_interaction(&mut self, ordinal: u64) {
1177        ___H::on_unknown_interaction(&mut self.0, ordinal).await
1178    }
1179}
1180
1181/// The type corresponding to the DebugService service.
1182#[derive(Debug)]
1183pub struct DebugService;
1184
1185impl ::fidl_next::DiscoverableService for DebugService {
1186    const SERVICE_NAME: &'static str = "fuchsia.hardware.pin.DebugService";
1187    const MEMBER_NAMES: &'static [&'static str] = &["device"];
1188}
1189
1190impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for DebugService {}
1191
1192impl<___C> ::fidl_next::Service<___C> for DebugService
1193where
1194    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
1195{
1196    type Connector = DebugServiceConnector<___C>;
1197}
1198
1199/// A strongly-typed service connector for the `DebugService` service.
1200#[repr(transparent)]
1201pub struct DebugServiceConnector<___C> {
1202    #[allow(dead_code)]
1203    connector: ___C,
1204}
1205
1206impl<___C> DebugServiceConnector<___C>
1207where
1208    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
1209{
1210    /// Attempts to connect to the `device` service member.
1211    pub fn device(
1212        &self,
1213        server_end: ::fidl_next::ServerEnd<crate::Debug, ::fidl_next::fuchsia::zx::Channel>,
1214    ) -> ::core::result::Result<
1215        (),
1216        <___C as ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>>::Error,
1217    > {
1218        ::fidl_next::protocol::ServiceConnector::<
1219                ::fidl_next::fuchsia::zx::Channel
1220            >::connect_to_member(
1221                &self.connector,
1222                "device",
1223                server_end.into_untyped(),
1224            )
1225    }
1226}
1227
1228/// A service handler for the `DebugService` service.
1229pub trait DebugServiceHandler {
1230    /// Handles an attempt to connect to the `device` member.
1231    fn device(
1232        &self,
1233        server_end: ::fidl_next::ServerEnd<crate::Debug, ::fidl_next::fuchsia::zx::Channel>,
1234    );
1235}
1236
1237impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for DebugService
1238where
1239    ___H: DebugServiceHandler,
1240    ::fidl_next::fuchsia::zx::Channel: ::fidl_next::InstanceFromServiceTransport<___T>,
1241{
1242    fn on_connection(handler: &___H, member: &str, server_end: ___T) {
1243        use ::fidl_next::InstanceFromServiceTransport;
1244        match member {
1245            "device" => handler.device(::fidl_next::ServerEnd::from_untyped(
1246                ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
1247            )),
1248
1249            _ => unreachable!(),
1250        }
1251    }
1252}
1253
1254/// The type corresponding to the PinStatesService service.
1255#[derive(Debug)]
1256pub struct PinStatesService;
1257
1258impl ::fidl_next::DiscoverableService for PinStatesService {
1259    const SERVICE_NAME: &'static str = "fuchsia.hardware.pin.PinStatesService";
1260    const MEMBER_NAMES: &'static [&'static str] = &["device"];
1261}
1262
1263impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for PinStatesService {}
1264
1265impl<___C> ::fidl_next::Service<___C> for PinStatesService
1266where
1267    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
1268{
1269    type Connector = PinStatesServiceConnector<___C>;
1270}
1271
1272/// A strongly-typed service connector for the `PinStatesService` service.
1273#[repr(transparent)]
1274pub struct PinStatesServiceConnector<___C> {
1275    #[allow(dead_code)]
1276    connector: ___C,
1277}
1278
1279impl<___C> PinStatesServiceConnector<___C>
1280where
1281    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
1282{
1283    /// Attempts to connect to the `device` service member.
1284    pub fn device(
1285        &self,
1286        server_end: ::fidl_next::ServerEnd<crate::PinStates, ::fidl_next::fuchsia::zx::Channel>,
1287    ) -> ::core::result::Result<
1288        (),
1289        <___C as ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>>::Error,
1290    > {
1291        ::fidl_next::protocol::ServiceConnector::<
1292                ::fidl_next::fuchsia::zx::Channel
1293            >::connect_to_member(
1294                &self.connector,
1295                "device",
1296                server_end.into_untyped(),
1297            )
1298    }
1299}
1300
1301/// A service handler for the `PinStatesService` service.
1302pub trait PinStatesServiceHandler {
1303    /// Handles an attempt to connect to the `device` member.
1304    fn device(
1305        &self,
1306        server_end: ::fidl_next::ServerEnd<crate::PinStates, ::fidl_next::fuchsia::zx::Channel>,
1307    );
1308}
1309
1310impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for PinStatesService
1311where
1312    ___H: PinStatesServiceHandler,
1313    ::fidl_next::fuchsia::zx::Channel: ::fidl_next::InstanceFromServiceTransport<___T>,
1314{
1315    fn on_connection(handler: &___H, member: &str, server_end: ___T) {
1316        use ::fidl_next::InstanceFromServiceTransport;
1317        match member {
1318            "device" => handler.device(::fidl_next::ServerEnd::from_untyped(
1319                ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
1320            )),
1321
1322            _ => unreachable!(),
1323        }
1324    }
1325}
1326
1327/// The type corresponding to the Service service.
1328#[derive(Debug)]
1329pub struct Service;
1330
1331impl ::fidl_next::DiscoverableService for Service {
1332    const SERVICE_NAME: &'static str = "fuchsia.hardware.pin.Service";
1333    const MEMBER_NAMES: &'static [&'static str] = &["device"];
1334}
1335
1336impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for Service {}
1337
1338impl<___C> ::fidl_next::Service<___C> for Service
1339where
1340    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
1341{
1342    type Connector = ServiceConnector<___C>;
1343}
1344
1345/// A strongly-typed service connector for the `Service` service.
1346#[repr(transparent)]
1347pub struct ServiceConnector<___C> {
1348    #[allow(dead_code)]
1349    connector: ___C,
1350}
1351
1352impl<___C> ServiceConnector<___C>
1353where
1354    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
1355{
1356    /// Attempts to connect to the `device` service member.
1357    pub fn device(
1358        &self,
1359        server_end: ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::fuchsia::zx::Channel>,
1360    ) -> ::core::result::Result<
1361        (),
1362        <___C as ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>>::Error,
1363    > {
1364        ::fidl_next::protocol::ServiceConnector::<
1365                ::fidl_next::fuchsia::zx::Channel
1366            >::connect_to_member(
1367                &self.connector,
1368                "device",
1369                server_end.into_untyped(),
1370            )
1371    }
1372}
1373
1374/// A service handler for the `Service` service.
1375pub trait ServiceHandler {
1376    /// Handles an attempt to connect to the `device` member.
1377    fn device(
1378        &self,
1379        server_end: ::fidl_next::ServerEnd<crate::Pin, ::fidl_next::fuchsia::zx::Channel>,
1380    );
1381}
1382
1383impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for Service
1384where
1385    ___H: ServiceHandler,
1386    ::fidl_next::fuchsia::zx::Channel: ::fidl_next::InstanceFromServiceTransport<___T>,
1387{
1388    fn on_connection(handler: &___H, member: &str, server_end: ___T) {
1389        use ::fidl_next::InstanceFromServiceTransport;
1390        match member {
1391            "device" => handler.device(::fidl_next::ServerEnd::from_untyped(
1392                ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
1393            )),
1394
1395            _ => unreachable!(),
1396        }
1397    }
1398}
1399
1400pub use fidl_next_common_fuchsia_hardware_pin::*;