1#![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
11pub const SERVER_SUITE_VERSION: u64 = 1;
12
13bitflags! {
14 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
15 pub struct TeardownReason: u32 {
16 const PEER_CLOSED = 1;
17 const VOLUNTARY_SHUTDOWN = 2;
18 const INCOMPATIBLE_FORMAT = 4;
19 const UNEXPECTED_MESSAGE = 8;
20 const ENCODE_FAILURE = 16;
21 const DECODE_FAILURE = 32;
22 const WRITE_FAILURE = 64;
23 }
24}
25
26impl TeardownReason {
27 #[deprecated = "Strict bits should not use `has_unknown_bits`"]
28 #[inline(always)]
29 pub fn has_unknown_bits(&self) -> bool {
30 false
31 }
32
33 #[deprecated = "Strict bits should not use `get_unknown_bits`"]
34 #[inline(always)]
35 pub fn get_unknown_bits(&self) -> u32 {
36 0
37 }
38}
39
40#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
41#[repr(u32)]
42pub enum StartError {
43 TestDisabled = 1,
44}
45
46impl StartError {
47 #[inline]
48 pub fn from_primitive(prim: u32) -> Option<Self> {
49 match prim {
50 1 => Some(Self::TestDisabled),
51 _ => None,
52 }
53 }
54
55 #[inline]
56 pub const fn into_primitive(self) -> u32 {
57 self as u32
58 }
59
60 #[deprecated = "Strict enums should not use `is_unknown`"]
61 #[inline]
62 pub fn is_unknown(&self) -> bool {
63 false
64 }
65}
66
67#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
68pub enum Test {
69 Setup,
70 IgnoreDisabled,
71 OneWayNoPayload,
72 TwoWayNoPayload,
73 TwoWayResultWithPayload,
74 TwoWayResultWithError,
75 TwoWayStructPayload,
76 TwoWayTablePayload,
77 TwoWayUnionPayload,
78 OneWayWithNonZeroTxid,
79 TwoWayNoPayloadWithZeroTxid,
80 UnknownOrdinalCausesClose,
81 BadMagicNumberCausesClose,
82 IgnoresUnrecognizedAtRestFlags,
83 IgnoresUnrecognizedDynamicFlags,
84 BadPayloadEncoding,
85 V1TwoWayNoPayload,
86 V1TwoWayStructPayload,
87 EventSendingDoNotReportPeerClosed,
88 ReplySendingDoNotReportPeerClosed,
89 ReceiveOneWayNoPayloadFromPeerClosedChannel,
90 ServerTearsDownWhenPeerClosed,
91 ClientSendsTooFewHandles,
92 ClientSendsWrongHandleType,
93 ClientSendsTooManyRights,
94 ClientSendsTooFewRights,
95 ClientSendsObjectOverPlainHandle,
96 ServerSendsWrongHandleType,
97 ServerSendsTooManyRights,
98 ServerSendsTooFewRights,
99 ServerSendsEpitaph,
100 ServerReceivesEpitaphInvalid,
101 RequestMatchesByteLimit,
102 RequestMatchesHandleLimit,
103 ResponseMatchesByteLimit,
104 ResponseMatchesHandleLimit,
105 ResponseExceedsByteLimit,
106 ResponseExceedsHandleLimit,
107 SendStrictEvent,
108 SendFlexibleEvent,
109 ReceiveStrictOneWay,
110 ReceiveStrictOneWayMismatchedStrictness,
111 ReceiveFlexibleOneWay,
112 ReceiveFlexibleOneWayMismatchedStrictness,
113 StrictTwoWayResponse,
114 StrictTwoWayResponseMismatchedStrictness,
115 StrictTwoWayNonEmptyResponse,
116 StrictTwoWayErrorSyntaxResponse,
117 StrictTwoWayErrorSyntaxResponseMismatchedStrictness,
118 StrictTwoWayErrorSyntaxNonEmptyResponse,
119 FlexibleTwoWayResponse,
120 FlexibleTwoWayResponseMismatchedStrictness,
121 FlexibleTwoWayNonEmptyResponse,
122 FlexibleTwoWayErrorSyntaxResponseSuccessResult,
123 FlexibleTwoWayErrorSyntaxResponseErrorResult,
124 FlexibleTwoWayErrorSyntaxNonEmptyResponseSuccessResult,
125 FlexibleTwoWayErrorSyntaxNonEmptyResponseErrorResult,
126 UnknownStrictOneWayOpenProtocol,
127 UnknownFlexibleOneWayOpenProtocol,
128 UnknownFlexibleOneWayHandleOpenProtocol,
129 UnknownStrictTwoWayOpenProtocol,
130 UnknownFlexibleTwoWayOpenProtocol,
131 UnknownFlexibleTwoWayHandleOpenProtocol,
132 UnknownStrictOneWayAjarProtocol,
133 UnknownFlexibleOneWayAjarProtocol,
134 UnknownStrictTwoWayAjarProtocol,
135 UnknownFlexibleTwoWayAjarProtocol,
136 UnknownStrictOneWayClosedProtocol,
137 UnknownFlexibleOneWayClosedProtocol,
138 UnknownStrictTwoWayClosedProtocol,
139 UnknownFlexibleTwoWayClosedProtocol,
140 #[doc(hidden)]
141 __SourceBreaking {
142 unknown_ordinal: u32,
143 },
144}
145
146#[macro_export]
148macro_rules! TestUnknown {
149 () => {
150 _
151 };
152}
153
154impl Test {
155 #[inline]
156 pub fn from_primitive(prim: u32) -> Option<Self> {
157 match prim {
158 1 => Some(Self::Setup),
159 107 => Some(Self::IgnoreDisabled),
160 2 => Some(Self::OneWayNoPayload),
161 3 => Some(Self::TwoWayNoPayload),
162 4 => Some(Self::TwoWayResultWithPayload),
163 5 => Some(Self::TwoWayResultWithError),
164 6 => Some(Self::TwoWayStructPayload),
165 7 => Some(Self::TwoWayTablePayload),
166 8 => Some(Self::TwoWayUnionPayload),
167 9 => Some(Self::OneWayWithNonZeroTxid),
168 10 => Some(Self::TwoWayNoPayloadWithZeroTxid),
169 11 => Some(Self::UnknownOrdinalCausesClose),
170 12 => Some(Self::BadMagicNumberCausesClose),
171 13 => Some(Self::IgnoresUnrecognizedAtRestFlags),
172 14 => Some(Self::IgnoresUnrecognizedDynamicFlags),
173 15 => Some(Self::BadPayloadEncoding),
174 105 => Some(Self::V1TwoWayNoPayload),
175 106 => Some(Self::V1TwoWayStructPayload),
176 109 => Some(Self::EventSendingDoNotReportPeerClosed),
177 110 => Some(Self::ReplySendingDoNotReportPeerClosed),
178 111 => Some(Self::ReceiveOneWayNoPayloadFromPeerClosedChannel),
179 113 => Some(Self::ServerTearsDownWhenPeerClosed),
180 16 => Some(Self::ClientSendsTooFewHandles),
181 17 => Some(Self::ClientSendsWrongHandleType),
182 18 => Some(Self::ClientSendsTooManyRights),
183 19 => Some(Self::ClientSendsTooFewRights),
184 20 => Some(Self::ClientSendsObjectOverPlainHandle),
185 21 => Some(Self::ServerSendsWrongHandleType),
186 22 => Some(Self::ServerSendsTooManyRights),
187 23 => Some(Self::ServerSendsTooFewRights),
188 24 => Some(Self::ServerSendsEpitaph),
189 25 => Some(Self::ServerReceivesEpitaphInvalid),
190 26 => Some(Self::RequestMatchesByteLimit),
191 27 => Some(Self::RequestMatchesHandleLimit),
192 28 => Some(Self::ResponseMatchesByteLimit),
193 29 => Some(Self::ResponseMatchesHandleLimit),
194 30 => Some(Self::ResponseExceedsByteLimit),
195 31 => Some(Self::ResponseExceedsHandleLimit),
196 32 => Some(Self::SendStrictEvent),
197 33 => Some(Self::SendFlexibleEvent),
198 34 => Some(Self::ReceiveStrictOneWay),
199 35 => Some(Self::ReceiveStrictOneWayMismatchedStrictness),
200 36 => Some(Self::ReceiveFlexibleOneWay),
201 37 => Some(Self::ReceiveFlexibleOneWayMismatchedStrictness),
202 38 => Some(Self::StrictTwoWayResponse),
203 39 => Some(Self::StrictTwoWayResponseMismatchedStrictness),
204 63 => Some(Self::StrictTwoWayNonEmptyResponse),
205 40 => Some(Self::StrictTwoWayErrorSyntaxResponse),
206 41 => Some(Self::StrictTwoWayErrorSyntaxResponseMismatchedStrictness),
207 64 => Some(Self::StrictTwoWayErrorSyntaxNonEmptyResponse),
208 42 => Some(Self::FlexibleTwoWayResponse),
209 43 => Some(Self::FlexibleTwoWayResponseMismatchedStrictness),
210 44 => Some(Self::FlexibleTwoWayNonEmptyResponse),
211 45 => Some(Self::FlexibleTwoWayErrorSyntaxResponseSuccessResult),
212 46 => Some(Self::FlexibleTwoWayErrorSyntaxResponseErrorResult),
213 47 => Some(Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseSuccessResult),
214 48 => Some(Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseErrorResult),
215 49 => Some(Self::UnknownStrictOneWayOpenProtocol),
216 50 => Some(Self::UnknownFlexibleOneWayOpenProtocol),
217 51 => Some(Self::UnknownFlexibleOneWayHandleOpenProtocol),
218 52 => Some(Self::UnknownStrictTwoWayOpenProtocol),
219 53 => Some(Self::UnknownFlexibleTwoWayOpenProtocol),
220 54 => Some(Self::UnknownFlexibleTwoWayHandleOpenProtocol),
221 55 => Some(Self::UnknownStrictOneWayAjarProtocol),
222 56 => Some(Self::UnknownFlexibleOneWayAjarProtocol),
223 57 => Some(Self::UnknownStrictTwoWayAjarProtocol),
224 58 => Some(Self::UnknownFlexibleTwoWayAjarProtocol),
225 59 => Some(Self::UnknownStrictOneWayClosedProtocol),
226 60 => Some(Self::UnknownFlexibleOneWayClosedProtocol),
227 61 => Some(Self::UnknownStrictTwoWayClosedProtocol),
228 62 => Some(Self::UnknownFlexibleTwoWayClosedProtocol),
229 _ => None,
230 }
231 }
232
233 #[inline]
234 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
235 match prim {
236 1 => Self::Setup,
237 107 => Self::IgnoreDisabled,
238 2 => Self::OneWayNoPayload,
239 3 => Self::TwoWayNoPayload,
240 4 => Self::TwoWayResultWithPayload,
241 5 => Self::TwoWayResultWithError,
242 6 => Self::TwoWayStructPayload,
243 7 => Self::TwoWayTablePayload,
244 8 => Self::TwoWayUnionPayload,
245 9 => Self::OneWayWithNonZeroTxid,
246 10 => Self::TwoWayNoPayloadWithZeroTxid,
247 11 => Self::UnknownOrdinalCausesClose,
248 12 => Self::BadMagicNumberCausesClose,
249 13 => Self::IgnoresUnrecognizedAtRestFlags,
250 14 => Self::IgnoresUnrecognizedDynamicFlags,
251 15 => Self::BadPayloadEncoding,
252 105 => Self::V1TwoWayNoPayload,
253 106 => Self::V1TwoWayStructPayload,
254 109 => Self::EventSendingDoNotReportPeerClosed,
255 110 => Self::ReplySendingDoNotReportPeerClosed,
256 111 => Self::ReceiveOneWayNoPayloadFromPeerClosedChannel,
257 113 => Self::ServerTearsDownWhenPeerClosed,
258 16 => Self::ClientSendsTooFewHandles,
259 17 => Self::ClientSendsWrongHandleType,
260 18 => Self::ClientSendsTooManyRights,
261 19 => Self::ClientSendsTooFewRights,
262 20 => Self::ClientSendsObjectOverPlainHandle,
263 21 => Self::ServerSendsWrongHandleType,
264 22 => Self::ServerSendsTooManyRights,
265 23 => Self::ServerSendsTooFewRights,
266 24 => Self::ServerSendsEpitaph,
267 25 => Self::ServerReceivesEpitaphInvalid,
268 26 => Self::RequestMatchesByteLimit,
269 27 => Self::RequestMatchesHandleLimit,
270 28 => Self::ResponseMatchesByteLimit,
271 29 => Self::ResponseMatchesHandleLimit,
272 30 => Self::ResponseExceedsByteLimit,
273 31 => Self::ResponseExceedsHandleLimit,
274 32 => Self::SendStrictEvent,
275 33 => Self::SendFlexibleEvent,
276 34 => Self::ReceiveStrictOneWay,
277 35 => Self::ReceiveStrictOneWayMismatchedStrictness,
278 36 => Self::ReceiveFlexibleOneWay,
279 37 => Self::ReceiveFlexibleOneWayMismatchedStrictness,
280 38 => Self::StrictTwoWayResponse,
281 39 => Self::StrictTwoWayResponseMismatchedStrictness,
282 63 => Self::StrictTwoWayNonEmptyResponse,
283 40 => Self::StrictTwoWayErrorSyntaxResponse,
284 41 => Self::StrictTwoWayErrorSyntaxResponseMismatchedStrictness,
285 64 => Self::StrictTwoWayErrorSyntaxNonEmptyResponse,
286 42 => Self::FlexibleTwoWayResponse,
287 43 => Self::FlexibleTwoWayResponseMismatchedStrictness,
288 44 => Self::FlexibleTwoWayNonEmptyResponse,
289 45 => Self::FlexibleTwoWayErrorSyntaxResponseSuccessResult,
290 46 => Self::FlexibleTwoWayErrorSyntaxResponseErrorResult,
291 47 => Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseSuccessResult,
292 48 => Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseErrorResult,
293 49 => Self::UnknownStrictOneWayOpenProtocol,
294 50 => Self::UnknownFlexibleOneWayOpenProtocol,
295 51 => Self::UnknownFlexibleOneWayHandleOpenProtocol,
296 52 => Self::UnknownStrictTwoWayOpenProtocol,
297 53 => Self::UnknownFlexibleTwoWayOpenProtocol,
298 54 => Self::UnknownFlexibleTwoWayHandleOpenProtocol,
299 55 => Self::UnknownStrictOneWayAjarProtocol,
300 56 => Self::UnknownFlexibleOneWayAjarProtocol,
301 57 => Self::UnknownStrictTwoWayAjarProtocol,
302 58 => Self::UnknownFlexibleTwoWayAjarProtocol,
303 59 => Self::UnknownStrictOneWayClosedProtocol,
304 60 => Self::UnknownFlexibleOneWayClosedProtocol,
305 61 => Self::UnknownStrictTwoWayClosedProtocol,
306 62 => Self::UnknownFlexibleTwoWayClosedProtocol,
307 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
308 }
309 }
310
311 #[inline]
312 pub fn unknown() -> Self {
313 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
314 }
315
316 #[inline]
317 pub const fn into_primitive(self) -> u32 {
318 match self {
319 Self::Setup => 1,
320 Self::IgnoreDisabled => 107,
321 Self::OneWayNoPayload => 2,
322 Self::TwoWayNoPayload => 3,
323 Self::TwoWayResultWithPayload => 4,
324 Self::TwoWayResultWithError => 5,
325 Self::TwoWayStructPayload => 6,
326 Self::TwoWayTablePayload => 7,
327 Self::TwoWayUnionPayload => 8,
328 Self::OneWayWithNonZeroTxid => 9,
329 Self::TwoWayNoPayloadWithZeroTxid => 10,
330 Self::UnknownOrdinalCausesClose => 11,
331 Self::BadMagicNumberCausesClose => 12,
332 Self::IgnoresUnrecognizedAtRestFlags => 13,
333 Self::IgnoresUnrecognizedDynamicFlags => 14,
334 Self::BadPayloadEncoding => 15,
335 Self::V1TwoWayNoPayload => 105,
336 Self::V1TwoWayStructPayload => 106,
337 Self::EventSendingDoNotReportPeerClosed => 109,
338 Self::ReplySendingDoNotReportPeerClosed => 110,
339 Self::ReceiveOneWayNoPayloadFromPeerClosedChannel => 111,
340 Self::ServerTearsDownWhenPeerClosed => 113,
341 Self::ClientSendsTooFewHandles => 16,
342 Self::ClientSendsWrongHandleType => 17,
343 Self::ClientSendsTooManyRights => 18,
344 Self::ClientSendsTooFewRights => 19,
345 Self::ClientSendsObjectOverPlainHandle => 20,
346 Self::ServerSendsWrongHandleType => 21,
347 Self::ServerSendsTooManyRights => 22,
348 Self::ServerSendsTooFewRights => 23,
349 Self::ServerSendsEpitaph => 24,
350 Self::ServerReceivesEpitaphInvalid => 25,
351 Self::RequestMatchesByteLimit => 26,
352 Self::RequestMatchesHandleLimit => 27,
353 Self::ResponseMatchesByteLimit => 28,
354 Self::ResponseMatchesHandleLimit => 29,
355 Self::ResponseExceedsByteLimit => 30,
356 Self::ResponseExceedsHandleLimit => 31,
357 Self::SendStrictEvent => 32,
358 Self::SendFlexibleEvent => 33,
359 Self::ReceiveStrictOneWay => 34,
360 Self::ReceiveStrictOneWayMismatchedStrictness => 35,
361 Self::ReceiveFlexibleOneWay => 36,
362 Self::ReceiveFlexibleOneWayMismatchedStrictness => 37,
363 Self::StrictTwoWayResponse => 38,
364 Self::StrictTwoWayResponseMismatchedStrictness => 39,
365 Self::StrictTwoWayNonEmptyResponse => 63,
366 Self::StrictTwoWayErrorSyntaxResponse => 40,
367 Self::StrictTwoWayErrorSyntaxResponseMismatchedStrictness => 41,
368 Self::StrictTwoWayErrorSyntaxNonEmptyResponse => 64,
369 Self::FlexibleTwoWayResponse => 42,
370 Self::FlexibleTwoWayResponseMismatchedStrictness => 43,
371 Self::FlexibleTwoWayNonEmptyResponse => 44,
372 Self::FlexibleTwoWayErrorSyntaxResponseSuccessResult => 45,
373 Self::FlexibleTwoWayErrorSyntaxResponseErrorResult => 46,
374 Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseSuccessResult => 47,
375 Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseErrorResult => 48,
376 Self::UnknownStrictOneWayOpenProtocol => 49,
377 Self::UnknownFlexibleOneWayOpenProtocol => 50,
378 Self::UnknownFlexibleOneWayHandleOpenProtocol => 51,
379 Self::UnknownStrictTwoWayOpenProtocol => 52,
380 Self::UnknownFlexibleTwoWayOpenProtocol => 53,
381 Self::UnknownFlexibleTwoWayHandleOpenProtocol => 54,
382 Self::UnknownStrictOneWayAjarProtocol => 55,
383 Self::UnknownFlexibleOneWayAjarProtocol => 56,
384 Self::UnknownStrictTwoWayAjarProtocol => 57,
385 Self::UnknownFlexibleTwoWayAjarProtocol => 58,
386 Self::UnknownStrictOneWayClosedProtocol => 59,
387 Self::UnknownFlexibleOneWayClosedProtocol => 60,
388 Self::UnknownStrictTwoWayClosedProtocol => 61,
389 Self::UnknownFlexibleTwoWayClosedProtocol => 62,
390 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
391 }
392 }
393
394 #[inline]
395 pub fn is_unknown(&self) -> bool {
396 match self {
397 Self::__SourceBreaking { unknown_ordinal: _ } => true,
398 _ => false,
399 }
400 }
401}
402
403#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
404#[repr(u32)]
405pub enum UnknownMethodType {
406 OneWay = 1,
407 TwoWay = 2,
408}
409
410impl UnknownMethodType {
411 #[inline]
412 pub fn from_primitive(prim: u32) -> Option<Self> {
413 match prim {
414 1 => Some(Self::OneWay),
415 2 => Some(Self::TwoWay),
416 _ => None,
417 }
418 }
419
420 #[inline]
421 pub const fn into_primitive(self) -> u32 {
422 self as u32
423 }
424
425 #[deprecated = "Strict enums should not use `is_unknown`"]
426 #[inline]
427 pub fn is_unknown(&self) -> bool {
428 false
429 }
430}
431
432#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
433pub struct ClosedTargetByteVectorSizeRequest {
434 pub vec: Vec<u8>,
435}
436
437impl fidl::Persistable for ClosedTargetByteVectorSizeRequest {}
438
439#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
440#[repr(C)]
441pub struct ClosedTargetByteVectorSizeResponse {
442 pub n: u32,
443}
444
445impl fidl::Persistable for ClosedTargetByteVectorSizeResponse {}
446
447#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
448#[repr(C)]
449pub struct ClosedTargetCreateNByteVectorRequest {
450 pub n: u32,
451}
452
453impl fidl::Persistable for ClosedTargetCreateNByteVectorRequest {}
454
455#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
456pub struct ClosedTargetCreateNByteVectorResponse {
457 pub vec: Vec<u8>,
458}
459
460impl fidl::Persistable for ClosedTargetCreateNByteVectorResponse {}
461
462#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
463pub struct ClosedTargetGetHandleRightsResponse {
464 pub rights: fidl::Rights,
465}
466
467impl fidl::Persistable for ClosedTargetGetHandleRightsResponse {}
468
469#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
470pub struct ClosedTargetGetSignalableEventRightsResponse {
471 pub rights: fidl::Rights,
472}
473
474impl fidl::Persistable for ClosedTargetGetSignalableEventRightsResponse {}
475
476#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
477#[repr(C)]
478pub struct ClosedTargetHandleVectorSizeResponse {
479 pub n: u32,
480}
481
482impl fidl::Persistable for ClosedTargetHandleVectorSizeResponse {}
483
484#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
485#[repr(C)]
486pub struct ClosedTargetTwoWayStructPayloadRequest {
487 pub v: i8,
488}
489
490impl fidl::Persistable for ClosedTargetTwoWayStructPayloadRequest {}
491
492#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
493#[repr(C)]
494pub struct ClosedTargetTwoWayStructPayloadResponse {
495 pub v: i8,
496}
497
498impl fidl::Persistable for ClosedTargetTwoWayStructPayloadResponse {}
499
500#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
501pub struct ClosedTargetTwoWayResultResponse {
502 pub payload: String,
503}
504
505impl fidl::Persistable for ClosedTargetTwoWayResultResponse {}
506
507#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
508pub struct Empty;
509
510impl fidl::Persistable for Empty {}
511
512#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
513#[repr(C)]
514pub struct OpenTargetFlexibleTwoWayFieldsRequest {
515 pub reply_with: i32,
516}
517
518impl fidl::Persistable for OpenTargetFlexibleTwoWayFieldsRequest {}
519
520#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
521#[repr(C)]
522pub struct OpenTargetStrictTwoWayFieldsRequest {
523 pub reply_with: i32,
524}
525
526impl fidl::Persistable for OpenTargetStrictTwoWayFieldsRequest {}
527
528#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
529#[repr(C)]
530pub struct OpenTargetStrictTwoWayFieldsResponse {
531 pub some_field: i32,
532}
533
534impl fidl::Persistable for OpenTargetStrictTwoWayFieldsResponse {}
535
536#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
537#[repr(C)]
538pub struct OpenTargetFlexibleTwoWayFieldsErrResponse {
539 pub some_field: i32,
540}
541
542impl fidl::Persistable for OpenTargetFlexibleTwoWayFieldsErrResponse {}
543
544#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
545#[repr(C)]
546pub struct OpenTargetFlexibleTwoWayFieldsResponse {
547 pub some_field: i32,
548}
549
550impl fidl::Persistable for OpenTargetFlexibleTwoWayFieldsResponse {}
551
552#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
553#[repr(C)]
554pub struct OpenTargetStrictTwoWayFieldsErrResponse {
555 pub some_field: i32,
556}
557
558impl fidl::Persistable for OpenTargetStrictTwoWayFieldsErrResponse {}
559
560#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
561#[repr(C)]
562pub struct RunnerGetVersionResponse {
563 pub version: u64,
564}
565
566impl fidl::Persistable for RunnerGetVersionResponse {}
567
568#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
569pub struct RunnerOnTeardownRequest {
570 pub reason: TeardownReason,
571}
572
573impl fidl::Persistable for RunnerOnTeardownRequest {}
574
575#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
576#[repr(C)]
577pub struct RunnerShutdownWithEpitaphRequest {
578 pub epitaph_status: i32,
579}
580
581impl fidl::Persistable for RunnerShutdownWithEpitaphRequest {}
582
583#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
584pub struct UnknownMethodInfo {
585 pub ordinal: u64,
586 pub unknown_method_type: UnknownMethodType,
587}
588
589impl fidl::Persistable for UnknownMethodInfo {}
590
591#[derive(Clone, Debug, Default, PartialEq)]
592pub struct ClosedTargetTwoWayTablePayloadRequest {
593 pub v: Option<i8>,
594 #[doc(hidden)]
595 pub __source_breaking: fidl::marker::SourceBreaking,
596}
597
598impl fidl::Persistable for ClosedTargetTwoWayTablePayloadRequest {}
599
600#[derive(Clone, Debug, Default, PartialEq)]
601pub struct ClosedTargetTwoWayTablePayloadResponse {
602 pub v: Option<i8>,
603 #[doc(hidden)]
604 pub __source_breaking: fidl::marker::SourceBreaking,
605}
606
607impl fidl::Persistable for ClosedTargetTwoWayTablePayloadResponse {}
608
609#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
610pub enum ClosedTargetTwoWayResultRequest {
611 Payload(String),
612 Error(u32),
613}
614
615impl ClosedTargetTwoWayResultRequest {
616 #[inline]
617 pub fn ordinal(&self) -> u64 {
618 match *self {
619 Self::Payload(_) => 1,
620 Self::Error(_) => 2,
621 }
622 }
623
624 #[deprecated = "Strict unions should not use `is_unknown`"]
625 #[inline]
626 pub fn is_unknown(&self) -> bool {
627 false
628 }
629}
630
631impl fidl::Persistable for ClosedTargetTwoWayResultRequest {}
632
633#[derive(Clone, Debug)]
634pub enum ClosedTargetTwoWayUnionPayloadRequest {
635 V(i8),
636 #[doc(hidden)]
637 __SourceBreaking {
638 unknown_ordinal: u64,
639 },
640}
641
642#[macro_export]
644macro_rules! ClosedTargetTwoWayUnionPayloadRequestUnknown {
645 () => {
646 _
647 };
648}
649
650impl PartialEq for ClosedTargetTwoWayUnionPayloadRequest {
652 fn eq(&self, other: &Self) -> bool {
653 match (self, other) {
654 (Self::V(x), Self::V(y)) => *x == *y,
655 _ => false,
656 }
657 }
658}
659
660impl ClosedTargetTwoWayUnionPayloadRequest {
661 #[inline]
662 pub fn ordinal(&self) -> u64 {
663 match *self {
664 Self::V(_) => 1,
665 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
666 }
667 }
668
669 #[inline]
670 pub fn unknown_variant_for_testing() -> Self {
671 Self::__SourceBreaking { unknown_ordinal: 0 }
672 }
673
674 #[inline]
675 pub fn is_unknown(&self) -> bool {
676 match self {
677 Self::__SourceBreaking { .. } => true,
678 _ => false,
679 }
680 }
681}
682
683impl fidl::Persistable for ClosedTargetTwoWayUnionPayloadRequest {}
684
685#[derive(Clone, Debug)]
686pub enum ClosedTargetTwoWayUnionPayloadResponse {
687 V(i8),
688 #[doc(hidden)]
689 __SourceBreaking {
690 unknown_ordinal: u64,
691 },
692}
693
694#[macro_export]
696macro_rules! ClosedTargetTwoWayUnionPayloadResponseUnknown {
697 () => {
698 _
699 };
700}
701
702impl PartialEq for ClosedTargetTwoWayUnionPayloadResponse {
704 fn eq(&self, other: &Self) -> bool {
705 match (self, other) {
706 (Self::V(x), Self::V(y)) => *x == *y,
707 _ => false,
708 }
709 }
710}
711
712impl ClosedTargetTwoWayUnionPayloadResponse {
713 #[inline]
714 pub fn ordinal(&self) -> u64 {
715 match *self {
716 Self::V(_) => 1,
717 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
718 }
719 }
720
721 #[inline]
722 pub fn unknown_variant_for_testing() -> Self {
723 Self::__SourceBreaking { unknown_ordinal: 0 }
724 }
725
726 #[inline]
727 pub fn is_unknown(&self) -> bool {
728 match self {
729 Self::__SourceBreaking { .. } => true,
730 _ => false,
731 }
732 }
733}
734
735impl fidl::Persistable for ClosedTargetTwoWayUnionPayloadResponse {}
736
737#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
738pub enum OpenTargetFlexibleTwoWayErrRequest {
739 ReplySuccess(Empty),
740 ReplyError(i32),
741}
742
743impl OpenTargetFlexibleTwoWayErrRequest {
744 #[inline]
745 pub fn ordinal(&self) -> u64 {
746 match *self {
747 Self::ReplySuccess(_) => 1,
748 Self::ReplyError(_) => 2,
749 }
750 }
751
752 #[deprecated = "Strict unions should not use `is_unknown`"]
753 #[inline]
754 pub fn is_unknown(&self) -> bool {
755 false
756 }
757}
758
759impl fidl::Persistable for OpenTargetFlexibleTwoWayErrRequest {}
760
761#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
762pub enum OpenTargetFlexibleTwoWayFieldsErrRequest {
763 ReplySuccess(i32),
764 ReplyError(i32),
765}
766
767impl OpenTargetFlexibleTwoWayFieldsErrRequest {
768 #[inline]
769 pub fn ordinal(&self) -> u64 {
770 match *self {
771 Self::ReplySuccess(_) => 1,
772 Self::ReplyError(_) => 2,
773 }
774 }
775
776 #[deprecated = "Strict unions should not use `is_unknown`"]
777 #[inline]
778 pub fn is_unknown(&self) -> bool {
779 false
780 }
781}
782
783impl fidl::Persistable for OpenTargetFlexibleTwoWayFieldsErrRequest {}
784
785#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
786pub enum OpenTargetStrictTwoWayErrRequest {
787 ReplySuccess(Empty),
788 ReplyError(i32),
789}
790
791impl OpenTargetStrictTwoWayErrRequest {
792 #[inline]
793 pub fn ordinal(&self) -> u64 {
794 match *self {
795 Self::ReplySuccess(_) => 1,
796 Self::ReplyError(_) => 2,
797 }
798 }
799
800 #[deprecated = "Strict unions should not use `is_unknown`"]
801 #[inline]
802 pub fn is_unknown(&self) -> bool {
803 false
804 }
805}
806
807impl fidl::Persistable for OpenTargetStrictTwoWayErrRequest {}
808
809#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
810pub enum OpenTargetStrictTwoWayFieldsErrRequest {
811 ReplySuccess(i32),
812 ReplyError(i32),
813}
814
815impl OpenTargetStrictTwoWayFieldsErrRequest {
816 #[inline]
817 pub fn ordinal(&self) -> u64 {
818 match *self {
819 Self::ReplySuccess(_) => 1,
820 Self::ReplyError(_) => 2,
821 }
822 }
823
824 #[deprecated = "Strict unions should not use `is_unknown`"]
825 #[inline]
826 pub fn is_unknown(&self) -> bool {
827 false
828 }
829}
830
831impl fidl::Persistable for OpenTargetStrictTwoWayFieldsErrRequest {}
832
833mod internal {
834 use super::*;
835 unsafe impl fidl::encoding::TypeMarker for TeardownReason {
836 type Owned = Self;
837
838 #[inline(always)]
839 fn inline_align(_context: fidl::encoding::Context) -> usize {
840 4
841 }
842
843 #[inline(always)]
844 fn inline_size(_context: fidl::encoding::Context) -> usize {
845 4
846 }
847 }
848
849 impl fidl::encoding::ValueTypeMarker for TeardownReason {
850 type Borrowed<'a> = Self;
851 #[inline(always)]
852 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
853 *value
854 }
855 }
856
857 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for TeardownReason {
858 #[inline]
859 unsafe fn encode(
860 self,
861 encoder: &mut fidl::encoding::Encoder<'_, D>,
862 offset: usize,
863 _depth: fidl::encoding::Depth,
864 ) -> fidl::Result<()> {
865 encoder.debug_check_bounds::<Self>(offset);
866 if self.bits() & Self::all().bits() != self.bits() {
867 return Err(fidl::Error::InvalidBitsValue);
868 }
869 encoder.write_num(self.bits(), offset);
870 Ok(())
871 }
872 }
873
874 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TeardownReason {
875 #[inline(always)]
876 fn new_empty() -> Self {
877 Self::empty()
878 }
879
880 #[inline]
881 unsafe fn decode(
882 &mut self,
883 decoder: &mut fidl::encoding::Decoder<'_, D>,
884 offset: usize,
885 _depth: fidl::encoding::Depth,
886 ) -> fidl::Result<()> {
887 decoder.debug_check_bounds::<Self>(offset);
888 let prim = decoder.read_num::<u32>(offset);
889 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
890 Ok(())
891 }
892 }
893 unsafe impl fidl::encoding::TypeMarker for StartError {
894 type Owned = Self;
895
896 #[inline(always)]
897 fn inline_align(_context: fidl::encoding::Context) -> usize {
898 std::mem::align_of::<u32>()
899 }
900
901 #[inline(always)]
902 fn inline_size(_context: fidl::encoding::Context) -> usize {
903 std::mem::size_of::<u32>()
904 }
905
906 #[inline(always)]
907 fn encode_is_copy() -> bool {
908 true
909 }
910
911 #[inline(always)]
912 fn decode_is_copy() -> bool {
913 false
914 }
915 }
916
917 impl fidl::encoding::ValueTypeMarker for StartError {
918 type Borrowed<'a> = Self;
919 #[inline(always)]
920 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
921 *value
922 }
923 }
924
925 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StartError {
926 #[inline]
927 unsafe fn encode(
928 self,
929 encoder: &mut fidl::encoding::Encoder<'_, D>,
930 offset: usize,
931 _depth: fidl::encoding::Depth,
932 ) -> fidl::Result<()> {
933 encoder.debug_check_bounds::<Self>(offset);
934 encoder.write_num(self.into_primitive(), offset);
935 Ok(())
936 }
937 }
938
939 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartError {
940 #[inline(always)]
941 fn new_empty() -> Self {
942 Self::TestDisabled
943 }
944
945 #[inline]
946 unsafe fn decode(
947 &mut self,
948 decoder: &mut fidl::encoding::Decoder<'_, D>,
949 offset: usize,
950 _depth: fidl::encoding::Depth,
951 ) -> fidl::Result<()> {
952 decoder.debug_check_bounds::<Self>(offset);
953 let prim = decoder.read_num::<u32>(offset);
954
955 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
956 Ok(())
957 }
958 }
959 unsafe impl fidl::encoding::TypeMarker for Test {
960 type Owned = Self;
961
962 #[inline(always)]
963 fn inline_align(_context: fidl::encoding::Context) -> usize {
964 std::mem::align_of::<u32>()
965 }
966
967 #[inline(always)]
968 fn inline_size(_context: fidl::encoding::Context) -> usize {
969 std::mem::size_of::<u32>()
970 }
971
972 #[inline(always)]
973 fn encode_is_copy() -> bool {
974 false
975 }
976
977 #[inline(always)]
978 fn decode_is_copy() -> bool {
979 false
980 }
981 }
982
983 impl fidl::encoding::ValueTypeMarker for Test {
984 type Borrowed<'a> = Self;
985 #[inline(always)]
986 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
987 *value
988 }
989 }
990
991 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Test {
992 #[inline]
993 unsafe fn encode(
994 self,
995 encoder: &mut fidl::encoding::Encoder<'_, D>,
996 offset: usize,
997 _depth: fidl::encoding::Depth,
998 ) -> fidl::Result<()> {
999 encoder.debug_check_bounds::<Self>(offset);
1000 encoder.write_num(self.into_primitive(), offset);
1001 Ok(())
1002 }
1003 }
1004
1005 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Test {
1006 #[inline(always)]
1007 fn new_empty() -> Self {
1008 Self::unknown()
1009 }
1010
1011 #[inline]
1012 unsafe fn decode(
1013 &mut self,
1014 decoder: &mut fidl::encoding::Decoder<'_, D>,
1015 offset: usize,
1016 _depth: fidl::encoding::Depth,
1017 ) -> fidl::Result<()> {
1018 decoder.debug_check_bounds::<Self>(offset);
1019 let prim = decoder.read_num::<u32>(offset);
1020
1021 *self = Self::from_primitive_allow_unknown(prim);
1022 Ok(())
1023 }
1024 }
1025 unsafe impl fidl::encoding::TypeMarker for UnknownMethodType {
1026 type Owned = Self;
1027
1028 #[inline(always)]
1029 fn inline_align(_context: fidl::encoding::Context) -> usize {
1030 std::mem::align_of::<u32>()
1031 }
1032
1033 #[inline(always)]
1034 fn inline_size(_context: fidl::encoding::Context) -> usize {
1035 std::mem::size_of::<u32>()
1036 }
1037
1038 #[inline(always)]
1039 fn encode_is_copy() -> bool {
1040 true
1041 }
1042
1043 #[inline(always)]
1044 fn decode_is_copy() -> bool {
1045 false
1046 }
1047 }
1048
1049 impl fidl::encoding::ValueTypeMarker for UnknownMethodType {
1050 type Borrowed<'a> = Self;
1051 #[inline(always)]
1052 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1053 *value
1054 }
1055 }
1056
1057 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1058 for UnknownMethodType
1059 {
1060 #[inline]
1061 unsafe fn encode(
1062 self,
1063 encoder: &mut fidl::encoding::Encoder<'_, D>,
1064 offset: usize,
1065 _depth: fidl::encoding::Depth,
1066 ) -> fidl::Result<()> {
1067 encoder.debug_check_bounds::<Self>(offset);
1068 encoder.write_num(self.into_primitive(), offset);
1069 Ok(())
1070 }
1071 }
1072
1073 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnknownMethodType {
1074 #[inline(always)]
1075 fn new_empty() -> Self {
1076 Self::OneWay
1077 }
1078
1079 #[inline]
1080 unsafe fn decode(
1081 &mut self,
1082 decoder: &mut fidl::encoding::Decoder<'_, D>,
1083 offset: usize,
1084 _depth: fidl::encoding::Depth,
1085 ) -> fidl::Result<()> {
1086 decoder.debug_check_bounds::<Self>(offset);
1087 let prim = decoder.read_num::<u32>(offset);
1088
1089 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1090 Ok(())
1091 }
1092 }
1093
1094 impl fidl::encoding::ValueTypeMarker for ClosedTargetByteVectorSizeRequest {
1095 type Borrowed<'a> = &'a Self;
1096 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1097 value
1098 }
1099 }
1100
1101 unsafe impl fidl::encoding::TypeMarker for ClosedTargetByteVectorSizeRequest {
1102 type Owned = Self;
1103
1104 #[inline(always)]
1105 fn inline_align(_context: fidl::encoding::Context) -> usize {
1106 8
1107 }
1108
1109 #[inline(always)]
1110 fn inline_size(_context: fidl::encoding::Context) -> usize {
1111 16
1112 }
1113 }
1114
1115 unsafe impl<D: fidl::encoding::ResourceDialect>
1116 fidl::encoding::Encode<ClosedTargetByteVectorSizeRequest, D>
1117 for &ClosedTargetByteVectorSizeRequest
1118 {
1119 #[inline]
1120 unsafe fn encode(
1121 self,
1122 encoder: &mut fidl::encoding::Encoder<'_, D>,
1123 offset: usize,
1124 _depth: fidl::encoding::Depth,
1125 ) -> fidl::Result<()> {
1126 encoder.debug_check_bounds::<ClosedTargetByteVectorSizeRequest>(offset);
1127 fidl::encoding::Encode::<ClosedTargetByteVectorSizeRequest, D>::encode(
1129 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1130 &self.vec,
1131 ),),
1132 encoder,
1133 offset,
1134 _depth,
1135 )
1136 }
1137 }
1138 unsafe impl<
1139 D: fidl::encoding::ResourceDialect,
1140 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1141 > fidl::encoding::Encode<ClosedTargetByteVectorSizeRequest, D> for (T0,)
1142 {
1143 #[inline]
1144 unsafe fn encode(
1145 self,
1146 encoder: &mut fidl::encoding::Encoder<'_, D>,
1147 offset: usize,
1148 depth: fidl::encoding::Depth,
1149 ) -> fidl::Result<()> {
1150 encoder.debug_check_bounds::<ClosedTargetByteVectorSizeRequest>(offset);
1151 self.0.encode(encoder, offset + 0, depth)?;
1155 Ok(())
1156 }
1157 }
1158
1159 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1160 for ClosedTargetByteVectorSizeRequest
1161 {
1162 #[inline(always)]
1163 fn new_empty() -> Self {
1164 Self { vec: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1165 }
1166
1167 #[inline]
1168 unsafe fn decode(
1169 &mut self,
1170 decoder: &mut fidl::encoding::Decoder<'_, D>,
1171 offset: usize,
1172 _depth: fidl::encoding::Depth,
1173 ) -> fidl::Result<()> {
1174 decoder.debug_check_bounds::<Self>(offset);
1175 fidl::decode!(
1177 fidl::encoding::UnboundedVector<u8>,
1178 D,
1179 &mut self.vec,
1180 decoder,
1181 offset + 0,
1182 _depth
1183 )?;
1184 Ok(())
1185 }
1186 }
1187
1188 impl fidl::encoding::ValueTypeMarker for ClosedTargetByteVectorSizeResponse {
1189 type Borrowed<'a> = &'a Self;
1190 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1191 value
1192 }
1193 }
1194
1195 unsafe impl fidl::encoding::TypeMarker for ClosedTargetByteVectorSizeResponse {
1196 type Owned = Self;
1197
1198 #[inline(always)]
1199 fn inline_align(_context: fidl::encoding::Context) -> usize {
1200 4
1201 }
1202
1203 #[inline(always)]
1204 fn inline_size(_context: fidl::encoding::Context) -> usize {
1205 4
1206 }
1207 #[inline(always)]
1208 fn encode_is_copy() -> bool {
1209 true
1210 }
1211
1212 #[inline(always)]
1213 fn decode_is_copy() -> bool {
1214 true
1215 }
1216 }
1217
1218 unsafe impl<D: fidl::encoding::ResourceDialect>
1219 fidl::encoding::Encode<ClosedTargetByteVectorSizeResponse, D>
1220 for &ClosedTargetByteVectorSizeResponse
1221 {
1222 #[inline]
1223 unsafe fn encode(
1224 self,
1225 encoder: &mut fidl::encoding::Encoder<'_, D>,
1226 offset: usize,
1227 _depth: fidl::encoding::Depth,
1228 ) -> fidl::Result<()> {
1229 encoder.debug_check_bounds::<ClosedTargetByteVectorSizeResponse>(offset);
1230 unsafe {
1231 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1233 (buf_ptr as *mut ClosedTargetByteVectorSizeResponse)
1234 .write_unaligned((self as *const ClosedTargetByteVectorSizeResponse).read());
1235 }
1238 Ok(())
1239 }
1240 }
1241 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1242 fidl::encoding::Encode<ClosedTargetByteVectorSizeResponse, D> for (T0,)
1243 {
1244 #[inline]
1245 unsafe fn encode(
1246 self,
1247 encoder: &mut fidl::encoding::Encoder<'_, D>,
1248 offset: usize,
1249 depth: fidl::encoding::Depth,
1250 ) -> fidl::Result<()> {
1251 encoder.debug_check_bounds::<ClosedTargetByteVectorSizeResponse>(offset);
1252 self.0.encode(encoder, offset + 0, depth)?;
1256 Ok(())
1257 }
1258 }
1259
1260 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1261 for ClosedTargetByteVectorSizeResponse
1262 {
1263 #[inline(always)]
1264 fn new_empty() -> Self {
1265 Self { n: fidl::new_empty!(u32, D) }
1266 }
1267
1268 #[inline]
1269 unsafe fn decode(
1270 &mut self,
1271 decoder: &mut fidl::encoding::Decoder<'_, D>,
1272 offset: usize,
1273 _depth: fidl::encoding::Depth,
1274 ) -> fidl::Result<()> {
1275 decoder.debug_check_bounds::<Self>(offset);
1276 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1277 unsafe {
1280 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1281 }
1282 Ok(())
1283 }
1284 }
1285
1286 impl fidl::encoding::ValueTypeMarker for ClosedTargetCreateNByteVectorRequest {
1287 type Borrowed<'a> = &'a Self;
1288 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1289 value
1290 }
1291 }
1292
1293 unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNByteVectorRequest {
1294 type Owned = Self;
1295
1296 #[inline(always)]
1297 fn inline_align(_context: fidl::encoding::Context) -> usize {
1298 4
1299 }
1300
1301 #[inline(always)]
1302 fn inline_size(_context: fidl::encoding::Context) -> usize {
1303 4
1304 }
1305 #[inline(always)]
1306 fn encode_is_copy() -> bool {
1307 true
1308 }
1309
1310 #[inline(always)]
1311 fn decode_is_copy() -> bool {
1312 true
1313 }
1314 }
1315
1316 unsafe impl<D: fidl::encoding::ResourceDialect>
1317 fidl::encoding::Encode<ClosedTargetCreateNByteVectorRequest, D>
1318 for &ClosedTargetCreateNByteVectorRequest
1319 {
1320 #[inline]
1321 unsafe fn encode(
1322 self,
1323 encoder: &mut fidl::encoding::Encoder<'_, D>,
1324 offset: usize,
1325 _depth: fidl::encoding::Depth,
1326 ) -> fidl::Result<()> {
1327 encoder.debug_check_bounds::<ClosedTargetCreateNByteVectorRequest>(offset);
1328 unsafe {
1329 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1331 (buf_ptr as *mut ClosedTargetCreateNByteVectorRequest)
1332 .write_unaligned((self as *const ClosedTargetCreateNByteVectorRequest).read());
1333 }
1336 Ok(())
1337 }
1338 }
1339 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1340 fidl::encoding::Encode<ClosedTargetCreateNByteVectorRequest, D> for (T0,)
1341 {
1342 #[inline]
1343 unsafe fn encode(
1344 self,
1345 encoder: &mut fidl::encoding::Encoder<'_, D>,
1346 offset: usize,
1347 depth: fidl::encoding::Depth,
1348 ) -> fidl::Result<()> {
1349 encoder.debug_check_bounds::<ClosedTargetCreateNByteVectorRequest>(offset);
1350 self.0.encode(encoder, offset + 0, depth)?;
1354 Ok(())
1355 }
1356 }
1357
1358 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1359 for ClosedTargetCreateNByteVectorRequest
1360 {
1361 #[inline(always)]
1362 fn new_empty() -> Self {
1363 Self { n: fidl::new_empty!(u32, D) }
1364 }
1365
1366 #[inline]
1367 unsafe fn decode(
1368 &mut self,
1369 decoder: &mut fidl::encoding::Decoder<'_, D>,
1370 offset: usize,
1371 _depth: fidl::encoding::Depth,
1372 ) -> fidl::Result<()> {
1373 decoder.debug_check_bounds::<Self>(offset);
1374 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1375 unsafe {
1378 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1379 }
1380 Ok(())
1381 }
1382 }
1383
1384 impl fidl::encoding::ValueTypeMarker for ClosedTargetCreateNByteVectorResponse {
1385 type Borrowed<'a> = &'a Self;
1386 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1387 value
1388 }
1389 }
1390
1391 unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNByteVectorResponse {
1392 type Owned = Self;
1393
1394 #[inline(always)]
1395 fn inline_align(_context: fidl::encoding::Context) -> usize {
1396 8
1397 }
1398
1399 #[inline(always)]
1400 fn inline_size(_context: fidl::encoding::Context) -> usize {
1401 16
1402 }
1403 }
1404
1405 unsafe impl<D: fidl::encoding::ResourceDialect>
1406 fidl::encoding::Encode<ClosedTargetCreateNByteVectorResponse, D>
1407 for &ClosedTargetCreateNByteVectorResponse
1408 {
1409 #[inline]
1410 unsafe fn encode(
1411 self,
1412 encoder: &mut fidl::encoding::Encoder<'_, D>,
1413 offset: usize,
1414 _depth: fidl::encoding::Depth,
1415 ) -> fidl::Result<()> {
1416 encoder.debug_check_bounds::<ClosedTargetCreateNByteVectorResponse>(offset);
1417 fidl::encoding::Encode::<ClosedTargetCreateNByteVectorResponse, D>::encode(
1419 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1420 &self.vec,
1421 ),),
1422 encoder,
1423 offset,
1424 _depth,
1425 )
1426 }
1427 }
1428 unsafe impl<
1429 D: fidl::encoding::ResourceDialect,
1430 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1431 > fidl::encoding::Encode<ClosedTargetCreateNByteVectorResponse, D> for (T0,)
1432 {
1433 #[inline]
1434 unsafe fn encode(
1435 self,
1436 encoder: &mut fidl::encoding::Encoder<'_, D>,
1437 offset: usize,
1438 depth: fidl::encoding::Depth,
1439 ) -> fidl::Result<()> {
1440 encoder.debug_check_bounds::<ClosedTargetCreateNByteVectorResponse>(offset);
1441 self.0.encode(encoder, offset + 0, depth)?;
1445 Ok(())
1446 }
1447 }
1448
1449 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1450 for ClosedTargetCreateNByteVectorResponse
1451 {
1452 #[inline(always)]
1453 fn new_empty() -> Self {
1454 Self { vec: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1455 }
1456
1457 #[inline]
1458 unsafe fn decode(
1459 &mut self,
1460 decoder: &mut fidl::encoding::Decoder<'_, D>,
1461 offset: usize,
1462 _depth: fidl::encoding::Depth,
1463 ) -> fidl::Result<()> {
1464 decoder.debug_check_bounds::<Self>(offset);
1465 fidl::decode!(
1467 fidl::encoding::UnboundedVector<u8>,
1468 D,
1469 &mut self.vec,
1470 decoder,
1471 offset + 0,
1472 _depth
1473 )?;
1474 Ok(())
1475 }
1476 }
1477
1478 impl fidl::encoding::ValueTypeMarker for ClosedTargetGetHandleRightsResponse {
1479 type Borrowed<'a> = &'a Self;
1480 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1481 value
1482 }
1483 }
1484
1485 unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetHandleRightsResponse {
1486 type Owned = Self;
1487
1488 #[inline(always)]
1489 fn inline_align(_context: fidl::encoding::Context) -> usize {
1490 4
1491 }
1492
1493 #[inline(always)]
1494 fn inline_size(_context: fidl::encoding::Context) -> usize {
1495 4
1496 }
1497 }
1498
1499 unsafe impl<D: fidl::encoding::ResourceDialect>
1500 fidl::encoding::Encode<ClosedTargetGetHandleRightsResponse, D>
1501 for &ClosedTargetGetHandleRightsResponse
1502 {
1503 #[inline]
1504 unsafe fn encode(
1505 self,
1506 encoder: &mut fidl::encoding::Encoder<'_, D>,
1507 offset: usize,
1508 _depth: fidl::encoding::Depth,
1509 ) -> fidl::Result<()> {
1510 encoder.debug_check_bounds::<ClosedTargetGetHandleRightsResponse>(offset);
1511 fidl::encoding::Encode::<ClosedTargetGetHandleRightsResponse, D>::encode(
1513 (<fidl::Rights as fidl::encoding::ValueTypeMarker>::borrow(&self.rights),),
1514 encoder,
1515 offset,
1516 _depth,
1517 )
1518 }
1519 }
1520 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<fidl::Rights, D>>
1521 fidl::encoding::Encode<ClosedTargetGetHandleRightsResponse, D> for (T0,)
1522 {
1523 #[inline]
1524 unsafe fn encode(
1525 self,
1526 encoder: &mut fidl::encoding::Encoder<'_, D>,
1527 offset: usize,
1528 depth: fidl::encoding::Depth,
1529 ) -> fidl::Result<()> {
1530 encoder.debug_check_bounds::<ClosedTargetGetHandleRightsResponse>(offset);
1531 self.0.encode(encoder, offset + 0, depth)?;
1535 Ok(())
1536 }
1537 }
1538
1539 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1540 for ClosedTargetGetHandleRightsResponse
1541 {
1542 #[inline(always)]
1543 fn new_empty() -> Self {
1544 Self { rights: fidl::new_empty!(fidl::Rights, D) }
1545 }
1546
1547 #[inline]
1548 unsafe fn decode(
1549 &mut self,
1550 decoder: &mut fidl::encoding::Decoder<'_, D>,
1551 offset: usize,
1552 _depth: fidl::encoding::Depth,
1553 ) -> fidl::Result<()> {
1554 decoder.debug_check_bounds::<Self>(offset);
1555 fidl::decode!(fidl::Rights, D, &mut self.rights, decoder, offset + 0, _depth)?;
1557 Ok(())
1558 }
1559 }
1560
1561 impl fidl::encoding::ValueTypeMarker for ClosedTargetGetSignalableEventRightsResponse {
1562 type Borrowed<'a> = &'a Self;
1563 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1564 value
1565 }
1566 }
1567
1568 unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetSignalableEventRightsResponse {
1569 type Owned = Self;
1570
1571 #[inline(always)]
1572 fn inline_align(_context: fidl::encoding::Context) -> usize {
1573 4
1574 }
1575
1576 #[inline(always)]
1577 fn inline_size(_context: fidl::encoding::Context) -> usize {
1578 4
1579 }
1580 }
1581
1582 unsafe impl<D: fidl::encoding::ResourceDialect>
1583 fidl::encoding::Encode<ClosedTargetGetSignalableEventRightsResponse, D>
1584 for &ClosedTargetGetSignalableEventRightsResponse
1585 {
1586 #[inline]
1587 unsafe fn encode(
1588 self,
1589 encoder: &mut fidl::encoding::Encoder<'_, D>,
1590 offset: usize,
1591 _depth: fidl::encoding::Depth,
1592 ) -> fidl::Result<()> {
1593 encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsResponse>(offset);
1594 fidl::encoding::Encode::<ClosedTargetGetSignalableEventRightsResponse, D>::encode(
1596 (<fidl::Rights as fidl::encoding::ValueTypeMarker>::borrow(&self.rights),),
1597 encoder,
1598 offset,
1599 _depth,
1600 )
1601 }
1602 }
1603 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<fidl::Rights, D>>
1604 fidl::encoding::Encode<ClosedTargetGetSignalableEventRightsResponse, D> for (T0,)
1605 {
1606 #[inline]
1607 unsafe fn encode(
1608 self,
1609 encoder: &mut fidl::encoding::Encoder<'_, D>,
1610 offset: usize,
1611 depth: fidl::encoding::Depth,
1612 ) -> fidl::Result<()> {
1613 encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsResponse>(offset);
1614 self.0.encode(encoder, offset + 0, depth)?;
1618 Ok(())
1619 }
1620 }
1621
1622 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1623 for ClosedTargetGetSignalableEventRightsResponse
1624 {
1625 #[inline(always)]
1626 fn new_empty() -> Self {
1627 Self { rights: fidl::new_empty!(fidl::Rights, D) }
1628 }
1629
1630 #[inline]
1631 unsafe fn decode(
1632 &mut self,
1633 decoder: &mut fidl::encoding::Decoder<'_, D>,
1634 offset: usize,
1635 _depth: fidl::encoding::Depth,
1636 ) -> fidl::Result<()> {
1637 decoder.debug_check_bounds::<Self>(offset);
1638 fidl::decode!(fidl::Rights, D, &mut self.rights, decoder, offset + 0, _depth)?;
1640 Ok(())
1641 }
1642 }
1643
1644 impl fidl::encoding::ValueTypeMarker for ClosedTargetHandleVectorSizeResponse {
1645 type Borrowed<'a> = &'a Self;
1646 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1647 value
1648 }
1649 }
1650
1651 unsafe impl fidl::encoding::TypeMarker for ClosedTargetHandleVectorSizeResponse {
1652 type Owned = Self;
1653
1654 #[inline(always)]
1655 fn inline_align(_context: fidl::encoding::Context) -> usize {
1656 4
1657 }
1658
1659 #[inline(always)]
1660 fn inline_size(_context: fidl::encoding::Context) -> usize {
1661 4
1662 }
1663 #[inline(always)]
1664 fn encode_is_copy() -> bool {
1665 true
1666 }
1667
1668 #[inline(always)]
1669 fn decode_is_copy() -> bool {
1670 true
1671 }
1672 }
1673
1674 unsafe impl<D: fidl::encoding::ResourceDialect>
1675 fidl::encoding::Encode<ClosedTargetHandleVectorSizeResponse, D>
1676 for &ClosedTargetHandleVectorSizeResponse
1677 {
1678 #[inline]
1679 unsafe fn encode(
1680 self,
1681 encoder: &mut fidl::encoding::Encoder<'_, D>,
1682 offset: usize,
1683 _depth: fidl::encoding::Depth,
1684 ) -> fidl::Result<()> {
1685 encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeResponse>(offset);
1686 unsafe {
1687 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1689 (buf_ptr as *mut ClosedTargetHandleVectorSizeResponse)
1690 .write_unaligned((self as *const ClosedTargetHandleVectorSizeResponse).read());
1691 }
1694 Ok(())
1695 }
1696 }
1697 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1698 fidl::encoding::Encode<ClosedTargetHandleVectorSizeResponse, D> for (T0,)
1699 {
1700 #[inline]
1701 unsafe fn encode(
1702 self,
1703 encoder: &mut fidl::encoding::Encoder<'_, D>,
1704 offset: usize,
1705 depth: fidl::encoding::Depth,
1706 ) -> fidl::Result<()> {
1707 encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeResponse>(offset);
1708 self.0.encode(encoder, offset + 0, depth)?;
1712 Ok(())
1713 }
1714 }
1715
1716 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1717 for ClosedTargetHandleVectorSizeResponse
1718 {
1719 #[inline(always)]
1720 fn new_empty() -> Self {
1721 Self { n: fidl::new_empty!(u32, D) }
1722 }
1723
1724 #[inline]
1725 unsafe fn decode(
1726 &mut self,
1727 decoder: &mut fidl::encoding::Decoder<'_, D>,
1728 offset: usize,
1729 _depth: fidl::encoding::Depth,
1730 ) -> fidl::Result<()> {
1731 decoder.debug_check_bounds::<Self>(offset);
1732 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1733 unsafe {
1736 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1737 }
1738 Ok(())
1739 }
1740 }
1741
1742 impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayStructPayloadRequest {
1743 type Borrowed<'a> = &'a Self;
1744 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1745 value
1746 }
1747 }
1748
1749 unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayStructPayloadRequest {
1750 type Owned = Self;
1751
1752 #[inline(always)]
1753 fn inline_align(_context: fidl::encoding::Context) -> usize {
1754 1
1755 }
1756
1757 #[inline(always)]
1758 fn inline_size(_context: fidl::encoding::Context) -> usize {
1759 1
1760 }
1761 #[inline(always)]
1762 fn encode_is_copy() -> bool {
1763 true
1764 }
1765
1766 #[inline(always)]
1767 fn decode_is_copy() -> bool {
1768 true
1769 }
1770 }
1771
1772 unsafe impl<D: fidl::encoding::ResourceDialect>
1773 fidl::encoding::Encode<ClosedTargetTwoWayStructPayloadRequest, D>
1774 for &ClosedTargetTwoWayStructPayloadRequest
1775 {
1776 #[inline]
1777 unsafe fn encode(
1778 self,
1779 encoder: &mut fidl::encoding::Encoder<'_, D>,
1780 offset: usize,
1781 _depth: fidl::encoding::Depth,
1782 ) -> fidl::Result<()> {
1783 encoder.debug_check_bounds::<ClosedTargetTwoWayStructPayloadRequest>(offset);
1784 unsafe {
1785 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1787 (buf_ptr as *mut ClosedTargetTwoWayStructPayloadRequest).write_unaligned(
1788 (self as *const ClosedTargetTwoWayStructPayloadRequest).read(),
1789 );
1790 }
1793 Ok(())
1794 }
1795 }
1796 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
1797 fidl::encoding::Encode<ClosedTargetTwoWayStructPayloadRequest, D> for (T0,)
1798 {
1799 #[inline]
1800 unsafe fn encode(
1801 self,
1802 encoder: &mut fidl::encoding::Encoder<'_, D>,
1803 offset: usize,
1804 depth: fidl::encoding::Depth,
1805 ) -> fidl::Result<()> {
1806 encoder.debug_check_bounds::<ClosedTargetTwoWayStructPayloadRequest>(offset);
1807 self.0.encode(encoder, offset + 0, depth)?;
1811 Ok(())
1812 }
1813 }
1814
1815 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1816 for ClosedTargetTwoWayStructPayloadRequest
1817 {
1818 #[inline(always)]
1819 fn new_empty() -> Self {
1820 Self { v: fidl::new_empty!(i8, D) }
1821 }
1822
1823 #[inline]
1824 unsafe fn decode(
1825 &mut self,
1826 decoder: &mut fidl::encoding::Decoder<'_, D>,
1827 offset: usize,
1828 _depth: fidl::encoding::Depth,
1829 ) -> fidl::Result<()> {
1830 decoder.debug_check_bounds::<Self>(offset);
1831 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1832 unsafe {
1835 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
1836 }
1837 Ok(())
1838 }
1839 }
1840
1841 impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayStructPayloadResponse {
1842 type Borrowed<'a> = &'a Self;
1843 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1844 value
1845 }
1846 }
1847
1848 unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayStructPayloadResponse {
1849 type Owned = Self;
1850
1851 #[inline(always)]
1852 fn inline_align(_context: fidl::encoding::Context) -> usize {
1853 1
1854 }
1855
1856 #[inline(always)]
1857 fn inline_size(_context: fidl::encoding::Context) -> usize {
1858 1
1859 }
1860 #[inline(always)]
1861 fn encode_is_copy() -> bool {
1862 true
1863 }
1864
1865 #[inline(always)]
1866 fn decode_is_copy() -> bool {
1867 true
1868 }
1869 }
1870
1871 unsafe impl<D: fidl::encoding::ResourceDialect>
1872 fidl::encoding::Encode<ClosedTargetTwoWayStructPayloadResponse, D>
1873 for &ClosedTargetTwoWayStructPayloadResponse
1874 {
1875 #[inline]
1876 unsafe fn encode(
1877 self,
1878 encoder: &mut fidl::encoding::Encoder<'_, D>,
1879 offset: usize,
1880 _depth: fidl::encoding::Depth,
1881 ) -> fidl::Result<()> {
1882 encoder.debug_check_bounds::<ClosedTargetTwoWayStructPayloadResponse>(offset);
1883 unsafe {
1884 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1886 (buf_ptr as *mut ClosedTargetTwoWayStructPayloadResponse).write_unaligned(
1887 (self as *const ClosedTargetTwoWayStructPayloadResponse).read(),
1888 );
1889 }
1892 Ok(())
1893 }
1894 }
1895 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
1896 fidl::encoding::Encode<ClosedTargetTwoWayStructPayloadResponse, D> for (T0,)
1897 {
1898 #[inline]
1899 unsafe fn encode(
1900 self,
1901 encoder: &mut fidl::encoding::Encoder<'_, D>,
1902 offset: usize,
1903 depth: fidl::encoding::Depth,
1904 ) -> fidl::Result<()> {
1905 encoder.debug_check_bounds::<ClosedTargetTwoWayStructPayloadResponse>(offset);
1906 self.0.encode(encoder, offset + 0, depth)?;
1910 Ok(())
1911 }
1912 }
1913
1914 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1915 for ClosedTargetTwoWayStructPayloadResponse
1916 {
1917 #[inline(always)]
1918 fn new_empty() -> Self {
1919 Self { v: fidl::new_empty!(i8, D) }
1920 }
1921
1922 #[inline]
1923 unsafe fn decode(
1924 &mut self,
1925 decoder: &mut fidl::encoding::Decoder<'_, D>,
1926 offset: usize,
1927 _depth: fidl::encoding::Depth,
1928 ) -> fidl::Result<()> {
1929 decoder.debug_check_bounds::<Self>(offset);
1930 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1931 unsafe {
1934 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
1935 }
1936 Ok(())
1937 }
1938 }
1939
1940 impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayResultResponse {
1941 type Borrowed<'a> = &'a Self;
1942 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1943 value
1944 }
1945 }
1946
1947 unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayResultResponse {
1948 type Owned = Self;
1949
1950 #[inline(always)]
1951 fn inline_align(_context: fidl::encoding::Context) -> usize {
1952 8
1953 }
1954
1955 #[inline(always)]
1956 fn inline_size(_context: fidl::encoding::Context) -> usize {
1957 16
1958 }
1959 }
1960
1961 unsafe impl<D: fidl::encoding::ResourceDialect>
1962 fidl::encoding::Encode<ClosedTargetTwoWayResultResponse, D>
1963 for &ClosedTargetTwoWayResultResponse
1964 {
1965 #[inline]
1966 unsafe fn encode(
1967 self,
1968 encoder: &mut fidl::encoding::Encoder<'_, D>,
1969 offset: usize,
1970 _depth: fidl::encoding::Depth,
1971 ) -> fidl::Result<()> {
1972 encoder.debug_check_bounds::<ClosedTargetTwoWayResultResponse>(offset);
1973 fidl::encoding::Encode::<ClosedTargetTwoWayResultResponse, D>::encode(
1975 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1976 &self.payload,
1977 ),),
1978 encoder,
1979 offset,
1980 _depth,
1981 )
1982 }
1983 }
1984 unsafe impl<
1985 D: fidl::encoding::ResourceDialect,
1986 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1987 > fidl::encoding::Encode<ClosedTargetTwoWayResultResponse, D> for (T0,)
1988 {
1989 #[inline]
1990 unsafe fn encode(
1991 self,
1992 encoder: &mut fidl::encoding::Encoder<'_, D>,
1993 offset: usize,
1994 depth: fidl::encoding::Depth,
1995 ) -> fidl::Result<()> {
1996 encoder.debug_check_bounds::<ClosedTargetTwoWayResultResponse>(offset);
1997 self.0.encode(encoder, offset + 0, depth)?;
2001 Ok(())
2002 }
2003 }
2004
2005 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2006 for ClosedTargetTwoWayResultResponse
2007 {
2008 #[inline(always)]
2009 fn new_empty() -> Self {
2010 Self { payload: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
2011 }
2012
2013 #[inline]
2014 unsafe fn decode(
2015 &mut self,
2016 decoder: &mut fidl::encoding::Decoder<'_, D>,
2017 offset: usize,
2018 _depth: fidl::encoding::Depth,
2019 ) -> fidl::Result<()> {
2020 decoder.debug_check_bounds::<Self>(offset);
2021 fidl::decode!(
2023 fidl::encoding::UnboundedString,
2024 D,
2025 &mut self.payload,
2026 decoder,
2027 offset + 0,
2028 _depth
2029 )?;
2030 Ok(())
2031 }
2032 }
2033
2034 impl fidl::encoding::ValueTypeMarker for Empty {
2035 type Borrowed<'a> = &'a Self;
2036 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2037 value
2038 }
2039 }
2040
2041 unsafe impl fidl::encoding::TypeMarker for Empty {
2042 type Owned = Self;
2043
2044 #[inline(always)]
2045 fn inline_align(_context: fidl::encoding::Context) -> usize {
2046 1
2047 }
2048
2049 #[inline(always)]
2050 fn inline_size(_context: fidl::encoding::Context) -> usize {
2051 1
2052 }
2053 }
2054
2055 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
2056 #[inline]
2057 unsafe fn encode(
2058 self,
2059 encoder: &mut fidl::encoding::Encoder<'_, D>,
2060 offset: usize,
2061 _depth: fidl::encoding::Depth,
2062 ) -> fidl::Result<()> {
2063 encoder.debug_check_bounds::<Empty>(offset);
2064 encoder.write_num(0u8, offset);
2065 Ok(())
2066 }
2067 }
2068
2069 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
2070 #[inline(always)]
2071 fn new_empty() -> Self {
2072 Self
2073 }
2074
2075 #[inline]
2076 unsafe fn decode(
2077 &mut self,
2078 decoder: &mut fidl::encoding::Decoder<'_, D>,
2079 offset: usize,
2080 _depth: fidl::encoding::Depth,
2081 ) -> fidl::Result<()> {
2082 decoder.debug_check_bounds::<Self>(offset);
2083 match decoder.read_num::<u8>(offset) {
2084 0 => Ok(()),
2085 _ => Err(fidl::Error::Invalid),
2086 }
2087 }
2088 }
2089
2090 impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayFieldsRequest {
2091 type Borrowed<'a> = &'a Self;
2092 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2093 value
2094 }
2095 }
2096
2097 unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayFieldsRequest {
2098 type Owned = Self;
2099
2100 #[inline(always)]
2101 fn inline_align(_context: fidl::encoding::Context) -> usize {
2102 4
2103 }
2104
2105 #[inline(always)]
2106 fn inline_size(_context: fidl::encoding::Context) -> usize {
2107 4
2108 }
2109 #[inline(always)]
2110 fn encode_is_copy() -> bool {
2111 true
2112 }
2113
2114 #[inline(always)]
2115 fn decode_is_copy() -> bool {
2116 true
2117 }
2118 }
2119
2120 unsafe impl<D: fidl::encoding::ResourceDialect>
2121 fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsRequest, D>
2122 for &OpenTargetFlexibleTwoWayFieldsRequest
2123 {
2124 #[inline]
2125 unsafe fn encode(
2126 self,
2127 encoder: &mut fidl::encoding::Encoder<'_, D>,
2128 offset: usize,
2129 _depth: fidl::encoding::Depth,
2130 ) -> fidl::Result<()> {
2131 encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsRequest>(offset);
2132 unsafe {
2133 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2135 (buf_ptr as *mut OpenTargetFlexibleTwoWayFieldsRequest)
2136 .write_unaligned((self as *const OpenTargetFlexibleTwoWayFieldsRequest).read());
2137 }
2140 Ok(())
2141 }
2142 }
2143 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2144 fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsRequest, D> for (T0,)
2145 {
2146 #[inline]
2147 unsafe fn encode(
2148 self,
2149 encoder: &mut fidl::encoding::Encoder<'_, D>,
2150 offset: usize,
2151 depth: fidl::encoding::Depth,
2152 ) -> fidl::Result<()> {
2153 encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsRequest>(offset);
2154 self.0.encode(encoder, offset + 0, depth)?;
2158 Ok(())
2159 }
2160 }
2161
2162 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2163 for OpenTargetFlexibleTwoWayFieldsRequest
2164 {
2165 #[inline(always)]
2166 fn new_empty() -> Self {
2167 Self { reply_with: fidl::new_empty!(i32, D) }
2168 }
2169
2170 #[inline]
2171 unsafe fn decode(
2172 &mut self,
2173 decoder: &mut fidl::encoding::Decoder<'_, D>,
2174 offset: usize,
2175 _depth: fidl::encoding::Depth,
2176 ) -> fidl::Result<()> {
2177 decoder.debug_check_bounds::<Self>(offset);
2178 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2179 unsafe {
2182 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2183 }
2184 Ok(())
2185 }
2186 }
2187
2188 impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayFieldsRequest {
2189 type Borrowed<'a> = &'a Self;
2190 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2191 value
2192 }
2193 }
2194
2195 unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayFieldsRequest {
2196 type Owned = Self;
2197
2198 #[inline(always)]
2199 fn inline_align(_context: fidl::encoding::Context) -> usize {
2200 4
2201 }
2202
2203 #[inline(always)]
2204 fn inline_size(_context: fidl::encoding::Context) -> usize {
2205 4
2206 }
2207 #[inline(always)]
2208 fn encode_is_copy() -> bool {
2209 true
2210 }
2211
2212 #[inline(always)]
2213 fn decode_is_copy() -> bool {
2214 true
2215 }
2216 }
2217
2218 unsafe impl<D: fidl::encoding::ResourceDialect>
2219 fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsRequest, D>
2220 for &OpenTargetStrictTwoWayFieldsRequest
2221 {
2222 #[inline]
2223 unsafe fn encode(
2224 self,
2225 encoder: &mut fidl::encoding::Encoder<'_, D>,
2226 offset: usize,
2227 _depth: fidl::encoding::Depth,
2228 ) -> fidl::Result<()> {
2229 encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsRequest>(offset);
2230 unsafe {
2231 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2233 (buf_ptr as *mut OpenTargetStrictTwoWayFieldsRequest)
2234 .write_unaligned((self as *const OpenTargetStrictTwoWayFieldsRequest).read());
2235 }
2238 Ok(())
2239 }
2240 }
2241 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2242 fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsRequest, D> for (T0,)
2243 {
2244 #[inline]
2245 unsafe fn encode(
2246 self,
2247 encoder: &mut fidl::encoding::Encoder<'_, D>,
2248 offset: usize,
2249 depth: fidl::encoding::Depth,
2250 ) -> fidl::Result<()> {
2251 encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsRequest>(offset);
2252 self.0.encode(encoder, offset + 0, depth)?;
2256 Ok(())
2257 }
2258 }
2259
2260 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2261 for OpenTargetStrictTwoWayFieldsRequest
2262 {
2263 #[inline(always)]
2264 fn new_empty() -> Self {
2265 Self { reply_with: fidl::new_empty!(i32, D) }
2266 }
2267
2268 #[inline]
2269 unsafe fn decode(
2270 &mut self,
2271 decoder: &mut fidl::encoding::Decoder<'_, D>,
2272 offset: usize,
2273 _depth: fidl::encoding::Depth,
2274 ) -> fidl::Result<()> {
2275 decoder.debug_check_bounds::<Self>(offset);
2276 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2277 unsafe {
2280 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2281 }
2282 Ok(())
2283 }
2284 }
2285
2286 impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayFieldsResponse {
2287 type Borrowed<'a> = &'a Self;
2288 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2289 value
2290 }
2291 }
2292
2293 unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayFieldsResponse {
2294 type Owned = Self;
2295
2296 #[inline(always)]
2297 fn inline_align(_context: fidl::encoding::Context) -> usize {
2298 4
2299 }
2300
2301 #[inline(always)]
2302 fn inline_size(_context: fidl::encoding::Context) -> usize {
2303 4
2304 }
2305 #[inline(always)]
2306 fn encode_is_copy() -> bool {
2307 true
2308 }
2309
2310 #[inline(always)]
2311 fn decode_is_copy() -> bool {
2312 true
2313 }
2314 }
2315
2316 unsafe impl<D: fidl::encoding::ResourceDialect>
2317 fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsResponse, D>
2318 for &OpenTargetStrictTwoWayFieldsResponse
2319 {
2320 #[inline]
2321 unsafe fn encode(
2322 self,
2323 encoder: &mut fidl::encoding::Encoder<'_, D>,
2324 offset: usize,
2325 _depth: fidl::encoding::Depth,
2326 ) -> fidl::Result<()> {
2327 encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsResponse>(offset);
2328 unsafe {
2329 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2331 (buf_ptr as *mut OpenTargetStrictTwoWayFieldsResponse)
2332 .write_unaligned((self as *const OpenTargetStrictTwoWayFieldsResponse).read());
2333 }
2336 Ok(())
2337 }
2338 }
2339 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2340 fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsResponse, D> for (T0,)
2341 {
2342 #[inline]
2343 unsafe fn encode(
2344 self,
2345 encoder: &mut fidl::encoding::Encoder<'_, D>,
2346 offset: usize,
2347 depth: fidl::encoding::Depth,
2348 ) -> fidl::Result<()> {
2349 encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsResponse>(offset);
2350 self.0.encode(encoder, offset + 0, depth)?;
2354 Ok(())
2355 }
2356 }
2357
2358 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2359 for OpenTargetStrictTwoWayFieldsResponse
2360 {
2361 #[inline(always)]
2362 fn new_empty() -> Self {
2363 Self { some_field: fidl::new_empty!(i32, D) }
2364 }
2365
2366 #[inline]
2367 unsafe fn decode(
2368 &mut self,
2369 decoder: &mut fidl::encoding::Decoder<'_, D>,
2370 offset: usize,
2371 _depth: fidl::encoding::Depth,
2372 ) -> fidl::Result<()> {
2373 decoder.debug_check_bounds::<Self>(offset);
2374 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2375 unsafe {
2378 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2379 }
2380 Ok(())
2381 }
2382 }
2383
2384 impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayFieldsErrResponse {
2385 type Borrowed<'a> = &'a Self;
2386 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2387 value
2388 }
2389 }
2390
2391 unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayFieldsErrResponse {
2392 type Owned = Self;
2393
2394 #[inline(always)]
2395 fn inline_align(_context: fidl::encoding::Context) -> usize {
2396 4
2397 }
2398
2399 #[inline(always)]
2400 fn inline_size(_context: fidl::encoding::Context) -> usize {
2401 4
2402 }
2403 #[inline(always)]
2404 fn encode_is_copy() -> bool {
2405 true
2406 }
2407
2408 #[inline(always)]
2409 fn decode_is_copy() -> bool {
2410 true
2411 }
2412 }
2413
2414 unsafe impl<D: fidl::encoding::ResourceDialect>
2415 fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsErrResponse, D>
2416 for &OpenTargetFlexibleTwoWayFieldsErrResponse
2417 {
2418 #[inline]
2419 unsafe fn encode(
2420 self,
2421 encoder: &mut fidl::encoding::Encoder<'_, D>,
2422 offset: usize,
2423 _depth: fidl::encoding::Depth,
2424 ) -> fidl::Result<()> {
2425 encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsErrResponse>(offset);
2426 unsafe {
2427 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2429 (buf_ptr as *mut OpenTargetFlexibleTwoWayFieldsErrResponse).write_unaligned(
2430 (self as *const OpenTargetFlexibleTwoWayFieldsErrResponse).read(),
2431 );
2432 }
2435 Ok(())
2436 }
2437 }
2438 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2439 fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsErrResponse, D> for (T0,)
2440 {
2441 #[inline]
2442 unsafe fn encode(
2443 self,
2444 encoder: &mut fidl::encoding::Encoder<'_, D>,
2445 offset: usize,
2446 depth: fidl::encoding::Depth,
2447 ) -> fidl::Result<()> {
2448 encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsErrResponse>(offset);
2449 self.0.encode(encoder, offset + 0, depth)?;
2453 Ok(())
2454 }
2455 }
2456
2457 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2458 for OpenTargetFlexibleTwoWayFieldsErrResponse
2459 {
2460 #[inline(always)]
2461 fn new_empty() -> Self {
2462 Self { some_field: fidl::new_empty!(i32, D) }
2463 }
2464
2465 #[inline]
2466 unsafe fn decode(
2467 &mut self,
2468 decoder: &mut fidl::encoding::Decoder<'_, D>,
2469 offset: usize,
2470 _depth: fidl::encoding::Depth,
2471 ) -> fidl::Result<()> {
2472 decoder.debug_check_bounds::<Self>(offset);
2473 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2474 unsafe {
2477 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2478 }
2479 Ok(())
2480 }
2481 }
2482
2483 impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayFieldsResponse {
2484 type Borrowed<'a> = &'a Self;
2485 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2486 value
2487 }
2488 }
2489
2490 unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayFieldsResponse {
2491 type Owned = Self;
2492
2493 #[inline(always)]
2494 fn inline_align(_context: fidl::encoding::Context) -> usize {
2495 4
2496 }
2497
2498 #[inline(always)]
2499 fn inline_size(_context: fidl::encoding::Context) -> usize {
2500 4
2501 }
2502 #[inline(always)]
2503 fn encode_is_copy() -> bool {
2504 true
2505 }
2506
2507 #[inline(always)]
2508 fn decode_is_copy() -> bool {
2509 true
2510 }
2511 }
2512
2513 unsafe impl<D: fidl::encoding::ResourceDialect>
2514 fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsResponse, D>
2515 for &OpenTargetFlexibleTwoWayFieldsResponse
2516 {
2517 #[inline]
2518 unsafe fn encode(
2519 self,
2520 encoder: &mut fidl::encoding::Encoder<'_, D>,
2521 offset: usize,
2522 _depth: fidl::encoding::Depth,
2523 ) -> fidl::Result<()> {
2524 encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsResponse>(offset);
2525 unsafe {
2526 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2528 (buf_ptr as *mut OpenTargetFlexibleTwoWayFieldsResponse).write_unaligned(
2529 (self as *const OpenTargetFlexibleTwoWayFieldsResponse).read(),
2530 );
2531 }
2534 Ok(())
2535 }
2536 }
2537 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2538 fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsResponse, D> for (T0,)
2539 {
2540 #[inline]
2541 unsafe fn encode(
2542 self,
2543 encoder: &mut fidl::encoding::Encoder<'_, D>,
2544 offset: usize,
2545 depth: fidl::encoding::Depth,
2546 ) -> fidl::Result<()> {
2547 encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsResponse>(offset);
2548 self.0.encode(encoder, offset + 0, depth)?;
2552 Ok(())
2553 }
2554 }
2555
2556 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2557 for OpenTargetFlexibleTwoWayFieldsResponse
2558 {
2559 #[inline(always)]
2560 fn new_empty() -> Self {
2561 Self { some_field: fidl::new_empty!(i32, D) }
2562 }
2563
2564 #[inline]
2565 unsafe fn decode(
2566 &mut self,
2567 decoder: &mut fidl::encoding::Decoder<'_, D>,
2568 offset: usize,
2569 _depth: fidl::encoding::Depth,
2570 ) -> fidl::Result<()> {
2571 decoder.debug_check_bounds::<Self>(offset);
2572 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2573 unsafe {
2576 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2577 }
2578 Ok(())
2579 }
2580 }
2581
2582 impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayFieldsErrResponse {
2583 type Borrowed<'a> = &'a Self;
2584 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2585 value
2586 }
2587 }
2588
2589 unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayFieldsErrResponse {
2590 type Owned = Self;
2591
2592 #[inline(always)]
2593 fn inline_align(_context: fidl::encoding::Context) -> usize {
2594 4
2595 }
2596
2597 #[inline(always)]
2598 fn inline_size(_context: fidl::encoding::Context) -> usize {
2599 4
2600 }
2601 #[inline(always)]
2602 fn encode_is_copy() -> bool {
2603 true
2604 }
2605
2606 #[inline(always)]
2607 fn decode_is_copy() -> bool {
2608 true
2609 }
2610 }
2611
2612 unsafe impl<D: fidl::encoding::ResourceDialect>
2613 fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsErrResponse, D>
2614 for &OpenTargetStrictTwoWayFieldsErrResponse
2615 {
2616 #[inline]
2617 unsafe fn encode(
2618 self,
2619 encoder: &mut fidl::encoding::Encoder<'_, D>,
2620 offset: usize,
2621 _depth: fidl::encoding::Depth,
2622 ) -> fidl::Result<()> {
2623 encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsErrResponse>(offset);
2624 unsafe {
2625 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2627 (buf_ptr as *mut OpenTargetStrictTwoWayFieldsErrResponse).write_unaligned(
2628 (self as *const OpenTargetStrictTwoWayFieldsErrResponse).read(),
2629 );
2630 }
2633 Ok(())
2634 }
2635 }
2636 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2637 fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsErrResponse, D> for (T0,)
2638 {
2639 #[inline]
2640 unsafe fn encode(
2641 self,
2642 encoder: &mut fidl::encoding::Encoder<'_, D>,
2643 offset: usize,
2644 depth: fidl::encoding::Depth,
2645 ) -> fidl::Result<()> {
2646 encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsErrResponse>(offset);
2647 self.0.encode(encoder, offset + 0, depth)?;
2651 Ok(())
2652 }
2653 }
2654
2655 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2656 for OpenTargetStrictTwoWayFieldsErrResponse
2657 {
2658 #[inline(always)]
2659 fn new_empty() -> Self {
2660 Self { some_field: fidl::new_empty!(i32, D) }
2661 }
2662
2663 #[inline]
2664 unsafe fn decode(
2665 &mut self,
2666 decoder: &mut fidl::encoding::Decoder<'_, D>,
2667 offset: usize,
2668 _depth: fidl::encoding::Depth,
2669 ) -> fidl::Result<()> {
2670 decoder.debug_check_bounds::<Self>(offset);
2671 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2672 unsafe {
2675 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2676 }
2677 Ok(())
2678 }
2679 }
2680
2681 impl fidl::encoding::ValueTypeMarker for RunnerGetVersionResponse {
2682 type Borrowed<'a> = &'a Self;
2683 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2684 value
2685 }
2686 }
2687
2688 unsafe impl fidl::encoding::TypeMarker for RunnerGetVersionResponse {
2689 type Owned = Self;
2690
2691 #[inline(always)]
2692 fn inline_align(_context: fidl::encoding::Context) -> usize {
2693 8
2694 }
2695
2696 #[inline(always)]
2697 fn inline_size(_context: fidl::encoding::Context) -> usize {
2698 8
2699 }
2700 #[inline(always)]
2701 fn encode_is_copy() -> bool {
2702 true
2703 }
2704
2705 #[inline(always)]
2706 fn decode_is_copy() -> bool {
2707 true
2708 }
2709 }
2710
2711 unsafe impl<D: fidl::encoding::ResourceDialect>
2712 fidl::encoding::Encode<RunnerGetVersionResponse, D> for &RunnerGetVersionResponse
2713 {
2714 #[inline]
2715 unsafe fn encode(
2716 self,
2717 encoder: &mut fidl::encoding::Encoder<'_, D>,
2718 offset: usize,
2719 _depth: fidl::encoding::Depth,
2720 ) -> fidl::Result<()> {
2721 encoder.debug_check_bounds::<RunnerGetVersionResponse>(offset);
2722 unsafe {
2723 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2725 (buf_ptr as *mut RunnerGetVersionResponse)
2726 .write_unaligned((self as *const RunnerGetVersionResponse).read());
2727 }
2730 Ok(())
2731 }
2732 }
2733 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2734 fidl::encoding::Encode<RunnerGetVersionResponse, D> for (T0,)
2735 {
2736 #[inline]
2737 unsafe fn encode(
2738 self,
2739 encoder: &mut fidl::encoding::Encoder<'_, D>,
2740 offset: usize,
2741 depth: fidl::encoding::Depth,
2742 ) -> fidl::Result<()> {
2743 encoder.debug_check_bounds::<RunnerGetVersionResponse>(offset);
2744 self.0.encode(encoder, offset + 0, depth)?;
2748 Ok(())
2749 }
2750 }
2751
2752 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2753 for RunnerGetVersionResponse
2754 {
2755 #[inline(always)]
2756 fn new_empty() -> Self {
2757 Self { version: fidl::new_empty!(u64, D) }
2758 }
2759
2760 #[inline]
2761 unsafe fn decode(
2762 &mut self,
2763 decoder: &mut fidl::encoding::Decoder<'_, D>,
2764 offset: usize,
2765 _depth: fidl::encoding::Depth,
2766 ) -> fidl::Result<()> {
2767 decoder.debug_check_bounds::<Self>(offset);
2768 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2769 unsafe {
2772 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2773 }
2774 Ok(())
2775 }
2776 }
2777
2778 impl fidl::encoding::ValueTypeMarker for RunnerOnTeardownRequest {
2779 type Borrowed<'a> = &'a Self;
2780 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2781 value
2782 }
2783 }
2784
2785 unsafe impl fidl::encoding::TypeMarker for RunnerOnTeardownRequest {
2786 type Owned = Self;
2787
2788 #[inline(always)]
2789 fn inline_align(_context: fidl::encoding::Context) -> usize {
2790 4
2791 }
2792
2793 #[inline(always)]
2794 fn inline_size(_context: fidl::encoding::Context) -> usize {
2795 4
2796 }
2797 }
2798
2799 unsafe impl<D: fidl::encoding::ResourceDialect>
2800 fidl::encoding::Encode<RunnerOnTeardownRequest, D> for &RunnerOnTeardownRequest
2801 {
2802 #[inline]
2803 unsafe fn encode(
2804 self,
2805 encoder: &mut fidl::encoding::Encoder<'_, D>,
2806 offset: usize,
2807 _depth: fidl::encoding::Depth,
2808 ) -> fidl::Result<()> {
2809 encoder.debug_check_bounds::<RunnerOnTeardownRequest>(offset);
2810 fidl::encoding::Encode::<RunnerOnTeardownRequest, D>::encode(
2812 (<TeardownReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
2813 encoder,
2814 offset,
2815 _depth,
2816 )
2817 }
2818 }
2819 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TeardownReason, D>>
2820 fidl::encoding::Encode<RunnerOnTeardownRequest, D> for (T0,)
2821 {
2822 #[inline]
2823 unsafe fn encode(
2824 self,
2825 encoder: &mut fidl::encoding::Encoder<'_, D>,
2826 offset: usize,
2827 depth: fidl::encoding::Depth,
2828 ) -> fidl::Result<()> {
2829 encoder.debug_check_bounds::<RunnerOnTeardownRequest>(offset);
2830 self.0.encode(encoder, offset + 0, depth)?;
2834 Ok(())
2835 }
2836 }
2837
2838 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2839 for RunnerOnTeardownRequest
2840 {
2841 #[inline(always)]
2842 fn new_empty() -> Self {
2843 Self { reason: fidl::new_empty!(TeardownReason, D) }
2844 }
2845
2846 #[inline]
2847 unsafe fn decode(
2848 &mut self,
2849 decoder: &mut fidl::encoding::Decoder<'_, D>,
2850 offset: usize,
2851 _depth: fidl::encoding::Depth,
2852 ) -> fidl::Result<()> {
2853 decoder.debug_check_bounds::<Self>(offset);
2854 fidl::decode!(TeardownReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
2856 Ok(())
2857 }
2858 }
2859
2860 impl fidl::encoding::ValueTypeMarker for RunnerShutdownWithEpitaphRequest {
2861 type Borrowed<'a> = &'a Self;
2862 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2863 value
2864 }
2865 }
2866
2867 unsafe impl fidl::encoding::TypeMarker for RunnerShutdownWithEpitaphRequest {
2868 type Owned = Self;
2869
2870 #[inline(always)]
2871 fn inline_align(_context: fidl::encoding::Context) -> usize {
2872 4
2873 }
2874
2875 #[inline(always)]
2876 fn inline_size(_context: fidl::encoding::Context) -> usize {
2877 4
2878 }
2879 #[inline(always)]
2880 fn encode_is_copy() -> bool {
2881 true
2882 }
2883
2884 #[inline(always)]
2885 fn decode_is_copy() -> bool {
2886 true
2887 }
2888 }
2889
2890 unsafe impl<D: fidl::encoding::ResourceDialect>
2891 fidl::encoding::Encode<RunnerShutdownWithEpitaphRequest, D>
2892 for &RunnerShutdownWithEpitaphRequest
2893 {
2894 #[inline]
2895 unsafe fn encode(
2896 self,
2897 encoder: &mut fidl::encoding::Encoder<'_, D>,
2898 offset: usize,
2899 _depth: fidl::encoding::Depth,
2900 ) -> fidl::Result<()> {
2901 encoder.debug_check_bounds::<RunnerShutdownWithEpitaphRequest>(offset);
2902 unsafe {
2903 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2905 (buf_ptr as *mut RunnerShutdownWithEpitaphRequest)
2906 .write_unaligned((self as *const RunnerShutdownWithEpitaphRequest).read());
2907 }
2910 Ok(())
2911 }
2912 }
2913 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2914 fidl::encoding::Encode<RunnerShutdownWithEpitaphRequest, D> for (T0,)
2915 {
2916 #[inline]
2917 unsafe fn encode(
2918 self,
2919 encoder: &mut fidl::encoding::Encoder<'_, D>,
2920 offset: usize,
2921 depth: fidl::encoding::Depth,
2922 ) -> fidl::Result<()> {
2923 encoder.debug_check_bounds::<RunnerShutdownWithEpitaphRequest>(offset);
2924 self.0.encode(encoder, offset + 0, depth)?;
2928 Ok(())
2929 }
2930 }
2931
2932 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2933 for RunnerShutdownWithEpitaphRequest
2934 {
2935 #[inline(always)]
2936 fn new_empty() -> Self {
2937 Self { epitaph_status: fidl::new_empty!(i32, D) }
2938 }
2939
2940 #[inline]
2941 unsafe fn decode(
2942 &mut self,
2943 decoder: &mut fidl::encoding::Decoder<'_, D>,
2944 offset: usize,
2945 _depth: fidl::encoding::Depth,
2946 ) -> fidl::Result<()> {
2947 decoder.debug_check_bounds::<Self>(offset);
2948 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2949 unsafe {
2952 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2953 }
2954 Ok(())
2955 }
2956 }
2957
2958 impl fidl::encoding::ValueTypeMarker for UnknownMethodInfo {
2959 type Borrowed<'a> = &'a Self;
2960 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2961 value
2962 }
2963 }
2964
2965 unsafe impl fidl::encoding::TypeMarker for UnknownMethodInfo {
2966 type Owned = Self;
2967
2968 #[inline(always)]
2969 fn inline_align(_context: fidl::encoding::Context) -> usize {
2970 8
2971 }
2972
2973 #[inline(always)]
2974 fn inline_size(_context: fidl::encoding::Context) -> usize {
2975 16
2976 }
2977 }
2978
2979 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnknownMethodInfo, D>
2980 for &UnknownMethodInfo
2981 {
2982 #[inline]
2983 unsafe fn encode(
2984 self,
2985 encoder: &mut fidl::encoding::Encoder<'_, D>,
2986 offset: usize,
2987 _depth: fidl::encoding::Depth,
2988 ) -> fidl::Result<()> {
2989 encoder.debug_check_bounds::<UnknownMethodInfo>(offset);
2990 fidl::encoding::Encode::<UnknownMethodInfo, D>::encode(
2992 (
2993 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.ordinal),
2994 <UnknownMethodType as fidl::encoding::ValueTypeMarker>::borrow(
2995 &self.unknown_method_type,
2996 ),
2997 ),
2998 encoder,
2999 offset,
3000 _depth,
3001 )
3002 }
3003 }
3004 unsafe impl<
3005 D: fidl::encoding::ResourceDialect,
3006 T0: fidl::encoding::Encode<u64, D>,
3007 T1: fidl::encoding::Encode<UnknownMethodType, D>,
3008 > fidl::encoding::Encode<UnknownMethodInfo, D> for (T0, T1)
3009 {
3010 #[inline]
3011 unsafe fn encode(
3012 self,
3013 encoder: &mut fidl::encoding::Encoder<'_, D>,
3014 offset: usize,
3015 depth: fidl::encoding::Depth,
3016 ) -> fidl::Result<()> {
3017 encoder.debug_check_bounds::<UnknownMethodInfo>(offset);
3018 unsafe {
3021 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3022 (ptr as *mut u64).write_unaligned(0);
3023 }
3024 self.0.encode(encoder, offset + 0, depth)?;
3026 self.1.encode(encoder, offset + 8, depth)?;
3027 Ok(())
3028 }
3029 }
3030
3031 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnknownMethodInfo {
3032 #[inline(always)]
3033 fn new_empty() -> Self {
3034 Self {
3035 ordinal: fidl::new_empty!(u64, D),
3036 unknown_method_type: fidl::new_empty!(UnknownMethodType, D),
3037 }
3038 }
3039
3040 #[inline]
3041 unsafe fn decode(
3042 &mut self,
3043 decoder: &mut fidl::encoding::Decoder<'_, D>,
3044 offset: usize,
3045 _depth: fidl::encoding::Depth,
3046 ) -> fidl::Result<()> {
3047 decoder.debug_check_bounds::<Self>(offset);
3048 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3050 let padval = unsafe { (ptr as *const u64).read_unaligned() };
3051 let mask = 0xffffffff00000000u64;
3052 let maskedval = padval & mask;
3053 if maskedval != 0 {
3054 return Err(fidl::Error::NonZeroPadding {
3055 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3056 });
3057 }
3058 fidl::decode!(u64, D, &mut self.ordinal, decoder, offset + 0, _depth)?;
3059 fidl::decode!(
3060 UnknownMethodType,
3061 D,
3062 &mut self.unknown_method_type,
3063 decoder,
3064 offset + 8,
3065 _depth
3066 )?;
3067 Ok(())
3068 }
3069 }
3070
3071 impl ClosedTargetTwoWayTablePayloadRequest {
3072 #[inline(always)]
3073 fn max_ordinal_present(&self) -> u64 {
3074 if let Some(_) = self.v {
3075 return 1;
3076 }
3077 0
3078 }
3079 }
3080
3081 impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayTablePayloadRequest {
3082 type Borrowed<'a> = &'a Self;
3083 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3084 value
3085 }
3086 }
3087
3088 unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayTablePayloadRequest {
3089 type Owned = Self;
3090
3091 #[inline(always)]
3092 fn inline_align(_context: fidl::encoding::Context) -> usize {
3093 8
3094 }
3095
3096 #[inline(always)]
3097 fn inline_size(_context: fidl::encoding::Context) -> usize {
3098 16
3099 }
3100 }
3101
3102 unsafe impl<D: fidl::encoding::ResourceDialect>
3103 fidl::encoding::Encode<ClosedTargetTwoWayTablePayloadRequest, D>
3104 for &ClosedTargetTwoWayTablePayloadRequest
3105 {
3106 unsafe fn encode(
3107 self,
3108 encoder: &mut fidl::encoding::Encoder<'_, D>,
3109 offset: usize,
3110 mut depth: fidl::encoding::Depth,
3111 ) -> fidl::Result<()> {
3112 encoder.debug_check_bounds::<ClosedTargetTwoWayTablePayloadRequest>(offset);
3113 let max_ordinal: u64 = self.max_ordinal_present();
3115 encoder.write_num(max_ordinal, offset);
3116 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3117 if max_ordinal == 0 {
3119 return Ok(());
3120 }
3121 depth.increment()?;
3122 let envelope_size = 8;
3123 let bytes_len = max_ordinal as usize * envelope_size;
3124 #[allow(unused_variables)]
3125 let offset = encoder.out_of_line_offset(bytes_len);
3126 let mut _prev_end_offset: usize = 0;
3127 if 1 > max_ordinal {
3128 return Ok(());
3129 }
3130
3131 let cur_offset: usize = (1 - 1) * envelope_size;
3134
3135 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3137
3138 fidl::encoding::encode_in_envelope_optional::<i8, D>(
3143 self.v.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
3144 encoder,
3145 offset + cur_offset,
3146 depth,
3147 )?;
3148
3149 _prev_end_offset = cur_offset + envelope_size;
3150
3151 Ok(())
3152 }
3153 }
3154
3155 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3156 for ClosedTargetTwoWayTablePayloadRequest
3157 {
3158 #[inline(always)]
3159 fn new_empty() -> Self {
3160 Self::default()
3161 }
3162
3163 unsafe fn decode(
3164 &mut self,
3165 decoder: &mut fidl::encoding::Decoder<'_, D>,
3166 offset: usize,
3167 mut depth: fidl::encoding::Depth,
3168 ) -> fidl::Result<()> {
3169 decoder.debug_check_bounds::<Self>(offset);
3170 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3171 None => return Err(fidl::Error::NotNullable),
3172 Some(len) => len,
3173 };
3174 if len == 0 {
3176 return Ok(());
3177 };
3178 depth.increment()?;
3179 let envelope_size = 8;
3180 let bytes_len = len * envelope_size;
3181 let offset = decoder.out_of_line_offset(bytes_len)?;
3182 let mut _next_ordinal_to_read = 0;
3184 let mut next_offset = offset;
3185 let end_offset = offset + bytes_len;
3186 _next_ordinal_to_read += 1;
3187 if next_offset >= end_offset {
3188 return Ok(());
3189 }
3190
3191 while _next_ordinal_to_read < 1 {
3193 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3194 _next_ordinal_to_read += 1;
3195 next_offset += envelope_size;
3196 }
3197
3198 let next_out_of_line = decoder.next_out_of_line();
3199 let handles_before = decoder.remaining_handles();
3200 if let Some((inlined, num_bytes, num_handles)) =
3201 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3202 {
3203 let member_inline_size =
3204 <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3205 if inlined != (member_inline_size <= 4) {
3206 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3207 }
3208 let inner_offset;
3209 let mut inner_depth = depth.clone();
3210 if inlined {
3211 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3212 inner_offset = next_offset;
3213 } else {
3214 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3215 inner_depth.increment()?;
3216 }
3217 let val_ref = self.v.get_or_insert_with(|| fidl::new_empty!(i8, D));
3218 fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
3219 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3220 {
3221 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3222 }
3223 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3224 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3225 }
3226 }
3227
3228 next_offset += envelope_size;
3229
3230 while next_offset < end_offset {
3232 _next_ordinal_to_read += 1;
3233 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3234 next_offset += envelope_size;
3235 }
3236
3237 Ok(())
3238 }
3239 }
3240
3241 impl ClosedTargetTwoWayTablePayloadResponse {
3242 #[inline(always)]
3243 fn max_ordinal_present(&self) -> u64 {
3244 if let Some(_) = self.v {
3245 return 1;
3246 }
3247 0
3248 }
3249 }
3250
3251 impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayTablePayloadResponse {
3252 type Borrowed<'a> = &'a Self;
3253 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3254 value
3255 }
3256 }
3257
3258 unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayTablePayloadResponse {
3259 type Owned = Self;
3260
3261 #[inline(always)]
3262 fn inline_align(_context: fidl::encoding::Context) -> usize {
3263 8
3264 }
3265
3266 #[inline(always)]
3267 fn inline_size(_context: fidl::encoding::Context) -> usize {
3268 16
3269 }
3270 }
3271
3272 unsafe impl<D: fidl::encoding::ResourceDialect>
3273 fidl::encoding::Encode<ClosedTargetTwoWayTablePayloadResponse, D>
3274 for &ClosedTargetTwoWayTablePayloadResponse
3275 {
3276 unsafe fn encode(
3277 self,
3278 encoder: &mut fidl::encoding::Encoder<'_, D>,
3279 offset: usize,
3280 mut depth: fidl::encoding::Depth,
3281 ) -> fidl::Result<()> {
3282 encoder.debug_check_bounds::<ClosedTargetTwoWayTablePayloadResponse>(offset);
3283 let max_ordinal: u64 = self.max_ordinal_present();
3285 encoder.write_num(max_ordinal, offset);
3286 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3287 if max_ordinal == 0 {
3289 return Ok(());
3290 }
3291 depth.increment()?;
3292 let envelope_size = 8;
3293 let bytes_len = max_ordinal as usize * envelope_size;
3294 #[allow(unused_variables)]
3295 let offset = encoder.out_of_line_offset(bytes_len);
3296 let mut _prev_end_offset: usize = 0;
3297 if 1 > max_ordinal {
3298 return Ok(());
3299 }
3300
3301 let cur_offset: usize = (1 - 1) * envelope_size;
3304
3305 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3307
3308 fidl::encoding::encode_in_envelope_optional::<i8, D>(
3313 self.v.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
3314 encoder,
3315 offset + cur_offset,
3316 depth,
3317 )?;
3318
3319 _prev_end_offset = cur_offset + envelope_size;
3320
3321 Ok(())
3322 }
3323 }
3324
3325 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3326 for ClosedTargetTwoWayTablePayloadResponse
3327 {
3328 #[inline(always)]
3329 fn new_empty() -> Self {
3330 Self::default()
3331 }
3332
3333 unsafe fn decode(
3334 &mut self,
3335 decoder: &mut fidl::encoding::Decoder<'_, D>,
3336 offset: usize,
3337 mut depth: fidl::encoding::Depth,
3338 ) -> fidl::Result<()> {
3339 decoder.debug_check_bounds::<Self>(offset);
3340 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3341 None => return Err(fidl::Error::NotNullable),
3342 Some(len) => len,
3343 };
3344 if len == 0 {
3346 return Ok(());
3347 };
3348 depth.increment()?;
3349 let envelope_size = 8;
3350 let bytes_len = len * envelope_size;
3351 let offset = decoder.out_of_line_offset(bytes_len)?;
3352 let mut _next_ordinal_to_read = 0;
3354 let mut next_offset = offset;
3355 let end_offset = offset + bytes_len;
3356 _next_ordinal_to_read += 1;
3357 if next_offset >= end_offset {
3358 return Ok(());
3359 }
3360
3361 while _next_ordinal_to_read < 1 {
3363 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3364 _next_ordinal_to_read += 1;
3365 next_offset += envelope_size;
3366 }
3367
3368 let next_out_of_line = decoder.next_out_of_line();
3369 let handles_before = decoder.remaining_handles();
3370 if let Some((inlined, num_bytes, num_handles)) =
3371 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3372 {
3373 let member_inline_size =
3374 <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3375 if inlined != (member_inline_size <= 4) {
3376 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3377 }
3378 let inner_offset;
3379 let mut inner_depth = depth.clone();
3380 if inlined {
3381 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3382 inner_offset = next_offset;
3383 } else {
3384 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3385 inner_depth.increment()?;
3386 }
3387 let val_ref = self.v.get_or_insert_with(|| fidl::new_empty!(i8, D));
3388 fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
3389 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3390 {
3391 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3392 }
3393 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3394 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3395 }
3396 }
3397
3398 next_offset += envelope_size;
3399
3400 while next_offset < end_offset {
3402 _next_ordinal_to_read += 1;
3403 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3404 next_offset += envelope_size;
3405 }
3406
3407 Ok(())
3408 }
3409 }
3410
3411 impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayResultRequest {
3412 type Borrowed<'a> = &'a Self;
3413 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3414 value
3415 }
3416 }
3417
3418 unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayResultRequest {
3419 type Owned = Self;
3420
3421 #[inline(always)]
3422 fn inline_align(_context: fidl::encoding::Context) -> usize {
3423 8
3424 }
3425
3426 #[inline(always)]
3427 fn inline_size(_context: fidl::encoding::Context) -> usize {
3428 16
3429 }
3430 }
3431
3432 unsafe impl<D: fidl::encoding::ResourceDialect>
3433 fidl::encoding::Encode<ClosedTargetTwoWayResultRequest, D>
3434 for &ClosedTargetTwoWayResultRequest
3435 {
3436 #[inline]
3437 unsafe fn encode(
3438 self,
3439 encoder: &mut fidl::encoding::Encoder<'_, D>,
3440 offset: usize,
3441 _depth: fidl::encoding::Depth,
3442 ) -> fidl::Result<()> {
3443 encoder.debug_check_bounds::<ClosedTargetTwoWayResultRequest>(offset);
3444 encoder.write_num::<u64>(self.ordinal(), offset);
3445 match self {
3446 ClosedTargetTwoWayResultRequest::Payload(ref val) => {
3447 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, D>(
3448 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
3449 encoder, offset + 8, _depth
3450 )
3451 }
3452 ClosedTargetTwoWayResultRequest::Error(ref val) => {
3453 fidl::encoding::encode_in_envelope::<u32, D>(
3454 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3455 encoder, offset + 8, _depth
3456 )
3457 }
3458 }
3459 }
3460 }
3461
3462 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3463 for ClosedTargetTwoWayResultRequest
3464 {
3465 #[inline(always)]
3466 fn new_empty() -> Self {
3467 Self::Payload(fidl::new_empty!(fidl::encoding::UnboundedString, D))
3468 }
3469
3470 #[inline]
3471 unsafe fn decode(
3472 &mut self,
3473 decoder: &mut fidl::encoding::Decoder<'_, D>,
3474 offset: usize,
3475 mut depth: fidl::encoding::Depth,
3476 ) -> fidl::Result<()> {
3477 decoder.debug_check_bounds::<Self>(offset);
3478 #[allow(unused_variables)]
3479 let next_out_of_line = decoder.next_out_of_line();
3480 let handles_before = decoder.remaining_handles();
3481 let (ordinal, inlined, num_bytes, num_handles) =
3482 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
3483
3484 let member_inline_size = match ordinal {
3485 1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
3486 decoder.context,
3487 ),
3488 2 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3489 _ => return Err(fidl::Error::UnknownUnionTag),
3490 };
3491
3492 if inlined != (member_inline_size <= 4) {
3493 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3494 }
3495 let _inner_offset;
3496 if inlined {
3497 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3498 _inner_offset = offset + 8;
3499 } else {
3500 depth.increment()?;
3501 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3502 }
3503 match ordinal {
3504 1 => {
3505 #[allow(irrefutable_let_patterns)]
3506 if let ClosedTargetTwoWayResultRequest::Payload(_) = self {
3507 } else {
3509 *self = ClosedTargetTwoWayResultRequest::Payload(fidl::new_empty!(
3511 fidl::encoding::UnboundedString,
3512 D
3513 ));
3514 }
3515 #[allow(irrefutable_let_patterns)]
3516 if let ClosedTargetTwoWayResultRequest::Payload(ref mut val) = self {
3517 fidl::decode!(
3518 fidl::encoding::UnboundedString,
3519 D,
3520 val,
3521 decoder,
3522 _inner_offset,
3523 depth
3524 )?;
3525 } else {
3526 unreachable!()
3527 }
3528 }
3529 2 => {
3530 #[allow(irrefutable_let_patterns)]
3531 if let ClosedTargetTwoWayResultRequest::Error(_) = self {
3532 } else {
3534 *self = ClosedTargetTwoWayResultRequest::Error(fidl::new_empty!(u32, D));
3536 }
3537 #[allow(irrefutable_let_patterns)]
3538 if let ClosedTargetTwoWayResultRequest::Error(ref mut val) = self {
3539 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
3540 } else {
3541 unreachable!()
3542 }
3543 }
3544 ordinal => panic!("unexpected ordinal {:?}", ordinal),
3545 }
3546 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
3547 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3548 }
3549 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3550 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3551 }
3552 Ok(())
3553 }
3554 }
3555
3556 impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayUnionPayloadRequest {
3557 type Borrowed<'a> = &'a Self;
3558 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3559 value
3560 }
3561 }
3562
3563 unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayUnionPayloadRequest {
3564 type Owned = Self;
3565
3566 #[inline(always)]
3567 fn inline_align(_context: fidl::encoding::Context) -> usize {
3568 8
3569 }
3570
3571 #[inline(always)]
3572 fn inline_size(_context: fidl::encoding::Context) -> usize {
3573 16
3574 }
3575 }
3576
3577 unsafe impl<D: fidl::encoding::ResourceDialect>
3578 fidl::encoding::Encode<ClosedTargetTwoWayUnionPayloadRequest, D>
3579 for &ClosedTargetTwoWayUnionPayloadRequest
3580 {
3581 #[inline]
3582 unsafe fn encode(
3583 self,
3584 encoder: &mut fidl::encoding::Encoder<'_, D>,
3585 offset: usize,
3586 _depth: fidl::encoding::Depth,
3587 ) -> fidl::Result<()> {
3588 encoder.debug_check_bounds::<ClosedTargetTwoWayUnionPayloadRequest>(offset);
3589 encoder.write_num::<u64>(self.ordinal(), offset);
3590 match self {
3591 ClosedTargetTwoWayUnionPayloadRequest::V(ref val) => {
3592 fidl::encoding::encode_in_envelope::<i8, D>(
3593 <i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
3594 encoder,
3595 offset + 8,
3596 _depth,
3597 )
3598 }
3599 ClosedTargetTwoWayUnionPayloadRequest::__SourceBreaking { .. } => {
3600 Err(fidl::Error::UnknownUnionTag)
3601 }
3602 }
3603 }
3604 }
3605
3606 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3607 for ClosedTargetTwoWayUnionPayloadRequest
3608 {
3609 #[inline(always)]
3610 fn new_empty() -> Self {
3611 Self::__SourceBreaking { unknown_ordinal: 0 }
3612 }
3613
3614 #[inline]
3615 unsafe fn decode(
3616 &mut self,
3617 decoder: &mut fidl::encoding::Decoder<'_, D>,
3618 offset: usize,
3619 mut depth: fidl::encoding::Depth,
3620 ) -> fidl::Result<()> {
3621 decoder.debug_check_bounds::<Self>(offset);
3622 #[allow(unused_variables)]
3623 let next_out_of_line = decoder.next_out_of_line();
3624 let handles_before = decoder.remaining_handles();
3625 let (ordinal, inlined, num_bytes, num_handles) =
3626 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
3627
3628 let member_inline_size = match ordinal {
3629 1 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3630 0 => return Err(fidl::Error::UnknownUnionTag),
3631 _ => num_bytes as usize,
3632 };
3633
3634 if inlined != (member_inline_size <= 4) {
3635 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3636 }
3637 let _inner_offset;
3638 if inlined {
3639 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3640 _inner_offset = offset + 8;
3641 } else {
3642 depth.increment()?;
3643 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3644 }
3645 match ordinal {
3646 1 => {
3647 #[allow(irrefutable_let_patterns)]
3648 if let ClosedTargetTwoWayUnionPayloadRequest::V(_) = self {
3649 } else {
3651 *self = ClosedTargetTwoWayUnionPayloadRequest::V(fidl::new_empty!(i8, D));
3653 }
3654 #[allow(irrefutable_let_patterns)]
3655 if let ClosedTargetTwoWayUnionPayloadRequest::V(ref mut val) = self {
3656 fidl::decode!(i8, D, val, decoder, _inner_offset, depth)?;
3657 } else {
3658 unreachable!()
3659 }
3660 }
3661 #[allow(deprecated)]
3662 ordinal => {
3663 for _ in 0..num_handles {
3664 decoder.drop_next_handle()?;
3665 }
3666 *self = ClosedTargetTwoWayUnionPayloadRequest::__SourceBreaking {
3667 unknown_ordinal: ordinal,
3668 };
3669 }
3670 }
3671 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
3672 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3673 }
3674 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3675 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3676 }
3677 Ok(())
3678 }
3679 }
3680
3681 impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayUnionPayloadResponse {
3682 type Borrowed<'a> = &'a Self;
3683 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3684 value
3685 }
3686 }
3687
3688 unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayUnionPayloadResponse {
3689 type Owned = Self;
3690
3691 #[inline(always)]
3692 fn inline_align(_context: fidl::encoding::Context) -> usize {
3693 8
3694 }
3695
3696 #[inline(always)]
3697 fn inline_size(_context: fidl::encoding::Context) -> usize {
3698 16
3699 }
3700 }
3701
3702 unsafe impl<D: fidl::encoding::ResourceDialect>
3703 fidl::encoding::Encode<ClosedTargetTwoWayUnionPayloadResponse, D>
3704 for &ClosedTargetTwoWayUnionPayloadResponse
3705 {
3706 #[inline]
3707 unsafe fn encode(
3708 self,
3709 encoder: &mut fidl::encoding::Encoder<'_, D>,
3710 offset: usize,
3711 _depth: fidl::encoding::Depth,
3712 ) -> fidl::Result<()> {
3713 encoder.debug_check_bounds::<ClosedTargetTwoWayUnionPayloadResponse>(offset);
3714 encoder.write_num::<u64>(self.ordinal(), offset);
3715 match self {
3716 ClosedTargetTwoWayUnionPayloadResponse::V(ref val) => {
3717 fidl::encoding::encode_in_envelope::<i8, D>(
3718 <i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
3719 encoder,
3720 offset + 8,
3721 _depth,
3722 )
3723 }
3724 ClosedTargetTwoWayUnionPayloadResponse::__SourceBreaking { .. } => {
3725 Err(fidl::Error::UnknownUnionTag)
3726 }
3727 }
3728 }
3729 }
3730
3731 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3732 for ClosedTargetTwoWayUnionPayloadResponse
3733 {
3734 #[inline(always)]
3735 fn new_empty() -> Self {
3736 Self::__SourceBreaking { unknown_ordinal: 0 }
3737 }
3738
3739 #[inline]
3740 unsafe fn decode(
3741 &mut self,
3742 decoder: &mut fidl::encoding::Decoder<'_, D>,
3743 offset: usize,
3744 mut depth: fidl::encoding::Depth,
3745 ) -> fidl::Result<()> {
3746 decoder.debug_check_bounds::<Self>(offset);
3747 #[allow(unused_variables)]
3748 let next_out_of_line = decoder.next_out_of_line();
3749 let handles_before = decoder.remaining_handles();
3750 let (ordinal, inlined, num_bytes, num_handles) =
3751 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
3752
3753 let member_inline_size = match ordinal {
3754 1 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3755 0 => return Err(fidl::Error::UnknownUnionTag),
3756 _ => num_bytes as usize,
3757 };
3758
3759 if inlined != (member_inline_size <= 4) {
3760 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3761 }
3762 let _inner_offset;
3763 if inlined {
3764 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3765 _inner_offset = offset + 8;
3766 } else {
3767 depth.increment()?;
3768 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3769 }
3770 match ordinal {
3771 1 => {
3772 #[allow(irrefutable_let_patterns)]
3773 if let ClosedTargetTwoWayUnionPayloadResponse::V(_) = self {
3774 } else {
3776 *self = ClosedTargetTwoWayUnionPayloadResponse::V(fidl::new_empty!(i8, D));
3778 }
3779 #[allow(irrefutable_let_patterns)]
3780 if let ClosedTargetTwoWayUnionPayloadResponse::V(ref mut val) = self {
3781 fidl::decode!(i8, D, val, decoder, _inner_offset, depth)?;
3782 } else {
3783 unreachable!()
3784 }
3785 }
3786 #[allow(deprecated)]
3787 ordinal => {
3788 for _ in 0..num_handles {
3789 decoder.drop_next_handle()?;
3790 }
3791 *self = ClosedTargetTwoWayUnionPayloadResponse::__SourceBreaking {
3792 unknown_ordinal: ordinal,
3793 };
3794 }
3795 }
3796 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
3797 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3798 }
3799 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3800 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3801 }
3802 Ok(())
3803 }
3804 }
3805
3806 impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayErrRequest {
3807 type Borrowed<'a> = &'a Self;
3808 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3809 value
3810 }
3811 }
3812
3813 unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayErrRequest {
3814 type Owned = Self;
3815
3816 #[inline(always)]
3817 fn inline_align(_context: fidl::encoding::Context) -> usize {
3818 8
3819 }
3820
3821 #[inline(always)]
3822 fn inline_size(_context: fidl::encoding::Context) -> usize {
3823 16
3824 }
3825 }
3826
3827 unsafe impl<D: fidl::encoding::ResourceDialect>
3828 fidl::encoding::Encode<OpenTargetFlexibleTwoWayErrRequest, D>
3829 for &OpenTargetFlexibleTwoWayErrRequest
3830 {
3831 #[inline]
3832 unsafe fn encode(
3833 self,
3834 encoder: &mut fidl::encoding::Encoder<'_, D>,
3835 offset: usize,
3836 _depth: fidl::encoding::Depth,
3837 ) -> fidl::Result<()> {
3838 encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayErrRequest>(offset);
3839 encoder.write_num::<u64>(self.ordinal(), offset);
3840 match self {
3841 OpenTargetFlexibleTwoWayErrRequest::ReplySuccess(ref val) => {
3842 fidl::encoding::encode_in_envelope::<Empty, D>(
3843 <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
3844 encoder,
3845 offset + 8,
3846 _depth,
3847 )
3848 }
3849 OpenTargetFlexibleTwoWayErrRequest::ReplyError(ref val) => {
3850 fidl::encoding::encode_in_envelope::<i32, D>(
3851 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3852 encoder,
3853 offset + 8,
3854 _depth,
3855 )
3856 }
3857 }
3858 }
3859 }
3860
3861 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3862 for OpenTargetFlexibleTwoWayErrRequest
3863 {
3864 #[inline(always)]
3865 fn new_empty() -> Self {
3866 Self::ReplySuccess(fidl::new_empty!(Empty, D))
3867 }
3868
3869 #[inline]
3870 unsafe fn decode(
3871 &mut self,
3872 decoder: &mut fidl::encoding::Decoder<'_, D>,
3873 offset: usize,
3874 mut depth: fidl::encoding::Depth,
3875 ) -> fidl::Result<()> {
3876 decoder.debug_check_bounds::<Self>(offset);
3877 #[allow(unused_variables)]
3878 let next_out_of_line = decoder.next_out_of_line();
3879 let handles_before = decoder.remaining_handles();
3880 let (ordinal, inlined, num_bytes, num_handles) =
3881 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
3882
3883 let member_inline_size = match ordinal {
3884 1 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3885 2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3886 _ => return Err(fidl::Error::UnknownUnionTag),
3887 };
3888
3889 if inlined != (member_inline_size <= 4) {
3890 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3891 }
3892 let _inner_offset;
3893 if inlined {
3894 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3895 _inner_offset = offset + 8;
3896 } else {
3897 depth.increment()?;
3898 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3899 }
3900 match ordinal {
3901 1 => {
3902 #[allow(irrefutable_let_patterns)]
3903 if let OpenTargetFlexibleTwoWayErrRequest::ReplySuccess(_) = self {
3904 } else {
3906 *self = OpenTargetFlexibleTwoWayErrRequest::ReplySuccess(fidl::new_empty!(
3908 Empty, D
3909 ));
3910 }
3911 #[allow(irrefutable_let_patterns)]
3912 if let OpenTargetFlexibleTwoWayErrRequest::ReplySuccess(ref mut val) = self {
3913 fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
3914 } else {
3915 unreachable!()
3916 }
3917 }
3918 2 => {
3919 #[allow(irrefutable_let_patterns)]
3920 if let OpenTargetFlexibleTwoWayErrRequest::ReplyError(_) = self {
3921 } else {
3923 *self = OpenTargetFlexibleTwoWayErrRequest::ReplyError(fidl::new_empty!(
3925 i32, D
3926 ));
3927 }
3928 #[allow(irrefutable_let_patterns)]
3929 if let OpenTargetFlexibleTwoWayErrRequest::ReplyError(ref mut val) = self {
3930 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
3931 } else {
3932 unreachable!()
3933 }
3934 }
3935 ordinal => panic!("unexpected ordinal {:?}", ordinal),
3936 }
3937 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
3938 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3939 }
3940 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3941 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3942 }
3943 Ok(())
3944 }
3945 }
3946
3947 impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayFieldsErrRequest {
3948 type Borrowed<'a> = &'a Self;
3949 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3950 value
3951 }
3952 }
3953
3954 unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayFieldsErrRequest {
3955 type Owned = Self;
3956
3957 #[inline(always)]
3958 fn inline_align(_context: fidl::encoding::Context) -> usize {
3959 8
3960 }
3961
3962 #[inline(always)]
3963 fn inline_size(_context: fidl::encoding::Context) -> usize {
3964 16
3965 }
3966 }
3967
3968 unsafe impl<D: fidl::encoding::ResourceDialect>
3969 fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsErrRequest, D>
3970 for &OpenTargetFlexibleTwoWayFieldsErrRequest
3971 {
3972 #[inline]
3973 unsafe fn encode(
3974 self,
3975 encoder: &mut fidl::encoding::Encoder<'_, D>,
3976 offset: usize,
3977 _depth: fidl::encoding::Depth,
3978 ) -> fidl::Result<()> {
3979 encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsErrRequest>(offset);
3980 encoder.write_num::<u64>(self.ordinal(), offset);
3981 match self {
3982 OpenTargetFlexibleTwoWayFieldsErrRequest::ReplySuccess(ref val) => {
3983 fidl::encoding::encode_in_envelope::<i32, D>(
3984 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3985 encoder,
3986 offset + 8,
3987 _depth,
3988 )
3989 }
3990 OpenTargetFlexibleTwoWayFieldsErrRequest::ReplyError(ref val) => {
3991 fidl::encoding::encode_in_envelope::<i32, D>(
3992 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3993 encoder,
3994 offset + 8,
3995 _depth,
3996 )
3997 }
3998 }
3999 }
4000 }
4001
4002 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4003 for OpenTargetFlexibleTwoWayFieldsErrRequest
4004 {
4005 #[inline(always)]
4006 fn new_empty() -> Self {
4007 Self::ReplySuccess(fidl::new_empty!(i32, D))
4008 }
4009
4010 #[inline]
4011 unsafe fn decode(
4012 &mut self,
4013 decoder: &mut fidl::encoding::Decoder<'_, D>,
4014 offset: usize,
4015 mut depth: fidl::encoding::Depth,
4016 ) -> fidl::Result<()> {
4017 decoder.debug_check_bounds::<Self>(offset);
4018 #[allow(unused_variables)]
4019 let next_out_of_line = decoder.next_out_of_line();
4020 let handles_before = decoder.remaining_handles();
4021 let (ordinal, inlined, num_bytes, num_handles) =
4022 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4023
4024 let member_inline_size = match ordinal {
4025 1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4026 2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4027 _ => return Err(fidl::Error::UnknownUnionTag),
4028 };
4029
4030 if inlined != (member_inline_size <= 4) {
4031 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4032 }
4033 let _inner_offset;
4034 if inlined {
4035 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4036 _inner_offset = offset + 8;
4037 } else {
4038 depth.increment()?;
4039 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4040 }
4041 match ordinal {
4042 1 => {
4043 #[allow(irrefutable_let_patterns)]
4044 if let OpenTargetFlexibleTwoWayFieldsErrRequest::ReplySuccess(_) = self {
4045 } else {
4047 *self = OpenTargetFlexibleTwoWayFieldsErrRequest::ReplySuccess(
4049 fidl::new_empty!(i32, D),
4050 );
4051 }
4052 #[allow(irrefutable_let_patterns)]
4053 if let OpenTargetFlexibleTwoWayFieldsErrRequest::ReplySuccess(ref mut val) =
4054 self
4055 {
4056 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
4057 } else {
4058 unreachable!()
4059 }
4060 }
4061 2 => {
4062 #[allow(irrefutable_let_patterns)]
4063 if let OpenTargetFlexibleTwoWayFieldsErrRequest::ReplyError(_) = self {
4064 } else {
4066 *self = OpenTargetFlexibleTwoWayFieldsErrRequest::ReplyError(
4068 fidl::new_empty!(i32, D),
4069 );
4070 }
4071 #[allow(irrefutable_let_patterns)]
4072 if let OpenTargetFlexibleTwoWayFieldsErrRequest::ReplyError(ref mut val) = self
4073 {
4074 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
4075 } else {
4076 unreachable!()
4077 }
4078 }
4079 ordinal => panic!("unexpected ordinal {:?}", ordinal),
4080 }
4081 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4082 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4083 }
4084 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4085 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4086 }
4087 Ok(())
4088 }
4089 }
4090
4091 impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayErrRequest {
4092 type Borrowed<'a> = &'a Self;
4093 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4094 value
4095 }
4096 }
4097
4098 unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayErrRequest {
4099 type Owned = Self;
4100
4101 #[inline(always)]
4102 fn inline_align(_context: fidl::encoding::Context) -> usize {
4103 8
4104 }
4105
4106 #[inline(always)]
4107 fn inline_size(_context: fidl::encoding::Context) -> usize {
4108 16
4109 }
4110 }
4111
4112 unsafe impl<D: fidl::encoding::ResourceDialect>
4113 fidl::encoding::Encode<OpenTargetStrictTwoWayErrRequest, D>
4114 for &OpenTargetStrictTwoWayErrRequest
4115 {
4116 #[inline]
4117 unsafe fn encode(
4118 self,
4119 encoder: &mut fidl::encoding::Encoder<'_, D>,
4120 offset: usize,
4121 _depth: fidl::encoding::Depth,
4122 ) -> fidl::Result<()> {
4123 encoder.debug_check_bounds::<OpenTargetStrictTwoWayErrRequest>(offset);
4124 encoder.write_num::<u64>(self.ordinal(), offset);
4125 match self {
4126 OpenTargetStrictTwoWayErrRequest::ReplySuccess(ref val) => {
4127 fidl::encoding::encode_in_envelope::<Empty, D>(
4128 <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
4129 encoder,
4130 offset + 8,
4131 _depth,
4132 )
4133 }
4134 OpenTargetStrictTwoWayErrRequest::ReplyError(ref val) => {
4135 fidl::encoding::encode_in_envelope::<i32, D>(
4136 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
4137 encoder,
4138 offset + 8,
4139 _depth,
4140 )
4141 }
4142 }
4143 }
4144 }
4145
4146 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4147 for OpenTargetStrictTwoWayErrRequest
4148 {
4149 #[inline(always)]
4150 fn new_empty() -> Self {
4151 Self::ReplySuccess(fidl::new_empty!(Empty, D))
4152 }
4153
4154 #[inline]
4155 unsafe fn decode(
4156 &mut self,
4157 decoder: &mut fidl::encoding::Decoder<'_, D>,
4158 offset: usize,
4159 mut depth: fidl::encoding::Depth,
4160 ) -> fidl::Result<()> {
4161 decoder.debug_check_bounds::<Self>(offset);
4162 #[allow(unused_variables)]
4163 let next_out_of_line = decoder.next_out_of_line();
4164 let handles_before = decoder.remaining_handles();
4165 let (ordinal, inlined, num_bytes, num_handles) =
4166 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4167
4168 let member_inline_size = match ordinal {
4169 1 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4170 2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4171 _ => return Err(fidl::Error::UnknownUnionTag),
4172 };
4173
4174 if inlined != (member_inline_size <= 4) {
4175 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4176 }
4177 let _inner_offset;
4178 if inlined {
4179 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4180 _inner_offset = offset + 8;
4181 } else {
4182 depth.increment()?;
4183 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4184 }
4185 match ordinal {
4186 1 => {
4187 #[allow(irrefutable_let_patterns)]
4188 if let OpenTargetStrictTwoWayErrRequest::ReplySuccess(_) = self {
4189 } else {
4191 *self = OpenTargetStrictTwoWayErrRequest::ReplySuccess(fidl::new_empty!(
4193 Empty, D
4194 ));
4195 }
4196 #[allow(irrefutable_let_patterns)]
4197 if let OpenTargetStrictTwoWayErrRequest::ReplySuccess(ref mut val) = self {
4198 fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
4199 } else {
4200 unreachable!()
4201 }
4202 }
4203 2 => {
4204 #[allow(irrefutable_let_patterns)]
4205 if let OpenTargetStrictTwoWayErrRequest::ReplyError(_) = self {
4206 } else {
4208 *self =
4210 OpenTargetStrictTwoWayErrRequest::ReplyError(fidl::new_empty!(i32, D));
4211 }
4212 #[allow(irrefutable_let_patterns)]
4213 if let OpenTargetStrictTwoWayErrRequest::ReplyError(ref mut val) = self {
4214 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
4215 } else {
4216 unreachable!()
4217 }
4218 }
4219 ordinal => panic!("unexpected ordinal {:?}", ordinal),
4220 }
4221 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4222 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4223 }
4224 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4225 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4226 }
4227 Ok(())
4228 }
4229 }
4230
4231 impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayFieldsErrRequest {
4232 type Borrowed<'a> = &'a Self;
4233 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4234 value
4235 }
4236 }
4237
4238 unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayFieldsErrRequest {
4239 type Owned = Self;
4240
4241 #[inline(always)]
4242 fn inline_align(_context: fidl::encoding::Context) -> usize {
4243 8
4244 }
4245
4246 #[inline(always)]
4247 fn inline_size(_context: fidl::encoding::Context) -> usize {
4248 16
4249 }
4250 }
4251
4252 unsafe impl<D: fidl::encoding::ResourceDialect>
4253 fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsErrRequest, D>
4254 for &OpenTargetStrictTwoWayFieldsErrRequest
4255 {
4256 #[inline]
4257 unsafe fn encode(
4258 self,
4259 encoder: &mut fidl::encoding::Encoder<'_, D>,
4260 offset: usize,
4261 _depth: fidl::encoding::Depth,
4262 ) -> fidl::Result<()> {
4263 encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsErrRequest>(offset);
4264 encoder.write_num::<u64>(self.ordinal(), offset);
4265 match self {
4266 OpenTargetStrictTwoWayFieldsErrRequest::ReplySuccess(ref val) => {
4267 fidl::encoding::encode_in_envelope::<i32, D>(
4268 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
4269 encoder,
4270 offset + 8,
4271 _depth,
4272 )
4273 }
4274 OpenTargetStrictTwoWayFieldsErrRequest::ReplyError(ref val) => {
4275 fidl::encoding::encode_in_envelope::<i32, D>(
4276 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
4277 encoder,
4278 offset + 8,
4279 _depth,
4280 )
4281 }
4282 }
4283 }
4284 }
4285
4286 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4287 for OpenTargetStrictTwoWayFieldsErrRequest
4288 {
4289 #[inline(always)]
4290 fn new_empty() -> Self {
4291 Self::ReplySuccess(fidl::new_empty!(i32, D))
4292 }
4293
4294 #[inline]
4295 unsafe fn decode(
4296 &mut self,
4297 decoder: &mut fidl::encoding::Decoder<'_, D>,
4298 offset: usize,
4299 mut depth: fidl::encoding::Depth,
4300 ) -> fidl::Result<()> {
4301 decoder.debug_check_bounds::<Self>(offset);
4302 #[allow(unused_variables)]
4303 let next_out_of_line = decoder.next_out_of_line();
4304 let handles_before = decoder.remaining_handles();
4305 let (ordinal, inlined, num_bytes, num_handles) =
4306 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4307
4308 let member_inline_size = match ordinal {
4309 1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4310 2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4311 _ => return Err(fidl::Error::UnknownUnionTag),
4312 };
4313
4314 if inlined != (member_inline_size <= 4) {
4315 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4316 }
4317 let _inner_offset;
4318 if inlined {
4319 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4320 _inner_offset = offset + 8;
4321 } else {
4322 depth.increment()?;
4323 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4324 }
4325 match ordinal {
4326 1 => {
4327 #[allow(irrefutable_let_patterns)]
4328 if let OpenTargetStrictTwoWayFieldsErrRequest::ReplySuccess(_) = self {
4329 } else {
4331 *self = OpenTargetStrictTwoWayFieldsErrRequest::ReplySuccess(
4333 fidl::new_empty!(i32, D),
4334 );
4335 }
4336 #[allow(irrefutable_let_patterns)]
4337 if let OpenTargetStrictTwoWayFieldsErrRequest::ReplySuccess(ref mut val) = self
4338 {
4339 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
4340 } else {
4341 unreachable!()
4342 }
4343 }
4344 2 => {
4345 #[allow(irrefutable_let_patterns)]
4346 if let OpenTargetStrictTwoWayFieldsErrRequest::ReplyError(_) = self {
4347 } else {
4349 *self = OpenTargetStrictTwoWayFieldsErrRequest::ReplyError(
4351 fidl::new_empty!(i32, D),
4352 );
4353 }
4354 #[allow(irrefutable_let_patterns)]
4355 if let OpenTargetStrictTwoWayFieldsErrRequest::ReplyError(ref mut val) = self {
4356 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
4357 } else {
4358 unreachable!()
4359 }
4360 }
4361 ordinal => panic!("unexpected ordinal {:?}", ordinal),
4362 }
4363 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4364 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4365 }
4366 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4367 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4368 }
4369 Ok(())
4370 }
4371 }
4372}