fidl_fuchsia_factory_lowpan__common/
fidl_fuchsia_factory_lowpan__common.rs1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12pub struct FactoryDeviceSendMfgCommandRequest {
13 pub command: String,
14}
15
16impl fidl::Persistable for FactoryDeviceSendMfgCommandRequest {}
17
18#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub struct FactoryDeviceSendMfgCommandResponse {
20 pub response: String,
21}
22
23impl fidl::Persistable for FactoryDeviceSendMfgCommandResponse {}
24
25pub mod factory_device_ordinals {
26 pub const SEND_MFG_COMMAND: u64 = 0x61ea2fba8c9fb7;
27 pub const SETUP_OT_CLI: u64 = 0x6a2b94d0a72e1663;
28}
29
30pub mod factory_driver_ordinals {
31 pub const GET_FACTORY_DEVICE: u64 = 0x7b3a42b6d35a7e1d;
32}
33
34pub mod factory_lookup_ordinals {
35 pub const LOOKUP: u64 = 0x7b8dc96a8fbf4885;
36}
37
38pub mod factory_register_ordinals {
39 pub const REGISTER: u64 = 0x1d167c20bdcccf1f;
40}
41
42mod internal {
43 use super::*;
44
45 impl fidl::encoding::ValueTypeMarker for FactoryDeviceSendMfgCommandRequest {
46 type Borrowed<'a> = &'a Self;
47 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
48 value
49 }
50 }
51
52 unsafe impl fidl::encoding::TypeMarker for FactoryDeviceSendMfgCommandRequest {
53 type Owned = Self;
54
55 #[inline(always)]
56 fn inline_align(_context: fidl::encoding::Context) -> usize {
57 8
58 }
59
60 #[inline(always)]
61 fn inline_size(_context: fidl::encoding::Context) -> usize {
62 16
63 }
64 }
65
66 unsafe impl<D: fidl::encoding::ResourceDialect>
67 fidl::encoding::Encode<FactoryDeviceSendMfgCommandRequest, D>
68 for &FactoryDeviceSendMfgCommandRequest
69 {
70 #[inline]
71 unsafe fn encode(
72 self,
73 encoder: &mut fidl::encoding::Encoder<'_, D>,
74 offset: usize,
75 _depth: fidl::encoding::Depth,
76 ) -> fidl::Result<()> {
77 encoder.debug_check_bounds::<FactoryDeviceSendMfgCommandRequest>(offset);
78 fidl::encoding::Encode::<FactoryDeviceSendMfgCommandRequest, D>::encode(
80 (<fidl::encoding::BoundedString<2000> as fidl::encoding::ValueTypeMarker>::borrow(
81 &self.command,
82 ),),
83 encoder,
84 offset,
85 _depth,
86 )
87 }
88 }
89 unsafe impl<
90 D: fidl::encoding::ResourceDialect,
91 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2000>, D>,
92 > fidl::encoding::Encode<FactoryDeviceSendMfgCommandRequest, D> for (T0,)
93 {
94 #[inline]
95 unsafe fn encode(
96 self,
97 encoder: &mut fidl::encoding::Encoder<'_, D>,
98 offset: usize,
99 depth: fidl::encoding::Depth,
100 ) -> fidl::Result<()> {
101 encoder.debug_check_bounds::<FactoryDeviceSendMfgCommandRequest>(offset);
102 self.0.encode(encoder, offset + 0, depth)?;
106 Ok(())
107 }
108 }
109
110 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
111 for FactoryDeviceSendMfgCommandRequest
112 {
113 #[inline(always)]
114 fn new_empty() -> Self {
115 Self { command: fidl::new_empty!(fidl::encoding::BoundedString<2000>, D) }
116 }
117
118 #[inline]
119 unsafe fn decode(
120 &mut self,
121 decoder: &mut fidl::encoding::Decoder<'_, D>,
122 offset: usize,
123 _depth: fidl::encoding::Depth,
124 ) -> fidl::Result<()> {
125 decoder.debug_check_bounds::<Self>(offset);
126 fidl::decode!(
128 fidl::encoding::BoundedString<2000>,
129 D,
130 &mut self.command,
131 decoder,
132 offset + 0,
133 _depth
134 )?;
135 Ok(())
136 }
137 }
138
139 impl fidl::encoding::ValueTypeMarker for FactoryDeviceSendMfgCommandResponse {
140 type Borrowed<'a> = &'a Self;
141 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
142 value
143 }
144 }
145
146 unsafe impl fidl::encoding::TypeMarker for FactoryDeviceSendMfgCommandResponse {
147 type Owned = Self;
148
149 #[inline(always)]
150 fn inline_align(_context: fidl::encoding::Context) -> usize {
151 8
152 }
153
154 #[inline(always)]
155 fn inline_size(_context: fidl::encoding::Context) -> usize {
156 16
157 }
158 }
159
160 unsafe impl<D: fidl::encoding::ResourceDialect>
161 fidl::encoding::Encode<FactoryDeviceSendMfgCommandResponse, D>
162 for &FactoryDeviceSendMfgCommandResponse
163 {
164 #[inline]
165 unsafe fn encode(
166 self,
167 encoder: &mut fidl::encoding::Encoder<'_, D>,
168 offset: usize,
169 _depth: fidl::encoding::Depth,
170 ) -> fidl::Result<()> {
171 encoder.debug_check_bounds::<FactoryDeviceSendMfgCommandResponse>(offset);
172 fidl::encoding::Encode::<FactoryDeviceSendMfgCommandResponse, D>::encode(
174 (<fidl::encoding::BoundedString<2000> as fidl::encoding::ValueTypeMarker>::borrow(
175 &self.response,
176 ),),
177 encoder,
178 offset,
179 _depth,
180 )
181 }
182 }
183 unsafe impl<
184 D: fidl::encoding::ResourceDialect,
185 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2000>, D>,
186 > fidl::encoding::Encode<FactoryDeviceSendMfgCommandResponse, D> for (T0,)
187 {
188 #[inline]
189 unsafe fn encode(
190 self,
191 encoder: &mut fidl::encoding::Encoder<'_, D>,
192 offset: usize,
193 depth: fidl::encoding::Depth,
194 ) -> fidl::Result<()> {
195 encoder.debug_check_bounds::<FactoryDeviceSendMfgCommandResponse>(offset);
196 self.0.encode(encoder, offset + 0, depth)?;
200 Ok(())
201 }
202 }
203
204 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
205 for FactoryDeviceSendMfgCommandResponse
206 {
207 #[inline(always)]
208 fn new_empty() -> Self {
209 Self { response: fidl::new_empty!(fidl::encoding::BoundedString<2000>, D) }
210 }
211
212 #[inline]
213 unsafe fn decode(
214 &mut self,
215 decoder: &mut fidl::encoding::Decoder<'_, D>,
216 offset: usize,
217 _depth: fidl::encoding::Depth,
218 ) -> fidl::Result<()> {
219 decoder.debug_check_bounds::<Self>(offset);
220 fidl::decode!(
222 fidl::encoding::BoundedString<2000>,
223 D,
224 &mut self.response,
225 decoder,
226 offset + 0,
227 _depth
228 )?;
229 Ok(())
230 }
231 }
232}