fidl_next_fuchsia_hardware_i2c/
fidl_next_fuchsia_hardware_i2c.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_i2c::natural::*;
8}
9
10pub mod wire {
11
12 pub use fidl_next_common_fuchsia_hardware_i2c::wire::*;
13}
14
15pub mod wire_optional {
16
17 pub use fidl_next_common_fuchsia_hardware_i2c::wire_optional::*;
18}
19
20pub mod generic {
21
22 pub use fidl_next_common_fuchsia_hardware_i2c::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.i2c.Service";
33 const MEMBER_NAMES: &'static [&'static str] = &["device"];
34}
35
36impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for Service {}
37
38impl<___C> ::fidl_next::Service<___C> for Service
39where
40 ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
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<::fidl_next::fuchsia::zx::Channel>,
55{
56 pub fn device(
58 &self,
59 server_end: ::fidl_next::ServerEnd<crate::Device, ::fidl_next::fuchsia::zx::Channel>,
60 ) -> ::core::result::Result<
61 (),
62 <___C as ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>>::Error,
63 > {
64 ::fidl_next::protocol::ServiceConnector::<
65 ::fidl_next::fuchsia::zx::Channel
66 >::connect_to_member(
67 &self.connector,
68 "device",
69 server_end.into_untyped(),
70 )
71 }
72}
73
74pub trait ServiceHandler {
76 fn device(
78 &self,
79 server_end: ::fidl_next::ServerEnd<crate::Device, ::fidl_next::fuchsia::zx::Channel>,
80 );
81}
82
83impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for Service
84where
85 ___H: ServiceHandler,
86 ::fidl_next::fuchsia::zx::Channel: ::fidl_next::InstanceFromServiceTransport<___T>,
87{
88 fn on_connection(handler: &___H, member: &str, server_end: ___T) {
89 use ::fidl_next::InstanceFromServiceTransport;
90 match member {
91 "device" => handler.device(::fidl_next::ServerEnd::from_untyped(
92 ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
93 )),
94
95 _ => unreachable!(),
96 }
97 }
98}
99
100pub use fidl_next_common_fuchsia_hardware_i2c::*;
101
102pub mod compat {
104
105 pub use fidl_next_common_fuchsia_hardware_i2c::compat::*;
106}