fidl_next_fuchsia_hardware_interconnect/
fidl_next_fuchsia_hardware_interconnect.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_interconnect::natural::*;
8}
9
10pub mod wire {
11
12 pub use fidl_next_common_fuchsia_hardware_interconnect::wire::*;
13}
14
15pub mod wire_optional {
16
17 pub use fidl_next_common_fuchsia_hardware_interconnect::wire_optional::*;
18}
19
20pub mod generic {
21
22 pub use fidl_next_common_fuchsia_hardware_interconnect::generic::*;
23}
24
25pub use self::natural::*;
26
27#[derive(Debug)]
29pub struct PathService;
30
31impl ::fidl_next::DiscoverableService for PathService {
32 const SERVICE_NAME: &'static str = "fuchsia.hardware.interconnect.PathService";
33 const MEMBER_NAMES: &'static [&'static str] = &["path"];
34}
35
36impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for PathService {}
37
38impl<___C> ::fidl_next::Service<___C> for PathService
39where
40 ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
41{
42 type Connector = PathServiceConnector<___C>;
43}
44
45#[repr(transparent)]
47pub struct PathServiceConnector<___C> {
48 #[allow(dead_code)]
49 connector: ___C,
50}
51
52impl<___C> PathServiceConnector<___C>
53where
54 ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
55{
56 pub fn path(
58 &self,
59 server_end: ::fidl_next::ServerEnd<crate::Path, ::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 "path",
69 server_end.into_untyped(),
70 )
71 }
72}
73
74pub trait PathServiceHandler {
76 fn path(
78 &self,
79 server_end: ::fidl_next::ServerEnd<crate::Path, ::fidl_next::fuchsia::zx::Channel>,
80 );
81}
82
83impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for PathService
84where
85 ___H: PathServiceHandler,
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 "path" => handler.path(::fidl_next::ServerEnd::from_untyped(
92 ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
93 )),
94
95 _ => unreachable!(),
96 }
97 }
98}
99
100#[derive(Debug)]
102pub struct Service;
103
104impl ::fidl_next::DiscoverableService for Service {
105 const SERVICE_NAME: &'static str = "fuchsia.hardware.interconnect.Service";
106 const MEMBER_NAMES: &'static [&'static str] = &["device"];
107}
108
109impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for Service {}
110
111impl<___C> ::fidl_next::Service<___C> for Service
112where
113 ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
114{
115 type Connector = ServiceConnector<___C>;
116}
117
118#[repr(transparent)]
120pub struct ServiceConnector<___C> {
121 #[allow(dead_code)]
122 connector: ___C,
123}
124
125impl<___C> ServiceConnector<___C>
126where
127 ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
128{
129 pub fn device(
131 &self,
132 server_end: ::fidl_next::ServerEnd<crate::Device, ::fidl_next::fuchsia::zx::Channel>,
133 ) -> ::core::result::Result<
134 (),
135 <___C as ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>>::Error,
136 > {
137 ::fidl_next::protocol::ServiceConnector::<
138 ::fidl_next::fuchsia::zx::Channel
139 >::connect_to_member(
140 &self.connector,
141 "device",
142 server_end.into_untyped(),
143 )
144 }
145}
146
147pub trait ServiceHandler {
149 fn device(
151 &self,
152 server_end: ::fidl_next::ServerEnd<crate::Device, ::fidl_next::fuchsia::zx::Channel>,
153 );
154}
155
156impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for Service
157where
158 ___H: ServiceHandler,
159 ::fidl_next::fuchsia::zx::Channel: ::fidl_next::InstanceFromServiceTransport<___T>,
160{
161 fn on_connection(handler: &___H, member: &str, server_end: ___T) {
162 use ::fidl_next::InstanceFromServiceTransport;
163 match member {
164 "device" => handler.device(::fidl_next::ServerEnd::from_untyped(
165 ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
166 )),
167
168 _ => unreachable!(),
169 }
170 }
171}
172
173pub use fidl_next_common_fuchsia_hardware_interconnect::*;