1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#![allow(
unused_parens, unused_mut, nonstandard_style, )]
#![recursion_limit = "512"]
#[cfg(target_os = "fuchsia")]
#[allow(unused_imports)]
use fuchsia_zircon as zx;
#[allow(unused_imports)]
use {
bitflags::bitflags,
fidl::{
client::{decode_transaction_body_fut, QueryResponseFut},
encoding::{zerocopy, Decodable as _, Encodable as _},
endpoints::{ControlHandle as _, Responder as _},
fidl_bits, fidl_empty_struct, fidl_enum, fidl_struct, fidl_struct_copy, fidl_table,
fidl_union, wrap_handle_metadata,
},
fuchsia_zircon_status as zx_status,
futures::future::{self, MaybeDone, TryFutureExt},
};
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ConfigServiceMarker;
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::ServiceMarker for ConfigServiceMarker {
type Proxy = ConfigServiceProxy;
type Request = ConfigServiceRequest;
const SERVICE_NAME: &'static str = "test.structuredconfig.receiver.shim.ConfigService";
}
#[cfg(target_os = "fuchsia")]
pub enum ConfigServiceRequest {
Puppet(fidl_test_structuredconfig_receiver::ConfigReceiverPuppetRequestStream),
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::ServiceRequest for ConfigServiceRequest {
type Service = ConfigServiceMarker;
fn dispatch(name: &str, _channel: fidl::AsyncChannel) -> Self {
match name {
"puppet" => Self::Puppet(
<fidl_test_structuredconfig_receiver::ConfigReceiverPuppetRequestStream as fidl::endpoints::RequestStream>::from_channel(_channel),
),
_ => panic!("no such member protocol name for service ConfigService"),
}
}
fn member_names() -> &'static [&'static str] {
&["puppet"]
}
}
#[cfg(target_os = "fuchsia")]
pub struct ConfigServiceProxy(Box<dyn fidl::endpoints::MemberOpener>);
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::ServiceProxy for ConfigServiceProxy {
type Service = ConfigServiceMarker;
fn from_member_opener(opener: Box<dyn fidl::endpoints::MemberOpener>) -> Self {
Self(opener)
}
}
#[cfg(target_os = "fuchsia")]
impl ConfigServiceProxy {
pub fn connect_to_puppet(
&self,
) -> Result<fidl_test_structuredconfig_receiver::ConfigReceiverPuppetProxy, fidl::Error> {
let (proxy, server_end) = fidl::endpoints::create_proxy::<
fidl_test_structuredconfig_receiver::ConfigReceiverPuppetMarker,
>()?;
self.connect_channel_to_puppet(server_end)?;
Ok(proxy)
}
pub fn connect_channel_to_puppet(
&self,
server_end: fidl::endpoints::ServerEnd<
fidl_test_structuredconfig_receiver::ConfigReceiverPuppetMarker,
>,
) -> Result<(), fidl::Error> {
self.0.open_member("puppet", server_end.into_channel())
}
}