fidl_next_fuchsia_hardware_i2cimpl/
fidl_next_fuchsia_hardware_i2cimpl.rs1#![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_i2cimpl::natural::*;
8}
9
10pub mod wire {
11
12 pub use fidl_next_common_fuchsia_hardware_i2cimpl::wire::*;
13}
14
15pub mod wire_optional {
16
17 pub use fidl_next_common_fuchsia_hardware_i2cimpl::wire_optional::*;
18}
19
20pub mod generic {
21
22 pub use fidl_next_common_fuchsia_hardware_i2cimpl::generic::*;
23}
24
25pub use self::natural::*;
26
27#[derive(Debug)]
29pub struct Service;
30
31impl ::fidl_next::DiscoverableService for Service {
32 const SERVICE_NAME: &'static str = "fuchsia.hardware.i2cimpl.Service";
33 const MEMBER_NAMES: &'static [&'static str] = &["device"];
34}
35
36impl ::fidl_next::HasServiceRequest<::fdf_fidl::DriverChannel> for Service {}
37
38impl<___C> ::fidl_next::Service<___C> for Service
39where
40 ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
41{
42 type Connector = ServiceConnector<___C>;
43}
44
45#[repr(transparent)]
47pub struct ServiceConnector<___C> {
48 #[allow(dead_code)]
49 connector: ___C,
50}
51
52impl<___C> ServiceConnector<___C>
53where
54 ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
55{
56 pub fn device(
58 &self,
59 server_end: ::fidl_next::ServerEnd<crate::Device, ::fdf_fidl::DriverChannel>,
60 ) -> ::core::result::Result<
61 (),
62 <___C as ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>>::Error,
63 > {
64 ::fidl_next::protocol::ServiceConnector::<::fdf_fidl::DriverChannel>::connect_to_member(
65 &self.connector,
66 "device",
67 server_end.into_untyped(),
68 )
69 }
70}
71
72pub trait ServiceHandler {
74 fn device(&self, server_end: ::fidl_next::ServerEnd<crate::Device, ::fdf_fidl::DriverChannel>);
76}
77
78impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for Service
79where
80 ___H: ServiceHandler,
81 ::fdf_fidl::DriverChannel: ::fidl_next::InstanceFromServiceTransport<___T>,
82{
83 fn on_connection(handler: &___H, member: &str, server_end: ___T) {
84 use ::fidl_next::InstanceFromServiceTransport;
85 match member {
86 "device" => handler.device(::fidl_next::ServerEnd::from_untyped(
87 ::fdf_fidl::DriverChannel::from_service_transport(server_end),
88 )),
89
90 _ => unreachable!(),
91 }
92 }
93}
94
95pub use fidl_next_common_fuchsia_hardware_i2cimpl::*;
96
97pub mod compat {
99
100 pub use fidl_next_common_fuchsia_hardware_i2cimpl::compat::*;
101}