fidl_fidl_serversuite__common/
fidl_fidl_serversuite__common.rs

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