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
25mod internal {
26 use super::*;
27
28 impl fidl::encoding::ValueTypeMarker for FactoryDeviceSendMfgCommandRequest {
29 type Borrowed<'a> = &'a Self;
30 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31 value
32 }
33 }
34
35 unsafe impl fidl::encoding::TypeMarker for FactoryDeviceSendMfgCommandRequest {
36 type Owned = Self;
37
38 #[inline(always)]
39 fn inline_align(_context: fidl::encoding::Context) -> usize {
40 8
41 }
42
43 #[inline(always)]
44 fn inline_size(_context: fidl::encoding::Context) -> usize {
45 16
46 }
47 }
48
49 unsafe impl<D: fidl::encoding::ResourceDialect>
50 fidl::encoding::Encode<FactoryDeviceSendMfgCommandRequest, D>
51 for &FactoryDeviceSendMfgCommandRequest
52 {
53 #[inline]
54 unsafe fn encode(
55 self,
56 encoder: &mut fidl::encoding::Encoder<'_, D>,
57 offset: usize,
58 _depth: fidl::encoding::Depth,
59 ) -> fidl::Result<()> {
60 encoder.debug_check_bounds::<FactoryDeviceSendMfgCommandRequest>(offset);
61 fidl::encoding::Encode::<FactoryDeviceSendMfgCommandRequest, D>::encode(
63 (<fidl::encoding::BoundedString<2000> as fidl::encoding::ValueTypeMarker>::borrow(
64 &self.command,
65 ),),
66 encoder,
67 offset,
68 _depth,
69 )
70 }
71 }
72 unsafe impl<
73 D: fidl::encoding::ResourceDialect,
74 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2000>, D>,
75 > fidl::encoding::Encode<FactoryDeviceSendMfgCommandRequest, D> for (T0,)
76 {
77 #[inline]
78 unsafe fn encode(
79 self,
80 encoder: &mut fidl::encoding::Encoder<'_, D>,
81 offset: usize,
82 depth: fidl::encoding::Depth,
83 ) -> fidl::Result<()> {
84 encoder.debug_check_bounds::<FactoryDeviceSendMfgCommandRequest>(offset);
85 self.0.encode(encoder, offset + 0, depth)?;
89 Ok(())
90 }
91 }
92
93 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
94 for FactoryDeviceSendMfgCommandRequest
95 {
96 #[inline(always)]
97 fn new_empty() -> Self {
98 Self { command: fidl::new_empty!(fidl::encoding::BoundedString<2000>, D) }
99 }
100
101 #[inline]
102 unsafe fn decode(
103 &mut self,
104 decoder: &mut fidl::encoding::Decoder<'_, D>,
105 offset: usize,
106 _depth: fidl::encoding::Depth,
107 ) -> fidl::Result<()> {
108 decoder.debug_check_bounds::<Self>(offset);
109 fidl::decode!(
111 fidl::encoding::BoundedString<2000>,
112 D,
113 &mut self.command,
114 decoder,
115 offset + 0,
116 _depth
117 )?;
118 Ok(())
119 }
120 }
121
122 impl fidl::encoding::ValueTypeMarker for FactoryDeviceSendMfgCommandResponse {
123 type Borrowed<'a> = &'a Self;
124 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
125 value
126 }
127 }
128
129 unsafe impl fidl::encoding::TypeMarker for FactoryDeviceSendMfgCommandResponse {
130 type Owned = Self;
131
132 #[inline(always)]
133 fn inline_align(_context: fidl::encoding::Context) -> usize {
134 8
135 }
136
137 #[inline(always)]
138 fn inline_size(_context: fidl::encoding::Context) -> usize {
139 16
140 }
141 }
142
143 unsafe impl<D: fidl::encoding::ResourceDialect>
144 fidl::encoding::Encode<FactoryDeviceSendMfgCommandResponse, D>
145 for &FactoryDeviceSendMfgCommandResponse
146 {
147 #[inline]
148 unsafe fn encode(
149 self,
150 encoder: &mut fidl::encoding::Encoder<'_, D>,
151 offset: usize,
152 _depth: fidl::encoding::Depth,
153 ) -> fidl::Result<()> {
154 encoder.debug_check_bounds::<FactoryDeviceSendMfgCommandResponse>(offset);
155 fidl::encoding::Encode::<FactoryDeviceSendMfgCommandResponse, D>::encode(
157 (<fidl::encoding::BoundedString<2000> as fidl::encoding::ValueTypeMarker>::borrow(
158 &self.response,
159 ),),
160 encoder,
161 offset,
162 _depth,
163 )
164 }
165 }
166 unsafe impl<
167 D: fidl::encoding::ResourceDialect,
168 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2000>, D>,
169 > fidl::encoding::Encode<FactoryDeviceSendMfgCommandResponse, D> for (T0,)
170 {
171 #[inline]
172 unsafe fn encode(
173 self,
174 encoder: &mut fidl::encoding::Encoder<'_, D>,
175 offset: usize,
176 depth: fidl::encoding::Depth,
177 ) -> fidl::Result<()> {
178 encoder.debug_check_bounds::<FactoryDeviceSendMfgCommandResponse>(offset);
179 self.0.encode(encoder, offset + 0, depth)?;
183 Ok(())
184 }
185 }
186
187 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
188 for FactoryDeviceSendMfgCommandResponse
189 {
190 #[inline(always)]
191 fn new_empty() -> Self {
192 Self { response: fidl::new_empty!(fidl::encoding::BoundedString<2000>, D) }
193 }
194
195 #[inline]
196 unsafe fn decode(
197 &mut self,
198 decoder: &mut fidl::encoding::Decoder<'_, D>,
199 offset: usize,
200 _depth: fidl::encoding::Depth,
201 ) -> fidl::Result<()> {
202 decoder.debug_check_bounds::<Self>(offset);
203 fidl::decode!(
205 fidl::encoding::BoundedString<2000>,
206 D,
207 &mut self.response,
208 decoder,
209 offset + 0,
210 _depth
211 )?;
212 Ok(())
213 }
214 }
215}